@pie-lib/math-input-mathlive 2.0.1-next.20261109091947 → 2.0.1-next.20261110055344

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.
Files changed (55) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +1 -2
  2. package/dist/horizontal-keypad.js +5 -6
  3. package/dist/i18n/ar.js +1 -2
  4. package/dist/i18n/cy.js +1 -2
  5. package/dist/i18n/en-AU.js +1 -2
  6. package/dist/i18n/en-GB.js +1 -2
  7. package/dist/i18n/en-US.js +1 -2
  8. package/dist/i18n/es.js +1 -2
  9. package/dist/i18n/fr.js +1 -2
  10. package/dist/i18n/index.js +1 -2
  11. package/dist/i18n/ja.js +1 -2
  12. package/dist/i18n/ko.js +1 -2
  13. package/dist/i18n/nl-NL.js +1 -2
  14. package/dist/i18n/pt.js +1 -2
  15. package/dist/i18n/ro.js +1 -2
  16. package/dist/i18n/sv.js +1 -2
  17. package/dist/i18n/th-TH.js +1 -2
  18. package/dist/i18n/zh.js +1 -2
  19. package/dist/index.js +8 -9
  20. package/dist/keypad/index.js +80 -79
  21. package/dist/keypad/keys-layout.js +1 -2
  22. package/dist/keys/basic-operators.js +1 -2
  23. package/dist/keys/comparison.js +1 -2
  24. package/dist/keys/constants.js +1 -2
  25. package/dist/keys/digits.js +1 -2
  26. package/dist/keys/edit.js +1 -2
  27. package/dist/keys/exponent.js +1 -2
  28. package/dist/keys/fractions.js +1 -2
  29. package/dist/keys/geometry.js +1 -2
  30. package/dist/keys/grades.js +1 -2
  31. package/dist/keys/index.js +17 -18
  32. package/dist/keys/log.js +1 -2
  33. package/dist/keys/logic.js +1 -2
  34. package/dist/keys/matrices.js +1 -2
  35. package/dist/keys/misc.js +1 -2
  36. package/dist/keys/navigation.js +1 -2
  37. package/dist/keys/operators.js +1 -2
  38. package/dist/keys/statistics.js +1 -2
  39. package/dist/keys/sub-sup.js +1 -2
  40. package/dist/keys/trigonometry.js +1 -2
  41. package/dist/keys/utils.js +1 -2
  42. package/dist/keys/vars.js +1 -2
  43. package/dist/latex-bridge.js +1 -2
  44. package/dist/longdiv.js +1 -2
  45. package/dist/math-input.js +9 -10
  46. package/dist/mathlive-instance.js +58 -58
  47. package/dist/mf/common-styles.js +1 -2
  48. package/dist/mf/field-label.js +1 -2
  49. package/dist/mf/inactive-caret.d.ts +18 -0
  50. package/dist/mf/inactive-caret.js +31 -0
  51. package/dist/mf/index.js +17 -18
  52. package/dist/mf/input.js +50 -50
  53. package/dist/mf/static.js +61 -61
  54. package/dist/selection.js +1 -2
  55. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- //#region \0rolldown/runtime.js
1
+ // \0rolldown/runtime.js
2
2
  var e = Object.defineProperty, t = (t, n) => {
3
3
  let r = {};
4
4
  for (var i in t) e(r, i, {
@@ -7,5 +7,4 @@ var e = Object.defineProperty, t = (t, n) => {
7
7
  });
8
8
  return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
9
9
  };
10
- //#endregion
11
10
  export { t as __exportAll };
@@ -1,10 +1,10 @@
1
- import { extendKeySet as e } from "./keys/utils.js";
2
- import { keysForGrade as t, normalizeAdditionalKeys as n } from "./keys/grades.js";
1
+ import { keysForGrade as e, normalizeAdditionalKeys as t } from "./keys/grades.js";
2
+ import { extendKeySet as n } from "./keys/utils.js";
3
3
  import { KeyPad as r } from "./keypad/index.js";
4
4
  import i from "react";
5
5
  import a from "prop-types";
6
6
  import { jsx as o } from "react/jsx-runtime";
7
- //#region src/horizontal-keypad.tsx
7
+ // src/horizontal-keypad.tsx
8
8
  var s = (e) => {
9
9
  if (e.command) return {
10
10
  value: e.command,
@@ -36,19 +36,18 @@ var s = (e) => {
36
36
  this.props.onClick(s(e));
37
37
  };
38
38
  render() {
39
- let { mode: i, onFocus: a, controlledKeypadMode: s, noDecimal: c, className: l, additionalKeys: u, layoutForKeyPad: d, setKeypadInteraction: f } = this.props, p = n(u);
39
+ let { mode: i, onFocus: a, controlledKeypadMode: s, noDecimal: c, className: l, additionalKeys: u, layoutForKeyPad: d, setKeypadInteraction: f } = this.props, p = t(u);
40
40
  return /* @__PURE__ */ o(r, {
41
41
  className: l,
42
42
  controlledKeypadMode: s,
43
43
  onFocus: a,
44
44
  noDecimal: c,
45
45
  layoutForKeyPad: d,
46
- additionalKeys: e(t(i), p),
46
+ additionalKeys: n(e(i), p),
47
47
  onPress: this.keypadPress,
48
48
  mode: i,
49
49
  setKeypadInteraction: f
50
50
  });
51
51
  }
52
52
  };
53
- //#endregion
54
53
  export { c as default };
package/dist/i18n/ar.js CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/i18n/ar.ts
1
+ // src/i18n/ar.ts
2
2
  var e = { enterAnswerA11y: "إدخال الإجابة" };
3
- //#endregion
4
3
  export { e as default };
package/dist/i18n/cy.js CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/i18n/cy.ts
1
+ // src/i18n/cy.ts
2
2
  var e = { enterAnswerA11y: "Rhowch ateb" };
3
- //#endregion
4
3
  export { e as default };
@@ -1,4 +1,3 @@
1
- //#region src/i18n/en-AU.ts
1
+ // src/i18n/en-AU.ts
2
2
  var e = { enterAnswerA11y: "Enter answer" };
3
- //#endregion
4
3
  export { e as default };
@@ -1,4 +1,3 @@
1
- //#region src/i18n/en-GB.ts
1
+ // src/i18n/en-GB.ts
2
2
  var e = { enterAnswerA11y: "Enter answer" };
3
- //#endregion
4
3
  export { e as default };
@@ -1,4 +1,3 @@
1
- //#region src/i18n/en-US.ts
1
+ // src/i18n/en-US.ts
2
2
  var e = { enterAnswerA11y: "Enter answer" };
3
- //#endregion
4
3
  export { e as default };
package/dist/i18n/es.js CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/i18n/es.ts
1
+ // src/i18n/es.ts
2
2
  var e = { enterAnswerA11y: "Escribe la respuesta" };
3
- //#endregion
4
3
  export { e as default };
package/dist/i18n/fr.js CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/i18n/fr.ts
1
+ // src/i18n/fr.ts
2
2
  var e = { enterAnswerA11y: "Saisir la réponse" };
3
- //#endregion
4
3
  export { e as default };
@@ -1,6 +1,6 @@
1
1
  import e from "./en-US.js";
2
2
  import { defineCatalogs as t } from "@pie-element/shared-i18n";
3
- //#region src/i18n/index.ts
3
+ // src/i18n/index.ts
4
4
  var n = t({
5
5
  packageName: "@pie-lib/math-input-mathlive",
6
6
  source: e,
@@ -63,5 +63,4 @@ var n = t({
63
63
  )
64
64
  }
65
65
  });
66
- //#endregion
67
66
  export { n as catalogs };
package/dist/i18n/ja.js CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/i18n/ja.ts
1
+ // src/i18n/ja.ts
2
2
  var e = { enterAnswerA11y: "解答を入力" };
3
- //#endregion
4
3
  export { e as default };
package/dist/i18n/ko.js CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/i18n/ko.ts
1
+ // src/i18n/ko.ts
2
2
  var e = { enterAnswerA11y: "답 입력" };
3
- //#endregion
4
3
  export { e as default };
@@ -1,4 +1,3 @@
1
- //#region src/i18n/nl-NL.ts
1
+ // src/i18n/nl-NL.ts
2
2
  var e = { enterAnswerA11y: "Antwoord invoeren" };
3
- //#endregion
4
3
  export { e as default };
package/dist/i18n/pt.js CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/i18n/pt.ts
1
+ // src/i18n/pt.ts
2
2
  var e = { enterAnswerA11y: "Inserir resposta" };
3
- //#endregion
4
3
  export { e as default };
package/dist/i18n/ro.js CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/i18n/ro.ts
1
+ // src/i18n/ro.ts
2
2
  var e = { enterAnswerA11y: "Introdu răspunsul" };
3
- //#endregion
4
3
  export { e as default };
package/dist/i18n/sv.js CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/i18n/sv.ts
1
+ // src/i18n/sv.ts
2
2
  var e = { enterAnswerA11y: "Ange svar" };
3
- //#endregion
4
3
  export { e as default };
@@ -1,4 +1,3 @@
1
- //#region src/i18n/th-TH.ts
1
+ // src/i18n/th-TH.ts
2
2
  var e = { enterAnswerA11y: "ป้อนคำตอบ" };
3
- //#endregion
4
3
  export { e as default };
package/dist/i18n/zh.js CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/i18n/zh.ts
1
+ // src/i18n/zh.ts
2
2
  var e = { enterAnswerA11y: "输入答案" };
3
- //#endregion
4
3
  export { e as default };
package/dist/index.js CHANGED
@@ -1,12 +1,11 @@
1
1
  import { keysForGrade as e } from "./keys/grades.js";
2
2
  import { keys_exports as t } from "./keys/index.js";
3
- import { NEWLINE_EMBED as n, answerBlockLatex as r, fieldIds as i, fromMathLive as a, keyToAction as o, toMathLive as s } from "./latex-bridge.js";
4
- import { PIE_MACROS as c, applyStaticMath as l, configureFonts as u, getMacros as d, latexToMarkup as f, loadMathLive as p, registerEmbed as m } from "./mathlive-instance.js";
5
- import { mf_exports as h } from "./mf/index.js";
6
- import { KeyPad as g } from "./keypad/index.js";
7
- import { MathInput as _ } from "./math-input.js";
8
- import v from "./horizontal-keypad.js";
9
- //#region src/index.tsx
3
+ import { MathInput as n } from "./math-input.js";
4
+ import r from "./horizontal-keypad.js";
5
+ import { KeyPad as i } from "./keypad/index.js";
6
+ import { mf_exports as a } from "./mf/index.js";
7
+ import { PIE_MACROS as o, applyStaticMath as s, configureFonts as c, getMacros as l, latexToMarkup as u, loadMathLive as d, registerEmbed as f } from "./mathlive-instance.js";
8
+ import { NEWLINE_EMBED as p, answerBlockLatex as m, fieldIds as h, fromMathLive as g, keyToAction as _, toMathLive as v } from "./latex-bridge.js";
9
+ // src/index.tsx
10
10
  var y = (e) => e.indexOf("\\(") === 0 ? e : `\\(${e}`, b = (e) => e.indexOf("\\)") === e.length - 2 ? e : `${e}\\)`, x = (e) => e.indexOf("\\(") === 0 ? e.substring(2) : e, S = (e) => e.indexOf("\\)") === e.length - 2 ? e.substring(0, e.length - 2) : e, C = (e) => b(y(e)), w = (e) => S(x(e)), T = () => {};
11
- //#endregion
12
- export { v as HorizontalKeypad, g as KeyPad, _ as MathInput, n as NEWLINE_EMBED, c as PIE_MACROS, C as addBrackets, r as answerBlockLatex, l as applyStaticMath, u as configureFonts, i as fieldIds, a as fromMathLive, d as getMacros, o as keyToAction, t as keys, e as keysForGrade, f as latexToMarkup, p as loadMathLive, h as mf, h as mq, m as registerEmbed, w as removeBrackets, s as toMathLive, T as updateSpans };
11
+ export { r as HorizontalKeypad, i as KeyPad, n as MathInput, p as NEWLINE_EMBED, o as PIE_MACROS, C as addBrackets, m as answerBlockLatex, s as applyStaticMath, c as configureFonts, h as fieldIds, g as fromMathLive, l as getMacros, _ as keyToAction, t as keys, e as keysForGrade, u as latexToMarkup, d as loadMathLive, a as mf, a as mq, f as registerEmbed, w as removeBrackets, v as toMathLive, T as updateSpans };
@@ -1,36 +1,37 @@
1
1
  import { baseSet as e } from "../keys/index.js";
2
- import { commonKeyboardStyles as t, rootIndexStyles as n } from "../mf/common-styles.js";
3
- import { fixLongDivisionWhenReady as r } from "../longdiv.js";
2
+ import { sortKeys as t } from "./keys-layout.js";
3
+ import { commonKeyboardStyles as n, rootIndexStyles as r } from "../mf/common-styles.js";
4
4
  import { latexToMarkup as i, loadMathLive as a } from "../mathlive-instance.js";
5
- import { sortKeys as o } from "./keys-layout.js";
6
- import { flatten as s } from "@pie-element/shared-lodash";
7
- import c from "react";
8
- import l from "prop-types";
9
- import { styled as u } from "@mui/material/styles";
10
- import d from "debug";
11
- import { jsx as f } from "react/jsx-runtime";
12
- import p from "@mui/material/Button";
13
- import m from "@mui/material/IconButton";
14
- import { color as h } from "@pie-lib/render-ui";
15
- //#region src/keypad/index.tsx
16
- var g = d("pie-lib:math-input-mathlive:keypad"), _ = () => [h.text(), h.keypadInk()], v = () => ({ "& .MuiTouchRipple-root": { color: `rgb(from ${h.text()} min(r, 255 - r) min(g, 255 - g) min(b, 255 - b))` } }), y = () => ({ "&.Mui-focusVisible": {
17
- outline: `2px solid ${h.focusOutline()}`,
5
+ import { fixLongDivisionWhenReady as o } from "../longdiv.js";
6
+ import { KEYPAD_ATTRIBUTE as s } from "../mf/inactive-caret.js";
7
+ import { flatten as c } from "@pie-element/shared-lodash";
8
+ import l from "react";
9
+ import u from "prop-types";
10
+ import { styled as d } from "@mui/material/styles";
11
+ import f from "debug";
12
+ import { jsx as p } from "react/jsx-runtime";
13
+ import m from "@mui/material/Button";
14
+ import h from "@mui/material/IconButton";
15
+ import { color as g } from "@pie-lib/render-ui";
16
+ // src/keypad/index.tsx
17
+ var _ = f("pie-lib:math-input-mathlive:keypad"), v = () => [g.text(), g.keypadInk()], y = () => ({ "& .MuiTouchRipple-root": { color: `rgb(from ${g.text()} min(r, 255 - r) min(g, 255 - g) min(b, 255 - b))` } }), b = () => ({ "&.Mui-focusVisible": {
18
+ outline: `2px solid ${g.focusOutline()}`,
18
19
  outlineOffset: "-2px",
19
- boxShadow: `inset 0 0 0 4px ${h.v("pie")("background", h.defaults.WHITE)}`
20
- } }), b = ["\\parallel"], x = "skewX(-15deg)", S = "0.03em currentColor", C = 1.25, w = u("span", { shouldForwardProp: (e) => e !== "slanted" })(({ slanted: e }) => ({
20
+ boxShadow: `inset 0 0 0 4px ${g.v("pie")("background", g.defaults.WHITE)}`
21
+ } }), x = ["\\parallel"], S = "skewX(-15deg)", C = "0.03em currentColor", w = 1.25, T = d("span", { shouldForwardProp: (e) => e !== "slanted" })(({ slanted: e }) => ({
21
22
  ...e && {
22
- transform: `${x} scaleY(${C})`,
23
- "& *": { WebkitTextStroke: S }
23
+ transform: `${S} scaleY(${w})`,
24
+ "& *": { WebkitTextStroke: C }
24
25
  },
25
26
  pointerEvents: "none",
26
27
  textTransform: "none",
27
- color: _(),
28
+ color: v(),
28
29
  display: "inline-block",
29
30
  textAlign: "center",
30
31
  lineHeight: 1,
31
32
  maxWidth: "100%",
32
33
  overflow: "hidden",
33
- "& .ML__placeholder": { backgroundColor: h.keypadEmptyPlaceholder ? h.keypadEmptyPlaceholder() : void 0 },
34
+ "& .ML__placeholder": { backgroundColor: g.keypadEmptyPlaceholder ? g.keypadEmptyPlaceholder() : void 0 },
34
35
  "& [data-pie-empty]": { opacity: .5 },
35
36
  "&:has(.ML__mfrac)": { paddingTop: "0.25em" },
36
37
  "& .ML__mfrac:has([data-pie-empty]) .ML__frac-line": {
@@ -39,49 +40,49 @@ var g = d("pie-lib:math-input-mathlive:keypad"), _ = () => [h.text(), h.keypadIn
39
40
  },
40
41
  "& .ML__mfrac:has([data-pie-empty]):not(:has(.ML__center ~ .ML__center [data-pie-empty])) .ML__frac-line": { top: "0.13em" },
41
42
  "& .ML__mfrac:has([data-pie-empty]):not(:only-child) .ML__frac-line": { top: "0.1em" },
42
- ...n
43
- })), T = class e extends c.Component {
43
+ ...r
44
+ })), E = class e extends l.Component {
44
45
  static propTypes = {
45
- latex: l.string.isRequired,
46
- decorative: l.bool
46
+ latex: u.string.isRequired,
47
+ decorative: u.bool
47
48
  };
48
49
  constructor(e) {
49
- super(e), this.state = { markup: i(e.latex) }, this.labelRef = c.createRef();
50
+ super(e), this.state = { markup: i(e.latex) }, this.labelRef = l.createRef();
50
51
  }
51
52
  async componentDidMount() {
52
53
  if (this.state.markup) {
53
- r(this.labelRef.current);
54
+ o(this.labelRef.current);
54
55
  return;
55
56
  }
56
57
  if (await a(), this.unmounted) return;
57
58
  let t = i(this.props.latex);
58
- t ? this.setState({ markup: t }) : e.warned || (e.warned = !0, g("MathLive unavailable - keypad labels are falling back to raw latex"));
59
+ t ? this.setState({ markup: t }) : e.warned || (e.warned = !0, _("MathLive unavailable - keypad labels are falling back to raw latex"));
59
60
  }
60
61
  componentDidUpdate(e, t) {
61
- e.latex !== this.props.latex && this.setState({ markup: i(this.props.latex) }), this.state.markup !== (t && t.markup) && r(this.labelRef.current);
62
+ e.latex !== this.props.latex && this.setState({ markup: i(this.props.latex) }), this.state.markup !== (t && t.markup) && o(this.labelRef.current);
62
63
  }
63
64
  componentWillUnmount() {
64
65
  this.unmounted = !0;
65
66
  }
66
67
  render() {
67
68
  let { markup: e } = this.state, t = this.props.decorative ? "true" : void 0;
68
- return e ? /* @__PURE__ */ f(w, {
69
+ return e ? /* @__PURE__ */ p(T, {
69
70
  ref: this.labelRef,
70
71
  "aria-hidden": t,
71
- slanted: b.includes(this.props.latex),
72
+ slanted: x.includes(this.props.latex),
72
73
  dangerouslySetInnerHTML: { __html: e }
73
- }) : /* @__PURE__ */ f(w, {
74
+ }) : /* @__PURE__ */ p(T, {
74
75
  "aria-hidden": t,
75
- slanted: b.includes(this.props.latex),
76
+ slanted: x.includes(this.props.latex),
76
77
  children: this.props.latex
77
78
  });
78
79
  }
79
- }, E = (e) => e ? {
80
+ }, D = (e) => e ? {
80
81
  gridTemplateColumns: `repeat(${e.columns}, minmax(min-content, 150px))`,
81
82
  gridTemplateRows: `repeat(${e.rows}, minmax(40px, 60px))`,
82
83
  gridAutoFlow: "initial"
83
- } : {}, D = u("div")(() => ({
84
- ...t,
84
+ } : {}, O = d("div")(() => ({
85
+ ...n,
85
86
  width: "100%",
86
87
  display: "grid",
87
88
  gridTemplateRows: "repeat(5, minmax(40px, 60px))",
@@ -96,54 +97,54 @@ var g = d("pie-lib:math-input-mathlive:keypad"), _ = () => [h.text(), h.keypadIn
96
97
  gridTemplateRows: "repeat(4, minmax(40px, 50px)) !important",
97
98
  "& *": { fontFamily: "Roboto, Helvetica, Arial, sans-serif !important" }
98
99
  }
99
- })), O = (e) => ({
100
- backgroundColor: e === "operators" ? h.keypadButtonOperator() : h.keypadButton(),
101
- "&:hover": { backgroundColor: e === "operators" ? h.keypadButtonOperatorHover() : h.keypadButtonHover() }
102
- }), k = u(p)(({ category: e, isDelete: t, isComma: n, isDot: r }) => ({
100
+ })), k = (e) => ({
101
+ backgroundColor: e === "operators" ? g.keypadButtonOperator() : g.keypadButton(),
102
+ "&:hover": { backgroundColor: e === "operators" ? g.keypadButtonOperatorHover() : g.keypadButtonHover() }
103
+ }), A = d(m)(({ category: e, isDelete: t, isComma: n, isDot: r }) => ({
103
104
  minWidth: "auto",
104
105
  textTransform: "none",
105
106
  fontSize: n || r ? "200% !important" : "140% !important",
106
107
  lineHeight: n || r ? "100%" : "normal",
107
- color: _(),
108
- ...O(e),
108
+ color: v(),
109
+ ...k(e),
109
110
  borderRadius: 0,
110
111
  ...t && { fontFamily: "Roboto, Helvetica, Arial, sans-serif !important" },
111
- ...v(),
112
- ...y()
113
- })), A = u(p)(({ category: e }) => ({
112
+ ...y(),
113
+ ...b()
114
+ })), j = d(m)(({ category: e }) => ({
114
115
  textTransform: "none",
115
116
  padding: 0,
116
117
  margin: 0,
117
118
  fontSize: "110% !important",
118
119
  minWidth: "auto",
119
120
  borderRadius: 0,
120
- ...O(e),
121
- ...v(),
122
- ...y()
123
- })), j = u(m)(({ category: e }) => ({
121
+ ...k(e),
122
+ ...y(),
123
+ ...b()
124
+ })), M = d(h)(({ category: e }) => ({
124
125
  minWidth: "auto",
125
- ...O(e),
126
+ ...k(e),
126
127
  borderRadius: 0,
127
128
  "& .icon": { height: "30px" }
128
- })), M = class extends c.Component {
129
+ })), N = class extends l.Component {
129
130
  static propTypes = {
130
- className: l.string,
131
- controlledKeypadMode: l.bool,
132
- baseSet: l.array,
133
- additionalKeys: l.array,
134
- layoutForKeyPad: l.object,
135
- onPress: l.func.isRequired,
136
- onFocus: l.func,
137
- noDecimal: l.bool,
138
- setKeypadInteraction: l.func,
139
- mode: l.oneOfType([l.string, l.number])
131
+ className: u.string,
132
+ controlledKeypadMode: u.bool,
133
+ baseSet: u.array,
134
+ additionalKeys: u.array,
135
+ layoutForKeyPad: u.object,
136
+ onPress: u.func.isRequired,
137
+ onFocus: u.func,
138
+ noDecimal: u.bool,
139
+ setKeypadInteraction: u.func,
140
+ mode: u.oneOfType([u.string, u.number])
140
141
  };
141
142
  static defaultProps = {
142
143
  baseSet: e,
143
144
  noDecimal: !1
144
145
  };
145
146
  constructor(e) {
146
- super(e), this.keypadRef = c.createRef();
147
+ super(e), this.keypadRef = l.createRef();
147
148
  }
148
149
  componentDidMount() {
149
150
  a();
@@ -169,9 +170,9 @@ var g = d("pie-lib:math-input-mathlive:keypad"), _ = () => [h.text(), h.keypadIn
169
170
  this.props.setKeypadInteraction && this.props.setKeypadInteraction(!0);
170
171
  };
171
172
  buttonClick = (e) => {
172
- g("[buttonClick]", e), this.props.onPress(e);
173
+ _("[buttonClick]", e), this.props.onPress(e);
173
174
  };
174
- flowKeys = (e, t) => s([...o(e), ...o(t)]);
175
+ flowKeys = (e, n) => c([...t(e), ...t(n)]);
175
176
  keyIsNotAllowed = (e) => {
176
177
  let { noDecimal: t } = this.props;
177
178
  return !!((e.write === "." && e.label === "." || e.write === "," && e.label === ",") && t);
@@ -184,18 +185,19 @@ var g = d("pie-lib:math-input-mathlive:keypad"), _ = () => [h.text(), h.keypadIn
184
185
  "fractions",
185
186
  "item-authoring",
186
187
  "language"
187
- ].includes(a), s = o ? this.flowKeys([], n || []) : this.flowKeys(t, n || []), c = s.length % 5 ? 1 : 0, l = {
188
- gridTemplateColumns: `repeat(${Math.floor(s.length / 5) + c}, minmax(min-content, 150px))`,
189
- ...E(r)
188
+ ].includes(a), c = o ? this.flowKeys([], n || []) : this.flowKeys(t, n || []), l = c.length % 5 ? 1 : 0, u = {
189
+ gridTemplateColumns: `repeat(${Math.floor(c.length / 5) + l}, minmax(min-content, 150px))`,
190
+ ...D(r)
190
191
  };
191
- return /* @__PURE__ */ f(D, {
192
+ return /* @__PURE__ */ p(O, {
192
193
  ref: this.keypadRef,
194
+ [s]: "",
193
195
  className: [e, a].filter(Boolean).join(" "),
194
- style: l,
196
+ style: u,
195
197
  onFocus: i,
196
- children: s.map((e, t) => {
197
- if (!e) return /* @__PURE__ */ f("span", {}, `empty-${t}`);
198
- if (!(e.label || e.latex || e.icon || e.command || e.keystroke || e.write || e.type || e.actions || e.extraProps)) return /* @__PURE__ */ f(k, {
198
+ children: c.map((e, t) => {
199
+ if (!e) return /* @__PURE__ */ p("span", {}, `empty-${t}`);
200
+ if (!(e.label || e.latex || e.icon || e.command || e.keystroke || e.write || e.type || e.actions || e.extraProps)) return /* @__PURE__ */ p(A, {
199
201
  disabled: !0,
200
202
  "aria-hidden": "true",
201
203
  tabIndex: -1,
@@ -205,18 +207,18 @@ var g = d("pie-lib:math-input-mathlive:keypad"), _ = () => [h.text(), h.keypadIn
205
207
  ...e.actions || {},
206
208
  ...e.extraProps || {}
207
209
  }, a = this.buttonClick.bind(this, e), s = this.keyIsNotAllowed(e), c = e.ariaLabel ? e.ariaLabel : e.name || e.label;
208
- if (e.latex) return /* @__PURE__ */ f(A, {
210
+ if (e.latex) return /* @__PURE__ */ p(j, {
209
211
  onClick: a,
210
212
  disabled: s,
211
213
  category: r,
212
214
  "aria-label": c,
213
215
  ...i,
214
- children: /* @__PURE__ */ f(T, {
216
+ children: /* @__PURE__ */ p(E, {
215
217
  latex: e.latex,
216
218
  decorative: !!c
217
219
  })
218
220
  }, n);
219
- if (e.label) return /* @__PURE__ */ f(k, {
221
+ if (e.label) return /* @__PURE__ */ p(A, {
220
222
  onClick: a,
221
223
  disabled: s,
222
224
  category: r,
@@ -228,18 +230,17 @@ var g = d("pie-lib:math-input-mathlive:keypad"), _ = () => [h.text(), h.keypadIn
228
230
  children: e.label
229
231
  }, n);
230
232
  let l = e.icon ? e.icon : "div";
231
- return /* @__PURE__ */ f(j, {
233
+ return /* @__PURE__ */ p(M, {
232
234
  tabIndex: "-1",
233
235
  onClick: a,
234
236
  disabled: s,
235
237
  category: r,
236
238
  size: "large",
237
239
  ...i,
238
- children: /* @__PURE__ */ f(l, { className: "icon" })
240
+ children: /* @__PURE__ */ p(l, { className: "icon" })
239
241
  }, n);
240
242
  })
241
243
  });
242
244
  }
243
245
  };
244
- //#endregion
245
- export { M as KeyPad, M as default, T as LatexLabel };
246
+ export { N as KeyPad, N as default, E as LatexLabel };
@@ -1,5 +1,4 @@
1
1
  import { times as e, zip as t } from "@pie-element/shared-lodash";
2
- //#region src/keypad/keys-layout.ts
2
+ // src/keypad/keys-layout.ts
3
3
  var n = (n) => (e(5 - n.length, () => n.push([])), t.apply(null, n));
4
- //#endregion
5
4
  export { n as sortKeys };
@@ -1,6 +1,6 @@
1
1
  import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
2
2
  import { mkSet as t } from "./utils.js";
3
- //#region src/keys/basic-operators.ts
3
+ // src/keys/basic-operators.ts
4
4
  var n = /* @__PURE__ */ e({
5
5
  divide: () => s,
6
6
  equals: () => i,
@@ -26,5 +26,4 @@ var n = /* @__PURE__ */ e({
26
26
  label: "×",
27
27
  command: "\\times"
28
28
  });
29
- //#endregion
30
29
  export { n as basic_operators_exports, s as divide, i as equals, o as minus, c as multiply, a as plus };
@@ -1,5 +1,5 @@
1
1
  import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
2
- //#region src/keys/comparison.ts
2
+ // src/keys/comparison.ts
3
3
  var t = /* @__PURE__ */ e({
4
4
  greaterThan: () => i,
5
5
  greaterThanEqual: () => o,
@@ -28,5 +28,4 @@ var t = /* @__PURE__ */ e({
28
28
  command: "\\ge",
29
29
  latex: "\\ge"
30
30
  });
31
- //#endregion
32
31
  export { t as comparison_exports, i as greaterThan, o as greaterThanEqual, r as lessThan, a as lessThanEqual };
@@ -1,6 +1,6 @@
1
1
  import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
2
2
  import { mkSet as t } from "./utils.js";
3
- //#region src/keys/constants.ts
3
+ // src/keys/constants.ts
4
4
  var n = /* @__PURE__ */ e({
5
5
  eulers: () => a,
6
6
  halfInfinity: () => s,
@@ -31,5 +31,4 @@ var n = /* @__PURE__ */ e({
31
31
  command: "\\propto",
32
32
  category: "constants"
33
33
  });
34
- //#endregion
35
34
  export { n as constants_exports, a as eulers, s as halfInfinity, o as infinity, i as pi };
@@ -1,5 +1,5 @@
1
1
  import { times as e } from "@pie-element/shared-lodash";
2
- //#region src/keys/digits.ts
2
+ // src/keys/digits.ts
3
3
  var t = {
4
4
  0: "zero",
5
5
  1: "one",
@@ -30,5 +30,4 @@ var t = {
30
30
  category: "digit"
31
31
  }
32
32
  });
33
- //#endregion
34
33
  export { n as default };
package/dist/keys/edit.js CHANGED
@@ -1,9 +1,8 @@
1
- //#region src/keys/edit.ts
1
+ // src/keys/edit.ts
2
2
  var e = {
3
3
  label: "⌫",
4
4
  category: "edit",
5
5
  keystroke: "Backspace",
6
6
  ariaLabel: "Delete"
7
7
  };
8
- //#endregion
9
8
  export { e as del };
@@ -1,6 +1,6 @@
1
1
  import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
2
2
  import { mkSet as t } from "./utils.js";
3
- //#region src/keys/exponent.ts
3
+ // src/keys/exponent.ts
4
4
  var n = /* @__PURE__ */ e({
5
5
  nthRoot: () => s,
6
6
  squareRoot: () => o,
@@ -24,5 +24,4 @@ var n = /* @__PURE__ */ e({
24
24
  latex: "\\sqrt[{}]{}",
25
25
  command: "\\nthroot"
26
26
  });
27
- //#endregion
28
27
  export { n as exponent_exports, s as nthRoot, o as squareRoot, i as squared, a as xToPowerOfN };
@@ -1,6 +1,6 @@
1
1
  import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
2
2
  import { mkSet as t } from "./utils.js";
3
- //#region src/keys/fractions.ts
3
+ // src/keys/fractions.ts
4
4
  var n = /* @__PURE__ */ e({
5
5
  blankOverBlank: () => i,
6
6
  xBlankBlank: () => o,
@@ -23,5 +23,4 @@ var n = /* @__PURE__ */ e({
23
23
  command: "\\frac",
24
24
  ariaLabel: "mixed number"
25
25
  });
26
- //#endregion
27
26
  export { i as blankOverBlank, n as fractions_exports, o as xBlankBlank, a as xOverBlank };
@@ -1,5 +1,5 @@
1
1
  import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
2
- //#region src/keys/geometry.ts
2
+ // src/keys/geometry.ts
3
3
  var t = /* @__PURE__ */ e({
4
4
  angle: () => u,
5
5
  circledDot: () => g,
@@ -123,5 +123,4 @@ var t = /* @__PURE__ */ e({
123
123
  latex: "\\leftrightarrow",
124
124
  command: "\\leftrightarrow"
125
125
  });
126
- //#endregion
127
126
  export { u as angle, g as circledDot, y as congruentTo, _ as degree, S as doublePrimeArcSecond, t as geometry_exports, C as leftArrow, T as leftrightArrow, f as measureOfAngle, b as notCongruentTo, c as notParallel, d as overArc, a as overLeftRightArrow, i as overRightArrow, r as overline, s as parallel, h as parallelogram, l as perpindicular, x as primeArcminute, w as rightArrow, o as segment, v as similarTo, m as square, p as triangle };
@@ -16,7 +16,7 @@ import q from "./digits.js";
16
16
  import { longDivision as J, therefore as Ae } from "./logic.js";
17
17
  import { left as Y, right as X } from "./navigation.js";
18
18
  import { del as Z } from "./edit.js";
19
- //#region src/keys/grades.ts
19
+ // src/keys/grades.ts
20
20
  var Q = [
21
21
  [
22
22
  c,
@@ -410,5 +410,4 @@ var Q = [
410
410
  let { latex: t } = e, n = (Pe || []).find((e) => t === e.latex || t === e.write || t === e.command || t === e.otherNotation);
411
411
  return t && n || e;
412
412
  });
413
- //#endregion
414
413
  export { $ as gradeSets, Ne as keysForGrade, Fe as normalizeAdditionalKeys };