@silurus/ooxml 0.89.6 → 0.89.8

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 (73) hide show
  1. package/dist/assets/render-worker-Ck21oePL.js +16 -0
  2. package/dist/assets/render-worker-DJiGqgi0.js +15 -0
  3. package/dist/assets/render-worker-hPLJ82d2.js +35 -0
  4. package/dist/{bounded-raw-part-cache-B8t03tSP.js → bounded-raw-part-cache-B5a6cGKO.js} +1713 -1515
  5. package/dist/{canvas-viewer-mechanics-DI38gHNV.js → canvas-viewer-mechanics-BsqaoYgK.js} +2 -2
  6. package/dist/{cfb-guard-BIaHdonq.js → cfb-guard-DzYlucez.js} +1 -1
  7. package/dist/chart-ex.mjs +367 -367
  8. package/dist/{comment-overlay-controller-Crm5Syhx.js → comment-overlay-controller-B7AoyoDK.js} +18 -18
  9. package/dist/{comment-ui-runtime-hfewTmVJ.js → comment-ui-runtime-C5eWtZSW.js} +3 -3
  10. package/dist/{comment-ui-runtime-BfEPgl5r.js → comment-ui-runtime-CV0I9faV.js} +3 -3
  11. package/dist/{document-model-source-BUTSwkyP.js → document-model-source-90ext13g.js} +37 -37
  12. package/dist/{document-pull-client-C_D779tO.js → document-pull-client-DSYpUET2.js} +17525 -13847
  13. package/dist/{document-pull-worker-Bkewz-So.js → document-pull-worker-hMKJ5RdB.js} +14 -14
  14. package/dist/{docx-BfLZeiwa.js → docx-DCCDnwrG.js} +593 -593
  15. package/dist/{docx-BC2HQtjg.js → docx-G7pt7ajR.js} +33 -33
  16. package/dist/{docx-model-source-IjrOZgnl.js → docx-model-source-Beon3BD5.js} +6 -6
  17. package/dist/docx.mjs +4 -4
  18. package/dist/docx_parser_bg.wasm +0 -0
  19. package/dist/{drawingml-shape-BcXkRayC.js → drawingml-shape-B1_kg4BV.js} +55 -55
  20. package/dist/{duotone-BI7CoghW.js → duotone-GK4Hqn7f.js} +1 -1
  21. package/dist/{emf-DgUBx9BU.js → emf--QWY-UlT.js} +50 -50
  22. package/dist/{font-preload-demand-B6HPFxDp.js → font-preload-demand-NqcVKIpX.js} +2 -2
  23. package/dist/{grid-geometry-CqTDvpDr.js → grid-geometry-DpMAiSZb.js} +1 -1
  24. package/dist/{host-layout-measure-DJvccDI3.js → host-layout-measure-Z2fIsmDw.js} +1 -1
  25. package/dist/index.mjs +3 -3
  26. package/dist/internal-companion.mjs +2 -2
  27. package/dist/{line-distribute-DR9Qwd3u.js → line-distribute-CwtditQo.js} +31 -25
  28. package/dist/{model-source-DcI3vC00.js → model-source-Cch44xsb.js} +2 -2
  29. package/dist/{model-source-session-BlQWNyj2.js → model-source-session-ClNCRDOg.js} +21 -21
  30. package/dist/{model-source-session-D0LF49Ve.js → model-source-session-DRcqFGfM.js} +2 -2
  31. package/dist/{model-source-session-BCteVilS.js → model-source-session-DSABX94B.js} +2 -2
  32. package/dist/node.mjs +5 -5
  33. package/dist/{plot-area-frame-D3JtHvov.js → plot-area-frame-DNYMd9Pf.js} +1914 -1890
  34. package/dist/{pptx-SmjDGyub.js → pptx-C1CiFW1D.js} +35 -33
  35. package/dist/{pptx-CfCiVlNB.js → pptx-Ci1Y9SS_.js} +261 -259
  36. package/dist/{pptx-model-source-B2Irk68a.js → pptx-model-source-C9TuBisH.js} +18 -12
  37. package/dist/pptx-parsed-slides-BMGr4khe.js +8 -0
  38. package/dist/pptx.mjs +5 -5
  39. package/dist/pptx_parser_bg.wasm +0 -0
  40. package/dist/{presentation-model-source-DL6duh5l.js → presentation-model-source-3N7xLtmI.js} +6 -6
  41. package/dist/region-map.mjs +39 -39
  42. package/dist/{render-CMUEAeHp.js → render-Bf_Gywxw.js} +32 -30
  43. package/dist/{render-worker-host-CtlBbau5.js → render-worker-host-BZoh-wqR.js} +1 -1
  44. package/dist/{render-worker-host-D_0g-TQ2.js → render-worker-host-BmVeB_mR.js} +1 -1
  45. package/dist/{render-worker-host-DjBotZNL.js → render-worker-host-CVr53kg0.js} +1 -1
  46. package/dist/{renderer-IFuBkPvF.js → renderer-CCA_bQB8.js} +777 -707
  47. package/dist/renderer-DpTePxGq.js +5887 -0
  48. package/dist/{resource-measurement-D2bu0Qfx.js → resource-measurement-CfJtbwiR.js} +129 -129
  49. package/dist/{session-KIWcCCP2.js → session-DPXK_lpI.js} +64 -64
  50. package/dist/{slide-pull-client-BUuJQQVE.js → slide-pull-client-3g6TxaKa.js} +1421 -1421
  51. package/dist/{three-d-ByHGsYrX.js → three-d-BfMZVR0w.js} +98 -98
  52. package/dist/three-d.mjs +678 -678
  53. package/dist/types/chart-ex.d.ts +5 -2
  54. package/dist/types/docx.d.ts +29 -7
  55. package/dist/types/index.d.ts +34 -11
  56. package/dist/types/node.d.ts +27 -5
  57. package/dist/types/pptx.d.ts +11 -7
  58. package/dist/types/region-map.d.ts +5 -2
  59. package/dist/types/three-d.d.ts +5 -2
  60. package/dist/types/xlsx.d.ts +10 -7
  61. package/dist/{wasm-runtime-generation-BLweKv8r.js → wasm-runtime-generation-D97yoAXz.js} +17 -17
  62. package/dist/{workbook-model-source-DBfVsWj7.js → workbook-model-source-BHR8shXr.js} +6 -6
  63. package/dist/{worksheet-pull-client-Du0MuIro.js → worksheet-pull-client-BudfclVl.js} +84 -84
  64. package/dist/{xlsx-CD1VeDIg.js → xlsx-7aY3Pbvh.js} +44 -44
  65. package/dist/{xlsx-CCMRAxPB.js → xlsx-DTtDjzFq.js} +299 -299
  66. package/dist/{xlsx-model-source-udh7Q4WB.js → xlsx-model-source-DXKvb90T.js} +36 -36
  67. package/dist/xlsx.mjs +5 -5
  68. package/dist/xlsx_parser_bg.wasm +0 -0
  69. package/package.json +1 -1
  70. package/dist/assets/render-worker-B5HWxkbU.js +0 -16
  71. package/dist/assets/render-worker-Ba4LYMJd.js +0 -15
  72. package/dist/assets/render-worker-DkqinUC6.js +0 -35
  73. package/dist/renderer-xdugdcMd.js +0 -5769
@@ -1,29 +1,31 @@
1
- import { t as e } from "./slide-pull-client-BUuJQQVE.js";
2
- import { yo as t } from "./plot-area-frame-D3JtHvov.js";
3
- import { B as n, H as r, hn as i, lt as a, ot as o, qt as s, t as c } from "./bounded-raw-part-cache-B8t03tSP.js";
1
+ import { t as e } from "./slide-pull-client-3g6TxaKa.js";
2
+ import { wo as t } from "./plot-area-frame-DNYMd9Pf.js";
3
+ import { G as n, U as r, Xt as i, ft as a, lt as o, t as s, vn as c } from "./bounded-raw-part-cache-B5a6cGKO.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-KIWcCCP2.js";
6
+ import { i as p, n as m, r as h } from "./session-DPXK_lpI.js";
7
7
  import { t as g } from "./in-process-pull-transport-BPJ7M0uC.js";
8
- var _ = "PPTX presentation session was aborted", v = f(() => u(import.meta.url, "pptx_parser_bg.wasm", "@silurus/ooxml-pptx/wasm-binary"));
9
- async function y(e, t = {}) {
10
- return b(e, t);
11
- }
8
+ import { n as _ } from "./pptx-parsed-slides-BMGr4khe.js";
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
  async function b(e, t = {}) {
11
+ return x(e, t);
12
+ }
13
+ async function x(e, t = {}) {
13
14
  if (t.legacyPpt !== void 0) {
14
- let { openPptxSource: n } = await import("./pptx-model-source-B2Irk68a.js");
15
- return n(e, t, v);
15
+ let { openPptxSource: n } = await import("./pptx-model-source-C9TuBisH.js");
16
+ return n(e, t, y);
16
17
  }
17
- let n = s(t.cjkFallback), r = await m(C(e), v(), t);
18
- return new x(r.closeArchive, r.archive, r.bootstrap, r.metrics, t.signal, n);
18
+ let n = i(t.cjkFallback), r = await m(w(e), y(), t);
19
+ return new S(r.closeArchive, r.archive, r.bootstrap, r.metrics, t.signal, n);
19
20
  }
20
- var x = class {
21
+ var S = class {
21
22
  closeArchive;
22
23
  archive;
23
24
  bootstrap;
24
25
  metrics;
25
26
  signal;
26
27
  cjkFallback;
28
+ parsedTextChain;
27
29
  slideCount;
28
30
  slideWidth;
29
31
  slideHeight;
@@ -39,12 +41,12 @@ var x = class {
39
41
  renderTail = Promise.resolve();
40
42
  fetchImage = (e, t) => this.getPartInternal(e, t, (t) => t.extract_image(e));
41
43
  fetchMedia = (e) => this.getPartInternal(e, "application/octet-stream", (t) => t.extract_media(e));
42
- rawParts = new c({
44
+ rawParts = new s({
43
45
  maxEntries: 64,
44
- maxBytes: i
46
+ maxBytes: c
45
47
  });
46
- constructor(t, n, r, i, a, o) {
47
- this.closeArchive = t, this.archive = n, this.bootstrap = r, this.metrics = i, this.signal = a, this.cjkFallback = o, 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({
48
+ constructor(t, n, r, i, a, o, s = !0) {
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({
48
50
  slideCount: this.slideCount,
49
51
  transport: this.transport,
50
52
  open: async (e, t) => {
@@ -78,8 +80,8 @@ var x = class {
78
80
  }
79
81
  async renderSlide(e, t, n) {
80
82
  return this.assertOpen(), this.enqueueRender(async () => {
81
- l(this.signal, _);
82
- let { renderSlideNode: r } = await import("./render-CMUEAeHp.js").then((e) => e.i);
83
+ l(this.signal, v);
84
+ let { renderSlideNode: r } = await import("./render-Bf_Gywxw.js").then((e) => e.i);
83
85
  await r(e, {
84
86
  slideWidth: this.slideWidth,
85
87
  slideHeight: this.slideHeight,
@@ -94,7 +96,7 @@ var x = class {
94
96
  cjkFallback: this.cjkFallback,
95
97
  fetchImage: this.fetchImage,
96
98
  fetchMedia: this.fetchMedia
97
- }), l(this.signal, _);
99
+ }), l(this.signal, v);
98
100
  }).catch((e) => this.failOperation(e));
99
101
  }
100
102
  [Symbol.asyncIterator]() {
@@ -107,13 +109,13 @@ var x = class {
107
109
  let e;
108
110
  try {
109
111
  for (let e = 0; e < this.slideCount; e += 1) {
110
- l(this.signal, _);
112
+ l(this.signal, v);
111
113
  let t = await this.slideClient.load(e);
112
114
  if (!t) throw Error(`PPTX slide ${e} was not decoded`);
113
- this.usage ??= await this.slidePull.run(() => p((e) => e(this.archive))), this.metrics.observeUsage(this.usage), this.consumedSlides = e + 1, yield t;
115
+ this.usage ??= await this.slidePull.run(() => p((e) => e(this.archive))), this.metrics.observeUsage(this.usage), this.consumedSlides = e + 1, this.parsedTextChain && _(t), yield t;
114
116
  }
115
117
  } catch (t) {
116
- throw e = r(t) ?? t, this.metrics.fail(e), e;
118
+ throw e = n(t) ?? t, this.metrics.fail(e), e;
117
119
  } finally {
118
120
  try {
119
121
  await this.close();
@@ -131,13 +133,13 @@ var x = class {
131
133
  try {
132
134
  await this.slidePull.reset();
133
135
  } catch (t) {
134
- e = r(t) ?? t;
136
+ e = n(t) ?? t;
135
137
  }
136
138
  this.transport.terminate(), this.rawParts.clear();
137
139
  try {
138
140
  this.closeArchive();
139
141
  } catch (t) {
140
- e ??= r(t) ?? t;
142
+ e ??= n(t) ?? t;
141
143
  }
142
144
  if (e !== void 0) throw this.metrics.fail(e), e;
143
145
  this.metrics.checkpoint("presentation session closed"), this.metrics.succeed({ slides: this.consumedSlides });
@@ -148,14 +150,14 @@ var x = class {
148
150
  }
149
151
  getPartInternal(e, t, n) {
150
152
  return this.rawParts.get(e, t, () => {
151
- l(this.signal, _);
153
+ l(this.signal, v);
152
154
  let e = n(this.archive);
153
155
  return this.refreshResourceUsage(), new Blob([e], { type: t });
154
156
  });
155
157
  }
156
158
  refreshResourceUsage() {
157
159
  try {
158
- this.usage = n(this.archive.resource_usage()), this.metrics.observeUsage(this.usage);
160
+ this.usage = r(this.archive.resource_usage()), this.metrics.observeUsage(this.usage);
159
161
  } catch {}
160
162
  return this.usage;
161
163
  }
@@ -164,18 +166,18 @@ var x = class {
164
166
  if (this.resourceFailure) throw this.resourceFailure;
165
167
  }
166
168
  failOperation(e) {
167
- let n = r(e) ?? e;
168
- throw n instanceof t && (this.resourceFailure ??= n), this.metrics.fail(n), n;
169
+ let r = n(e) ?? e;
170
+ throw r instanceof t && (this.resourceFailure ??= r), this.metrics.fail(r), r;
169
171
  }
170
172
  };
171
- async function S(e, t = {}) {
172
- return d(() => b(e, t), async (e) => {
173
+ async function C(e, t = {}) {
174
+ return d(() => x(e, t), async (e) => {
173
175
  let t = [];
174
176
  for await (let n of e.slides()) t.push(n);
175
177
  return e.materialize(t);
176
178
  });
177
179
  }
178
- function C(e) {
180
+ function w(e) {
179
181
  return e instanceof Uint8Array ? e : new Uint8Array(e);
180
182
  }
181
- export { S as n, y as r, x as t };
183
+ export { C as n, b as r, S as t };