@silurus/ooxml 0.89.8 → 0.89.9

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 (36) hide show
  1. package/README.md +9 -3
  2. package/dist/assets/{render-worker-DJiGqgi0.js → render-worker-CSJJ7vFD.js} +1 -1
  3. package/dist/assets/{render-worker-hPLJ82d2.js → render-worker-jGsxSIGb.js} +23 -23
  4. package/dist/{comment-overlay-controller-B7AoyoDK.js → comment-overlay-controller-b3tKmzMa.js} +11 -7
  5. package/dist/{comment-ui-runtime-C5eWtZSW.js → comment-ui-runtime-BlgDzQx_.js} +3 -3
  6. package/dist/{comment-ui-runtime-CV0I9faV.js → comment-ui-runtime-Bp37ytDC.js} +2 -2
  7. package/dist/{document-model-source-90ext13g.js → document-model-source-BlMfm6po.js} +4 -4
  8. package/dist/{document-pull-client-DSYpUET2.js → document-pull-client-_G-DIh2T.js} +2 -1
  9. package/dist/{docx-G7pt7ajR.js → docx-DE-Di6SH.js} +3 -3
  10. package/dist/{docx-DCCDnwrG.js → docx-Do90Z4L7.js} +5 -5
  11. package/dist/{docx-model-source-Beon3BD5.js → docx-model-source-zYIufUjR.js} +2 -2
  12. package/dist/docx.mjs +1 -1
  13. package/dist/docx_parser_bg.wasm +0 -0
  14. package/dist/{host-layout-measure-Z2fIsmDw.js → host-layout-measure-IFLllYwV.js} +1 -1
  15. package/dist/index.mjs +3 -3
  16. package/dist/internal-companion.mjs +2 -2
  17. package/dist/node.mjs +2 -2
  18. package/dist/{pptx-Ci1Y9SS_.js → pptx-DbjWegUB.js} +27 -12
  19. package/dist/pptx.mjs +1 -1
  20. package/dist/pptx_parser_bg.wasm +0 -0
  21. package/dist/{presentation-model-source-3N7xLtmI.js → presentation-model-source-DLNioq7T.js} +2 -2
  22. package/dist/{render-worker-host-BZoh-wqR.js → render-worker-host-EgUrirnQ.js} +1 -1
  23. package/dist/{render-worker-host-BmVeB_mR.js → render-worker-host-pKls3F_t.js} +1 -1
  24. package/dist/{renderer-CCA_bQB8.js → renderer-DuYC3xXi.js} +1029 -917
  25. package/dist/types/docx.d.ts +3 -3
  26. package/dist/types/index.d.ts +7 -5
  27. package/dist/types/node.d.ts +2 -2
  28. package/dist/types/pptx.d.ts +3 -1
  29. package/dist/types/xlsx.d.ts +1 -1
  30. package/dist/{workbook-model-source-BHR8shXr.js → workbook-model-source-D1dmkDMP.js} +3 -3
  31. package/dist/{xlsx-7aY3Pbvh.js → xlsx-DA0uR1B1.js} +1 -1
  32. package/dist/{xlsx-DTtDjzFq.js → xlsx-DBhYlJKp.js} +652 -640
  33. package/dist/{xlsx-model-source-DXKvb90T.js → xlsx-model-source-zemVDAfl.js} +2 -2
  34. package/dist/xlsx.mjs +1 -1
  35. package/dist/xlsx_parser_bg.wasm +0 -0
  36. package/package.json +1 -1
@@ -141,13 +141,14 @@ var N = class {
141
141
  _collectRuns;
142
142
  _location;
143
143
  _acceptMatch;
144
+ _includeUnit;
144
145
  _runs = /* @__PURE__ */ new Map();
145
146
  _matches = [];
146
147
  _active = -1;
147
148
  _generation = 0;
148
149
  _runsRevision = 0;
149
- constructor(e, t, n, r = () => !0) {
150
- this._count = e, this._collectRuns = t, this._location = n, this._acceptMatch = r;
150
+ constructor(e, t, n, r = () => !0, i = () => !0) {
151
+ this._count = e, this._collectRuns = t, this._location = n, this._acceptMatch = r, this._includeUnit = i;
151
152
  }
152
153
  invalidate() {
153
154
  this._generation++, this._runsRevision++, this._runs.clear(), this._matches = [], this._active = -1;
@@ -182,8 +183,10 @@ var N = class {
182
183
  async find(e, t = {}) {
183
184
  let n = ++this._generation;
184
185
  if (e.length === 0) return this._runsRevision++, this._runs.clear(), this._matches = [], this._active = -1, [];
185
- let r = this._runsRevision, i = new Map(this._runs), a = this._count();
186
+ let r = this._runsRevision, i = new Map(this._runs), a = this._count(), o = [];
187
+ for (let e = 0; e < a; e++) o.push(this._includeUnit(e));
186
188
  for (let e = 0; e < a; e++) {
189
+ if (!o[e]) continue;
187
190
  let t = i.get(e);
188
191
  if (!t) {
189
192
  try {
@@ -197,20 +200,21 @@ var N = class {
197
200
  }
198
201
  }
199
202
  if (n !== this._generation) return [];
200
- let o = r === this._runsRevision ? i : new Map([...i, ...this._runs]), s = [];
203
+ let s = r === this._runsRevision ? i : new Map([...i, ...this._runs]), l = [];
201
204
  for (let n = 0; n < a; n++) {
202
- let r = o.get(n) ?? [];
205
+ if (!o[n]) continue;
206
+ let r = s.get(n) ?? [];
203
207
  for (let i of c(d(r), e, t)) {
204
208
  if (!this._acceptMatch(r, i.slices)) continue;
205
209
  let e = i.slices.map((e) => r[e.runIndex].text.slice(e.start, e.end)).join("");
206
- s.push({
210
+ l.push({
207
211
  unit: n,
208
212
  text: e,
209
213
  slices: i.slices
210
214
  });
211
215
  }
212
216
  }
213
- return this._runsRevision++, this._runs = o, this._matches = s, this._active = -1, this.matches();
217
+ return this._runsRevision++, this._runs = s, this._matches = l, this._active = -1, this.matches();
214
218
  }
215
219
  next() {
216
220
  return this._active = m(this._active, this._matches.length), this._activePublic();
@@ -1,6 +1,6 @@
1
- import { E as e } from "./comment-overlay-controller-B7AoyoDK.js";
2
- import { L as t } from "./document-pull-client-DSYpUET2.js";
3
- import { f as n } from "./docx-DCCDnwrG.js";
1
+ import { E as e } from "./comment-overlay-controller-b3tKmzMa.js";
2
+ import { L as t } from "./document-pull-client-_G-DIh2T.js";
3
+ import { f as n } from "./docx-Do90Z4L7.js";
4
4
  import { i as r, n as i, o as a, r as o, s, t as c } from "./read-only-comment-margin-Ee9Y6vPg.js";
5
5
  import { i as l, n as u, r as d, t as f } from "./read-only-comment-decoration-B06YO2zk.js";
6
6
  function p(e, r) {
@@ -1,6 +1,6 @@
1
1
  import { Fa as e } from "./plot-area-frame-DNYMd9Pf.js";
2
- import { E as t } from "./comment-overlay-controller-B7AoyoDK.js";
3
- import { r as n } from "./pptx-Ci1Y9SS_.js";
2
+ import { E as t } from "./comment-overlay-controller-b3tKmzMa.js";
3
+ import { r as n } from "./pptx-DbjWegUB.js";
4
4
  import { i as r, n as i, o as a, r as o, t as s } from "./read-only-comment-margin-Ee9Y6vPg.js";
5
5
  import { i as c, n as l, r as u, t as d } from "./read-only-comment-decoration-B06YO2zk.js";
6
6
  function f(e, t, n) {
@@ -1,7 +1,7 @@
1
1
  import { $t as e, An as t, I as n, P as r, Xt as i, jn as a } from "./bounded-raw-part-cache-B5a6cGKO.js";
2
- import { P as o, b as s } from "./comment-overlay-controller-B7AoyoDK.js";
3
- import { N as c, _ as l, a as u, d, f, j as p, l as m, o as h, p as g, s as _, v, y } from "./document-pull-client-DSYpUET2.js";
4
- import { _ as b, c as x, g as S, h as C, l as w, m as T, u as E } from "./docx-DCCDnwrG.js";
2
+ import { P as o, b as s } from "./comment-overlay-controller-b3tKmzMa.js";
3
+ import { N as c, _ as l, a as u, d, f, j as p, l as m, o as h, p as g, s as _, v, y } from "./document-pull-client-_G-DIh2T.js";
4
+ import { _ as b, c as x, g as S, h as C, l as w, m as T, u as E } from "./docx-Do90Z4L7.js";
5
5
  import { T as D } from "./canvas-viewer-mechanics-BsqaoYgK.js";
6
6
  import { n as O } from "./renderer-module-contract-BuTx2FWJ.js";
7
7
  import { n as k, o as A, r as j } from "./model-source-COXegBNA.js";
@@ -54,7 +54,7 @@ async function F(j, M = {}, N) {
54
54
  let i = k(r, "docx");
55
55
  try {
56
56
  H.setSourceBytes(n.byteLength), H.checkpoint("container ready");
57
- let r = V === "worker" ? (await import("./render-worker-host-BmVeB_mR.js")).createRenderWorker() : new (await (import("./worker-source-D3NwPe6l.js"))).default(), k, A, j = !1, U = () => {
57
+ let r = V === "worker" ? (await import("./render-worker-host-EgUrirnQ.js")).createRenderWorker() : new (await (import("./worker-source-D3NwPe6l.js"))).default(), k, A, j = !1, U = () => {
58
58
  j || !k || (j = !0, k.destroy());
59
59
  }, W = I(r, i, M, (e) => {
60
60
  k && P(k, e);
@@ -1545,7 +1545,8 @@ function Pi(e, t, n, r) {
1545
1545
  s("image", t, e.imagePath, e.mimeType, n.widthPt, n.heightPt, {
1546
1546
  srcRect: e.srcRect,
1547
1547
  colorReplaceFrom: e.colorReplaceFrom,
1548
- duotone: e.duotone
1548
+ duotone: e.duotone,
1549
+ blipEffects: e.blipEffects
1549
1550
  }, ri(t, e.imagePath));
1550
1551
  }
1551
1552
  let r = `${t.story}:${t.storyInstance}:${t.path.join(".")}`;
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./chunk-D5OxutzX.js";
2
2
  import { wo as t } from "./plot-area-frame-DNYMd9Pf.js";
3
3
  import { G as n, I as r, K as i, P as a, R as o, U as s, Xt as c, ft as l, lt as u } from "./bounded-raw-part-cache-B5a6cGKO.js";
4
- import { a as d, c as f, g as p, i as m, l as h, r as g } from "./document-pull-client-DSYpUET2.js";
4
+ import { a as d, c as f, g as p, i as m, l as h, r as g } from "./document-pull-client-_G-DIh2T.js";
5
5
  import { n as _, t as ee } from "./abort-JztSoyw2.js";
6
6
  import { n as v, r as te, t as y } from "./wasm-loader-KAOyLXzf.js";
7
7
  import { t as b } from "./wasm-runtime-generation-D97yoAXz.js";
@@ -321,7 +321,7 @@ var X = "DOCX document session was aborted", Z = y(() => v(import.meta.url, "doc
321
321
  async function ue(e, t) {
322
322
  if (!t?.factory) throw TypeError("openDocxDocument requires a canvas factory");
323
323
  if (t.legacyDoc !== void 0) {
324
- let { openDocxSource: n } = await import("./docx-model-source-Beon3BD5.js");
324
+ let { openDocxSource: n } = await import("./docx-model-source-zYIufUjR.js");
325
325
  return n(e, t, Z);
326
326
  }
327
327
  let r = c(t.cjkFallback), i = await Y($(e), Z(), t, (e, t, n) => g(e, t, n));
@@ -343,7 +343,7 @@ async function ue(e, t) {
343
343
  }
344
344
  async function de(e, t = {}) {
345
345
  if (t.legacyDoc !== void 0) {
346
- let { materializeDocxSource: n } = await import("./docx-model-source-Beon3BD5.js");
346
+ let { materializeDocxSource: n } = await import("./docx-model-source-zYIufUjR.js");
347
347
  return n(e, t, Z);
348
348
  }
349
349
  return te(async () => {
@@ -2,8 +2,8 @@ import { t as e } from "./chunk-D5OxutzX.js";
2
2
  import { Co as t, Fo as n, Ia as r, So as i, wo as a } from "./plot-area-frame-DNYMd9Pf.js";
3
3
  import { n as o, t as s } from "./cfb-guard-DzYlucez.js";
4
4
  import { $t as c, An as l, F as u, G as d, I as f, P as p, Q as m, Qt as h, W as g, Xt as _, _t as ee, ft as v, jn as y, kn as te, lt as b, p as x, t as ne, vn as re } from "./bounded-raw-part-cache-B5a6cGKO.js";
5
- import { A as S, C as ie, D as C, E as w, M as ae, N as oe, P as T, S as se, T as E, _ as ce, a as le, b as ue, c as de, d as fe, f as pe, g as me, h as he, i as ge, j as _e, k as ve, l as ye, m as be, n as xe, o as Se, p as Ce, r as we, t as Te, u as Ee, v as De, w as Oe, x as ke, y as Ae } from "./comment-overlay-controller-B7AoyoDK.js";
6
- import { A as je, B as Me, C as Ne, D, E as Pe, F as Fe, I as Ie, L as O, M as Le, N as k, O as Re, P as ze, R as Be, S as Ve, T as He, V as A, _ as Ue, a as We, b as Ge, c as Ke, f as qe, h as Je, j, k as Ye, l as Xe, m as Ze, n as Qe, o as $e, p as et, s as tt, t as nt, u as rt, v as it, w as at, x as ot, y as M, z as st } from "./document-pull-client-DSYpUET2.js";
5
+ import { A as S, C as ie, D as C, E as w, M as ae, N as oe, P as T, S as se, T as E, _ as ce, a as le, b as ue, c as de, d as fe, f as pe, g as me, h as he, i as ge, j as _e, k as ve, l as ye, m as be, n as xe, o as Se, p as Ce, r as we, t as Te, u as Ee, v as De, w as Oe, x as ke, y as Ae } from "./comment-overlay-controller-b3tKmzMa.js";
6
+ import { A as je, B as Me, C as Ne, D, E as Pe, F as Fe, I as Ie, L as O, M as Le, N as k, O as Re, P as ze, R as Be, S as Ve, T as He, V as A, _ as Ue, a as We, b as Ge, c as Ke, f as qe, h as Je, j, k as Ye, l as Xe, m as Ze, n as Qe, o as $e, p as et, s as tt, t as nt, u as rt, v as it, w as at, x as ot, y as M, z as st } from "./document-pull-client-_G-DIh2T.js";
7
7
  import { f as ct, u as lt } from "./pixel-budget-DI82Hn3R.js";
8
8
  import { i as ut, t as dt } from "./tiff-contract-DEd8CGuz.js";
9
9
  import { D as ft, E as pt, T as mt, a as ht, b as gt, c as _t, d as vt, f as yt, i as bt, l as xt, n as St, o as Ct, p as wt, r as Tt, s as Et, t as Dt, u as Ot, v as kt, w as At, x as jt, y as Mt } from "./canvas-viewer-mechanics-BsqaoYgK.js";
@@ -1344,7 +1344,7 @@ var Z = class e {
1344
1344
  if (i?.aborted) throw new M();
1345
1345
  };
1346
1346
  if (a(), n.legacyDoc !== void 0) {
1347
- let { loadDocxModelSource: e } = await import("./document-model-source-90ext13g.js"), a = await e(t, n, r);
1347
+ let { loadDocxModelSource: e } = await import("./document-model-source-BlMfm6po.js"), a = await e(t, n, r);
1348
1348
  if (i?.aborted) throw a.destroy(), new M();
1349
1349
  return a;
1350
1350
  }
@@ -1365,7 +1365,7 @@ var Z = class e {
1365
1365
  f = await e.arrayBuffer();
1366
1366
  } else f = t;
1367
1367
  a(), f = o(await s(f, n.password)), a(), g.setSourceBytes(f.byteLength), g.checkpoint("container ready");
1368
- let p = h === "worker" ? (await import("./render-worker-host-BmVeB_mR.js")).createRenderWorker() : new mn(), _ = h === "worker" ? Nt(n) : void 0, ee = h === "worker" && !!n.progressiveLayout, v, b = !1, x = () => {
1368
+ let p = h === "worker" ? (await import("./render-worker-host-EgUrirnQ.js")).createRenderWorker() : new mn(), _ = h === "worker" ? Nt(n) : void 0, ee = h === "worker" && !!n.progressiveLayout, v, b = !1, x = () => {
1369
1369
  b || !v || (b = !0, v.destroy());
1370
1370
  };
1371
1371
  try {
@@ -2760,7 +2760,7 @@ var Nr = Symbol("DocxViewer.borrowedDocument"), Pr = class e {
2760
2760
  }
2761
2761
  }, Lr = 12, Rr = 13, zr = Symbol("DocxScrollViewer.borrowedDocument"), Br;
2762
2762
  function Vr() {
2763
- return Br ??= import("./comment-ui-runtime-C5eWtZSW.js");
2763
+ return Br ??= import("./comment-ui-runtime-BlgDzQx_.js");
2764
2764
  }
2765
2765
  var Hr = class e {
2766
2766
  _pendingLoadAbort = null;
@@ -1,8 +1,8 @@
1
1
  import { G as e, K as t, Xt as n } from "./bounded-raw-part-cache-B5a6cGKO.js";
2
- import { a as r, g as i, i as a, j as o, l as s, r as c } from "./document-pull-client-DSYpUET2.js";
2
+ import { a as r, g as i, i as a, j as o, l as s, r as c } from "./document-pull-client-_G-DIh2T.js";
3
3
  import { r as l } from "./wasm-loader-KAOyLXzf.js";
4
4
  import { r as u } from "./document-pull-worker-hMKJ5RdB.js";
5
- import { i as d, t as f } from "./docx-G7pt7ajR.js";
5
+ import { i as d, t as f } from "./docx-DE-Di6SH.js";
6
6
  import { t as p } from "./model-source-Cch44xsb.js";
7
7
  var m = class extends f {
8
8
  constructor(...e) {
package/dist/docx.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Co as e, wo as t } from "./plot-area-frame-DNYMd9Pf.js";
2
2
  import { p as n } from "./bounded-raw-part-cache-B5a6cGKO.js";
3
- import { a as r, c as i, d as a, f as o, i as s, n as c, o as l, p as u, r as d, s as f } from "./docx-DCCDnwrG.js";
3
+ import { a as r, c as i, d as a, f as o, i as s, n as c, o as l, p as u, r as d, s as f } from "./docx-Do90Z4L7.js";
4
4
  import { f as p, u as m } from "./pixel-budget-DI82Hn3R.js";
5
5
  import { i as h, t as g } from "./tiff-contract-DEd8CGuz.js";
6
6
  import { D as _ } from "./canvas-viewer-mechanics-BsqaoYgK.js";
Binary file
@@ -1,4 +1,4 @@
1
- import { a as e } from "./renderer-CCA_bQB8.js";
1
+ import { a as e } from "./renderer-DuYC3xXi.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-DCCDnwrG.js";
2
- import { t } from "./pptx-Ci1Y9SS_.js";
3
- import { t as n } from "./xlsx-DTtDjzFq.js";
1
+ import { t as e } from "./docx-Do90Z4L7.js";
2
+ import { t } from "./pptx-DbjWegUB.js";
3
+ import { t as n } from "./xlsx-DBhYlJKp.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.8", n = class extends Error {
2
+ var t = "0.89.9", 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.8" || t !== "ooxml-model-source-module/v2") throw new n(e, t);
8
+ if (e !== "0.89.9" || 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 };
package/dist/node.mjs CHANGED
@@ -1,7 +1,7 @@
1
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
3
  import { n as i, r as a } from "./pptx-C1CiFW1D.js";
4
- import { n as o, r as s } from "./docx-G7pt7ajR.js";
4
+ import { n as o, r as s } from "./docx-DE-Di6SH.js";
5
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";
6
+ import { a as d, i as f, n as p, r as m } from "./xlsx-DA0uR1B1.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 };
@@ -3,7 +3,7 @@ import { a as t, c as n, d as r, f as i, i as a, l as o, n as s, o as c, p as l,
3
3
  import { Co as m, Fa as h, Fo as g, Io as _, wo as v } from "./plot-area-frame-DNYMd9Pf.js";
4
4
  import { n as ee, t as y } from "./cfb-guard-DzYlucez.js";
5
5
  import { $ as b, $t as x, F as te, G as S, I as C, On as w, P as ne, Q as T, Qt as re, W as ie, Xt as ae, _t as oe, en as E, ft as se, hn as ce, lt as le, n as ue, p as D, t as de, vn as fe } from "./bounded-raw-part-cache-B5a6cGKO.js";
6
- import { C as pe, D as me, E as O, N as he, O as ge, P as k, S as _e, T as A, _ as ve, a as ye, b as be, c as xe, d as Se, f as Ce, g as we, h as Te, i as Ee, l as De, m as Oe, n as ke, o as Ae, p as je, r as Me, t as Ne, u as Pe, v as Fe, w as j, x as Ie, y as Le } from "./comment-overlay-controller-B7AoyoDK.js";
6
+ import { C as pe, D as me, E as O, N as he, O as ge, P as k, S as _e, T as A, _ as ve, a as ye, b as be, c as xe, d as Se, f as Ce, g as we, h as Te, i as Ee, l as De, m as Oe, n as ke, o as Ae, p as je, r as Me, t as Ne, u as Pe, v as Fe, w as j, x as Ie, y as Le } from "./comment-overlay-controller-b3tKmzMa.js";
7
7
  import { f as M, u as Re } from "./pixel-budget-DI82Hn3R.js";
8
8
  import { i as ze, t as Be } from "./tiff-contract-DEd8CGuz.js";
9
9
  import { D as Ve, E as He, T as Ue, a as N, b as We, c as Ge, f as Ke, i as qe, l as Je, n as Ye, o as P, p as Xe, r as Ze, s as Qe, t as $e, u as F, v as et, w as tt, x as nt, y as rt } from "./canvas-viewer-mechanics-BsqaoYgK.js";
@@ -101,8 +101,8 @@ function pt(e, t) {
101
101
  return !0;
102
102
  }
103
103
  var mt = class extends pe {
104
- constructor(e, t) {
105
- super(e, t, (e) => ({ slide: e }), pt);
104
+ constructor(e, t, n) {
105
+ super(e, t, (e) => ({ slide: e }), pt, n);
106
106
  }
107
107
  slideRuns(e) {
108
108
  return this.unitRuns(e);
@@ -858,7 +858,7 @@ var X = class e {
858
858
  }
859
859
  static async load(t, n = {}) {
860
860
  if (n.legacyPpt !== void 0) {
861
- let { loadPptxModelSource: e } = await import("./presentation-model-source-3N7xLtmI.js");
861
+ let { loadPptxModelSource: e } = await import("./presentation-model-source-DLNioq7T.js");
862
862
  return e(t, n);
863
863
  }
864
864
  let r = ae(n.cjkFallback), i = C(n), a = n.mode ?? "main", o = new ne({
@@ -1596,7 +1596,7 @@ var hn = Symbol("PptxViewer.borrowedPresentation"), gn = {
1596
1596
  let a = new Ze(this.wrapper, t.enableTextSelection === !0, t.enableElementSelection === !0);
1597
1597
  this.textLayer = a.textLayer, this.highlightLayer = a.highlightLayer, this.elementLayer = a.elementLayer, this._loadingIndicator = mn(this.wrapper), this.wrapper.insertBefore(this._loadingIndicator.layer, this.elementLayer), this.textLayer && (t.onSelectionContextChange || t.enableElementSelection) && (this.selectionChangeListener = () => this._emitSelectionContextChange(), this.wrapper.ownerDocument.addEventListener("selectionchange", this.selectionChangeListener)), t.enableElementSelection && (this.elementClickListener = (e) => {
1598
1598
  this._onElementClick(e).catch((e) => this._reportRenderError(e));
1599
- }, this.wrapper.addEventListener("click", this.elementClickListener)), t.onContextMenu && (this.contextMenuListener = (e) => this._onContextMenu(e), this.wrapper.addEventListener("contextmenu", this.contextMenuListener)), this._find = new mt(() => this.slideCount, (e) => this._collectSlideRuns(e)), n && this._bindLayoutPresentation(n);
1599
+ }, this.wrapper.addEventListener("click", this.elementClickListener)), t.onContextMenu && (this.contextMenuListener = (e) => this._onContextMenu(e), this.wrapper.addEventListener("contextmenu", this.contextMenuListener)), this._find = new mt(() => this.slideCount, (e) => this._collectSlideRuns(e), (e) => !(this._hiddenMode === "skip" && this.engine?.isHidden(e))), n && this._bindLayoutPresentation(n);
1600
1600
  }
1601
1601
  async load(e) {
1602
1602
  if (this.destroyed) throw Error("PptxViewer is destroyed");
@@ -1644,7 +1644,13 @@ var hn = Symbol("PptxViewer.borrowedPresentation"), gn = {
1644
1644
  }
1645
1645
  async _goToSlide(e, t) {
1646
1646
  if (t !== this._navigationGeneration || !this.engine || this.slideCount === 0) return;
1647
- let n = Math.max(0, Math.min(e, this.slideCount - 1)), r = n !== this.currentSlide;
1647
+ let n = Math.max(0, Math.min(e, this.slideCount - 1));
1648
+ if (this._hiddenMode === "skip") {
1649
+ let e = await this._nearestShownSlide(n, t);
1650
+ if (t !== this._navigationGeneration) return;
1651
+ typeof e == "number" && (n = e);
1652
+ }
1653
+ let r = n !== this.currentSlide;
1648
1654
  r && this._invalidateElementSelection(!1), this.currentSlide = n, await this.renderCurrentSlide(), r && !this.destroyed && this._emitSelectionContextChange();
1649
1655
  }
1650
1656
  async nextSlide() {
@@ -1658,11 +1664,20 @@ var hn = Symbol("PptxViewer.borrowedPresentation"), gn = {
1658
1664
  async _step(e, t) {
1659
1665
  let n = this.engine, r = this.currentSlide;
1660
1666
  if (this._hiddenMode !== "skip" || !n) return r + e;
1661
- for (let i = r + e; i >= 0 && i < this.slideCount; i += e) {
1662
- if (i >= n.availableSlideCount && (n.layoutComplete || this._setLoading(!0), !await this._waitForSlide(n, i, () => t === this._navigationGeneration))) return r;
1663
- if (!n.isHidden(i)) return i;
1667
+ let i = await this._scanShown(r + e, e, t);
1668
+ return typeof i == "number" ? i : r;
1669
+ }
1670
+ async _scanShown(e, t, n) {
1671
+ let r = this.engine;
1672
+ if (!r) return null;
1673
+ for (let i = e; i >= 0 && i < this.slideCount; i += t) {
1674
+ if (i >= r.availableSlideCount && (r.layoutComplete || this._setLoading(!0), !await this._waitForSlide(r, i, () => n === this._navigationGeneration))) return null;
1675
+ if (!r.isHidden(i)) return i;
1664
1676
  }
1665
- return r;
1677
+ }
1678
+ async _nearestShownSlide(e, t) {
1679
+ let n = await this._scanShown(e, 1, t);
1680
+ return n === void 0 ? await this._scanShown(e - 1, -1, t) : n;
1666
1681
  }
1667
1682
  async _initialSlide(e) {
1668
1683
  let t = this.engine;
@@ -1678,7 +1693,7 @@ var hn = Symbol("PptxViewer.borrowedPresentation"), gn = {
1678
1693
  }
1679
1694
  async setHiddenSlideMode(e) {
1680
1695
  let t = this._beginNavigation();
1681
- this._hiddenMode = e;
1696
+ this._hiddenMode === "skip" != (e === "skip") && this._invalidateFind(), this._hiddenMode = e;
1682
1697
  let n = this.currentSlide;
1683
1698
  if (e === "skip" && this.engine) {
1684
1699
  let e = this.engine;
@@ -2196,7 +2211,7 @@ var vn = class {
2196
2211
  }
2197
2212
  }, xn = 12, Sn;
2198
2213
  function Cn() {
2199
- return Sn ??= import("./comment-ui-runtime-CV0I9faV.js");
2214
+ return Sn ??= import("./comment-ui-runtime-Bp37ytDC.js");
2200
2215
  }
2201
2216
  var wn = 440, Tn = 20, En = Symbol("PptxScrollViewer.borrowedPresentation"), Dn = class e {
2202
2217
  _presentationOwner;
package/dist/pptx.mjs CHANGED
@@ -4,5 +4,5 @@ import { p as r } from "./bounded-raw-part-cache-B5a6cGKO.js";
4
4
  import { f as i, u as a } from "./pixel-budget-DI82Hn3R.js";
5
5
  import { i as o, t as s } from "./tiff-contract-DEd8CGuz.js";
6
6
  import { D as c } from "./canvas-viewer-mechanics-BsqaoYgK.js";
7
- import { a as l, c as u, i as d, l as f, n as p, o as m } from "./pptx-Ci1Y9SS_.js";
7
+ import { a as l, c as u, i as d, l as f, n as p, o as m } from "./pptx-DbjWegUB.js";
8
8
  export { a as OoxmlDecodedImageLimitError, t as OoxmlError, n as OoxmlResourceLimitError, m as PptxPresentation, p as PptxScrollViewer, d as PptxViewer, s as TiffDecodeError, c as autoResize, u as buildPptxHighlightLayer, f as buildPptxTextLayer, i as isOoxmlDecodedImageLimitError, o as isTiffDecodeError, r as openExternalHyperlink, l as readPptxTextSelectionContext, e as renderSlide };
Binary file
@@ -1,8 +1,8 @@
1
1
  import { I as e, P as t, Xt as n } from "./bounded-raw-part-cache-B5a6cGKO.js";
2
- import { b as r } from "./comment-overlay-controller-B7AoyoDK.js";
2
+ import { b as r } from "./comment-overlay-controller-b3tKmzMa.js";
3
3
  import { T as i } from "./canvas-viewer-mechanics-BsqaoYgK.js";
4
4
  import { n as a } from "./renderer-module-contract-BuTx2FWJ.js";
5
- import { o, s } from "./pptx-Ci1Y9SS_.js";
5
+ import { o, s } from "./pptx-DbjWegUB.js";
6
6
  import { n as c, o as l, r as u } from "./model-source-COXegBNA.js";
7
7
  import { t as d } from "./bundled-asset-url-BMJ8vNHP.js";
8
8
  async function f(u, d) {
@@ -1,4 +1,4 @@
1
- var e = "" + new URL("./assets/render-worker-hPLJ82d2.js", import.meta.url).href;
1
+ var e = "" + new URL("./assets/render-worker-CSJJ7vFD.js", import.meta.url).href;
2
2
  function t() {
3
3
  return new Worker(e, { type: "module" });
4
4
  }
@@ -1,4 +1,4 @@
1
- var e = "" + new URL("./assets/render-worker-DJiGqgi0.js", import.meta.url).href;
1
+ var e = "" + new URL("./assets/render-worker-jGsxSIGb.js", import.meta.url).href;
2
2
  function t() {
3
3
  return new Worker(e, { type: "module" });
4
4
  }