@silurus/ooxml 0.72.2 → 0.73.1
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/dist/chunk-DmhlhrBa.js +11 -0
- package/dist/docx-Bq1YykqO.js +25085 -0
- package/dist/docx.mjs +2 -2
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{find-cursor-DBifiZop.js → find-cursor-CaGrVs7z.js} +1534 -1488
- package/dist/highlight-rect-DZn1OD1x.js +988 -0
- package/dist/index.mjs +3 -3
- package/dist/math.mjs +1 -1
- package/dist/{mathjax-Dk_JzbFj.js → mathjax-BPjQ2C_j.js} +2 -2
- package/dist/{pptx-D3L4FQfI.js → pptx-BVDbKJFr.js} +1176 -1278
- package/dist/pptx.mjs +2 -2
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/render-worker-host-BASlxY40.js +27 -0
- package/dist/{render-worker-host-BzhGwe0I.js → render-worker-host-Bz0flu1p.js} +1 -1
- package/dist/{render-worker-host-Cg60RAG_.js → render-worker-host-Custze53.js} +1 -1
- package/dist/types/docx.d.ts +3968 -4040
- package/dist/types/index.d.ts +8183 -8602
- package/dist/types/math.d.ts +41 -38
- package/dist/types/pptx.d.ts +3629 -3704
- package/dist/types/xlsx.d.ts +3218 -3301
- package/dist/{visible-index-DSN5XPnm.js → visible-index-CyuaF_ZP.js} +11 -11
- package/dist/{xlsx-BWEqRZ25.js → xlsx-z4Bs4HLQ.js} +732 -725
- package/dist/xlsx.mjs +2 -2
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +16 -6
- package/dist/docx-wLLJuetI.js +0 -10654
- package/dist/highlight-rect-DTgfiJgA.js +0 -881
- package/dist/render-worker-host-B5esxBj-.js +0 -27
- package/dist/segments--0hIQLXB.js +0 -7
package/dist/types/math.d.ts
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
//#region dist/.types-work/mathjax-6BV6bQWa.d.ts
|
|
2
|
+
//#region packages/core/src/math/mathjax.d.ts
|
|
3
|
+
interface MathSvg {
|
|
4
|
+
/** standalone `<svg>…</svg>` markup. */
|
|
5
|
+
svg: string;
|
|
6
|
+
/** extents in em (the SVG viewBox uses 1em = 1000 units). */
|
|
7
|
+
widthEm: number;
|
|
8
|
+
ascentEm: number;
|
|
9
|
+
descentEm: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The math engine contract a viewer needs to render equations. Satisfied by the
|
|
13
|
+
* `math` named export of the separate `@silurus/ooxml/math` entry point, which
|
|
14
|
+
* the consumer opts into:
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { DocxViewer } from '@silurus/ooxml/docx';
|
|
18
|
+
* import { math } from '@silurus/ooxml/math';
|
|
19
|
+
* new DocxViewer(canvas, { math });
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* Omit it and the equation engine (MathJax + STIX Two Math, ~3 MB) is never
|
|
23
|
+
* imported, so a bundler drops it entirely.
|
|
24
|
+
*/
|
|
25
|
+
interface MathRenderer {
|
|
26
|
+
/** Preload the engine. Called once before converting equations. */
|
|
27
|
+
loadMathJax(): Promise<void>;
|
|
28
|
+
/** MathML string → standalone SVG + baseline-relative em extents. */
|
|
29
|
+
mathMLToSvg(mathml: string): Promise<MathSvg>;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region dist/.types-work/math.d.ts
|
|
33
|
+
//#region src/math.d.ts
|
|
34
|
+
/**
|
|
35
|
+
* The OMML equation engine (MathJax + STIX Two Math). Pass it to a viewer's
|
|
36
|
+
* `math` option to enable equation rendering. Self-contained: no network, no
|
|
37
|
+
* cross-origin requests.
|
|
38
|
+
*/
|
|
39
|
+
declare const math: MathRenderer;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { type MathRenderer, type MathSvg, math };
|