@pie-lib/math-input-mathlive 2.0.1-next.20261112103425 → 2.0.1-next.20261112105900
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/index.d.ts +2 -1
- package/dist/index.js +5 -4
- package/dist/mf/inactive-caret.d.ts +2 -0
- package/dist/mf/inactive-caret.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import MathInput from './math-input.js';
|
|
|
4
4
|
import HorizontalKeypad from './horizontal-keypad.js';
|
|
5
5
|
import KeyPad from './keypad/index.js';
|
|
6
6
|
import * as mf from './mf/index.js';
|
|
7
|
+
import { deepActiveElement } from './mf/inactive-caret.js';
|
|
7
8
|
import { registerEmbed, applyStaticMath, latexToMarkup, loadMathLive, configureFonts, getMacros, PIE_MACROS } from './mathlive-instance.js';
|
|
8
9
|
import { toMathLive, fromMathLive, fieldIds, keyToAction, answerBlockLatex, NEWLINE_EMBED } from './latex-bridge.js';
|
|
9
10
|
declare const addBrackets: (s: any) => any;
|
|
@@ -17,4 +18,4 @@ declare const removeBrackets: (s: any) => any;
|
|
|
17
18
|
* export is kept so callers do not break.
|
|
18
19
|
*/
|
|
19
20
|
declare const updateSpans: () => void;
|
|
20
|
-
export { keysForGrade, addBrackets, removeBrackets, keys, MathInput, HorizontalKeypad, KeyPad, updateSpans, mf, mf as mq, registerEmbed, applyStaticMath, latexToMarkup, loadMathLive, configureFonts, getMacros, PIE_MACROS, toMathLive, fromMathLive, fieldIds, keyToAction, answerBlockLatex, NEWLINE_EMBED, };
|
|
21
|
+
export { keysForGrade, addBrackets, removeBrackets, keys, MathInput, HorizontalKeypad, KeyPad, updateSpans, mf, mf as mq, registerEmbed, applyStaticMath, latexToMarkup, loadMathLive, configureFonts, getMacros, PIE_MACROS, toMathLive, fromMathLive, fieldIds, keyToAction, answerBlockLatex, NEWLINE_EMBED, deepActiveElement, };
|
package/dist/index.js
CHANGED
|
@@ -4,8 +4,9 @@ import { MathInput as n } from "./math-input.js";
|
|
|
4
4
|
import r from "./horizontal-keypad.js";
|
|
5
5
|
import { KeyPad as i } from "./keypad/index.js";
|
|
6
6
|
import { mf_exports as a } from "./mf/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { deepActiveElement as o } from "./mf/inactive-caret.js";
|
|
8
|
+
import { PIE_MACROS as s, applyStaticMath as c, configureFonts as l, getMacros as u, latexToMarkup as d, loadMathLive as f, registerEmbed as p } from "./mathlive-instance.js";
|
|
9
|
+
import { NEWLINE_EMBED as m, answerBlockLatex as h, fieldIds as g, fromMathLive as _, keyToAction as v, toMathLive as y } from "./latex-bridge.js";
|
|
9
10
|
// src/index.tsx
|
|
10
|
-
var
|
|
11
|
-
export { r as HorizontalKeypad, i as KeyPad, n as MathInput,
|
|
11
|
+
var b = (e) => e.indexOf("\\(") === 0 ? e : `\\(${e}`, x = (e) => e.indexOf("\\)") === e.length - 2 ? e : `${e}\\)`, S = (e) => e.indexOf("\\(") === 0 ? e.substring(2) : e, C = (e) => e.indexOf("\\)") === e.length - 2 ? e.substring(0, e.length - 2) : e, w = (e) => x(b(e)), T = (e) => C(S(e)), E = () => {};
|
|
12
|
+
export { r as HorizontalKeypad, i as KeyPad, n as MathInput, m as NEWLINE_EMBED, s as PIE_MACROS, w as addBrackets, h as answerBlockLatex, c as applyStaticMath, l as configureFonts, o as deepActiveElement, g as fieldIds, _ as fromMathLive, u as getMacros, v as keyToAction, t as keys, e as keysForGrade, d as latexToMarkup, f as loadMathLive, a as mf, a as mq, p as registerEmbed, T as removeBrackets, y as toMathLive, E as updateSpans };
|
|
@@ -8,6 +8,8 @@ export declare const KEYPAD_CARET_CLASS = "pie-caret-for-keypad";
|
|
|
8
8
|
* it reads differently from a focused field.
|
|
9
9
|
*/
|
|
10
10
|
export declare const KEYPAD_CARET_CSS: string;
|
|
11
|
+
/** The focused element, looking through shadow roots. */
|
|
12
|
+
export declare const deepActiveElement: () => Element | null;
|
|
11
13
|
/**
|
|
12
14
|
* MathLive hides its caret when a field blurs, though it keeps the insertion point. While a keypad
|
|
13
15
|
* button has focus, keep the caret showing there. Focus going anywhere else removes it.
|
|
@@ -28,4 +28,4 @@ function o(e) {
|
|
|
28
28
|
e.removeEventListener("blur", l), o();
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
export { e as KEYPAD_ATTRIBUTE, t as KEYPAD_CARET_CLASS, n as KEYPAD_CARET_CSS, o as keepCaretWhileKeypadFocused };
|
|
31
|
+
export { e as KEYPAD_ATTRIBUTE, t as KEYPAD_CARET_CLASS, n as KEYPAD_CARET_CSS, a as deepActiveElement, o as keepCaretWhileKeypadFocused };
|
package/package.json
CHANGED