@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,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { S as l } from "./worksheet-pull-client-
|
|
1
|
+
import { Co as e } from "./plot-area-frame-DNYMd9Pf.js";
|
|
2
|
+
import { A as t, J as n, M as r, U as i, X as a, fn as o, j as s, pn as c } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
3
|
+
import { S as l } from "./worksheet-pull-client-BudfclVl.js";
|
|
4
4
|
var u = "OOXML_DOCX_ILVL:";
|
|
5
5
|
function d(t) {
|
|
6
6
|
let n = t instanceof Error ? t.message : String(t);
|
|
@@ -24,12 +24,12 @@ function p(e) {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
function m(e) {
|
|
27
|
-
let
|
|
28
|
-
return
|
|
27
|
+
let t = e((e) => e.document_cursor_resource_usage?.());
|
|
28
|
+
return t ? i(t) : void 0;
|
|
29
29
|
}
|
|
30
30
|
var h = Math.max(o, c), g = class {
|
|
31
31
|
archive;
|
|
32
|
-
coordinator = new
|
|
32
|
+
coordinator = new r();
|
|
33
33
|
host = null;
|
|
34
34
|
identity = null;
|
|
35
35
|
executeArchive;
|
|
@@ -42,7 +42,7 @@ var h = Math.max(o, c), g = class {
|
|
|
42
42
|
t.open_document_cursor(e.operationId, e.generation);
|
|
43
43
|
});
|
|
44
44
|
let t = 0;
|
|
45
|
-
this.identity = e, this.host = new
|
|
45
|
+
this.identity = e, this.host = new s({
|
|
46
46
|
...e,
|
|
47
47
|
maxByteCredit: h,
|
|
48
48
|
coordinator: this.coordinator,
|
|
@@ -52,7 +52,7 @@ var h = Math.max(o, c), g = class {
|
|
|
52
52
|
try {
|
|
53
53
|
r = this.executeArchive((r) => r.pull_document_chunk(t, e.operationId, e.generation, n));
|
|
54
54
|
} catch (e) {
|
|
55
|
-
throw
|
|
55
|
+
throw a(e, n, h) || e;
|
|
56
56
|
}
|
|
57
57
|
let i = l(r);
|
|
58
58
|
return {
|
|
@@ -73,22 +73,22 @@ var h = Math.max(o, c), g = class {
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
dispatch(e,
|
|
77
|
-
return !this.host || !this.identity ? (
|
|
78
|
-
protocol:
|
|
76
|
+
dispatch(e, r) {
|
|
77
|
+
return !this.host || !this.identity ? (r({
|
|
78
|
+
protocol: t,
|
|
79
79
|
kind: "error",
|
|
80
80
|
sessionId: e.sessionId,
|
|
81
81
|
operationId: e.operationId,
|
|
82
82
|
generation: e.generation,
|
|
83
83
|
requestId: e.requestId,
|
|
84
|
-
error:
|
|
85
|
-
}), Promise.resolve()) : this.host.dispatch(e,
|
|
84
|
+
error: n(/* @__PURE__ */ Error("DOCX document pull session is not open"))
|
|
85
|
+
}), Promise.resolve()) : this.host.dispatch(e, r);
|
|
86
86
|
}
|
|
87
87
|
async reset() {
|
|
88
88
|
if (this.host) try {
|
|
89
89
|
this.archive() && this.executeArchive((e) => e.close_document_session());
|
|
90
90
|
} finally {
|
|
91
|
-
this.host = null, this.identity = null, this.coordinator = new
|
|
91
|
+
this.host = null, this.identity = null, this.coordinator = new r();
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
requireArchive() {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as e } from "./chunk-D5OxutzX.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as d, c as f, g as p, i as m, l as h, r as g } from "./document-pull-client-
|
|
2
|
+
import { wo as t } from "./plot-area-frame-DNYMd9Pf.js";
|
|
3
|
+
import { G as n, I as r, K as i, P as a, R as o, U as s, Xt as c, ft as l, lt as u } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
4
|
+
import { a as d, c as f, g as p, i as m, l as h, r as g } from "./document-pull-client-_G-DIh2T.js";
|
|
5
5
|
import { n as _, t as ee } from "./abort-JztSoyw2.js";
|
|
6
6
|
import { n as v, r as te, t as y } from "./wasm-loader-KAOyLXzf.js";
|
|
7
|
-
import { t as b } from "./wasm-runtime-generation-
|
|
7
|
+
import { t as b } from "./wasm-runtime-generation-D97yoAXz.js";
|
|
8
8
|
import { t as x } from "./in-process-pull-transport-BPJ7M0uC.js";
|
|
9
|
-
import { n as S, r as ne, t as re } from "./document-pull-worker-
|
|
10
|
-
import { a as ie } from "./render-
|
|
9
|
+
import { n as S, r as ne, t as re } from "./document-pull-worker-hMKJ5RdB.js";
|
|
10
|
+
import { a as ie } from "./render-Bf_Gywxw.js";
|
|
11
11
|
var C = /* @__PURE__ */ e({
|
|
12
12
|
DocxArchive: () => w,
|
|
13
13
|
default: () => q,
|
|
@@ -267,8 +267,8 @@ async function ce(e) {
|
|
|
267
267
|
return W = void 0, A = null, N = null, q(e);
|
|
268
268
|
}
|
|
269
269
|
var J = "DOCX document session was aborted", le = b(C, "DOCX");
|
|
270
|
-
async function Y(e, t, n,
|
|
271
|
-
let c =
|
|
270
|
+
async function Y(e, t, n, s) {
|
|
271
|
+
let c = r(n), l = new a({
|
|
272
272
|
enabled: c.debug || c.onResourceMetrics !== void 0,
|
|
273
273
|
format: "docx",
|
|
274
274
|
mode: "node",
|
|
@@ -281,8 +281,8 @@ async function Y(e, t, n, i) {
|
|
|
281
281
|
let u, d, f;
|
|
282
282
|
try {
|
|
283
283
|
_(n.signal, J);
|
|
284
|
-
let [
|
|
285
|
-
u = await le(t).open(() => new p(e,
|
|
284
|
+
let [r, i, a] = o(c.policy), p = w;
|
|
285
|
+
u = await le(t).open(() => new p(e, r, i, a), {
|
|
286
286
|
signal: n.signal,
|
|
287
287
|
abortError: () => ee(J),
|
|
288
288
|
disposeOnAbort: (e) => e.free()
|
|
@@ -295,7 +295,7 @@ async function Y(e, t, n, i) {
|
|
|
295
295
|
generation: 1
|
|
296
296
|
};
|
|
297
297
|
d.open(h), f = new x((e, t) => d?.dispatch(e, t), () => void 0);
|
|
298
|
-
let g, v = await
|
|
298
|
+
let g, v = await s(f, h, {
|
|
299
299
|
signal: n.signal,
|
|
300
300
|
onUsage: (e) => {
|
|
301
301
|
g = e, l.observeUsage(e);
|
|
@@ -313,7 +313,7 @@ async function Y(e, t, n, i) {
|
|
|
313
313
|
try {
|
|
314
314
|
u?.close((e) => e.free());
|
|
315
315
|
} catch {}
|
|
316
|
-
let t =
|
|
316
|
+
let t = i(e) ?? ne(e);
|
|
317
317
|
throw l.fail(t), t;
|
|
318
318
|
}
|
|
319
319
|
}
|
|
@@ -321,29 +321,29 @@ var X = "DOCX document session was aborted", Z = y(() => v(import.meta.url, "doc
|
|
|
321
321
|
async function ue(e, t) {
|
|
322
322
|
if (!t?.factory) throw TypeError("openDocxDocument requires a canvas factory");
|
|
323
323
|
if (t.legacyDoc !== void 0) {
|
|
324
|
-
let { openDocxSource: n } = await import("./docx-model-source-
|
|
324
|
+
let { openDocxSource: n } = await import("./docx-model-source-zYIufUjR.js");
|
|
325
325
|
return n(e, t, Z);
|
|
326
326
|
}
|
|
327
|
-
let
|
|
327
|
+
let r = c(t.cjkFallback), i = await Y($(e), Z(), t, (e, t, n) => g(e, t, n));
|
|
328
328
|
try {
|
|
329
329
|
_(t.signal, X);
|
|
330
|
-
let e = t.factory.createCanvas(1, 1),
|
|
331
|
-
cjkFallback:
|
|
330
|
+
let e = t.factory.createCanvas(1, 1), n = h(i.result, {
|
|
331
|
+
cjkFallback: r,
|
|
332
332
|
measureContext: e.getContext("2d"),
|
|
333
333
|
allowFootnoteContinuation: t.allowFootnoteContinuation !== !1
|
|
334
|
-
}), a = fe(t.currentDate), o = d(
|
|
335
|
-
return
|
|
334
|
+
}), a = fe(t.currentDate), o = d(i.result, n, a).layoutVariants.defaultLayout, s = new Q(i.closeArchive, i.archive, i.result, n, o, t.factory, a, i.usage, i.metrics, t.signal);
|
|
335
|
+
return i.metrics.observeUsage(s.resourceUsage), i.metrics.checkpoint("pagination ready"), s;
|
|
336
336
|
} catch (e) {
|
|
337
337
|
try {
|
|
338
|
-
|
|
338
|
+
i.closeArchive();
|
|
339
339
|
} catch {}
|
|
340
|
-
let t =
|
|
341
|
-
throw
|
|
340
|
+
let t = n(e) ?? e;
|
|
341
|
+
throw i.metrics.fail(t), t;
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
async function de(e, t = {}) {
|
|
345
345
|
if (t.legacyDoc !== void 0) {
|
|
346
|
-
let { materializeDocxSource: n } = await import("./docx-model-source-
|
|
346
|
+
let { materializeDocxSource: n } = await import("./docx-model-source-zYIufUjR.js");
|
|
347
347
|
return n(e, t, Z);
|
|
348
348
|
}
|
|
349
349
|
return te(async () => {
|
|
@@ -404,7 +404,7 @@ var Q = class {
|
|
|
404
404
|
}
|
|
405
405
|
refreshResourceUsage() {
|
|
406
406
|
try {
|
|
407
|
-
this.lastResourceUsage =
|
|
407
|
+
this.lastResourceUsage = s(this.archive.resource_usage()), this.metrics.observeUsage(this.lastResourceUsage);
|
|
408
408
|
} catch {}
|
|
409
409
|
return this.lastResourceUsage;
|
|
410
410
|
}
|
|
@@ -416,20 +416,20 @@ var Q = class {
|
|
|
416
416
|
[Symbol.asyncIterator]() {
|
|
417
417
|
return this.pages();
|
|
418
418
|
}
|
|
419
|
-
renderPage(e,
|
|
419
|
+
renderPage(e, r = {}) {
|
|
420
420
|
return this.closed ? Promise.reject(/* @__PURE__ */ Error("DOCX document session is closed")) : this.resourceFailure ? Promise.reject(this.resourceFailure) : (this.pageSize(e), this.enqueueRender(async () => {
|
|
421
421
|
_(this.signal, X);
|
|
422
|
-
let t = this.requireState(),
|
|
423
|
-
return await ie(this.factory, () => f(t.source,
|
|
424
|
-
...
|
|
422
|
+
let t = this.requireState(), n = this.factory.createCanvas(1, 1);
|
|
423
|
+
return await ie(this.factory, () => f(t.source, n, e, {
|
|
424
|
+
...r,
|
|
425
425
|
currentDate: this.defaultCurrentDateMs,
|
|
426
426
|
defaultCurrentDateMs: this.defaultCurrentDateMs,
|
|
427
427
|
layoutServices: t.services,
|
|
428
428
|
fetchImage: this.fetchImage
|
|
429
|
-
})), _(this.signal, X),
|
|
429
|
+
})), _(this.signal, X), n;
|
|
430
430
|
}).catch((e) => {
|
|
431
|
-
let
|
|
432
|
-
throw
|
|
431
|
+
let r = n(e) ?? e;
|
|
432
|
+
throw r instanceof t && (this.resourceFailure ??= r), this.metrics.fail(r), r;
|
|
433
433
|
}));
|
|
434
434
|
}
|
|
435
435
|
async *pages(e = {}) {
|
|
@@ -447,7 +447,7 @@ var Q = class {
|
|
|
447
447
|
};
|
|
448
448
|
}
|
|
449
449
|
} catch (e) {
|
|
450
|
-
throw t =
|
|
450
|
+
throw t = n(e) ?? e, t;
|
|
451
451
|
} finally {
|
|
452
452
|
try {
|
|
453
453
|
await this.close();
|
|
@@ -464,11 +464,11 @@ var Q = class {
|
|
|
464
464
|
return this.renderTail = t.then(() => void 0, () => void 0), t;
|
|
465
465
|
}
|
|
466
466
|
async release() {
|
|
467
|
-
await this.renderTail,
|
|
467
|
+
await this.renderTail, l(this.fetchImage), u(this.fetchImage), this.state = null;
|
|
468
468
|
try {
|
|
469
469
|
this.closeArchive();
|
|
470
470
|
} catch (e) {
|
|
471
|
-
let t =
|
|
471
|
+
let t = n(e) ?? e;
|
|
472
472
|
throw this.metrics.fail(t), t;
|
|
473
473
|
}
|
|
474
474
|
this.metrics.checkpoint("document session closed", this.lastResourceUsage), this.metrics.succeed({ pages: this.pageCount });
|