@silurus/ooxml 0.75.0 → 0.75.1
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/{document-pull-client-H80_E10V.js → document-pull-client-wKcG6wym.js} +2 -2
- package/dist/{docx-BX0mJqS1.js → docx-FjTWCu8A.js} +3 -3
- package/dist/docx.mjs +1 -1
- package/dist/{duotone-bitmap-by-path-Dv5Ikbzl.js → duotone-bitmap-by-path-yvUnNu8c.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{line-distribute-DkLgIa7B.js → line-distribute-DNrLg-YD.js} +1 -1
- package/dist/{line-metrics-qwIyTk7Q.js → line-metrics-CeZifII_.js} +3 -7
- package/dist/node.mjs +3 -3
- package/dist/{pptx-BEYjiTnZ.js → pptx-Dgq7pjSp.js} +1 -1
- package/dist/{pptx-CXgyi7wu.js → pptx-G6qPHXg7.js} +3 -3
- package/dist/pptx.mjs +2 -2
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{render-C0wMf5eT.js → render-DGuTuWpY.js} +2 -2
- package/dist/render-worker-host-CdAc6W03.js +27 -0
- package/dist/render-worker-host-CiCutFYa.js +27 -0
- package/dist/render-worker-host-DQXzSGiU.js +27 -0
- package/dist/{renderer-CwzTv9hH.js → renderer-BLjFCwvM.js} +385 -385
- package/dist/types/index.d.ts +2 -4
- package/dist/types/xlsx.d.ts +2 -4
- package/dist/{xlsx-DJyPlzjB.js → xlsx-xK5hP7XO.js} +45 -48
- package/dist/xlsx.mjs +1 -1
- package/package.json +1 -1
- package/dist/render-worker-host-CLdOlxFu.js +0 -27
- package/dist/render-worker-host-DZ4u0RFs.js +0 -27
- package/dist/render-worker-host-s3J-mWBP.js +0 -27
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { A as e, j as t, m as n, p as r, r as i } from "./bounded-raw-part-cache-BTfZD_Sz.js";
|
|
2
2
|
import { a, i as o, o as s, t as c } from "./preload-BEouWnlI.js";
|
|
3
3
|
import { _ as l, a as u, b as d, g as f, h as p, l as m, n as h, r as g, s as _, v, x as y, y as b } from "./svg-image-by-path-C1M3N2pT.js";
|
|
4
|
-
import { a as x, c as S, i as C, l as w, n as T, o as E, r as D, s as O, t as k, u as A } from "./line-distribute-
|
|
5
|
-
import { $ as j, A as M, B as N, C as ee, D as te, E as P, F as ne, G as F, H as re, I as ie, K as ae, M as oe, N as se, O as ce, P as le, T as ue, V as de, W as fe, X as pe, Y as me, Z as he, a as ge, b as _e, c as I, d as ve, et as ye, f as be, g as xe, h as Se, i as Ce, j as we, k as L, l as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, w as Ne, x as Pe, y as Fe } from "./line-metrics-
|
|
4
|
+
import { a as x, c as S, i as C, l as w, n as T, o as E, r as D, s as O, t as k, u as A } from "./line-distribute-DNrLg-YD.js";
|
|
5
|
+
import { $ as j, A as M, B as N, C as ee, D as te, E as P, F as ne, G as F, H as re, I as ie, K as ae, M as oe, N as se, O as ce, P as le, T as ue, V as de, W as fe, X as pe, Y as me, Z as he, a as ge, b as _e, c as I, d as ve, et as ye, f as be, g as xe, h as Se, i as Ce, j as we, k as L, l as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, w as Ne, x as Pe, y as Fe } from "./line-metrics-CeZifII_.js";
|
|
6
6
|
import { t as Ie } from "./mathjax-Dqo857oC.js";
|
|
7
7
|
//#region packages/core/src/fonts/canvas-route.ts
|
|
8
8
|
function Le(e, t) {
|
|
@@ -2,9 +2,9 @@ import { t as e } from "./chunk-DmhlhrBa.js";
|
|
|
2
2
|
import { E as t, M as n, N as r, _ as i, c as a, l as o, t as s, u as c } from "./bounded-raw-part-cache-BTfZD_Sz.js";
|
|
3
3
|
import { a as l, c as u, d, f, h as p, i as m, l as h, m as g, n as _, o as v, p as y, r as b, s as x, t as ee, u as te } from "./find-cursor-Dc5iM6s7.js";
|
|
4
4
|
import { a as S, i as C, n as w, o as T, r as E, t as D } from "./preload-BEouWnlI.js";
|
|
5
|
-
import { a as ne, d as re, f as ie, g as ae, h as oe, i as se, l as ce, m as O, n as k, o as le, p as ue, r as de, s as A, t as j, u as M } from "./document-pull-client-
|
|
5
|
+
import { a as ne, d as re, f as ie, g as ae, h as oe, i as se, l as ce, m as O, n as k, o as le, p as ue, r as de, s as A, t as j, u as M } from "./document-pull-client-wKcG6wym.js";
|
|
6
6
|
import { f as N, i as P, p as F, t as I } from "./svg-image-by-path-C1M3N2pT.js";
|
|
7
|
-
import { M as L, ct as R } from "./line-metrics-
|
|
7
|
+
import { M as L, ct as R } from "./line-metrics-CeZifII_.js";
|
|
8
8
|
import { n as z, r as B, t as V } from "./highlight-rect-cCvVU-MW.js";
|
|
9
9
|
import { r as H } from "./hyperlink-D85FexTa.js";
|
|
10
10
|
//#region packages/core/src/fonts/embedded.ts
|
|
@@ -166,7 +166,7 @@ var K = class e {
|
|
|
166
166
|
a = await e.arrayBuffer();
|
|
167
167
|
} else a = t;
|
|
168
168
|
a = p(await g(a, n.password)), s.setSourceBytes(a.byteLength), s.checkpoint("container ready");
|
|
169
|
-
let c = o === "worker" ? (await import("./render-worker-host-
|
|
169
|
+
let c = o === "worker" ? (await import("./render-worker-host-CiCutFYa.js")).createRenderWorker() : new _e(), l;
|
|
170
170
|
try {
|
|
171
171
|
if (l = new e(c, o, i, n.wasmUrl), l._metrics = s, await l._parse(a, r.policy, o === "worker" ? !!n.useGoogleFonts : !1, n.workerTimeoutMs, (e) => s.observeUsage(e)), o === "worker" && l._mode === "main" && (s.setMode("main"), console.warn("[ooxml] mode: 'worker' fell back to main-thread rendering because this document requires DOM OpenType vertical glyph selection.")), n.math && l._mode === "worker" && console.warn("[ooxml] the math engine is unavailable in mode: 'worker'; equations will be skipped. Use mode: 'main' for documents with equations."), l._mode === "main" && n.useGoogleFonts && l._document && (l._googleFontFaces = await w(re(l._document), M)), l._mode === "main" && l._document?.embeddedFonts?.length) {
|
|
172
172
|
let e = l;
|
package/dist/docx.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { M as e, N as t } from "./bounded-raw-part-cache-BTfZD_Sz.js";
|
|
2
2
|
import { p as n } from "./find-cursor-Dc5iM6s7.js";
|
|
3
|
-
import { a as r, i, n as a, o, r as s, s as c } from "./docx-
|
|
3
|
+
import { a as r, i, n as a, o, r as s, s as c } from "./docx-FjTWCu8A.js";
|
|
4
4
|
import { f as l, p as u } from "./svg-image-by-path-C1M3N2pT.js";
|
|
5
5
|
import { r as d } from "./hyperlink-D85FexTa.js";
|
|
6
6
|
export { c as DocxDocument, s as DocxScrollViewer, i as DocxViewer, l as OoxmlDecodedImageLimitError, e as OoxmlError, t as OoxmlResourceLimitError, n as autoResize, r as buildDocxHighlightLayer, o as buildDocxTextLayer, u as isOoxmlDecodedImageLimitError, a as noteText, d as openExternalHyperlink };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, s as t } from "./svg-image-by-path-C1M3N2pT.js";
|
|
2
|
-
import { I as n, V as r } from "./line-metrics-
|
|
2
|
+
import { I as n, V as r } from "./line-metrics-CeZifII_.js";
|
|
3
3
|
//#region packages/core/src/image/duotone-bitmap-by-path.ts
|
|
4
4
|
function i(e, t) {
|
|
5
5
|
return t ? `${e}|duo:${t.clr1}:${t.clr2}` : e;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./docx-
|
|
2
|
-
import { t } from "./xlsx-
|
|
3
|
-
import { t as n } from "./pptx-
|
|
1
|
+
import { t as e } from "./docx-FjTWCu8A.js";
|
|
2
|
+
import { t } from "./xlsx-xK5hP7XO.js";
|
|
3
|
+
import { t as n } from "./pptx-G6qPHXg7.js";
|
|
4
4
|
export { e as docx, n as pptx, t as xlsx };
|
|
@@ -84,12 +84,8 @@ function m(e, t, n, r, s, c, u) {
|
|
|
84
84
|
if (!i) throw Error("computeChartFrame: cartesian frame requires params.pad");
|
|
85
85
|
let a = u.honorPlotAreaManualLayout ? e.plotAreaManualLayout : null;
|
|
86
86
|
if (a && a.w != null && a.h != null) {
|
|
87
|
-
let e = t + a.x * r,
|
|
88
|
-
|
|
89
|
-
h = Math.max(e, t + i.l), g = Math.max(o, n + i.t);
|
|
90
|
-
let a = Math.min(c, t + r - i.r), u = Math.min(l, n + s - i.b);
|
|
91
|
-
_ = Math.max(0, a - h), v = Math.max(0, u - g);
|
|
92
|
-
} else h = e, g = o, _ = a.w * r, v = a.h * s;
|
|
87
|
+
let e = t + a.x * r, i = n + a.y * s;
|
|
88
|
+
h = e, g = i, _ = a.w * r, v = a.h * s;
|
|
93
89
|
} else h = t + i.l, g = n + i.t, _ = r - i.l - i.r, v = s - i.t - i.b;
|
|
94
90
|
}
|
|
95
91
|
return {
|
|
@@ -1440,7 +1436,7 @@ function it(e, t, n, r, i, a, o, s, c, l = !1) {
|
|
|
1440
1436
|
function at(e, t, n, r) {
|
|
1441
1437
|
let { x: i, y: s, w: c, h: u } = n, d = t.chartType === "clusteredBarH" || t.chartType === "stackedBarH" || t.chartType === "stackedBarHPct", h = t.chartType.startsWith("stacked"), g = t.chartType === "stackedBarPct" || t.chartType === "stackedBarHPct", _ = t.series.filter((e) => e.seriesType !== "line"), v = t.series.filter((e) => e.seriesType === "line"), y = !d && t.secondaryValAxis && v.some((e) => e.useSecondaryAxis === !0) ? t.secondaryValAxis : null, b = rt(t), x = b.length;
|
|
1442
1438
|
if (x === 0) return;
|
|
1443
|
-
let S = Se(t), C = f(t, u, r), w = C.fontPx, T = C.topPad, E = C.bandH, D = Ye(t.catAxisFontSizeHpt, u, r), k = Ye(t.valAxisFontSizeHpt, u, r), j = a(t, c, u, .22), { legRightW: M, legLeftW: N, legTopH: P, legBottomH: F } = o(j), I = l(t, c, u, r), ee = I.catFontPx, te = I.valFontPx, re = I.catBandH, R = I.valBandW, ie = E + P + k / 2 + 2, ae = d ? (t.valAxisHidden ? u * .02 : p(k)) + re + F : p(D) + re + F, oe = u - ie - ae, z = d ? c - ((t.catAxisHidden ? c * .03 : c * .22) + R + N) - (M + c * .03) : 0, ce = (d ? z : oe) / r, B = 0, V = 0;
|
|
1439
|
+
let S = Se(t), C = f(t, u, r), w = C.fontPx, T = C.topPad, E = C.bandH, D = Ye(t.catAxisFontSizeHpt, u, r), k = Ye(t.valAxisFontSizeHpt, u, r), j = a(t, c, u, .22), { legRightW: M, legLeftW: N, legTopH: P, legBottomH: F } = o(j), I = l(t, c, u, r), ee = I.catFontPx, te = I.valFontPx, re = I.catBandH, R = I.valBandW, ie = E + P + k / 2 + 2, ae = d ? (t.valAxisHidden ? u * .02 : p(k)) + re + F : p(D) + re + F, oe = u - ie - ae, z = d ? c - ((t.catAxisHidden ? c * .03 : c * .22) + R + N) - (M + c * .03) : 0, ce = t.valAxisHidden ? void 0 : (d ? z : oe) / r, B = 0, V = 0;
|
|
1444
1440
|
for (let e = 0; e < x; e++) {
|
|
1445
1441
|
let t = 0, n = 0;
|
|
1446
1442
|
for (let r of _) {
|
package/dist/node.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as e } from "./chunk-DmhlhrBa.js";
|
|
2
2
|
import { D as t, N as n, O as r, T as i, a, c as o, f as s, i as c, k as l, m as u, o as d, p as f, r as p, u as m } from "./bounded-raw-part-cache-BTfZD_Sz.js";
|
|
3
|
-
import { c as h, n as ee, o as g, r as te, s as ne } from "./document-pull-client-
|
|
3
|
+
import { c as h, n as ee, o as g, r as te, s as ne } from "./document-pull-client-wKcG6wym.js";
|
|
4
4
|
import { f as re, i as _, p as ie, t as ae } from "./svg-image-by-path-C1M3N2pT.js";
|
|
5
5
|
import { t as oe } from "./transfer-3QEJrsJa.js";
|
|
6
6
|
import { d as se, n as ce, t as le, u as ue } from "./worksheet-pull-worker-DCei8u-4.js";
|
|
7
|
-
import { c as de, i as fe, n as pe, o as me, r as he, s as ge, t as _e } from "./pptx-
|
|
8
|
-
import { i as ve, n as ye, o as be, r as xe, t as Se } from "./render-
|
|
7
|
+
import { c as de, i as fe, n as pe, o as me, r as he, s as ge, t as _e } from "./pptx-Dgq7pjSp.js";
|
|
8
|
+
import { i as ve, n as ye, o as be, r as xe, t as Se } from "./render-DGuTuWpY.js";
|
|
9
9
|
//#region packages/docx/src/document-pull-worker.ts
|
|
10
10
|
var Ce = Math.max(f, u), we = class {
|
|
11
11
|
coordinator = new d();
|
|
@@ -716,7 +716,7 @@ var Ce = class {
|
|
|
716
716
|
async renderSlide(e, t, n) {
|
|
717
717
|
return this.assertOpen(), this.enqueueRender(async () => {
|
|
718
718
|
$(this.signal);
|
|
719
|
-
let { renderSlideNode: r } = await import("./render-
|
|
719
|
+
let { renderSlideNode: r } = await import("./render-DGuTuWpY.js").then((e) => e.a);
|
|
720
720
|
await r(e, {
|
|
721
721
|
slideWidth: this.slideWidth,
|
|
722
722
|
slideHeight: this.slideHeight,
|
|
@@ -3,8 +3,8 @@ import { D as t, E as n, M as r, N as i, _ as a, c as o, h as s, l as c, n as l,
|
|
|
3
3
|
import { a as f, c as p, d as m, f as h, h as g, i as _, l as v, m as y, n as b, o as x, p as S, r as C, s as w, t as ee, u as te } from "./find-cursor-Dc5iM6s7.js";
|
|
4
4
|
import { n as ne, r as re } from "./preload-BEouWnlI.js";
|
|
5
5
|
import { f as ie, i as ae, p as oe, t as se } from "./svg-image-by-path-C1M3N2pT.js";
|
|
6
|
-
import { M as T, N as ce, st as E } from "./line-metrics-
|
|
7
|
-
import { r as D, t as O } from "./renderer-
|
|
6
|
+
import { M as T, N as ce, st as E } from "./line-metrics-CeZifII_.js";
|
|
7
|
+
import { r as D, t as O } from "./renderer-BLjFCwvM.js";
|
|
8
8
|
import { n as le, r as k, t as ue } from "./visible-index-CKvgpUrf.js";
|
|
9
9
|
import { n as de, r as A, t as j } from "./highlight-rect-cCvVU-MW.js";
|
|
10
10
|
import { r as M } from "./hyperlink-D85FexTa.js";
|
|
@@ -604,7 +604,7 @@ var Re = new URL("pptx_parser_bg.wasm", import.meta.url).href, $ = class e {
|
|
|
604
604
|
o = await e.arrayBuffer();
|
|
605
605
|
} else o = t;
|
|
606
606
|
o = g(await y(o, n.password)), a.setSourceBytes(o.byteLength), a.checkpoint("container ready");
|
|
607
|
-
let s = i === "worker" ? (await import("./render-worker-host-
|
|
607
|
+
let s = i === "worker" ? (await import("./render-worker-host-CdAc6W03.js")).createRenderWorker() : new Le(), c;
|
|
608
608
|
try {
|
|
609
609
|
return c = new e(s, i, n.wasmUrl), c._metrics = a, n.math && i === "worker" && console.warn("[ooxml] the math engine is unavailable in mode: 'worker'; equations will be skipped. Use mode: 'main' for documents with equations."), c._math = i === "worker" ? void 0 : n.math, await c._parse(o, r.policy, i === "worker" ? !!n.useGoogleFonts : !1, n.workerTimeoutMs, (e) => a.observeUsage(e)), a.checkpoint("presentation preflight ready"), i === "main" && n.useGoogleFonts && c._preflight && (c._googleFontFaces = await ne(c._preflight.fontPreloadNames, me)), a.succeed({ slides: c.slideCount }), c;
|
|
610
610
|
} catch (e) {
|
package/dist/pptx.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M as e, N as t } from "./bounded-raw-part-cache-BTfZD_Sz.js";
|
|
2
2
|
import { p as n } from "./find-cursor-Dc5iM6s7.js";
|
|
3
3
|
import { f as r, p as i } from "./svg-image-by-path-C1M3N2pT.js";
|
|
4
|
-
import { t as a } from "./renderer-
|
|
5
|
-
import { a as o, i as s, n as c, o as l, r as u } from "./pptx-
|
|
4
|
+
import { t as a } from "./renderer-BLjFCwvM.js";
|
|
5
|
+
import { a as o, i as s, n as c, o as l, r as u } from "./pptx-G6qPHXg7.js";
|
|
6
6
|
import { r as d } from "./hyperlink-D85FexTa.js";
|
|
7
7
|
export { r as OoxmlDecodedImageLimitError, e as OoxmlError, t as OoxmlResourceLimitError, s as PptxPresentation, c as PptxScrollViewer, u as PptxViewer, n as autoResize, o as buildPptxHighlightLayer, l as buildPptxTextLayer, i as isOoxmlDecodedImageLimitError, d as openExternalHyperlink, a as renderSlide };
|
package/dist/pptx_parser_bg.wasm
CHANGED
|
Binary file
|
|
@@ -45,12 +45,12 @@ function a(e, t) {
|
|
|
45
45
|
}
|
|
46
46
|
function o(e, t) {
|
|
47
47
|
return async (n, r) => {
|
|
48
|
-
let { extractImage: i } = await import("./pptx-
|
|
48
|
+
let { extractImage: i } = await import("./pptx-Dgq7pjSp.js").then((e) => e.a), a = i(e, n, t);
|
|
49
49
|
return new Blob([new Uint8Array(a).slice()], { type: r });
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
async function s(e, t, n, r = {}) {
|
|
53
|
-
let { renderSlide: i } = await import("./renderer-
|
|
53
|
+
let { renderSlide: i } = await import("./renderer-BLjFCwvM.js").then((e) => e.n), s = t.slides[n];
|
|
54
54
|
if (!s) throw Error(`Slide index ${n} out of range`);
|
|
55
55
|
let c = r.width ?? 960, l = r.dpr ?? 2, u = r.fetchImage ?? (r.sourceBuffer ? o(r.sourceBuffer, r.maxZipEntryBytes) : async () => new Blob([])), d = async () => {
|
|
56
56
|
await i(e, s, t.slideWidth, t.slideHeight, {
|