@silurus/ooxml 0.89.10 → 0.89.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-Coh33rbW.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-BkpFlPT0.js → comment-ui-runtime-DhTTGSay.js} +3 -3
- package/dist/{document-model-source-Ca2fk_Fc.js → document-model-source-C6wGN8m3.js} +45 -45
- package/dist/{document-pull-client-CTGM4i1m.js → document-pull-client-BfGXPuQc.js} +4117 -4128
- package/dist/{document-pull-worker-hMKJ5RdB.js → document-pull-worker-Bl3wlLXC.js} +4 -4
- package/dist/{docx-B-47Ff78.js → docx-CNscQaT8.js} +496 -496
- package/dist/{docx-DwdB7I59.js → docx-Cry-eklK.js} +7 -7
- package/dist/{docx-model-source-CWuvf9jk.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-80mSndWp.js → render-worker-host-Cj-U3WPe.js} +1 -1
- package/dist/{render-worker-host-CVr53kg0.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
package/dist/{comment-overlay-controller-b3tKmzMa.js → comment-overlay-controller-CVvQCYhQ.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
1
|
+
import { In as e, Ln as t, Nn as n, Q as r, Rn as i, vn as a } from "./bounded-raw-part-cache-D2Q0FIoE.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-_ZBxW_sN.js";
|
|
3
3
|
function y(e, t = a) {
|
|
4
4
|
return e.byteLength > 0 && e.byteLength <= t;
|
|
5
5
|
}
|
|
@@ -21,7 +21,7 @@ function ee(e, t, n, r) {
|
|
|
21
21
|
return `${e}|${t}|${n}|${r.length}|${(i >>> 0).toString(16)}`;
|
|
22
22
|
}
|
|
23
23
|
async function S(r, o = a) {
|
|
24
|
-
let s =
|
|
24
|
+
let s = n();
|
|
25
25
|
if (!s || typeof FontFace > "u") return [];
|
|
26
26
|
let c = [], l = /* @__PURE__ */ new Set(), u = [];
|
|
27
27
|
for (let e of r) try {
|
|
@@ -29,17 +29,17 @@ async function S(r, o = a) {
|
|
|
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, n = `embedded:${ee(e.family, e.weight, e.style, t)}`;
|
|
33
|
+
if (l.has(n)) continue;
|
|
34
|
+
l.add(n);
|
|
35
|
+
let { face: r } = i(n, 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(r);
|
|
43
43
|
} catch {
|
|
44
44
|
u.push(e.family);
|
|
45
45
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fa as e } from "./plot-area-frame-DNYMd9Pf.js";
|
|
2
|
-
import { E as t } from "./comment-overlay-controller-
|
|
3
|
-
import { r as n } from "./pptx-
|
|
2
|
+
import { E as t } from "./comment-overlay-controller-CVvQCYhQ.js";
|
|
3
|
+
import { r as n } from "./pptx-Bons7t3Y.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,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-CVvQCYhQ.js";
|
|
2
|
+
import { L as t } from "./document-pull-client-BfGXPuQc.js";
|
|
3
|
+
import { f as n } from "./docx-CNscQaT8.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,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 { Fn as e, I as t, P as n, Pn as r, en as i, rn as a } from "./bounded-raw-part-cache-D2Q0FIoE.js";
|
|
2
|
+
import { P as o, b as s } from "./comment-overlay-controller-CVvQCYhQ.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-BfGXPuQc.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-CNscQaT8.js";
|
|
5
|
+
import { T as D } from "./canvas-viewer-mechanics-_ZBxW_sN.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 = i(M.cjkFallback), z =
|
|
32
|
+
let R = i(M.cjkFallback), z = t(M), B = Date.now(), V = M.mode ?? "main", H = new n({
|
|
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 t;
|
|
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
|
+
t = await e.arrayBuffer();
|
|
47
|
+
} else t = j;
|
|
48
48
|
L();
|
|
49
|
-
let
|
|
50
|
-
if (!
|
|
49
|
+
let n = A(M.legacyDoc === void 0 ? void 0 : [M.legacyDoc], "docx", new Uint8Array(t));
|
|
50
|
+
if (!n) return x.load(t, {
|
|
51
51
|
...M,
|
|
52
52
|
legacyDoc: void 0
|
|
53
53
|
});
|
|
54
|
-
let i = k(
|
|
54
|
+
let i = k(n, "docx");
|
|
55
55
|
try {
|
|
56
|
-
H.setSourceBytes(
|
|
57
|
-
let
|
|
56
|
+
H.setSourceBytes(t.byteLength), H.checkpoint("container ready");
|
|
57
|
+
let n = V === "worker" ? (await import("./render-worker-host-D7L6GMbE.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(n, 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 n = c(k), D = p(M.currentDate, n.defaultCurrentDateMs, M.showTrackedChanges === !0);
|
|
70
|
+
n.activeLayoutOptions = D, await k._parse(t, 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 a(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 n = await t
|
|
100
|
-
if (F?.aborted) throw
|
|
97
|
+
let t = f(k._document, R, P);
|
|
98
|
+
I = t.installedSubstituteFamilies;
|
|
99
|
+
let n = await r(t.names, l);
|
|
100
|
+
if (F?.aborted) throw e(n), new y();
|
|
101
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 e = k, t = c(k), n = {
|
|
106
106
|
allowFootnoteContinuation: k._allowFootnoteContinuation,
|
|
107
107
|
fontMetrics: O,
|
|
108
108
|
useGoogleFonts: !!M.useGoogleFonts,
|
|
@@ -114,35 +114,35 @@ async function F(j, M = {}, N) {
|
|
|
114
114
|
installedFamilies: "installed" in P ? P.installed : void 0,
|
|
115
115
|
mathResources: q?.records,
|
|
116
116
|
mathDrawables: q?.drawables
|
|
117
|
-
},
|
|
117
|
+
}, r = await d(k._source, k._document, {
|
|
118
118
|
useGoogleFonts: !!M.useGoogleFonts,
|
|
119
119
|
cjkFallback: R
|
|
120
120
|
});
|
|
121
|
-
if (F?.aborted) throw
|
|
122
|
-
k._officeFontFaces = [...k._officeFontFaces, ...
|
|
123
|
-
...
|
|
124
|
-
nativeRouteMetrics:
|
|
121
|
+
if (F?.aborted) throw a(r.faces), new y();
|
|
122
|
+
k._officeFontFaces = [...k._officeFontFaces, ...r.faces], t.services = m(k._source, {
|
|
123
|
+
...n,
|
|
124
|
+
nativeRouteMetrics: r.nativeRouteMetrics
|
|
125
125
|
});
|
|
126
|
-
let
|
|
126
|
+
let i = t.services, o = u(k._source, i, t.defaultCurrentDateMs), l = k._source.fatalParse === null, f = t.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 ? (t) => e._layoutObservers.notify("onLayoutProgress", M.onLayoutProgress, { committedUnits: t }) : void 0 };
|
|
129
129
|
if (l && M.progressiveLayout) {
|
|
130
130
|
let e = o.layoutVariants, t = k, n = new AbortController();
|
|
131
131
|
t._layoutAbort = n;
|
|
132
|
-
let r = s(),
|
|
133
|
-
t._layoutCompletion = E(k._source.bodyLayoutInput,
|
|
132
|
+
let r = s(), a = null, c = !0;
|
|
133
|
+
t._layoutCompletion = E(k._source.bodyLayoutInput, i, f, {
|
|
134
134
|
scheduler: {
|
|
135
135
|
...h,
|
|
136
136
|
signal: n.signal
|
|
137
137
|
},
|
|
138
138
|
onPreview: (n) => {
|
|
139
139
|
if (!c) return;
|
|
140
|
-
let
|
|
140
|
+
let i = a === null, o = t._replaceMainLayoutPublication(e, f, a, n.layout);
|
|
141
141
|
if (o === null) {
|
|
142
142
|
c = !1;
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
|
-
if (
|
|
145
|
+
if (a = o, i) t._layoutLifecycle.begin(), w(t, {
|
|
146
146
|
pageCount: n.layout.pages.length,
|
|
147
147
|
exact: n.exact,
|
|
148
148
|
complete: !1
|
|
@@ -160,13 +160,13 @@ async function F(j, M = {}, N) {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}).then((n) => {
|
|
163
|
-
c && t._replaceMainLayoutPublication(e, f,
|
|
163
|
+
c && t._replaceMainLayoutPublication(e, f, a, n) === null && (c = !1), t._layoutLifecycle.succeed(), w(t, {
|
|
164
164
|
pageCount: t.pageCount,
|
|
165
165
|
exact: !0,
|
|
166
166
|
complete: !0
|
|
167
167
|
}), t._layoutObservers.notify("onLayoutComplete", M.onLayoutComplete), r.resolve();
|
|
168
168
|
}).catch((e) => {
|
|
169
|
-
if (
|
|
169
|
+
if (a === null) {
|
|
170
170
|
r.reject(e);
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
@@ -184,23 +184,23 @@ 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
|
-
|
|
189
|
-
let r = new AbortController(),
|
|
187
|
+
let e = N?.requestedView(), n = e === void 0 ? f : p(M.currentDate, t.defaultCurrentDateMs, e);
|
|
188
|
+
t.activeLayoutOptions = n;
|
|
189
|
+
let r = new AbortController(), a = !1, s = N?.subscribeViewChange(() => {
|
|
190
190
|
let e = N.requestedView();
|
|
191
|
-
|
|
191
|
+
a || e === void 0 || e === !0 == (n.showTrackedChanges === !0) || (a = !0, r.abort());
|
|
192
192
|
});
|
|
193
193
|
k._layoutAbort = r;
|
|
194
194
|
try {
|
|
195
|
-
let e = await v(k._source.bodyLayoutInput,
|
|
195
|
+
let e = await v(k._source.bodyLayoutInput, i, n, {
|
|
196
196
|
...h,
|
|
197
197
|
signal: r.signal
|
|
198
198
|
});
|
|
199
|
-
if (L(),
|
|
200
|
-
o.layoutVariants.prime(
|
|
199
|
+
if (L(), a) continue;
|
|
200
|
+
o.layoutVariants.prime(n, e);
|
|
201
201
|
break;
|
|
202
202
|
} catch (e) {
|
|
203
|
-
if (e instanceof y &&
|
|
203
|
+
if (e instanceof y && a && !F?.aborted) continue;
|
|
204
204
|
throw e;
|
|
205
205
|
} finally {
|
|
206
206
|
s?.(), k._layoutAbort = null;
|
|
@@ -210,7 +210,7 @@ async function F(j, M = {}, N) {
|
|
|
210
210
|
}
|
|
211
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(n, k ? U : void 0), e;
|
|
214
214
|
} finally {
|
|
215
215
|
F?.removeEventListener("abort", U);
|
|
216
216
|
}
|