@silurus/ooxml 0.80.2 → 0.80.3
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-BD1_LaFD.js → render-worker-CRaEOHkw.js} +4 -4
- package/dist/assets/{render-worker-DuvX4_li.js → render-worker-DQGLj5Zv.js} +16 -16
- package/dist/assets/render-worker-rnrSLmqL.js +8 -0
- package/dist/{document-pull-client-Cukkyojh.js → document-pull-client-vxk-Aomu.js} +1 -1
- package/dist/{docx-BlELeDNF.js → docx-DN0PRx2f.js} +2 -2
- package/dist/docx.mjs +1 -1
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/index.mjs +3 -3
- package/dist/math.mjs +27 -22
- package/dist/node.mjs +1 -1
- package/dist/{pptx-JBkXh6Cy.js → pptx-B-Laftl1.js} +1 -1
- package/dist/pptx.mjs +1 -1
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{render-worker-host-CM1JXVqg.js → render-worker-host-CYPhmBtX.js} +1 -1
- package/dist/{render-worker-host-DFtd9Z-J.js → render-worker-host-GlLR1rtF.js} +1 -1
- package/dist/{render-worker-host-Br7ZDyGE.js → render-worker-host-IuQFpoJM.js} +1 -1
- package/dist/{xlsx-dhsUXUpX.js → xlsx-DqMe7J2C.js} +1 -1
- package/dist/xlsx.mjs +1 -1
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-BIqMQFkZ.js +0 -8
|
@@ -6424,7 +6424,7 @@ function jc(e, t, n, r, i = !0) {
|
|
|
6424
6424
|
let e = Ac(n.physicalIndentLeftPt + l, n.tabStops, n.defaultTabPt);
|
|
6425
6425
|
d = e ? e.pos - n.physicalIndentLeftPt : l;
|
|
6426
6426
|
}
|
|
6427
|
-
return {
|
|
6427
|
+
return d = Math.max(0, d), {
|
|
6428
6428
|
bodyOffsetPt: d,
|
|
6429
6429
|
markerText: a,
|
|
6430
6430
|
markerWidthPt: s,
|
|
@@ -2,7 +2,7 @@ import { t as e } from "./chunk-DmhlhrBa.js";
|
|
|
2
2
|
import { B as t, Ot as n, R as r, Rt as i, a, cn as o, it as s, jt as c, ln as l, mt as u, q as d, z as f, zt as p } from "./line-metrics-DdEJYxjx.js";
|
|
3
3
|
import { C as m, E as h, S as g, T as _, _ as v, a as y, b, c as x, d as ee, f as te, g as ne, h as re, i as S, l as C, m as ie, n as ae, o as oe, p as se, r as ce, s as le, t as ue, u as de, v as w, w as fe, x as pe, y as T } from "./canvas-viewer-mechanics-D-r6wHY_.js";
|
|
4
4
|
import { a as me, c as he, i as ge, o as _e, r as ve, s as ye, t as be } from "./bounded-raw-part-cache-C6ro6Ezf.js";
|
|
5
|
-
import { C as xe, S as Se, _ as E, a as Ce, b as we, c as Te, d as Ee, f as De, g as Oe, h as ke, l as Ae, m as je, n as D, o as Me, p as Ne, s as Pe, t as O, v as k, w as Fe, x as A, y as Ie } from "./document-pull-client-
|
|
5
|
+
import { C as xe, S as Se, _ as E, a as Ce, b as we, c as Te, d as Ee, f as De, g as Oe, h as ke, l as Ae, m as je, n as D, o as Me, p as Ne, s as Pe, t as O, v as k, w as Fe, x as A, y as Ie } from "./document-pull-client-vxk-Aomu.js";
|
|
6
6
|
import { N as j } from "./three-d-C28kqDym.js";
|
|
7
7
|
import { n as Le } from "./renderer-module-contract-BNGz8HvO.js";
|
|
8
8
|
import { n as Re, r as M, t as N } from "./highlight-rect-BuX5rWP4.js";
|
|
@@ -345,7 +345,7 @@ var U = class e {
|
|
|
345
345
|
t = await e.arrayBuffer();
|
|
346
346
|
} else t = n;
|
|
347
347
|
t = h(await _(t, i.password)), c.setSourceBytes(t.byteLength), c.checkpoint("container ready");
|
|
348
|
-
let r = s === "worker" ? (await import("./render-worker-host-
|
|
348
|
+
let r = s === "worker" ? (await import("./render-worker-host-IuQFpoJM.js")).createRenderWorker() : new We(), l = s === "worker" ? Le(i) : void 0, u;
|
|
349
349
|
try {
|
|
350
350
|
if (u = new e(r, s, o, i.wasmUrl), u._metrics = c, await u._parse(t, a.policy, s === "worker" ? !!i.useGoogleFonts : !1, i.workerTimeoutMs, (e) => c.observeUsage(e), l), s === "worker" && u._mode === "main" && (c.setMode("main"), console.warn("[ooxml] mode: 'worker' fell back to main-thread rendering because this document requires DOM OpenType vertical glyph selection.")), i.math && u._mode === "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."), i.threeD && u._mode === "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._threeD = u._mode === "worker" ? void 0 : i.threeD, i.regionMap && u._mode === "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 = u._mode === "worker" ? void 0 : i.regionMap, u._mode === "main" && i.useGoogleFonts && u._document && (u._googleFontFaces = await ge(Ne(u._document), De)), u._mode === "main" && u._document?.embeddedFonts?.length) {
|
|
351
351
|
let e = u;
|
package/dist/docx.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Rt as e, a as t, cn as n, ln as r, zt as i } from "./line-metrics-DdEJYxjx.js";
|
|
2
2
|
import { w as a } from "./canvas-viewer-mechanics-D-r6wHY_.js";
|
|
3
|
-
import { a as o, c as s, i as c, n as l, o as u, r as d, s as f } from "./docx-
|
|
3
|
+
import { a as o, c as s, i as c, n as l, o as u, r as d, s as f } from "./docx-DN0PRx2f.js";
|
|
4
4
|
export { s as DocxDocument, d as DocxScrollViewer, c as DocxViewer, e as OoxmlDecodedImageLimitError, n as OoxmlError, r as OoxmlResourceLimitError, a as autoResize, u as buildDocxHighlightLayer, f as buildDocxTextLayer, i as isOoxmlDecodedImageLimitError, l as noteText, t as openExternalHyperlink, o as readDocxTextSelectionContext };
|
package/dist/docx_parser_bg.wasm
CHANGED
|
Binary file
|
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-DN0PRx2f.js";
|
|
2
|
+
import { t } from "./xlsx-DqMe7J2C.js";
|
|
3
|
+
import { t as n } from "./pptx-B-Laftl1.js";
|
|
4
4
|
export { e as docx, n as pptx, t as xlsx };
|
package/dist/math.mjs
CHANGED
|
@@ -2,50 +2,55 @@ import { t as e } from "./renderer-module-contract-BNGz8HvO.js";
|
|
|
2
2
|
import { n as t } from "./mathjax-DgAl7Yi5.js";
|
|
3
3
|
//#region packages/core/assets/mathjax-stix2.js?url
|
|
4
4
|
var n = new URL("mathjax-stix2.js", import.meta.url).href, r = null;
|
|
5
|
-
function i() {
|
|
6
|
-
return new URL(n, import.meta.url).href;
|
|
7
|
-
}
|
|
8
|
-
function a(e) {
|
|
9
|
-
return e ? new URL(e, import.meta.url).href : i();
|
|
10
|
-
}
|
|
11
|
-
function o(e) {
|
|
5
|
+
function i(e) {
|
|
12
6
|
return new Promise((t, n) => {
|
|
13
7
|
let r = document.createElement("script");
|
|
14
8
|
r.src = e, r.async = !0, r.onload = () => t(), r.onerror = () => n(/* @__PURE__ */ Error(`Failed to load math engine from ${e}`)), document.head.appendChild(r);
|
|
15
9
|
});
|
|
16
10
|
}
|
|
17
|
-
async function
|
|
11
|
+
async function a(e) {
|
|
18
12
|
await import(
|
|
19
13
|
/* @vite-ignore */
|
|
20
14
|
e
|
|
21
15
|
);
|
|
22
16
|
}
|
|
23
|
-
function
|
|
17
|
+
function o(e) {
|
|
24
18
|
return r || (r = (async () => {
|
|
25
19
|
let t = globalThis.__ooxmlStix2;
|
|
26
20
|
if (t) return t;
|
|
27
|
-
let n =
|
|
28
|
-
typeof document > "u" ? await
|
|
21
|
+
let n = new URL(e).href;
|
|
22
|
+
typeof document > "u" ? await a(n) : await i(n);
|
|
29
23
|
let r = globalThis.__ooxmlStix2;
|
|
30
24
|
if (!r) throw Error("Math engine failed to initialize");
|
|
31
25
|
return r;
|
|
32
26
|
})(), r);
|
|
33
27
|
}
|
|
34
|
-
async function
|
|
35
|
-
await
|
|
28
|
+
async function s(e) {
|
|
29
|
+
await o(e);
|
|
36
30
|
}
|
|
37
|
-
async function
|
|
38
|
-
let
|
|
31
|
+
async function c(e, n) {
|
|
32
|
+
let r = (await o(n)).mathml2svg(e);
|
|
39
33
|
return {
|
|
40
|
-
svg:
|
|
41
|
-
...t(
|
|
34
|
+
svg: r,
|
|
35
|
+
...t(r)
|
|
42
36
|
};
|
|
43
37
|
}
|
|
44
38
|
//#endregion
|
|
39
|
+
//#region packages/core/src/math/engine.ts
|
|
40
|
+
function l() {
|
|
41
|
+
return new URL(n, import.meta.url).href;
|
|
42
|
+
}
|
|
43
|
+
async function u() {
|
|
44
|
+
await s(l());
|
|
45
|
+
}
|
|
46
|
+
async function d(e) {
|
|
47
|
+
return c(e, l());
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
45
50
|
//#region src/math.ts
|
|
46
|
-
var
|
|
47
|
-
loadMathJax:
|
|
48
|
-
mathMLToSvg:
|
|
49
|
-
}, "math", { engineAssetUrl:
|
|
51
|
+
var f = e({
|
|
52
|
+
loadMathJax: u,
|
|
53
|
+
mathMLToSvg: d
|
|
54
|
+
}, "math", { engineAssetUrl: l() });
|
|
50
55
|
//#endregion
|
|
51
|
-
export {
|
|
56
|
+
export { f as math };
|
package/dist/node.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { t as e } from "./chunk-DmhlhrBa.js";
|
|
|
2
2
|
import { t } from "./slide-pull-client-m2blvngt.js";
|
|
3
3
|
import { B as n, F as r, H as i, I as a, Ot as o, P as s, R as c, Rt as l, U as u, W as d, at as f, jt as p, ln as m, ot as h, q as g, rt as _, st as ee, zt as te } from "./line-metrics-DdEJYxjx.js";
|
|
4
4
|
import { t as ne } from "./bounded-raw-part-cache-C6ro6Ezf.js";
|
|
5
|
-
import { a as re, c as ie, i as ae, l as oe, r as se, u as ce } from "./document-pull-client-
|
|
5
|
+
import { a as re, c as ie, i as ae, l as oe, r as se, u as ce } from "./document-pull-client-vxk-Aomu.js";
|
|
6
6
|
import { t as le } from "./transfer-CKZ79zFw.js";
|
|
7
7
|
import { a as ue, c as de, d as fe, l as pe, o as me, r as he, s as ge, t as _e, u as ve } from "./worksheet-pull-client-BntP6RiO.js";
|
|
8
8
|
import { a as ye, i as be, n as xe, r as Se } from "./session-DkPblDiq.js";
|
|
@@ -765,7 +765,7 @@ var X = class e {
|
|
|
765
765
|
s = await e.arrayBuffer();
|
|
766
766
|
} else s = t;
|
|
767
767
|
s = ne(await ie(s, n.password)), a.setSourceBytes(s.byteLength), a.checkpoint("container ready");
|
|
768
|
-
let c = i === "worker" ? (await import("./render-worker-host-
|
|
768
|
+
let c = i === "worker" ? (await import("./render-worker-host-CYPhmBtX.js")).createRenderWorker() : new et(), l = i === "worker" ? we(n) : void 0, u;
|
|
769
769
|
try {
|
|
770
770
|
return u = new e(c, i, n.wasmUrl), u._metrics = a, n.math && i === "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 && i === "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._math = i === "worker" ? void 0 : n.math, u._threeD = i === "worker" ? void 0 : n.threeD, n.regionMap && i === "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 = i === "worker" ? void 0 : n.regionMap, await u._parse(s, r.policy, i === "worker" ? !!n.useGoogleFonts : !1, n.workerTimeoutMs, (e) => a.observeUsage(e), l), a.checkpoint("presentation preflight ready"), i === "main" && n.useGoogleFonts && u._preflight && (u._googleFontFaces = await be(u._preflight.fontPreloadNames, o)), a.succeed({ slides: u.slideCount }), u;
|
|
771
771
|
} catch (e) {
|
package/dist/pptx.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as e } from "./slide-pull-client-m2blvngt.js";
|
|
2
2
|
import { Rt as t, a as n, cn as r, ln as i, zt as a } from "./line-metrics-DdEJYxjx.js";
|
|
3
3
|
import { w as o } from "./canvas-viewer-mechanics-D-r6wHY_.js";
|
|
4
|
-
import { a as s, i as c, n as l, o as u, r as d, s as f } from "./pptx-
|
|
4
|
+
import { a as s, i as c, n as l, o as u, r as d, s as f } from "./pptx-B-Laftl1.js";
|
|
5
5
|
export { t as OoxmlDecodedImageLimitError, r as OoxmlError, i as OoxmlResourceLimitError, s as PptxPresentation, l as PptxScrollViewer, d as PptxViewer, o as autoResize, u as buildPptxHighlightLayer, f as buildPptxTextLayer, a as isOoxmlDecodedImageLimitError, n as openExternalHyperlink, c as readPptxTextSelectionContext, e as renderSlide };
|
package/dist/pptx_parser_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region packages/pptx/src/render-worker.ts?worker&url
|
|
2
|
-
var e = "" + new URL("assets/render-worker-
|
|
2
|
+
var e = "" + new URL("assets/render-worker-CRaEOHkw.js", import.meta.url).href;
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region packages/pptx/src/render-worker-host.ts
|
|
5
5
|
function t() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region packages/xlsx/src/render-worker.ts?worker&url
|
|
2
|
-
var e = "" + new URL("assets/render-worker-
|
|
2
|
+
var e = "" + new URL("assets/render-worker-DQGLj5Zv.js", import.meta.url).href;
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region packages/xlsx/src/render-worker-host.ts
|
|
5
5
|
function t() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region packages/docx/src/render-worker.ts?worker&url
|
|
2
|
-
var e = "" + new URL("assets/render-worker-
|
|
2
|
+
var e = "" + new URL("assets/render-worker-rnrSLmqL.js", import.meta.url).href;
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region packages/docx/src/render-worker-host.ts
|
|
5
5
|
function t() {
|
|
@@ -4274,7 +4274,7 @@ var Ga = Symbol("retain-xlsx-viewer-fonts"), Ka = Symbol("prepare-xlsx-viewer-ro
|
|
|
4274
4274
|
s = he(await _e(s, n.password));
|
|
4275
4275
|
let c = s === i;
|
|
4276
4276
|
o.setSourceBytes(s.byteLength), o.checkpoint("container ready");
|
|
4277
|
-
let l = a === "worker" ? (await import("./render-worker-host-
|
|
4277
|
+
let l = a === "worker" ? (await import("./render-worker-host-GlLR1rtF.js")).createRenderWorker() : new dt(), u;
|
|
4278
4278
|
try {
|
|
4279
4279
|
return u = new e(l, a, n.wasmUrl), u.metrics = o, await u._load(s, n, r.policy, (e) => o.observeUsage(e), c), o.checkpoint("workbook index ready"), o.succeed({ sheets: u.sheetCount }), u;
|
|
4280
4280
|
} catch (e) {
|
package/dist/xlsx.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Rt as e, a as t, cn as n, ln as r, zt as i } from "./line-metrics-DdEJYxjx.js";
|
|
2
2
|
import { w as a } from "./canvas-viewer-mechanics-D-r6wHY_.js";
|
|
3
|
-
import { a as o, i as s, n as c, o as l, r as u, s as d } from "./xlsx-
|
|
3
|
+
import { a as o, i as s, n as c, o as l, r as u, s as d } from "./xlsx-DqMe7J2C.js";
|
|
4
4
|
import { i as f } from "./worksheet-pull-client-BntP6RiO.js";
|
|
5
5
|
export { s as MAX_SELECTION_AREAS, o as MAX_SELECTION_CONTEXT_CELLS, l as MAX_SELECTION_CONTEXT_TEXT_CHARACTERS, e as OoxmlDecodedImageLimitError, n as OoxmlError, r as OoxmlResourceLimitError, c as XlsxSheetViewer, u as XlsxViewer, d as XlsxWorkbook, a as autoResize, i as isOoxmlDecodedImageLimitError, t as openExternalHyperlink, f as resolveSharedStrings };
|
package/dist/xlsx_parser_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED