@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,4 +1,4 @@
1
- import { Ar as e, Jr as t, Xr as n, Yr as r, Zr as i, kr as a } from "./plot-area-frame-D3JtHvov.js";
1
+ import { $r as e, Ar as t, ei as n, kr as r, ni as i, ti as a } from "./plot-area-frame-DNYMd9Pf.js";
2
2
  import { f as o, o as s, s as c, t as l, u } from "./pixel-budget-DI82Hn3R.js";
3
3
  var d = {
4
4
  HEADER: 16385,
@@ -379,8 +379,8 @@ var w = class {
379
379
  return [(r - a.left) * a.W / a.boundsW, (i - a.top) * a.H / a.boundsH];
380
380
  }
381
381
  drawImage(e, t) {
382
- let n = (t.flags & 16384) != 0;
383
- if (t.end - t.start < 24 + (n ? 8 : 16)) throw RangeError("Truncated EMF+ DrawImage");
382
+ let r = (t.flags & 16384) != 0;
383
+ if (t.end - t.start < 24 + (r ? 8 : 16)) throw RangeError("Truncated EMF+ DrawImage");
384
384
  let i = this.objects.get(t.flags & 255);
385
385
  if (i?.kind !== "image") {
386
386
  this.target.unsupported.add("EMF+ DrawImage of an unavailable image");
@@ -396,7 +396,7 @@ var w = class {
396
396
  s(12),
397
397
  s(16),
398
398
  s(20)
399
- ], [f, p, m, h] = n ? [
399
+ ], [f, p, m, h] = r ? [
400
400
  0,
401
401
  2,
402
402
  4,
@@ -458,7 +458,7 @@ var w = class {
458
458
  if (this.sourceCopy) try {
459
459
  A.clearRect(Math.min(v, b), Math.min(y, x), Math.abs(b - v), Math.abs(x - y));
460
460
  } catch {}
461
- r(A, k, v, y, b, x) ? this.target.drew = !0 : this.target.unsupported.add("EMF+ DrawImage (the bitmap could not be drawn)");
461
+ n(A, k, v, y, b, x) ? this.target.drew = !0 : this.target.unsupported.add("EMF+ DrawImage (the bitmap could not be drawn)");
462
462
  }
463
463
  }
464
464
  }, T = {
@@ -1196,37 +1196,37 @@ function Je(e) {
1196
1196
  e.moveTo(-1e7, -1e7), e.lineTo(1e7, -1e7), e.lineTo(1e7, 1e7), e.lineTo(-1e7, 1e7), e.closePath();
1197
1197
  }
1198
1198
  function Ye(e) {
1199
- let t = e.u32(), n = e.u32(), r = e.i32();
1199
+ let t = e.u32(), n = e.u32(), i = e.i32();
1200
1200
  e.i32();
1201
- let i = e.u32();
1201
+ let a = e.u32();
1202
1202
  return [t, {
1203
1203
  kind: "pen",
1204
- stroke: (n & 255) == 5 ? null : a(i),
1205
- width: Math.abs(r)
1204
+ stroke: (n & 255) == 5 ? null : r(a),
1205
+ width: Math.abs(i)
1206
1206
  }];
1207
1207
  }
1208
1208
  function Xe(e) {
1209
1209
  let t = e.u32();
1210
1210
  e.skip(16);
1211
- let n = e.u32(), r = e.u32();
1211
+ let n = e.u32(), i = e.u32();
1212
1212
  e.u32();
1213
- let i = e.u32();
1213
+ let a = e.u32();
1214
1214
  return [t, {
1215
1215
  kind: "pen",
1216
- stroke: (n & 255) == 5 ? null : a(i),
1217
- width: Math.abs(r)
1216
+ stroke: (n & 255) == 5 ? null : r(a),
1217
+ width: Math.abs(i)
1218
1218
  }];
1219
1219
  }
1220
1220
  function Ze(e) {
1221
- let t = e.u32(), n = e.u32(), r = e.u32();
1221
+ let t = e.u32(), n = e.u32(), i = e.u32();
1222
1222
  return e.u32(), [t, {
1223
1223
  kind: "brush",
1224
- fill: n === 1 ? null : a(r)
1224
+ fill: n === 1 ? null : r(i)
1225
1225
  }];
1226
1226
  }
1227
- function Qe(e, t, r, i, a, o, s) {
1228
- let c = e.pos - r;
1229
- return i < c || o < c ? null : n(t, r + i, a, r + o, s);
1227
+ function Qe(e, t, n, r, i, o, s) {
1228
+ let c = e.pos - n;
1229
+ return r < c || o < c ? null : a(t, n + r, i, n + o, s);
1230
1230
  }
1231
1231
  function $e(e, t, n) {
1232
1232
  let r = e.u32();
@@ -1263,7 +1263,7 @@ function et(e, t, n) {
1263
1263
  escapement: o
1264
1264
  }];
1265
1265
  }
1266
- function tt(e, n, r, i) {
1266
+ function tt(t, n, r, i) {
1267
1267
  let a = n.pos + n.remaining;
1268
1268
  if (n.remaining < 48) throw RangeError("Truncated EMF text record");
1269
1269
  n.skip(16), n.u32(), n.f32(), n.f32();
@@ -1279,19 +1279,19 @@ function tt(e, n, r, i) {
1279
1279
  p += String.fromCharCode(r.getUint16(t, !0));
1280
1280
  }
1281
1281
  if (p.length === 0) return;
1282
- let m = e.curFont, h = !1;
1282
+ let m = t.curFont, h = !1;
1283
1283
  if (m?.charset === 2 && /[\uf000-\uf0ff]/.test(p)) {
1284
- let n = d === 0 ? t(p, m.face, !0) : null;
1285
- n === null ? Q(e, "EMR_EXTTEXTOUTW (unsupported symbol encoding)") : (p = n, h = !0), h && c > 1 && r.getUint32(i + f - 4, !0) !== 0 && Q(e, "EMR_EXTTEXTOUTW (symbol character advances)");
1284
+ let n = d === 0 ? e(p, m.face, !0) : null;
1285
+ n === null ? Q(t, "EMR_EXTTEXTOUTW (unsupported symbol encoding)") : (p = n, h = !0), h && c > 1 && r.getUint32(i + f - 4, !0) !== 0 && Q(t, "EMR_EXTTEXTOUTW (symbol character advances)");
1286
1286
  }
1287
- let g = Math.abs(m?.height ?? 0) * Ce(e) * Math.abs(z(e)) * we(e);
1287
+ let g = Math.abs(m?.height ?? 0) * Ce(t) * Math.abs(z(t)) * we(t);
1288
1288
  if (!Number.isFinite(g) || g < 1) return;
1289
- let { ctx: _ } = e, [v, y] = B(e, o, s);
1290
- _.fillStyle = e.textColor;
1289
+ let { ctx: _ } = t, [v, y] = B(t, o, s);
1290
+ _.fillStyle = t.textColor;
1291
1291
  let b = m && m.weight >= 700 ? "bold " : "";
1292
1292
  _.font = `${m?.italic ? "italic " : ""}${b}${g}px ${h ? "serif" : m?.face || "sans-serif"}`;
1293
- let x = e.textAlign & 6;
1294
- _.textAlign = x === 2 ? "right" : x === 6 ? "center" : "left", _.textBaseline = (e.textAlign & 24) == 24 ? "alphabetic" : "top";
1293
+ let x = t.textAlign & 6;
1294
+ _.textAlign = x === 2 ? "right" : x === 6 ? "center" : "left", _.textBaseline = (t.textAlign & 24) == 24 ? "alphabetic" : "top";
1295
1295
  let S = m?.escapement ?? 0;
1296
1296
  try {
1297
1297
  if (S !== 0) {
@@ -1302,18 +1302,18 @@ function tt(e, n, r, i) {
1302
1302
  _.restore();
1303
1303
  }
1304
1304
  } else _.fillText(p, v, y);
1305
- e.drew = !0;
1305
+ t.drew = !0;
1306
1306
  } catch {}
1307
1307
  }
1308
- function nt(e, t, n, i, a, o, s, c, l, u, d, f) {
1308
+ function nt(e, t, r, i, a, o, s, c, l, u, d, f) {
1309
1309
  if (o === 0 || c === 0) return;
1310
- let p = Qe(t, n, i, a, o, s, c);
1310
+ let p = Qe(t, r, i, a, o, s, c);
1311
1311
  if (!p) {
1312
1312
  e.unsupported.add("EMF bitmap (DIB encoding)");
1313
1313
  return;
1314
1314
  }
1315
1315
  let [m, h] = B(e, l, u), [g, _] = B(e, d, f);
1316
- r(e.ctx, p, m, h, g, _) && (e.drew = !0);
1316
+ n(e.ctx, p, m, h, g, _) && (e.drew = !0);
1317
1317
  }
1318
1318
  function rt(e, t, n, r) {
1319
1319
  t.skip(16);
@@ -1350,10 +1350,10 @@ function it(e, t, n, r) {
1350
1350
  let u = t.i32(), d = t.i32();
1351
1351
  nt(e, t, n, r, o, s, c, l, i, a, i + u, a + d);
1352
1352
  }
1353
- function at(t, n, r, i, a = {}) {
1353
+ function at(e, n, r, i, a = {}) {
1354
1354
  let o = a;
1355
- if (!e(t) || r <= 0 || i <= 0) return !1;
1356
- let s = new DataView(t.buffer, t.byteOffset, t.byteLength), c = () => ({
1355
+ if (!t(e) || r <= 0 || i <= 0) return !1;
1356
+ let s = new DataView(e.buffer, e.byteOffset, e.byteLength), c = () => ({
1357
1357
  ctx: n,
1358
1358
  W: r,
1359
1359
  H: i,
@@ -1395,20 +1395,20 @@ function at(t, n, r, i, a = {}) {
1395
1395
  clipped: !1,
1396
1396
  outerClipped: !1,
1397
1397
  unsupported: /* @__PURE__ */ new Set()
1398
- }), l = x(t), u = c();
1398
+ }), l = x(e), u = c();
1399
1399
  if (l.play) {
1400
- let e = new w(u);
1401
- if (ot(u, e, l.dual, s, t), e.drawFailed && l.dual) {
1402
- let e = [...u.unsupported];
1400
+ let t = new w(u);
1401
+ if (ot(u, t, l.dual, s, e), t.drawFailed && l.dual) {
1402
+ let t = [...u.unsupported];
1403
1403
  try {
1404
1404
  n.clearRect(0, 0, r, i);
1405
1405
  } catch {}
1406
- u = c(), ot(u, null, !1, s, t);
1407
- for (let t of e) u.unsupported.add(t);
1406
+ u = c(), ot(u, null, !1, s, e);
1407
+ for (let e of t) u.unsupported.add(e);
1408
1408
  }
1409
1409
  } else {
1410
1410
  if (!l.dual) for (let e of l.failures) u.unsupported.add(e);
1411
- ot(u, null, !1, s, t);
1411
+ ot(u, null, !1, s, e);
1412
1412
  }
1413
1413
  return u.unsupported.size > 0 && a.onUnsupported?.([...u.unsupported]), u.drew;
1414
1414
  }
@@ -1421,17 +1421,17 @@ function ot(e, t, n, r, i) {
1421
1421
  for (let t = 0; t <= e.stack.length; t++) a.restore();
1422
1422
  }
1423
1423
  }
1424
- function st(e, t, n, r, i) {
1424
+ function st(e, t, n, i, a) {
1425
1425
  let s = e.ctx, c = 0;
1426
- for (; c + 8 <= i.length;) {
1427
- let l = r.getUint32(c, !0), u = r.getUint32(c + 4, !0);
1428
- if (u < 8 || u & 3 || c + u > i.length) {
1426
+ for (; c + 8 <= a.length;) {
1427
+ let l = i.getUint32(c, !0), u = i.getUint32(c + 4, !0);
1428
+ if (u < 8 || u & 3 || c + u > a.length) {
1429
1429
  e.unsupported.add("EMF record stream (truncated or invalid record size)");
1430
1430
  break;
1431
1431
  }
1432
1432
  let d = c + u;
1433
1433
  if (l === T.EOF) break;
1434
- let f = new DataView(r.buffer, r.byteOffset, d), p = new ne(f, c + 8, d);
1434
+ let f = new DataView(i.buffer, i.byteOffset, d), p = new ne(f, c + 8, d);
1435
1435
  if (t && l !== T.HEADER) {
1436
1436
  if (l === T.GDICOMMENT) {
1437
1437
  if (t.playComment(f, c, d), n && t.drawFailed) break;
@@ -1718,7 +1718,7 @@ function st(e, t, n, r, i) {
1718
1718
  e.fillRule = p.u32() === 1 ? "evenodd" : "nonzero";
1719
1719
  break;
1720
1720
  case T.SETTEXTCOLOR:
1721
- e.textColor = a(p.u32());
1721
+ e.textColor = r(p.u32());
1722
1722
  break;
1723
1723
  case T.SETTEXTALIGN:
1724
1724
  e.textAlign = p.u32();
@@ -1766,12 +1766,12 @@ function st(e, t, n, r, i) {
1766
1766
  c = d;
1767
1767
  }
1768
1768
  }
1769
- async function ct(t, n, r) {
1769
+ async function ct(e, n, r) {
1770
1770
  let a = {
1771
1771
  bitmap: null,
1772
1772
  unsupported: []
1773
1773
  };
1774
- if (!e(t) || n <= 0 || r <= 0) return a;
1774
+ if (!t(e) || n <= 0 || r <= 0) return a;
1775
1775
  let o = i(n, r);
1776
1776
  if (!o) return a;
1777
1777
  let s = o.getContext("2d");
@@ -1779,7 +1779,7 @@ async function ct(t, n, r) {
1779
1779
  s.lineJoin = "round", s.lineCap = "round";
1780
1780
  let c = [];
1781
1781
  return {
1782
- bitmap: at(t, s, n, r, { onUnsupported: (e) => {
1782
+ bitmap: at(e, s, n, r, { onUnsupported: (e) => {
1783
1783
  c = e;
1784
1784
  } }) ? await createImageBitmap(o) : null,
1785
1785
  unsupported: c
@@ -1,5 +1,5 @@
1
- import { m as e } from "./slide-pull-client-BUuJQQVE.js";
2
- import { Kr as t } from "./plot-area-frame-D3JtHvov.js";
1
+ import { m as e } from "./slide-pull-client-3g6TxaKa.js";
2
+ import { Kr as t } from "./plot-area-frame-DNYMd9Pf.js";
3
3
  var n;
4
4
  function r() {
5
5
  return n ??= [
@@ -1,4 +1,4 @@
1
- import { ja as e } from "./plot-area-frame-D3JtHvov.js";
1
+ import { Ia as e } from "./plot-area-frame-DNYMd9Pf.js";
2
2
  function t(e, t = 8) {
3
3
  return Math.trunc((256 * e + Math.trunc(128 / t)) / 256 * t);
4
4
  }
@@ -1,4 +1,4 @@
1
- import { a as e } from "./renderer-IFuBkPvF.js";
1
+ import { a as e } from "./renderer-CCA_bQB8.js";
2
2
  function t(t, n) {
3
3
  return e(t.family, t.sizePt, void 0, !1, t.bold ? 700 : 400, t.italic ? "italic" : "normal", n);
4
4
  }
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./docx-BfLZeiwa.js";
2
- import { t } from "./pptx-CfCiVlNB.js";
3
- import { t as n } from "./xlsx-CCMRAxPB.js";
1
+ import { t as e } from "./docx-DCCDnwrG.js";
2
+ import { t } from "./pptx-Ci1Y9SS_.js";
3
+ import { t as n } from "./xlsx-DTtDjzFq.js";
4
4
  export { e as docx, t as pptx, n as xlsx };
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "./model-source-COXegBNA.js";
2
- var t = "0.89.6", n = class extends Error {
2
+ var t = "0.89.8", n = class extends Error {
3
3
  constructor(n, r) {
4
4
  super(`Companion requires @silurus/ooxml ${n} (${r}); installed runtime is ${t} (${e})`), this.code = "companion-runtime-mismatch", this.name = "CompanionRuntimeMismatchError";
5
5
  }
6
6
  };
7
7
  function r(e, t) {
8
- if (e !== "0.89.6" || t !== "ooxml-model-source-module/v2") throw new n(e, t);
8
+ if (e !== "0.89.8" || t !== "ooxml-model-source-module/v2") throw new n(e, t);
9
9
  }
10
10
  export { n as CompanionRuntimeMismatchError, e as MODEL_SOURCE_MODULE_PROTOCOL, r as assertCompanionRuntime };
@@ -1,5 +1,5 @@
1
- import { Ao as e, ko as t } from "./plot-area-frame-D3JtHvov.js";
2
- import { Lt as n, Rt as r, an as i, in as a, sn as o, tn as s } from "./bounded-raw-part-cache-B8t03tSP.js";
1
+ import { Io as e, Po as t } from "./plot-area-frame-DNYMd9Pf.js";
2
+ import { Bt as n, Vt as r, cn as i, in as a, sn as o, un as s } from "./bounded-raw-part-cache-B5a6cGKO.js";
3
3
  var c = /^\p{Cf}$/u, l = /^\s$/u, u = /^\p{M}$/u, d = /^\p{Script_Extensions=Arabic}$/u, f = /^(?=\p{Script=Arabic})\p{L}$/u;
4
4
  function p(e, t) {
5
5
  for (let n of t) if (!(l.test(n) || c.test(n))) switch (e) {
@@ -10,7 +10,7 @@ function p(e, t) {
10
10
  function m(e, t, n) {
11
11
  let r = [...new Set([
12
12
  0,
13
- ...s(t),
13
+ ...a(t),
14
14
  t.length
15
15
  ])].sort((e, t) => e - t), i = r.slice(0, -1).map((i, a) => {
16
16
  let o = r[a + 1], s = p(e, t.slice(i, o));
@@ -19,28 +19,28 @@ function m(e, t, n) {
19
19
  end: o,
20
20
  cls: s !== "neutral" && s !== "other" && n && !n(i, o) ? "other" : s
21
21
  };
22
- }), a = [], o = 0;
23
- for (; o < i.length;) {
24
- if (i[o].cls === "other") {
25
- a.push({
26
- ...i[o],
22
+ }), o = [], s = 0;
23
+ for (; s < i.length;) {
24
+ if (i[s].cls === "other") {
25
+ o.push({
26
+ ...i[s],
27
27
  inScope: !1
28
- }), o += 1;
28
+ }), s += 1;
29
29
  continue;
30
30
  }
31
- let e = o;
31
+ let e = s;
32
32
  for (; e < i.length && i[e].cls !== "other";) e += 1;
33
- let t = i.slice(o, e).some((e) => e.cls === "proof"), n = !1;
34
- for (let r = o; r < e; r += 1) {
35
- let e = i[r], o = t && (e.cls === "neutral" ? n : !0);
36
- a.push({
33
+ let t = i.slice(s, e).some((e) => e.cls === "proof"), n = !1;
34
+ for (let r = s; r < e; r += 1) {
35
+ let e = i[r], a = t && (e.cls === "neutral" ? n : !0);
36
+ o.push({
37
37
  ...e,
38
- inScope: o
39
- }), n = o;
38
+ inScope: a
39
+ }), n = a;
40
40
  }
41
- o = e;
41
+ s = e;
42
42
  }
43
- return a;
43
+ return o;
44
44
  }
45
45
  function h(e, t, n) {
46
46
  let r = m(e, t), i = r.some((e) => e.cls === "proof");
@@ -2701,7 +2701,7 @@ function q(e, t = {}) {
2701
2701
  pendingLastWidth: 0,
2702
2702
  naturalGapSum: 0,
2703
2703
  gapCount: 0
2704
- }, r = [], c = [], l = t.collect !== !1, u = t.segmentOffset ?? 0, d = t.lastDrawnSi ?? e.length - 1, f = t.isWhitespace ?? K, p = t.isGapChar ?? o, m = (e) => t.gapWidth?.(e.si, e.off, e.cp ?? 0) ?? 1, h = (e, t = "space") => ({
2704
+ }, r = [], c = [], l = t.collect !== !1, u = t.segmentOffset ?? 0, d = t.lastDrawnSi ?? e.length - 1, f = t.isWhitespace ?? K, p = t.isGapChar ?? s, m = (e) => t.gapWidth?.(e.si, e.off, e.cp ?? 0) ?? 1, h = (e, t = "space") => ({
2705
2705
  kind: t,
2706
2706
  codePoint: e.cp,
2707
2707
  segIndex: e.si,
@@ -2709,18 +2709,24 @@ function q(e, t = {}) {
2709
2709
  naturalPx: m(e),
2710
2710
  trailing: e.off === e.len - 1
2711
2711
  }), g = (e) => {
2712
- let o = n.last, u = (e) => e?.cp !== void 0 && e.cp !== 9, f = e.off === 0 && !e.ws && t.leadingGapWidth ? t.leadingGapWidth(e.si) : 0;
2713
- if (f > 0 && n.hasContent && n.pendingCount === 0 && u(o) && u(e) && o.si !== d && (n.naturalGapSum += f, n.gapCount += 1, l && r.push({
2714
- ...h(o, "leading"),
2712
+ let s = n.last, u = (e) => e?.cp !== void 0 && e.cp !== 9, f = e.off === 0 && !e.ws && t.leadingGapWidth ? t.leadingGapWidth(e.si) : 0;
2713
+ if (f > 0 && n.hasContent && n.pendingCount === 0 && u(s) && u(e) && s.si !== d && (n.naturalGapSum += f, n.gapCount += 1, l && r.push({
2714
+ ...h(s, "leading"),
2715
2715
  naturalPx: f
2716
2716
  })), e.ws) {
2717
- n.hasContent && e.si !== d && (n.pendingLastWidth = m(e), n.pendingWidth += n.pendingLastWidth, n.pendingCount += 1, l && c.push(h(e)));
2717
+ if (n.hasContent && e.si !== d) {
2718
+ if (t.seaClusterSpaceGaps && t.seaClusterGaps && n.pendingCount === 0 && s?.cp !== void 0 && i(s.cp) && s.si !== d) {
2719
+ let e = m(s);
2720
+ n.pendingWidth += e, n.pendingCount += 1, l && c.push(h(s, "boundary"));
2721
+ }
2722
+ n.pendingLastWidth = m(e), n.pendingWidth += n.pendingLastWidth, n.pendingCount += 1, l && c.push(h(e));
2723
+ }
2718
2724
  return;
2719
2725
  }
2720
2726
  if (n.pendingCount > 0) {
2721
- if (t.atomicSpaceGaps && e.cp !== void 0 && !s(` ${String.fromCodePoint(e.cp)}`).includes(1) && (n.pendingWidth -= n.pendingLastWidth, --n.pendingCount, l && c.pop()), (!t.textCellSpaceGaps || u(o) && u(e)) && (n.naturalGapSum += n.pendingWidth, n.gapCount += n.pendingCount, l)) for (let e of c) r.push(e);
2727
+ if (t.atomicSpaceGaps && e.cp !== void 0 && !a(` ${String.fromCodePoint(e.cp)}`).includes(1) && (n.pendingWidth -= n.pendingLastWidth, --n.pendingCount, l && c.pop()), (!t.textCellSpaceGaps || u(s) && u(e)) && (n.naturalGapSum += n.pendingWidth, n.gapCount += n.pendingCount, l)) for (let e of c) r.push(e);
2722
2728
  n.pendingWidth = 0, n.pendingCount = 0, n.pendingLastWidth = 0, c = [];
2723
- } else o && o.si !== d && n.hasContent && !_ && (o.cp !== void 0 && p(o.cp) || e.cp !== void 0 && p(e.cp) || t.seaClusterGaps && o.cp !== void 0 && e.cp !== void 0 && i(o.cp) && i(e.cp) && !a(e.cp)) && (n.naturalGapSum += m(o), n.gapCount += 1, l && r.push(h(o, "boundary")));
2729
+ } else s && s.si !== d && n.hasContent && !_ && (s.cp !== void 0 && p(s.cp) || e.cp !== void 0 && p(e.cp) || t.seaClusterGaps && s.cp !== void 0 && e.cp !== void 0 && i(s.cp) && i(e.cp) && !o(e.cp)) && (n.naturalGapSum += m(s), n.gapCount += 1, l && r.push(h(s, "boundary")));
2724
2730
  n.hasContent = !0, n.last = e;
2725
2731
  }, _ = (t.prefix?.pendingCount ?? 0) > 0;
2726
2732
  for (let n = t.firstContentSi ?? 0; n < e.length; n++) {
@@ -1,5 +1,5 @@
1
- import { t as e } from "./cfb-guard-BIaHdonq.js";
2
- import { U as t } from "./bounded-raw-part-cache-B8t03tSP.js";
1
+ import { t as e } from "./cfb-guard-DzYlucez.js";
2
+ import { K as t } from "./bounded-raw-part-cache-B5a6cGKO.js";
3
3
  import { i as n, n as r, o as i } from "./model-source-COXegBNA.js";
4
4
  async function a(a, s, c, l, u = (e) => t(e) ?? e) {
5
5
  let d = a instanceof Uint8Array ? a : new Uint8Array(a), f = c.source === void 0 ? void 0 : i([c.source], s, d);
@@ -1,6 +1,6 @@
1
- import { B as e, N as t, U as n, j as r } from "./bounded-raw-part-cache-B8t03tSP.js";
1
+ import { I as e, K as t, P as n, U as r } from "./bounded-raw-part-cache-B5a6cGKO.js";
2
2
  import { n as i } from "./abort-JztSoyw2.js";
3
- import { b as a } from "./worksheet-pull-client-Du0MuIro.js";
3
+ import { b as a } from "./worksheet-pull-client-BudfclVl.js";
4
4
  import { a as o } from "./model-source-COXegBNA.js";
5
5
  import { t as s } from "./host-layout-Cz_lCuTZ.js";
6
6
  var c = [
@@ -21,45 +21,45 @@ function u(e) {
21
21
  let [t] = Object.keys(e);
22
22
  if (t !== void 0) throw TypeError(`unsupported XLSX model source view default: ${t}`);
23
23
  }
24
- function d(t, n) {
25
- let r = t(), i = n();
24
+ function d(e, t) {
25
+ let n = e(), i = t();
26
26
  return {
27
- workbook: r,
28
- usage: i === void 0 ? void 0 : e(i)
27
+ workbook: n,
28
+ usage: i === void 0 ? void 0 : r(i)
29
29
  };
30
30
  }
31
31
  var f = "XLSX workbook session was aborted";
32
- function p(e, o = {}) {
32
+ function p(r, o = {}) {
33
33
  let s;
34
34
  try {
35
- let n = a(o);
36
- if (!Number.isSafeInteger(e.sourceByteLength) || e.sourceByteLength < 0) throw RangeError("XLSX sourceByteLength must be a non-negative safe integer");
37
- let c = t(o);
38
- s = new r({
35
+ let t = a(o);
36
+ if (!Number.isSafeInteger(r.sourceByteLength) || r.sourceByteLength < 0) throw RangeError("XLSX sourceByteLength must be a non-negative safe integer");
37
+ let c = e(o);
38
+ s = new n({
39
39
  enabled: c.debug || c.onResourceMetrics !== void 0,
40
40
  format: "xlsx",
41
41
  mode: "node",
42
42
  scope: "session",
43
43
  policy: c.policy,
44
- formatLimits: { xlsxWorksheetLimits: { ...n.worksheet } },
44
+ formatLimits: { xlsxWorksheetLimits: { ...t.worksheet } },
45
45
  onMetrics: c.onResourceMetrics,
46
46
  emitToConsole: c.debug
47
- }), s.setSourceBytes(e.sourceByteLength), i(o.signal, f);
48
- let l = e.archive, { workbook: u, usage: p } = d(() => JSON.parse(new TextDecoder().decode(l.parse())), () => l.resource_usage?.());
49
- return e.layoutMetrics && (u.layoutMetrics = { maximumDigitWidth: e.layoutMetrics.maximumDigitWidth }), s.observeUsage(p), s.checkpoint("workbook index ready"), {
47
+ }), s.setSourceBytes(r.sourceByteLength), i(o.signal, f);
48
+ let l = r.archive, { workbook: u, usage: p } = d(() => JSON.parse(new TextDecoder().decode(l.parse())), () => l.resource_usage?.());
49
+ return r.layoutMetrics && (u.layoutMetrics = { maximumDigitWidth: r.layoutMetrics.maximumDigitWidth }), s.observeUsage(p), s.checkpoint("workbook index ready"), {
50
50
  archive: l,
51
51
  workbookIndex: u,
52
52
  usage: p,
53
53
  metrics: s,
54
- worksheetPolicy: n,
55
- closeArchive: () => e.closeArchive()
54
+ worksheetPolicy: t,
55
+ closeArchive: () => r.closeArchive()
56
56
  };
57
- } catch (t) {
57
+ } catch (e) {
58
58
  try {
59
- e.closeArchive();
59
+ r.closeArchive();
60
60
  } catch {}
61
- let r = n(t) ?? t;
62
- throw s?.fail(r), r;
61
+ let n = t(e) ?? e;
62
+ throw s?.fail(n), n;
63
63
  }
64
64
  }
65
65
  export { p as acquireXlsxSessionFromArchive, s as configureHostLayout, l as validateXlsxModelSourceArchive, u as validateXlsxModelSourceViewDefaults };
@@ -1,5 +1,5 @@
1
- import { a as e } from "./slide-pull-client-BUuJQQVE.js";
2
- import { H as t, N as n, j as r } from "./bounded-raw-part-cache-B8t03tSP.js";
1
+ import { a as e } from "./slide-pull-client-3g6TxaKa.js";
2
+ import { G as t, I as n, P as r } from "./bounded-raw-part-cache-B5a6cGKO.js";
3
3
  import { n as i } from "./abort-JztSoyw2.js";
4
4
  import { a } from "./model-source-COXegBNA.js";
5
5
  var o = [
@@ -1,8 +1,8 @@
1
- import { N as e, U as t, j as n } from "./bounded-raw-part-cache-B8t03tSP.js";
1
+ import { I as e, K as t, P as n } from "./bounded-raw-part-cache-B5a6cGKO.js";
2
2
  import { n as r } from "./abort-JztSoyw2.js";
3
3
  import { a as i } from "./model-source-COXegBNA.js";
4
4
  import { t as a } from "./in-process-pull-transport-BPJ7M0uC.js";
5
- import { n as o, r as s, t as c } from "./document-pull-worker-Bkewz-So.js";
5
+ import { n as o, r as s, t as c } from "./document-pull-worker-hMKJ5RdB.js";
6
6
  var l = [
7
7
  "open_document_cursor",
8
8
  "pull_document_chunk",
package/dist/node.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { vo as e, yo as t } from "./plot-area-frame-D3JtHvov.js";
1
+ import { Co as e, wo as t } from "./plot-area-frame-DNYMd9Pf.js";
2
2
  import { f as n, u as r } from "./pixel-budget-DI82Hn3R.js";
3
- import { n as i, r as a } from "./pptx-SmjDGyub.js";
4
- import { n as o, r as s } from "./docx-BC2HQtjg.js";
5
- import { n as c, r as l, t as u } from "./render-CMUEAeHp.js";
6
- import { a as d, i as f, n as p, r as m } from "./xlsx-CD1VeDIg.js";
3
+ import { n as i, r as a } from "./pptx-C1CiFW1D.js";
4
+ import { n as o, r as s } from "./docx-G7pt7ajR.js";
5
+ import { n as c, r as l, t as u } from "./render-Bf_Gywxw.js";
6
+ import { a as d, i as f, n as p, r as m } from "./xlsx-7aY3Pbvh.js";
7
7
  export { r as OoxmlDecodedImageLimitError, e as OoxmlError, t as OoxmlResourceLimitError, u as installImageBitmapShim, c as installOffscreenCanvasShim, n as isOoxmlDecodedImageLimitError, o as materializeDocxDocument, i as materializePptxPresentation, p as materializeXlsxWorkbook, m as materializeXlsxWorkbookIndex, f as materializeXlsxWorksheet, s as openDocxDocument, a as openPptxPresentation, d as openXlsxWorkbook, l as renderSlideNode };