ZDDC/transmittal/js
ZDDC 9481122570 perf(tools): vendor jszip + docx-preview for archive/transmittal/classifier
Same pattern as the browse fix. archive, transmittal, classifier
previously CDN-loaded jszip + docx-preview on first preview of a
.zip / .docx file via shared/preview-lib.js's loadLibrary helper.
That meant each first-preview blocked on a CDN round-trip + parse,
and broke entirely under restrictive networks or CSPs.

Vendor both libs under shared/vendor/ and concat them at the top of
each tool's build, ahead of init.js. window.JSZip + window.docx are
now defined immediately on page load. Drop the redundant loadLibrary
calls (and classifier's stray <script src="cdn..."> tag in the
template, plus archive's bespoke loadJSZip helper in export.js).

xlsx (SheetJS) intentionally stays CDN-loaded — at ~900 KB it's too
large to inline, and only fires on .xlsx preview which is a rarer
path.

Bundle size impact (uncompressed):
  archive:     304 KB → 476 KB  (+172 KB)
  transmittal: 449 KB → 621 KB  (+172 KB)
  classifier:  252 KB → 424 KB  (+172 KB)

With the gzip middleware (~75% reduction on HTML) and ETag-cached
revalidation now in place, the wire-size delta is ~40 KB per tool
on the first load and 0 on every subsequent load until redeploy.
2026-05-04 07:49:17 -05:00
..
app.js Initial commit 2026-04-27 11:05:47 -05:00
data.js Initial commit 2026-04-27 11:05:47 -05:00
dom.js Initial commit 2026-04-27 11:05:47 -05:00
drop-zones.js Initial commit 2026-04-27 11:05:47 -05:00
email-tags.js Initial commit 2026-04-27 11:05:47 -05:00
files-archive.js Initial commit 2026-04-27 11:05:47 -05:00
files-preview.js perf(tools): vendor jszip + docx-preview for archive/transmittal/classifier 2026-05-04 07:49:17 -05:00
files-render.js Initial commit 2026-04-27 11:05:47 -05:00
files.js Initial commit 2026-04-27 11:05:47 -05:00
filters.js Initial commit 2026-04-27 11:05:47 -05:00
focus.js Initial commit 2026-04-27 11:05:47 -05:00
hydrate.js Initial commit 2026-04-27 11:05:47 -05:00
json.js Initial commit 2026-04-27 11:05:47 -05:00
live-digest.js Initial commit 2026-04-27 11:05:47 -05:00
logos.js Initial commit 2026-04-27 11:05:47 -05:00
main.js Initial commit 2026-04-27 11:05:47 -05:00
markdown-editor.js Initial commit 2026-04-27 11:05:47 -05:00
markdown.js Initial commit 2026-04-27 11:05:47 -05:00
mode.js Initial commit 2026-04-27 11:05:47 -05:00
publish-modal.js Initial commit 2026-04-27 11:05:47 -05:00
publish.js Initial commit 2026-04-27 11:05:47 -05:00
reactive.js Initial commit 2026-04-27 11:05:47 -05:00
reset.js Initial commit 2026-04-27 11:05:47 -05:00
security.js Initial commit 2026-04-27 11:05:47 -05:00
state.js Initial commit 2026-04-27 11:05:47 -05:00
util.js Initial commit 2026-04-27 11:05:47 -05:00
validation.js Initial commit 2026-04-27 11:05:47 -05:00
verification.js Initial commit 2026-04-27 11:05:47 -05:00
visibility.js Initial commit 2026-04-27 11:05:47 -05:00