@silurus/ooxml 0.79.0 → 0.80.0

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.
Files changed (49) hide show
  1. package/README.md +22 -15
  2. package/dist/assets/render-worker-BSx9_xRC.js +8 -0
  3. package/dist/assets/render-worker-BTp87EaD.js +21 -0
  4. package/dist/assets/render-worker-fdwAjSve.js +7 -0
  5. package/dist/{canvas-viewer-mechanics-D9tsuHnG.js → canvas-viewer-mechanics-D41tGY4d.js} +1 -1
  6. package/dist/{dash-Cyc-sevN.js → dash-CMzZIDz_.js} +87 -49
  7. package/dist/{document-pull-client-YiU8M4LO.js → document-pull-client-D-fnlVGf.js} +2247 -2254
  8. package/dist/{docx-a1UpmRf8.js → docx-CbIqgb1f.js} +108 -106
  9. package/dist/docx.mjs +4 -4
  10. package/dist/docx_parser_bg.wasm +0 -0
  11. package/dist/index.mjs +3 -3
  12. package/dist/line-distribute-DFdgzaLK.js +1002 -0
  13. package/dist/{line-metrics-DjKxiIUD.js → line-metrics-PpgpOvz4.js} +2774 -2524
  14. package/dist/math.mjs +34 -24
  15. package/dist/node.mjs +186 -186
  16. package/dist/{pptx-t5ABdzfd.js → pptx-DwF8olh2.js} +129 -127
  17. package/dist/pptx.mjs +5 -5
  18. package/dist/pptx_parser_bg.wasm +0 -0
  19. package/dist/region-map.mjs +75 -74
  20. package/dist/{render-BjIEuFIG.js → render-BMC4d1CO.js} +1 -1
  21. package/dist/render-worker-host-CcENRoDr.js +9 -0
  22. package/dist/render-worker-host-CzsHtsN_.js +9 -0
  23. package/dist/render-worker-host-DFgTN7hy.js +9 -0
  24. package/dist/renderer-module-contract-BNGz8HvO.js +30 -0
  25. package/dist/{resource-measurement-D8EiTm_E.js → resource-measurement-DvIKHd-9.js} +7 -7
  26. package/dist/{session-Bhe_eY-s.js → session-BzhcJOvj.js} +9 -9
  27. package/dist/{slide-pull-client-BQ8gJPTq.js → slide-pull-client-DLC3nJUt.js} +847 -861
  28. package/dist/three-d.mjs +828 -559
  29. package/dist/types/docx.d.ts +74 -8
  30. package/dist/types/index.d.ts +82 -12
  31. package/dist/types/math.d.ts +1 -1
  32. package/dist/types/node.d.ts +70 -2
  33. package/dist/types/pptx.d.ts +74 -8
  34. package/dist/types/region-map.d.ts +68 -2
  35. package/dist/types/three-d.d.ts +68 -2
  36. package/dist/types/xlsx.d.ts +78 -8
  37. package/dist/{worksheet-pull-client-T0EzdEEQ.js → worksheet-pull-client-DlVk_4Bt.js} +13 -13
  38. package/dist/{xlsx-CsDDMJIK.js → xlsx-C1BUns1R.js} +1387 -1252
  39. package/dist/xlsx.mjs +5 -5
  40. package/dist/xlsx_parser_bg.wasm +0 -0
  41. package/package.json +4 -1
  42. package/dist/line-distribute-pDqovJpT.js +0 -1002
  43. package/dist/render-worker-host-BB320snY.js +0 -27
  44. package/dist/render-worker-host-BjEPZBwf.js +0 -27
  45. package/dist/render-worker-host-hZ0o4OD7.js +0 -27
  46. /package/dist/{highlight-rect-cCvVU-MW.js → highlight-rect-BuX5rWP4.js} +0 -0
  47. /package/dist/{mathjax-Dqo857oC.js → mathjax-DgAl7Yi5.js} +0 -0
  48. /package/dist/{transfer-3QEJrsJa.js → transfer-CKZ79zFw.js} +0 -0
  49. /package/dist/{visible-index-CKvgpUrf.js → visible-index-BjesVGhg.js} +0 -0
package/dist/math.mjs CHANGED
@@ -1,41 +1,51 @@
1
- import { n as e } from "./mathjax-Dqo857oC.js";
1
+ import { t as e } from "./renderer-module-contract-BNGz8HvO.js";
2
+ import { n as t } from "./mathjax-DgAl7Yi5.js";
2
3
  //#region packages/core/assets/mathjax-stix2.js?url
3
- var t = new URL("mathjax-stix2.js", import.meta.url).href, n = null;
4
- function r() {
5
- return new URL(t, import.meta.url).href;
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;
6
7
  }
7
- function i(e) {
8
+ function a(e) {
9
+ return e ? new URL(e, import.meta.url).href : i();
10
+ }
11
+ function o(e) {
8
12
  return new Promise((t, n) => {
9
13
  let r = document.createElement("script");
10
14
  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);
11
15
  });
12
16
  }
13
- function a() {
14
- return n || (n = (async () => {
15
- let e = globalThis.__ooxmlStix2;
16
- if (e) return e;
17
- if (typeof document > "u") throw Error("Math rendering requires a DOM (browser environment)");
18
- await i(r());
17
+ async function s(e) {
18
+ await import(
19
+ /* @vite-ignore */
20
+ e
21
+ );
22
+ }
23
+ function c(e) {
24
+ return r || (r = (async () => {
19
25
  let t = globalThis.__ooxmlStix2;
20
- if (!t) throw Error("Math engine failed to initialize");
21
- return t;
22
- })(), n);
26
+ if (t) return t;
27
+ let n = a(e);
28
+ typeof document > "u" ? await s(n) : await o(n);
29
+ let r = globalThis.__ooxmlStix2;
30
+ if (!r) throw Error("Math engine failed to initialize");
31
+ return r;
32
+ })(), r);
23
33
  }
24
- async function o() {
25
- await a();
34
+ async function l() {
35
+ await c();
26
36
  }
27
- async function s(t) {
28
- let n = (await a()).mathml2svg(t);
37
+ async function u(e) {
38
+ let n = (await c()).mathml2svg(e);
29
39
  return {
30
40
  svg: n,
31
- ...e(n)
41
+ ...t(n)
32
42
  };
33
43
  }
34
44
  //#endregion
35
45
  //#region src/math.ts
36
- var c = {
37
- loadMathJax: o,
38
- mathMLToSvg: s
39
- };
46
+ var d = e({
47
+ loadMathJax: l,
48
+ mathMLToSvg: u
49
+ }, "math", { engineAssetUrl: i() });
40
50
  //#endregion
41
- export { c as math };
51
+ export { d as math };