@silurus/ooxml 0.89.6 → 0.89.8

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.
Files changed (73) hide show
  1. package/dist/assets/render-worker-Ck21oePL.js +16 -0
  2. package/dist/assets/render-worker-DJiGqgi0.js +15 -0
  3. package/dist/assets/render-worker-hPLJ82d2.js +35 -0
  4. package/dist/{bounded-raw-part-cache-B8t03tSP.js → bounded-raw-part-cache-B5a6cGKO.js} +1713 -1515
  5. package/dist/{canvas-viewer-mechanics-DI38gHNV.js → canvas-viewer-mechanics-BsqaoYgK.js} +2 -2
  6. package/dist/{cfb-guard-BIaHdonq.js → cfb-guard-DzYlucez.js} +1 -1
  7. package/dist/chart-ex.mjs +367 -367
  8. package/dist/{comment-overlay-controller-Crm5Syhx.js → comment-overlay-controller-B7AoyoDK.js} +18 -18
  9. package/dist/{comment-ui-runtime-hfewTmVJ.js → comment-ui-runtime-C5eWtZSW.js} +3 -3
  10. package/dist/{comment-ui-runtime-BfEPgl5r.js → comment-ui-runtime-CV0I9faV.js} +3 -3
  11. package/dist/{document-model-source-BUTSwkyP.js → document-model-source-90ext13g.js} +37 -37
  12. package/dist/{document-pull-client-C_D779tO.js → document-pull-client-DSYpUET2.js} +17525 -13847
  13. package/dist/{document-pull-worker-Bkewz-So.js → document-pull-worker-hMKJ5RdB.js} +14 -14
  14. package/dist/{docx-BfLZeiwa.js → docx-DCCDnwrG.js} +593 -593
  15. package/dist/{docx-BC2HQtjg.js → docx-G7pt7ajR.js} +33 -33
  16. package/dist/{docx-model-source-IjrOZgnl.js → docx-model-source-Beon3BD5.js} +6 -6
  17. package/dist/docx.mjs +4 -4
  18. package/dist/docx_parser_bg.wasm +0 -0
  19. package/dist/{drawingml-shape-BcXkRayC.js → drawingml-shape-B1_kg4BV.js} +55 -55
  20. package/dist/{duotone-BI7CoghW.js → duotone-GK4Hqn7f.js} +1 -1
  21. package/dist/{emf-DgUBx9BU.js → emf--QWY-UlT.js} +50 -50
  22. package/dist/{font-preload-demand-B6HPFxDp.js → font-preload-demand-NqcVKIpX.js} +2 -2
  23. package/dist/{grid-geometry-CqTDvpDr.js → grid-geometry-DpMAiSZb.js} +1 -1
  24. package/dist/{host-layout-measure-DJvccDI3.js → host-layout-measure-Z2fIsmDw.js} +1 -1
  25. package/dist/index.mjs +3 -3
  26. package/dist/internal-companion.mjs +2 -2
  27. package/dist/{line-distribute-DR9Qwd3u.js → line-distribute-CwtditQo.js} +31 -25
  28. package/dist/{model-source-DcI3vC00.js → model-source-Cch44xsb.js} +2 -2
  29. package/dist/{model-source-session-BlQWNyj2.js → model-source-session-ClNCRDOg.js} +21 -21
  30. package/dist/{model-source-session-D0LF49Ve.js → model-source-session-DRcqFGfM.js} +2 -2
  31. package/dist/{model-source-session-BCteVilS.js → model-source-session-DSABX94B.js} +2 -2
  32. package/dist/node.mjs +5 -5
  33. package/dist/{plot-area-frame-D3JtHvov.js → plot-area-frame-DNYMd9Pf.js} +1914 -1890
  34. package/dist/{pptx-SmjDGyub.js → pptx-C1CiFW1D.js} +35 -33
  35. package/dist/{pptx-CfCiVlNB.js → pptx-Ci1Y9SS_.js} +261 -259
  36. package/dist/{pptx-model-source-B2Irk68a.js → pptx-model-source-C9TuBisH.js} +18 -12
  37. package/dist/pptx-parsed-slides-BMGr4khe.js +8 -0
  38. package/dist/pptx.mjs +5 -5
  39. package/dist/pptx_parser_bg.wasm +0 -0
  40. package/dist/{presentation-model-source-DL6duh5l.js → presentation-model-source-3N7xLtmI.js} +6 -6
  41. package/dist/region-map.mjs +39 -39
  42. package/dist/{render-CMUEAeHp.js → render-Bf_Gywxw.js} +32 -30
  43. package/dist/{render-worker-host-CtlBbau5.js → render-worker-host-BZoh-wqR.js} +1 -1
  44. package/dist/{render-worker-host-D_0g-TQ2.js → render-worker-host-BmVeB_mR.js} +1 -1
  45. package/dist/{render-worker-host-DjBotZNL.js → render-worker-host-CVr53kg0.js} +1 -1
  46. package/dist/{renderer-IFuBkPvF.js → renderer-CCA_bQB8.js} +777 -707
  47. package/dist/renderer-DpTePxGq.js +5887 -0
  48. package/dist/{resource-measurement-D2bu0Qfx.js → resource-measurement-CfJtbwiR.js} +129 -129
  49. package/dist/{session-KIWcCCP2.js → session-DPXK_lpI.js} +64 -64
  50. package/dist/{slide-pull-client-BUuJQQVE.js → slide-pull-client-3g6TxaKa.js} +1421 -1421
  51. package/dist/{three-d-ByHGsYrX.js → three-d-BfMZVR0w.js} +98 -98
  52. package/dist/three-d.mjs +678 -678
  53. package/dist/types/chart-ex.d.ts +5 -2
  54. package/dist/types/docx.d.ts +29 -7
  55. package/dist/types/index.d.ts +34 -11
  56. package/dist/types/node.d.ts +27 -5
  57. package/dist/types/pptx.d.ts +11 -7
  58. package/dist/types/region-map.d.ts +5 -2
  59. package/dist/types/three-d.d.ts +5 -2
  60. package/dist/types/xlsx.d.ts +10 -7
  61. package/dist/{wasm-runtime-generation-BLweKv8r.js → wasm-runtime-generation-D97yoAXz.js} +17 -17
  62. package/dist/{workbook-model-source-DBfVsWj7.js → workbook-model-source-BHR8shXr.js} +6 -6
  63. package/dist/{worksheet-pull-client-Du0MuIro.js → worksheet-pull-client-BudfclVl.js} +84 -84
  64. package/dist/{xlsx-CD1VeDIg.js → xlsx-7aY3Pbvh.js} +44 -44
  65. package/dist/{xlsx-CCMRAxPB.js → xlsx-DTtDjzFq.js} +299 -299
  66. package/dist/{xlsx-model-source-udh7Q4WB.js → xlsx-model-source-DXKvb90T.js} +36 -36
  67. package/dist/xlsx.mjs +5 -5
  68. package/dist/xlsx_parser_bg.wasm +0 -0
  69. package/package.json +1 -1
  70. package/dist/assets/render-worker-B5HWxkbU.js +0 -16
  71. package/dist/assets/render-worker-Ba4LYMJd.js +0 -15
  72. package/dist/assets/render-worker-DkqinUC6.js +0 -35
  73. package/dist/renderer-xdugdcMd.js +0 -5769
@@ -1,6 +1,6 @@
1
- import { An as e, En as t, Y as n, dn as r, jn as i, kn as a } from "./bounded-raw-part-cache-B8t03tSP.js";
2
- import { C as o, S as s, _ as c, a as l, b as u, g as d, h as f, l as p, m, p as h, r as g, x as _, y as v } from "./canvas-viewer-mechanics-DI38gHNV.js";
3
- function y(e, t = r) {
1
+ import { Mn as e, Nn as t, Pn as n, Q as r, kn as i, mn as a } from "./bounded-raw-part-cache-B5a6cGKO.js";
2
+ import { C as o, S as s, _ as c, a as l, b as u, g as d, h as f, l as p, m, p as h, r as g, x as _, y as v } from "./canvas-viewer-mechanics-BsqaoYgK.js";
3
+ function y(e, t = a) {
4
4
  return e.byteLength > 0 && e.byteLength <= t;
5
5
  }
6
6
  function b(e, t) {
@@ -20,41 +20,41 @@ function ee(e, t, n, r) {
20
20
  for (let e = 0; e < r.length; e++) i ^= r[e], i = Math.imul(i, 16777619);
21
21
  return `${e}|${t}|${n}|${r.length}|${(i >>> 0).toString(16)}`;
22
22
  }
23
- async function S(n, o = r) {
24
- let s = t();
23
+ async function S(r, o = a) {
24
+ let s = i();
25
25
  if (!s || typeof FontFace > "u") return [];
26
26
  let c = [], l = /* @__PURE__ */ new Set(), u = [];
27
- for (let e of n) try {
27
+ for (let e of r) try {
28
28
  if (!y(e.bytes, o)) {
29
29
  u.push(e.family);
30
30
  continue;
31
31
  }
32
- let t = e.odttf ? b(e.bytes, e.fontKey ?? "") : e.bytes, n = `embedded:${ee(e.family, e.weight, e.style, t)}`;
33
- if (l.has(n)) continue;
34
- l.add(n);
35
- let { face: r } = i(n, s, () => {
32
+ let t = e.odttf ? b(e.bytes, e.fontKey ?? "") : e.bytes, r = `embedded:${ee(e.family, e.weight, e.style, t)}`;
33
+ if (l.has(r)) continue;
34
+ l.add(r);
35
+ let { face: i } = n(r, s, () => {
36
36
  let n = t.buffer.slice(t.byteOffset, t.byteOffset + t.byteLength), r = new FontFace(e.family, n, {
37
37
  weight: e.weight,
38
38
  style: e.style
39
39
  });
40
40
  return s.add(r), r;
41
41
  });
42
- c.push(r);
42
+ c.push(i);
43
43
  } catch {
44
44
  u.push(e.family);
45
45
  }
46
46
  let d = c;
47
47
  if (c.length > 0) {
48
- let t = await a(Promise.allSettled(c.map((e) => Promise.resolve().then(() => e.load()))));
49
- Array.isArray(t) ? (d = [], t.forEach((t, n) => {
48
+ let n = await e(Promise.allSettled(c.map((e) => Promise.resolve().then(() => e.load()))));
49
+ Array.isArray(n) ? (d = [], n.forEach((e, n) => {
50
50
  let r = c[n];
51
- t.status === "fulfilled" ? d.push(r) : (u.push(r.family), e([r]));
52
- })) : (u.push(...c.map((e) => e.family)), e(c), d = []);
51
+ e.status === "fulfilled" ? d.push(r) : (u.push(r.family), t([r]));
52
+ })) : (u.push(...c.map((e) => e.family)), t(c), d = []);
53
53
  }
54
54
  return u.length > 0 && console.warn(`[ooxml] failed to register embedded font(s): ${[...new Set(u)].join(", ")}; falling back to substitute fonts (text may shift or differ).`), d;
55
55
  }
56
- function C(t) {
57
- e(t);
56
+ function C(e) {
57
+ t(e);
58
58
  }
59
59
  function w(e, t, n) {
60
60
  return e < t ? t : e > n ? n : e;
@@ -665,7 +665,7 @@ var Q = class {
665
665
  return Math.max(0, t - n - r);
666
666
  }
667
667
  dpr() {
668
- return this.hooks.options().dpr ?? n();
668
+ return this.hooks.options().dpr ?? r();
669
669
  }
670
670
  }, re = class {
671
671
  notify;
@@ -1,6 +1,6 @@
1
- import { E as e } from "./comment-overlay-controller-Crm5Syhx.js";
2
- import { L as t } from "./document-pull-client-C_D779tO.js";
3
- import { f as n } from "./docx-BfLZeiwa.js";
1
+ import { E as e } from "./comment-overlay-controller-B7AoyoDK.js";
2
+ import { L as t } from "./document-pull-client-DSYpUET2.js";
3
+ import { f as n } from "./docx-DCCDnwrG.js";
4
4
  import { i as r, n as i, o as a, r as o, s, t as c } from "./read-only-comment-margin-Ee9Y6vPg.js";
5
5
  import { i as l, n as u, r as d, t as f } from "./read-only-comment-decoration-B06YO2zk.js";
6
6
  function p(e, r) {
@@ -1,6 +1,6 @@
1
- import { Aa as e } from "./plot-area-frame-D3JtHvov.js";
2
- import { E as t } from "./comment-overlay-controller-Crm5Syhx.js";
3
- import { r as n } from "./pptx-CfCiVlNB.js";
1
+ import { Fa as e } from "./plot-area-frame-DNYMd9Pf.js";
2
+ import { E as t } from "./comment-overlay-controller-B7AoyoDK.js";
3
+ import { r as n } from "./pptx-Ci1Y9SS_.js";
4
4
  import { i as r, n as i, o as a, r as o, t as s } from "./read-only-comment-margin-Ee9Y6vPg.js";
5
5
  import { i as c, n as l, r as u, t as d } from "./read-only-comment-decoration-B06YO2zk.js";
6
6
  function f(e, t, n) {
@@ -1,8 +1,8 @@
1
- import { Dn as e, N as t, On as n, Xt as r, j as i, qt as a } from "./bounded-raw-part-cache-B8t03tSP.js";
2
- import { P as o, b as s } from "./comment-overlay-controller-Crm5Syhx.js";
3
- import { N as c, _ as l, a as u, d, f, j as p, l as m, o as h, p as g, s as _, v, y } from "./document-pull-client-C_D779tO.js";
4
- import { _ as b, c as x, g as S, h as C, l as w, m as T, u as E } from "./docx-BfLZeiwa.js";
5
- import { T as D } from "./canvas-viewer-mechanics-DI38gHNV.js";
1
+ import { $t as e, An as t, I as n, P as r, Xt as i, jn as a } from "./bounded-raw-part-cache-B5a6cGKO.js";
2
+ import { P as o, b as s } from "./comment-overlay-controller-B7AoyoDK.js";
3
+ import { N as c, _ as l, a as u, d, f, j as p, l as m, o as h, p as g, s as _, v, y } from "./document-pull-client-DSYpUET2.js";
4
+ import { _ as b, c as x, g as S, h as C, l as w, m as T, u as E } from "./docx-DCCDnwrG.js";
5
+ import { T as D } from "./canvas-viewer-mechanics-BsqaoYgK.js";
6
6
  import { n as O } from "./renderer-module-contract-BuTx2FWJ.js";
7
7
  import { n as k, o as A, r as j } from "./model-source-COXegBNA.js";
8
8
  import { t as M } from "./bundled-asset-url-BMJ8vNHP.js";
@@ -29,7 +29,7 @@ async function F(j, M = {}, N) {
29
29
  if (F?.aborted) throw new y();
30
30
  };
31
31
  L();
32
- let R = a(M.cjkFallback), z = t(M), B = Date.now(), V = M.mode ?? "main", H = new i({
32
+ let R = i(M.cjkFallback), z = n(M), B = Date.now(), V = M.mode ?? "main", H = new r({
33
33
  enabled: !0,
34
34
  format: "docx",
35
35
  mode: V,
@@ -39,24 +39,24 @@ async function F(j, M = {}, N) {
39
39
  });
40
40
  try {
41
41
  if (V === "worker" && (typeof Worker > "u" || typeof OffscreenCanvas > "u")) throw Error("mode: 'worker' requires Worker and OffscreenCanvas support");
42
- let t;
42
+ let n;
43
43
  if (typeof j == "string") {
44
44
  let e = await fetch(j, { signal: F });
45
45
  if (!e.ok) throw Error(`Failed to fetch: ${e.status} ${e.statusText}`);
46
- t = await e.arrayBuffer();
47
- } else t = j;
46
+ n = await e.arrayBuffer();
47
+ } else n = j;
48
48
  L();
49
- let i = A(M.legacyDoc === void 0 ? void 0 : [M.legacyDoc], "docx", new Uint8Array(t));
50
- if (!i) return x.load(t, {
49
+ let r = A(M.legacyDoc === void 0 ? void 0 : [M.legacyDoc], "docx", new Uint8Array(n));
50
+ if (!r) return x.load(n, {
51
51
  ...M,
52
52
  legacyDoc: void 0
53
53
  });
54
- let a = k(i, "docx");
54
+ let i = k(r, "docx");
55
55
  try {
56
- H.setSourceBytes(t.byteLength), H.checkpoint("container ready");
57
- let i = V === "worker" ? (await import("./render-worker-host-DjBotZNL.js")).createRenderWorker() : new (await (import("./worker-source-D3NwPe6l.js"))).default(), k, A, j = !1, U = () => {
56
+ H.setSourceBytes(n.byteLength), H.checkpoint("container ready");
57
+ let r = V === "worker" ? (await import("./render-worker-host-BmVeB_mR.js")).createRenderWorker() : new (await (import("./worker-source-D3NwPe6l.js"))).default(), k, A, j = !1, U = () => {
58
58
  j || !k || (j = !0, k.destroy());
59
- }, W = I(i, a, M, (e) => {
59
+ }, W = I(r, i, M, (e) => {
60
60
  k && P(k, e);
61
61
  }), G = V === "worker" ? O(M) : void 0, K = V === "worker" && !!M.progressiveLayout;
62
62
  try {
@@ -66,8 +66,8 @@ async function F(j, M = {}, N) {
66
66
  B,
67
67
  M.wasmUrl
68
68
  ]), k = A, F?.addEventListener("abort", U, { once: !0 }), L(), k._metrics = H, k._cjkFallback = R, k._allowFootnoteContinuation = M.allowFootnoteContinuation !== !1;
69
- let i = c(k), D = p(M.currentDate, i.defaultCurrentDateMs, M.showTrackedChanges === !0);
70
- i.activeLayoutOptions = D, await k._parse(t, z.policy, V === "worker" ? !!M.useGoogleFonts : !1, M.workerTimeoutMs, (e) => H.observeUsage(e), G, K ? {
69
+ let r = c(k), D = p(M.currentDate, r.defaultCurrentDateMs, M.showTrackedChanges === !0);
70
+ r.activeLayoutOptions = D, await k._parse(n, z.policy, V === "worker" ? !!M.useGoogleFonts : !1, M.workerTimeoutMs, (e) => H.observeUsage(e), G, K ? {
71
71
  onPartial: M.onLayoutPartial,
72
72
  onComplete: M.onLayoutComplete,
73
73
  onProgress: M.onLayoutProgress,
@@ -90,19 +90,19 @@ async function F(j, M = {}, N) {
90
90
  faces: [],
91
91
  routes: {}
92
92
  };
93
- if (F?.aborted) throw r(P.faces), new y();
93
+ if (F?.aborted) throw e(P.faces), new y();
94
94
  k._officeFontFaces = P.faces;
95
95
  let I = [];
96
96
  if (k._mode === "main" && M.useGoogleFonts && k._document) {
97
- let t = f(k._document, R, P);
98
- I = t.installedSubstituteFamilies;
99
- let r = await e(t.names, l);
100
- if (F?.aborted) throw n(r), new y();
101
- k._googleFontFaces = r;
97
+ let e = f(k._document, R, P);
98
+ I = e.installedSubstituteFamilies;
99
+ let n = await t(e.names, l);
100
+ if (F?.aborted) throw a(n), new y();
101
+ k._googleFontFaces = n;
102
102
  }
103
103
  let q;
104
104
  if (k._mode === "main" && M.math && k._document && h(k._document) && (q = await _(k._document, M.math)), L(), k._mode === "main" && k._document && k._source) {
105
- let e = k, t = c(k), n = {
105
+ let t = k, n = c(k), r = {
106
106
  allowFootnoteContinuation: k._allowFootnoteContinuation,
107
107
  fontMetrics: O,
108
108
  useGoogleFonts: !!M.useGoogleFonts,
@@ -118,14 +118,14 @@ async function F(j, M = {}, N) {
118
118
  useGoogleFonts: !!M.useGoogleFonts,
119
119
  cjkFallback: R
120
120
  });
121
- if (F?.aborted) throw r(i.faces), new y();
122
- k._officeFontFaces = [...k._officeFontFaces, ...i.faces], t.services = m(k._source, {
123
- ...n,
121
+ if (F?.aborted) throw e(i.faces), new y();
122
+ k._officeFontFaces = [...k._officeFontFaces, ...i.faces], n.services = m(k._source, {
123
+ ...r,
124
124
  nativeRouteMetrics: i.nativeRouteMetrics
125
125
  });
126
- let a = t.services, o = u(k._source, a, t.defaultCurrentDateMs), l = k._source.fatalParse === null, f = t.activeLayoutOptions;
126
+ let a = n.services, o = u(k._source, a, n.defaultCurrentDateMs), l = k._source.fatalParse === null, f = n.activeLayoutOptions;
127
127
  if (!f) throw Error("Active layout view was not recorded at load");
128
- let h = { onProgress: M.onLayoutProgress ? (t) => e._layoutObservers.notify("onLayoutProgress", M.onLayoutProgress, { committedUnits: t }) : void 0 };
128
+ let h = { onProgress: M.onLayoutProgress ? (e) => t._layoutObservers.notify("onLayoutProgress", M.onLayoutProgress, { committedUnits: e }) : void 0 };
129
129
  if (l && M.progressiveLayout) {
130
130
  let e = o.layoutVariants, t = k, n = new AbortController();
131
131
  t._layoutAbort = n;
@@ -184,20 +184,20 @@ async function F(j, M = {}, N) {
184
184
  }), await r.promise;
185
185
  } else if (l && (M.sliceLayout !== !1 || M.onLayoutProgress)) for (;;) {
186
186
  L();
187
- let e = N?.requestedView(), n = e === void 0 ? f : p(M.currentDate, t.defaultCurrentDateMs, e);
188
- t.activeLayoutOptions = n;
187
+ let e = N?.requestedView(), t = e === void 0 ? f : p(M.currentDate, n.defaultCurrentDateMs, e);
188
+ n.activeLayoutOptions = t;
189
189
  let r = new AbortController(), i = !1, s = N?.subscribeViewChange(() => {
190
190
  let e = N.requestedView();
191
- i || e === void 0 || e === !0 == (n.showTrackedChanges === !0) || (i = !0, r.abort());
191
+ i || e === void 0 || e === !0 == (t.showTrackedChanges === !0) || (i = !0, r.abort());
192
192
  });
193
193
  k._layoutAbort = r;
194
194
  try {
195
- let e = await v(k._source.bodyLayoutInput, a, n, {
195
+ let e = await v(k._source.bodyLayoutInput, a, t, {
196
196
  ...h,
197
197
  signal: r.signal
198
198
  });
199
199
  if (L(), i) continue;
200
- o.layoutVariants.prime(n, e);
200
+ o.layoutVariants.prime(t, e);
201
201
  break;
202
202
  } catch (e) {
203
203
  if (e instanceof y && i && !F?.aborted) continue;
@@ -208,14 +208,14 @@ async function F(j, M = {}, N) {
208
208
  }
209
209
  else o.layoutVariants.layoutFor(f);
210
210
  }
211
- return L(), await k._resourceUsage(M.workerTimeoutMs ?? 1e3).then((e) => H.observeUsage(e), () => void 0), H.checkpoint("model and layout ready"), L(), H.succeed({ pages: k.pageCount }), a.release(), A;
211
+ return L(), await k._resourceUsage(M.workerTimeoutMs ?? 1e3).then((e) => H.observeUsage(e), () => void 0), H.checkpoint("model and layout ready"), L(), H.succeed({ pages: k.pageCount }), i.release(), A;
212
212
  } catch (e) {
213
- throw D(i, k ? U : void 0), e;
213
+ throw D(r, k ? U : void 0), e;
214
214
  } finally {
215
215
  F?.removeEventListener("abort", U);
216
216
  }
217
217
  } finally {
218
- a.release();
218
+ i.release();
219
219
  }
220
220
  } catch (e) {
221
221
  throw H.fail(e), e;