@silurus/ooxml 0.86.1 → 0.88.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 (72) hide show
  1. package/README.md +42 -2
  2. package/dist/assets/render-worker-1uPAxMZr.js +31 -0
  3. package/dist/assets/render-worker-BlvJybji.js +10 -0
  4. package/dist/assets/render-worker-CzmiJfFL.js +11 -0
  5. package/dist/{canvas-viewer-mechanics-DN5SqWGS.js → canvas-viewer-mechanics-DbLz0rYW.js} +75 -66
  6. package/dist/chart-ex.mjs +581 -616
  7. package/dist/cjk-fallback-bLI3z70h.js +46 -0
  8. package/dist/comment-ui-runtime-BsK8pmUT.js +2 -0
  9. package/dist/{comment-ui-runtime-lXwVOgjW.js → comment-ui-runtime-CWGqn5Vr.js} +5 -5
  10. package/dist/{comment-ui-runtime-DEtgcmj7.js → comment-ui-runtime-DcJOYlw-.js} +5 -5
  11. package/dist/{comments-CAn2A_Xh.js → comments-Diid5ujN.js} +1 -1
  12. package/dist/{document-pull-client-uopDjRde.js → document-pull-client-B9PTM-pL.js} +4693 -4621
  13. package/dist/{docx-wPzeF76A.js → docx-BF9WXrYH.js} +503 -388
  14. package/dist/docx.mjs +6 -6
  15. package/dist/docx_parser_bg.wasm +0 -0
  16. package/dist/{dom-interaction-boundary-CswB9Tzi.js → dom-interaction-boundary-Cnm8DSBN.js} +22 -19
  17. package/dist/{hyperlink-BR1NCO7S.js → hyperlink-Cxzhet30.js} +842 -829
  18. package/dist/index.mjs +3 -3
  19. package/dist/{line-distribute-IsUGfHXm.js → line-distribute-D1WNHKz_.js} +2 -2
  20. package/dist/math.mjs +2 -2
  21. package/dist/node.mjs +356 -352
  22. package/dist/plot-area-frame-DLTYKHNP.js +4354 -0
  23. package/dist/{pptx-BxJ_RBSY.js → pptx-DkyYBYoL.js} +444 -435
  24. package/dist/pptx.mjs +7 -7
  25. package/dist/pptx_parser_bg.wasm +0 -0
  26. package/dist/region-map.mjs +5 -5
  27. package/dist/{render-DEiun_AH.js → render-D3iqVKCo.js} +31 -29
  28. package/dist/{render-worker-host-Ba6Fchqr.js → render-worker-host-B5wQfB7U.js} +1 -1
  29. package/dist/{render-worker-host-BEfLZvSL.js → render-worker-host-D4123J27.js} +1 -1
  30. package/dist/{render-worker-host-C3xwtHnv.js → render-worker-host-Di3LxLc0.js} +1 -1
  31. package/dist/renderer-B4GZb5We.js +6492 -0
  32. package/dist/{resource-measurement-CclArDRs.js → resource-measurement-SHQCbkh2.js} +3 -3
  33. package/dist/{session-BuJL_xcp.js → session-BGq81gRQ.js} +98 -98
  34. package/dist/{slide-pull-client-Ck8wfRT_.js → slide-pull-client-DiPnm240.js} +767 -738
  35. package/dist/{three-d-YYghQndN.js → three-d-DJBl8g8M.js} +251 -435
  36. package/dist/three-d.mjs +998 -906
  37. package/dist/tiff.mjs +2 -2
  38. package/dist/types/chart-ex.d.ts +142 -4
  39. package/dist/types/docx.d.ts +155 -13
  40. package/dist/types/index.d.ts +131 -19
  41. package/dist/types/math.d.ts +1 -1
  42. package/dist/types/node.d.ts +120 -8
  43. package/dist/types/pptx.d.ts +123 -13
  44. package/dist/types/region-map.d.ts +142 -4
  45. package/dist/types/three-d.d.ts +142 -4
  46. package/dist/types/tiff.d.ts +1 -1
  47. package/dist/types/xlsx.d.ts +155 -13
  48. package/dist/{worksheet-pull-client-CAvuf22q.js → worksheet-pull-client-BM8ywvbu.js} +51 -51
  49. package/dist/{xlsx-Bblm5r1h.js → xlsx-C9NVjgaV.js} +1592 -1564
  50. package/dist/xlsx.mjs +6 -6
  51. package/dist/xlsx_parser_bg.wasm +0 -0
  52. package/package.json +1 -1
  53. package/dist/assets/render-worker-D21h5TGR.js +0 -10
  54. package/dist/assets/render-worker-Dsfekaht.js +0 -11
  55. package/dist/assets/render-worker-DxU7IrKo.js +0 -31
  56. package/dist/comment-ui-runtime-TLHustXJ.js +0 -2
  57. package/dist/plot-area-frame-D5hEOgkJ.js +0 -2903
  58. package/dist/renderer-XFSCOT6m.js +0 -5857
  59. /package/dist/{bounded-raw-part-cache-BfbSxRIL.js → bounded-raw-part-cache-Cg1BsSZQ.js} +0 -0
  60. /package/dist/{comment-occurrence-CqejEuts.js → comment-occurrence-C8Y2uoVr.js} +0 -0
  61. /package/dist/{delimited-text-worker-host-DcHj_JZt.js → delimited-text-worker-host-BVY-Ecni.js} +0 -0
  62. /package/dist/{highlight-rect-FuUSmL3a.js → highlight-rect-C5hkRqUr.js} +0 -0
  63. /package/dist/{line-metrics-CBbw80Ko.js → line-metrics-B60C86uh.js} +0 -0
  64. /package/dist/{mathjax-DS69BmJd.js → mathjax-DoyWZbSp.js} +0 -0
  65. /package/dist/{pixel-budget-Dgjw269h.js → pixel-budget-9P63Bsk5.js} +0 -0
  66. /package/dist/{read-only-comment-decoration-BTnWEeo5.js → read-only-comment-decoration-Dz7eTQ4d.js} +0 -0
  67. /package/dist/{read-only-comment-margin-plStyGfE.js → read-only-comment-margin-DkgzASAl.js} +0 -0
  68. /package/dist/{renderer-module-contract-Cu-GKuPd.js → renderer-module-contract-D91rkYHH.js} +0 -0
  69. /package/dist/{source-key-Ktb1GRE5.js → source-key-DIJG8BA0.js} +0 -0
  70. /package/dist/{transfer-mIj7E7NB.js → transfer-p6iCC2R7.js} +0 -0
  71. /package/dist/{units-EJdC96r6.js → units-BzZ0gAxs.js} +0 -0
  72. /package/dist/{visible-index-DPoQYSDt.js → visible-index-BgiHEc1z.js} +0 -0
@@ -1,8 +1,8 @@
1
- import { $t as e, F as t, G as n, H as r, M as i, N as a, P as o, an as s, cn as c, en as l, in as u, nn as d, on as f, rn as p, tn as m } from "./hyperlink-BR1NCO7S.js";
2
- import { n as h, r as g, t as _ } from "./resource-measurement-CclArDRs.js";
3
- import { t as v } from "./transfer-mIj7E7NB.js";
1
+ import { F as e, G as t, H as n, M as r, N as i, P as a, an as o, cn as s, in as c, nn as l, on as u, rn as d, sn as f, tn as p, un as m } from "./hyperlink-Cxzhet30.js";
2
+ import { n as h, r as g, t as _ } from "./resource-measurement-SHQCbkh2.js";
3
+ import { t as v } from "./transfer-p6iCC2R7.js";
4
4
  //#region packages/xlsx/src/worksheet-resource-limits.ts
5
- var y = f, b = p, x = u, S = s, C = d, w = e, T = l, E = m, D = Object.freeze({
5
+ var y = s, b = o, x = u, S = f, C = c, w = p, T = l, E = d, D = Object.freeze({
6
6
  archiveEntryCount: 0,
7
7
  declaredInflatedBytes: 0,
8
8
  distinctInflatedBytes: 0,
@@ -48,7 +48,7 @@ function M(e, t, n = {}) {
48
48
  }
49
49
  function N(e, t, n, r, i, a, o) {
50
50
  let s = n === "worksheet-json" ? "serialization" : "parsing";
51
- return new c(`OOXML resource limit exceeded${t ? ` for ${t}` : ""}: ${r} ${a} > ${i}`, {
51
+ return new m(`OOXML resource limit exceeded${t ? ` for ${t}` : ""}: ${r} ${a} > ${i}`, {
52
52
  stage: s,
53
53
  violation: {
54
54
  format: "xlsx",
@@ -142,7 +142,7 @@ function z(e, t, n, r) {
142
142
  //#endregion
143
143
  //#region packages/xlsx/src/worksheet-pull-worker.ts
144
144
  var B = 64 * 1024 * 1024, V = class {
145
- coordinator = new t();
145
+ coordinator = new e();
146
146
  sessions = /* @__PURE__ */ new Map();
147
147
  operationTail = Promise.resolve();
148
148
  pendingOpens = /* @__PURE__ */ new Map();
@@ -166,16 +166,16 @@ var B = 64 * 1024 * 1024, V = class {
166
166
  if (this.resourceFailure) throw this.resourceFailure;
167
167
  let r = this.pendingOpens.get(n.sessionId);
168
168
  if (!r || r.identity.operationId !== n.operationId || r.identity.generation !== n.generation) throw Error("worksheet pull session open reservation is stale or missing");
169
- let i, a = new Promise((e) => {
169
+ let i, o = new Promise((e) => {
170
170
  i = e;
171
171
  }), s = this.operationTail.then(() => this.coordinator.enqueue(async () => {
172
172
  if (r.canceled) throw Error("worksheet pull session open was canceled");
173
173
  this.executeArchive((n) => n.open_sheet_cursor(e, t));
174
- let a = [], s = {
174
+ let o = [], s = {
175
175
  rows: 0,
176
176
  cells: 0,
177
177
  ownedUtf8Bytes: 0
178
- }, l, u = !1, d = new o({
178
+ }, c, l = !1, u = new a({
179
179
  ...n,
180
180
  maxByteCredit: B,
181
181
  coordinator: this.coordinator,
@@ -187,13 +187,13 @@ var B = 64 * 1024 * 1024, V = class {
187
187
  try {
188
188
  if (n.kind === "rows") {
189
189
  let e = j(s, O(n.rows));
190
- P(e, "get-worksheet-worker", void 0, this.readResourceUsage()), a.push(...n.rows), s = e;
191
- } else l = n.worksheet;
190
+ P(e, "get-worksheet-worker", void 0, this.readResourceUsage()), o.push(...n.rows), s = e;
191
+ } else c = n.worksheet;
192
192
  } catch (e) {
193
- throw e instanceof c && (this.resourceFailure ??= e), e;
193
+ throw e instanceof m && (this.resourceFailure ??= e), e;
194
194
  }
195
195
  }
196
- u = t;
196
+ l = t;
197
197
  let n = v(e);
198
198
  return {
199
199
  payload: n,
@@ -204,26 +204,26 @@ var B = 64 * 1024 * 1024, V = class {
204
204
  },
205
205
  measureChunk: ({ payload: e }) => e.byteLength,
206
206
  acknowledge: () => {
207
- if (!u) return;
207
+ if (!l) return;
208
208
  let t, r;
209
209
  try {
210
210
  if (this.acceptWorksheet) {
211
- if (!l) throw Error("worksheet terminal payload is missing");
212
- l.rows = l.parseError ? [] : a;
213
- let n = l.parseError ? {
211
+ if (!c) throw Error("worksheet terminal payload is missing");
212
+ c.rows = c.parseError ? [] : o;
213
+ let n = c.parseError ? {
214
214
  rows: 0,
215
215
  cells: 0,
216
216
  ownedUtf8Bytes: 0
217
- } : s, i = A(l, n), o = this.readResourceUsage();
218
- P(i, "get-worksheet-worker", void 0, o), F(i.jsonBytes, "get-worksheet-worker", void 0, o);
219
- let c = this.acceptWorksheet(e, l, i, o);
220
- typeof c == "function" ? t = c : c && ({rollback: t, commit: r} = c);
217
+ } : s, i = A(c, n), a = this.readResourceUsage();
218
+ P(i, "get-worksheet-worker", void 0, a), F(i.jsonBytes, "get-worksheet-worker", void 0, a);
219
+ let l = this.acceptWorksheet(e, c, i, a);
220
+ typeof l == "function" ? t = l : l && ({rollback: t, commit: r} = l);
221
221
  }
222
222
  this.executeArchive((e) => e.acknowledge_sheet_cursor_terminal()), r?.();
223
223
  } catch (e) {
224
- throw t?.(), e instanceof c && (this.resourceFailure ??= e), e;
224
+ throw t?.(), e instanceof m && (this.resourceFailure ??= e), e;
225
225
  }
226
- u = !1, this.sessions.delete(n.sessionId), i();
226
+ l = !1, this.sessions.delete(n.sessionId), i();
227
227
  },
228
228
  cancel: () => {
229
229
  try {
@@ -243,11 +243,11 @@ var B = 64 * 1024 * 1024, V = class {
243
243
  }
244
244
  });
245
245
  this.sessions.set(n.sessionId, {
246
- host: d,
246
+ host: u,
247
247
  identity: n
248
248
  }), this.pendingOpens.delete(n.sessionId);
249
249
  }));
250
- this.operationTail = s.then(() => a, () => void 0);
250
+ this.operationTail = s.then(() => o, () => void 0);
251
251
  try {
252
252
  await s;
253
253
  } catch (e) {
@@ -264,14 +264,14 @@ var B = 64 * 1024 * 1024, V = class {
264
264
  } catch {}
265
265
  }
266
266
  }
267
- dispatch(e, t) {
267
+ dispatch(e, n) {
268
268
  let r = this.sessions.get(e.sessionId);
269
- if (r) return r.host.dispatch(e, t);
270
- let i = this.pendingOpens.get(e.sessionId);
271
- if (i && (e.kind === "cancel" || e.kind === "close")) {
272
- let n = i.identity.operationId === e.operationId && i.identity.generation === e.generation;
273
- return n && (i.canceled = !0), t(n ? {
274
- protocol: a,
269
+ if (r) return r.host.dispatch(e, n);
270
+ let a = this.pendingOpens.get(e.sessionId);
271
+ if (a && (e.kind === "cancel" || e.kind === "close")) {
272
+ let t = a.identity.operationId === e.operationId && a.identity.generation === e.generation;
273
+ return t && (a.canceled = !0), n(t ? {
274
+ protocol: i,
275
275
  kind: "accepted",
276
276
  sessionId: e.sessionId,
277
277
  operationId: e.operationId,
@@ -279,7 +279,7 @@ var B = 64 * 1024 * 1024, V = class {
279
279
  requestId: e.requestId,
280
280
  command: e.kind
281
281
  } : {
282
- protocol: a,
282
+ protocol: i,
283
283
  kind: "error",
284
284
  sessionId: e.sessionId,
285
285
  operationId: e.operationId,
@@ -292,37 +292,37 @@ var B = 64 * 1024 * 1024, V = class {
292
292
  }
293
293
  }), Promise.resolve();
294
294
  }
295
- return e.kind === "cancel" || e.kind === "close" ? (t({
296
- protocol: a,
295
+ return e.kind === "cancel" || e.kind === "close" ? (n({
296
+ protocol: i,
297
297
  kind: "accepted",
298
298
  sessionId: e.sessionId,
299
299
  operationId: e.operationId,
300
300
  generation: e.generation,
301
301
  requestId: e.requestId,
302
302
  command: e.kind
303
- }), Promise.resolve()) : (t({
304
- protocol: a,
303
+ }), Promise.resolve()) : (n({
304
+ protocol: i,
305
305
  kind: "error",
306
306
  sessionId: e.sessionId,
307
307
  operationId: e.operationId,
308
308
  generation: e.generation,
309
309
  requestId: e.requestId,
310
- error: n(/* @__PURE__ */ Error("worksheet pull session is not open"))
310
+ error: t(/* @__PURE__ */ Error("worksheet pull session is not open"))
311
311
  }), Promise.resolve());
312
312
  }
313
- async dispatchSafely(e, t) {
313
+ async dispatchSafely(e, n) {
314
314
  try {
315
- await this.dispatch(e, t);
315
+ await this.dispatch(e, n);
316
316
  } catch (r) {
317
317
  try {
318
- t({
319
- protocol: a,
318
+ n({
319
+ protocol: i,
320
320
  kind: "error",
321
321
  sessionId: e.sessionId,
322
322
  operationId: e.operationId,
323
323
  generation: e.generation,
324
324
  requestId: e.requestId,
325
- error: n(r)
325
+ error: t(r)
326
326
  });
327
327
  } catch {}
328
328
  }
@@ -332,7 +332,7 @@ var B = 64 * 1024 * 1024, V = class {
332
332
  if (this.resourceFailure) throw this.resourceFailure;
333
333
  return e();
334
334
  })).catch((e) => {
335
- throw e instanceof c && (this.resourceFailure ??= e), e;
335
+ throw e instanceof m && (this.resourceFailure ??= e), e;
336
336
  });
337
337
  return this.operationTail = t.then(() => void 0, () => void 0), t;
338
338
  }
@@ -340,7 +340,7 @@ var B = 64 * 1024 * 1024, V = class {
340
340
  for (let e of this.pendingOpens.values()) e.canceled = !0;
341
341
  let e = 1;
342
342
  for (let { host: t, identity: n } of [...this.sessions.values()]) await t.dispatch({
343
- protocol: a,
343
+ protocol: i,
344
344
  kind: "close",
345
345
  ...n,
346
346
  requestId: e++
@@ -356,7 +356,7 @@ var B = 64 * 1024 * 1024, V = class {
356
356
  let t = this.sessions.get(e.sessionId);
357
357
  if (t) {
358
358
  await t.host.dispatch({
359
- protocol: a,
359
+ protocol: i,
360
360
  kind: "close",
361
361
  ...e,
362
362
  requestId: 1
@@ -368,7 +368,7 @@ var B = 64 * 1024 * 1024, V = class {
368
368
  }
369
369
  readResourceUsage() {
370
370
  try {
371
- return r(this.executeArchive((e) => e.sheet_cursor_resource_usage()));
371
+ return n(this.executeArchive((e) => e.sheet_cursor_resource_usage()));
372
372
  } catch (e) {
373
373
  if (String(e).includes("worksheet cursor usage is unavailable")) return;
374
374
  throw e;
@@ -384,11 +384,11 @@ var B = 64 * 1024 * 1024, V = class {
384
384
  if (!Number.isSafeInteger(e) || e < 0) throw RangeError("sheetIndex must be a non-negative safe integer");
385
385
  if (!t) throw TypeError("sheetName must be non-empty");
386
386
  G(n);
387
- let r = this.nextSessionId++, a = {
388
- sessionId: r,
389
- operationId: r,
387
+ let i = this.nextSessionId++, a = {
388
+ sessionId: i,
389
+ operationId: i,
390
390
  generation: this.options.generation ?? 1
391
- }, o = new i(this.options.transport, {
391
+ }, o = new r(this.options.transport, {
392
392
  ...a,
393
393
  maxByteCredit: B,
394
394
  timeoutMs: this.options.timeoutMs,