@silurus/ooxml 0.89.7 → 0.89.9
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/README.md +9 -3
- package/dist/assets/render-worker-CSJJ7vFD.js +15 -0
- package/dist/assets/render-worker-Ck21oePL.js +16 -0
- package/dist/assets/render-worker-jGsxSIGb.js +35 -0
- package/dist/{bounded-raw-part-cache-B8t03tSP.js → bounded-raw-part-cache-B5a6cGKO.js} +1713 -1515
- package/dist/{canvas-viewer-mechanics-DI38gHNV.js → canvas-viewer-mechanics-BsqaoYgK.js} +2 -2
- package/dist/{cfb-guard-BIaHdonq.js → cfb-guard-DzYlucez.js} +1 -1
- package/dist/chart-ex.mjs +367 -367
- package/dist/{comment-overlay-controller-Crm5Syhx.js → comment-overlay-controller-b3tKmzMa.js} +29 -25
- package/dist/{comment-ui-runtime-DKlEfBPp.js → comment-ui-runtime-BlgDzQx_.js} +3 -3
- package/dist/{comment-ui-runtime-BfEPgl5r.js → comment-ui-runtime-Bp37ytDC.js} +3 -3
- package/dist/{document-model-source-xnkMoTZ_.js → document-model-source-BlMfm6po.js} +37 -37
- package/dist/{document-pull-client-CzhPbnY_.js → document-pull-client-_G-DIh2T.js} +17071 -13819
- package/dist/{document-pull-worker-Bkewz-So.js → document-pull-worker-hMKJ5RdB.js} +14 -14
- package/dist/{docx-BWyACb-n.js → docx-DE-Di6SH.js} +33 -33
- package/dist/{docx-BgCQiuuN.js → docx-Do90Z4L7.js} +593 -593
- package/dist/{docx-model-source-DCRFgO7-.js → docx-model-source-zYIufUjR.js} +6 -6
- package/dist/docx.mjs +4 -4
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{drawingml-shape-BcXkRayC.js → drawingml-shape-B1_kg4BV.js} +55 -55
- package/dist/{duotone-BI7CoghW.js → duotone-GK4Hqn7f.js} +1 -1
- package/dist/{emf-DgUBx9BU.js → emf--QWY-UlT.js} +50 -50
- package/dist/{font-preload-demand-B6HPFxDp.js → font-preload-demand-NqcVKIpX.js} +2 -2
- package/dist/{grid-geometry-CqTDvpDr.js → grid-geometry-DpMAiSZb.js} +1 -1
- package/dist/{host-layout-measure-CXKOWA5J.js → host-layout-measure-IFLllYwV.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/internal-companion.mjs +2 -2
- package/dist/{line-distribute-DR9Qwd3u.js → line-distribute-CwtditQo.js} +31 -25
- package/dist/{model-source-DcI3vC00.js → model-source-Cch44xsb.js} +2 -2
- package/dist/{model-source-session-BlQWNyj2.js → model-source-session-ClNCRDOg.js} +21 -21
- package/dist/{model-source-session-D0LF49Ve.js → model-source-session-DRcqFGfM.js} +2 -2
- package/dist/{model-source-session-BCteVilS.js → model-source-session-DSABX94B.js} +2 -2
- package/dist/node.mjs +5 -5
- package/dist/{plot-area-frame-D3JtHvov.js → plot-area-frame-DNYMd9Pf.js} +1914 -1890
- package/dist/{pptx-SmjDGyub.js → pptx-C1CiFW1D.js} +35 -33
- package/dist/{pptx-CfCiVlNB.js → pptx-DbjWegUB.js} +283 -266
- package/dist/{pptx-model-source-B2Irk68a.js → pptx-model-source-C9TuBisH.js} +18 -12
- package/dist/pptx-parsed-slides-BMGr4khe.js +8 -0
- package/dist/pptx.mjs +5 -5
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{presentation-model-source-DL6duh5l.js → presentation-model-source-DLNioq7T.js} +6 -6
- package/dist/region-map.mjs +39 -39
- package/dist/{render-CMUEAeHp.js → render-Bf_Gywxw.js} +32 -30
- package/dist/{render-worker-host-CZHIKTtZ.js → render-worker-host-CVr53kg0.js} +1 -1
- package/dist/{render-worker-host-CtlBbau5.js → render-worker-host-EgUrirnQ.js} +1 -1
- package/dist/{render-worker-host-G1fnymI8.js → render-worker-host-pKls3F_t.js} +1 -1
- package/dist/renderer-DpTePxGq.js +5887 -0
- package/dist/{renderer-B4KIpz-2.js → renderer-DuYC3xXi.js} +1336 -1224
- package/dist/{resource-measurement-D2bu0Qfx.js → resource-measurement-CfJtbwiR.js} +129 -129
- package/dist/{session-KIWcCCP2.js → session-DPXK_lpI.js} +64 -64
- package/dist/{slide-pull-client-BUuJQQVE.js → slide-pull-client-3g6TxaKa.js} +1421 -1421
- package/dist/{three-d-ByHGsYrX.js → three-d-BfMZVR0w.js} +98 -98
- package/dist/three-d.mjs +678 -678
- package/dist/types/chart-ex.d.ts +5 -2
- package/dist/types/docx.d.ts +30 -8
- package/dist/types/index.d.ts +37 -12
- package/dist/types/node.d.ts +28 -6
- package/dist/types/pptx.d.ts +13 -7
- package/dist/types/region-map.d.ts +5 -2
- package/dist/types/three-d.d.ts +5 -2
- package/dist/types/xlsx.d.ts +10 -7
- package/dist/{wasm-runtime-generation-BLweKv8r.js → wasm-runtime-generation-D97yoAXz.js} +17 -17
- package/dist/{workbook-model-source-J9ir5Kov.js → workbook-model-source-D1dmkDMP.js} +6 -6
- package/dist/{worksheet-pull-client-Du0MuIro.js → worksheet-pull-client-BudfclVl.js} +84 -84
- package/dist/{xlsx-BbQ7RcNc.js → xlsx-DA0uR1B1.js} +44 -44
- package/dist/{xlsx-ClQiNSrr.js → xlsx-DBhYlJKp.js} +728 -716
- package/dist/{xlsx-model-source-C-Riw89p.js → xlsx-model-source-zemVDAfl.js} +36 -36
- package/dist/xlsx.mjs +5 -5
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-B3hF7Akg.js +0 -35
- package/dist/assets/render-worker-B5HWxkbU.js +0 -16
- package/dist/assets/render-worker-DNGf06QT.js +0 -15
- package/dist/renderer-xdugdcMd.js +0 -5769
|
@@ -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 { 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-_G-DIh2T.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-hMKJ5RdB.js";
|
|
5
|
+
import { i as d, t as f } from "./docx-DE-Di6SH.js";
|
|
6
|
+
import { t as p } from "./model-source-Cch44xsb.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-DSABX94B.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
|
-
import {
|
|
2
|
-
import {
|
|
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 { 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-Do90Z4L7.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-BsqaoYgK.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 };
|
package/dist/docx_parser_bg.wasm
CHANGED
|
Binary file
|
|
@@ -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-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
3
|
var w = new Set([
|
|
4
4
|
"line",
|
|
5
5
|
"straightconnector1",
|
|
@@ -38,31 +38,31 @@ function D(e) {
|
|
|
38
38
|
var O = 1;
|
|
39
39
|
function k(e, t, n = Infinity) {
|
|
40
40
|
let r = 0;
|
|
41
|
-
if (!(n === Infinity || Number.isSafeInteger(n) && n > 0)) throw new
|
|
41
|
+
if (!(n === Infinity || Number.isSafeInteger(n) && n > 0)) throw new f("Invalid DrawingML geometry budget");
|
|
42
42
|
let i = (e) => {
|
|
43
|
-
if (r += e, !Number.isSafeInteger(r) || r > n) throw new
|
|
44
|
-
}, { x: a, y: o, w: l, h:
|
|
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;
|
|
45
45
|
if (![
|
|
46
46
|
t,
|
|
47
47
|
e.rect.x,
|
|
48
48
|
e.rect.y,
|
|
49
49
|
l,
|
|
50
|
-
|
|
50
|
+
_,
|
|
51
51
|
e.transform.rotationDeg
|
|
52
|
-
].every(Number.isFinite) || t < 0 || l < 0 ||
|
|
52
|
+
].every(Number.isFinite) || t < 0 || l < 0 || _ < 0) throw RangeError("Invalid DrawingML geometry frame");
|
|
53
53
|
i(1);
|
|
54
|
-
let
|
|
55
|
-
if (i(
|
|
56
|
-
let
|
|
57
|
-
|
|
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({
|
|
58
58
|
path: e,
|
|
59
59
|
fill: t,
|
|
60
60
|
stroke: n,
|
|
61
61
|
fillRule: r
|
|
62
62
|
}));
|
|
63
63
|
}, j = (e, n, r, a) => {
|
|
64
|
-
if (!a || !
|
|
65
|
-
let o =
|
|
64
|
+
if (!a || !v) return;
|
|
65
|
+
let o = x(a, v, t, O, i);
|
|
66
66
|
if (o) {
|
|
67
67
|
if (![
|
|
68
68
|
e,
|
|
@@ -77,65 +77,65 @@ function k(e, t, n = Infinity) {
|
|
|
77
77
|
geometry: o
|
|
78
78
|
}));
|
|
79
79
|
}
|
|
80
|
-
}, M =
|
|
81
|
-
if (!(r > 0 || a > 0) || !
|
|
82
|
-
A(e, t,
|
|
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);
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
|
-
let o =
|
|
86
|
-
i(o.reduce((e, t) => e + 1 + t.args.length, 0)), t !== "none" && A(e, t, null, n), A(o, "none",
|
|
87
|
-
}, F =
|
|
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);
|
|
88
88
|
if (e.geometry.kind === "preset") {
|
|
89
89
|
i(e.geometry.adjustments.length);
|
|
90
|
-
let t = e.geometry.name.toLowerCase(), n = [...e.geometry.adjustments], r = E(t) && !!(
|
|
91
|
-
if (
|
|
92
|
-
let n = t ===
|
|
93
|
-
s && n && e.stroke ? P(e.path, e.fill, "nonzero", M, N) : A(e.path, e.fill, e.stroke && !(r && n) ?
|
|
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);
|
|
94
94
|
});
|
|
95
95
|
else {
|
|
96
|
-
let e =
|
|
97
|
-
|
|
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");
|
|
98
98
|
}
|
|
99
|
-
if (
|
|
100
|
-
let e =
|
|
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);
|
|
101
101
|
if (e) {
|
|
102
102
|
if (r && e.vertices.length >= 2) {
|
|
103
|
-
let t =
|
|
103
|
+
let t = d(i), n = e.vertices;
|
|
104
104
|
t.sink.moveTo(n[0].x, n[0].y);
|
|
105
105
|
for (let e = 1; e < n.length; e++) t.sink.lineTo(n[e].x, n[e].y);
|
|
106
|
-
let r =
|
|
107
|
-
r.length >= 2 && A(r, "none",
|
|
106
|
+
let r = m(Object.freeze(t.commands), M, N);
|
|
107
|
+
r.length >= 2 && A(r, "none", y);
|
|
108
108
|
}
|
|
109
|
-
j(e.end.x, e.end.y, e.end.angle,
|
|
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);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
} else {
|
|
113
113
|
let { subpaths: t } = e.geometry;
|
|
114
114
|
for (let e of t) i(e.length + 1);
|
|
115
|
-
let n = e.geometry.paint?.length === t.length ? e.geometry.paint : null, r =
|
|
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;
|
|
116
116
|
if (n) t.forEach((e, r) => {
|
|
117
|
-
let
|
|
118
|
-
|
|
119
|
-
let f = Object.freeze(
|
|
120
|
-
n[r].stroke === !1 ? A(f,
|
|
117
|
+
let u = d(i);
|
|
118
|
+
S(u.sink, [e], a, o, l, _);
|
|
119
|
+
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);
|
|
121
121
|
});
|
|
122
122
|
else {
|
|
123
|
-
let e =
|
|
124
|
-
|
|
123
|
+
let e = d(i);
|
|
124
|
+
S(e.sink, t, a, o, l, _), P(Object.freeze(e.commands), null, "nonzero", s, c);
|
|
125
125
|
}
|
|
126
|
-
if (
|
|
127
|
-
let e =
|
|
128
|
-
e.start && j(a + e.start.x * l, o + e.start.y *
|
|
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);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
return Object.freeze({
|
|
132
132
|
width: l,
|
|
133
|
-
height:
|
|
133
|
+
height: _,
|
|
134
134
|
scale: t,
|
|
135
135
|
originX: a,
|
|
136
136
|
originY: o,
|
|
137
137
|
sourceKey: D(e),
|
|
138
|
-
paths: Object.freeze(
|
|
138
|
+
paths: Object.freeze(b),
|
|
139
139
|
arrows: Object.freeze(k),
|
|
140
140
|
fillSilhouette: Object.freeze(F.commands),
|
|
141
141
|
workUnits: r
|
|
@@ -154,9 +154,9 @@ function A(e, t) {
|
|
|
154
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");
|
|
155
155
|
if (![n.originX, n.originY].every(Number.isFinite)) throw RangeError("Invalid retained DrawingML origin");
|
|
156
156
|
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
|
|
157
|
+
if (n.paths.length + n.arrows.length > n.workUnits) throw new f("Retained geometry scheduling exceeds its acquired work");
|
|
158
158
|
let r = 0, i = (e) => {
|
|
159
|
-
if (r += e, r > n.workUnits) throw new
|
|
159
|
+
if (r += e, r > n.workUnits) throw new f("Retained geometry paths exceed their acquired work");
|
|
160
160
|
}, a = (e) => {
|
|
161
161
|
if (!Number.isFinite(e.lineWidth) || e.lineWidth < 0 || !Number.isFinite(e.miterLimit) || e.miterLimit <= 0 || ![
|
|
162
162
|
"butt",
|
|
@@ -169,7 +169,7 @@ function A(e, t) {
|
|
|
169
169
|
].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
170
|
};
|
|
171
171
|
for (let e of n.paths) {
|
|
172
|
-
if (
|
|
172
|
+
if (b(e.path, i), e.fill !== null && ![
|
|
173
173
|
"norm",
|
|
174
174
|
"none",
|
|
175
175
|
"lighten",
|
|
@@ -180,14 +180,14 @@ function A(e, t) {
|
|
|
180
180
|
if (e.fillRule !== "nonzero" && e.fillRule !== "evenodd") throw RangeError("Invalid retained fill rule");
|
|
181
181
|
e.stroke && a(e.stroke);
|
|
182
182
|
}
|
|
183
|
-
|
|
183
|
+
b(n.fillSilhouette, i);
|
|
184
184
|
for (let e of n.arrows) {
|
|
185
185
|
if (![
|
|
186
186
|
e.tipX,
|
|
187
187
|
e.tipY,
|
|
188
188
|
e.angle
|
|
189
189
|
].every(Number.isFinite) || !["fill", "stroke"].includes(e.geometry.paint)) throw RangeError("Invalid retained arrow frame");
|
|
190
|
-
|
|
190
|
+
b(e.geometry.path, i), a(e.geometry.stroke);
|
|
191
191
|
}
|
|
192
192
|
return n;
|
|
193
193
|
}
|
|
@@ -263,7 +263,7 @@ function L(e, t, n) {
|
|
|
263
263
|
function R(e, t, n, r, i, a) {
|
|
264
264
|
let o = t.resolvedGeometry ? A(t, t.resolvedGeometry.scale) : k(t, 1);
|
|
265
265
|
if (i !== o.width || a !== o.height) throw RangeError("Retained DrawingML silhouette frame mismatch");
|
|
266
|
-
|
|
266
|
+
y(e, o.fillSilhouette, n - o.originX, r - o.originY);
|
|
267
267
|
}
|
|
268
268
|
function z(e, t) {
|
|
269
269
|
let { x: n, y: r, w: i, h: a } = t.rect;
|
|
@@ -281,15 +281,15 @@ function V(e, n, r) {
|
|
|
281
281
|
resolvedGeometry: o
|
|
282
282
|
};
|
|
283
283
|
t(n.stroke?.fill) && (e = a(e));
|
|
284
|
-
let { x: c, y:
|
|
284
|
+
let { x: c, y: u, w: d, h: f } = n.rect;
|
|
285
285
|
L(e, n, () => {
|
|
286
|
-
let t = i(n.fill, e, c,
|
|
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;
|
|
287
287
|
for (let r of o.paths) {
|
|
288
|
-
if (e.beginPath(),
|
|
288
|
+
if (e.beginPath(), y(e, r.path, c - o.originX, u - o.originY), t && r.fill !== "none") {
|
|
289
289
|
e.save();
|
|
290
290
|
try {
|
|
291
291
|
e.fillStyle = t, r.fillRule === "evenodd" ? e.fill("evenodd") : e.fill();
|
|
292
|
-
let n =
|
|
292
|
+
let n = _(r.fill);
|
|
293
293
|
n && (e.fillStyle = n, r.fillRule === "evenodd" ? e.fill("evenodd") : e.fill());
|
|
294
294
|
} finally {
|
|
295
295
|
e.restore();
|
|
@@ -298,8 +298,8 @@ function V(e, n, r) {
|
|
|
298
298
|
a && r.stroke && (B(e, a, r.stroke, n.rect, n.transform.rotationDeg), e.stroke());
|
|
299
299
|
}
|
|
300
300
|
if (a) for (let t of o.arrows) {
|
|
301
|
-
let i = c - o.originX + t.tipX, s =
|
|
302
|
-
|
|
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));
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
305
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $r as e, Ar as t, ei as n, kr as r, ni as i, ti as a } from "./plot-area-frame-DNYMd9Pf.js";
|
|
2
2
|
import { f as o, o as s, s as c, t as l, u } from "./pixel-budget-DI82Hn3R.js";
|
|
3
3
|
var d = {
|
|
4
4
|
HEADER: 16385,
|
|
@@ -379,8 +379,8 @@ var w = class {
|
|
|
379
379
|
return [(r - a.left) * a.W / a.boundsW, (i - a.top) * a.H / a.boundsH];
|
|
380
380
|
}
|
|
381
381
|
drawImage(e, t) {
|
|
382
|
-
let
|
|
383
|
-
if (t.end - t.start < 24 + (
|
|
382
|
+
let r = (t.flags & 16384) != 0;
|
|
383
|
+
if (t.end - t.start < 24 + (r ? 8 : 16)) throw RangeError("Truncated EMF+ DrawImage");
|
|
384
384
|
let i = this.objects.get(t.flags & 255);
|
|
385
385
|
if (i?.kind !== "image") {
|
|
386
386
|
this.target.unsupported.add("EMF+ DrawImage of an unavailable image");
|
|
@@ -396,7 +396,7 @@ var w = class {
|
|
|
396
396
|
s(12),
|
|
397
397
|
s(16),
|
|
398
398
|
s(20)
|
|
399
|
-
], [f, p, m, h] =
|
|
399
|
+
], [f, p, m, h] = r ? [
|
|
400
400
|
0,
|
|
401
401
|
2,
|
|
402
402
|
4,
|
|
@@ -458,7 +458,7 @@ var w = class {
|
|
|
458
458
|
if (this.sourceCopy) try {
|
|
459
459
|
A.clearRect(Math.min(v, b), Math.min(y, x), Math.abs(b - v), Math.abs(x - y));
|
|
460
460
|
} catch {}
|
|
461
|
-
|
|
461
|
+
n(A, k, v, y, b, x) ? this.target.drew = !0 : this.target.unsupported.add("EMF+ DrawImage (the bitmap could not be drawn)");
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
}, T = {
|
|
@@ -1196,37 +1196,37 @@ function Je(e) {
|
|
|
1196
1196
|
e.moveTo(-1e7, -1e7), e.lineTo(1e7, -1e7), e.lineTo(1e7, 1e7), e.lineTo(-1e7, 1e7), e.closePath();
|
|
1197
1197
|
}
|
|
1198
1198
|
function Ye(e) {
|
|
1199
|
-
let t = e.u32(), n = e.u32(),
|
|
1199
|
+
let t = e.u32(), n = e.u32(), i = e.i32();
|
|
1200
1200
|
e.i32();
|
|
1201
|
-
let
|
|
1201
|
+
let a = e.u32();
|
|
1202
1202
|
return [t, {
|
|
1203
1203
|
kind: "pen",
|
|
1204
|
-
stroke: (n & 255) == 5 ? null : a
|
|
1205
|
-
width: Math.abs(
|
|
1204
|
+
stroke: (n & 255) == 5 ? null : r(a),
|
|
1205
|
+
width: Math.abs(i)
|
|
1206
1206
|
}];
|
|
1207
1207
|
}
|
|
1208
1208
|
function Xe(e) {
|
|
1209
1209
|
let t = e.u32();
|
|
1210
1210
|
e.skip(16);
|
|
1211
|
-
let n = e.u32(),
|
|
1211
|
+
let n = e.u32(), i = e.u32();
|
|
1212
1212
|
e.u32();
|
|
1213
|
-
let
|
|
1213
|
+
let a = e.u32();
|
|
1214
1214
|
return [t, {
|
|
1215
1215
|
kind: "pen",
|
|
1216
|
-
stroke: (n & 255) == 5 ? null : a
|
|
1217
|
-
width: Math.abs(
|
|
1216
|
+
stroke: (n & 255) == 5 ? null : r(a),
|
|
1217
|
+
width: Math.abs(i)
|
|
1218
1218
|
}];
|
|
1219
1219
|
}
|
|
1220
1220
|
function Ze(e) {
|
|
1221
|
-
let t = e.u32(), n = e.u32(),
|
|
1221
|
+
let t = e.u32(), n = e.u32(), i = e.u32();
|
|
1222
1222
|
return e.u32(), [t, {
|
|
1223
1223
|
kind: "brush",
|
|
1224
|
-
fill: n === 1 ? null :
|
|
1224
|
+
fill: n === 1 ? null : r(i)
|
|
1225
1225
|
}];
|
|
1226
1226
|
}
|
|
1227
|
-
function Qe(e, t, r, i,
|
|
1228
|
-
let c = e.pos -
|
|
1229
|
-
return
|
|
1227
|
+
function Qe(e, t, n, r, i, o, s) {
|
|
1228
|
+
let c = e.pos - n;
|
|
1229
|
+
return r < c || o < c ? null : a(t, n + r, i, n + o, s);
|
|
1230
1230
|
}
|
|
1231
1231
|
function $e(e, t, n) {
|
|
1232
1232
|
let r = e.u32();
|
|
@@ -1263,7 +1263,7 @@ function et(e, t, n) {
|
|
|
1263
1263
|
escapement: o
|
|
1264
1264
|
}];
|
|
1265
1265
|
}
|
|
1266
|
-
function tt(
|
|
1266
|
+
function tt(t, n, r, i) {
|
|
1267
1267
|
let a = n.pos + n.remaining;
|
|
1268
1268
|
if (n.remaining < 48) throw RangeError("Truncated EMF text record");
|
|
1269
1269
|
n.skip(16), n.u32(), n.f32(), n.f32();
|
|
@@ -1279,19 +1279,19 @@ function tt(e, n, r, i) {
|
|
|
1279
1279
|
p += String.fromCharCode(r.getUint16(t, !0));
|
|
1280
1280
|
}
|
|
1281
1281
|
if (p.length === 0) return;
|
|
1282
|
-
let m =
|
|
1282
|
+
let m = t.curFont, h = !1;
|
|
1283
1283
|
if (m?.charset === 2 && /[\uf000-\uf0ff]/.test(p)) {
|
|
1284
|
-
let n = d === 0 ?
|
|
1285
|
-
n === null ? Q(
|
|
1284
|
+
let n = d === 0 ? e(p, m.face, !0) : null;
|
|
1285
|
+
n === null ? Q(t, "EMR_EXTTEXTOUTW (unsupported symbol encoding)") : (p = n, h = !0), h && c > 1 && r.getUint32(i + f - 4, !0) !== 0 && Q(t, "EMR_EXTTEXTOUTW (symbol character advances)");
|
|
1286
1286
|
}
|
|
1287
|
-
let g = Math.abs(m?.height ?? 0) * Ce(
|
|
1287
|
+
let g = Math.abs(m?.height ?? 0) * Ce(t) * Math.abs(z(t)) * we(t);
|
|
1288
1288
|
if (!Number.isFinite(g) || g < 1) return;
|
|
1289
|
-
let { ctx: _ } =
|
|
1290
|
-
_.fillStyle =
|
|
1289
|
+
let { ctx: _ } = t, [v, y] = B(t, o, s);
|
|
1290
|
+
_.fillStyle = t.textColor;
|
|
1291
1291
|
let b = m && m.weight >= 700 ? "bold " : "";
|
|
1292
1292
|
_.font = `${m?.italic ? "italic " : ""}${b}${g}px ${h ? "serif" : m?.face || "sans-serif"}`;
|
|
1293
|
-
let x =
|
|
1294
|
-
_.textAlign = x === 2 ? "right" : x === 6 ? "center" : "left", _.textBaseline = (
|
|
1293
|
+
let x = t.textAlign & 6;
|
|
1294
|
+
_.textAlign = x === 2 ? "right" : x === 6 ? "center" : "left", _.textBaseline = (t.textAlign & 24) == 24 ? "alphabetic" : "top";
|
|
1295
1295
|
let S = m?.escapement ?? 0;
|
|
1296
1296
|
try {
|
|
1297
1297
|
if (S !== 0) {
|
|
@@ -1302,18 +1302,18 @@ function tt(e, n, r, i) {
|
|
|
1302
1302
|
_.restore();
|
|
1303
1303
|
}
|
|
1304
1304
|
} else _.fillText(p, v, y);
|
|
1305
|
-
|
|
1305
|
+
t.drew = !0;
|
|
1306
1306
|
} catch {}
|
|
1307
1307
|
}
|
|
1308
|
-
function nt(e, t,
|
|
1308
|
+
function nt(e, t, r, i, a, o, s, c, l, u, d, f) {
|
|
1309
1309
|
if (o === 0 || c === 0) return;
|
|
1310
|
-
let p = Qe(t,
|
|
1310
|
+
let p = Qe(t, r, i, a, o, s, c);
|
|
1311
1311
|
if (!p) {
|
|
1312
1312
|
e.unsupported.add("EMF bitmap (DIB encoding)");
|
|
1313
1313
|
return;
|
|
1314
1314
|
}
|
|
1315
1315
|
let [m, h] = B(e, l, u), [g, _] = B(e, d, f);
|
|
1316
|
-
|
|
1316
|
+
n(e.ctx, p, m, h, g, _) && (e.drew = !0);
|
|
1317
1317
|
}
|
|
1318
1318
|
function rt(e, t, n, r) {
|
|
1319
1319
|
t.skip(16);
|
|
@@ -1350,10 +1350,10 @@ function it(e, t, n, r) {
|
|
|
1350
1350
|
let u = t.i32(), d = t.i32();
|
|
1351
1351
|
nt(e, t, n, r, o, s, c, l, i, a, i + u, a + d);
|
|
1352
1352
|
}
|
|
1353
|
-
function at(
|
|
1353
|
+
function at(e, n, r, i, a = {}) {
|
|
1354
1354
|
let o = a;
|
|
1355
|
-
if (!e
|
|
1356
|
-
let s = new DataView(
|
|
1355
|
+
if (!t(e) || r <= 0 || i <= 0) return !1;
|
|
1356
|
+
let s = new DataView(e.buffer, e.byteOffset, e.byteLength), c = () => ({
|
|
1357
1357
|
ctx: n,
|
|
1358
1358
|
W: r,
|
|
1359
1359
|
H: i,
|
|
@@ -1395,20 +1395,20 @@ function at(t, n, r, i, a = {}) {
|
|
|
1395
1395
|
clipped: !1,
|
|
1396
1396
|
outerClipped: !1,
|
|
1397
1397
|
unsupported: /* @__PURE__ */ new Set()
|
|
1398
|
-
}), l = x(
|
|
1398
|
+
}), l = x(e), u = c();
|
|
1399
1399
|
if (l.play) {
|
|
1400
|
-
let
|
|
1401
|
-
if (ot(u,
|
|
1402
|
-
let
|
|
1400
|
+
let t = new w(u);
|
|
1401
|
+
if (ot(u, t, l.dual, s, e), t.drawFailed && l.dual) {
|
|
1402
|
+
let t = [...u.unsupported];
|
|
1403
1403
|
try {
|
|
1404
1404
|
n.clearRect(0, 0, r, i);
|
|
1405
1405
|
} catch {}
|
|
1406
|
-
u = c(), ot(u, null, !1, s,
|
|
1407
|
-
for (let
|
|
1406
|
+
u = c(), ot(u, null, !1, s, e);
|
|
1407
|
+
for (let e of t) u.unsupported.add(e);
|
|
1408
1408
|
}
|
|
1409
1409
|
} else {
|
|
1410
1410
|
if (!l.dual) for (let e of l.failures) u.unsupported.add(e);
|
|
1411
|
-
ot(u, null, !1, s,
|
|
1411
|
+
ot(u, null, !1, s, e);
|
|
1412
1412
|
}
|
|
1413
1413
|
return u.unsupported.size > 0 && a.onUnsupported?.([...u.unsupported]), u.drew;
|
|
1414
1414
|
}
|
|
@@ -1421,17 +1421,17 @@ function ot(e, t, n, r, i) {
|
|
|
1421
1421
|
for (let t = 0; t <= e.stack.length; t++) a.restore();
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
function st(e, t, n,
|
|
1424
|
+
function st(e, t, n, i, a) {
|
|
1425
1425
|
let s = e.ctx, c = 0;
|
|
1426
|
-
for (; c + 8 <=
|
|
1427
|
-
let l =
|
|
1428
|
-
if (u < 8 || u & 3 || c + u >
|
|
1426
|
+
for (; c + 8 <= a.length;) {
|
|
1427
|
+
let l = i.getUint32(c, !0), u = i.getUint32(c + 4, !0);
|
|
1428
|
+
if (u < 8 || u & 3 || c + u > a.length) {
|
|
1429
1429
|
e.unsupported.add("EMF record stream (truncated or invalid record size)");
|
|
1430
1430
|
break;
|
|
1431
1431
|
}
|
|
1432
1432
|
let d = c + u;
|
|
1433
1433
|
if (l === T.EOF) break;
|
|
1434
|
-
let f = new DataView(
|
|
1434
|
+
let f = new DataView(i.buffer, i.byteOffset, d), p = new ne(f, c + 8, d);
|
|
1435
1435
|
if (t && l !== T.HEADER) {
|
|
1436
1436
|
if (l === T.GDICOMMENT) {
|
|
1437
1437
|
if (t.playComment(f, c, d), n && t.drawFailed) break;
|
|
@@ -1718,7 +1718,7 @@ function st(e, t, n, r, i) {
|
|
|
1718
1718
|
e.fillRule = p.u32() === 1 ? "evenodd" : "nonzero";
|
|
1719
1719
|
break;
|
|
1720
1720
|
case T.SETTEXTCOLOR:
|
|
1721
|
-
e.textColor =
|
|
1721
|
+
e.textColor = r(p.u32());
|
|
1722
1722
|
break;
|
|
1723
1723
|
case T.SETTEXTALIGN:
|
|
1724
1724
|
e.textAlign = p.u32();
|
|
@@ -1766,12 +1766,12 @@ function st(e, t, n, r, i) {
|
|
|
1766
1766
|
c = d;
|
|
1767
1767
|
}
|
|
1768
1768
|
}
|
|
1769
|
-
async function ct(
|
|
1769
|
+
async function ct(e, n, r) {
|
|
1770
1770
|
let a = {
|
|
1771
1771
|
bitmap: null,
|
|
1772
1772
|
unsupported: []
|
|
1773
1773
|
};
|
|
1774
|
-
if (!e
|
|
1774
|
+
if (!t(e) || n <= 0 || r <= 0) return a;
|
|
1775
1775
|
let o = i(n, r);
|
|
1776
1776
|
if (!o) return a;
|
|
1777
1777
|
let s = o.getContext("2d");
|
|
@@ -1779,7 +1779,7 @@ async function ct(t, n, r) {
|
|
|
1779
1779
|
s.lineJoin = "round", s.lineCap = "round";
|
|
1780
1780
|
let c = [];
|
|
1781
1781
|
return {
|
|
1782
|
-
bitmap: at(
|
|
1782
|
+
bitmap: at(e, s, n, r, { onUnsupported: (e) => {
|
|
1783
1783
|
c = e;
|
|
1784
1784
|
} }) ? await createImageBitmap(o) : null,
|
|
1785
1785
|
unsupported: c
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as e } from "./slide-pull-client-
|
|
2
|
-
import { Kr as t } from "./plot-area-frame-
|
|
1
|
+
import { m as e } from "./slide-pull-client-3g6TxaKa.js";
|
|
2
|
+
import { Kr as t } from "./plot-area-frame-DNYMd9Pf.js";
|
|
3
3
|
var n;
|
|
4
4
|
function r() {
|
|
5
5
|
return 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-Do90Z4L7.js";
|
|
2
|
+
import { t } from "./pptx-DbjWegUB.js";
|
|
3
|
+
import { t as n } from "./xlsx-DBhYlJKp.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.9", 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.9" || 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 };
|