feat: release design system engine, studio and component contracts
This commit is contained in:
1 parent
ff1065fb27
commit
3943b946d6
693 files changed
+175546
-3894
No files matched your search
@@ -29,8 +29,8 @@ export function mountExtractedText(
|
||||
button.type = "button";
|
||||
button.className = "wrn-viewer-action";
|
||||
setButtonLabel(button, "Extract text");
|
||||
const details = doc.createElement("details");
|
||||
const summary = doc.createElement("summary");
|
||||
const details = doc.createElement("section");
|
||||
const summary = doc.createElement("h3");
|
||||
summary.textContent = "Extracted text";
|
||||
const text = doc.createElement("pre");
|
||||
details.append(summary, text);
|
||||
@@ -46,12 +46,10 @@ export function mountExtractedText(
|
||||
const result = await extractText(source, { baseURI: doc.baseURI, signal });
|
||||
if (disposed) return;
|
||||
text.textContent = result || "No text was found.";
|
||||
details.open = true;
|
||||
parent.append(details);
|
||||
} catch {
|
||||
if (!disposed) {
|
||||
text.textContent = "Text extraction is unavailable.";
|
||||
details.open = true;
|
||||
parent.append(details);
|
||||
}
|
||||
} finally {
|
||||
|
||||
Reference in new issue
Block a user