@pie-element/shared-math-rendering-mathjax 0.1.4-next.20261007175429 → 0.1.4-next.20261007201108
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/browser/index.js +483 -484
- package/dist/index.d.ts +0 -2
- package/dist/index.js +487 -488
- package/dist/math-name.d.ts +9 -16
- package/dist/math-speech.d.ts +2 -2
- package/package.json +1 -1
package/dist/math-name.d.ts
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
export interface MathNameOptions {
|
|
2
|
-
/**
|
|
3
|
-
* Speaks one MathML `<math>` element. Defaults to the built-in English speaker; a host passes its
|
|
4
|
-
* own to use SRE, another locale or ClearSpeak's full rule set. Returning nothing falls back to
|
|
5
|
-
* the element's text.
|
|
6
|
-
*/
|
|
7
|
-
speak?: (math: Element) => string | undefined;
|
|
8
|
-
}
|
|
9
1
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* that MathJax adds to each `mjx-container`, so call this after the content is typeset.
|
|
2
|
+
* Labels a typeset expression inside a control with its English speech, read from the hidden
|
|
3
|
+
* MathML MathJax leaves in the `mjx-container`. An `aria-label` on the container, which has no
|
|
4
|
+
* role, puts that speech in the name of the control around it in Chromium, Firefox and WebKit,
|
|
5
|
+
* among the control's other text. Math outside controls stays unlabelled, so screen readers keep
|
|
6
|
+
* navigating its MathML. A container that already has a label keeps it, because the page's
|
|
7
|
+
* renderer or a host's speech engine set it.
|
|
17
8
|
*/
|
|
18
|
-
export declare function
|
|
9
|
+
export declare function nameMathInControl(container: Element): void;
|
|
10
|
+
/** Labels each typeset expression in `root` that sits inside a control. */
|
|
11
|
+
export declare function nameMathInControls(root: Element): void;
|
package/dist/math-speech.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* hidden MathML both MathJax versions emit, so it runs without MathJax's speech engine and its
|
|
4
4
|
* worker, which a strict CSP blocks. Coverage is the school-math core: numbers, identifiers,
|
|
5
5
|
* operators, fences, fractions, roots, scripts, limits on sums and integrals, accents and tables.
|
|
6
|
-
* An element outside it speaks its children in order. A host that wants SRE
|
|
7
|
-
*
|
|
6
|
+
* An element outside it speaks its children in order. A host that wants SRE, another locale or
|
|
7
|
+
* ClearSpeak's full rule set replaces the `aria-label` it puts on each `mjx-container`.
|
|
8
8
|
*/
|
|
9
9
|
/** The English speech of one `<math>` element. */
|
|
10
10
|
export declare function speakMathml(math: Element): string;
|
package/package.json
CHANGED