@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/node.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Co as e, wo as t } from "./plot-area-frame-DNYMd9Pf.js";
|
|
2
2
|
import { f as n, u as r } from "./pixel-budget-DI82Hn3R.js";
|
|
3
|
-
import { n as i, r as a } from "./pptx-
|
|
4
|
-
import { n as o, r as s } from "./docx-
|
|
5
|
-
import { n as c, r as l, t as u } from "./render-
|
|
6
|
-
import { a as d, i as f, n as p, r as m } from "./xlsx-
|
|
3
|
+
import { n as i, r as a } from "./pptx-CQtPbMxI.js";
|
|
4
|
+
import { n as o, r as s } from "./docx-Cry-eklK.js";
|
|
5
|
+
import { n as c, r as l, t as u } from "./render-C7F07FrC.js";
|
|
6
|
+
import { a as d, i as f, n as p, r as m } from "./xlsx-DujIp7CR.js";
|
|
7
7
|
export { r as OoxmlDecodedImageLimitError, e as OoxmlError, t as OoxmlResourceLimitError, u as installImageBitmapShim, c as installOffscreenCanvasShim, n as isOoxmlDecodedImageLimitError, o as materializeDocxDocument, i as materializePptxPresentation, p as materializeXlsxWorkbook, m as materializeXlsxWorkbookIndex, f as materializeXlsxWorksheet, s as openDocxDocument, a as openPptxPresentation, d as openXlsxWorkbook, l as renderSlideNode };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as e } from "./chunk-D5OxutzX.js";
|
|
2
|
-
import { a as t, c as n, d as r, f as i, i as a, l as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "./slide-pull-client-
|
|
2
|
+
import { a as t, c as n, d as r, f as i, i as a, l as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "./slide-pull-client-3mJmNjjB.js";
|
|
3
3
|
import { Co as m, Fa as h, Fo as g, Io as _, wo as v } from "./plot-area-frame-DNYMd9Pf.js";
|
|
4
4
|
import { n as ee, t as y } from "./cfb-guard-DzYlucez.js";
|
|
5
|
-
import { $ as b,
|
|
6
|
-
import { C as pe, D as me, E as O, N as he, O as ge, P as k, S as _e, T as A, _ as ve, a as ye, b as be, c as xe, d as Se, f as Ce, g as we, h as Te, i as Ee, l as De, m as Oe, n as ke, o as Ae, p as je, r as Me, t as Ne, u as Pe, v as Fe, w as j, x as Ie, y as Le } from "./comment-overlay-controller-
|
|
5
|
+
import { $ as b, F as x, G as S, I as te, Mn as C, P as w, Q as T, Sn as ne, W as re, _t as ie, en as ae, ft as oe, in as E, lt as se, n as ce, nn as le, p as D, rn as ue, t as de, yn as fe } from "./bounded-raw-part-cache-D2Q0FIoE.js";
|
|
6
|
+
import { C as pe, D as me, E as O, N as he, O as ge, P as k, S as _e, T as A, _ as ve, a as ye, b as be, c as xe, d as Se, f as Ce, g as we, h as Te, i as Ee, l as De, m as Oe, n as ke, o as Ae, p as je, r as Me, t as Ne, u as Pe, v as Fe, w as j, x as Ie, y as Le } from "./comment-overlay-controller-CVvQCYhQ.js";
|
|
7
7
|
import { f as M, u as Re } from "./pixel-budget-DI82Hn3R.js";
|
|
8
8
|
import { i as ze, t as Be } from "./tiff-contract-DEd8CGuz.js";
|
|
9
|
-
import { D as Ve, E as He, T as Ue, a as N, b as We, c as Ge, f as Ke, i as qe, l as Je, n as Ye, o as P, p as Xe, r as Ze, s as Qe, t as $e, u as F, v as et, w as tt, x as nt, y as rt } from "./canvas-viewer-mechanics-
|
|
9
|
+
import { D as Ve, E as He, T as Ue, a as N, b as We, c as Ge, f as Ke, i as qe, l as Je, n as Ye, o as P, p as Xe, r as Ze, s as Qe, t as $e, u as F, v as et, w as tt, x as nt, y as rt } from "./canvas-viewer-mechanics-_ZBxW_sN.js";
|
|
10
10
|
import { n as it } from "./renderer-module-contract-BuTx2FWJ.js";
|
|
11
11
|
import { t as at } from "./visible-index-vN-4BNn7.js";
|
|
12
|
-
import { n as ot } from "./resource-measurement-
|
|
12
|
+
import { n as ot } from "./resource-measurement-B2hzmYlu.js";
|
|
13
13
|
function st(e, t) {
|
|
14
14
|
let n = t.startsWith("/") ? [] : e.split("/").filter((e) => e !== "");
|
|
15
15
|
for (let e of t.split("/")) if (e === "..") n.pop();
|
|
@@ -118,7 +118,7 @@ var mt = class extends pe {
|
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
120
|
async function ht(e) {
|
|
121
|
-
return e ? (await import("./font-preload-demand-
|
|
121
|
+
return e ? (await import("./font-preload-demand-DhFVOxz4.js")).collectSlideFontDemand : void 0;
|
|
122
122
|
}
|
|
123
123
|
var gt = (e) => e >= "0" && e <= "9";
|
|
124
124
|
function _t(e) {
|
|
@@ -257,13 +257,13 @@ async function bt(e, t, n) {
|
|
|
257
257
|
} catch (t) {
|
|
258
258
|
d(B(e.el, e.media, "play", t));
|
|
259
259
|
}
|
|
260
|
-
},
|
|
260
|
+
}, S = (t) => {
|
|
261
261
|
let { x: n, y: r } = _(t.clientX, t.clientY), i = ee(n, r);
|
|
262
262
|
i && (i.kind === "seek" ? (y = {
|
|
263
263
|
state: i.state,
|
|
264
264
|
wasPlaying: !i.state.media.paused
|
|
265
265
|
}, i.state.media.pause(), b(i.state, i.fraction), e.setPointerCapture(t.pointerId), t.preventDefault()) : i.state.media.paused ? x(i.state) : i.state.media.pause());
|
|
266
|
-
},
|
|
266
|
+
}, te = (e) => {
|
|
267
267
|
let { x: t, y: n } = _(e.clientX, e.clientY);
|
|
268
268
|
p = null;
|
|
269
269
|
for (let e of c) {
|
|
@@ -284,7 +284,7 @@ async function bt(e, t, n) {
|
|
|
284
284
|
let { wasPlaying: n, state: r } = y;
|
|
285
285
|
y = null, e.releasePointerCapture(t.pointerId), n && x(r);
|
|
286
286
|
};
|
|
287
|
-
return c.length > 0 && (e.addEventListener("pointerdown",
|
|
287
|
+
return c.length > 0 && (e.addEventListener("pointerdown", S), e.addEventListener("pointermove", te), e.addEventListener("pointerleave", C), e.addEventListener("pointerup", w), e.addEventListener("pointercancel", w), e.style.cursor = "pointer", g()), {
|
|
288
288
|
play(e) {
|
|
289
289
|
for (let t of c) (!e || t.el.mediaPath === e) && x(t);
|
|
290
290
|
},
|
|
@@ -292,7 +292,7 @@ async function bt(e, t, n) {
|
|
|
292
292
|
for (let t of c) (!e || t.el.mediaPath === e) && t.media.pause();
|
|
293
293
|
},
|
|
294
294
|
destroy() {
|
|
295
|
-
l || (l = !0, f !== null && cancelAnimationFrame(f), e.removeEventListener("pointerdown",
|
|
295
|
+
l || (l = !0, f !== null && cancelAnimationFrame(f), e.removeEventListener("pointerdown", S), e.removeEventListener("pointermove", te), e.removeEventListener("pointerleave", C), e.removeEventListener("pointerup", w), e.removeEventListener("pointercancel", w), e.style.cursor = "", u());
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
}
|
|
@@ -466,7 +466,7 @@ var Ut = class {
|
|
|
466
466
|
#o;
|
|
467
467
|
constructor(e) {
|
|
468
468
|
if (!Number.isSafeInteger(e.slideCount) || e.slideCount < 0) throw TypeError("slideCount must be a non-negative safe integer");
|
|
469
|
-
this.#e = e.slideCount, this.#t = e.loadSlide, this.#n = new
|
|
469
|
+
this.#e = e.slideCount, this.#t = e.loadSlide, this.#n = new ce({
|
|
470
470
|
maxEntries: e.maxCachedSlides,
|
|
471
471
|
maxWeight: e.maxCachedStructuralBytes,
|
|
472
472
|
measure: (e) => ot(e).jsonBytes
|
|
@@ -821,7 +821,7 @@ var X = class e {
|
|
|
821
821
|
_slidePartIndex = null;
|
|
822
822
|
_rawParts = new de({
|
|
823
823
|
maxEntries: 64,
|
|
824
|
-
maxBytes:
|
|
824
|
+
maxBytes: ne
|
|
825
825
|
});
|
|
826
826
|
_googleFonts = null;
|
|
827
827
|
_officeFontLoads = /* @__PURE__ */ new Map();
|
|
@@ -840,7 +840,7 @@ var X = class e {
|
|
|
840
840
|
constructor(e, t, n) {
|
|
841
841
|
this._worker = e, this._mode = t, this._bridge = new He(this._worker, {
|
|
842
842
|
correlate: (e) => "protocol" in e && e.protocol === "ooxml-pull-v1" ? e.requestId : "id" in e ? e.id : void 0,
|
|
843
|
-
toError: (e) => !("protocol" in e) && e.kind === "error" ?
|
|
843
|
+
toError: (e) => !("protocol" in e) && e.kind === "error" ? re(e) : void 0,
|
|
844
844
|
onUnsolicited: (e) => this._onWorkerLayoutPush(e)
|
|
845
845
|
});
|
|
846
846
|
let r = new URL(n ?? Zt, location.href).href;
|
|
@@ -858,10 +858,10 @@ var X = class e {
|
|
|
858
858
|
}
|
|
859
859
|
static async load(t, n = {}) {
|
|
860
860
|
if (n.legacyPpt !== void 0) {
|
|
861
|
-
let { loadPptxModelSource: e } = await import("./presentation-model-source-
|
|
861
|
+
let { loadPptxModelSource: e } = await import("./presentation-model-source-CK6_hY1W.js");
|
|
862
862
|
return e(t, n);
|
|
863
863
|
}
|
|
864
|
-
let r = ae(n.cjkFallback), i =
|
|
864
|
+
let r = ae(n.cjkFallback), i = te(n), a = n.mode ?? "main", o = new w({
|
|
865
865
|
enabled: !0,
|
|
866
866
|
format: "pptx",
|
|
867
867
|
mode: a,
|
|
@@ -878,7 +878,7 @@ var X = class e {
|
|
|
878
878
|
s = await e.arrayBuffer();
|
|
879
879
|
} else s = t;
|
|
880
880
|
s = ee(await y(s, n.password)), o.setSourceBytes(s.byteLength), o.checkpoint("container ready");
|
|
881
|
-
let c = a === "worker" ? (await import("./render-worker-host-
|
|
881
|
+
let c = a === "worker" ? (await import("./render-worker-host-Cj-U3WPe.js")).createRenderWorker() : new Xt(), l = a === "worker" ? it(n) : void 0, u;
|
|
882
882
|
try {
|
|
883
883
|
u = new e(c, a, n.wasmUrl), u._metrics = o, n.math && a === "worker" && !l?.math && console.warn("[ooxml] a custom math renderer cannot cross the worker boundary; equations will be skipped in mode: 'worker'. Use the math renderer from @silurus/ooxml/math."), n.threeD && a === "worker" && !l?.threeD && console.warn("[ooxml] a custom 3-D chart renderer cannot cross the worker boundary; charts use their 2-D family fallback in mode: 'worker'. Use the renderer from @silurus/ooxml/three-d."), u._cjkFallback = r, u._math = a === "worker" ? void 0 : n.math, u._threeD = a === "worker" ? void 0 : n.threeD, n.regionMap && a === "worker" && !l?.regionMap && console.warn("[ooxml] a custom Region Map renderer cannot cross the worker boundary; geospatial charts use the unsupported-chart placeholder in mode: 'worker'. Use the renderer from @silurus/ooxml/region-map."), u._regionMap = a === "worker" ? void 0 : n.regionMap, n.chartEx && a === "worker" && !l?.chartEx && console.warn("[ooxml] a custom ChartEx renderer cannot cross the worker boundary; ChartEx charts use the unsupported-chart placeholder in mode: 'worker'. Use the renderer from @silurus/ooxml/chart-ex."), u._chartEx = a === "worker" ? void 0 : n.chartEx, n.tiff && a === "worker" && !l?.tiff && console.warn("[ooxml] a custom TIFF codec cannot cross the worker boundary; recognized TIFF images will use an unavailable-image placeholder in mode: 'worker'. Use the codec from @silurus/ooxml/tiff to display them."), u._tiff = a === "worker" ? void 0 : n.tiff;
|
|
884
884
|
let t = n.progressiveLayout ? {
|
|
@@ -900,7 +900,7 @@ var X = class e {
|
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
902
|
async _ensureGoogleFonts(e, t) {
|
|
903
|
-
this._destroyed || (this._googleFonts ??= new
|
|
903
|
+
this._destroyed || (this._googleFonts ??= new C(i), await this._googleFonts.ensure(e, t));
|
|
904
904
|
}
|
|
905
905
|
async _parse(e, n, r = !1, i, a, o, l) {
|
|
906
906
|
if (l) {
|
|
@@ -959,7 +959,7 @@ var X = class e {
|
|
|
959
959
|
this._preflight = c(m.preflight), this._availableSlideCount = this._preflight.slideCount, this._slides = new Ut({
|
|
960
960
|
slideCount: this._preflight.slideCount,
|
|
961
961
|
maxCachedSlides: 8,
|
|
962
|
-
maxCachedStructuralBytes:
|
|
962
|
+
maxCachedStructuralBytes: fe,
|
|
963
963
|
loadSlide: async (e) => {
|
|
964
964
|
let t = await this._slidePullClient?.load(e, !0, i);
|
|
965
965
|
if (!t) throw Error("PPTX slide pull client is unavailable");
|
|
@@ -983,7 +983,7 @@ var X = class e {
|
|
|
983
983
|
l.catch(() => void 0), this._slidePullClient = this._createSlidePullClient(c.slideCount, i, a), this._slides = new Ut({
|
|
984
984
|
slideCount: c.slideCount,
|
|
985
985
|
maxCachedSlides: 8,
|
|
986
|
-
maxCachedStructuralBytes:
|
|
986
|
+
maxCachedStructuralBytes: fe,
|
|
987
987
|
loadSlide: async (e) => {
|
|
988
988
|
let t = await this._slidePullClient?.load(e, !0, i);
|
|
989
989
|
if (!t) throw Error("PPTX slide pull client is unavailable");
|
|
@@ -1179,7 +1179,7 @@ var X = class e {
|
|
|
1179
1179
|
};
|
|
1180
1180
|
let n = Gt(e, this._embeddedFontTuples), r = this._officeFontLoads.get(t);
|
|
1181
1181
|
r || (r = /* @__PURE__ */ new Map(), this._officeFontLoads.set(t, r));
|
|
1182
|
-
let i = await zt(r, n, (e) =>
|
|
1182
|
+
let i = await zt(r, n, (e) => le(e, t), t);
|
|
1183
1183
|
if (this._destroyed) throw Error("Presentation destroyed");
|
|
1184
1184
|
return i;
|
|
1185
1185
|
}
|
|
@@ -1246,7 +1246,7 @@ var X = class e {
|
|
|
1246
1246
|
try {
|
|
1247
1247
|
if (t.onTextRun) for (let e of a.runs) t.onTextRun(e);
|
|
1248
1248
|
} catch (e) {
|
|
1249
|
-
throw
|
|
1249
|
+
throw ie(a.bitmap), e;
|
|
1250
1250
|
}
|
|
1251
1251
|
return a.bitmap;
|
|
1252
1252
|
}
|
|
@@ -1368,7 +1368,7 @@ var X = class e {
|
|
|
1368
1368
|
async getResourceMetrics() {
|
|
1369
1369
|
let e = this._metrics;
|
|
1370
1370
|
if (!e) throw Error("Presentation not loaded");
|
|
1371
|
-
return
|
|
1371
|
+
return x(e, async (e) => (await this._bridge.request((e) => ({
|
|
1372
1372
|
kind: "resourceUsage",
|
|
1373
1373
|
id: e
|
|
1374
1374
|
}), void 0, { timeoutMs: e })).usage);
|
|
@@ -1405,7 +1405,7 @@ var X = class e {
|
|
|
1405
1405
|
if (!t) throw Error("2D context not available");
|
|
1406
1406
|
t.drawImage(a, 0, 0);
|
|
1407
1407
|
} finally {
|
|
1408
|
-
|
|
1408
|
+
ie(a);
|
|
1409
1409
|
}
|
|
1410
1410
|
} : () => this.renderSlide(e, t, {
|
|
1411
1411
|
width: i,
|
|
@@ -1430,8 +1430,8 @@ var X = class e {
|
|
|
1430
1430
|
}
|
|
1431
1431
|
destroy() {
|
|
1432
1432
|
this._destroyed = !0, this._clearProgressiveWatchdog(), this._slidePullClient?.cancelAll(), this._bridge.terminate(), this._slides?.clear(), this._slides = null, this._slidePullClient = null, this._bootstrap = null, this._preflight = null, this._availableSlideCount = 0, this._layoutLifecycle.succeed(), this._layoutCompletion = null, this._progressive = null, this._parseRequestId = null, this._wakeLayoutWaiters(), this._resourceFailure = null, this._slidePartIndex = null, this._rawParts.clear(), this._googleFonts?.release(), this._googleFonts = null;
|
|
1433
|
-
for (let e of this._officeFontLoads.values()) for (let t of Ht(e)) t.then((e) =>
|
|
1434
|
-
this._officeFontLoads.clear(), this._embeddedFontFaces.length > 0 && (k(this._embeddedFontFaces), this._embeddedFontFaces = []), this._embeddedFontAliases = /* @__PURE__ */ new Map(), this._embeddedFontAuthoredFamilies = /* @__PURE__ */ new Map(), this._embeddedFontTuples = /* @__PURE__ */ new Set(),
|
|
1433
|
+
for (let e of this._officeFontLoads.values()) for (let t of Ht(e)) t.then((e) => ue(e.faces));
|
|
1434
|
+
this._officeFontLoads.clear(), this._embeddedFontFaces.length > 0 && (k(this._embeddedFontFaces), this._embeddedFontFaces = []), this._embeddedFontAliases = /* @__PURE__ */ new Map(), this._embeddedFontAuthoredFamilies = /* @__PURE__ */ new Map(), this._embeddedFontTuples = /* @__PURE__ */ new Set(), oe(this._fetchImage), se(this._fetchImage);
|
|
1435
1435
|
}
|
|
1436
1436
|
};
|
|
1437
1437
|
function fn(e, t, n, r, i = {}) {
|
|
@@ -2211,7 +2211,7 @@ var vn = class {
|
|
|
2211
2211
|
}
|
|
2212
2212
|
}, xn = 12, Sn;
|
|
2213
2213
|
function Cn() {
|
|
2214
|
-
return Sn ??= import("./comment-ui-runtime-
|
|
2214
|
+
return Sn ??= import("./comment-ui-runtime-CYkt_9-b.js");
|
|
2215
2215
|
}
|
|
2216
2216
|
var wn = 440, Tn = 20, En = Symbol("PptxScrollViewer.borrowedPresentation"), Dn = class e {
|
|
2217
2217
|
_presentationOwner;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as e } from "./slide-pull-client-
|
|
1
|
+
import { t as e } from "./slide-pull-client-3mJmNjjB.js";
|
|
2
2
|
import { wo as t } from "./plot-area-frame-DNYMd9Pf.js";
|
|
3
|
-
import { G as n,
|
|
3
|
+
import { G as n, Sn as r, U as i, en as a, ft as o, lt as s, t as c } from "./bounded-raw-part-cache-D2Q0FIoE.js";
|
|
4
4
|
import { n as l } from "./abort-JztSoyw2.js";
|
|
5
5
|
import { n as u, r as d, t as f } from "./wasm-loader-KAOyLXzf.js";
|
|
6
|
-
import { i as p, n as m, r as h } from "./session-
|
|
6
|
+
import { i as p, n as m, r as h } from "./session-D5au4i-W.js";
|
|
7
7
|
import { t as g } from "./in-process-pull-transport-BPJ7M0uC.js";
|
|
8
8
|
import { n as _ } from "./pptx-parsed-slides-BMGr4khe.js";
|
|
9
9
|
var v = "PPTX presentation session was aborted", y = f(() => u(import.meta.url, "pptx_parser_bg.wasm", "@silurus/ooxml-pptx/wasm-binary"));
|
|
@@ -12,10 +12,10 @@ async function b(e, t = {}) {
|
|
|
12
12
|
}
|
|
13
13
|
async function x(e, t = {}) {
|
|
14
14
|
if (t.legacyPpt !== void 0) {
|
|
15
|
-
let { openPptxSource: n } = await import("./pptx-model-source-
|
|
15
|
+
let { openPptxSource: n } = await import("./pptx-model-source-mg-O0LR9.js");
|
|
16
16
|
return n(e, t, y);
|
|
17
17
|
}
|
|
18
|
-
let n =
|
|
18
|
+
let n = a(t.cjkFallback), r = await m(w(e), y(), t);
|
|
19
19
|
return new S(r.closeArchive, r.archive, r.bootstrap, r.metrics, t.signal, n);
|
|
20
20
|
}
|
|
21
21
|
var S = class {
|
|
@@ -41,9 +41,9 @@ var S = class {
|
|
|
41
41
|
renderTail = Promise.resolve();
|
|
42
42
|
fetchImage = (e, t) => this.getPartInternal(e, t, (t) => t.extract_image(e));
|
|
43
43
|
fetchMedia = (e) => this.getPartInternal(e, "application/octet-stream", (t) => t.extract_media(e));
|
|
44
|
-
rawParts = new
|
|
44
|
+
rawParts = new c({
|
|
45
45
|
maxEntries: 64,
|
|
46
|
-
maxBytes:
|
|
46
|
+
maxBytes: r
|
|
47
47
|
});
|
|
48
48
|
constructor(t, n, r, i, a, o, s = !0) {
|
|
49
49
|
this.closeArchive = t, this.archive = n, this.bootstrap = r, this.metrics = i, this.signal = a, this.cjkFallback = o, this.parsedTextChain = s, this.slideCount = r.slideCount, this.slideWidth = r.slideWidth, this.slideHeight = r.slideHeight, this.slidePull = new h(() => this.archive), this.transport = new g((e, t) => this.slidePull.dispatchSafely(e, t), () => void 0), this.slideClient = new e({
|
|
@@ -81,7 +81,7 @@ var S = class {
|
|
|
81
81
|
async renderSlide(e, t, n) {
|
|
82
82
|
return this.assertOpen(), this.enqueueRender(async () => {
|
|
83
83
|
l(this.signal, v);
|
|
84
|
-
let { renderSlideNode: r } = await import("./render-
|
|
84
|
+
let { renderSlideNode: r } = await import("./render-C7F07FrC.js").then((e) => e.i);
|
|
85
85
|
await r(e, {
|
|
86
86
|
slideWidth: this.slideWidth,
|
|
87
87
|
slideHeight: this.slideHeight,
|
|
@@ -129,7 +129,7 @@ var S = class {
|
|
|
129
129
|
}
|
|
130
130
|
async release() {
|
|
131
131
|
let e;
|
|
132
|
-
await this.renderTail,
|
|
132
|
+
await this.renderTail, o(this.fetchImage), s(this.fetchImage);
|
|
133
133
|
try {
|
|
134
134
|
await this.slidePull.reset();
|
|
135
135
|
} catch (t) {
|
|
@@ -157,7 +157,7 @@ var S = class {
|
|
|
157
157
|
}
|
|
158
158
|
refreshResourceUsage() {
|
|
159
159
|
try {
|
|
160
|
-
this.usage =
|
|
160
|
+
this.usage = i(this.archive.resource_usage()), this.metrics.observeUsage(this.usage);
|
|
161
161
|
} catch {}
|
|
162
162
|
return this.usage;
|
|
163
163
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as t } from "./session-
|
|
3
|
-
import { t as n } from "./pptx-
|
|
4
|
-
import { t as r } from "./model-source-
|
|
1
|
+
import { en as e } from "./bounded-raw-part-cache-D2Q0FIoE.js";
|
|
2
|
+
import { n as t } from "./session-D5au4i-W.js";
|
|
3
|
+
import { t as n } from "./pptx-CQtPbMxI.js";
|
|
4
|
+
import { t as r } from "./model-source-DksDDVb4.js";
|
|
5
5
|
async function i(t, r, i) {
|
|
6
6
|
let o = await a(t, r, i), s = new Proxy(o.archive, { get(e, t) {
|
|
7
7
|
if (t === "extract_media" && !e.extract_media) return () => {
|
|
@@ -13,7 +13,7 @@ async function i(t, r, i) {
|
|
|
13
13
|
return new n(o.closeArchive, s, o.bootstrap, o.metrics, r.signal, e(r.cjkFallback), o.parsedTextChain);
|
|
14
14
|
}
|
|
15
15
|
async function a(e, n, i) {
|
|
16
|
-
let { acquirePptxSessionFromArchive: a, validatePptxModelSourceArchive: o, validatePptxModelSourceViewDefaults: s } = await import("./model-source-session-
|
|
16
|
+
let { acquirePptxSessionFromArchive: a, validatePptxModelSourceArchive: o, validatePptxModelSourceViewDefaults: s } = await import("./model-source-session-8wqlNxsQ.js"), c = await r(e, "pptx", {
|
|
17
17
|
...n,
|
|
18
18
|
source: n.legacyPpt
|
|
19
19
|
}, o);
|
package/dist/pptx.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as e } from "./slide-pull-client-
|
|
1
|
+
import { l as e } from "./slide-pull-client-3mJmNjjB.js";
|
|
2
2
|
import { Co as t, wo as n } from "./plot-area-frame-DNYMd9Pf.js";
|
|
3
|
-
import { p as r } from "./bounded-raw-part-cache-
|
|
3
|
+
import { p as r } from "./bounded-raw-part-cache-D2Q0FIoE.js";
|
|
4
4
|
import { f as i, u as a } from "./pixel-budget-DI82Hn3R.js";
|
|
5
5
|
import { i as o, t as s } from "./tiff-contract-DEd8CGuz.js";
|
|
6
|
-
import { D as c } from "./canvas-viewer-mechanics-
|
|
7
|
-
import { a as l, c as u, i as d, l as f, n as p, o as m } from "./pptx-
|
|
6
|
+
import { D as c } from "./canvas-viewer-mechanics-_ZBxW_sN.js";
|
|
7
|
+
import { a as l, c as u, i as d, l as f, n as p, o as m } from "./pptx-Bons7t3Y.js";
|
|
8
8
|
export { a as OoxmlDecodedImageLimitError, t as OoxmlError, n as OoxmlResourceLimitError, m as PptxPresentation, p as PptxScrollViewer, d as PptxViewer, s as TiffDecodeError, c as autoResize, u as buildPptxHighlightLayer, f as buildPptxTextLayer, i as isOoxmlDecodedImageLimitError, o as isTiffDecodeError, r as openExternalHyperlink, l as readPptxTextSelectionContext, e as renderSlide };
|
package/dist/{presentation-model-source-DLNioq7T.js → presentation-model-source-CK6_hY1W.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as e, P as t,
|
|
2
|
-
import { b as r } from "./comment-overlay-controller-
|
|
3
|
-
import { T as i } from "./canvas-viewer-mechanics-
|
|
1
|
+
import { I as e, P as t, en as n } from "./bounded-raw-part-cache-D2Q0FIoE.js";
|
|
2
|
+
import { b as r } from "./comment-overlay-controller-CVvQCYhQ.js";
|
|
3
|
+
import { T as i } from "./canvas-viewer-mechanics-_ZBxW_sN.js";
|
|
4
4
|
import { n as a } from "./renderer-module-contract-BuTx2FWJ.js";
|
|
5
|
-
import { o, s } from "./pptx-
|
|
5
|
+
import { o, s } from "./pptx-Bons7t3Y.js";
|
|
6
6
|
import { n as c, o as l, r as u } from "./model-source-COXegBNA.js";
|
|
7
7
|
import { t as d } from "./bundled-asset-url-BMJ8vNHP.js";
|
|
8
8
|
async function f(u, d) {
|
|
@@ -30,7 +30,7 @@ async function f(u, d) {
|
|
|
30
30
|
let _ = c(t, "pptx");
|
|
31
31
|
try {
|
|
32
32
|
g.setSourceBytes(e.byteLength), g.checkpoint("container ready");
|
|
33
|
-
let t = f === "worker" ? (await import("./render-worker-host-
|
|
33
|
+
let t = f === "worker" ? (await import("./render-worker-host-Cj-U3WPe.js")).createRenderWorker() : new (await (import("./worker-source-ZQE9C1j6.js"))).default(), c = p(t, _), l = f === "worker" ? a(d) : void 0, u;
|
|
34
34
|
try {
|
|
35
35
|
u = new o(c, f, d.wasmUrl);
|
|
36
36
|
let t = u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./chunk-D5OxutzX.js";
|
|
2
|
-
import {
|
|
2
|
+
import { en as t } from "./bounded-raw-part-cache-D2Q0FIoE.js";
|
|
3
3
|
import { t as n } from "./pptx-parsed-slides-BMGr4khe.js";
|
|
4
4
|
var r = /* @__PURE__ */ e({
|
|
5
5
|
installImageBitmapShim: () => o,
|
|
@@ -47,7 +47,7 @@ function s(e, t) {
|
|
|
47
47
|
return i = r.then(() => void 0, () => void 0), r;
|
|
48
48
|
}
|
|
49
49
|
async function c(e, r, i, a = {}) {
|
|
50
|
-
let o = t(a.cjkFallback), { renderSlideWithEmbeddedFonts: c } = await import("./session-
|
|
50
|
+
let o = t(a.cjkFallback), { renderSlideWithEmbeddedFonts: c } = await import("./session-D5au4i-W.js").then((e) => e.t), l = r.slides[i];
|
|
51
51
|
if (!l) throw Error(`Slide index ${i} out of range`);
|
|
52
52
|
let u = a.width ?? 960, d = a.dpr ?? 2, f = a.fetchImage ?? (async () => new Blob([])), p = async () => {
|
|
53
53
|
await c(e, l, r.slideWidth, r.slideHeight, {
|