@silurus/ooxml 0.80.3 → 0.82.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 (67) hide show
  1. package/README.md +61 -85
  2. package/dist/assets/render-worker-7-Zr7fSw.js +10 -0
  3. package/dist/assets/render-worker-B5gsW6b5.js +11 -0
  4. package/dist/assets/render-worker-Dw_wQRIh.js +24 -0
  5. package/dist/{canvas-viewer-mechanics-D-r6wHY_.js → canvas-viewer-mechanics-CS_qbr6T.js} +1 -1
  6. package/dist/chart-ex.mjs +1017 -0
  7. package/dist/comment-occurrence-C34fWs_F.js +6 -0
  8. package/dist/comment-ui-runtime-BAe30Ct9.js +112 -0
  9. package/dist/comment-ui-runtime-BUCj4hWn.js +171 -0
  10. package/dist/comment-ui-runtime-F4a3te6p.js +2 -0
  11. package/dist/comments-Cf9W7r3M.js +241 -0
  12. package/dist/{document-pull-client-vxk-Aomu.js → document-pull-client-BCgmytqI.js} +4682 -4541
  13. package/dist/docx-wokGKYfi.js +2162 -0
  14. package/dist/docx.mjs +6 -4
  15. package/dist/docx_parser_bg.wasm +0 -0
  16. package/dist/dom-interaction-boundary-C8F6HO5x.js +119 -0
  17. package/dist/highlight-rect-MaCt0om0.js +13 -0
  18. package/dist/index.mjs +3 -3
  19. package/dist/{line-distribute-Bvtp0Gt6.js → line-distribute-iXsUCIH-.js} +17 -16
  20. package/dist/{line-metrics-DdEJYxjx.js → line-metrics-B3syvDn2.js} +667 -7492
  21. package/dist/math.mjs +2 -2
  22. package/dist/node.mjs +248 -247
  23. package/dist/plot-area-frame-DHV02PJU.js +3670 -0
  24. package/dist/pptx-DU8L8I2T.js +2432 -0
  25. package/dist/pptx.mjs +6 -5
  26. package/dist/pptx_parser_bg.wasm +0 -0
  27. package/dist/read-only-comment-decoration-DcFevX_Q.js +96 -0
  28. package/dist/read-only-comment-margin-Dn2y55W6.js +189 -0
  29. package/dist/region-map.mjs +102 -97
  30. package/dist/{render-CoqMHcbF.js → render-CenWM4g1.js} +1 -1
  31. package/dist/{render-worker-host-IuQFpoJM.js → render-worker-host-BNENN3qP.js} +1 -1
  32. package/dist/{render-worker-host-CYPhmBtX.js → render-worker-host-BmH3kGSj.js} +1 -1
  33. package/dist/{render-worker-host-GlLR1rtF.js → render-worker-host-CmPBviYJ.js} +1 -1
  34. package/dist/renderer-CYr9YTXM.js +5856 -0
  35. package/dist/{renderer-module-contract-BNGz8HvO.js → renderer-module-contract-DLbb7zY0.js} +4 -3
  36. package/dist/{resource-measurement-CgMubiAI.js → resource-measurement-CsW4_eYt.js} +12 -11
  37. package/dist/{session-DkPblDiq.js → session-Cky_swUj.js} +8 -8
  38. package/dist/{slide-pull-client-m2blvngt.js → slide-pull-client-CqTVFb3W.js} +1004 -1091
  39. package/dist/source-key-BklvnEyQ.js +42 -0
  40. package/dist/three-d-7MaVzQuZ.js +1346 -0
  41. package/dist/three-d.mjs +1238 -797
  42. package/dist/types/chart-ex.d.ts +949 -0
  43. package/dist/types/docx.d.ts +497 -28
  44. package/dist/types/index.d.ts +649 -39
  45. package/dist/types/math.d.ts +1 -1
  46. package/dist/types/node.d.ts +385 -22
  47. package/dist/types/pptx.d.ts +435 -24
  48. package/dist/types/region-map.d.ts +318 -6
  49. package/dist/types/three-d.d.ts +318 -6
  50. package/dist/types/xlsx.d.ts +384 -19
  51. package/dist/units-BzZ0gAxs.js +4 -0
  52. package/dist/{worksheet-pull-client-BntP6RiO.js → worksheet-pull-client-CYtwXP5D.js} +19 -19
  53. package/dist/{xlsx-DqMe7J2C.js → xlsx-DlV37-0j.js} +1594 -1349
  54. package/dist/xlsx.mjs +6 -5
  55. package/dist/xlsx_parser_bg.wasm +0 -0
  56. package/package.json +7 -1
  57. package/dist/assets/render-worker-CRaEOHkw.js +0 -9
  58. package/dist/assets/render-worker-DQGLj5Zv.js +0 -22
  59. package/dist/assets/render-worker-rnrSLmqL.js +0 -8
  60. package/dist/chart-number-format-qLhnk6hj.js +0 -475
  61. package/dist/docx-DN0PRx2f.js +0 -1733
  62. package/dist/highlight-rect-BuX5rWP4.js +0 -48
  63. package/dist/pptx-B-Laftl1.js +0 -2134
  64. package/dist/three-d-C28kqDym.js +0 -1086
  65. /package/dist/{mathjax-DgAl7Yi5.js → mathjax-DwIrafQ6.js} +0 -0
  66. /package/dist/{transfer-CKZ79zFw.js → transfer-R6NjgBKD.js} +0 -0
  67. /package/dist/{visible-index-BjesVGhg.js → visible-index-BFE3PWiY.js} +0 -0
package/dist/docx.mjs CHANGED
@@ -1,4 +1,6 @@
1
- import { Rt as e, a as t, cn as n, ln as r, zt as i } from "./line-metrics-DdEJYxjx.js";
2
- import { w as a } from "./canvas-viewer-mechanics-D-r6wHY_.js";
3
- import { a as o, c as s, i as c, n as l, o as u, r as d, s as f } from "./docx-DN0PRx2f.js";
4
- export { s as DocxDocument, d as DocxScrollViewer, c as DocxViewer, e as OoxmlDecodedImageLimitError, n as OoxmlError, r as OoxmlResourceLimitError, a as autoResize, u as buildDocxHighlightLayer, f as buildDocxTextLayer, i as isOoxmlDecodedImageLimitError, l as noteText, t as openExternalHyperlink, o as readDocxTextSelectionContext };
1
+ import { Jt as e, Yt as t, a as n } from "./line-metrics-B3syvDn2.js";
2
+ import { w as r } from "./canvas-viewer-mechanics-CS_qbr6T.js";
3
+ import { a as i, c as a, i as o, l as s, n as c, o as l, r as u, s as d } from "./docx-wokGKYfi.js";
4
+ import { cn as f, ln as p } from "./plot-area-frame-DHV02PJU.js";
5
+ import { n as m, r as h } from "./comments-Cf9W7r3M.js";
6
+ export { a as DocxDocument, u as DocxScrollViewer, o as DocxViewer, f as OoxmlDecodedImageLimitError, e as OoxmlError, t as OoxmlResourceLimitError, r as autoResize, l as buildDocxHighlightLayer, d as buildDocxTextLayer, p as isOoxmlDecodedImageLimitError, c as noteText, n as openExternalHyperlink, i as readDocxTextSelectionContext, m as resolveCommentAnchorRuns, h as resolveDocxCommentThreads, s as resolveRevisionAnchorRuns };
Binary file
@@ -0,0 +1,119 @@
1
+ //#region packages/core/src/layout/virtual-scroll.ts
2
+ function e(e, t, n) {
3
+ return e < t ? t : e > n ? n : e;
4
+ }
5
+ function t(e, t, n) {
6
+ let r = e.length;
7
+ if (r === 0) return {
8
+ offsets: [],
9
+ totalHeight: 0
10
+ };
11
+ let i = n?.leading ?? 0, a = n?.trailing ?? 0, o = Array(r), s = 0;
12
+ for (let n = 0; n < r; n++) o[n] = i + s + n * t, s += e[n];
13
+ return {
14
+ offsets: o,
15
+ totalHeight: i + s + (r - 1) * t + a
16
+ };
17
+ }
18
+ function n(t, n, r, i) {
19
+ let a = t.offsets, o = a.length;
20
+ if (o === 0) return {
21
+ start: 0,
22
+ end: -1,
23
+ topIndex: 0,
24
+ offsets: a,
25
+ totalHeight: 0
26
+ };
27
+ let s = 0, c = o;
28
+ for (; s < c;) {
29
+ let e = s + c >>> 1;
30
+ a[e] <= n ? s = e + 1 : c = e;
31
+ }
32
+ let l = e(s - 1, 0, o - 1), u = n + r;
33
+ for (s = 0, c = o; s < c;) {
34
+ let e = s + c >>> 1;
35
+ a[e] < u ? s = e + 1 : c = e;
36
+ }
37
+ let d = e(s - 1, 0, o - 1);
38
+ return {
39
+ start: e(l - i, 0, o - 1),
40
+ end: e(d + i, 0, o - 1),
41
+ topIndex: l,
42
+ offsets: a,
43
+ totalHeight: t.totalHeight
44
+ };
45
+ }
46
+ function r(t, n, r, i, a, o, s) {
47
+ if (t === 0) return {
48
+ start: 0,
49
+ end: -1,
50
+ topIndex: 0,
51
+ totalHeight: 0
52
+ };
53
+ let c = s?.leading ?? 0, l = s?.trailing ?? 0, u = n + r, d = e(i < c ? 0 : u > 0 ? Math.floor((i - c) / u) : t - 1, 0, t - 1), f = i + a, p = e(f <= c ? 0 : u > 0 ? Math.ceil((f - c) / u) - 1 : t - 1, 0, t - 1);
54
+ return {
55
+ start: e(d - o, 0, t - 1),
56
+ end: e(p + o, 0, t - 1),
57
+ topIndex: d,
58
+ totalHeight: c + t * n + (t - 1) * r + l
59
+ };
60
+ }
61
+ //#endregion
62
+ //#region packages/core/src/internal/comment-context.ts
63
+ var i = 65536;
64
+ function a(e, t) {
65
+ let n = Math.min(e.length, t);
66
+ if (n > 0 && n < e.length) {
67
+ let t = e.charCodeAt(n - 1), r = e.charCodeAt(n);
68
+ t >= 55296 && t <= 56319 && r >= 56320 && r <= 57343 && n--;
69
+ }
70
+ return e.slice(0, n);
71
+ }
72
+ function o(e) {
73
+ if (e !== void 0 && (!Number.isFinite(e) || e < 0)) throw RangeError("maxTextCharacters must be a finite non-negative number.");
74
+ return Math.min(i, Math.floor(e ?? 65536));
75
+ }
76
+ function s(e, t, n) {
77
+ let r = o(n), i = 0, s = !1, c = (e) => {
78
+ let t = a(e.text, Math.max(0, r - i));
79
+ return i += t.length, t.length < e.text.length && (s = !0), {
80
+ ...e,
81
+ text: t
82
+ };
83
+ }, l = Object.freeze({
84
+ root: Object.freeze(c(e)),
85
+ replies: Object.freeze(t.map((e) => Object.freeze(c(e))))
86
+ });
87
+ return Object.freeze({
88
+ thread: l,
89
+ truncated: s,
90
+ textCharacters: i,
91
+ maxTextCharacters: r
92
+ });
93
+ }
94
+ //#endregion
95
+ //#region packages/core/src/internal/dom-interaction-boundary.ts
96
+ function c(e, t) {
97
+ return e.dataset?.[t] !== void 0;
98
+ }
99
+ function l(e, t, n) {
100
+ let r = typeof e.composedPath == "function" ? e.composedPath() : [];
101
+ if (r.length > 0) {
102
+ let e = !1;
103
+ for (let i of r) {
104
+ if (i === t) return e;
105
+ c(i, n) && (e = !0);
106
+ }
107
+ }
108
+ let i = e.target;
109
+ if (!i || !t.contains(i)) return !1;
110
+ let a = i;
111
+ for (; a;) {
112
+ if (c(a, n)) return !0;
113
+ if (a === t) break;
114
+ a = a.parentElement;
115
+ }
116
+ return !1;
117
+ }
118
+ //#endregion
119
+ export { t as a, n as i, s as n, r, l as t };
@@ -0,0 +1,13 @@
1
+ //#region packages/core/src/search/highlight-rect.ts
2
+ function e(e, t, n, r) {
3
+ let i = t <= 0 ? 0 : r(e.slice(0, t)), a = n >= e.length ? r(e) : r(e.slice(0, n));
4
+ return {
5
+ x: i,
6
+ width: Math.max(0, a - i)
7
+ };
8
+ }
9
+ function t(e, t) {
10
+ return t > 0 ? `${e / t * 100}%` : "0%";
11
+ }
12
+ //#endregion
13
+ export { e as n, t };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./docx-DN0PRx2f.js";
2
- import { t } from "./xlsx-DqMe7J2C.js";
3
- import { t as n } from "./pptx-B-Laftl1.js";
1
+ import { t as e } from "./docx-wokGKYfi.js";
2
+ import { t } from "./xlsx-DlV37-0j.js";
3
+ import { t as n } from "./pptx-DU8L8I2T.js";
4
4
  export { e as docx, n as pptx, t as xlsx };
@@ -1,4 +1,5 @@
1
- import { Vt as e, Zt as t, b as n, w as r, x as i } from "./line-metrics-DdEJYxjx.js";
1
+ import { Nt as e, b as t, w as n, x as r } from "./line-metrics-B3syvDn2.js";
2
+ import { _ as i } from "./plot-area-frame-DHV02PJU.js";
2
3
  //#region packages/core/src/fonts/symbol-font.ts
3
4
  var a = {
4
5
  167: "♣",
@@ -912,10 +913,10 @@ function I(e, t, n) {
912
913
  y: e.y + i * o
913
914
  };
914
915
  }
915
- function L(e, n, r, i, a, o, s, c) {
916
+ function L(e, t, n, r, a, o, s, c) {
916
917
  if (a.type === "none") return;
917
- let { lw: l, halfW: u, len: d } = M(a, o, s), f = c ?? t(o.color);
918
- switch (e.save(), e.translate(n, r), e.rotate(i), e.fillStyle = f, e.strokeStyle = f, e.lineWidth = l, e.setLineDash([]), e.beginPath(), a.type) {
918
+ let { lw: l, halfW: u, len: d } = M(a, o, s), f = c ?? i(o.color);
919
+ switch (e.save(), e.translate(t, n), e.rotate(r), e.fillStyle = f, e.strokeStyle = f, e.lineWidth = l, e.setLineDash([]), e.beginPath(), a.type) {
919
920
  case "triangle":
920
921
  case "stealth":
921
922
  e.moveTo(0, 0), e.lineTo(-d, -u), e.lineTo(-d, u), e.closePath(), e.fill();
@@ -935,9 +936,9 @@ function L(e, n, r, i, a, o, s, c) {
935
936
  //#endregion
936
937
  //#region packages/core/src/text/line-distribute.ts
937
938
  var R = (e) => e === 32 || e === 12288;
938
- function z(e, t, a = {}) {
939
- if (Math.abs(t) <= .5) return null;
940
- let o = a.firstContentSi ?? 0, s = a.lastDrawnSi ?? e.length - 1, c = a.minPerGap ?? -Infinity, l = a.isGapChar ?? r, u = a.isWhitespace ?? R, d = a.seaClusterGaps ?? !1, f = [];
939
+ function z(e, i, a = {}) {
940
+ if (Math.abs(i) <= .5) return null;
941
+ let o = a.firstContentSi ?? 0, s = a.lastDrawnSi ?? e.length - 1, c = a.minPerGap ?? -Infinity, l = a.isGapChar ?? n, u = a.isWhitespace ?? R, d = a.seaClusterGaps ?? !1, f = [];
941
942
  for (let t = o; t < e.length; t++) {
942
943
  let n = e[t];
943
944
  if (n === void 0) continue;
@@ -965,20 +966,20 @@ function z(e, t, a = {}) {
965
966
  if (p === -1 || p === m) return null;
966
967
  let h = Array(f.length).fill(!1), g = 0;
967
968
  for (let e = p; e < m; e++) {
968
- let t = f[e];
969
- if (t.si === s) continue;
970
- if (t.ws) {
969
+ let n = f[e];
970
+ if (n.si === s) continue;
971
+ if (n.ws) {
971
972
  h[e] = !0, g++;
972
973
  continue;
973
974
  }
974
- let r = f[e + 1];
975
- if (r.ws) continue;
976
- let a = t.cp, o = r.cp;
977
- (a !== void 0 && l(a) || o !== void 0 && l(o) || d && a !== void 0 && o !== void 0 && i(a) && i(o) && !n(o)) && (h[e] = !0, g++);
975
+ let i = f[e + 1];
976
+ if (i.ws) continue;
977
+ let a = n.cp, o = i.cp;
978
+ (a !== void 0 && l(a) || o !== void 0 && l(o) || d && a !== void 0 && o !== void 0 && r(a) && r(o) && !t(o)) && (h[e] = !0, g++);
978
979
  }
979
980
  if (g === 0) return null;
980
- let _ = t / g;
981
- t < 0 && _ < c && (_ = c);
981
+ let _ = i / g;
982
+ i < 0 && _ < c && (_ = c);
982
983
  let v = /* @__PURE__ */ new Map();
983
984
  for (let e of f) e.cp !== void 0 && v.set(e.si, (v.get(e.si) ?? 0) + 1);
984
985
  let y = /* @__PURE__ */ new Map();