@silurus/ooxml 0.89.10 → 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-Coh33rbW.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-BkpFlPT0.js → comment-ui-runtime-DhTTGSay.js} +3 -3
  9. package/dist/{document-model-source-Ca2fk_Fc.js → document-model-source-C6wGN8m3.js} +45 -45
  10. package/dist/{document-pull-client-CTGM4i1m.js → document-pull-client-BfGXPuQc.js} +4117 -4128
  11. package/dist/{document-pull-worker-hMKJ5RdB.js → document-pull-worker-Bl3wlLXC.js} +4 -4
  12. package/dist/{docx-B-47Ff78.js → docx-CNscQaT8.js} +496 -496
  13. package/dist/{docx-DwdB7I59.js → docx-Cry-eklK.js} +7 -7
  14. package/dist/{docx-model-source-CWuvf9jk.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-80mSndWp.js → render-worker-host-Cj-U3WPe.js} +1 -1
  34. package/dist/{render-worker-host-CVr53kg0.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,13 +1,13 @@
1
1
  import { t as e } from "./chunk-D5OxutzX.js";
2
2
  import { wo as t } from "./plot-area-frame-DNYMd9Pf.js";
3
- import { G as n, I as r, K as i, P as a, R as o, U as s, Xt as c, ft as l, lt as u } from "./bounded-raw-part-cache-B5a6cGKO.js";
4
- import { a as d, c as f, g as p, i as m, l as h, r as g } from "./document-pull-client-CTGM4i1m.js";
3
+ import { G as n, I as r, K as i, P as a, R as o, U as s, en as c, ft as l, lt as u } from "./bounded-raw-part-cache-D2Q0FIoE.js";
4
+ import { a as d, c as f, g as p, i as m, l as h, r as g } from "./document-pull-client-BfGXPuQc.js";
5
5
  import { n as _, t as ee } from "./abort-JztSoyw2.js";
6
6
  import { n as v, r as te, t as y } from "./wasm-loader-KAOyLXzf.js";
7
- import { t as b } from "./wasm-runtime-generation-D97yoAXz.js";
7
+ import { t as b } from "./wasm-runtime-generation--_2SjW2G.js";
8
8
  import { t as x } from "./in-process-pull-transport-BPJ7M0uC.js";
9
- import { n as S, r as ne, t as re } from "./document-pull-worker-hMKJ5RdB.js";
10
- import { a as ie } from "./render-Bf_Gywxw.js";
9
+ import { n as S, r as ne, t as re } from "./document-pull-worker-Bl3wlLXC.js";
10
+ import { a as ie } from "./render-C7F07FrC.js";
11
11
  var C = /* @__PURE__ */ e({
12
12
  DocxArchive: () => w,
13
13
  default: () => q,
@@ -321,7 +321,7 @@ var X = "DOCX document session was aborted", Z = y(() => v(import.meta.url, "doc
321
321
  async function ue(e, t) {
322
322
  if (!t?.factory) throw TypeError("openDocxDocument requires a canvas factory");
323
323
  if (t.legacyDoc !== void 0) {
324
- let { openDocxSource: n } = await import("./docx-model-source-CWuvf9jk.js");
324
+ let { openDocxSource: n } = await import("./docx-model-source-Cj8DGdLl.js");
325
325
  return n(e, t, Z);
326
326
  }
327
327
  let r = c(t.cjkFallback), i = await Y($(e), Z(), t, (e, t, n) => g(e, t, n));
@@ -343,7 +343,7 @@ async function ue(e, t) {
343
343
  }
344
344
  async function de(e, t = {}) {
345
345
  if (t.legacyDoc !== void 0) {
346
- let { materializeDocxSource: n } = await import("./docx-model-source-CWuvf9jk.js");
346
+ let { materializeDocxSource: n } = await import("./docx-model-source-Cj8DGdLl.js");
347
347
  return n(e, t, Z);
348
348
  }
349
349
  return te(async () => {
@@ -1,9 +1,9 @@
1
- import { G as e, K as t, Xt as n } from "./bounded-raw-part-cache-B5a6cGKO.js";
2
- import { a as r, g as i, i as a, j as o, l as s, r as c } from "./document-pull-client-CTGM4i1m.js";
1
+ import { G as e, K as t, en as n } from "./bounded-raw-part-cache-D2Q0FIoE.js";
2
+ import { a as r, g as i, i as a, j as o, l as s, r as c } from "./document-pull-client-BfGXPuQc.js";
3
3
  import { r as l } from "./wasm-loader-KAOyLXzf.js";
4
- import { r as u } from "./document-pull-worker-hMKJ5RdB.js";
5
- import { i as d, t as f } from "./docx-DwdB7I59.js";
6
- import { t as p } from "./model-source-Cch44xsb.js";
4
+ import { r as u } from "./document-pull-worker-Bl3wlLXC.js";
5
+ import { i as d, t as f } from "./docx-Cry-eklK.js";
6
+ import { t as p } from "./model-source-DksDDVb4.js";
7
7
  var m = class extends f {
8
8
  constructor(...e) {
9
9
  super(...e);
@@ -67,7 +67,7 @@ function _(e) {
67
67
  return t;
68
68
  }
69
69
  async function v(e, n, r, i) {
70
- let { acquireDocxSessionFromArchive: a, validateDocxModelSourceArchive: o, validateDocxModelSourceViewDefaults: s } = await import("./model-source-session-DSABX94B.js"), c = await p(e, "docx", {
70
+ let { acquireDocxSessionFromArchive: a, validateDocxModelSourceArchive: o, validateDocxModelSourceViewDefaults: s } = await import("./model-source-session-ifwyPPhZ.js"), c = await p(e, "docx", {
71
71
  ...n,
72
72
  source: n.legacyDoc
73
73
  }, o, (e) => t(e) ?? u(e));
package/dist/docx.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Co as e, wo as t } from "./plot-area-frame-DNYMd9Pf.js";
2
- import { p as n } from "./bounded-raw-part-cache-B5a6cGKO.js";
3
- import { a as r, c as i, d as a, f as o, i as s, n as c, o as l, p as u, r as d, s as f } from "./docx-B-47Ff78.js";
2
+ import { p as n } from "./bounded-raw-part-cache-D2Q0FIoE.js";
3
+ import { a as r, c as i, d as a, f as o, i as s, n as c, o as l, p as u, r as d, s as f } from "./docx-CNscQaT8.js";
4
4
  import { f as p, u as m } from "./pixel-budget-DI82Hn3R.js";
5
5
  import { i as h, t as g } from "./tiff-contract-DEd8CGuz.js";
6
- import { D as _ } from "./canvas-viewer-mechanics-BsqaoYgK.js";
6
+ import { D as _ } from "./canvas-viewer-mechanics-_ZBxW_sN.js";
7
7
  export { i as DocxDocument, d as DocxScrollViewer, s as DocxViewer, m as OoxmlDecodedImageLimitError, e as OoxmlError, t as OoxmlResourceLimitError, g as TiffDecodeError, _ as autoResize, l as buildDocxHighlightLayer, f as buildDocxTextLayer, p as isOoxmlDecodedImageLimitError, h as isTiffDecodeError, c as noteText, n as openExternalHyperlink, r as readDocxTextSelectionContext, o as resolveCommentAnchorRuns, u as resolveDocxCommentThreads, a as resolveRevisionAnchorRuns };
@@ -1,75 +1,47 @@
1
1
  import { ar as e, cr as t, fr as n, hr as r, or as i, pr as a, tr as o, vr as s } from "./plot-area-frame-DNYMd9Pf.js";
2
- import { At as c, Et as l, Ft as u, Gt as d, Ht as f, Kt as p, Mt as m, Nt as h, Pt as g, Rt as _, Tt as v, Ut as y, Wt as b, jt as x, qt as S, zt as C } from "./bounded-raw-part-cache-B5a6cGKO.js";
3
- var w = new Set([
4
- "line",
5
- "straightconnector1",
6
- "bentconnector2",
7
- "bentconnector3",
8
- "bentconnector4",
9
- "bentconnector5",
10
- "curvedconnector2",
11
- "curvedconnector3",
12
- "curvedconnector4",
13
- "curvedconnector5"
14
- ]), T = new Set([
15
- "callout1",
16
- "callout2",
17
- "callout3",
18
- "bordercallout1",
19
- "bordercallout2",
20
- "bordercallout3",
21
- "accentcallout1",
22
- "accentcallout2",
23
- "accentcallout3",
24
- "accentbordercallout1",
25
- "accentbordercallout2",
26
- "accentbordercallout3"
27
- ]);
2
+ import { At as c, Et as l, Ft as u, Ht as d, It as f, Jt as p, Kt as m, Lt as h, Pt as g, Rt as _, Tt as v, Ut as y, Xt as b, Yt as x, Zt as S, jt as C, qt as w, zt as T } from "./bounded-raw-part-cache-D2Q0FIoE.js";
28
3
  function E(e) {
29
- return T.has(e) || e === "line" || e === "straightconnector1" || e.startsWith("bentconnector");
30
- }
31
- function D(e) {
32
4
  return JSON.stringify({
33
5
  geometry: e.geometry,
34
6
  stroke: e.stroke,
35
7
  fill: e.fill
36
8
  });
37
9
  }
38
- var O = 1;
39
- function k(e, t, n = Infinity) {
10
+ var D = 1;
11
+ function O(e, t, n = Infinity) {
40
12
  let r = 0;
41
- if (!(n === Infinity || Number.isSafeInteger(n) && n > 0)) throw new f("Invalid DrawingML geometry budget");
13
+ if (!(n === Infinity || Number.isSafeInteger(n) && n > 0)) throw new m("Invalid DrawingML geometry budget");
42
14
  let i = (e) => {
43
- if (r += e, !Number.isSafeInteger(r) || r > n) throw new f("DrawingML geometry work budget exceeded");
44
- }, { x: a, y: o, w: l, h: _ } = e.rect;
15
+ if (r += e, !Number.isSafeInteger(r) || r > n) throw new m("DrawingML geometry work budget exceeded");
16
+ }, { x: a, y: o, w: c, h: d } = e.rect;
45
17
  if (![
46
18
  t,
47
19
  e.rect.x,
48
20
  e.rect.y,
49
- l,
50
- _,
21
+ c,
22
+ d,
51
23
  e.transform.rotationDeg
52
- ].every(Number.isFinite) || t < 0 || l < 0 || _ < 0) throw RangeError("Invalid DrawingML geometry frame");
24
+ ].every(Number.isFinite) || t < 0 || c < 0 || d < 0) throw RangeError("Invalid DrawingML geometry frame");
53
25
  i(1);
54
- let v = e.stroke;
55
- if (i(v?.customDash?.length ?? 0), e.geometry.kind === "preset" && e.geometry.adjustments.some((e) => e !== null && !Number.isFinite(e))) throw RangeError("Non-finite DrawingML adjustment");
56
- let y = v ? s(v, t) : null, b = [], k = [], A = (e, t, n, r = "nonzero") => {
57
- b.push(Object.freeze({
26
+ let p = e.stroke;
27
+ if (i(p?.customDash?.length ?? 0), e.geometry.kind === "preset" && e.geometry.adjustments.some((e) => e !== null && !Number.isFinite(e))) throw RangeError("Non-finite DrawingML adjustment");
28
+ let C = p ? s(p, t) : null, w = [], O = [], k = (e, t, n, r = "nonzero") => {
29
+ w.push(Object.freeze({
58
30
  path: e,
59
31
  fill: t,
60
32
  stroke: n,
61
33
  fillRule: r
62
34
  }));
63
- }, j = (e, n, r, a) => {
64
- if (!a || !v) return;
65
- let o = x(a, v, t, O, i);
35
+ }, A = (e, n, r, a) => {
36
+ if (!a || !p) return;
37
+ let o = u(a, p, t, D, i);
66
38
  if (o) {
67
39
  if (![
68
40
  e,
69
41
  n,
70
42
  r
71
43
  ].every(Number.isFinite)) throw RangeError("Invalid resolved DrawingML arrow frame");
72
- k.push(Object.freeze({
44
+ O.push(Object.freeze({
73
45
  tipX: e,
74
46
  tipY: n,
75
47
  angle: r,
@@ -77,71 +49,71 @@ function k(e, t, n = Infinity) {
77
49
  geometry: o
78
50
  }));
79
51
  }
80
- }, M = v?.headEnd ? c(v.headEnd, v, t, O) : 0, N = v?.tailEnd ? c(v.tailEnd, v, t, O) : 0, P = (e, t, n, r, a) => {
81
- if (!(r > 0 || a > 0) || !y) {
82
- A(e, t, y, n);
52
+ }, j = p?.headEnd ? g(p.headEnd, p, t, D) : 0, M = p?.tailEnd ? g(p.tailEnd, p, t, D) : 0, N = (e, t, n, r, a) => {
53
+ if (!(r > 0 || a > 0) || !C) {
54
+ k(e, t, C, n);
83
55
  return;
84
56
  }
85
- let o = m(e, r, a);
86
- i(o.reduce((e, t) => e + 1 + t.args.length, 0)), t !== "none" && A(e, t, null, n), A(o, "none", y, n);
87
- }, F = d(i);
57
+ let o = f(e, r, a);
58
+ i(o.reduce((e, t) => e + 1 + t.args.length, 0)), t !== "none" && k(e, t, null, n), k(o, "none", C, n);
59
+ }, P = x(i);
88
60
  if (e.geometry.kind === "preset") {
89
61
  i(e.geometry.adjustments.length);
90
- let t = e.geometry.name.toLowerCase(), n = [...e.geometry.adjustments], r = E(t) && !!(v?.headEnd || v?.tailEnd), s = t.startsWith("curvedconnector"), c = C(t, l, _, n, i, a, o);
91
- if (c) c.forEach((e, t) => {
92
- let n = t === c.length - 1 && (e.fill === "none" || e.fill == null);
93
- s && n && e.stroke ? P(e.path, e.fill, "nonzero", M, N) : A(e.path, e.fill, e.stroke && !(r && n) ? y : null);
62
+ let t = e.geometry.name.toLowerCase(), n = [...e.geometry.adjustments], r = l(t) && !!(p?.headEnd || p?.tailEnd), s = t.startsWith("curvedconnector"), u = y(t, c, d, n, i, a, o);
63
+ if (u) u.forEach((e, t) => {
64
+ let n = t === u.length - 1 && (e.fill === "none" || e.fill == null);
65
+ s && n && e.stroke ? N(e.path, e.fill, "nonzero", j, M) : k(e.path, e.fill, e.stroke && !(r && n) ? C : null);
94
66
  });
95
67
  else {
96
- let e = d(i);
97
- h(e.sink, t, a, o, l, _, n[0], n[1], n[2], n[3]), A(Object.freeze(e.commands), null, y, "nonzero");
68
+ let e = x(i);
69
+ h(e.sink, t, a, o, c, d, n[0], n[1], n[2], n[3]), k(Object.freeze(e.commands), null, C, "nonzero");
98
70
  }
99
- if (g(F.sink, e.geometry.name, a, o, l, _, n) || h(F.sink, e.geometry.name, a, o, l, _, n[0], n[1], n[2], n[3]), v && (w.has(t) || T.has(t))) {
100
- let e = u(t, a, o, l, _, n);
71
+ if (_(P.sink, e.geometry.name, a, o, c, d, n) || h(P.sink, e.geometry.name, a, o, c, d, n[0], n[1], n[2], n[3]), p && v(t)) {
72
+ let e = T(t, a, o, c, d, n);
101
73
  if (e) {
102
74
  if (r && e.vertices.length >= 2) {
103
- let t = d(i), n = e.vertices;
75
+ let t = x(i), n = e.vertices;
104
76
  t.sink.moveTo(n[0].x, n[0].y);
105
77
  for (let e = 1; e < n.length; e++) t.sink.lineTo(n[e].x, n[e].y);
106
- let r = m(Object.freeze(t.commands), M, N);
107
- r.length >= 2 && A(r, "none", y);
78
+ let r = f(Object.freeze(t.commands), j, M);
79
+ r.length >= 2 && k(r, "none", C);
108
80
  }
109
- j(e.end.x, e.end.y, e.end.angle, v.tailEnd), j(e.start.x, e.start.y, e.start.angle, v.headEnd);
81
+ A(e.end.x, e.end.y, e.end.angle, p.tailEnd), A(e.start.x, e.start.y, e.start.angle, p.headEnd);
110
82
  }
111
83
  }
112
84
  } else {
113
85
  let { subpaths: t } = e.geometry;
114
86
  for (let e of t) i(e.length + 1);
115
- let n = e.geometry.paint?.length === t.length ? e.geometry.paint : null, r = v && (M > 0 || N > 0) ? p(t) : null, s = r?.start ? M : 0, c = r?.end ? N : 0;
87
+ let n = e.geometry.paint?.length === t.length ? e.geometry.paint : null, r = p && (j > 0 || M > 0) ? b(t) : null, s = r?.start ? j : 0, l = r?.end ? M : 0;
116
88
  if (n) t.forEach((e, r) => {
117
- let u = d(i);
118
- S(u.sink, [e], a, o, l, _);
89
+ let u = x(i);
90
+ S(u.sink, [e], a, o, c, d);
119
91
  let f = Object.freeze(u.commands), p = n[r].fill ?? null;
120
- n[r].stroke === !1 ? A(f, p, null, n[r].fillRule) : P(f, p, n[r].fillRule ?? "nonzero", r === 0 ? s : 0, r === t.length - 1 ? c : 0);
92
+ n[r].stroke === !1 ? k(f, p, null, n[r].fillRule) : N(f, p, n[r].fillRule ?? "nonzero", r === 0 ? s : 0, r === t.length - 1 ? l : 0);
121
93
  });
122
94
  else {
123
- let e = d(i);
124
- S(e.sink, t, a, o, l, _), P(Object.freeze(e.commands), null, "nonzero", s, c);
95
+ let e = x(i);
96
+ S(e.sink, t, a, o, c, d), N(Object.freeze(e.commands), null, "nonzero", s, l);
125
97
  }
126
- if (S(F.sink, n ? t.filter((e, t) => n[t].fill !== "none") : t, a, o, l, _), v) {
127
- let e = p(t);
128
- e.start && j(a + e.start.x * l, o + e.start.y * _, Math.atan2(e.start.dy * _, e.start.dx * l), v.headEnd), e.end && j(a + e.end.x * l, o + e.end.y * _, Math.atan2(e.end.dy * _, e.end.dx * l), v.tailEnd);
98
+ if (S(P.sink, n ? t.filter((e, t) => n[t].fill !== "none") : t, a, o, c, d), p) {
99
+ let e = b(t);
100
+ e.start && A(a + e.start.x * c, o + e.start.y * d, Math.atan2(e.start.dy * d, e.start.dx * c), p.headEnd), e.end && A(a + e.end.x * c, o + e.end.y * d, Math.atan2(e.end.dy * d, e.end.dx * c), p.tailEnd);
129
101
  }
130
102
  }
131
103
  return Object.freeze({
132
- width: l,
133
- height: _,
104
+ width: c,
105
+ height: d,
134
106
  scale: t,
135
107
  originX: a,
136
108
  originY: o,
137
- sourceKey: D(e),
138
- paths: Object.freeze(b),
139
- arrows: Object.freeze(k),
140
- fillSilhouette: Object.freeze(F.commands),
109
+ sourceKey: E(e),
110
+ paths: Object.freeze(w),
111
+ arrows: Object.freeze(O),
112
+ fillSilhouette: Object.freeze(P.commands),
141
113
  workUnits: r
142
114
  });
143
115
  }
144
- function A(e, t) {
116
+ function k(e, t) {
145
117
  let n = e.resolvedGeometry;
146
118
  if (![
147
119
  t,
@@ -151,12 +123,12 @@ function A(e, t) {
151
123
  e.rect.h,
152
124
  e.transform.rotationDeg
153
125
  ].every(Number.isFinite) || t < 0 || e.rect.w < 0 || e.rect.h < 0 || typeof e.transform.flipH != "boolean" || typeof e.transform.flipV != "boolean") throw RangeError("Invalid retained DrawingML frame");
154
- if (!n || n.width !== e.rect.w || n.height !== e.rect.h || n.scale !== t || n.sourceKey !== D(e)) throw RangeError("Missing or stale retained DrawingML geometry");
126
+ if (!n || n.width !== e.rect.w || n.height !== e.rect.h || n.scale !== t || n.sourceKey !== E(e)) throw RangeError("Missing or stale retained DrawingML geometry");
155
127
  if (![n.originX, n.originY].every(Number.isFinite)) throw RangeError("Invalid retained DrawingML origin");
156
128
  if (!Number.isSafeInteger(n.workUnits) || n.workUnits < 1 || !Array.isArray(n.paths) || !Array.isArray(n.arrows)) throw RangeError("Invalid retained DrawingML work/scheduling");
157
- if (n.paths.length + n.arrows.length > n.workUnits) throw new f("Retained geometry scheduling exceeds its acquired work");
129
+ if (n.paths.length + n.arrows.length > n.workUnits) throw new m("Retained geometry scheduling exceeds its acquired work");
158
130
  let r = 0, i = (e) => {
159
- if (r += e, r > n.workUnits) throw new f("Retained geometry paths exceed their acquired work");
131
+ if (r += e, r > n.workUnits) throw new m("Retained geometry paths exceed their acquired work");
160
132
  }, a = (e) => {
161
133
  if (!Number.isFinite(e.lineWidth) || e.lineWidth < 0 || !Number.isFinite(e.miterLimit) || e.miterLimit <= 0 || ![
162
134
  "butt",
@@ -169,7 +141,7 @@ function A(e, t) {
169
141
  ].includes(e.lineJoin) || !Array.isArray(e.dash) || e.dash.length > n.workUnits || !e.dash.every((e) => Number.isFinite(e) && e >= 0)) throw RangeError("Invalid retained stroke geometry");
170
142
  };
171
143
  for (let e of n.paths) {
172
- if (b(e.path, i), e.fill !== null && ![
144
+ if (p(e.path, i), e.fill !== null && ![
173
145
  "norm",
174
146
  "none",
175
147
  "lighten",
@@ -180,18 +152,18 @@ function A(e, t) {
180
152
  if (e.fillRule !== "nonzero" && e.fillRule !== "evenodd") throw RangeError("Invalid retained fill rule");
181
153
  e.stroke && a(e.stroke);
182
154
  }
183
- b(n.fillSilhouette, i);
155
+ p(n.fillSilhouette, i);
184
156
  for (let e of n.arrows) {
185
157
  if (![
186
158
  e.tipX,
187
159
  e.tipY,
188
160
  e.angle
189
161
  ].every(Number.isFinite) || !["fill", "stroke"].includes(e.geometry.paint)) throw RangeError("Invalid retained arrow frame");
190
- b(e.geometry.path, i), a(e.geometry.stroke);
162
+ p(e.geometry.path, i), a(e.geometry.stroke);
191
163
  }
192
164
  return n;
193
165
  }
194
- function j(e, t) {
166
+ function A(e, t) {
195
167
  let n = {
196
168
  a: e.a * t.a + e.c * t.b,
197
169
  b: e.b * t.a + e.d * t.b,
@@ -203,18 +175,18 @@ function j(e, t) {
203
175
  if (!Object.values(n).every(Number.isFinite) || !Number.isFinite(n.a * n.d - n.b * n.c) || n.a * n.d - n.b * n.c === 0) throw RangeError("Invalid DrawingML geometry transform");
204
176
  return n;
205
177
  }
206
- var M = {
178
+ var j = {
207
179
  a: 1,
208
180
  b: 0,
209
181
  c: 0,
210
182
  d: 1,
211
183
  e: 0,
212
184
  f: 0
213
- }, N = (e, t) => ({
214
- ...M,
185
+ }, M = (e, t) => ({
186
+ ...j,
215
187
  e,
216
188
  f: t
217
- }), P = (e) => ({
189
+ }), N = (e) => ({
218
190
  a: Math.cos(e),
219
191
  b: Math.sin(e),
220
192
  c: -Math.sin(e),
@@ -222,20 +194,20 @@ var M = {
222
194
  e: 0,
223
195
  f: 0
224
196
  });
225
- function F(e, t = M) {
226
- let n = A(e, 1), { x: i, y: a, w: o, h: c } = e.rect, l = e.transform, u = t;
227
- (l.rotationDeg !== 0 || l.flipH || l.flipV) && (u = j(u, N(i + o / 2, a + c / 2)), l.rotationDeg !== 0 && (u = j(u, P(l.rotationDeg * Math.PI / 180))), u = j(u, {
228
- ...M,
197
+ function P(e, t = j) {
198
+ let n = k(e, 1), { x: i, y: a, w: o, h: c } = e.rect, l = e.transform, u = t;
199
+ (l.rotationDeg !== 0 || l.flipH || l.flipV) && (u = A(u, M(i + o / 2, a + c / 2)), l.rotationDeg !== 0 && (u = A(u, N(l.rotationDeg * Math.PI / 180))), u = A(u, {
200
+ ...j,
229
201
  a: l.flipH ? -1 : 1,
230
202
  d: l.flipV ? -1 : 1
231
- }), u = j(u, N(-(i + o / 2), -(a + c / 2)))), u = j(u, N(i - n.originX, a - n.originY));
203
+ }), u = A(u, M(-(i + o / 2), -(a + c / 2)))), u = A(u, M(i - n.originX, a - n.originY));
232
204
  let d = [], f = s(null, 1), p = (e, t, n) => {
233
205
  let i = r(e, t, n);
234
206
  i && d.push(i);
235
207
  };
236
208
  for (let t of n.paths) e.fill && e.fill.fillType !== "none" && t.fill !== "none" && p(t.path, u, f), t.stroke && p(t.path, u, t.stroke);
237
209
  for (let e of n.arrows) {
238
- let t = j(j(u, N(e.tipX, e.tipY)), P(e.angle));
210
+ let t = A(A(u, M(e.tipX, e.tipY)), N(e.angle));
239
211
  p(e.geometry.path, t, e.geometry.paint === "stroke" ? e.geometry.stroke : f);
240
212
  }
241
213
  if (d.length === 0) return null;
@@ -250,8 +222,8 @@ function F(e, t = M) {
250
222
  if (!Object.values(v).every(Number.isFinite)) throw RangeError("Non-finite DrawingML enclosure");
251
223
  return v;
252
224
  }
253
- var I = 1;
254
- function L(e, t, n) {
225
+ var F = 1;
226
+ function I(e, t, n) {
255
227
  let { x: r, y: i, w: a, h: o } = t.rect, { rotationDeg: s, flipH: c, flipV: l } = t.transform;
256
228
  e.save();
257
229
  try {
@@ -260,47 +232,47 @@ function L(e, t, n) {
260
232
  e.restore();
261
233
  }
262
234
  }
263
- function R(e, t, n, r, i, a) {
264
- let o = t.resolvedGeometry ? A(t, t.resolvedGeometry.scale) : k(t, 1);
235
+ function L(e, t, n, r, i, a) {
236
+ let o = t.resolvedGeometry ? k(t, t.resolvedGeometry.scale) : O(t, 1);
265
237
  if (i !== o.width || a !== o.height) throw RangeError("Retained DrawingML silhouette frame mismatch");
266
- y(e, o.fillSilhouette, n - o.originX, r - o.originY);
238
+ w(e, o.fillSilhouette, n - o.originX, r - o.originY);
267
239
  }
268
- function z(e, t) {
240
+ function R(e, t) {
269
241
  let { x: n, y: r, w: i, h: a } = t.rect;
270
- e.beginPath(), R(e, t, n, r, i, a), e.clip();
242
+ e.beginPath(), L(e, t, n, r, i, a), e.clip();
271
243
  }
272
- function B(t, r, a, s, c) {
244
+ function z(t, r, a, s, c) {
273
245
  if (t.strokeStyle = e(r.color), o(t, a), r.fill) {
274
- let e = i(r.fill, t, s.x, s.y, s.w, s.h, c, I, void 0, void 0, n(t));
246
+ let e = i(r.fill, t, s.x, s.y, s.w, s.h, c, F, void 0, void 0, n(t));
275
247
  e && (t.strokeStyle = e);
276
248
  }
277
249
  }
278
- function V(e, n, r) {
279
- let o = n.resolvedGeometry ? A(n, r) : k(n, r), s = n.resolvedGeometry ? n : {
250
+ function B(e, n, r) {
251
+ let o = n.resolvedGeometry ? k(n, r) : O(n, r), s = n.resolvedGeometry ? n : {
280
252
  ...n,
281
253
  resolvedGeometry: o
282
254
  };
283
255
  t(n.stroke?.fill) && (e = a(e));
284
- let { x: c, y: u, w: d, h: f } = n.rect;
285
- L(e, n, () => {
286
- let t = i(n.fill, e, c, u, d, f, n.transform.rotationDeg, I, void 0, (e, t, n, r, i) => R(e, s, t, n, r, i)), a = n.stroke;
256
+ let { x: l, y: u, w: f, h: p } = n.rect;
257
+ I(e, n, () => {
258
+ let t = i(n.fill, e, l, u, f, p, n.transform.rotationDeg, F, void 0, (e, t, n, r, i) => L(e, s, t, n, r, i)), a = n.stroke;
287
259
  for (let r of o.paths) {
288
- if (e.beginPath(), y(e, r.path, c - o.originX, u - o.originY), t && r.fill !== "none") {
260
+ if (e.beginPath(), w(e, r.path, l - o.originX, u - o.originY), t && r.fill !== "none") {
289
261
  e.save();
290
262
  try {
291
263
  e.fillStyle = t, r.fillRule === "evenodd" ? e.fill("evenodd") : e.fill();
292
- let n = _(r.fill);
264
+ let n = d(r.fill);
293
265
  n && (e.fillStyle = n, r.fillRule === "evenodd" ? e.fill("evenodd") : e.fill());
294
266
  } finally {
295
267
  e.restore();
296
268
  }
297
269
  }
298
- a && r.stroke && (B(e, a, r.stroke, n.rect, n.transform.rotationDeg), e.stroke());
270
+ a && r.stroke && (z(e, a, r.stroke, n.rect, n.transform.rotationDeg), e.stroke());
299
271
  }
300
272
  if (a) for (let t of o.arrows) {
301
- let i = c - o.originX + t.tipX, s = u - o.originY + t.tipY;
302
- v(e, i, s, t.angle, t.geometry, a, l(e, a, r, I, i, s, t.angle, t.end, n.rect, n.transform.rotationDeg, I));
273
+ let i = l - o.originX + t.tipX, s = u - o.originY + t.tipY;
274
+ c(e, i, s, t.angle, t.geometry, a, C(e, a, r, F, i, s, t.angle, t.end, n.rect, n.transform.rotationDeg, F));
303
275
  }
304
276
  });
305
277
  }
306
- export { A as a, F as i, V as n, k as o, L as r, z as t };
278
+ export { k as a, P as i, B as n, O as o, I as r, R as t };
@@ -1,4 +1,4 @@
1
- import { m as e } from "./slide-pull-client-3g6TxaKa.js";
1
+ import { m as e } from "./slide-pull-client-3mJmNjjB.js";
2
2
  import { Kr as t } from "./plot-area-frame-DNYMd9Pf.js";
3
3
  var n;
4
4
  function r() {
@@ -1,4 +1,4 @@
1
- import { a as e } from "./renderer-DuYC3xXi.js";
1
+ import { a as e } from "./renderer-N76SnQW7.js";
2
2
  function t(t, n) {
3
3
  return e(t.family, t.sizePt, void 0, !1, t.bold ? 700 : 400, t.italic ? "italic" : "normal", n);
4
4
  }
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./docx-B-47Ff78.js";
2
- import { t } from "./pptx-DbjWegUB.js";
3
- import { t as n } from "./xlsx-DBhYlJKp.js";
1
+ import { t as e } from "./docx-CNscQaT8.js";
2
+ import { t } from "./pptx-Bons7t3Y.js";
3
+ import { t as n } from "./xlsx-CKXeKvxl.js";
4
4
  export { e as docx, t as pptx, n as xlsx };
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "./model-source-COXegBNA.js";
2
- var t = "0.89.10", n = class extends Error {
2
+ var t = "0.89.12", n = class extends Error {
3
3
  constructor(n, r) {
4
4
  super(`Companion requires @silurus/ooxml ${n} (${r}); installed runtime is ${t} (${e})`), this.code = "companion-runtime-mismatch", this.name = "CompanionRuntimeMismatchError";
5
5
  }
6
6
  };
7
7
  function r(e, t) {
8
- if (e !== "0.89.10" || t !== "ooxml-model-source-module/v2") throw new n(e, t);
8
+ if (e !== "0.89.12" || t !== "ooxml-model-source-module/v2") throw new n(e, t);
9
9
  }
10
10
  export { n as CompanionRuntimeMismatchError, e as MODEL_SOURCE_MODULE_PROTOCOL, r as assertCompanionRuntime };
@@ -1,5 +1,5 @@
1
1
  import { Io as e, Po as t } from "./plot-area-frame-DNYMd9Pf.js";
2
- import { Bt as n, Vt as r, cn as i, in as a, sn as o, un as s } from "./bounded-raw-part-cache-B5a6cGKO.js";
2
+ import { Gt as n, Wt as r, cn as i, dn as a, fn as o, mn as s } from "./bounded-raw-part-cache-D2Q0FIoE.js";
3
3
  var c = /^\p{Cf}$/u, l = /^\s$/u, u = /^\p{M}$/u, d = /^\p{Script_Extensions=Arabic}$/u, f = /^(?=\p{Script=Arabic})\p{L}$/u;
4
4
  function p(e, t) {
5
5
  for (let n of t) if (!(l.test(n) || c.test(n))) switch (e) {
@@ -10,9 +10,9 @@ function p(e, t) {
10
10
  function m(e, t, n) {
11
11
  let r = [...new Set([
12
12
  0,
13
- ...a(t),
13
+ ...i(t),
14
14
  t.length
15
- ])].sort((e, t) => e - t), i = r.slice(0, -1).map((i, a) => {
15
+ ])].sort((e, t) => e - t), a = r.slice(0, -1).map((i, a) => {
16
16
  let o = r[a + 1], s = p(e, t.slice(i, o));
17
17
  return {
18
18
  start: i,
@@ -20,23 +20,23 @@ function m(e, t, n) {
20
20
  cls: s !== "neutral" && s !== "other" && n && !n(i, o) ? "other" : s
21
21
  };
22
22
  }), o = [], s = 0;
23
- for (; s < i.length;) {
24
- if (i[s].cls === "other") {
23
+ for (; s < a.length;) {
24
+ if (a[s].cls === "other") {
25
25
  o.push({
26
- ...i[s],
26
+ ...a[s],
27
27
  inScope: !1
28
28
  }), s += 1;
29
29
  continue;
30
30
  }
31
31
  let e = s;
32
- for (; e < i.length && i[e].cls !== "other";) e += 1;
33
- let t = i.slice(s, e).some((e) => e.cls === "proof"), n = !1;
32
+ for (; e < a.length && a[e].cls !== "other";) e += 1;
33
+ let t = a.slice(s, e).some((e) => e.cls === "proof"), n = !1;
34
34
  for (let r = s; r < e; r += 1) {
35
- let e = i[r], a = t && (e.cls === "neutral" ? n : !0);
35
+ let e = a[r], i = t && (e.cls === "neutral" ? n : !0);
36
36
  o.push({
37
37
  ...e,
38
- inScope: a
39
- }), n = a;
38
+ inScope: i
39
+ }), n = i;
40
40
  }
41
41
  s = e;
42
42
  }
@@ -2526,14 +2526,14 @@ function N(e) {
2526
2526
  return t(j, e.toLowerCase());
2527
2527
  }
2528
2528
  function P(t) {
2529
- let r = M.get(t);
2530
- if (r) return r;
2529
+ let n = M.get(t);
2530
+ if (n) return n;
2531
2531
  let i = e(j, t);
2532
- return i ? (r = {
2533
- adj: i.adj.map(([e, t]) => [e, n(t)]),
2534
- gd: i.gd.map(([e, t]) => [e, n(t)]),
2532
+ return i ? (n = {
2533
+ adj: i.adj.map(([e, t]) => [e, r(t)]),
2534
+ gd: i.gd.map(([e, t]) => [e, r(t)]),
2535
2535
  paths: i.paths
2536
- }, M.set(t, r), r) : null;
2536
+ }, M.set(t, n), n) : null;
2537
2537
  }
2538
2538
  var F = 48;
2539
2539
  function I(e, t, n, r) {
@@ -2601,14 +2601,14 @@ function L(e) {
2601
2601
  }
2602
2602
  return t;
2603
2603
  }
2604
- function R(e, t, n, i) {
2604
+ function R(e, t, r, i) {
2605
2605
  let a = P(e.toLowerCase());
2606
2606
  if (!a || a.paths.length === 0) return null;
2607
- let o = r({
2608
- w: n,
2607
+ let o = n({
2608
+ w: r,
2609
2609
  h: i,
2610
2610
  adj: t
2611
- }, a.adj, a.gd), s = a.paths.length === 1, c = I(a.paths[0], o, n, i), l = s ? c : I(a.paths[a.paths.length - 1], o, n, i);
2611
+ }, a.adj, a.gd), s = a.paths.length === 1, c = I(a.paths[0], o, r, i), l = s ? c : I(a.paths[a.paths.length - 1], o, r, i);
2612
2612
  return {
2613
2613
  top: c,
2614
2614
  bottom: l,
@@ -2715,7 +2715,7 @@ function q(e, t = {}) {
2715
2715
  naturalPx: f
2716
2716
  })), e.ws) {
2717
2717
  if (n.hasContent && e.si !== d) {
2718
- if (t.seaClusterSpaceGaps && t.seaClusterGaps && n.pendingCount === 0 && s?.cp !== void 0 && i(s.cp) && s.si !== d) {
2718
+ if (t.seaClusterSpaceGaps && t.seaClusterGaps && n.pendingCount === 0 && s?.cp !== void 0 && o(s.cp) && s.si !== d) {
2719
2719
  let e = m(s);
2720
2720
  n.pendingWidth += e, n.pendingCount += 1, l && c.push(h(s, "boundary"));
2721
2721
  }
@@ -2724,9 +2724,9 @@ function q(e, t = {}) {
2724
2724
  return;
2725
2725
  }
2726
2726
  if (n.pendingCount > 0) {
2727
- if (t.atomicSpaceGaps && e.cp !== void 0 && !a(` ${String.fromCodePoint(e.cp)}`).includes(1) && (n.pendingWidth -= n.pendingLastWidth, --n.pendingCount, l && c.pop()), (!t.textCellSpaceGaps || u(s) && u(e)) && (n.naturalGapSum += n.pendingWidth, n.gapCount += n.pendingCount, l)) for (let e of c) r.push(e);
2727
+ if (t.atomicSpaceGaps && e.cp !== void 0 && !i(` ${String.fromCodePoint(e.cp)}`).includes(1) && (n.pendingWidth -= n.pendingLastWidth, --n.pendingCount, l && c.pop()), (!t.textCellSpaceGaps || u(s) && u(e)) && (n.naturalGapSum += n.pendingWidth, n.gapCount += n.pendingCount, l)) for (let e of c) r.push(e);
2728
2728
  n.pendingWidth = 0, n.pendingCount = 0, n.pendingLastWidth = 0, c = [];
2729
- } else s && s.si !== d && n.hasContent && !_ && (s.cp !== void 0 && p(s.cp) || e.cp !== void 0 && p(e.cp) || t.seaClusterGaps && s.cp !== void 0 && e.cp !== void 0 && i(s.cp) && i(e.cp) && !o(e.cp)) && (n.naturalGapSum += m(s), n.gapCount += 1, l && r.push(h(s, "boundary")));
2729
+ } else s && s.si !== d && n.hasContent && !_ && (s.cp !== void 0 && p(s.cp) || e.cp !== void 0 && p(e.cp) || t.seaClusterGaps && s.cp !== void 0 && e.cp !== void 0 && o(s.cp) && o(e.cp) && !a(e.cp)) && (n.naturalGapSum += m(s), n.gapCount += 1, l && r.push(h(s, "boundary")));
2730
2730
  n.hasContent = !0, n.last = e;
2731
2731
  }, _ = (t.prefix?.pendingCount ?? 0) > 0;
2732
2732
  for (let n = t.firstContentSi ?? 0; n < e.length; n++) {
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./cfb-guard-DzYlucez.js";
2
- import { K as t } from "./bounded-raw-part-cache-B5a6cGKO.js";
2
+ import { K as t } from "./bounded-raw-part-cache-D2Q0FIoE.js";
3
3
  import { i as n, n as r, o as i } from "./model-source-COXegBNA.js";
4
4
  async function a(a, s, c, l, u = (e) => t(e) ?? e) {
5
5
  let d = a instanceof Uint8Array ? a : new Uint8Array(a), f = c.source === void 0 ? void 0 : i([c.source], s, d);
@@ -1,5 +1,5 @@
1
- import { a as e } from "./slide-pull-client-3g6TxaKa.js";
2
- import { G as t, I as n, P as r } from "./bounded-raw-part-cache-B5a6cGKO.js";
1
+ import { a as e } from "./slide-pull-client-3mJmNjjB.js";
2
+ import { G as t, I as n, P as r } from "./bounded-raw-part-cache-D2Q0FIoE.js";
3
3
  import { n as i } from "./abort-JztSoyw2.js";
4
4
  import { a } from "./model-source-COXegBNA.js";
5
5
  var o = [
@@ -1,6 +1,6 @@
1
- import { I as e, K as t, P as n, U as r } from "./bounded-raw-part-cache-B5a6cGKO.js";
1
+ import { I as e, K as t, P as n, U as r } from "./bounded-raw-part-cache-D2Q0FIoE.js";
2
2
  import { n as i } from "./abort-JztSoyw2.js";
3
- import { b as a } from "./worksheet-pull-client-BudfclVl.js";
3
+ import { b as a } from "./worksheet-pull-client-C2h4AMwt.js";
4
4
  import { a as o } from "./model-source-COXegBNA.js";
5
5
  import { t as s } from "./host-layout-Cz_lCuTZ.js";
6
6
  var c = [
@@ -1,8 +1,8 @@
1
- import { I as e, K as t, P as n } from "./bounded-raw-part-cache-B5a6cGKO.js";
1
+ import { I as e, K as t, P as n } from "./bounded-raw-part-cache-D2Q0FIoE.js";
2
2
  import { n as r } from "./abort-JztSoyw2.js";
3
3
  import { a as i } from "./model-source-COXegBNA.js";
4
4
  import { t as a } from "./in-process-pull-transport-BPJ7M0uC.js";
5
- import { n as o, r as s, t as c } from "./document-pull-worker-hMKJ5RdB.js";
5
+ import { n as o, r as s, t as c } from "./document-pull-worker-Bl3wlLXC.js";
6
6
  var l = [
7
7
  "open_document_cursor",
8
8
  "pull_document_chunk",