@silurus/ooxml 0.75.0 → 0.75.2
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-B3O6_k48.js} +4149 -3891
- package/dist/{docx-BX0mJqS1.js → docx-B8xQ48Q-.js} +3 -3
- package/dist/docx.mjs +1 -1
- package/dist/{duotone-bitmap-by-path-Dv5Ikbzl.js → duotone-bitmap-by-path-D4mAC2FR.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{line-distribute-DkLgIa7B.js → line-distribute-BHeDP03S.js} +1 -1
- package/dist/{line-metrics-qwIyTk7Q.js → line-metrics-EFT-W2Au.js} +8 -7
- package/dist/node.mjs +3 -3
- package/dist/{pptx-BEYjiTnZ.js → pptx-Bjf_CgIh.js} +1 -1
- package/dist/{pptx-CXgyi7wu.js → pptx-DQqAbp3d.js} +3 -3
- package/dist/pptx.mjs +2 -2
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{render-C0wMf5eT.js → render-BcebVCOq.js} +2 -2
- package/dist/render-worker-host-CsB-dPJv.js +27 -0
- package/dist/render-worker-host-SvqV_Z6M.js +27 -0
- package/dist/render-worker-host-vEEGCzB3.js +27 -0
- package/dist/{renderer-CwzTv9hH.js → renderer-C3LQln2P.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-Ca8qcow5.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
|
@@ -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-B3O6_k48.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-EFT-W2Au.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-SvqV_Z6M.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-B8xQ48Q-.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-EFT-W2Au.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-B8xQ48Q-.js";
|
|
2
|
+
import { t } from "./xlsx-Ca8qcow5.js";
|
|
3
|
+
import { t as n } from "./pptx-DQqAbp3d.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 _) {
|
|
@@ -35958,6 +35954,11 @@ function ji(e, t) {
|
|
|
35958
35954
|
//#endregion
|
|
35959
35955
|
//#region packages/core/src/text/line-metrics.ts
|
|
35960
35956
|
var Mi = [
|
|
35957
|
+
[(e) => e.includes("meiryo ui") || e.includes("meiryoui") || e.includes("メイリオ") && e.includes("ui"), {
|
|
35958
|
+
asc: 2171 * 1.3 / 2048,
|
|
35959
|
+
desc: 430 * 1.3 / 2048,
|
|
35960
|
+
eaOnly: !0
|
|
35961
|
+
}],
|
|
35961
35962
|
[(e) => e.includes("meiryo") || e.includes("メイリオ"), {
|
|
35962
35963
|
asc: 2210 / 2048,
|
|
35963
35964
|
desc: 1059 / 2048
|
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-B3O6_k48.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-Bjf_CgIh.js";
|
|
8
|
+
import { i as ve, n as ye, o as be, r as xe, t as Se } from "./render-BcebVCOq.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-BcebVCOq.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-EFT-W2Au.js";
|
|
7
|
+
import { r as D, t as O } from "./renderer-C3LQln2P.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-vEEGCzB3.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-C3LQln2P.js";
|
|
5
|
+
import { a as o, i as s, n as c, o as l, r as u } from "./pptx-DQqAbp3d.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-Bjf_CgIh.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-C3LQln2P.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, {
|