@silurus/ooxml 0.89.11 → 0.89.12

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 (49) hide show
  1. package/dist/assets/{render-worker-jGsxSIGb.js → render-worker-BD7EhV2y.js} +17 -17
  2. package/dist/assets/render-worker-BiKxVVB1.js +16 -0
  3. package/dist/assets/{render-worker-j1PT6zsz.js → render-worker-CVqXtEMW.js} +13 -13
  4. package/dist/{bounded-raw-part-cache-B5a6cGKO.js → bounded-raw-part-cache-D2Q0FIoE.js} +719 -663
  5. package/dist/{canvas-viewer-mechanics-BsqaoYgK.js → canvas-viewer-mechanics-_ZBxW_sN.js} +1 -1
  6. package/dist/{comment-overlay-controller-b3tKmzMa.js → comment-overlay-controller-CVvQCYhQ.js} +8 -8
  7. package/dist/{comment-ui-runtime-Bp37ytDC.js → comment-ui-runtime-CYkt_9-b.js} +2 -2
  8. package/dist/{comment-ui-runtime-DM65K2I9.js → comment-ui-runtime-DhTTGSay.js} +3 -3
  9. package/dist/{document-model-source-zVS9qt4o.js → document-model-source-C6wGN8m3.js} +45 -45
  10. package/dist/{document-pull-client-DIRkBd6z.js → document-pull-client-BfGXPuQc.js} +640 -640
  11. package/dist/{document-pull-worker-hMKJ5RdB.js → document-pull-worker-Bl3wlLXC.js} +4 -4
  12. package/dist/{docx-hRmOTAbV.js → docx-CNscQaT8.js} +496 -496
  13. package/dist/{docx-Bsp9NgeG.js → docx-Cry-eklK.js} +7 -7
  14. package/dist/{docx-model-source-BSNwPdvb.js → docx-model-source-Cj8DGdLl.js} +6 -6
  15. package/dist/docx.mjs +3 -3
  16. package/dist/{drawingml-shape-B1_kg4BV.js → drawingml-shape-CFzAXuvj.js} +88 -116
  17. package/dist/{font-preload-demand-NqcVKIpX.js → font-preload-demand-DhFVOxz4.js} +1 -1
  18. package/dist/{host-layout-measure-IFLllYwV.js → host-layout-measure-CWKDrVpo.js} +1 -1
  19. package/dist/index.mjs +3 -3
  20. package/dist/internal-companion.mjs +2 -2
  21. package/dist/{line-distribute-CwtditQo.js → line-distribute-DxnuaRdO.js} +24 -24
  22. package/dist/{model-source-Cch44xsb.js → model-source-DksDDVb4.js} +1 -1
  23. package/dist/{model-source-session-DRcqFGfM.js → model-source-session-8wqlNxsQ.js} +2 -2
  24. package/dist/{model-source-session-ClNCRDOg.js → model-source-session-BogYRDwj.js} +2 -2
  25. package/dist/{model-source-session-DSABX94B.js → model-source-session-ifwyPPhZ.js} +2 -2
  26. package/dist/node.mjs +4 -4
  27. package/dist/{pptx-DbjWegUB.js → pptx-Bons7t3Y.js} +26 -26
  28. package/dist/{pptx-C1CiFW1D.js → pptx-CQtPbMxI.js} +10 -10
  29. package/dist/{pptx-model-source-C9TuBisH.js → pptx-model-source-mg-O0LR9.js} +5 -5
  30. package/dist/pptx.mjs +4 -4
  31. package/dist/{presentation-model-source-DLNioq7T.js → presentation-model-source-CK6_hY1W.js} +5 -5
  32. package/dist/{render-Bf_Gywxw.js → render-C7F07FrC.js} +2 -2
  33. package/dist/{render-worker-host-CVr53kg0.js → render-worker-host-Cj-U3WPe.js} +1 -1
  34. package/dist/{render-worker-host-PC5hgu9x.js → render-worker-host-D7L6GMbE.js} +1 -1
  35. package/dist/{render-worker-host-pKls3F_t.js → render-worker-host-stI5Lppz.js} +1 -1
  36. package/dist/{renderer-DuYC3xXi.js → renderer-N76SnQW7.js} +1286 -1212
  37. package/dist/{resource-measurement-CfJtbwiR.js → resource-measurement-B2hzmYlu.js} +90 -90
  38. package/dist/{session-DPXK_lpI.js → session-D5au4i-W.js} +166 -166
  39. package/dist/{slide-pull-client-3g6TxaKa.js → slide-pull-client-3mJmNjjB.js} +854 -904
  40. package/dist/{wasm-runtime-generation-D97yoAXz.js → wasm-runtime-generation--_2SjW2G.js} +1 -1
  41. package/dist/{workbook-model-source-D1dmkDMP.js → workbook-model-source-CI1q6nxK.js} +6 -6
  42. package/dist/{worksheet-pull-client-BudfclVl.js → worksheet-pull-client-C2h4AMwt.js} +18 -18
  43. package/dist/{xlsx-DBhYlJKp.js → xlsx-CKXeKvxl.js} +452 -452
  44. package/dist/{xlsx-DA0uR1B1.js → xlsx-DujIp7CR.js} +4 -4
  45. package/dist/{xlsx-model-source-zemVDAfl.js → xlsx-model-source-fs0svOUo.js} +6 -6
  46. package/dist/xlsx.mjs +4 -4
  47. package/dist/xlsx_parser_bg.wasm +0 -0
  48. package/package.json +1 -1
  49. package/dist/assets/render-worker-Ck21oePL.js +0 -16
@@ -1,4 +1,4 @@
1
- import { bt as e } from "./bounded-raw-part-cache-B5a6cGKO.js";
1
+ import { bt as e } from "./bounded-raw-part-cache-D2Q0FIoE.js";
2
2
  import { B as t } from "./renderer-DpTePxGq.js";
3
3
  import { t as n } from "./abort-JztSoyw2.js";
4
4
  function r(e, t, n = {}) {
@@ -1,5 +1,5 @@
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";
1
+ import { In as e, Ln as t, Nn as n, Q as r, Rn as i, vn as a } from "./bounded-raw-part-cache-D2Q0FIoE.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-_ZBxW_sN.js";
3
3
  function y(e, t = a) {
4
4
  return e.byteLength > 0 && e.byteLength <= t;
5
5
  }
@@ -21,7 +21,7 @@ function ee(e, t, n, r) {
21
21
  return `${e}|${t}|${n}|${r.length}|${(i >>> 0).toString(16)}`;
22
22
  }
23
23
  async function S(r, o = a) {
24
- let s = i();
24
+ let s = n();
25
25
  if (!s || typeof FontFace > "u") return [];
26
26
  let c = [], l = /* @__PURE__ */ new Set(), u = [];
27
27
  for (let e of r) try {
@@ -29,17 +29,17 @@ async function S(r, o = a) {
29
29
  u.push(e.family);
30
30
  continue;
31
31
  }
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, () => {
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, () => {
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(i);
42
+ c.push(r);
43
43
  } catch {
44
44
  u.push(e.family);
45
45
  }
@@ -1,6 +1,6 @@
1
1
  import { Fa as e } from "./plot-area-frame-DNYMd9Pf.js";
2
- import { E as t } from "./comment-overlay-controller-b3tKmzMa.js";
3
- import { r as n } from "./pptx-DbjWegUB.js";
2
+ import { E as t } from "./comment-overlay-controller-CVvQCYhQ.js";
3
+ import { r as n } from "./pptx-Bons7t3Y.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,6 +1,6 @@
1
- import { E as e } from "./comment-overlay-controller-b3tKmzMa.js";
2
- import { L as t } from "./document-pull-client-DIRkBd6z.js";
3
- import { f as n } from "./docx-hRmOTAbV.js";
1
+ import { E as e } from "./comment-overlay-controller-CVvQCYhQ.js";
2
+ import { L as t } from "./document-pull-client-BfGXPuQc.js";
3
+ import { f as n } from "./docx-CNscQaT8.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,8 +1,8 @@
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-b3tKmzMa.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-DIRkBd6z.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-hRmOTAbV.js";
5
- import { T as D } from "./canvas-viewer-mechanics-BsqaoYgK.js";
1
+ import { Fn as e, I as t, P as n, Pn as r, en as i, rn as a } from "./bounded-raw-part-cache-D2Q0FIoE.js";
2
+ import { P as o, b as s } from "./comment-overlay-controller-CVvQCYhQ.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-BfGXPuQc.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-CNscQaT8.js";
5
+ import { T as D } from "./canvas-viewer-mechanics-_ZBxW_sN.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 = i(M.cjkFallback), z = n(M), B = Date.now(), V = M.mode ?? "main", H = new r({
32
+ let R = i(M.cjkFallback), z = t(M), B = Date.now(), V = M.mode ?? "main", H = new n({
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 n;
42
+ let t;
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
- n = await e.arrayBuffer();
47
- } else n = j;
46
+ t = await e.arrayBuffer();
47
+ } else t = j;
48
48
  L();
49
- let r = A(M.legacyDoc === void 0 ? void 0 : [M.legacyDoc], "docx", new Uint8Array(n));
50
- if (!r) return x.load(n, {
49
+ let n = A(M.legacyDoc === void 0 ? void 0 : [M.legacyDoc], "docx", new Uint8Array(t));
50
+ if (!n) return x.load(t, {
51
51
  ...M,
52
52
  legacyDoc: void 0
53
53
  });
54
- let i = k(r, "docx");
54
+ let i = k(n, "docx");
55
55
  try {
56
- H.setSourceBytes(n.byteLength), H.checkpoint("container ready");
57
- let r = V === "worker" ? (await import("./render-worker-host-PC5hgu9x.js")).createRenderWorker() : new (await (import("./worker-source-D3NwPe6l.js"))).default(), k, A, j = !1, U = () => {
56
+ H.setSourceBytes(t.byteLength), H.checkpoint("container ready");
57
+ let n = V === "worker" ? (await import("./render-worker-host-D7L6GMbE.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(r, i, M, (e) => {
59
+ }, W = I(n, 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 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 ? {
69
+ let n = c(k), D = p(M.currentDate, n.defaultCurrentDateMs, M.showTrackedChanges === !0);
70
+ n.activeLayoutOptions = D, await k._parse(t, 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 e(P.faces), new y();
93
+ if (F?.aborted) throw a(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 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();
97
+ let t = f(k._document, R, P);
98
+ I = t.installedSubstituteFamilies;
99
+ let n = await r(t.names, l);
100
+ if (F?.aborted) throw e(n), new y();
101
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 t = k, n = c(k), r = {
105
+ let e = k, t = c(k), n = {
106
106
  allowFootnoteContinuation: k._allowFootnoteContinuation,
107
107
  fontMetrics: O,
108
108
  useGoogleFonts: !!M.useGoogleFonts,
@@ -114,35 +114,35 @@ async function F(j, M = {}, N) {
114
114
  installedFamilies: "installed" in P ? P.installed : void 0,
115
115
  mathResources: q?.records,
116
116
  mathDrawables: q?.drawables
117
- }, i = await d(k._source, k._document, {
117
+ }, r = await d(k._source, k._document, {
118
118
  useGoogleFonts: !!M.useGoogleFonts,
119
119
  cjkFallback: R
120
120
  });
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
- nativeRouteMetrics: i.nativeRouteMetrics
121
+ if (F?.aborted) throw a(r.faces), new y();
122
+ k._officeFontFaces = [...k._officeFontFaces, ...r.faces], t.services = m(k._source, {
123
+ ...n,
124
+ nativeRouteMetrics: r.nativeRouteMetrics
125
125
  });
126
- let a = n.services, o = u(k._source, a, n.defaultCurrentDateMs), l = k._source.fatalParse === null, f = n.activeLayoutOptions;
126
+ let i = t.services, o = u(k._source, i, t.defaultCurrentDateMs), l = k._source.fatalParse === null, f = t.activeLayoutOptions;
127
127
  if (!f) throw Error("Active layout view was not recorded at load");
128
- let h = { onProgress: M.onLayoutProgress ? (e) => t._layoutObservers.notify("onLayoutProgress", M.onLayoutProgress, { committedUnits: e }) : void 0 };
128
+ let h = { onProgress: M.onLayoutProgress ? (t) => e._layoutObservers.notify("onLayoutProgress", M.onLayoutProgress, { committedUnits: t }) : void 0 };
129
129
  if (l && M.progressiveLayout) {
130
130
  let e = o.layoutVariants, t = k, n = new AbortController();
131
131
  t._layoutAbort = n;
132
- let r = s(), i = null, c = !0;
133
- t._layoutCompletion = E(k._source.bodyLayoutInput, a, f, {
132
+ let r = s(), a = null, c = !0;
133
+ t._layoutCompletion = E(k._source.bodyLayoutInput, i, f, {
134
134
  scheduler: {
135
135
  ...h,
136
136
  signal: n.signal
137
137
  },
138
138
  onPreview: (n) => {
139
139
  if (!c) return;
140
- let a = i === null, o = t._replaceMainLayoutPublication(e, f, i, n.layout);
140
+ let i = a === null, o = t._replaceMainLayoutPublication(e, f, a, n.layout);
141
141
  if (o === null) {
142
142
  c = !1;
143
143
  return;
144
144
  }
145
- if (i = o, a) t._layoutLifecycle.begin(), w(t, {
145
+ if (a = o, i) t._layoutLifecycle.begin(), w(t, {
146
146
  pageCount: n.layout.pages.length,
147
147
  exact: n.exact,
148
148
  complete: !1
@@ -160,13 +160,13 @@ async function F(j, M = {}, N) {
160
160
  }
161
161
  }
162
162
  }).then((n) => {
163
- c && t._replaceMainLayoutPublication(e, f, i, n) === null && (c = !1), t._layoutLifecycle.succeed(), w(t, {
163
+ c && t._replaceMainLayoutPublication(e, f, a, n) === null && (c = !1), t._layoutLifecycle.succeed(), w(t, {
164
164
  pageCount: t.pageCount,
165
165
  exact: !0,
166
166
  complete: !0
167
167
  }), t._layoutObservers.notify("onLayoutComplete", M.onLayoutComplete), r.resolve();
168
168
  }).catch((e) => {
169
- if (i === null) {
169
+ if (a === null) {
170
170
  r.reject(e);
171
171
  return;
172
172
  }
@@ -184,23 +184,23 @@ 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(), t = e === void 0 ? f : p(M.currentDate, n.defaultCurrentDateMs, e);
188
- n.activeLayoutOptions = t;
189
- let r = new AbortController(), i = !1, s = N?.subscribeViewChange(() => {
187
+ let e = N?.requestedView(), n = e === void 0 ? f : p(M.currentDate, t.defaultCurrentDateMs, e);
188
+ t.activeLayoutOptions = n;
189
+ let r = new AbortController(), a = !1, s = N?.subscribeViewChange(() => {
190
190
  let e = N.requestedView();
191
- i || e === void 0 || e === !0 == (t.showTrackedChanges === !0) || (i = !0, r.abort());
191
+ a || e === void 0 || e === !0 == (n.showTrackedChanges === !0) || (a = !0, r.abort());
192
192
  });
193
193
  k._layoutAbort = r;
194
194
  try {
195
- let e = await v(k._source.bodyLayoutInput, a, t, {
195
+ let e = await v(k._source.bodyLayoutInput, i, n, {
196
196
  ...h,
197
197
  signal: r.signal
198
198
  });
199
- if (L(), i) continue;
200
- o.layoutVariants.prime(t, e);
199
+ if (L(), a) continue;
200
+ o.layoutVariants.prime(n, e);
201
201
  break;
202
202
  } catch (e) {
203
- if (e instanceof y && i && !F?.aborted) continue;
203
+ if (e instanceof y && a && !F?.aborted) continue;
204
204
  throw e;
205
205
  } finally {
206
206
  s?.(), k._layoutAbort = null;
@@ -210,7 +210,7 @@ async function F(j, M = {}, N) {
210
210
  }
211
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(r, k ? U : void 0), e;
213
+ throw D(n, k ? U : void 0), e;
214
214
  } finally {
215
215
  F?.removeEventListener("abort", U);
216
216
  }