@pie-element/shared-math-rendering-mathjax 0.1.2-next.20261003064518 → 0.1.2-next.20261006032932
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/adapter.d.ts +85 -0
- package/dist/browser/PUA-tLuTiQ7-.js +4368 -0
- package/dist/browser/accents-BTUYmhn9.js +1506 -0
- package/dist/browser/accents-b-i-CngHZsLL.js +2845 -0
- package/dist/browser/arabic-BzEHMVZD.js +783 -0
- package/dist/browser/arrows-VjxlU-jv.js +2653 -0
- package/dist/browser/braille-BeWC_Ruq.js +1285 -0
- package/dist/browser/braille-d-Dk6J96GO.js +1285 -0
- package/dist/browser/calligraphic-Cew9cU3x.js +321 -0
- package/dist/browser/cherokee-Cny3FYho.js +2027 -0
- package/dist/browser/chtml-CbqemTOM.js +20349 -0
- package/dist/browser/cyrillic-CfCDulXU.js +5615 -0
- package/dist/browser/cyrillic-ss-lU7bNGG9.js +5604 -0
- package/dist/browser/devanagari-CDIz2h-r.js +690 -0
- package/dist/browser/double-struck-BpJEQk8y.js +436 -0
- package/dist/browser/fraktur-rLEq9DEH.js +692 -0
- package/dist/browser/greek-BlraJTyL.js +9333 -0
- package/dist/browser/greek-ss-D-EN2PK0.js +6765 -0
- package/dist/browser/hebrew-GiQZeybp.js +3216 -0
- package/dist/browser/index.js +733 -0
- package/dist/browser/latin-b-BhEnC7R2.js +3132 -0
- package/dist/browser/latin-bi-DqiIKv3U.js +3635 -0
- package/dist/browser/latin-i-B1xtwaE1.js +3632 -0
- package/dist/browser/latin-xfWFlLkD.js +3264 -0
- package/dist/browser/marrows-DD1NgMQi.js +759 -0
- package/dist/browser/math-DpWn1mbG.js +2032 -0
- package/dist/browser/mathjax-D2JHb_R_.js +37049 -0
- package/dist/browser/monospace-D116QD2a.js +1110 -0
- package/dist/browser/monospace-ex-DcXpouKS.js +6012 -0
- package/dist/browser/monospace-l-Ct5wkMDs.js +3112 -0
- package/dist/browser/mshapes-DCp86WSX.js +522 -0
- package/dist/browser/phonetics-BwOCw2Y9.js +2494 -0
- package/dist/browser/phonetics-ss-CRtMn02f.js +2982 -0
- package/dist/browser/sans-serif-BYPZKlE9.js +5244 -0
- package/dist/browser/sans-serif-b-B0kRKiC-.js +3174 -0
- package/dist/browser/sans-serif-bi-DXWul6mu.js +3686 -0
- package/dist/browser/sans-serif-ex-Boux1kMP.js +10031 -0
- package/dist/browser/sans-serif-i-676RFaSO.js +3633 -0
- package/dist/browser/sans-serif-r-DrN9xdZt.js +3157 -0
- package/dist/browser/script-0ohehnXc.js +647 -0
- package/dist/browser/shapes-BG47NodJ.js +1930 -0
- package/dist/browser/symbols-BqnUxf_t.js +1831 -0
- package/dist/browser/symbols-b-i-eg9k5hmF.js +1151 -0
- package/dist/browser/variants-2LRNhOUP.js +229 -0
- package/dist/engine/page.d.ts +21 -0
- package/dist/explorer-styles.d.ts +20 -0
- package/dist/index.js +300 -252
- package/dist/types.d.ts +1 -0
- package/package.json +3 -2
package/dist/adapter.d.ts
CHANGED
|
@@ -1,4 +1,89 @@
|
|
|
1
1
|
import type { MathjaxOptions } from './types.js';
|
|
2
|
+
export type MathJaxMacro = string | [string, number];
|
|
3
|
+
export interface MathItem {
|
|
4
|
+
typesetRoot?: Element | null;
|
|
5
|
+
state?: () => number;
|
|
6
|
+
clear?: () => void;
|
|
7
|
+
}
|
|
8
|
+
/** The parts of MathJax's `startup.document` this adapter uses. */
|
|
9
|
+
export interface MathDocument {
|
|
10
|
+
math?: Iterable<MathItem> & {
|
|
11
|
+
remove?: (...items: MathItem[]) => unknown;
|
|
12
|
+
};
|
|
13
|
+
outputJax?: {
|
|
14
|
+
chtmlStyles?: Element | null;
|
|
15
|
+
};
|
|
16
|
+
addStyles?: (styles: Record<string, Record<string, string>>) => void;
|
|
17
|
+
addRenderAction?: (id: string, priority: number, renderDoc: (document: MathDocument) => boolean, renderMath: (math: MathItem, document: MathDocument) => boolean) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* `window.MathJax` in each state this adapter meets: a configuration object before a MathJax
|
|
21
|
+
* script runs, the MathJax global afterwards, or a global without the component startup
|
|
22
|
+
* (MathJax 2, or the MathJax 3 that the legacy @pie-lib/math-rendering renderer bundles).
|
|
23
|
+
*/
|
|
24
|
+
export interface MathJaxGlobal {
|
|
25
|
+
version?: string;
|
|
26
|
+
loader?: {
|
|
27
|
+
load?: string[];
|
|
28
|
+
failed?: (error: Error) => void;
|
|
29
|
+
'output/svg'?: {
|
|
30
|
+
ready?: (name: string) => string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
startup?: {
|
|
34
|
+
typeset?: boolean;
|
|
35
|
+
ready?: () => void;
|
|
36
|
+
defaultReady?: () => void;
|
|
37
|
+
promise?: Promise<unknown>;
|
|
38
|
+
document?: MathDocument;
|
|
39
|
+
};
|
|
40
|
+
tex?: {
|
|
41
|
+
inlineMath?: [string, string][];
|
|
42
|
+
processEscapes?: boolean;
|
|
43
|
+
macros?: Record<string, MathJaxMacro>;
|
|
44
|
+
};
|
|
45
|
+
options?: {
|
|
46
|
+
enableMenu?: boolean;
|
|
47
|
+
menuOptions?: {
|
|
48
|
+
settings?: Record<string, boolean>;
|
|
49
|
+
};
|
|
50
|
+
a11y?: {
|
|
51
|
+
inTabOrder?: boolean;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
output?: {
|
|
55
|
+
displayOverflow?: string;
|
|
56
|
+
};
|
|
57
|
+
chtml?: {
|
|
58
|
+
fontURL?: string;
|
|
59
|
+
};
|
|
60
|
+
typesetPromise?: (elements?: Element[]) => Promise<void>;
|
|
61
|
+
typesetClear?: (elements?: Element[]) => void;
|
|
62
|
+
/** The component build's module tree. */
|
|
63
|
+
_?: {
|
|
64
|
+
output?: {
|
|
65
|
+
chtml_ts?: {
|
|
66
|
+
CHTML?: {
|
|
67
|
+
STYLESHEETID?: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
svg_ts?: {
|
|
71
|
+
SVG?: {
|
|
72
|
+
STYLESHEETID?: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
ui?: {
|
|
77
|
+
menu?: {
|
|
78
|
+
Menu?: {
|
|
79
|
+
Menu?: {
|
|
80
|
+
MENU_STORAGE?: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
}
|
|
2
87
|
/** `latex` without the pair of legacy delimiters around all of it, if it has one. */
|
|
3
88
|
export declare function stripLegacyDelimiters(latex: string): string;
|
|
4
89
|
/**
|