@pie-lib/math-input 8.1.1-next.1 → 8.1.1-next.2
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 +11 -0
- package/dist/horizontal-keypad.d.ts +31 -0
- package/dist/horizontal-keypad.js +57 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +19 -0
- package/dist/keypad/accessible-keypad.d.ts +37 -0
- package/dist/keypad/accessible-keypad.js +614 -0
- package/dist/keypad/index.d.ts +2 -0
- package/dist/keypad/keys-layout.d.ts +15 -0
- package/dist/keypad/keys-layout.js +5 -0
- package/dist/keypad/model.d.ts +28 -0
- package/dist/keypad/model.js +4 -0
- package/dist/keys/basic-operators.d.ts +13 -0
- package/dist/keys/basic-operators.js +30 -0
- package/dist/keys/chars.d.ts +13 -0
- package/dist/keys/comparison.d.ts +12 -0
- package/dist/keys/comparison.js +32 -0
- package/dist/keys/constants.d.ts +12 -0
- package/dist/keys/constants.js +35 -0
- package/dist/keys/digits.d.ts +23 -0
- package/dist/keys/digits.js +34 -0
- package/dist/keys/edit.d.ts +14 -0
- package/dist/keys/edit.js +9 -0
- package/dist/keys/exponent.d.ts +12 -0
- package/dist/keys/exponent.js +28 -0
- package/dist/keys/fractions.d.ts +11 -0
- package/dist/keys/fractions.js +27 -0
- package/dist/keys/geometry.d.ts +31 -0
- package/dist/keys/geometry.js +127 -0
- package/dist/keys/grades.d.ts +17 -0
- package/dist/keys/grades.js +414 -0
- package/dist/keys/index.d.ts +14 -0
- package/dist/keys/index.js +50 -0
- package/dist/keys/log.d.ts +11 -0
- package/dist/keys/log.js +25 -0
- package/dist/keys/logic.d.ts +10 -0
- package/dist/keys/logic.js +13 -0
- package/dist/keys/matrices.d.ts +10 -0
- package/dist/keys/matrices.js +17 -0
- package/dist/keys/misc.d.ts +18 -0
- package/dist/keys/misc.js +60 -0
- package/dist/keys/navigation.d.ts +10 -0
- package/dist/keys/navigation.js +13 -0
- package/dist/keys/operators.d.ts +9 -0
- package/dist/keys/operators.js +11 -0
- package/dist/keys/statistics.d.ts +13 -0
- package/dist/keys/statistics.js +38 -0
- package/dist/keys/sub-sup.d.ts +10 -0
- package/dist/keys/sub-sup.js +17 -0
- package/dist/keys/trigonometry.d.ts +14 -0
- package/dist/keys/trigonometry.js +43 -0
- package/dist/keys/utils.d.ts +13 -0
- package/dist/keys/utils.js +24 -0
- package/dist/keys/vars.d.ts +11 -0
- package/dist/keys/vars.js +22 -0
- package/dist/math-input.d.ts +30 -0
- package/dist/mq/common-mq-styles.d.ts +225 -0
- package/dist/mq/common-mq-styles.js +54 -0
- package/dist/mq/custom-elements.d.ts +10 -0
- package/dist/mq/custom-elements.js +10 -0
- package/dist/mq/index.d.ts +12 -0
- package/dist/mq/index.js +12 -0
- package/dist/mq/input.d.ts +35 -0
- package/dist/mq/input.js +83 -0
- package/dist/mq/static.d.ts +43 -0
- package/dist/mq/static.js +142 -0
- package/dist/updateSpans.d.ts +10 -0
- package/dist/updateSpans.js +9 -0
- package/package.json +32 -17
- package/CHANGELOG.json +0 -17
- package/CHANGELOG.md +0 -1172
- package/LICENSE.md +0 -5
- package/lib/horizontal-keypad.js +0 -96
- package/lib/horizontal-keypad.js.map +0 -1
- package/lib/index.js +0 -69
- package/lib/index.js.map +0 -1
- package/lib/keypad/index.js +0 -413
- package/lib/keypad/index.js.map +0 -1
- package/lib/keypad/keys-layout.js +0 -22
- package/lib/keypad/keys-layout.js.map +0 -1
- package/lib/keys/basic-operators.js +0 -33
- package/lib/keys/basic-operators.js.map +0 -1
- package/lib/keys/chars.js +0 -12
- package/lib/keys/chars.js.map +0 -1
- package/lib/keys/comparison.js +0 -39
- package/lib/keys/comparison.js.map +0 -1
- package/lib/keys/constants.js +0 -37
- package/lib/keys/constants.js.map +0 -1
- package/lib/keys/digits.js +0 -46
- package/lib/keys/digits.js.map +0 -1
- package/lib/keys/edit.js +0 -14
- package/lib/keys/edit.js.map +0 -1
- package/lib/keys/exponent.js +0 -30
- package/lib/keys/exponent.js.map +0 -1
- package/lib/keys/fractions.js +0 -29
- package/lib/keys/fractions.js.map +0 -1
- package/lib/keys/geometry.js +0 -140
- package/lib/keys/geometry.js.map +0 -1
- package/lib/keys/grades.js +0 -259
- package/lib/keys/grades.js.map +0 -1
- package/lib/keys/index.js +0 -35
- package/lib/keys/index.js.map +0 -1
- package/lib/keys/log.js +0 -27
- package/lib/keys/log.js.map +0 -1
- package/lib/keys/logic.js +0 -19
- package/lib/keys/logic.js.map +0 -1
- package/lib/keys/matrices.js +0 -19
- package/lib/keys/matrices.js.map +0 -1
- package/lib/keys/misc.js +0 -62
- package/lib/keys/misc.js.map +0 -1
- package/lib/keys/navigation.js +0 -20
- package/lib/keys/navigation.js.map +0 -1
- package/lib/keys/operators.js +0 -15
- package/lib/keys/operators.js.map +0 -1
- package/lib/keys/statistics.js +0 -40
- package/lib/keys/statistics.js.map +0 -1
- package/lib/keys/sub-sup.js +0 -19
- package/lib/keys/sub-sup.js.map +0 -1
- package/lib/keys/trigonometry.js +0 -45
- package/lib/keys/trigonometry.js.map +0 -1
- package/lib/keys/utils.js +0 -87
- package/lib/keys/utils.js.map +0 -1
- package/lib/keys/vars.js +0 -24
- package/lib/keys/vars.js.map +0 -1
- package/lib/math-input.js +0 -141
- package/lib/math-input.js.map +0 -1
- package/lib/mq/common-mq-styles.js +0 -102
- package/lib/mq/common-mq-styles.js.map +0 -1
- package/lib/mq/custom-elements.js +0 -20
- package/lib/mq/custom-elements.js.map +0 -1
- package/lib/mq/index.js +0 -28
- package/lib/mq/index.js.map +0 -1
- package/lib/mq/input.js +0 -186
- package/lib/mq/input.js.map +0 -1
- package/lib/mq/mathquill-instance.js +0 -52
- package/lib/mq/mathquill-instance.js.map +0 -1
- package/lib/mq/static.js +0 -301
- package/lib/mq/static.js.map +0 -1
- package/lib/updateSpans.js +0 -19
- package/lib/updateSpans.js.map +0 -1
- package/src/__tests__/horizontal-keypad.test.jsx +0 -463
- package/src/__tests__/index.test.js +0 -247
- package/src/__tests__/math-input-test.jsx +0 -45
- package/src/__tests__/updateSpans.test.js +0 -297
- package/src/horizontal-keypad.jsx +0 -69
- package/src/index.jsx +0 -28
- package/src/keypad/__tests__/index.test.jsx +0 -25
- package/src/keypad/__tests__/keys-layout.test.js +0 -14
- package/src/keypad/index.jsx +0 -439
- package/src/keypad/keys-layout.js +0 -16
- package/src/keys/__tests__/utils.test.js +0 -57
- package/src/keys/basic-operators.js +0 -32
- package/src/keys/chars.js +0 -5
- package/src/keys/comparison.js +0 -28
- package/src/keys/constants.js +0 -35
- package/src/keys/digits.js +0 -40
- package/src/keys/edit.js +0 -3
- package/src/keys/exponent.js +0 -28
- package/src/keys/fractions.js +0 -26
- package/src/keys/geometry.js +0 -144
- package/src/keys/grades.js +0 -367
- package/src/keys/index.js +0 -20
- package/src/keys/log.js +0 -22
- package/src/keys/logic.js +0 -15
- package/src/keys/matrices.js +0 -15
- package/src/keys/misc.js +0 -65
- package/src/keys/navigation.js +0 -8
- package/src/keys/operators.js +0 -10
- package/src/keys/statistics.js +0 -38
- package/src/keys/sub-sup.js +0 -15
- package/src/keys/trigonometry.js +0 -15
- package/src/keys/utils.js +0 -66
- package/src/keys/vars.js +0 -19
- package/src/math-input.jsx +0 -119
- package/src/mq/__tests__/custom-elements.test.js +0 -342
- package/src/mq/__tests__/input.test.jsx +0 -40
- package/src/mq/__tests__/mathquill-instance.test.js +0 -67
- package/src/mq/__tests__/static.test.jsx +0 -33
- package/src/mq/common-mq-styles.js +0 -109
- package/src/mq/custom-elements.js +0 -11
- package/src/mq/index.js +0 -5
- package/src/mq/input.jsx +0 -166
- package/src/mq/mathquill-instance.js +0 -45
- package/src/mq/static.jsx +0 -290
- package/src/updateSpans.js +0 -15
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/math-input/src/keys/statistics.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const xBar: any;
|
|
10
|
+
export declare const yBar: any;
|
|
11
|
+
export declare const mu: any;
|
|
12
|
+
export declare const sigma: any;
|
|
13
|
+
export declare const smallSigma: any;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { mkSet as t } from "./utils.js";
|
|
3
|
+
//#region src/keys/statistics.ts
|
|
4
|
+
var n = /* @__PURE__ */ e({
|
|
5
|
+
mu: () => o,
|
|
6
|
+
sigma: () => s,
|
|
7
|
+
smallSigma: () => c,
|
|
8
|
+
xBar: () => i,
|
|
9
|
+
yBar: () => a
|
|
10
|
+
}), r = t("statistics"), i = r({
|
|
11
|
+
name: "X Bar",
|
|
12
|
+
label: "x̄",
|
|
13
|
+
latex: "\\overline{x}",
|
|
14
|
+
write: "\\overline{x}"
|
|
15
|
+
}), a = r({
|
|
16
|
+
name: "Y Bar",
|
|
17
|
+
latex: "\\overline{y}",
|
|
18
|
+
write: "\\overline{y}"
|
|
19
|
+
}), o = r({
|
|
20
|
+
name: "mu",
|
|
21
|
+
label: "mu",
|
|
22
|
+
latex: "\\mu",
|
|
23
|
+
write: "\\mu"
|
|
24
|
+
}), s = r({
|
|
25
|
+
name: "Sigma",
|
|
26
|
+
ariaLabel: "Uppercase Sigma",
|
|
27
|
+
label: "\\Sigma",
|
|
28
|
+
latex: "\\Sigma",
|
|
29
|
+
write: "\\Sigma"
|
|
30
|
+
}), c = r({
|
|
31
|
+
name: "sigma",
|
|
32
|
+
ariaLabel: "Lowercase Sigma",
|
|
33
|
+
label: "\\sigma",
|
|
34
|
+
latex: "\\sigma",
|
|
35
|
+
write: "\\sigma"
|
|
36
|
+
});
|
|
37
|
+
//#endregion
|
|
38
|
+
export { o as mu, s as sigma, c as smallSigma, n as statistics_exports, i as xBar, a as yBar };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/math-input/src/keys/sub-sup.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const superscript: any;
|
|
10
|
+
export declare const subscript: any;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { mkSet as t } from "./utils.js";
|
|
3
|
+
//#region src/keys/sub-sup.ts
|
|
4
|
+
var n = /* @__PURE__ */ e({
|
|
5
|
+
subscript: () => a,
|
|
6
|
+
superscript: () => i
|
|
7
|
+
}), r = t("sub-sup"), i = r({
|
|
8
|
+
name: "Superscript",
|
|
9
|
+
latex: "x^{}",
|
|
10
|
+
command: "^"
|
|
11
|
+
}), a = r({
|
|
12
|
+
name: "Subscript",
|
|
13
|
+
latex: "x_{}",
|
|
14
|
+
command: "_"
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { n as sub_sup_exports, a as subscript };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/math-input/src/keys/trigonometry.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const sin: any;
|
|
10
|
+
export declare const cos: any;
|
|
11
|
+
export declare const tan: any;
|
|
12
|
+
export declare const sec: any;
|
|
13
|
+
export declare const csc: any;
|
|
14
|
+
export declare const cot: any;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { mkSet as t } from "./utils.js";
|
|
3
|
+
//#region src/keys/trigonometry.ts
|
|
4
|
+
var n = /* @__PURE__ */ e({
|
|
5
|
+
cos: () => a,
|
|
6
|
+
cot: () => l,
|
|
7
|
+
csc: () => c,
|
|
8
|
+
sec: () => s,
|
|
9
|
+
sin: () => i,
|
|
10
|
+
tan: () => o
|
|
11
|
+
}), r = t("trigonometry"), i = r({
|
|
12
|
+
name: "sine",
|
|
13
|
+
label: "sin",
|
|
14
|
+
command: "\\sin",
|
|
15
|
+
latex: "\\sin"
|
|
16
|
+
}), a = r({
|
|
17
|
+
name: "cosine",
|
|
18
|
+
label: "cos",
|
|
19
|
+
command: "\\cos",
|
|
20
|
+
latex: "\\cos"
|
|
21
|
+
}), o = r({
|
|
22
|
+
name: "tanget",
|
|
23
|
+
label: "tan",
|
|
24
|
+
command: "\\tan",
|
|
25
|
+
latex: "\\tan"
|
|
26
|
+
}), s = r({
|
|
27
|
+
name: "secant",
|
|
28
|
+
label: "sec",
|
|
29
|
+
command: "\\sec",
|
|
30
|
+
latex: "\\sec"
|
|
31
|
+
}), c = r({
|
|
32
|
+
name: "cosecant",
|
|
33
|
+
label: "csc",
|
|
34
|
+
command: "\\csc",
|
|
35
|
+
latex: "\\csc"
|
|
36
|
+
}), l = r({
|
|
37
|
+
name: "cotangent",
|
|
38
|
+
label: "cot",
|
|
39
|
+
command: "\\cot",
|
|
40
|
+
latex: "\\cot"
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
export { a as cos, l as cot, c as csc, s as sec, i as sin, o as tan, n as trigonometry_exports };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/math-input/src/keys/utils.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const mkSet: (category: any) => (o: any) => any;
|
|
10
|
+
export declare const toArray: (o: any) => any[];
|
|
11
|
+
export declare const toKey: (category: any) => (v: any) => any;
|
|
12
|
+
export declare const transformToKeySetStructure: (data?: never[]) => any[];
|
|
13
|
+
export declare const extendKeySet: (base?: never[], keySetData?: never[]) => any[][];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { flatten as e, times as t } from "@pie-element/shared-lodash";
|
|
2
|
+
//#region src/keys/utils.ts
|
|
3
|
+
var n = (e) => (t) => ({
|
|
4
|
+
...t,
|
|
5
|
+
category: e
|
|
6
|
+
}), r = (e = []) => {
|
|
7
|
+
let n = [];
|
|
8
|
+
t(5, () => n.push([]));
|
|
9
|
+
let r = e.length, i = 0, a = 0;
|
|
10
|
+
for (; a < r;) n[i++].push(e[a++]), i === 5 && (i = 0);
|
|
11
|
+
return n;
|
|
12
|
+
}, i = (t) => (n) => {
|
|
13
|
+
let r = e(t), i = r.some((e) => e.latex === n.latex), a = r.some((e) => e.name === n.name);
|
|
14
|
+
return !i && !a;
|
|
15
|
+
}, a = (e = [], n = []) => {
|
|
16
|
+
n = n.filter(i(e));
|
|
17
|
+
let a = [];
|
|
18
|
+
t(5 - e.length, () => e.push([])), t(5, () => a.push([]));
|
|
19
|
+
let o = r(n);
|
|
20
|
+
for (let t = 0; t < 5; t++) a[t] = [...e[t], ...o[t]];
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a as extendKeySet, n as mkSet };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/math-input/src/keys/vars.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const x: any;
|
|
10
|
+
export declare const y: any;
|
|
11
|
+
export declare const theta: any;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { mkSet as t } from "./utils.js";
|
|
3
|
+
//#region src/keys/vars.ts
|
|
4
|
+
var n = /* @__PURE__ */ e({
|
|
5
|
+
theta: () => o,
|
|
6
|
+
x: () => i,
|
|
7
|
+
y: () => a
|
|
8
|
+
}), r = t("vars"), i = r({
|
|
9
|
+
name: "X",
|
|
10
|
+
latex: "x",
|
|
11
|
+
write: "x"
|
|
12
|
+
}), a = r({
|
|
13
|
+
name: "Y",
|
|
14
|
+
latex: "y",
|
|
15
|
+
write: "y"
|
|
16
|
+
}), o = r({
|
|
17
|
+
name: "Theta",
|
|
18
|
+
latex: "\\theta",
|
|
19
|
+
write: "\\theta"
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
export { o as theta, n as vars_exports, i as x, a as y };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/math-input/src/math-input.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare class MathInput extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
className: PropTypes.Requireable<string>;
|
|
14
|
+
keyset: PropTypes.Requireable<any[]>;
|
|
15
|
+
displayMode: PropTypes.Requireable<string>;
|
|
16
|
+
latex: PropTypes.Requireable<string>;
|
|
17
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
};
|
|
19
|
+
static defaultProps: {
|
|
20
|
+
keyset: never[];
|
|
21
|
+
displayMode: string;
|
|
22
|
+
};
|
|
23
|
+
constructor(props: any);
|
|
24
|
+
keypadPress: any;
|
|
25
|
+
inputFocus: any;
|
|
26
|
+
inputBlur: any;
|
|
27
|
+
changeLatex: any;
|
|
28
|
+
render(): React.JSX.Element;
|
|
29
|
+
}
|
|
30
|
+
export default MathInput;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/math-input/src/mq/common-mq-styles.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const commonMqFontStyles: {
|
|
10
|
+
fontFamily: string;
|
|
11
|
+
'-webkit-font-smoothing': string;
|
|
12
|
+
'& .mq-math-mode > span > var': {
|
|
13
|
+
fontFamily: string;
|
|
14
|
+
};
|
|
15
|
+
'& .mq-math-mode span var': {
|
|
16
|
+
fontFamily: string;
|
|
17
|
+
};
|
|
18
|
+
'& .mq-math-mode .mq-nonSymbola': {
|
|
19
|
+
fontFamily: string;
|
|
20
|
+
};
|
|
21
|
+
'& .mq-math-mode > span > var.mq-operator-name': {
|
|
22
|
+
fontFamily: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const longdivStyles: {
|
|
26
|
+
'& .mq-longdiv-inner': {
|
|
27
|
+
marginTop: string;
|
|
28
|
+
marginLeft: string;
|
|
29
|
+
'& > .mq-empty': {
|
|
30
|
+
padding: string;
|
|
31
|
+
marginLeft: string;
|
|
32
|
+
marginTop: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
'& .mq-math-mode .mq-longdiv': {
|
|
36
|
+
display: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare const supsubStyles: {
|
|
40
|
+
'& .mq-math-mode sup.mq-nthroot': {
|
|
41
|
+
fontSize: string;
|
|
42
|
+
verticalAlign: string;
|
|
43
|
+
paddingRight: string;
|
|
44
|
+
};
|
|
45
|
+
'& .mq-math-mode .mq-supsub': {
|
|
46
|
+
fontSize: string;
|
|
47
|
+
};
|
|
48
|
+
'& .mq-supsub ': {
|
|
49
|
+
fontSize: string;
|
|
50
|
+
};
|
|
51
|
+
'& .mq-math-mode .mq-supsub.mq-sup-only': {
|
|
52
|
+
verticalAlign: string;
|
|
53
|
+
'& .mq-sup': {
|
|
54
|
+
marginBottom: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
'& .mq-math-mode .mq-fraction + .mq-supsub.mq-sup-only': {
|
|
58
|
+
verticalAlign: string;
|
|
59
|
+
};
|
|
60
|
+
'& .mq-math-mode .mq-supsub.mq-sup-only.mq-after-fraction-group': {
|
|
61
|
+
verticalAlign: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export declare const commonMqKeyboardStyles: {
|
|
65
|
+
'& *': {
|
|
66
|
+
'& .mq-math-mode .mq-sqrt-prefix': {
|
|
67
|
+
top: string;
|
|
68
|
+
};
|
|
69
|
+
'& .mq-math-mode .mq-empty': {
|
|
70
|
+
padding: string;
|
|
71
|
+
};
|
|
72
|
+
'& .mq-math-mode .mq-supsub': {
|
|
73
|
+
fontSize: string;
|
|
74
|
+
};
|
|
75
|
+
'& .mq-math-mode .mq-sqrt-stem': {
|
|
76
|
+
marginTop: string;
|
|
77
|
+
paddingTop: string;
|
|
78
|
+
};
|
|
79
|
+
'& .mq-math-mode .mq-paren': {
|
|
80
|
+
verticalAlign: string;
|
|
81
|
+
};
|
|
82
|
+
'& .mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-empty': {
|
|
83
|
+
padding: string;
|
|
84
|
+
};
|
|
85
|
+
'& .mq-math-mode .mq-overline .mq-overline-inner .mq-empty ': {
|
|
86
|
+
padding: string;
|
|
87
|
+
};
|
|
88
|
+
'& .mq-longdiv-inner': {
|
|
89
|
+
marginTop: string;
|
|
90
|
+
marginLeft: string;
|
|
91
|
+
'& > .mq-empty': {
|
|
92
|
+
padding: string;
|
|
93
|
+
marginLeft: string;
|
|
94
|
+
marginTop: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
'& .mq-math-mode .mq-longdiv': {
|
|
98
|
+
display: string;
|
|
99
|
+
};
|
|
100
|
+
fontFamily: string;
|
|
101
|
+
'-webkit-font-smoothing': string;
|
|
102
|
+
'& .mq-math-mode > span > var': {
|
|
103
|
+
fontFamily: string;
|
|
104
|
+
};
|
|
105
|
+
'& .mq-math-mode span var': {
|
|
106
|
+
fontFamily: string;
|
|
107
|
+
};
|
|
108
|
+
'& .mq-math-mode .mq-nonSymbola': {
|
|
109
|
+
fontFamily: string;
|
|
110
|
+
};
|
|
111
|
+
'& .mq-math-mode > span > var.mq-operator-name': {
|
|
112
|
+
fontFamily: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
declare const _default: {
|
|
117
|
+
commonMqFontStyles: {
|
|
118
|
+
fontFamily: string;
|
|
119
|
+
'-webkit-font-smoothing': string;
|
|
120
|
+
'& .mq-math-mode > span > var': {
|
|
121
|
+
fontFamily: string;
|
|
122
|
+
};
|
|
123
|
+
'& .mq-math-mode span var': {
|
|
124
|
+
fontFamily: string;
|
|
125
|
+
};
|
|
126
|
+
'& .mq-math-mode .mq-nonSymbola': {
|
|
127
|
+
fontFamily: string;
|
|
128
|
+
};
|
|
129
|
+
'& .mq-math-mode > span > var.mq-operator-name': {
|
|
130
|
+
fontFamily: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
longdivStyles: {
|
|
134
|
+
'& .mq-longdiv-inner': {
|
|
135
|
+
marginTop: string;
|
|
136
|
+
marginLeft: string;
|
|
137
|
+
'& > .mq-empty': {
|
|
138
|
+
padding: string;
|
|
139
|
+
marginLeft: string;
|
|
140
|
+
marginTop: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
'& .mq-math-mode .mq-longdiv': {
|
|
144
|
+
display: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
supsubStyles: {
|
|
148
|
+
'& .mq-math-mode sup.mq-nthroot': {
|
|
149
|
+
fontSize: string;
|
|
150
|
+
verticalAlign: string;
|
|
151
|
+
paddingRight: string;
|
|
152
|
+
};
|
|
153
|
+
'& .mq-math-mode .mq-supsub': {
|
|
154
|
+
fontSize: string;
|
|
155
|
+
};
|
|
156
|
+
'& .mq-supsub ': {
|
|
157
|
+
fontSize: string;
|
|
158
|
+
};
|
|
159
|
+
'& .mq-math-mode .mq-supsub.mq-sup-only': {
|
|
160
|
+
verticalAlign: string;
|
|
161
|
+
'& .mq-sup': {
|
|
162
|
+
marginBottom: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
'& .mq-math-mode .mq-fraction + .mq-supsub.mq-sup-only': {
|
|
166
|
+
verticalAlign: string;
|
|
167
|
+
};
|
|
168
|
+
'& .mq-math-mode .mq-supsub.mq-sup-only.mq-after-fraction-group': {
|
|
169
|
+
verticalAlign: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
commonMqKeyboardStyles: {
|
|
173
|
+
'& *': {
|
|
174
|
+
'& .mq-math-mode .mq-sqrt-prefix': {
|
|
175
|
+
top: string;
|
|
176
|
+
};
|
|
177
|
+
'& .mq-math-mode .mq-empty': {
|
|
178
|
+
padding: string;
|
|
179
|
+
};
|
|
180
|
+
'& .mq-math-mode .mq-supsub': {
|
|
181
|
+
fontSize: string;
|
|
182
|
+
};
|
|
183
|
+
'& .mq-math-mode .mq-sqrt-stem': {
|
|
184
|
+
marginTop: string;
|
|
185
|
+
paddingTop: string;
|
|
186
|
+
};
|
|
187
|
+
'& .mq-math-mode .mq-paren': {
|
|
188
|
+
verticalAlign: string;
|
|
189
|
+
};
|
|
190
|
+
'& .mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-empty': {
|
|
191
|
+
padding: string;
|
|
192
|
+
};
|
|
193
|
+
'& .mq-math-mode .mq-overline .mq-overline-inner .mq-empty ': {
|
|
194
|
+
padding: string;
|
|
195
|
+
};
|
|
196
|
+
'& .mq-longdiv-inner': {
|
|
197
|
+
marginTop: string;
|
|
198
|
+
marginLeft: string;
|
|
199
|
+
'& > .mq-empty': {
|
|
200
|
+
padding: string;
|
|
201
|
+
marginLeft: string;
|
|
202
|
+
marginTop: string;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
'& .mq-math-mode .mq-longdiv': {
|
|
206
|
+
display: string;
|
|
207
|
+
};
|
|
208
|
+
fontFamily: string;
|
|
209
|
+
'-webkit-font-smoothing': string;
|
|
210
|
+
'& .mq-math-mode > span > var': {
|
|
211
|
+
fontFamily: string;
|
|
212
|
+
};
|
|
213
|
+
'& .mq-math-mode span var': {
|
|
214
|
+
fontFamily: string;
|
|
215
|
+
};
|
|
216
|
+
'& .mq-math-mode .mq-nonSymbola': {
|
|
217
|
+
fontFamily: string;
|
|
218
|
+
};
|
|
219
|
+
'& .mq-math-mode > span > var.mq-operator-name': {
|
|
220
|
+
fontFamily: string;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//#region src/mq/common-mq-styles.ts
|
|
2
|
+
var e = {
|
|
3
|
+
fontFamily: "MJXZERO, MJXTEX !important",
|
|
4
|
+
"-webkit-font-smoothing": "antialiased !important",
|
|
5
|
+
"& .mq-math-mode > span > var": { fontFamily: "MJXZERO, MJXTEX-I !important" },
|
|
6
|
+
"& .mq-math-mode span var": { fontFamily: "MJXZERO, MJXTEX-I !important" },
|
|
7
|
+
"& .mq-math-mode .mq-nonSymbola": { fontFamily: "MJXZERO, MJXTEX-I !important" },
|
|
8
|
+
"& .mq-math-mode > span > var.mq-operator-name": { fontFamily: "MJXZERO, MJXTEX !important" }
|
|
9
|
+
}, t = {
|
|
10
|
+
"& .mq-longdiv-inner": {
|
|
11
|
+
marginTop: "-1px",
|
|
12
|
+
marginLeft: "5px !important;",
|
|
13
|
+
"& > .mq-empty": {
|
|
14
|
+
padding: "0 !important",
|
|
15
|
+
marginLeft: "0px !important",
|
|
16
|
+
marginTop: "2px"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"& .mq-math-mode .mq-longdiv": { display: "inline-flex !important" }
|
|
20
|
+
}, n = {
|
|
21
|
+
"& .mq-math-mode sup.mq-nthroot": {
|
|
22
|
+
fontSize: "70% !important",
|
|
23
|
+
verticalAlign: "0.5em !important",
|
|
24
|
+
paddingRight: "0.15em"
|
|
25
|
+
},
|
|
26
|
+
"& .mq-math-mode .mq-supsub": { fontSize: "70.7% !important" },
|
|
27
|
+
"& .mq-supsub ": { fontSize: "70.7%" },
|
|
28
|
+
"& .mq-math-mode .mq-supsub.mq-sup-only": {
|
|
29
|
+
verticalAlign: "-0.1em !important",
|
|
30
|
+
"& .mq-sup": { marginBottom: "0px !important" }
|
|
31
|
+
},
|
|
32
|
+
"& .mq-math-mode .mq-fraction + .mq-supsub.mq-sup-only": { verticalAlign: "0.4em !important" },
|
|
33
|
+
"& .mq-math-mode .mq-supsub.mq-sup-only.mq-after-fraction-group": { verticalAlign: "0.4em !important" }
|
|
34
|
+
}, r = { "& *": {
|
|
35
|
+
...e,
|
|
36
|
+
...t,
|
|
37
|
+
"& .mq-math-mode .mq-sqrt-prefix": { top: "0 !important" },
|
|
38
|
+
"& .mq-math-mode .mq-empty": { padding: "9px 1px !important" },
|
|
39
|
+
"& .mq-math-mode .mq-supsub": { fontSize: "70.7% !important" },
|
|
40
|
+
"& .mq-math-mode .mq-sqrt-stem": {
|
|
41
|
+
marginTop: "-5px",
|
|
42
|
+
paddingTop: "4px"
|
|
43
|
+
},
|
|
44
|
+
"& .mq-math-mode .mq-paren": { verticalAlign: "middle !important" },
|
|
45
|
+
"& .mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-empty": { padding: "0 !important" },
|
|
46
|
+
"& .mq-math-mode .mq-overline .mq-overline-inner .mq-empty ": { padding: "0 !important" }
|
|
47
|
+
} }, i = {
|
|
48
|
+
commonMqFontStyles: e,
|
|
49
|
+
longdivStyles: t,
|
|
50
|
+
supsubStyles: n,
|
|
51
|
+
commonMqKeyboardStyles: r
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { r as commonMqKeyboardStyles, i as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/math-input/src/mq/custom-elements.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
declare const registerLineBreak: (MQ: any) => void;
|
|
10
|
+
export { registerLineBreak };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/mq/custom-elements.tsx
|
|
2
|
+
var e = function(e) {
|
|
3
|
+
e.registerEmbed("newLine", () => ({
|
|
4
|
+
htmlString: "<div class=\"newLine\"></div>",
|
|
5
|
+
text: () => "testText",
|
|
6
|
+
latex: () => "\\embed{newLine}[]"
|
|
7
|
+
}));
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as registerLineBreak };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/math-input/src/mq/index.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import Input from './input';
|
|
10
|
+
import Static from './static';
|
|
11
|
+
import CommonMqStyles from './common-mq-styles';
|
|
12
|
+
export { Input, Static, CommonMqStyles };
|
package/dist/mq/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import t from "./common-mq-styles.js";
|
|
3
|
+
import n from "./input.js";
|
|
4
|
+
import r from "./static.js";
|
|
5
|
+
//#region src/mq/index.ts
|
|
6
|
+
var i = /* @__PURE__ */ e({
|
|
7
|
+
CommonMqStyles: () => t,
|
|
8
|
+
Input: () => n,
|
|
9
|
+
Static: () => r
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { i as mq_exports };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/math-input/src/mq/input.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
/**
|
|
8
|
+
* Wrapper for MathQuill MQ.MathField.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Input extends React.Component {
|
|
11
|
+
static propTypes: {
|
|
12
|
+
className: PropTypes.Requireable<string>;
|
|
13
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
+
latex: PropTypes.Requireable<string>;
|
|
16
|
+
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
|
+
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
};
|
|
19
|
+
componentDidMount(): void;
|
|
20
|
+
componentDidUpdate(): void;
|
|
21
|
+
updateLatex(): void;
|
|
22
|
+
clear(): string;
|
|
23
|
+
blur(): void;
|
|
24
|
+
focus(): void;
|
|
25
|
+
command(v: any): any;
|
|
26
|
+
keystroke(v: any): any;
|
|
27
|
+
write(v: any): any;
|
|
28
|
+
onInputEdit: any;
|
|
29
|
+
refresh: any;
|
|
30
|
+
onKeyPress: any;
|
|
31
|
+
onClick: any;
|
|
32
|
+
shouldComponentUpdate(nextProps: any): boolean;
|
|
33
|
+
render(): React.JSX.Element;
|
|
34
|
+
}
|
|
35
|
+
export default Input;
|