@ai-matrx/print 0.8.69 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.0
4
+ ### `/zip` — the one zip engine (AP-2 engine ruling)
5
+
6
+ - New subpath `@ai-matrx/print/zip`: `buildZip`, `readZip`, `loadJSZip`. JSZip now lives in exactly one place; the DOCX bookmark pass and EPUB packaging load it through `loadJSZip`, and `@ai-matrx/alchemy/operate/zip` loads this module (Alchemy no longer depends on `jszip`).
7
+ - Print is recorded as THE engine for Alchemy's pdf, docx, epub and rich-html formats (FEATURE.md § Engines).
8
+
9
+ **Consumer action:** none; zip through `@ai-matrx/alchemy/operate/zip` as before.
10
+
3
11
  ## 0.8.69
4
12
 
5
13
  AP-2 (2026-10-07) — the kit and Alchemy doors are the only doors in this package (aidream guard `apps/shared/scripts/check-shared-doors.mjs`). The HTML print fallback, `downloadDocumentExport` and the capture-PNG fallback save through `@ai-matrx/kit/download` `downloadFile`. The image clipboard write stays (kit has no image flavor yet). No consumer action.
package/dist/document.cjs CHANGED
@@ -47097,6 +47097,12 @@ function templateParts(template, s) {
47097
47097
  return out;
47098
47098
  }
47099
47099
 
47100
+ // src/zip.ts
47101
+ async function loadJSZip() {
47102
+ const mod = await import("jszip");
47103
+ return mod.default ?? mod;
47104
+ }
47105
+
47100
47106
  // src/document/docx.ts
47101
47107
  var TW = 20;
47102
47108
  function strip(o) {
@@ -47647,8 +47653,7 @@ function renumberBookmarkXml(xml) {
47647
47653
  });
47648
47654
  }
47649
47655
  async function renumberBookmarks(bytes) {
47650
- const JSZipMod = await import("jszip");
47651
- const JSZip = JSZipMod.default ?? JSZipMod;
47656
+ const JSZip = await loadJSZip();
47652
47657
  const zip = await JSZip.loadAsync(bytes);
47653
47658
  const entry = zip.file("word/document.xml");
47654
47659
  if (!entry) return bytes;
@@ -48035,8 +48040,7 @@ function uuid() {
48035
48040
  });
48036
48041
  }
48037
48042
  async function documentToEpub(tree, options = {}) {
48038
- const JSZipMod = await import("jszip");
48039
- const JSZip = JSZipMod.default ?? JSZipMod;
48043
+ const JSZip = await loadJSZip();
48040
48044
  const s = tree.settings;
48041
48045
  const lang = s.lang || "en";
48042
48046
  const levels = [];