@silurus/ooxml 0.89.0 → 0.89.1
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/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/assets/render-worker-C5G_Nr_A.js +35 -0
- package/dist/assets/render-worker-DQfWdNsm.js +16 -0
- package/dist/assets/render-worker-Ds7LjwU-.js +15 -0
- package/dist/bounded-raw-part-cache-CsnNptAy.js +33925 -0
- package/dist/{canvas-viewer-mechanics-DfQqRKkD.js → canvas-viewer-mechanics-BZ8QCrRi.js} +2 -2
- package/dist/{cfb-guard-9QTRTg7f.js → cfb-guard-dNeUiANF.js} +1 -1
- package/dist/chart-ex.mjs +477 -477
- package/dist/{comment-overlay-controller-B5_zGgG5.js → comment-overlay-controller-CBvQx-En.js} +16 -16
- package/dist/{comment-ui-runtime-D_sb2K6s.js → comment-ui-runtime-BKidRH36.js} +3 -3
- package/dist/{comment-ui-runtime-Jy-3goA9.js → comment-ui-runtime-C47QoDUy.js} +3 -3
- package/dist/{document-model-source-BKNrXjAL.js → document-model-source-MzFPrxt0.js} +44 -44
- package/dist/{document-pull-client-CxONDGbk.js → document-pull-client-BoJeuURD.js} +6102 -7994
- package/dist/{document-pull-worker-AMyXYpPq.js → document-pull-worker-CaP8XESP.js} +18 -18
- package/dist/{docx-D91ER1_S.js → docx-BN70UhvX.js} +24 -24
- package/dist/{docx-DhDnKEI6.js → docx-BRRtSvk3.js} +556 -556
- package/dist/{docx-model-source-CdrSt3hF.js → docx-model-source-CTO9iw_W.js} +12 -12
- package/dist/docx.mjs +4 -4
- package/dist/{drawingml-shape-ChcGZNd8.js → drawingml-shape-CHmq8kpM.js} +55 -55
- package/dist/{duotone-ekYik4ix.js → duotone-DN8P4aXe.js} +1 -1
- package/dist/{emf-UT6I8rVi.js → emf-CGFQIz6c.js} +60 -60
- package/dist/{font-preload-demand-CdJZUMCT.js → font-preload-demand-Dmy31xt-.js} +2 -2
- package/dist/{grid-geometry-uQOgViJU.js → grid-geometry-C3IG20ut.js} +1 -1
- package/dist/{host-layout-measure-CCEgaC_v.js → host-layout-measure-DsuQ2UJs.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/internal-companion.mjs +2 -2
- package/dist/{line-distribute-CPOV6csk.js → line-distribute-Bu8psjGd.js} +153 -70
- package/dist/{model-source-DJGzDtGb.js → model-source-s5hRpk4w.js} +4 -4
- package/dist/{model-source-session-Bu9CHFHc.js → model-source-session-6fuaqbGs.js} +18 -18
- package/dist/{model-source-session-CDuijwv1.js → model-source-session-DqrR4XHR.js} +2 -2
- package/dist/{model-source-session-sKpNiIJI.js → model-source-session-cPJSF_Ak.js} +10 -10
- package/dist/node.mjs +5 -5
- package/dist/{bounded-raw-part-cache-B7JoC1CD.js → plot-area-frame-Bs_j4uu7.js} +15189 -37964
- package/dist/{pptx-C_uxLVKB.js → pptx-CaJ6ILnw.js} +9 -9
- package/dist/{pptx-CDP9dZHe.js → pptx-_BOGcBym.js} +58 -58
- package/dist/{pptx-model-source-O7LhpOjz.js → pptx-model-source-B_9afw9R.js} +5 -5
- package/dist/pptx.mjs +5 -5
- package/dist/{presentation-model-source-tmROzteR.js → presentation-model-source-CGHLyX32.js} +5 -5
- package/dist/region-map.mjs +53 -53
- package/dist/{render-CJVglUHl.js → render-CzbDzRKa.js} +2 -2
- package/dist/{render-worker-host-BseIaVvm.js → render-worker-host-B1u6BOUd.js} +1 -1
- package/dist/{render-worker-host-CyxPU4JU.js → render-worker-host-C-EECo68.js} +1 -1
- package/dist/{render-worker-host-aF6aWkC0.js → render-worker-host-DDqZTCVf.js} +1 -1
- package/dist/renderer-CD2cvVAF.js +5823 -0
- package/dist/{renderer-CkGLj0CC.js → renderer-DRoeb14O.js} +696 -696
- package/dist/{resource-measurement-mXw-WjMF.js → resource-measurement-Dhhm7P_l.js} +162 -161
- package/dist/{session-Csv9maad.js → session-XPmC0CUd.js} +176 -176
- package/dist/{slide-pull-client-DRZYwBTu.js → slide-pull-client-tq7U_fYg.js} +1454 -1484
- package/dist/{three-d-BK5siJgJ.js → three-d-BKwNPAP4.js} +107 -107
- package/dist/three-d.mjs +625 -625
- package/dist/{wasm-runtime-generation-DX4y0Ecl.js → wasm-runtime-generation-D6TKZdNb.js} +4 -4
- package/dist/{workbook-model-source-BTC4ISTS.js → workbook-model-source-BIGrfZy6.js} +6 -6
- package/dist/worker-source-DrwhR9fw.js +22 -0
- package/dist/{worksheet-pull-client-CkHgbtyM.js → worksheet-pull-client-ClvPO_Jf.js} +74 -74
- package/dist/{xlsx-CpSDPAEU.js → xlsx-CsmREBaZ.js} +430 -420
- package/dist/{xlsx-D5569TPf.js → xlsx-DmHfeNNp.js} +24 -24
- package/dist/{xlsx-model-source-DPSkjFic.js → xlsx-model-source-D1flORqy.js} +55 -55
- package/dist/xlsx.mjs +5 -5
- package/package.json +1 -1
- package/dist/assets/render-worker-CUOU6mL2.js +0 -16
- package/dist/assets/render-worker-DOqrFhSU.js +0 -15
- package/dist/assets/render-worker-DvWUdZUN.js +0 -35
- package/dist/plot-area-frame-CaJFvZ7p.js +0 -8502
- package/dist/renderer-Czw1cCC7.js +0 -5823
- package/dist/worker-source-I1cIYBel.js +0 -22
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
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 { H as e, U as t, qt as n } from "./bounded-raw-part-cache-CsnNptAy.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-BoJeuURD.js";
|
|
3
3
|
import { r as l } from "./wasm-loader-rlgHmcSv.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-CaP8XESP.js";
|
|
5
|
+
import { i as d, t as f } from "./docx-BN70UhvX.js";
|
|
6
|
+
import { t as p } from "./model-source-s5hRpk4w.js";
|
|
7
7
|
//#region packages/node/src/docx-model-source.ts
|
|
8
8
|
var m = class extends f {
|
|
9
9
|
constructor(...e) {
|
|
@@ -16,8 +16,8 @@ var m = class extends f {
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
async function h(
|
|
20
|
-
let l = n(i.cjkFallback), { acquired: u, viewDefaults: d } = await v(
|
|
19
|
+
async function h(t, i, a) {
|
|
20
|
+
let l = n(i.cjkFallback), { acquired: u, viewDefaults: d } = await v(t, i, a, c);
|
|
21
21
|
try {
|
|
22
22
|
if (i.signal?.aborted) {
|
|
23
23
|
let e = /* @__PURE__ */ Error("DOCX document session was aborted");
|
|
@@ -29,11 +29,11 @@ async function h(e, i, a) {
|
|
|
29
29
|
allowFootnoteContinuation: i.allowFootnoteContinuation !== !1
|
|
30
30
|
}), n = _(i.currentDate), a = r(u.result, t, n), c = d.showTrackedChanges === !0, p = c ? a.layoutVariants.layoutFor(o(n, n, !0)) : a.layoutVariants.defaultLayout, h = new (c ? m : f)(u.closeArchive, u.archive, u.result, t, p, i.factory, n, u.usage, u.metrics, i.signal);
|
|
31
31
|
return u.metrics.observeUsage(h.resourceUsage), u.metrics.checkpoint("pagination ready"), h;
|
|
32
|
-
} catch (
|
|
32
|
+
} catch (t) {
|
|
33
33
|
try {
|
|
34
34
|
u.closeArchive();
|
|
35
35
|
} catch {}
|
|
36
|
-
let n = t
|
|
36
|
+
let n = e(t) ?? t;
|
|
37
37
|
throw u.metrics.fail(n), n;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -67,11 +67,11 @@ function _(e) {
|
|
|
67
67
|
if (!Number.isFinite(t)) throw RangeError("currentDate must resolve to finite epoch milliseconds");
|
|
68
68
|
return t;
|
|
69
69
|
}
|
|
70
|
-
async function v(
|
|
71
|
-
let { acquireDocxSessionFromArchive: a, validateDocxModelSourceArchive: o, validateDocxModelSourceViewDefaults: s } = await import("./model-source-session-
|
|
70
|
+
async function v(e, n, r, i) {
|
|
71
|
+
let { acquireDocxSessionFromArchive: a, validateDocxModelSourceArchive: o, validateDocxModelSourceViewDefaults: s } = await import("./model-source-session-DqrR4XHR.js"), c = await p(e, "docx", {
|
|
72
72
|
...n,
|
|
73
73
|
source: n.legacyDoc
|
|
74
|
-
}, o, (
|
|
74
|
+
}, o, (e) => t(e) ?? u(e));
|
|
75
75
|
if (c.kind === "ooxml") return {
|
|
76
76
|
acquired: await d(c.bytes, r(), n, i),
|
|
77
77
|
viewDefaults: {}
|
package/dist/docx.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u 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-
|
|
1
|
+
import { vo as e, yo as t } from "./plot-area-frame-Bs_j4uu7.js";
|
|
2
|
+
import { u as n } from "./bounded-raw-part-cache-CsnNptAy.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-BRRtSvk3.js";
|
|
4
4
|
import { f as p, u as m } from "./pixel-budget-BpTYrepD.js";
|
|
5
5
|
import { i as h, t as g } from "./tiff-contract-C6M3QcPp.js";
|
|
6
|
-
import { D as _ } from "./canvas-viewer-mechanics-
|
|
6
|
+
import { D as _ } from "./canvas-viewer-mechanics-BZ8QCrRi.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,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { At as c,
|
|
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-Bs_j4uu7.js";
|
|
2
|
+
import { At as c, Bt as l, Ct as u, Dt as d, Ft as f, Ht as p, It as m, Mt as h, Ot as g, St as _, Ut as v, Vt as y, Wt as b, jt as x, kt as S, zt as C } from "./bounded-raw-part-cache-CsnNptAy.js";
|
|
3
3
|
//#region packages/core/src/shape/drawingml-geometry.ts
|
|
4
4
|
var w = new Set([
|
|
5
5
|
"line",
|
|
@@ -39,31 +39,31 @@ function D(e) {
|
|
|
39
39
|
var O = 1;
|
|
40
40
|
function k(e, t, n = Infinity) {
|
|
41
41
|
let r = 0;
|
|
42
|
-
if (!(n === Infinity || Number.isSafeInteger(n) && n > 0)) throw new
|
|
42
|
+
if (!(n === Infinity || Number.isSafeInteger(n) && n > 0)) throw new C("Invalid DrawingML geometry budget");
|
|
43
43
|
let i = (e) => {
|
|
44
|
-
if (r += e, !Number.isSafeInteger(r) || r > n) throw new
|
|
45
|
-
}, { x: a, y: o, w: l, h:
|
|
44
|
+
if (r += e, !Number.isSafeInteger(r) || r > n) throw new C("DrawingML geometry work budget exceeded");
|
|
45
|
+
}, { x: a, y: o, w: l, h: u } = e.rect;
|
|
46
46
|
if (![
|
|
47
47
|
t,
|
|
48
48
|
e.rect.x,
|
|
49
49
|
e.rect.y,
|
|
50
50
|
l,
|
|
51
|
-
|
|
51
|
+
u,
|
|
52
52
|
e.transform.rotationDeg
|
|
53
|
-
].every(Number.isFinite) || t < 0 || l < 0 ||
|
|
53
|
+
].every(Number.isFinite) || t < 0 || l < 0 || u < 0) throw RangeError("Invalid DrawingML geometry frame");
|
|
54
54
|
i(1);
|
|
55
|
-
let
|
|
56
|
-
if (i(
|
|
57
|
-
let
|
|
58
|
-
|
|
55
|
+
let f = e.stroke;
|
|
56
|
+
if (i(f?.customDash?.length ?? 0), e.geometry.kind === "preset" && e.geometry.adjustments.some((e) => e !== null && !Number.isFinite(e))) throw RangeError("Non-finite DrawingML adjustment");
|
|
57
|
+
let _ = f ? s(f, t) : null, y = [], k = [], A = (e, t, n, r = "nonzero") => {
|
|
58
|
+
y.push(Object.freeze({
|
|
59
59
|
path: e,
|
|
60
60
|
fill: t,
|
|
61
61
|
stroke: n,
|
|
62
62
|
fillRule: r
|
|
63
63
|
}));
|
|
64
64
|
}, j = (e, n, r, a) => {
|
|
65
|
-
if (!a || !
|
|
66
|
-
let o =
|
|
65
|
+
if (!a || !f) return;
|
|
66
|
+
let o = g(a, f, t, O, i);
|
|
67
67
|
if (o) {
|
|
68
68
|
if (![
|
|
69
69
|
e,
|
|
@@ -78,65 +78,65 @@ function k(e, t, n = Infinity) {
|
|
|
78
78
|
geometry: o
|
|
79
79
|
}));
|
|
80
80
|
}
|
|
81
|
-
}, M =
|
|
82
|
-
if (!(r > 0 || a > 0) || !
|
|
83
|
-
A(e, t,
|
|
81
|
+
}, M = f?.headEnd ? d(f.headEnd, f, t, O) : 0, N = f?.tailEnd ? d(f.tailEnd, f, t, O) : 0, P = (e, t, n, r, a) => {
|
|
82
|
+
if (!(r > 0 || a > 0) || !_) {
|
|
83
|
+
A(e, t, _, n);
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
let o =
|
|
87
|
-
i(o.reduce((e, t) => e + 1 + t.args.length, 0)), t !== "none" && A(e, t, null, n), A(o, "none",
|
|
88
|
-
}, F =
|
|
86
|
+
let o = S(e, r, a);
|
|
87
|
+
i(o.reduce((e, t) => e + 1 + t.args.length, 0)), t !== "none" && A(e, t, null, n), A(o, "none", _, n);
|
|
88
|
+
}, F = p(i);
|
|
89
89
|
if (e.geometry.kind === "preset") {
|
|
90
90
|
i(e.geometry.adjustments.length);
|
|
91
|
-
let t = e.geometry.name.toLowerCase(), n = [...e.geometry.adjustments], r = E(t) && !!(
|
|
92
|
-
if (
|
|
93
|
-
let n = t ===
|
|
94
|
-
s && n && e.stroke ? P(e.path, e.fill, "nonzero", M, N) : A(e.path, e.fill, e.stroke && !(r && n) ?
|
|
91
|
+
let t = e.geometry.name.toLowerCase(), n = [...e.geometry.adjustments], r = E(t) && !!(f?.headEnd || f?.tailEnd), s = t.startsWith("curvedconnector"), d = m(t, l, u, n, i, a, o);
|
|
92
|
+
if (d) d.forEach((e, t) => {
|
|
93
|
+
let n = t === d.length - 1 && (e.fill === "none" || e.fill == null);
|
|
94
|
+
s && n && e.stroke ? P(e.path, e.fill, "nonzero", M, N) : A(e.path, e.fill, e.stroke && !(r && n) ? _ : null);
|
|
95
95
|
});
|
|
96
96
|
else {
|
|
97
|
-
let e =
|
|
98
|
-
|
|
97
|
+
let e = p(i);
|
|
98
|
+
c(e.sink, t, a, o, l, u, n[0], n[1], n[2], n[3]), A(Object.freeze(e.commands), null, _, "nonzero");
|
|
99
99
|
}
|
|
100
|
-
if (
|
|
101
|
-
let e =
|
|
100
|
+
if (x(F.sink, e.geometry.name, a, o, l, u, n) || c(F.sink, e.geometry.name, a, o, l, u, n[0], n[1], n[2], n[3]), f && (w.has(t) || T.has(t))) {
|
|
101
|
+
let e = h(t, a, o, l, u, n);
|
|
102
102
|
if (e) {
|
|
103
103
|
if (r && e.vertices.length >= 2) {
|
|
104
|
-
let t =
|
|
104
|
+
let t = p(i), n = e.vertices;
|
|
105
105
|
t.sink.moveTo(n[0].x, n[0].y);
|
|
106
106
|
for (let e = 1; e < n.length; e++) t.sink.lineTo(n[e].x, n[e].y);
|
|
107
|
-
let r =
|
|
108
|
-
r.length >= 2 && A(r, "none",
|
|
107
|
+
let r = S(Object.freeze(t.commands), M, N);
|
|
108
|
+
r.length >= 2 && A(r, "none", _);
|
|
109
109
|
}
|
|
110
|
-
j(e.end.x, e.end.y, e.end.angle,
|
|
110
|
+
j(e.end.x, e.end.y, e.end.angle, f.tailEnd), j(e.start.x, e.start.y, e.start.angle, f.headEnd);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
} else {
|
|
114
114
|
let { subpaths: t } = e.geometry;
|
|
115
115
|
for (let e of t) i(e.length + 1);
|
|
116
|
-
let n = e.geometry.paint?.length === t.length ? e.geometry.paint : null, r =
|
|
116
|
+
let n = e.geometry.paint?.length === t.length ? e.geometry.paint : null, r = f && (M > 0 || N > 0) ? v(t) : null, s = r?.start ? M : 0, c = r?.end ? N : 0;
|
|
117
117
|
if (n) t.forEach((e, r) => {
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
let f = Object.freeze(
|
|
121
|
-
n[r].stroke === !1 ? A(f,
|
|
118
|
+
let d = p(i);
|
|
119
|
+
b(d.sink, [e], a, o, l, u);
|
|
120
|
+
let f = Object.freeze(d.commands), m = n[r].fill ?? null;
|
|
121
|
+
n[r].stroke === !1 ? A(f, m, null, n[r].fillRule) : P(f, m, n[r].fillRule ?? "nonzero", r === 0 ? s : 0, r === t.length - 1 ? c : 0);
|
|
122
122
|
});
|
|
123
123
|
else {
|
|
124
|
-
let e =
|
|
125
|
-
|
|
124
|
+
let e = p(i);
|
|
125
|
+
b(e.sink, t, a, o, l, u), P(Object.freeze(e.commands), null, "nonzero", s, c);
|
|
126
126
|
}
|
|
127
|
-
if (
|
|
128
|
-
let e =
|
|
129
|
-
e.start && j(a + e.start.x * l, o + e.start.y *
|
|
127
|
+
if (b(F.sink, n ? t.filter((e, t) => n[t].fill !== "none") : t, a, o, l, u), f) {
|
|
128
|
+
let e = v(t);
|
|
129
|
+
e.start && j(a + e.start.x * l, o + e.start.y * u, Math.atan2(e.start.dy * u, e.start.dx * l), f.headEnd), e.end && j(a + e.end.x * l, o + e.end.y * u, Math.atan2(e.end.dy * u, e.end.dx * l), f.tailEnd);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
return Object.freeze({
|
|
133
133
|
width: l,
|
|
134
|
-
height:
|
|
134
|
+
height: u,
|
|
135
135
|
scale: t,
|
|
136
136
|
originX: a,
|
|
137
137
|
originY: o,
|
|
138
138
|
sourceKey: D(e),
|
|
139
|
-
paths: Object.freeze(
|
|
139
|
+
paths: Object.freeze(y),
|
|
140
140
|
arrows: Object.freeze(k),
|
|
141
141
|
fillSilhouette: Object.freeze(F.commands),
|
|
142
142
|
workUnits: r
|
|
@@ -155,9 +155,9 @@ function A(e, t) {
|
|
|
155
155
|
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");
|
|
156
156
|
if (![n.originX, n.originY].every(Number.isFinite)) throw RangeError("Invalid retained DrawingML origin");
|
|
157
157
|
if (!Number.isSafeInteger(n.workUnits) || n.workUnits < 1 || !Array.isArray(n.paths) || !Array.isArray(n.arrows)) throw RangeError("Invalid retained DrawingML work/scheduling");
|
|
158
|
-
if (n.paths.length + n.arrows.length > n.workUnits) throw new
|
|
158
|
+
if (n.paths.length + n.arrows.length > n.workUnits) throw new C("Retained geometry scheduling exceeds its acquired work");
|
|
159
159
|
let r = 0, i = (e) => {
|
|
160
|
-
if (r += e, r > n.workUnits) throw new
|
|
160
|
+
if (r += e, r > n.workUnits) throw new C("Retained geometry paths exceed their acquired work");
|
|
161
161
|
}, a = (e) => {
|
|
162
162
|
if (!Number.isFinite(e.lineWidth) || e.lineWidth < 0 || !Number.isFinite(e.miterLimit) || e.miterLimit <= 0 || ![
|
|
163
163
|
"butt",
|
|
@@ -170,7 +170,7 @@ function A(e, t) {
|
|
|
170
170
|
].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");
|
|
171
171
|
};
|
|
172
172
|
for (let e of n.paths) {
|
|
173
|
-
if (
|
|
173
|
+
if (y(e.path, i), e.fill !== null && ![
|
|
174
174
|
"norm",
|
|
175
175
|
"none",
|
|
176
176
|
"lighten",
|
|
@@ -181,14 +181,14 @@ function A(e, t) {
|
|
|
181
181
|
if (e.fillRule !== "nonzero" && e.fillRule !== "evenodd") throw RangeError("Invalid retained fill rule");
|
|
182
182
|
e.stroke && a(e.stroke);
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
y(n.fillSilhouette, i);
|
|
185
185
|
for (let e of n.arrows) {
|
|
186
186
|
if (![
|
|
187
187
|
e.tipX,
|
|
188
188
|
e.tipY,
|
|
189
189
|
e.angle
|
|
190
190
|
].every(Number.isFinite) || !["fill", "stroke"].includes(e.geometry.paint)) throw RangeError("Invalid retained arrow frame");
|
|
191
|
-
|
|
191
|
+
y(e.geometry.path, i), a(e.geometry.stroke);
|
|
192
192
|
}
|
|
193
193
|
return n;
|
|
194
194
|
}
|
|
@@ -266,7 +266,7 @@ function L(e, t, n) {
|
|
|
266
266
|
function R(e, t, n, r, i, a) {
|
|
267
267
|
let o = t.resolvedGeometry ? A(t, t.resolvedGeometry.scale) : k(t, 1);
|
|
268
268
|
if (i !== o.width || a !== o.height) throw RangeError("Retained DrawingML silhouette frame mismatch");
|
|
269
|
-
|
|
269
|
+
l(e, o.fillSilhouette, n - o.originX, r - o.originY);
|
|
270
270
|
}
|
|
271
271
|
function z(e, t) {
|
|
272
272
|
let { x: n, y: r, w: i, h: a } = t.rect;
|
|
@@ -284,15 +284,15 @@ function V(e, n, r) {
|
|
|
284
284
|
resolvedGeometry: o
|
|
285
285
|
};
|
|
286
286
|
t(n.stroke?.fill) && (e = a(e));
|
|
287
|
-
let { x: c, y:
|
|
287
|
+
let { x: c, y: d, w: p, h: m } = n.rect;
|
|
288
288
|
L(e, n, () => {
|
|
289
|
-
let t = i(n.fill, e, c,
|
|
289
|
+
let t = i(n.fill, e, c, d, p, m, n.transform.rotationDeg, I, void 0, (e, t, n, r, i) => R(e, s, t, n, r, i)), a = n.stroke;
|
|
290
290
|
for (let r of o.paths) {
|
|
291
|
-
if (e.beginPath(),
|
|
291
|
+
if (e.beginPath(), l(e, r.path, c - o.originX, d - o.originY), t && r.fill !== "none") {
|
|
292
292
|
e.save();
|
|
293
293
|
try {
|
|
294
294
|
e.fillStyle = t, r.fillRule === "evenodd" ? e.fill("evenodd") : e.fill();
|
|
295
|
-
let n =
|
|
295
|
+
let n = f(r.fill);
|
|
296
296
|
n && (e.fillStyle = n, r.fillRule === "evenodd" ? e.fill("evenodd") : e.fill());
|
|
297
297
|
} finally {
|
|
298
298
|
e.restore();
|
|
@@ -301,8 +301,8 @@ function V(e, n, r) {
|
|
|
301
301
|
a && r.stroke && (B(e, a, r.stroke, n.rect, n.transform.rotationDeg), e.stroke());
|
|
302
302
|
}
|
|
303
303
|
if (a) for (let t of o.arrows) {
|
|
304
|
-
let i = c - o.originX + t.tipX, s =
|
|
305
|
-
|
|
304
|
+
let i = c - o.originX + t.tipX, s = d - o.originY + t.tipY;
|
|
305
|
+
_(e, i, s, t.angle, t.geometry, a, u(e, a, r, I, i, s, t.angle, t.end, n.rect, n.transform.rotationDeg, I));
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
308
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ar as e, Jr as t, Xr as n, Yr as r, Zr as i, kr as a } from "./plot-area-frame-Bs_j4uu7.js";
|
|
2
2
|
import { f as o, o as s, s as c, t as l, u } from "./pixel-budget-BpTYrepD.js";
|
|
3
3
|
//#region packages/core/src/image/emf-plus.ts
|
|
4
4
|
var d = {
|
|
@@ -379,30 +379,30 @@ var w = class {
|
|
|
379
379
|
let n = this.world, r = (n.a * e + n.c * t + n.e) * this.pageScale, i = (n.b * e + n.d * t + n.f) * this.pageScale, a = this.target;
|
|
380
380
|
return [(r - a.left) * a.W / a.boundsW, (i - a.top) * a.H / a.boundsH];
|
|
381
381
|
}
|
|
382
|
-
drawImage(
|
|
383
|
-
let
|
|
384
|
-
if (
|
|
385
|
-
let i = this.objects.get(
|
|
382
|
+
drawImage(e, t) {
|
|
383
|
+
let n = (t.flags & 16384) != 0;
|
|
384
|
+
if (t.end - t.start < 24 + (n ? 8 : 16)) throw RangeError("Truncated EMF+ DrawImage");
|
|
385
|
+
let i = this.objects.get(t.flags & 255);
|
|
386
386
|
if (i?.kind !== "image") {
|
|
387
387
|
this.target.unsupported.add("EMF+ DrawImage of an unavailable image");
|
|
388
388
|
return;
|
|
389
389
|
}
|
|
390
390
|
let a = i.bitmap;
|
|
391
|
-
if (this.objects.get(
|
|
391
|
+
if (this.objects.get(e.getUint32(t.start, !0))?.kind !== "attributes") {
|
|
392
392
|
this.target.unsupported.add("EMF+ DrawImage without its image attributes");
|
|
393
393
|
return;
|
|
394
394
|
}
|
|
395
|
-
let o =
|
|
395
|
+
let o = e.getInt32(t.start + 4, !0), s = (n) => e.getFloat32(t.start + n, !0), [c, l, u, d] = [
|
|
396
396
|
s(8),
|
|
397
397
|
s(12),
|
|
398
398
|
s(16),
|
|
399
399
|
s(20)
|
|
400
|
-
], [f, p, m, h] =
|
|
400
|
+
], [f, p, m, h] = n ? [
|
|
401
401
|
0,
|
|
402
402
|
2,
|
|
403
403
|
4,
|
|
404
404
|
6
|
|
405
|
-
].map((
|
|
405
|
+
].map((n) => e.getInt16(t.start + 24 + n, !0)) : [
|
|
406
406
|
s(24),
|
|
407
407
|
s(28),
|
|
408
408
|
s(32),
|
|
@@ -459,7 +459,7 @@ var w = class {
|
|
|
459
459
|
if (this.sourceCopy) try {
|
|
460
460
|
A.clearRect(Math.min(v, b), Math.min(y, x), Math.abs(b - v), Math.abs(x - y));
|
|
461
461
|
} catch {}
|
|
462
|
-
|
|
462
|
+
r(A, k, v, y, b, x) ? this.target.drew = !0 : this.target.unsupported.add("EMF+ DrawImage (the bitmap could not be drawn)");
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
}, T = {
|
|
@@ -1197,37 +1197,37 @@ function Je(e) {
|
|
|
1197
1197
|
e.moveTo(-1e7, -1e7), e.lineTo(1e7, -1e7), e.lineTo(1e7, 1e7), e.lineTo(-1e7, 1e7), e.closePath();
|
|
1198
1198
|
}
|
|
1199
1199
|
function Ye(e) {
|
|
1200
|
-
let t = e.u32(), n = e.u32(),
|
|
1200
|
+
let t = e.u32(), n = e.u32(), r = e.i32();
|
|
1201
1201
|
e.i32();
|
|
1202
|
-
let
|
|
1202
|
+
let i = e.u32();
|
|
1203
1203
|
return [t, {
|
|
1204
1204
|
kind: "pen",
|
|
1205
|
-
stroke: (n & 255) == 5 ? null :
|
|
1206
|
-
width: Math.abs(
|
|
1205
|
+
stroke: (n & 255) == 5 ? null : a(i),
|
|
1206
|
+
width: Math.abs(r)
|
|
1207
1207
|
}];
|
|
1208
1208
|
}
|
|
1209
1209
|
function Xe(e) {
|
|
1210
1210
|
let t = e.u32();
|
|
1211
1211
|
e.skip(16);
|
|
1212
|
-
let n = e.u32(),
|
|
1212
|
+
let n = e.u32(), r = e.u32();
|
|
1213
1213
|
e.u32();
|
|
1214
|
-
let
|
|
1214
|
+
let i = e.u32();
|
|
1215
1215
|
return [t, {
|
|
1216
1216
|
kind: "pen",
|
|
1217
|
-
stroke: (n & 255) == 5 ? null :
|
|
1218
|
-
width: Math.abs(
|
|
1217
|
+
stroke: (n & 255) == 5 ? null : a(i),
|
|
1218
|
+
width: Math.abs(r)
|
|
1219
1219
|
}];
|
|
1220
1220
|
}
|
|
1221
1221
|
function Ze(e) {
|
|
1222
|
-
let t = e.u32(), n = e.u32(),
|
|
1222
|
+
let t = e.u32(), n = e.u32(), r = e.u32();
|
|
1223
1223
|
return e.u32(), [t, {
|
|
1224
1224
|
kind: "brush",
|
|
1225
|
-
fill: n === 1 ? null : r
|
|
1225
|
+
fill: n === 1 ? null : a(r)
|
|
1226
1226
|
}];
|
|
1227
1227
|
}
|
|
1228
|
-
function Qe(e, t,
|
|
1229
|
-
let c = e.pos -
|
|
1230
|
-
return
|
|
1228
|
+
function Qe(e, t, r, i, a, o, s) {
|
|
1229
|
+
let c = e.pos - r;
|
|
1230
|
+
return i < c || o < c ? null : n(t, r + i, a, r + o, s);
|
|
1231
1231
|
}
|
|
1232
1232
|
function $e(e, t, n) {
|
|
1233
1233
|
let r = e.u32();
|
|
@@ -1264,26 +1264,26 @@ function et(e, t, n) {
|
|
|
1264
1264
|
escapement: o
|
|
1265
1265
|
}];
|
|
1266
1266
|
}
|
|
1267
|
-
function tt(e,
|
|
1268
|
-
let
|
|
1269
|
-
if (
|
|
1270
|
-
|
|
1271
|
-
let o =
|
|
1272
|
-
if (
|
|
1267
|
+
function tt(e, n, r, i) {
|
|
1268
|
+
let a = n.pos + n.remaining;
|
|
1269
|
+
if (n.remaining < 48) throw RangeError("Truncated EMF text record");
|
|
1270
|
+
n.skip(16), n.u32(), n.f32(), n.f32();
|
|
1271
|
+
let o = n.i32(), s = n.i32(), c = n.u32(), l = n.u32(), d = n.u32(), f = d & 256 ? 60 : 76;
|
|
1272
|
+
if (i + f > a) throw RangeError("Truncated EMF text header");
|
|
1273
1273
|
if (c === 0) return;
|
|
1274
|
-
if (l < f ||
|
|
1274
|
+
if (l < f || i + l + c * 2 > a) throw RangeError("Truncated EMF text string");
|
|
1275
1275
|
if (c > Ne) throw new u("metafile-record-text-units", Ne, c);
|
|
1276
1276
|
let p = "";
|
|
1277
1277
|
for (let e = 0; e < c; e++) {
|
|
1278
|
-
let t =
|
|
1279
|
-
if (t + 2 >
|
|
1280
|
-
p += String.fromCharCode(
|
|
1278
|
+
let t = i + l + e * 2;
|
|
1279
|
+
if (t + 2 > r.byteLength) break;
|
|
1280
|
+
p += String.fromCharCode(r.getUint16(t, !0));
|
|
1281
1281
|
}
|
|
1282
1282
|
if (p.length === 0) return;
|
|
1283
1283
|
let m = e.curFont, h = !1;
|
|
1284
1284
|
if (m?.charset === 2 && /[\uf000-\uf0ff]/.test(p)) {
|
|
1285
|
-
let
|
|
1286
|
-
|
|
1285
|
+
let n = d === 0 ? t(p, m.face, !0) : null;
|
|
1286
|
+
n === null ? Q(e, "EMR_EXTTEXTOUTW (unsupported symbol encoding)") : (p = n, h = !0), h && c > 1 && r.getUint32(i + f - 4, !0) !== 0 && Q(e, "EMR_EXTTEXTOUTW (symbol character advances)");
|
|
1287
1287
|
}
|
|
1288
1288
|
let g = Math.abs(m?.height ?? 0) * Ce(e) * Math.abs(z(e)) * we(e);
|
|
1289
1289
|
if (!Number.isFinite(g) || g < 1) return;
|
|
@@ -1306,15 +1306,15 @@ function tt(e, t, n, r) {
|
|
|
1306
1306
|
e.drew = !0;
|
|
1307
1307
|
} catch {}
|
|
1308
1308
|
}
|
|
1309
|
-
function nt(t, n,
|
|
1309
|
+
function nt(e, t, n, i, a, o, s, c, l, u, d, f) {
|
|
1310
1310
|
if (o === 0 || c === 0) return;
|
|
1311
|
-
let p = Qe(
|
|
1311
|
+
let p = Qe(t, n, i, a, o, s, c);
|
|
1312
1312
|
if (!p) {
|
|
1313
|
-
|
|
1313
|
+
e.unsupported.add("EMF bitmap (DIB encoding)");
|
|
1314
1314
|
return;
|
|
1315
1315
|
}
|
|
1316
|
-
let [m, h] = B(
|
|
1317
|
-
e
|
|
1316
|
+
let [m, h] = B(e, l, u), [g, _] = B(e, d, f);
|
|
1317
|
+
r(e.ctx, p, m, h, g, _) && (e.drew = !0);
|
|
1318
1318
|
}
|
|
1319
1319
|
function rt(e, t, n, r) {
|
|
1320
1320
|
t.skip(16);
|
|
@@ -1351,10 +1351,10 @@ function it(e, t, n, r) {
|
|
|
1351
1351
|
let u = t.i32(), d = t.i32();
|
|
1352
1352
|
nt(e, t, n, r, o, s, c, l, i, a, i + u, a + d);
|
|
1353
1353
|
}
|
|
1354
|
-
function at(
|
|
1354
|
+
function at(t, n, r, i, a = {}) {
|
|
1355
1355
|
let o = a;
|
|
1356
|
-
if (!t
|
|
1357
|
-
let s = new DataView(
|
|
1356
|
+
if (!e(t) || r <= 0 || i <= 0) return !1;
|
|
1357
|
+
let s = new DataView(t.buffer, t.byteOffset, t.byteLength), c = () => ({
|
|
1358
1358
|
ctx: n,
|
|
1359
1359
|
W: r,
|
|
1360
1360
|
H: i,
|
|
@@ -1396,20 +1396,20 @@ function at(e, n, r, i, a = {}) {
|
|
|
1396
1396
|
clipped: !1,
|
|
1397
1397
|
outerClipped: !1,
|
|
1398
1398
|
unsupported: /* @__PURE__ */ new Set()
|
|
1399
|
-
}), l = x(
|
|
1399
|
+
}), l = x(t), u = c();
|
|
1400
1400
|
if (l.play) {
|
|
1401
|
-
let
|
|
1402
|
-
if (ot(u,
|
|
1403
|
-
let
|
|
1401
|
+
let e = new w(u);
|
|
1402
|
+
if (ot(u, e, l.dual, s, t), e.drawFailed && l.dual) {
|
|
1403
|
+
let e = [...u.unsupported];
|
|
1404
1404
|
try {
|
|
1405
1405
|
n.clearRect(0, 0, r, i);
|
|
1406
1406
|
} catch {}
|
|
1407
|
-
u = c(), ot(u, null, !1, s,
|
|
1408
|
-
for (let
|
|
1407
|
+
u = c(), ot(u, null, !1, s, t);
|
|
1408
|
+
for (let t of e) u.unsupported.add(t);
|
|
1409
1409
|
}
|
|
1410
1410
|
} else {
|
|
1411
1411
|
if (!l.dual) for (let e of l.failures) u.unsupported.add(e);
|
|
1412
|
-
ot(u, null, !1, s,
|
|
1412
|
+
ot(u, null, !1, s, t);
|
|
1413
1413
|
}
|
|
1414
1414
|
return u.unsupported.size > 0 && a.onUnsupported?.([...u.unsupported]), u.drew;
|
|
1415
1415
|
}
|
|
@@ -1422,17 +1422,17 @@ function ot(e, t, n, r, i) {
|
|
|
1422
1422
|
for (let t = 0; t <= e.stack.length; t++) a.restore();
|
|
1423
1423
|
}
|
|
1424
1424
|
}
|
|
1425
|
-
function st(e, t, n,
|
|
1425
|
+
function st(e, t, n, r, i) {
|
|
1426
1426
|
let s = e.ctx, c = 0;
|
|
1427
|
-
for (; c + 8 <=
|
|
1428
|
-
let l =
|
|
1429
|
-
if (u < 8 || u & 3 || c + u >
|
|
1427
|
+
for (; c + 8 <= i.length;) {
|
|
1428
|
+
let l = r.getUint32(c, !0), u = r.getUint32(c + 4, !0);
|
|
1429
|
+
if (u < 8 || u & 3 || c + u > i.length) {
|
|
1430
1430
|
e.unsupported.add("EMF record stream (truncated or invalid record size)");
|
|
1431
1431
|
break;
|
|
1432
1432
|
}
|
|
1433
1433
|
let d = c + u;
|
|
1434
1434
|
if (l === T.EOF) break;
|
|
1435
|
-
let f = new DataView(
|
|
1435
|
+
let f = new DataView(r.buffer, r.byteOffset, d), p = new ne(f, c + 8, d);
|
|
1436
1436
|
if (t && l !== T.HEADER) {
|
|
1437
1437
|
if (l === T.GDICOMMENT) {
|
|
1438
1438
|
if (t.playComment(f, c, d), n && t.drawFailed) break;
|
|
@@ -1719,7 +1719,7 @@ function st(e, t, n, i, a) {
|
|
|
1719
1719
|
e.fillRule = p.u32() === 1 ? "evenodd" : "nonzero";
|
|
1720
1720
|
break;
|
|
1721
1721
|
case T.SETTEXTCOLOR:
|
|
1722
|
-
e.textColor =
|
|
1722
|
+
e.textColor = a(p.u32());
|
|
1723
1723
|
break;
|
|
1724
1724
|
case T.SETTEXTALIGN:
|
|
1725
1725
|
e.textAlign = p.u32();
|
|
@@ -1767,20 +1767,20 @@ function st(e, t, n, i, a) {
|
|
|
1767
1767
|
c = d;
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
|
-
async function ct(
|
|
1770
|
+
async function ct(t, n, r) {
|
|
1771
1771
|
let a = {
|
|
1772
1772
|
bitmap: null,
|
|
1773
1773
|
unsupported: []
|
|
1774
1774
|
};
|
|
1775
|
-
if (!t
|
|
1776
|
-
let o = n
|
|
1775
|
+
if (!e(t) || n <= 0 || r <= 0) return a;
|
|
1776
|
+
let o = i(n, r);
|
|
1777
1777
|
if (!o) return a;
|
|
1778
1778
|
let s = o.getContext("2d");
|
|
1779
1779
|
if (!s) return a;
|
|
1780
1780
|
s.lineJoin = "round", s.lineCap = "round";
|
|
1781
1781
|
let c = [];
|
|
1782
1782
|
return {
|
|
1783
|
-
bitmap: at(
|
|
1783
|
+
bitmap: at(t, s, n, r, { onUnsupported: (e) => {
|
|
1784
1784
|
c = e;
|
|
1785
1785
|
} }) ? await createImageBitmap(o) : null,
|
|
1786
1786
|
unsupported: c
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as e } from "./slide-pull-client-
|
|
2
|
-
import {
|
|
1
|
+
import { m as e } from "./slide-pull-client-tq7U_fYg.js";
|
|
2
|
+
import { Kr as t } from "./plot-area-frame-Bs_j4uu7.js";
|
|
3
3
|
//#region packages/pptx/src/font-preload-inert-ranges.ts
|
|
4
4
|
var n;
|
|
5
5
|
function r() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e } from "./renderer-
|
|
1
|
+
import { a as e } from "./renderer-DRoeb14O.js";
|
|
2
2
|
//#region packages/xlsx/src/internal/host-layout-measure.ts
|
|
3
3
|
function t(t, n) {
|
|
4
4
|
return e(t.family, t.sizePt, void 0, !1, t.bold ? 700 : 400, t.italic ? "italic" : "normal", n);
|
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-BRRtSvk3.js";
|
|
2
|
+
import { t } from "./pptx-_BOGcBym.js";
|
|
3
|
+
import { t as n } from "./xlsx-CsmREBaZ.js";
|
|
4
4
|
export { e as docx, t as pptx, n as xlsx };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as e } from "./model-source-kz_NkZqT.js";
|
|
2
2
|
//#region src/companion-version.ts
|
|
3
|
-
var t = "0.89.
|
|
3
|
+
var t = "0.89.1", n = class extends Error {
|
|
4
4
|
constructor(n, r) {
|
|
5
5
|
super(`Companion requires @silurus/ooxml ${n} (${r}); installed runtime is ${t} (${e})`), this.code = "companion-runtime-mismatch", this.name = "CompanionRuntimeMismatchError";
|
|
6
6
|
}
|
|
7
7
|
};
|
|
8
8
|
function r(e, t) {
|
|
9
|
-
if (e !== "0.89.
|
|
9
|
+
if (e !== "0.89.1" || t !== "ooxml-model-source-module/v2") throw new n(e, t);
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
12
|
export { n as CompanionRuntimeMismatchError, e as MODEL_SOURCE_MODULE_PROTOCOL, r as assertCompanionRuntime };
|