Skip to content

Commit 15563e8

Browse files
committed
chore: update @xmldom/xmldom to 0.9.10. And some fixes to documentation files.
1 parent 04fc16a commit 15563e8

6 files changed

Lines changed: 107 additions & 120 deletions

File tree

docs/dist/officeparser.browser.iife.js

Lines changed: 43 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dist/officeparser.browser.mjs

Lines changed: 43 additions & 43 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@
259259
font-weight: 800;
260260
background: var(--gradient);
261261
-webkit-background-clip: text;
262+
background-clip: text;
262263
-webkit-text-fill-color: transparent;
263264
letter-spacing: -0.02em;
264265
cursor: pointer;
@@ -374,6 +375,7 @@
374375
line-height: 1.1;
375376
background: linear-gradient(to bottom, var(--text-main), var(--text-dim));
376377
-webkit-background-clip: text;
378+
background-clip: text;
377379
-webkit-text-fill-color: transparent;
378380
margin-bottom: 1.5rem;
379381
letter-spacing: -0.03em;
@@ -382,6 +384,7 @@
382384
[data-theme="light"] .hero h1 {
383385
background: linear-gradient(to bottom, #000, #475569);
384386
-webkit-background-clip: text;
387+
background-clip: text;
385388
-webkit-text-fill-color: transparent;
386389
}
387390

@@ -453,6 +456,7 @@
453456
font-weight: 800;
454457
background: var(--gradient);
455458
-webkit-background-clip: text;
459+
background-clip: text;
456460
-webkit-text-fill-color: transparent;
457461
}
458462

docs/visualizer_old.html

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,19 @@ <h3>Raw AST (JSON)</h3>
598598
return BRAND_ICONS[ext] || BRAND_ICONS.default;
599599
};
600600

601+
const ocrCheckbox = document.getElementById('cfg_ocr');
601602
const updateOcrCleanupState = () => {
602603
cleanupOcrBtn.disabled = !ocrWasUsedInCurrentPreview;
603604
cleanupOcrBtn.title = ocrWasUsedInCurrentPreview ? "Terminate active OCR workers" : "No OCR workers recently used";
605+
if (ocrCheckbox) {
606+
cleanupOcrBtn.style.display = ocrCheckbox.checked ? 'inline-block' : 'none';
607+
}
604608
};
605609

610+
if (ocrCheckbox) {
611+
ocrCheckbox.addEventListener('change', updateOcrCleanupState);
612+
}
613+
606614
cleanupOcrBtn.addEventListener('click', async () => {
607615
const originalHtml = `🗑️ Cleanup OCR Pool`;
608616
try {
@@ -669,31 +677,6 @@ <h3>Raw AST (JSON)</h3>
669677

670678
loadConfig();
671679

672-
// Cleanup Button logic
673-
const cleanupOcrBtn = document.getElementById('cleanupOcrBtn');
674-
const ocrCheckbox = document.getElementById('cfg_ocr');
675-
676-
const updateCleanupVisibility = () => {
677-
cleanupOcrBtn.style.display = ocrCheckbox.checked ? 'inline-block' : 'none';
678-
};
679-
680-
ocrCheckbox.addEventListener('change', updateCleanupVisibility);
681-
updateCleanupVisibility(); // Initial check
682-
683-
cleanupOcrBtn.addEventListener('click', async () => {
684-
const originalText = cleanupOcrBtn.innerHTML;
685-
try {
686-
cleanupOcrBtn.textContent = '🧹 Cleaning...';
687-
await window.officeParser.terminateOcr();
688-
cleanupOcrBtn.textContent = '✅ Cleaned!';
689-
status.textContent = 'OCR Workers terminated successfully.';
690-
setTimeout(() => { cleanupOcrBtn.innerHTML = originalText; }, 2000);
691-
} catch (err) {
692-
console.error("Cleanup failed:", err);
693-
cleanupOcrBtn.textContent = '❌ Failed';
694-
setTimeout(() => { cleanupOcrBtn.innerHTML = originalText; }, 2000);
695-
}
696-
});
697680

698681
console.log("Visualizer initialized successfully.");
699682

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
},
9292
"homepage": "https://officeparser.harshankur.com",
9393
"dependencies": {
94-
"@xmldom/xmldom": "^0.9.9",
94+
"@xmldom/xmldom": "^0.9.10",
9595
"fflate": "^0.8.2",
9696
"file-type": "^22.0.1",
9797
"pdfjs-dist": "5.6.205",
@@ -108,4 +108,4 @@
108108
"tsx": "^4.21.0",
109109
"typescript": "^6.0.2"
110110
}
111-
}
111+
}

0 commit comments

Comments
 (0)