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
@@ -86,7 +86,7 @@ export function mountViewer(
|
||||
element("span", source.name || "File");
|
||||
title.textContent = source.name || "File";
|
||||
title.hidden = options.hideName === true;
|
||||
title.setAttribute('data-viewer-title','');
|
||||
title.setAttribute("data-viewer-title", "");
|
||||
if (!toolbar.contains(title)) toolbar.append(title);
|
||||
const controls = toolbar.querySelector<HTMLElement>("[data-viewer-controls]") ?? element("span");
|
||||
const actions = toolbar.querySelector<HTMLElement>("[data-viewer-actions]") ?? element("span");
|
||||
|
||||
@@ -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