@silurus/ooxml 0.89.0 → 0.89.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.
Files changed (68) hide show
  1. package/THIRD_PARTY_NOTICES.md +1 -1
  2. package/dist/assets/render-worker-Bye3wDV9.js +35 -0
  3. package/dist/assets/render-worker-CyUrUidp.js +16 -0
  4. package/dist/assets/render-worker-D_SMt5nl.js +15 -0
  5. package/dist/bounded-raw-part-cache-C3daknU-.js +33925 -0
  6. package/dist/{canvas-viewer-mechanics-DfQqRKkD.js → canvas-viewer-mechanics-SZWSnn6j.js} +2 -2
  7. package/dist/{cfb-guard-9QTRTg7f.js → cfb-guard-dNeUiANF.js} +1 -1
  8. package/dist/chart-ex.mjs +477 -477
  9. package/dist/{comment-overlay-controller-B5_zGgG5.js → comment-overlay-controller-CHDxT0e7.js} +16 -16
  10. package/dist/{comment-ui-runtime-Jy-3goA9.js → comment-ui-runtime-BcwaRnMR.js} +3 -3
  11. package/dist/{comment-ui-runtime-D_sb2K6s.js → comment-ui-runtime-Dk2qrPy_.js} +3 -3
  12. package/dist/{document-model-source-BKNrXjAL.js → document-model-source-BD2VSd2L.js} +44 -44
  13. package/dist/{document-pull-client-CxONDGbk.js → document-pull-client-DhSGspvi.js} +6102 -7994
  14. package/dist/{document-pull-worker-AMyXYpPq.js → document-pull-worker-D-E0Iz3P.js} +18 -18
  15. package/dist/{docx-DhDnKEI6.js → docx-CCZBO1WQ.js} +556 -556
  16. package/dist/{docx-D91ER1_S.js → docx-CXfILbzI.js} +24 -24
  17. package/dist/{docx-model-source-CdrSt3hF.js → docx-model-source-Ci6xb487.js} +12 -12
  18. package/dist/docx.mjs +4 -4
  19. package/dist/docx_parser_bg.wasm +0 -0
  20. package/dist/{drawingml-shape-ChcGZNd8.js → drawingml-shape-Bp0yEZHC.js} +55 -55
  21. package/dist/{duotone-ekYik4ix.js → duotone-DN8P4aXe.js} +1 -1
  22. package/dist/{emf-UT6I8rVi.js → emf-CGFQIz6c.js} +60 -60
  23. package/dist/{font-preload-demand-CdJZUMCT.js → font-preload-demand-CGOB-MoE.js} +2 -2
  24. package/dist/{grid-geometry-uQOgViJU.js → grid-geometry-C3IG20ut.js} +1 -1
  25. package/dist/{host-layout-measure-CCEgaC_v.js → host-layout-measure-BAysJILu.js} +1 -1
  26. package/dist/index.mjs +3 -3
  27. package/dist/internal-companion.mjs +2 -2
  28. package/dist/{line-distribute-CPOV6csk.js → line-distribute-DhQqysA2.js} +153 -70
  29. package/dist/{model-source-DJGzDtGb.js → model-source-BkmyX_r-.js} +4 -4
  30. package/dist/{model-source-session-Bu9CHFHc.js → model-source-session-CF4iXav8.js} +18 -18
  31. package/dist/{model-source-session-sKpNiIJI.js → model-source-session-CJmkItIK.js} +10 -10
  32. package/dist/{model-source-session-CDuijwv1.js → model-source-session-CnPCTRDD.js} +2 -2
  33. package/dist/node.mjs +5 -5
  34. package/dist/{bounded-raw-part-cache-B7JoC1CD.js → plot-area-frame-Bs_j4uu7.js} +15189 -37964
  35. package/dist/{pptx-C_uxLVKB.js → pptx-BhmLP_Ed.js} +9 -9
  36. package/dist/{pptx-CDP9dZHe.js → pptx-Bo9hCGQU.js} +58 -58
  37. package/dist/{pptx-model-source-O7LhpOjz.js → pptx-model-source-J0SrVkO6.js} +5 -5
  38. package/dist/pptx.mjs +5 -5
  39. package/dist/pptx_parser_bg.wasm +0 -0
  40. package/dist/{presentation-model-source-tmROzteR.js → presentation-model-source-CebYmrOD.js} +5 -5
  41. package/dist/region-map.mjs +53 -53
  42. package/dist/{render-CJVglUHl.js → render-hT2OVZUi.js} +2 -2
  43. package/dist/{render-worker-host-CyxPU4JU.js → render-worker-host-BmAQ-sWT.js} +1 -1
  44. package/dist/{render-worker-host-aF6aWkC0.js → render-worker-host-Cz224I38.js} +1 -1
  45. package/dist/{render-worker-host-BseIaVvm.js → render-worker-host-Desevuoc.js} +1 -1
  46. package/dist/renderer-BFWqhLEt.js +5833 -0
  47. package/dist/{renderer-CkGLj0CC.js → renderer-CvZ4JmoL.js} +696 -696
  48. package/dist/{resource-measurement-mXw-WjMF.js → resource-measurement-DBiUwblM.js} +162 -161
  49. package/dist/{session-Csv9maad.js → session-CWDKFWCh.js} +176 -176
  50. package/dist/{slide-pull-client-DRZYwBTu.js → slide-pull-client-BuBvXMyc.js} +1454 -1484
  51. package/dist/{three-d-BK5siJgJ.js → three-d-BKwNPAP4.js} +107 -107
  52. package/dist/three-d.mjs +625 -625
  53. package/dist/{wasm-runtime-generation-DX4y0Ecl.js → wasm-runtime-generation-BWGfM44b.js} +4 -4
  54. package/dist/{workbook-model-source-BTC4ISTS.js → workbook-model-source-Che8Zbjw.js} +6 -6
  55. package/dist/worker-source-DrwhR9fw.js +22 -0
  56. package/dist/{worksheet-pull-client-CkHgbtyM.js → worksheet-pull-client-Cxzj6uuB.js} +74 -74
  57. package/dist/{xlsx-D5569TPf.js → xlsx-C5BSwMUd.js} +24 -24
  58. package/dist/{xlsx-CpSDPAEU.js → xlsx-CUVUep5I.js} +433 -421
  59. package/dist/{xlsx-model-source-DPSkjFic.js → xlsx-model-source-C3_PiPBo.js} +55 -55
  60. package/dist/xlsx.mjs +5 -5
  61. package/dist/xlsx_parser_bg.wasm +0 -0
  62. package/package.json +2 -2
  63. package/dist/assets/render-worker-CUOU6mL2.js +0 -16
  64. package/dist/assets/render-worker-DOqrFhSU.js +0 -15
  65. package/dist/assets/render-worker-DvWUdZUN.js +0 -35
  66. package/dist/plot-area-frame-CaJFvZ7p.js +0 -8502
  67. package/dist/renderer-Czw1cCC7.js +0 -5823
  68. package/dist/worker-source-I1cIYBel.js +0 -22
@@ -1,9 +1,9 @@
1
- import { eo as e } from "./plot-area-frame-CaJFvZ7p.js";
2
- import { A as t, H as n, j as r, k as i, q as a } from "./bounded-raw-part-cache-B7JoC1CD.js";
3
- import { S as o, b as s, c, d as l, f as u, g as d, i as f, p, u as m, y as h } from "./worksheet-pull-client-CkHgbtyM.js";
4
- import { t as g } from "./grid-geometry-uQOgViJU.js";
5
- import { o as _, t as v } from "./xlsx-D5569TPf.js";
6
- import { t as y } from "./model-source-DJGzDtGb.js";
1
+ import { yo as e } from "./plot-area-frame-Bs_j4uu7.js";
2
+ import { B as t, D as n, G as r, O as i, k as a } from "./bounded-raw-part-cache-C3daknU-.js";
3
+ import { S as o, b as s, c, d as l, f as u, g as d, i as f, p, u as m, y as h } from "./worksheet-pull-client-Cxzj6uuB.js";
4
+ import { t as g } from "./grid-geometry-C3IG20ut.js";
5
+ import { o as _, t as v } from "./xlsx-C5BSwMUd.js";
6
+ import { t as y } from "./model-source-BkmyX_r-.js";
7
7
  //#region packages/xlsx/src/worksheet-pull-source-worker.ts
8
8
  var b = 64 * 1024 * 1024, x = class {
9
9
  archive;
@@ -12,7 +12,7 @@ var b = 64 * 1024 * 1024, x = class {
12
12
  prepareRows;
13
13
  provisional;
14
14
  worksheetPolicy;
15
- coordinator = new r();
15
+ coordinator = new a();
16
16
  sessions = /* @__PURE__ */ new Map();
17
17
  operationTail = Promise.resolve();
18
18
  pendingOpens = /* @__PURE__ */ new Map();
@@ -42,30 +42,30 @@ var b = 64 * 1024 * 1024, x = class {
42
42
  }
43
43
  });
44
44
  }
45
- async open(n, r, i) {
45
+ async open(t, n, r) {
46
46
  if (this.resourceFailure) throw this.resourceFailure;
47
- let a = this.pendingOpens.get(i.sessionId);
48
- if (!a || a.identity.operationId !== i.operationId || a.identity.generation !== i.generation) throw Error("worksheet pull session open reservation is stale or missing");
47
+ let a = this.pendingOpens.get(r.sessionId);
48
+ if (!a || a.identity.operationId !== r.operationId || a.identity.generation !== r.generation) throw Error("worksheet pull session open reservation is stale or missing");
49
49
  let s = this.worksheetPolicy(), h, g = new Promise((e) => {
50
50
  h = e;
51
51
  }), _ = this.operationTail.then(() => this.coordinator.enqueue(async () => {
52
52
  if (a.canceled) throw Error("worksheet pull session open was canceled");
53
- this.executeArchive((e) => e.open_sheet_cursor(n, r));
53
+ this.executeArchive((e) => e.open_sheet_cursor(t, n));
54
54
  let g = [], _ = {
55
55
  rows: 0,
56
56
  cells: 0,
57
57
  ownedUtf8Bytes: 0
58
- }, v, y = !1, x = new t({
59
- ...i,
58
+ }, v, y = !1, x = new i({
59
+ ...r,
60
60
  maxByteCredit: b,
61
61
  coordinator: this.coordinator,
62
62
  driver: {
63
63
  pull: () => {
64
- let t = this.executeArchive((e) => e.pull_sheet_cursor(128)), r = this.executeArchive((e) => e.sheet_cursor_pull_finished());
64
+ let n = this.executeArchive((e) => e.pull_sheet_cursor(128)), r = this.executeArchive((e) => e.sheet_cursor_pull_finished());
65
65
  if (this.acceptWorksheet) {
66
- let i = f(t, r, void 0, this.prepareRows);
66
+ let i = f(n, r, void 0, this.prepareRows);
67
67
  try {
68
- if (i.kind === "preview") i.worksheet && (i.worksheet.rows = g, d(i.worksheet, s), this.provisional?.preview(n, i.worksheet));
68
+ if (i.kind === "preview") i.worksheet && (i.worksheet.rows = g, d(i.worksheet, s), this.provisional?.preview(t, i.worksheet));
69
69
  else if (i.kind === "rows") {
70
70
  let e = c(_, p(i.rows, s), s);
71
71
  l(e, "get-worksheet-worker", void 0, this.readResourceUsage(), s), g.push(...i.rows), _ = e;
@@ -75,7 +75,7 @@ var b = 64 * 1024 * 1024, x = class {
75
75
  }
76
76
  }
77
77
  y = r;
78
- let i = o(t);
78
+ let i = o(n);
79
79
  return {
80
80
  payload: i,
81
81
  byteLength: i.byteLength,
@@ -86,7 +86,7 @@ var b = 64 * 1024 * 1024, x = class {
86
86
  measureChunk: ({ payload: e }) => e.byteLength,
87
87
  acknowledge: () => {
88
88
  if (!y) return;
89
- let t, r;
89
+ let n, i;
90
90
  try {
91
91
  if (this.acceptWorksheet) {
92
92
  if (!v) throw Error("worksheet terminal payload is missing");
@@ -95,44 +95,44 @@ var b = 64 * 1024 * 1024, x = class {
95
95
  rows: 0,
96
96
  cells: 0,
97
97
  ownedUtf8Bytes: 0
98
- } : _, i = u(v, e, s), a = this.readResourceUsage();
99
- l(i, "get-worksheet-worker", void 0, a, s), m(i.jsonBytes, "get-worksheet-worker", void 0, a, s), d(v, s);
100
- let o = this.acceptWorksheet(n, v, i, a);
101
- typeof o == "function" ? t = o : o && ({rollback: t, commit: r} = o);
98
+ } : _, r = u(v, e, s), a = this.readResourceUsage();
99
+ l(r, "get-worksheet-worker", void 0, a, s), m(r.jsonBytes, "get-worksheet-worker", void 0, a, s), d(v, s);
100
+ let o = this.acceptWorksheet(t, v, r, a);
101
+ typeof o == "function" ? n = o : o && ({rollback: n, commit: i} = o);
102
102
  }
103
- this.executeArchive((e) => e.acknowledge_sheet_cursor_terminal()), r?.();
104
- } catch (n) {
105
- throw t?.(), n instanceof e && (this.resourceFailure ??= n), n;
103
+ this.executeArchive((e) => e.acknowledge_sheet_cursor_terminal()), i?.();
104
+ } catch (t) {
105
+ throw n?.(), t instanceof e && (this.resourceFailure ??= t), t;
106
106
  }
107
- y = !1, this.sessions.delete(i.sessionId), this.provisional?.stop(n), h();
107
+ y = !1, this.sessions.delete(r.sessionId), this.provisional?.stop(t), h();
108
108
  },
109
109
  cancel: () => {
110
110
  try {
111
111
  this.archive() && this.executeArchive((e) => e.cancel_sheet_cursor());
112
112
  } finally {
113
- this.sessions.delete(i.sessionId), this.provisional?.stop(n), h();
113
+ this.sessions.delete(r.sessionId), this.provisional?.stop(t), h();
114
114
  }
115
115
  },
116
116
  close: () => {
117
117
  try {
118
118
  this.archive() && this.executeArchive((e) => e.close_sheet_cursor());
119
119
  } finally {
120
- this.sessions.delete(i.sessionId), this.provisional?.stop(n), h();
120
+ this.sessions.delete(r.sessionId), this.provisional?.stop(t), h();
121
121
  }
122
122
  },
123
123
  resourceUsage: () => this.readResourceUsage()
124
124
  }
125
125
  });
126
- this.sessions.set(i.sessionId, {
126
+ this.sessions.set(r.sessionId, {
127
127
  host: x,
128
- identity: i
129
- }), this.pendingOpens.delete(i.sessionId);
128
+ identity: r
129
+ }), this.pendingOpens.delete(r.sessionId);
130
130
  }));
131
131
  this.operationTail = _.then(() => g, () => void 0);
132
132
  try {
133
133
  await _;
134
134
  } catch (e) {
135
- throw this.pendingOpens.delete(i.sessionId), h(), e;
135
+ throw this.pendingOpens.delete(r.sessionId), h(), e;
136
136
  }
137
137
  }
138
138
  async postOpenedSafely(e, t, n) {
@@ -146,13 +146,13 @@ var b = 64 * 1024 * 1024, x = class {
146
146
  }
147
147
  }
148
148
  dispatch(e, t) {
149
- let n = this.sessions.get(e.sessionId);
150
- if (n) return n.host.dispatch(e, t);
151
- let r = this.pendingOpens.get(e.sessionId);
152
- if (r && (e.kind === "cancel" || e.kind === "close")) {
153
- let n = r.identity.operationId === e.operationId && r.identity.generation === e.generation;
154
- return n && (r.canceled = !0), t(n ? {
155
- protocol: i,
149
+ let i = this.sessions.get(e.sessionId);
150
+ if (i) return i.host.dispatch(e, t);
151
+ let a = this.pendingOpens.get(e.sessionId);
152
+ if (a && (e.kind === "cancel" || e.kind === "close")) {
153
+ let r = a.identity.operationId === e.operationId && a.identity.generation === e.generation;
154
+ return r && (a.canceled = !0), t(r ? {
155
+ protocol: n,
156
156
  kind: "accepted",
157
157
  sessionId: e.sessionId,
158
158
  operationId: e.operationId,
@@ -160,7 +160,7 @@ var b = 64 * 1024 * 1024, x = class {
160
160
  requestId: e.requestId,
161
161
  command: e.kind
162
162
  } : {
163
- protocol: i,
163
+ protocol: n,
164
164
  kind: "error",
165
165
  sessionId: e.sessionId,
166
166
  operationId: e.operationId,
@@ -174,7 +174,7 @@ var b = 64 * 1024 * 1024, x = class {
174
174
  }), Promise.resolve();
175
175
  }
176
176
  return e.kind === "cancel" || e.kind === "close" ? (t({
177
- protocol: i,
177
+ protocol: n,
178
178
  kind: "accepted",
179
179
  sessionId: e.sessionId,
180
180
  operationId: e.operationId,
@@ -182,28 +182,28 @@ var b = 64 * 1024 * 1024, x = class {
182
182
  requestId: e.requestId,
183
183
  command: e.kind
184
184
  }), Promise.resolve()) : (t({
185
- protocol: i,
185
+ protocol: n,
186
186
  kind: "error",
187
187
  sessionId: e.sessionId,
188
188
  operationId: e.operationId,
189
189
  generation: e.generation,
190
190
  requestId: e.requestId,
191
- error: a(/* @__PURE__ */ Error("worksheet pull session is not open"))
191
+ error: r(/* @__PURE__ */ Error("worksheet pull session is not open"))
192
192
  }), Promise.resolve());
193
193
  }
194
194
  async dispatchSafely(e, t) {
195
195
  try {
196
196
  await this.dispatch(e, t);
197
- } catch (n) {
197
+ } catch (i) {
198
198
  try {
199
199
  t({
200
- protocol: i,
200
+ protocol: n,
201
201
  kind: "error",
202
202
  sessionId: e.sessionId,
203
203
  operationId: e.operationId,
204
204
  generation: e.generation,
205
205
  requestId: e.requestId,
206
- error: a(n)
206
+ error: r(i)
207
207
  });
208
208
  } catch {}
209
209
  }
@@ -220,10 +220,10 @@ var b = 64 * 1024 * 1024, x = class {
220
220
  async reset() {
221
221
  for (let e of this.pendingOpens.values()) e.canceled = !0;
222
222
  let e = 1;
223
- for (let { host: t, identity: n } of [...this.sessions.values()]) await t.dispatch({
224
- protocol: i,
223
+ for (let { host: t, identity: r } of [...this.sessions.values()]) await t.dispatch({
224
+ protocol: n,
225
225
  kind: "close",
226
- ...n,
226
+ ...r,
227
227
  requestId: e++
228
228
  }, () => void 0);
229
229
  this.sessions.clear(), await this.operationTail, this.pendingOpens.clear(), this.resourceFailure = void 0;
@@ -237,19 +237,19 @@ var b = 64 * 1024 * 1024, x = class {
237
237
  let t = this.sessions.get(e.sessionId);
238
238
  if (t) {
239
239
  await t.host.dispatch({
240
- protocol: i,
240
+ protocol: n,
241
241
  kind: "close",
242
242
  ...e,
243
243
  requestId: 1
244
244
  }, () => void 0);
245
245
  return;
246
246
  }
247
- let n = this.pendingOpens.get(e.sessionId);
248
- n && n.identity.operationId === e.operationId && n.identity.generation === e.generation && (n.canceled = !0);
247
+ let r = this.pendingOpens.get(e.sessionId);
248
+ r && r.identity.operationId === e.operationId && r.identity.generation === e.generation && (r.canceled = !0);
249
249
  }
250
250
  readResourceUsage() {
251
251
  let e = this.executeArchive((e) => e.sheet_cursor_resource_usage?.());
252
- return e === void 0 ? void 0 : n(e);
252
+ return e === void 0 ? void 0 : t(e);
253
253
  }
254
254
  };
255
255
  //#endregion
@@ -277,7 +277,7 @@ async function w(e, t, n) {
277
277
  let r = s(t), i = {
278
278
  ...t,
279
279
  xlsxWorksheetLimits: r.worksheet
280
- }, { acquireXlsxSessionFromArchive: a, configureHostLayout: o, validateXlsxModelSourceArchive: c, validateXlsxModelSourceViewDefaults: l } = await import("./model-source-session-Bu9CHFHc.js"), u = await y(e, "xlsx", {
280
+ }, { acquireXlsxSessionFromArchive: a, configureHostLayout: o, validateXlsxModelSourceArchive: c, validateXlsxModelSourceViewDefaults: l } = await import("./model-source-session-CF4iXav8.js"), u = await y(e, "xlsx", {
281
281
  ...i,
282
282
  source: i.legacyXls
283
283
  }, c);
@@ -286,7 +286,7 @@ async function w(e, t, n) {
286
286
  try {
287
287
  if (l(d.viewDefaults), f = await o(d.archive, async (e) => {
288
288
  if (!t.factory) return;
289
- let { measureHostLayoutFont: n } = await import("./host-layout-measure-CCEgaC_v.js"), r = t.factory.createCanvas(1, 1).getContext("2d");
289
+ let { measureHostLayoutFont: n } = await import("./host-layout-measure-BAysJILu.js"), r = t.factory.createCanvas(1, 1).getContext("2d");
290
290
  return r ? n(e, r) : void 0;
291
291
  }), t.signal?.aborted) {
292
292
  let e = /* @__PURE__ */ Error("XLSX workbook session was aborted");
package/dist/xlsx.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { $a as e, eo as t } from "./plot-area-frame-CaJFvZ7p.js";
2
- import { u as n } from "./bounded-raw-part-cache-B7JoC1CD.js";
1
+ import { vo as e, yo as t } from "./plot-area-frame-Bs_j4uu7.js";
2
+ import { u as n } from "./bounded-raw-part-cache-C3daknU-.js";
3
3
  import { f as r, u as i } from "./pixel-budget-BpTYrepD.js";
4
4
  import { i as a, t as o } from "./tiff-contract-C6M3QcPp.js";
5
- import { D as s } from "./canvas-viewer-mechanics-DfQqRKkD.js";
6
- import { a as c } from "./worksheet-pull-client-CkHgbtyM.js";
7
- import { a as l, i as u, n as d, o as f, r as p, s as m } from "./xlsx-CpSDPAEU.js";
5
+ import { D as s } from "./canvas-viewer-mechanics-SZWSnn6j.js";
6
+ import { a as c } from "./worksheet-pull-client-Cxzj6uuB.js";
7
+ import { a as l, i as u, n as d, o as f, r as p, s as m } from "./xlsx-CUVUep5I.js";
8
8
  export { u as MAX_SELECTION_AREAS, l as MAX_SELECTION_CONTEXT_CELLS, f as MAX_SELECTION_CONTEXT_TEXT_CHARACTERS, i as OoxmlDecodedImageLimitError, e as OoxmlError, t as OoxmlResourceLimitError, o as TiffDecodeError, d as XlsxSheetViewer, p as XlsxViewer, m as XlsxWorkbook, s as autoResize, r as isOoxmlDecodedImageLimitError, a as isTiffDecodeError, n as openExternalHyperlink, c as resolveSharedStrings };
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silurus/ooxml",
3
- "version": "0.89.0",
3
+ "version": "0.89.2",
4
4
  "description": "Browser-based OOXML viewer (docx/xlsx/pptx) — Rust/WASM parser + Canvas renderer",
5
5
  "license": "MIT",
6
6
  "author": "Yuki Yokotani <silurus.dev@gmail.com>",
@@ -98,7 +98,7 @@
98
98
  "@ast-grep/cli": "^0.43.0",
99
99
  "@babel/parser": "7.29.2",
100
100
  "@chromatic-com/storybook": "^5.1.2",
101
- "@playwright/test": "^1.59.1",
101
+ "@playwright/test": "^1.64.1",
102
102
  "@storybook/addon-a11y": "^10.3.5",
103
103
  "@storybook/addon-docs": "^10.3.5",
104
104
  "@storybook/html-vite": "^10.3.5",