@silurus/ooxml 0.89.7 → 0.89.8
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-Ck21oePL.js +16 -0
- package/dist/assets/render-worker-DJiGqgi0.js +15 -0
- package/dist/assets/render-worker-hPLJ82d2.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-B7AoyoDK.js} +18 -18
- package/dist/{comment-ui-runtime-DKlEfBPp.js → comment-ui-runtime-C5eWtZSW.js} +3 -3
- package/dist/{comment-ui-runtime-BfEPgl5r.js → comment-ui-runtime-CV0I9faV.js} +3 -3
- package/dist/{document-model-source-xnkMoTZ_.js → document-model-source-90ext13g.js} +37 -37
- package/dist/{document-pull-client-CzhPbnY_.js → document-pull-client-DSYpUET2.js} +17109 -13858
- package/dist/{document-pull-worker-Bkewz-So.js → document-pull-worker-hMKJ5RdB.js} +14 -14
- package/dist/{docx-BgCQiuuN.js → docx-DCCDnwrG.js} +593 -593
- package/dist/{docx-BWyACb-n.js → docx-G7pt7ajR.js} +33 -33
- package/dist/{docx-model-source-DCRFgO7-.js → docx-model-source-Beon3BD5.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-Z2fIsmDw.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-Ci1Y9SS_.js} +261 -259
- 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-3N7xLtmI.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-BZoh-wqR.js} +1 -1
- package/dist/{render-worker-host-CtlBbau5.js → render-worker-host-BmVeB_mR.js} +1 -1
- package/dist/{render-worker-host-G1fnymI8.js → render-worker-host-CVr53kg0.js} +1 -1
- package/dist/{renderer-B4KIpz-2.js → renderer-CCA_bQB8.js} +439 -439
- package/dist/renderer-DpTePxGq.js +5887 -0
- 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 +29 -7
- package/dist/types/index.d.ts +34 -11
- package/dist/types/node.d.ts +27 -5
- package/dist/types/pptx.d.ts +11 -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-BHR8shXr.js} +6 -6
- package/dist/{worksheet-pull-client-Du0MuIro.js → worksheet-pull-client-BudfclVl.js} +84 -84
- package/dist/{xlsx-BbQ7RcNc.js → xlsx-7aY3Pbvh.js} +44 -44
- package/dist/{xlsx-ClQiNSrr.js → xlsx-DTtDjzFq.js} +299 -299
- package/dist/{xlsx-model-source-C-Riw89p.js → xlsx-model-source-DXKvb90T.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
package/dist/{comment-overlay-controller-Crm5Syhx.js → comment-overlay-controller-B7AoyoDK.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as o, S as s, _ as c, a as l, b as u, g as d, h as f, l as p, m, p as h, r as g, x as _, y as v } from "./canvas-viewer-mechanics-
|
|
3
|
-
function y(e, t =
|
|
1
|
+
import { Mn as e, Nn as t, Pn as n, Q as r, kn as i, mn as a } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
2
|
+
import { C as o, S as s, _ as c, a as l, b as u, g as d, h as f, l as p, m, p as h, r as g, x as _, y as v } from "./canvas-viewer-mechanics-BsqaoYgK.js";
|
|
3
|
+
function y(e, t = a) {
|
|
4
4
|
return e.byteLength > 0 && e.byteLength <= t;
|
|
5
5
|
}
|
|
6
6
|
function b(e, t) {
|
|
@@ -20,41 +20,41 @@ function ee(e, t, n, r) {
|
|
|
20
20
|
for (let e = 0; e < r.length; e++) i ^= r[e], i = Math.imul(i, 16777619);
|
|
21
21
|
return `${e}|${t}|${n}|${r.length}|${(i >>> 0).toString(16)}`;
|
|
22
22
|
}
|
|
23
|
-
async function S(
|
|
24
|
-
let s =
|
|
23
|
+
async function S(r, o = a) {
|
|
24
|
+
let s = i();
|
|
25
25
|
if (!s || typeof FontFace > "u") return [];
|
|
26
26
|
let c = [], l = /* @__PURE__ */ new Set(), u = [];
|
|
27
|
-
for (let e of
|
|
27
|
+
for (let e of r) try {
|
|
28
28
|
if (!y(e.bytes, o)) {
|
|
29
29
|
u.push(e.family);
|
|
30
30
|
continue;
|
|
31
31
|
}
|
|
32
|
-
let t = e.odttf ? b(e.bytes, e.fontKey ?? "") : e.bytes,
|
|
33
|
-
if (l.has(
|
|
34
|
-
l.add(
|
|
35
|
-
let { face:
|
|
32
|
+
let t = e.odttf ? b(e.bytes, e.fontKey ?? "") : e.bytes, r = `embedded:${ee(e.family, e.weight, e.style, t)}`;
|
|
33
|
+
if (l.has(r)) continue;
|
|
34
|
+
l.add(r);
|
|
35
|
+
let { face: i } = n(r, s, () => {
|
|
36
36
|
let n = t.buffer.slice(t.byteOffset, t.byteOffset + t.byteLength), r = new FontFace(e.family, n, {
|
|
37
37
|
weight: e.weight,
|
|
38
38
|
style: e.style
|
|
39
39
|
});
|
|
40
40
|
return s.add(r), r;
|
|
41
41
|
});
|
|
42
|
-
c.push(
|
|
42
|
+
c.push(i);
|
|
43
43
|
} catch {
|
|
44
44
|
u.push(e.family);
|
|
45
45
|
}
|
|
46
46
|
let d = c;
|
|
47
47
|
if (c.length > 0) {
|
|
48
|
-
let
|
|
49
|
-
Array.isArray(
|
|
48
|
+
let n = await e(Promise.allSettled(c.map((e) => Promise.resolve().then(() => e.load()))));
|
|
49
|
+
Array.isArray(n) ? (d = [], n.forEach((e, n) => {
|
|
50
50
|
let r = c[n];
|
|
51
|
-
|
|
52
|
-
})) : (u.push(...c.map((e) => e.family)),
|
|
51
|
+
e.status === "fulfilled" ? d.push(r) : (u.push(r.family), t([r]));
|
|
52
|
+
})) : (u.push(...c.map((e) => e.family)), t(c), d = []);
|
|
53
53
|
}
|
|
54
54
|
return u.length > 0 && console.warn(`[ooxml] failed to register embedded font(s): ${[...new Set(u)].join(", ")}; falling back to substitute fonts (text may shift or differ).`), d;
|
|
55
55
|
}
|
|
56
|
-
function C(
|
|
57
|
-
e
|
|
56
|
+
function C(e) {
|
|
57
|
+
t(e);
|
|
58
58
|
}
|
|
59
59
|
function w(e, t, n) {
|
|
60
60
|
return e < t ? t : e > n ? n : e;
|
|
@@ -665,7 +665,7 @@ var Q = class {
|
|
|
665
665
|
return Math.max(0, t - n - r);
|
|
666
666
|
}
|
|
667
667
|
dpr() {
|
|
668
|
-
return this.hooks.options().dpr ??
|
|
668
|
+
return this.hooks.options().dpr ?? r();
|
|
669
669
|
}
|
|
670
670
|
}, re = class {
|
|
671
671
|
notify;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as e } from "./comment-overlay-controller-
|
|
2
|
-
import { L as t } from "./document-pull-client-
|
|
3
|
-
import { f as n } from "./docx-
|
|
1
|
+
import { E as e } from "./comment-overlay-controller-B7AoyoDK.js";
|
|
2
|
+
import { L as t } from "./document-pull-client-DSYpUET2.js";
|
|
3
|
+
import { f as n } from "./docx-DCCDnwrG.js";
|
|
4
4
|
import { i as r, n as i, o as a, r as o, s, t as c } from "./read-only-comment-margin-Ee9Y6vPg.js";
|
|
5
5
|
import { i as l, n as u, r as d, t as f } from "./read-only-comment-decoration-B06YO2zk.js";
|
|
6
6
|
function p(e, r) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as t } from "./comment-overlay-controller-
|
|
3
|
-
import { r as n } from "./pptx-
|
|
1
|
+
import { Fa as e } from "./plot-area-frame-DNYMd9Pf.js";
|
|
2
|
+
import { E as t } from "./comment-overlay-controller-B7AoyoDK.js";
|
|
3
|
+
import { r as n } from "./pptx-Ci1Y9SS_.js";
|
|
4
4
|
import { i as r, n as i, o as a, r as o, t as s } from "./read-only-comment-margin-Ee9Y6vPg.js";
|
|
5
5
|
import { i as c, n as l, r as u, t as d } from "./read-only-comment-decoration-B06YO2zk.js";
|
|
6
6
|
function f(e, t, n) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { P as o, b as s } from "./comment-overlay-controller-
|
|
3
|
-
import { N as c, _ as l, a as u, d, f, j as p, l as m, o as h, p as g, s as _, v, y } from "./document-pull-client-
|
|
4
|
-
import { _ as b, c as x, g as S, h as C, l as w, m as T, u as E } from "./docx-
|
|
5
|
-
import { T as D } from "./canvas-viewer-mechanics-
|
|
1
|
+
import { $t as e, An as t, I as n, P as r, Xt as i, jn as a } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
2
|
+
import { P as o, b as s } from "./comment-overlay-controller-B7AoyoDK.js";
|
|
3
|
+
import { N as c, _ as l, a as u, d, f, j as p, l as m, o as h, p as g, s as _, v, y } from "./document-pull-client-DSYpUET2.js";
|
|
4
|
+
import { _ as b, c as x, g as S, h as C, l as w, m as T, u as E } from "./docx-DCCDnwrG.js";
|
|
5
|
+
import { T as D } from "./canvas-viewer-mechanics-BsqaoYgK.js";
|
|
6
6
|
import { n as O } from "./renderer-module-contract-BuTx2FWJ.js";
|
|
7
7
|
import { n as k, o as A, r as j } from "./model-source-COXegBNA.js";
|
|
8
8
|
import { t as M } from "./bundled-asset-url-BMJ8vNHP.js";
|
|
@@ -29,7 +29,7 @@ async function F(j, M = {}, N) {
|
|
|
29
29
|
if (F?.aborted) throw new y();
|
|
30
30
|
};
|
|
31
31
|
L();
|
|
32
|
-
let R =
|
|
32
|
+
let R = i(M.cjkFallback), z = n(M), B = Date.now(), V = M.mode ?? "main", H = new r({
|
|
33
33
|
enabled: !0,
|
|
34
34
|
format: "docx",
|
|
35
35
|
mode: V,
|
|
@@ -39,24 +39,24 @@ async function F(j, M = {}, N) {
|
|
|
39
39
|
});
|
|
40
40
|
try {
|
|
41
41
|
if (V === "worker" && (typeof Worker > "u" || typeof OffscreenCanvas > "u")) throw Error("mode: 'worker' requires Worker and OffscreenCanvas support");
|
|
42
|
-
let
|
|
42
|
+
let n;
|
|
43
43
|
if (typeof j == "string") {
|
|
44
44
|
let e = await fetch(j, { signal: F });
|
|
45
45
|
if (!e.ok) throw Error(`Failed to fetch: ${e.status} ${e.statusText}`);
|
|
46
|
-
|
|
47
|
-
} else
|
|
46
|
+
n = await e.arrayBuffer();
|
|
47
|
+
} else n = j;
|
|
48
48
|
L();
|
|
49
|
-
let
|
|
50
|
-
if (!
|
|
49
|
+
let r = A(M.legacyDoc === void 0 ? void 0 : [M.legacyDoc], "docx", new Uint8Array(n));
|
|
50
|
+
if (!r) return x.load(n, {
|
|
51
51
|
...M,
|
|
52
52
|
legacyDoc: void 0
|
|
53
53
|
});
|
|
54
|
-
let
|
|
54
|
+
let i = k(r, "docx");
|
|
55
55
|
try {
|
|
56
|
-
H.setSourceBytes(
|
|
57
|
-
let
|
|
56
|
+
H.setSourceBytes(n.byteLength), H.checkpoint("container ready");
|
|
57
|
+
let r = V === "worker" ? (await import("./render-worker-host-BmVeB_mR.js")).createRenderWorker() : new (await (import("./worker-source-D3NwPe6l.js"))).default(), k, A, j = !1, U = () => {
|
|
58
58
|
j || !k || (j = !0, k.destroy());
|
|
59
|
-
}, W = I(
|
|
59
|
+
}, W = I(r, i, M, (e) => {
|
|
60
60
|
k && P(k, e);
|
|
61
61
|
}), G = V === "worker" ? O(M) : void 0, K = V === "worker" && !!M.progressiveLayout;
|
|
62
62
|
try {
|
|
@@ -66,8 +66,8 @@ async function F(j, M = {}, N) {
|
|
|
66
66
|
B,
|
|
67
67
|
M.wasmUrl
|
|
68
68
|
]), k = A, F?.addEventListener("abort", U, { once: !0 }), L(), k._metrics = H, k._cjkFallback = R, k._allowFootnoteContinuation = M.allowFootnoteContinuation !== !1;
|
|
69
|
-
let
|
|
70
|
-
|
|
69
|
+
let r = c(k), D = p(M.currentDate, r.defaultCurrentDateMs, M.showTrackedChanges === !0);
|
|
70
|
+
r.activeLayoutOptions = D, await k._parse(n, z.policy, V === "worker" ? !!M.useGoogleFonts : !1, M.workerTimeoutMs, (e) => H.observeUsage(e), G, K ? {
|
|
71
71
|
onPartial: M.onLayoutPartial,
|
|
72
72
|
onComplete: M.onLayoutComplete,
|
|
73
73
|
onProgress: M.onLayoutProgress,
|
|
@@ -90,19 +90,19 @@ async function F(j, M = {}, N) {
|
|
|
90
90
|
faces: [],
|
|
91
91
|
routes: {}
|
|
92
92
|
};
|
|
93
|
-
if (F?.aborted) throw
|
|
93
|
+
if (F?.aborted) throw e(P.faces), new y();
|
|
94
94
|
k._officeFontFaces = P.faces;
|
|
95
95
|
let I = [];
|
|
96
96
|
if (k._mode === "main" && M.useGoogleFonts && k._document) {
|
|
97
|
-
let
|
|
98
|
-
I =
|
|
99
|
-
let
|
|
100
|
-
if (F?.aborted) throw n
|
|
101
|
-
k._googleFontFaces =
|
|
97
|
+
let e = f(k._document, R, P);
|
|
98
|
+
I = e.installedSubstituteFamilies;
|
|
99
|
+
let n = await t(e.names, l);
|
|
100
|
+
if (F?.aborted) throw a(n), new y();
|
|
101
|
+
k._googleFontFaces = n;
|
|
102
102
|
}
|
|
103
103
|
let q;
|
|
104
104
|
if (k._mode === "main" && M.math && k._document && h(k._document) && (q = await _(k._document, M.math)), L(), k._mode === "main" && k._document && k._source) {
|
|
105
|
-
let
|
|
105
|
+
let t = k, n = c(k), r = {
|
|
106
106
|
allowFootnoteContinuation: k._allowFootnoteContinuation,
|
|
107
107
|
fontMetrics: O,
|
|
108
108
|
useGoogleFonts: !!M.useGoogleFonts,
|
|
@@ -118,14 +118,14 @@ async function F(j, M = {}, N) {
|
|
|
118
118
|
useGoogleFonts: !!M.useGoogleFonts,
|
|
119
119
|
cjkFallback: R
|
|
120
120
|
});
|
|
121
|
-
if (F?.aborted) throw
|
|
122
|
-
k._officeFontFaces = [...k._officeFontFaces, ...i.faces],
|
|
123
|
-
...
|
|
121
|
+
if (F?.aborted) throw e(i.faces), new y();
|
|
122
|
+
k._officeFontFaces = [...k._officeFontFaces, ...i.faces], n.services = m(k._source, {
|
|
123
|
+
...r,
|
|
124
124
|
nativeRouteMetrics: i.nativeRouteMetrics
|
|
125
125
|
});
|
|
126
|
-
let a =
|
|
126
|
+
let a = n.services, o = u(k._source, a, n.defaultCurrentDateMs), l = k._source.fatalParse === null, f = n.activeLayoutOptions;
|
|
127
127
|
if (!f) throw Error("Active layout view was not recorded at load");
|
|
128
|
-
let h = { onProgress: M.onLayoutProgress ? (
|
|
128
|
+
let h = { onProgress: M.onLayoutProgress ? (e) => t._layoutObservers.notify("onLayoutProgress", M.onLayoutProgress, { committedUnits: e }) : void 0 };
|
|
129
129
|
if (l && M.progressiveLayout) {
|
|
130
130
|
let e = o.layoutVariants, t = k, n = new AbortController();
|
|
131
131
|
t._layoutAbort = n;
|
|
@@ -184,20 +184,20 @@ async function F(j, M = {}, N) {
|
|
|
184
184
|
}), await r.promise;
|
|
185
185
|
} else if (l && (M.sliceLayout !== !1 || M.onLayoutProgress)) for (;;) {
|
|
186
186
|
L();
|
|
187
|
-
let e = N?.requestedView(),
|
|
188
|
-
|
|
187
|
+
let e = N?.requestedView(), t = e === void 0 ? f : p(M.currentDate, n.defaultCurrentDateMs, e);
|
|
188
|
+
n.activeLayoutOptions = t;
|
|
189
189
|
let r = new AbortController(), i = !1, s = N?.subscribeViewChange(() => {
|
|
190
190
|
let e = N.requestedView();
|
|
191
|
-
i || e === void 0 || e === !0 == (
|
|
191
|
+
i || e === void 0 || e === !0 == (t.showTrackedChanges === !0) || (i = !0, r.abort());
|
|
192
192
|
});
|
|
193
193
|
k._layoutAbort = r;
|
|
194
194
|
try {
|
|
195
|
-
let e = await v(k._source.bodyLayoutInput, a,
|
|
195
|
+
let e = await v(k._source.bodyLayoutInput, a, t, {
|
|
196
196
|
...h,
|
|
197
197
|
signal: r.signal
|
|
198
198
|
});
|
|
199
199
|
if (L(), i) continue;
|
|
200
|
-
o.layoutVariants.prime(
|
|
200
|
+
o.layoutVariants.prime(t, e);
|
|
201
201
|
break;
|
|
202
202
|
} catch (e) {
|
|
203
203
|
if (e instanceof y && i && !F?.aborted) continue;
|
|
@@ -208,14 +208,14 @@ async function F(j, M = {}, N) {
|
|
|
208
208
|
}
|
|
209
209
|
else o.layoutVariants.layoutFor(f);
|
|
210
210
|
}
|
|
211
|
-
return L(), await k._resourceUsage(M.workerTimeoutMs ?? 1e3).then((e) => H.observeUsage(e), () => void 0), H.checkpoint("model and layout ready"), L(), H.succeed({ pages: k.pageCount }),
|
|
211
|
+
return L(), await k._resourceUsage(M.workerTimeoutMs ?? 1e3).then((e) => H.observeUsage(e), () => void 0), H.checkpoint("model and layout ready"), L(), H.succeed({ pages: k.pageCount }), i.release(), A;
|
|
212
212
|
} catch (e) {
|
|
213
|
-
throw D(
|
|
213
|
+
throw D(r, k ? U : void 0), e;
|
|
214
214
|
} finally {
|
|
215
215
|
F?.removeEventListener("abort", U);
|
|
216
216
|
}
|
|
217
217
|
} finally {
|
|
218
|
-
|
|
218
|
+
i.release();
|
|
219
219
|
}
|
|
220
220
|
} catch (e) {
|
|
221
221
|
throw H.fail(e), e;
|