@silurus/ooxml 0.87.0 → 0.89.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.
- package/README.md +118 -23
- package/THIRD_PARTY_NOTICES.md +7 -6
- package/dist/abort-VrnK7mdP.js +10 -0
- package/dist/assets/render-worker-CUOU6mL2.js +16 -0
- package/dist/assets/render-worker-DOqrFhSU.js +15 -0
- package/dist/assets/render-worker-DvWUdZUN.js +35 -0
- package/dist/bounded-raw-part-cache-B7JoC1CD.js +64586 -0
- package/dist/bundled-asset-url-E2nXURF9.js +15 -0
- package/dist/canvas-viewer-mechanics-DfQqRKkD.js +675 -0
- package/dist/cfb-guard-9QTRTg7f.js +528 -0
- package/dist/chart-ex.mjs +708 -739
- package/dist/comment-overlay-controller-B5_zGgG5.js +994 -0
- package/dist/comment-ui-runtime-B7ZvovcS.js +2 -0
- package/dist/{comment-ui-runtime-DcJOYlw-.js → comment-ui-runtime-D_sb2K6s.js} +5 -5
- package/dist/{comment-ui-runtime-BfE7MJZn.js → comment-ui-runtime-Jy-3goA9.js} +5 -5
- package/dist/delimited-text-worker-host-CikWU6_m.js +27 -0
- package/dist/document-model-source-BKNrXjAL.js +249 -0
- package/dist/document-pull-client-CxONDGbk.js +37833 -0
- package/dist/document-pull-worker-AMyXYpPq.js +104 -0
- package/dist/docx-D91ER1_S.js +495 -0
- package/dist/docx-DhDnKEI6.js +3563 -0
- package/dist/docx-model-source-CdrSt3hF.js +98 -0
- package/dist/docx-source-worker.mjs +455 -0
- package/dist/docx.mjs +7 -7
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/drawingml-shape-ChcGZNd8.js +310 -0
- package/dist/duotone-ekYik4ix.js +126 -0
- package/dist/emf-UT6I8rVi.js +1790 -0
- package/dist/font-preload-demand-CdJZUMCT.js +2058 -0
- package/dist/grid-geometry-uQOgViJU.js +384 -0
- package/dist/host-layout-DVMw8hDY.js +56 -0
- package/dist/host-layout-measure-CCEgaC_v.js +7 -0
- package/dist/in-process-pull-transport-DuXcPZng.js +29 -0
- package/dist/index.mjs +4 -4
- package/dist/internal-companion.mjs +12 -0
- package/dist/line-distribute-CPOV6csk.js +2716 -0
- package/dist/math.mjs +2 -2
- package/dist/mathjax-stix2.js +10 -10
- package/dist/model-source-DJGzDtGb.js +61 -0
- package/dist/model-source-kz_NkZqT.js +179 -0
- package/dist/model-source-session-Bu9CHFHc.js +71 -0
- package/dist/model-source-session-CDuijwv1.js +85 -0
- package/dist/model-source-session-sKpNiIJI.js +58 -0
- package/dist/node.mjs +7 -1327
- package/dist/{pixel-budget-Dgjw269h.js → pixel-budget-BpTYrepD.js} +13 -10
- package/dist/plot-area-frame-CaJFvZ7p.js +8502 -0
- package/dist/pptx-CDP9dZHe.js +2936 -0
- package/dist/pptx-C_uxLVKB.js +183 -0
- package/dist/pptx-model-source-O7LhpOjz.js +37 -0
- package/dist/pptx-source-worker.mjs +446 -0
- package/dist/pptx.mjs +8 -7
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/presentation-model-source-tmROzteR.js +77 -0
- package/dist/raster-target-YQ4G6rxo.js +42 -0
- package/dist/region-map.mjs +114 -150
- package/dist/{render-8Zo7dnds.js → render-CJVglUHl.js} +3 -3
- package/dist/{render-worker-host-BfbnEChF.js → render-worker-host-BseIaVvm.js} +1 -1
- package/dist/{render-worker-host-DNL9dWRh.js → render-worker-host-CyxPU4JU.js} +1 -1
- package/dist/{render-worker-host-IkHrYOci.js → render-worker-host-aF6aWkC0.js} +1 -1
- package/dist/renderer-CkGLj0CC.js +5170 -0
- package/dist/renderer-Czw1cCC7.js +5823 -0
- package/dist/resource-measurement-mXw-WjMF.js +771 -0
- package/dist/session-Csv9maad.js +656 -0
- package/dist/slide-pull-client-DRZYwBTu.js +6515 -0
- package/dist/three-d-BK5siJgJ.js +878 -0
- package/dist/three-d.mjs +871 -764
- package/dist/{raster-target-ojDdQizC.js → tiff-contract-C6M3QcPp.js} +1 -42
- package/dist/tiff.mjs +401 -248
- package/dist/types/chart-ex.d.ts +289 -4
- package/dist/types/docx.d.ts +473 -98
- package/dist/types/index.d.ts +674 -303
- package/dist/types/internal-companion.d.ts +11 -0
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +530 -11
- package/dist/types/pptx.d.ts +410 -97
- package/dist/types/region-map.d.ts +289 -4
- package/dist/types/three-d.d.ts +289 -4
- package/dist/types/tiff.d.ts +1 -1
- package/dist/types/xlsx.d.ts +483 -134
- package/dist/wasm-loader-rlgHmcSv.js +35 -0
- package/dist/wasm-runtime-generation-DX4y0Ecl.js +97 -0
- package/dist/workbook-model-source-BTC4ISTS.js +94 -0
- package/dist/worker-source-I1cIYBel.js +22 -0
- package/dist/worker-source-SbudzjYL.js +22 -0
- package/dist/worker-source-UAi3GNcM.js +22 -0
- package/dist/worksheet-pull-client-CkHgbtyM.js +579 -0
- package/dist/xlsx-CpSDPAEU.js +5809 -0
- package/dist/xlsx-D5569TPf.js +534 -0
- package/dist/xlsx-model-source-DPSkjFic.js +309 -0
- package/dist/xlsx-source-worker.mjs +525 -0
- package/dist/xlsx.mjs +8 -7
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +42 -16
- package/dist/assets/render-worker-CeK_iqK3.js +0 -10
- package/dist/assets/render-worker-DusrDhPk.js +0 -11
- package/dist/assets/render-worker-n2ZG0lrQ.js +0 -31
- package/dist/bounded-raw-part-cache-Cg1BsSZQ.js +0 -119
- package/dist/canvas-viewer-mechanics-Cpk0YFvM.js +0 -1384
- package/dist/cjk-fallback-bLI3z70h.js +0 -46
- package/dist/comment-occurrence-C8Y2uoVr.js +0 -6
- package/dist/comment-ui-runtime-BsK8pmUT.js +0 -2
- package/dist/comments-Diid5ujN.js +0 -246
- package/dist/delimited-text-worker-host-BVY-Ecni.js +0 -27
- package/dist/document-pull-client-yKxI8aDH.js +0 -27251
- package/dist/docx-BkSRiy07.js +0 -2995
- package/dist/dom-interaction-boundary-CBUQJsIM.js +0 -223
- package/dist/highlight-rect-C5hkRqUr.js +0 -13
- package/dist/hyperlink-ArrU3ArU.js +0 -36447
- package/dist/line-distribute-Dtudnqhs.js +0 -1023
- package/dist/line-metrics-B60C86uh.js +0 -60
- package/dist/plot-area-frame-D5hEOgkJ.js +0 -2903
- package/dist/pptx-62MmVbYB.js +0 -3063
- package/dist/renderer-XFSCOT6m.js +0 -5857
- package/dist/resource-measurement-CJsgolre.js +0 -150
- package/dist/session-CrU8f8DI.js +0 -743
- package/dist/slide-pull-client-B9KA8bU6.js +0 -6253
- package/dist/source-key-DIJG8BA0.js +0 -42
- package/dist/three-d-YYghQndN.js +0 -1346
- package/dist/transfer-p6iCC2R7.js +0 -6
- package/dist/units-EJdC96r6.js +0 -4
- package/dist/worksheet-pull-client-eIcQ-xlD.js +0 -458
- package/dist/xlsx-CRcSzZNq.js +0 -8482
- /package/dist/{chunk-DmhlhrBa.js → chunk-Dy4uBu1J.js} +0 -0
- /package/dist/{mathjax-DoyWZbSp.js → mathjax-BhwN6ilc.js} +0 -0
- /package/dist/{read-only-comment-decoration-Dz7eTQ4d.js → read-only-comment-decoration-PidH0wnP.js} +0 -0
- /package/dist/{read-only-comment-margin-DkgzASAl.js → read-only-comment-margin-B52rDVKo.js} +0 -0
- /package/dist/{renderer-module-contract-D91rkYHH.js → renderer-module-contract-CWM7jv6d.js} +0 -0
- /package/dist/{visible-index-BgiHEc1z.js → visible-index-FeVA0mGE.js} +0 -0
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { at as e, dt as t, mt as n, pt as r, vt as i } from "./hyperlink-ArrU3ArU.js";
|
|
2
|
-
import { an as a } from "./plot-area-frame-D5hEOgkJ.js";
|
|
3
|
-
import { i as o } from "./pixel-budget-Dgjw269h.js";
|
|
4
|
-
import { r as s } from "./raster-target-ojDdQizC.js";
|
|
5
|
-
//#region packages/core/src/image/duotone-bitmap-by-path.ts
|
|
6
|
-
function c(e, t) {
|
|
7
|
-
return t ? `${e}|duo:${t.clr1}:${t.clr2}` : e;
|
|
8
|
-
}
|
|
9
|
-
var l = "duotone";
|
|
10
|
-
async function u(u, d, f, p, m = {}) {
|
|
11
|
-
let { offscreenFactory: h, failClosedOnDuotoneFailure: g = !1, ..._ } = m, v = f ? {
|
|
12
|
-
..._,
|
|
13
|
-
maxRetainedPixels: Math.min(_.maxRetainedPixels ?? 33554432, Math.floor(o / 4))
|
|
14
|
-
} : _, y = f ? {
|
|
15
|
-
...v,
|
|
16
|
-
targetWidthPx: void 0,
|
|
17
|
-
targetHeightPx: void 0
|
|
18
|
-
} : v, b = f ? t(p, l) : void 0, x = await r(u, d, p, y);
|
|
19
|
-
if (!f || !x) return x;
|
|
20
|
-
let S = await i(u, d, p, y, b, x), C = s(Number(x.width), Number(x.height), _.targetWidthPx, _.targetHeightPx), w = C ? `|resize:${C.resizeWidth}x${C.resizeHeight}` : "";
|
|
21
|
-
return n(l, `${c(S, f)}${w}${g ? "|strict" : ""}`, p, async () => {
|
|
22
|
-
let { w: t, h: n } = a(x);
|
|
23
|
-
if (t <= 0 || n <= 0) return {
|
|
24
|
-
bitmap: g ? null : x,
|
|
25
|
-
owned: !1
|
|
26
|
-
};
|
|
27
|
-
let r = await e(x, f, {
|
|
28
|
-
width: t,
|
|
29
|
-
height: n,
|
|
30
|
-
offscreenFactory: h,
|
|
31
|
-
targetWidthPx: _.targetWidthPx,
|
|
32
|
-
targetHeightPx: _.targetHeightPx
|
|
33
|
-
});
|
|
34
|
-
if (r === x) {
|
|
35
|
-
if (g) return {
|
|
36
|
-
bitmap: null,
|
|
37
|
-
owned: !1
|
|
38
|
-
};
|
|
39
|
-
if (!C) return {
|
|
40
|
-
bitmap: x,
|
|
41
|
-
owned: !1
|
|
42
|
-
};
|
|
43
|
-
if (typeof createImageBitmap > "u") throw Error("createImageBitmap is unavailable for duotone fallback resampling");
|
|
44
|
-
let e = await createImageBitmap(x, C);
|
|
45
|
-
return {
|
|
46
|
-
bitmap: e,
|
|
47
|
-
owned: e !== x
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
let i = r;
|
|
51
|
-
return {
|
|
52
|
-
bitmap: i,
|
|
53
|
-
owned: i !== x
|
|
54
|
-
};
|
|
55
|
-
}, b);
|
|
56
|
-
}
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region packages/core/src/internal/resource-measurement.ts
|
|
59
|
-
function d(e, t) {
|
|
60
|
-
if (!Number.isSafeInteger(e) || e < 0) throw Error(`${t} must be a non-negative safe integer`);
|
|
61
|
-
}
|
|
62
|
-
function f(e, t, n) {
|
|
63
|
-
return d(e, "resource measurement"), d(t, "resource measurement"), d(n, "resource measurement limit"), e > n || t > n || t > n - e ? n === 2 ** 53 - 1 ? n : n + 1 : e + t;
|
|
64
|
-
}
|
|
65
|
-
function p(e, t = 2 ** 53 - 1) {
|
|
66
|
-
d(t, "resource measurement limit");
|
|
67
|
-
let n = 0;
|
|
68
|
-
for (let r = 0; r < e.length; r += 1) {
|
|
69
|
-
let i = e.charCodeAt(r), a;
|
|
70
|
-
if (i <= 127) a = 1;
|
|
71
|
-
else if (i <= 2047) a = 2;
|
|
72
|
-
else if (i >= 55296 && i <= 56319 && r + 1 < e.length) {
|
|
73
|
-
let t = e.charCodeAt(r + 1);
|
|
74
|
-
t >= 56320 && t <= 57343 ? (a = 4, r += 1) : a = 3;
|
|
75
|
-
} else a = 3;
|
|
76
|
-
if (n = f(n, a, t), n > t) return n;
|
|
77
|
-
}
|
|
78
|
-
return n;
|
|
79
|
-
}
|
|
80
|
-
function m(e, t = 2 ** 53 - 1) {
|
|
81
|
-
d(t, "resource measurement limit");
|
|
82
|
-
let n = f(0, 2, t);
|
|
83
|
-
if (n > t) return n;
|
|
84
|
-
for (let r = 0; r < e.length; r += 1) {
|
|
85
|
-
let i = e.charCodeAt(r), a;
|
|
86
|
-
if (i === 34 || i === 92 || i === 8 || i === 9 || i === 10 || i === 12 || i === 13) a = 2;
|
|
87
|
-
else if (i <= 31) a = 6;
|
|
88
|
-
else if (i <= 127) a = 1;
|
|
89
|
-
else if (i <= 2047) a = 2;
|
|
90
|
-
else if (i >= 55296 && i <= 56319 && r + 1 < e.length) {
|
|
91
|
-
let t = e.charCodeAt(r + 1);
|
|
92
|
-
t >= 56320 && t <= 57343 ? (a = 4, r += 1) : a = 6;
|
|
93
|
-
} else a = i >= 55296 && i <= 57343 ? 6 : 3;
|
|
94
|
-
if (n = f(n, a, t), n > t) return n;
|
|
95
|
-
}
|
|
96
|
-
return n;
|
|
97
|
-
}
|
|
98
|
-
function h(e, t) {
|
|
99
|
-
return f(0, e, t);
|
|
100
|
-
}
|
|
101
|
-
function g(e, t = 2 ** 53 - 1, n = !1) {
|
|
102
|
-
if (d(t, "resource measurement limit"), e === null) return {
|
|
103
|
-
jsonBytes: h(4, t),
|
|
104
|
-
stringValueUtf8Bytes: 0
|
|
105
|
-
};
|
|
106
|
-
if (typeof e == "string") return {
|
|
107
|
-
jsonBytes: m(e, t),
|
|
108
|
-
stringValueUtf8Bytes: p(e, t)
|
|
109
|
-
};
|
|
110
|
-
if (typeof e == "boolean") return {
|
|
111
|
-
jsonBytes: h(e ? 4 : 5, t),
|
|
112
|
-
stringValueUtf8Bytes: 0
|
|
113
|
-
};
|
|
114
|
-
if (typeof e == "number") return {
|
|
115
|
-
jsonBytes: h((Number.isFinite(e) ? String(Object.is(e, -0) ? 0 : e) : "null").length, t),
|
|
116
|
-
stringValueUtf8Bytes: 0
|
|
117
|
-
};
|
|
118
|
-
if (typeof e == "bigint") throw TypeError("BigInt values cannot be serialized to JSON");
|
|
119
|
-
if (Array.isArray(e)) {
|
|
120
|
-
let n = h(2, t), r = 0;
|
|
121
|
-
for (let i = 0; i < e.length; i += 1) {
|
|
122
|
-
i !== 0 && (n = f(n, 1, t));
|
|
123
|
-
let a = g(e[i], t, !0);
|
|
124
|
-
n = f(n, a.jsonBytes, t), r = f(r, a.stringValueUtf8Bytes, t);
|
|
125
|
-
}
|
|
126
|
-
return {
|
|
127
|
-
jsonBytes: n,
|
|
128
|
-
stringValueUtf8Bytes: r
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
if (typeof e == "object") {
|
|
132
|
-
let n = h(2, t), r = 0, i = 0;
|
|
133
|
-
for (let [a, o] of Object.entries(e)) {
|
|
134
|
-
if (o === void 0 || typeof o == "function" || typeof o == "symbol") continue;
|
|
135
|
-
i++ !== 0 && (n = f(n, 1, t)), n = f(n, m(a, t), t), n = f(n, 1, t);
|
|
136
|
-
let e = g(o, t);
|
|
137
|
-
n = f(n, e.jsonBytes, t), r = f(r, e.stringValueUtf8Bytes, t);
|
|
138
|
-
}
|
|
139
|
-
return {
|
|
140
|
-
jsonBytes: n,
|
|
141
|
-
stringValueUtf8Bytes: r
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
return {
|
|
145
|
-
jsonBytes: n ? h(4, t) : 0,
|
|
146
|
-
stringValueUtf8Bytes: 0
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
//#endregion
|
|
150
|
-
export { u as a, c as i, g as n, p as r, f as t };
|