@pie-element/shared-math-rendering-mathjax 0.1.7-next.20261015154938 → 0.1.7-next.20261018222107

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.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The TeX dialect authored content is written in: the legacy renderer's macros and delimiters.
3
+ * Both the adapter and `texToMathml` read it, so this module imports nothing.
4
+ */
5
+ export type MathJaxMacro = string | [string, number];
6
+ /** The macros the legacy renderer defines, which authored content relies on. */
7
+ export declare const LEGACY_MACROS: Record<string, MathJaxMacro>;
8
+ /**
9
+ * Text MathJax's TeX input typesets with the default delimiters: \(…\), \[…\], $$…$$, \$ escapes,
10
+ * environments and references, plus $…$ when single dollars are on.
11
+ */
12
+ export declare const TEX_MARKERS: RegExp;
13
+ export declare const TEX_MARKERS_WITH_SINGLE_DOLLAR: RegExp;
14
+ export declare const NEWLINE_BLOCK: RegExp;
15
+ /** `latex` without the pair of legacy delimiters around all of it, if it has one. */
16
+ export declare function stripLegacyDelimiters(latex: string): string;
17
+ /** The text of a `[data-latex]` element as inline math, as the legacy renderer rewrites it. */
18
+ export declare function dataLatexAsInlineMath(content: string): string;
19
+ /** MathJax's default `ignoreHtmlClass` and `processHtmlClass`, which the adapter keeps. */
20
+ export declare const IGNORE_CLASS = "mathjax_ignore";
21
+ export declare const PROCESS_CLASS = "mathjax_process";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * `html` with each TeX expression in it replaced by a `<math>` element in MathML Core. HTML without
3
+ * TeX comes back as given; otherwise it comes back reserialized. TeX that fails to parse becomes
4
+ * MathML's error element, as delivery shows it. Authored `<math>` passes through unchanged.
5
+ */
6
+ export declare function texToMathml(html: string): string;