@pie-lib/math-input-mathlive 2.0.1-next.20261109125924 → 2.0.1-next.20261110063142
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/_virtual/_rolldown/runtime.js +1 -2
- package/dist/horizontal-keypad.js +5 -6
- package/dist/i18n/ar.js +1 -2
- package/dist/i18n/cy.js +1 -2
- package/dist/i18n/en-AU.js +1 -2
- package/dist/i18n/en-GB.js +1 -2
- package/dist/i18n/en-US.js +1 -2
- package/dist/i18n/es.js +1 -2
- package/dist/i18n/fr.js +1 -2
- package/dist/i18n/index.js +1 -2
- package/dist/i18n/ja.js +1 -2
- package/dist/i18n/ko.js +1 -2
- package/dist/i18n/nl-NL.js +1 -2
- package/dist/i18n/pt.js +1 -2
- package/dist/i18n/ro.js +1 -2
- package/dist/i18n/sv.js +1 -2
- package/dist/i18n/th-TH.js +1 -2
- package/dist/i18n/zh.js +1 -2
- package/dist/index.js +8 -9
- package/dist/keypad/index.js +80 -79
- package/dist/keypad/keys-layout.js +1 -2
- package/dist/keys/basic-operators.js +1 -2
- package/dist/keys/comparison.js +1 -2
- package/dist/keys/constants.js +1 -2
- package/dist/keys/digits.js +1 -2
- package/dist/keys/edit.js +1 -2
- package/dist/keys/exponent.js +1 -2
- package/dist/keys/fractions.js +1 -2
- package/dist/keys/geometry.js +1 -2
- package/dist/keys/grades.js +1 -2
- package/dist/keys/index.js +17 -18
- package/dist/keys/log.js +1 -2
- package/dist/keys/logic.js +1 -2
- package/dist/keys/matrices.js +1 -2
- package/dist/keys/misc.js +1 -2
- package/dist/keys/navigation.js +1 -2
- package/dist/keys/operators.js +1 -2
- package/dist/keys/statistics.js +1 -2
- package/dist/keys/sub-sup.js +1 -2
- package/dist/keys/trigonometry.js +1 -2
- package/dist/keys/utils.js +1 -2
- package/dist/keys/vars.js +1 -2
- package/dist/latex-bridge.js +1 -2
- package/dist/longdiv.js +1 -2
- package/dist/math-input.js +9 -10
- package/dist/mathlive-instance.js +58 -58
- package/dist/mf/common-styles.js +1 -2
- package/dist/mf/field-label.js +1 -2
- package/dist/mf/inactive-caret.d.ts +18 -0
- package/dist/mf/inactive-caret.js +31 -0
- package/dist/mf/index.js +17 -18
- package/dist/mf/input.js +50 -50
- package/dist/mf/static.js +61 -61
- package/dist/selection.js +1 -2
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
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
|
-
|
|
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 =
|
|
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(
|
|
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
package/dist/i18n/cy.js
CHANGED
package/dist/i18n/en-AU.js
CHANGED
package/dist/i18n/en-GB.js
CHANGED
package/dist/i18n/en-US.js
CHANGED
package/dist/i18n/es.js
CHANGED
package/dist/i18n/fr.js
CHANGED
package/dist/i18n/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "./en-US.js";
|
|
2
2
|
import { defineCatalogs as t } from "@pie-element/shared-i18n";
|
|
3
|
-
|
|
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
package/dist/i18n/ko.js
CHANGED
package/dist/i18n/nl-NL.js
CHANGED
package/dist/i18n/pt.js
CHANGED
package/dist/i18n/ro.js
CHANGED
package/dist/i18n/sv.js
CHANGED
package/dist/i18n/th-TH.js
CHANGED
package/dist/i18n/zh.js
CHANGED
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 {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import v from "./
|
|
9
|
-
|
|
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
|
-
|
|
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 };
|
package/dist/keypad/index.js
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import { baseSet as e } from "../keys/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import c from "
|
|
8
|
-
import l from "
|
|
9
|
-
import
|
|
10
|
-
import d from "
|
|
11
|
-
import
|
|
12
|
-
import p from "
|
|
13
|
-
import m from "@mui/material/
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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 ${
|
|
20
|
-
} }),
|
|
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: `${
|
|
23
|
-
"& *": { WebkitTextStroke:
|
|
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:
|
|
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
|
-
...
|
|
43
|
-
})),
|
|
43
|
+
...r
|
|
44
|
+
})), E = class e extends l.Component {
|
|
44
45
|
static propTypes = {
|
|
45
|
-
latex:
|
|
46
|
-
decorative:
|
|
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 =
|
|
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
|
-
|
|
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,
|
|
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) &&
|
|
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__ */
|
|
69
|
+
return e ? /* @__PURE__ */ p(T, {
|
|
69
70
|
ref: this.labelRef,
|
|
70
71
|
"aria-hidden": t,
|
|
71
|
-
slanted:
|
|
72
|
+
slanted: x.includes(this.props.latex),
|
|
72
73
|
dangerouslySetInnerHTML: { __html: e }
|
|
73
|
-
}) : /* @__PURE__ */
|
|
74
|
+
}) : /* @__PURE__ */ p(T, {
|
|
74
75
|
"aria-hidden": t,
|
|
75
|
-
slanted:
|
|
76
|
+
slanted: x.includes(this.props.latex),
|
|
76
77
|
children: this.props.latex
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
|
-
},
|
|
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
|
-
} : {},
|
|
84
|
-
...
|
|
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
|
-
})),
|
|
100
|
-
backgroundColor: e === "operators" ?
|
|
101
|
-
"&:hover": { backgroundColor: e === "operators" ?
|
|
102
|
-
}),
|
|
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
|
-
...
|
|
108
|
+
color: v(),
|
|
109
|
+
...k(e),
|
|
109
110
|
borderRadius: 0,
|
|
110
111
|
...t && { fontFamily: "Roboto, Helvetica, Arial, sans-serif !important" },
|
|
111
|
-
...
|
|
112
|
-
...
|
|
113
|
-
})),
|
|
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
|
-
...
|
|
121
|
-
...
|
|
122
|
-
...
|
|
123
|
-
})),
|
|
121
|
+
...k(e),
|
|
122
|
+
...y(),
|
|
123
|
+
...b()
|
|
124
|
+
})), M = d(h)(({ category: e }) => ({
|
|
124
125
|
minWidth: "auto",
|
|
125
|
-
...
|
|
126
|
+
...k(e),
|
|
126
127
|
borderRadius: 0,
|
|
127
128
|
"& .icon": { height: "30px" }
|
|
128
|
-
})),
|
|
129
|
+
})), N = class extends l.Component {
|
|
129
130
|
static propTypes = {
|
|
130
|
-
className:
|
|
131
|
-
controlledKeypadMode:
|
|
132
|
-
baseSet:
|
|
133
|
-
additionalKeys:
|
|
134
|
-
layoutForKeyPad:
|
|
135
|
-
onPress:
|
|
136
|
-
onFocus:
|
|
137
|
-
noDecimal:
|
|
138
|
-
setKeypadInteraction:
|
|
139
|
-
mode:
|
|
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 =
|
|
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
|
-
|
|
173
|
+
_("[buttonClick]", e), this.props.onPress(e);
|
|
173
174
|
};
|
|
174
|
-
flowKeys = (e,
|
|
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),
|
|
188
|
-
gridTemplateColumns: `repeat(${Math.floor(
|
|
189
|
-
...
|
|
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__ */
|
|
192
|
+
return /* @__PURE__ */ p(O, {
|
|
192
193
|
ref: this.keypadRef,
|
|
194
|
+
[s]: "",
|
|
193
195
|
className: [e, a].filter(Boolean).join(" "),
|
|
194
|
-
style:
|
|
196
|
+
style: u,
|
|
195
197
|
onFocus: i,
|
|
196
|
-
children:
|
|
197
|
-
if (!e) return /* @__PURE__ */
|
|
198
|
-
if (!(e.label || e.latex || e.icon || e.command || e.keystroke || e.write || e.type || e.actions || e.extraProps)) return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
240
|
+
children: /* @__PURE__ */ p(l, { className: "icon" })
|
|
239
241
|
}, n);
|
|
240
242
|
})
|
|
241
243
|
});
|
|
242
244
|
}
|
|
243
245
|
};
|
|
244
|
-
|
|
245
|
-
export { M as KeyPad, M as default, T as LatexLabel };
|
|
246
|
+
export { N as KeyPad, N as default, E as LatexLabel };
|
|
@@ -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
|
-
|
|
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 };
|
package/dist/keys/comparison.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
|
|
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 };
|
package/dist/keys/constants.js
CHANGED
|
@@ -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
|
-
|
|
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 };
|
package/dist/keys/digits.js
CHANGED
package/dist/keys/edit.js
CHANGED
package/dist/keys/exponent.js
CHANGED
|
@@ -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
|
-
|
|
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 };
|
package/dist/keys/fractions.js
CHANGED
|
@@ -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
|
-
|
|
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 };
|
package/dist/keys/geometry.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
|
|
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 };
|
package/dist/keys/grades.js
CHANGED
|
@@ -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
|
-
|
|
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 };
|