@silurus/ooxml 0.72.2 → 0.73.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.
@@ -1,38 +1,41 @@
1
- /**
2
- * The OMML equation engine (MathJax + STIX Two Math). Pass it to a viewer's
3
- * `math` option to enable equation rendering. Self-contained: no network, no
4
- * cross-origin requests.
5
- */
6
- export declare const math: MathRenderer;
7
-
8
- /**
9
- * The math engine contract a viewer needs to render equations. Satisfied by the
10
- * `math` named export of the separate `@silurus/ooxml/math` entry point, which
11
- * the consumer opts into:
12
- *
13
- * ```ts
14
- * import { DocxViewer } from '@silurus/ooxml/docx';
15
- * import { math } from '@silurus/ooxml/math';
16
- * new DocxViewer(canvas, { math });
17
- * ```
18
- *
19
- * Omit it and the equation engine (MathJax + STIX Two Math, ~3 MB) is never
20
- * imported, so a bundler drops it entirely.
21
- */
22
- export declare interface MathRenderer {
23
- /** Preload the engine. Called once before converting equations. */
24
- loadMathJax(): Promise<void>;
25
- /** MathML string → standalone SVG + baseline-relative em extents. */
26
- mathMLToSvg(mathml: string): Promise<MathSvg>;
27
- }
28
-
29
- export declare interface MathSvg {
30
- /** standalone `<svg>…</svg>` markup. */
31
- svg: string;
32
- /** extents in em (the SVG viewBox uses 1em = 1000 units). */
33
- widthEm: number;
34
- ascentEm: number;
35
- descentEm: number;
36
- }
37
-
38
- export { }
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 };