@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.
- package/dist/assets/{render-worker-jGsxSIGb.js → render-worker-BD7EhV2y.js} +17 -17
- package/dist/assets/render-worker-BiKxVVB1.js +16 -0
- package/dist/assets/{render-worker-j1PT6zsz.js → render-worker-CVqXtEMW.js} +13 -13
- package/dist/{bounded-raw-part-cache-B5a6cGKO.js → bounded-raw-part-cache-D2Q0FIoE.js} +719 -663
- package/dist/{canvas-viewer-mechanics-BsqaoYgK.js → canvas-viewer-mechanics-_ZBxW_sN.js} +1 -1
- package/dist/{comment-overlay-controller-b3tKmzMa.js → comment-overlay-controller-CVvQCYhQ.js} +8 -8
- package/dist/{comment-ui-runtime-Bp37ytDC.js → comment-ui-runtime-CYkt_9-b.js} +2 -2
- package/dist/{comment-ui-runtime-DM65K2I9.js → comment-ui-runtime-DhTTGSay.js} +3 -3
- package/dist/{document-model-source-zVS9qt4o.js → document-model-source-C6wGN8m3.js} +45 -45
- package/dist/{document-pull-client-DIRkBd6z.js → document-pull-client-BfGXPuQc.js} +640 -640
- package/dist/{document-pull-worker-hMKJ5RdB.js → document-pull-worker-Bl3wlLXC.js} +4 -4
- package/dist/{docx-hRmOTAbV.js → docx-CNscQaT8.js} +496 -496
- package/dist/{docx-Bsp9NgeG.js → docx-Cry-eklK.js} +7 -7
- package/dist/{docx-model-source-BSNwPdvb.js → docx-model-source-Cj8DGdLl.js} +6 -6
- package/dist/docx.mjs +3 -3
- package/dist/{drawingml-shape-B1_kg4BV.js → drawingml-shape-CFzAXuvj.js} +88 -116
- package/dist/{font-preload-demand-NqcVKIpX.js → font-preload-demand-DhFVOxz4.js} +1 -1
- package/dist/{host-layout-measure-IFLllYwV.js → host-layout-measure-CWKDrVpo.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/internal-companion.mjs +2 -2
- package/dist/{line-distribute-CwtditQo.js → line-distribute-DxnuaRdO.js} +24 -24
- package/dist/{model-source-Cch44xsb.js → model-source-DksDDVb4.js} +1 -1
- package/dist/{model-source-session-DRcqFGfM.js → model-source-session-8wqlNxsQ.js} +2 -2
- package/dist/{model-source-session-ClNCRDOg.js → model-source-session-BogYRDwj.js} +2 -2
- package/dist/{model-source-session-DSABX94B.js → model-source-session-ifwyPPhZ.js} +2 -2
- package/dist/node.mjs +4 -4
- package/dist/{pptx-DbjWegUB.js → pptx-Bons7t3Y.js} +26 -26
- package/dist/{pptx-C1CiFW1D.js → pptx-CQtPbMxI.js} +10 -10
- package/dist/{pptx-model-source-C9TuBisH.js → pptx-model-source-mg-O0LR9.js} +5 -5
- package/dist/pptx.mjs +4 -4
- package/dist/{presentation-model-source-DLNioq7T.js → presentation-model-source-CK6_hY1W.js} +5 -5
- package/dist/{render-Bf_Gywxw.js → render-C7F07FrC.js} +2 -2
- package/dist/{render-worker-host-CVr53kg0.js → render-worker-host-Cj-U3WPe.js} +1 -1
- package/dist/{render-worker-host-PC5hgu9x.js → render-worker-host-D7L6GMbE.js} +1 -1
- package/dist/{render-worker-host-pKls3F_t.js → render-worker-host-stI5Lppz.js} +1 -1
- package/dist/{renderer-DuYC3xXi.js → renderer-N76SnQW7.js} +1286 -1212
- package/dist/{resource-measurement-CfJtbwiR.js → resource-measurement-B2hzmYlu.js} +90 -90
- package/dist/{session-DPXK_lpI.js → session-D5au4i-W.js} +166 -166
- package/dist/{slide-pull-client-3g6TxaKa.js → slide-pull-client-3mJmNjjB.js} +854 -904
- package/dist/{wasm-runtime-generation-D97yoAXz.js → wasm-runtime-generation--_2SjW2G.js} +1 -1
- package/dist/{workbook-model-source-D1dmkDMP.js → workbook-model-source-CI1q6nxK.js} +6 -6
- package/dist/{worksheet-pull-client-BudfclVl.js → worksheet-pull-client-C2h4AMwt.js} +18 -18
- package/dist/{xlsx-DBhYlJKp.js → xlsx-CKXeKvxl.js} +452 -452
- package/dist/{xlsx-DA0uR1B1.js → xlsx-DujIp7CR.js} +4 -4
- package/dist/{xlsx-model-source-zemVDAfl.js → xlsx-model-source-fs0svOUo.js} +6 -6
- package/dist/xlsx.mjs +4 -4
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- 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,
|
|
4
|
-
import { a as d, c as f, g as p, i as m, l as h, r as g } from "./document-pull-client-
|
|
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
|
|
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-
|
|
10
|
-
import { a as ie } from "./render-
|
|
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-
|
|
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-
|
|
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,
|
|
2
|
-
import { a as r, g as i, i as a, j as o, l as s, r as c } from "./document-pull-client-
|
|
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-
|
|
5
|
-
import { i as d, t as f } from "./docx-
|
|
6
|
-
import { t as p } from "./model-source-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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,
|
|
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
|
|
39
|
-
function
|
|
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
|
|
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
|
|
44
|
-
}, { x: a, y: o, w:
|
|
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
|
-
|
|
50
|
-
|
|
21
|
+
c,
|
|
22
|
+
d,
|
|
51
23
|
e.transform.rotationDeg
|
|
52
|
-
].every(Number.isFinite) || t < 0 ||
|
|
24
|
+
].every(Number.isFinite) || t < 0 || c < 0 || d < 0) throw RangeError("Invalid DrawingML geometry frame");
|
|
53
25
|
i(1);
|
|
54
|
-
let
|
|
55
|
-
if (i(
|
|
56
|
-
let
|
|
57
|
-
|
|
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
|
-
},
|
|
64
|
-
if (!a || !
|
|
65
|
-
let o =
|
|
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
|
-
|
|
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
|
-
},
|
|
81
|
-
if (!(r > 0 || a > 0) || !
|
|
82
|
-
|
|
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 =
|
|
86
|
-
i(o.reduce((e, t) => e + 1 + t.args.length, 0)), t !== "none" &&
|
|
87
|
-
},
|
|
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 =
|
|
91
|
-
if (
|
|
92
|
-
let n = t ===
|
|
93
|
-
s && n && e.stroke ?
|
|
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 =
|
|
97
|
-
h(e.sink, t, a, o,
|
|
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 (
|
|
100
|
-
let e =
|
|
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 =
|
|
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 =
|
|
107
|
-
r.length >= 2 &&
|
|
78
|
+
let r = f(Object.freeze(t.commands), j, M);
|
|
79
|
+
r.length >= 2 && k(r, "none", C);
|
|
108
80
|
}
|
|
109
|
-
|
|
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 =
|
|
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 =
|
|
118
|
-
S(u.sink, [e], a, o,
|
|
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 ?
|
|
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 =
|
|
124
|
-
S(e.sink, t, a, o,
|
|
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(
|
|
127
|
-
let e =
|
|
128
|
-
e.start &&
|
|
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:
|
|
133
|
-
height:
|
|
104
|
+
width: c,
|
|
105
|
+
height: d,
|
|
134
106
|
scale: t,
|
|
135
107
|
originX: a,
|
|
136
108
|
originY: o,
|
|
137
|
-
sourceKey:
|
|
138
|
-
paths: Object.freeze(
|
|
139
|
-
arrows: Object.freeze(
|
|
140
|
-
fillSilhouette: Object.freeze(
|
|
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
|
|
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 !==
|
|
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
|
|
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
|
|
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 (
|
|
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
|
-
|
|
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
|
-
|
|
162
|
+
p(e.geometry.path, i), a(e.geometry.stroke);
|
|
191
163
|
}
|
|
192
164
|
return n;
|
|
193
165
|
}
|
|
194
|
-
function
|
|
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
|
|
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
|
-
},
|
|
214
|
-
...
|
|
185
|
+
}, M = (e, t) => ({
|
|
186
|
+
...j,
|
|
215
187
|
e,
|
|
216
188
|
f: t
|
|
217
|
-
}),
|
|
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
|
|
226
|
-
let n =
|
|
227
|
-
(l.rotationDeg !== 0 || l.flipH || l.flipV) && (u =
|
|
228
|
-
...
|
|
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 =
|
|
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 =
|
|
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
|
|
254
|
-
function
|
|
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
|
|
264
|
-
let o = t.resolvedGeometry ?
|
|
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
|
-
|
|
238
|
+
w(e, o.fillSilhouette, n - o.originX, r - o.originY);
|
|
267
239
|
}
|
|
268
|
-
function
|
|
240
|
+
function R(e, t) {
|
|
269
241
|
let { x: n, y: r, w: i, h: a } = t.rect;
|
|
270
|
-
e.beginPath(),
|
|
242
|
+
e.beginPath(), L(e, t, n, r, i, a), e.clip();
|
|
271
243
|
}
|
|
272
|
-
function
|
|
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,
|
|
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
|
|
279
|
-
let o = n.resolvedGeometry ?
|
|
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:
|
|
285
|
-
|
|
286
|
-
let t = i(n.fill, e,
|
|
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(),
|
|
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 =
|
|
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 && (
|
|
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 =
|
|
302
|
-
|
|
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 {
|
|
278
|
+
export { k as a, P as i, B as n, O as o, I as r, R as t };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./docx-
|
|
2
|
-
import { t } from "./pptx-
|
|
3
|
-
import { t as n } from "./xlsx-
|
|
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.
|
|
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.
|
|
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 {
|
|
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
|
-
...
|
|
13
|
+
...i(t),
|
|
14
14
|
t.length
|
|
15
|
-
])].sort((e, t) => e - t),
|
|
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 <
|
|
24
|
-
if (
|
|
23
|
+
for (; s < a.length;) {
|
|
24
|
+
if (a[s].cls === "other") {
|
|
25
25
|
o.push({
|
|
26
|
-
...
|
|
26
|
+
...a[s],
|
|
27
27
|
inScope: !1
|
|
28
28
|
}), s += 1;
|
|
29
29
|
continue;
|
|
30
30
|
}
|
|
31
31
|
let e = s;
|
|
32
|
-
for (; e <
|
|
33
|
-
let t =
|
|
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 =
|
|
35
|
+
let e = a[r], i = t && (e.cls === "neutral" ? n : !0);
|
|
36
36
|
o.push({
|
|
37
37
|
...e,
|
|
38
|
-
inScope:
|
|
39
|
-
}), n =
|
|
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
|
|
2530
|
-
if (
|
|
2529
|
+
let n = M.get(t);
|
|
2530
|
+
if (n) return n;
|
|
2531
2531
|
let i = e(j, t);
|
|
2532
|
-
return i ? (
|
|
2533
|
-
adj: i.adj.map(([e, t]) => [e,
|
|
2534
|
-
gd: i.gd.map(([e, t]) => [e,
|
|
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,
|
|
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,
|
|
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 =
|
|
2608
|
-
w:
|
|
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,
|
|
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 &&
|
|
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 && !
|
|
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 &&
|
|
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-
|
|
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-
|
|
2
|
-
import { G as t, I as n, P as r } from "./bounded-raw-part-cache-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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",
|