@khanacademy/math-input 16.0.0 → 16.1.1
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/CHANGELOG.md +29 -0
- package/README.md +1 -9
- package/dist/components/aphrodite-css-transition-group/util.d.ts +2 -1
- package/dist/components/input/cursor-styles.d.ts +5 -0
- package/dist/components/input/math-wrapper.d.ts +1 -1
- package/dist/components/input/scroll-into-view.d.ts +1 -0
- package/dist/data/key-configs.d.ts +1 -1
- package/dist/enums.d.ts +0 -29
- package/dist/es/index.css +0 -66
- package/dist/es/index.js +21 -49
- package/dist/es/index.js.map +1 -1
- package/dist/fake-react-native-web/view.d.ts +2 -1
- package/dist/index.css +0 -66
- package/dist/index.js +20 -45
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -40
- package/less/main.less +0 -3
- package/package.json +4 -8
- package/src/components/input/cursor-handle.tsx +1 -1
- package/src/components/input/cursor-styles.ts +10 -0
- package/src/components/input/math-input.tsx +6 -7
- package/src/components/input/math-wrapper.ts +2 -2
- package/src/components/input/scroll-into-view.ts +4 -1
- package/src/data/key-configs.ts +1 -10
- package/src/enums.ts +0 -43
- package/src/types.ts +1 -54
- package/tsconfig-build.tsbuildinfo +1 -1
- package/dist/components/common-style.d.ts +0 -21
- package/index.html +0 -21
- package/less/echo.less +0 -56
- package/less/popover.less +0 -22
- package/less/tabbar.less +0 -6
- package/src/components/common-style.ts +0 -46
- package/tools/svg-to-react/convert.py +0 -111
- package/tools/svg-to-react/icons/math-keypad-icon-0.svg +0 -32
- package/tools/svg-to-react/icons/math-keypad-icon-1.svg +0 -32
- package/tools/svg-to-react/icons/math-keypad-icon-2.svg +0 -32
- package/tools/svg-to-react/icons/math-keypad-icon-3.svg +0 -32
- package/tools/svg-to-react/icons/math-keypad-icon-4.svg +0 -32
- package/tools/svg-to-react/icons/math-keypad-icon-5.svg +0 -32
- package/tools/svg-to-react/icons/math-keypad-icon-6.svg +0 -32
- package/tools/svg-to-react/icons/math-keypad-icon-7.svg +0 -32
- package/tools/svg-to-react/icons/math-keypad-icon-8.svg +0 -32
- package/tools/svg-to-react/icons/math-keypad-icon-9.svg +0 -32
- package/tools/svg-to-react/icons/math-keypad-icon-addition.svg +0 -34
- package/tools/svg-to-react/icons/math-keypad-icon-cos.svg +0 -38
- package/tools/svg-to-react/icons/math-keypad-icon-delete.svg +0 -36
- package/tools/svg-to-react/icons/math-keypad-icon-dismiss.svg +0 -36
- package/tools/svg-to-react/icons/math-keypad-icon-division.svg +0 -36
- package/tools/svg-to-react/icons/math-keypad-icon-equals-not.svg +0 -50
- package/tools/svg-to-react/icons/math-keypad-icon-equals.svg +0 -48
- package/tools/svg-to-react/icons/math-keypad-icon-exponent-2.svg +0 -38
- package/tools/svg-to-react/icons/math-keypad-icon-exponent-3.svg +0 -38
- package/tools/svg-to-react/icons/math-keypad-icon-exponent.svg +0 -38
- package/tools/svg-to-react/icons/math-keypad-icon-fraction.svg +0 -42
- package/tools/svg-to-react/icons/math-keypad-icon-greater-than.svg +0 -46
- package/tools/svg-to-react/icons/math-keypad-icon-jump-out-base.svg +0 -44
- package/tools/svg-to-react/icons/math-keypad-icon-jump-out-denominator.svg +0 -48
- package/tools/svg-to-react/icons/math-keypad-icon-jump-out-exponent.svg +0 -44
- package/tools/svg-to-react/icons/math-keypad-icon-jump-out-parentheses.svg +0 -44
- package/tools/svg-to-react/icons/math-keypad-icon-less-than.svg +0 -46
- package/tools/svg-to-react/icons/math-keypad-icon-log-10.svg +0 -36
- package/tools/svg-to-react/icons/math-keypad-icon-log-e.svg +0 -36
- package/tools/svg-to-react/icons/math-keypad-icon-log.svg +0 -38
- package/tools/svg-to-react/icons/math-keypad-icon-multiplication-cross.svg +0 -40
- package/tools/svg-to-react/icons/math-keypad-icon-multiplication-dot.svg +0 -38
- package/tools/svg-to-react/icons/math-keypad-icon-percent.svg +0 -42
- package/tools/svg-to-react/icons/math-keypad-icon-radical-2.svg +0 -36
- package/tools/svg-to-react/icons/math-keypad-icon-radical-3.svg +0 -38
- package/tools/svg-to-react/icons/math-keypad-icon-radical.svg +0 -38
- package/tools/svg-to-react/icons/math-keypad-icon-radix-character.svg +0 -32
- package/tools/svg-to-react/icons/math-keypad-icon-sin.svg +0 -38
- package/tools/svg-to-react/icons/math-keypad-icon-subtraction.svg +0 -32
- package/tools/svg-to-react/icons/math-keypad-icon-tan.svg +0 -38
- package/tools/svg-to-react/symbol_map.py +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @khanacademy/math-input
|
|
2
2
|
|
|
3
|
+
## 16.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#841](https://github.com/Khan/perseus/pull/841) [`41d3cd93`](https://github.com/Khan/perseus/commit/41d3cd93f78d4649c8a57b6fa4964c0c9f2c45b0) Thanks [@handeyeco](https://github.com/handeyeco)! - Remove unused SVG tooling
|
|
8
|
+
|
|
9
|
+
* [#843](https://github.com/Khan/perseus/pull/843) [`27f691aa`](https://github.com/Khan/perseus/commit/27f691aa11f061b54db487b5b35222431776260f) Thanks [@handeyeco](https://github.com/handeyeco)! - Remove seemingly unused index.html
|
|
10
|
+
|
|
11
|
+
- [#844](https://github.com/Khan/perseus/pull/844) [`3803452b`](https://github.com/Khan/perseus/commit/3803452b0593649faf4043bf6e1d7681a14078e4) Thanks [@handeyeco](https://github.com/handeyeco)! - Remove seemingly unused Less
|
|
12
|
+
|
|
13
|
+
* [#846](https://github.com/Khan/perseus/pull/846) [`ef32b88f`](https://github.com/Khan/perseus/commit/ef32b88f5027154784fb496506d7c96ee3765eac) Thanks [@handeyeco](https://github.com/handeyeco)! - Break up common-styles.ts
|
|
14
|
+
|
|
15
|
+
- [#840](https://github.com/Khan/perseus/pull/840) [`820febc5`](https://github.com/Khan/perseus/commit/820febc5814a5a10d7c1743be8aa9d220f2d9bd8) Thanks [@handeyeco](https://github.com/handeyeco)! - Remove Redux as a dependency
|
|
16
|
+
|
|
17
|
+
* [#845](https://github.com/Khan/perseus/pull/845) [`67a09051`](https://github.com/Khan/perseus/commit/67a09051c61df98b697349ad75760193e4228bfe) Thanks [@handeyeco](https://github.com/handeyeco)! - Remove some seemingly unused types
|
|
18
|
+
|
|
19
|
+
## 16.1.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- [#794](https://github.com/Khan/perseus/pull/794) [`a91c84fe`](https://github.com/Khan/perseus/commit/a91c84fe53827ff4333220777a9918882b7fe9f0) Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! - Removing the useV2Keypad apiOption as the V1 keypad is no longer in use.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- [#814](https://github.com/Khan/perseus/pull/814) [`105d2060`](https://github.com/Khan/perseus/commit/105d20603d935d35cff237b17f0bfb57ca751e4c) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Minor build change to how we provide Typescript type definitions (should be no change to build output).
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [[`a91c84fe`](https://github.com/Khan/perseus/commit/a91c84fe53827ff4333220777a9918882b7fe9f0), [`105d2060`](https://github.com/Khan/perseus/commit/105d20603d935d35cff237b17f0bfb57ca751e4c)]:
|
|
30
|
+
- @khanacademy/perseus-core@1.4.0
|
|
31
|
+
|
|
3
32
|
## 16.0.0
|
|
4
33
|
|
|
5
34
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Khan Academy's expression editor for the mobile web. Used in the [Perseus](https://github.com/khan/perseus) exercise framework to power math input and expression editing on small screens.
|
|
4
4
|
|
|
5
|
-
Built with [React](https://github.com/facebook/react), [
|
|
5
|
+
Built with [React](https://github.com/facebook/react), [MathQuill](https://github.com/mathquill/mathquill), [Aphrodite](https://github.com/khan/aphrodite), and more.
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
@@ -26,14 +26,6 @@ When you start the project you'll need to be on a device that supports touch or
|
|
|
26
26
|
|
|
27
27
|

|
|
28
28
|
|
|
29
|
-
## Demo
|
|
30
|
-
|
|
31
|
-
A live demo is available via [GitHub Pages](http://khan.github.io/math-input/). You can configure some of the keypad's behaviors, along with the set of active keys, via the [editor](http://khan.github.io/math-input/custom.html).
|
|
32
|
-
|
|
33
|
-
Note that, as the input and keypad only respond to touch events, you'll need to enable mobile emulation (e.g., as supported by Chrome) in order to use the keypad in a desktop browser.
|
|
34
|
-
|
|
35
|
-
To run the demo locally, clone the repo, `yarn install`, `yarn watch`, and open the `index.html` page. The local behaviors can similarly be customized via the editor @ `custom.html`.
|
|
36
|
-
|
|
37
29
|
## License
|
|
38
30
|
|
|
39
31
|
[MIT License](http://opensource.org/licenses/MIT)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference path="../../../types/aphrodite.d.ts" />
|
|
1
2
|
import type { InAnimationStyles } from "./types";
|
|
2
3
|
import type { StyleType } from "@khanacademy/wonder-blocks-core";
|
|
3
4
|
export declare function processStyleType(style?: StyleType): {
|
|
4
5
|
className: string;
|
|
5
6
|
style: Record<any, any>;
|
|
6
7
|
};
|
|
7
|
-
export declare const createTransition: (styles: InAnimationStyles) =>
|
|
8
|
+
export declare const createTransition: (styles: InAnimationStyles) => import("aphrodite").StyleDeclaration;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { MathFieldInterface } from "./mathquill-types";
|
|
1
2
|
import type Key from "../../data/keys";
|
|
2
3
|
import type { Cursor } from "../../types";
|
|
3
|
-
import type { MathFieldInterface } from "./mathquill-types";
|
|
4
4
|
/**
|
|
5
5
|
* This file contains a wrapper around MathQuill so that we can provide a
|
|
6
6
|
* more regular interface for the functionality we need while insulating us
|
|
@@ -8,4 +8,5 @@
|
|
|
8
8
|
* TODO(charlie): Move this scroll logic out of our components and into a higher
|
|
9
9
|
* level in the component tree--perhaps even into webapp, beyond Perseus.
|
|
10
10
|
*/
|
|
11
|
+
export declare const toolbarHeightPx = 60;
|
|
11
12
|
export declare const scrollIntoView: (containerNode: any, keypadNode: any) => void;
|
package/dist/enums.d.ts
CHANGED
|
@@ -7,32 +7,3 @@ export declare enum KeypadType {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const KeyTypes: string[];
|
|
9
9
|
export type KeyType = typeof KeyTypes[number];
|
|
10
|
-
export declare enum DeviceOrientation {
|
|
11
|
-
LANDSCAPE = "LANDSCAPE",
|
|
12
|
-
PORTRAIT = "PORTRAIT"
|
|
13
|
-
}
|
|
14
|
-
export declare enum DeviceType {
|
|
15
|
-
PHONE = "PHONE",
|
|
16
|
-
TABLET = "TABLET"
|
|
17
|
-
}
|
|
18
|
-
export declare enum LayoutMode {
|
|
19
|
-
FULLSCREEN = "FULLSCREEN",
|
|
20
|
-
COMPACT = "COMPACT"
|
|
21
|
-
}
|
|
22
|
-
export declare enum BorderDirection {
|
|
23
|
-
LEFT = "LEFT",
|
|
24
|
-
BOTTOM = "BOTTOM"
|
|
25
|
-
}
|
|
26
|
-
export declare const BorderStyles: {
|
|
27
|
-
[style: string]: ReadonlyArray<BorderDirection>;
|
|
28
|
-
};
|
|
29
|
-
export declare enum IconType {
|
|
30
|
-
MATH = "MATH",
|
|
31
|
-
SVG = "SVG",
|
|
32
|
-
TEXT = "TEXT"
|
|
33
|
-
}
|
|
34
|
-
export declare enum EchoAnimationType {
|
|
35
|
-
SLIDE_AND_FADE = "SLIDE_AND_FADE",
|
|
36
|
-
FADE_ONLY = "FADE_ONLY",
|
|
37
|
-
LONG_FADE_ONLY = "LONG_FADE_ONLY"
|
|
38
|
-
}
|
package/dist/es/index.css
CHANGED
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Styles for managing the popover animations.
|
|
3
|
-
*
|
|
4
|
-
* Ideally, we'd be generating these styles with Aphrodite (along with
|
|
5
|
-
* CSSTransitionGroup's support for custom classnames), but the generated
|
|
6
|
-
* styles have issues on mobile Safari.
|
|
7
|
-
* See: https://github.com/Khan/aphrodite/issues/68.
|
|
8
|
-
*
|
|
9
|
-
* If the animation durations change, the corresponding values in
|
|
10
|
-
* echo-manager.js must change as well.
|
|
11
|
-
*/
|
|
12
|
-
.echo-slide-and-fade-enter {
|
|
13
|
-
opacity: 1 !important;
|
|
14
|
-
transform: translate3d(0, 0, 0) !important;
|
|
15
|
-
}
|
|
16
|
-
.echo-slide-and-fade-enter.echo-slide-and-fade-enter-active {
|
|
17
|
-
opacity: 0 !important;
|
|
18
|
-
transform: translate3d(0, -33%, 0) !important;
|
|
19
|
-
/**
|
|
20
|
-
* TODO(charlie): These times are intentionally different, which means
|
|
21
|
-
* that the animation really "ends" after 400ms
|
|
22
|
-
* cubic-bezier(1, 0, 0.9, 1) (since the opacity goes to 0), even though
|
|
23
|
-
* the transform doesn't complete. There's probably a way to achieve the
|
|
24
|
-
* same effect by manipulating the transform's Bezier curve and total
|
|
25
|
-
* displacement.
|
|
26
|
-
*/
|
|
27
|
-
transition: transform 800ms cubic-bezier(0, 1, 0.25, 1), opacity 400ms cubic-bezier(1, 0, 0.9, 1) !important;
|
|
28
|
-
}
|
|
29
|
-
.echo-fade-only-enter {
|
|
30
|
-
opacity: 1 !important;
|
|
31
|
-
}
|
|
32
|
-
.echo-fade-only-enter.echo-fade-only-enter-active {
|
|
33
|
-
opacity: 0 !important;
|
|
34
|
-
transition: opacity 300ms cubic-bezier(0.25, 0, 0.75, 1) !important;
|
|
35
|
-
}
|
|
36
|
-
.echo-long-fade-only-enter {
|
|
37
|
-
opacity: 1 !important;
|
|
38
|
-
}
|
|
39
|
-
.echo-long-fade-only-enter.echo-long-fade-only-enter-active {
|
|
40
|
-
opacity: 0 !important;
|
|
41
|
-
transition: opacity 400ms cubic-bezier(0.75, 0, 0.75, 1) !important;
|
|
42
|
-
}
|
|
43
1
|
.keypad-input {
|
|
44
2
|
outline: none !important;
|
|
45
3
|
}
|
|
@@ -120,24 +78,6 @@
|
|
|
120
78
|
color: white !important;
|
|
121
79
|
display: inline-block !important;
|
|
122
80
|
}
|
|
123
|
-
/**
|
|
124
|
-
* Styles for managing the popover animations.
|
|
125
|
-
*
|
|
126
|
-
* Ideally, we'd be generating these styles with Aphrodite (along with
|
|
127
|
-
* CSSTransitionGroup's support for custom classnames), but the generated
|
|
128
|
-
* styles have issues on mobile Safari.
|
|
129
|
-
* See: https://github.com/Khan/aphrodite/issues/68.
|
|
130
|
-
*
|
|
131
|
-
* If the animation durations change, the corresponding values in
|
|
132
|
-
* popover-manager.js must change as well.
|
|
133
|
-
*/
|
|
134
|
-
.popover-enter {
|
|
135
|
-
opacity: 0 !important;
|
|
136
|
-
}
|
|
137
|
-
.popover-enter.popover-enter-active {
|
|
138
|
-
opacity: 1 !important;
|
|
139
|
-
transition: opacity 200ms ease-out !important;
|
|
140
|
-
}
|
|
141
81
|
/*
|
|
142
82
|
* MathQuill v0.10.1 http://mathquill.com
|
|
143
83
|
* by Han, Jeanine, and Mary maintainers@mathquill.com
|
|
@@ -574,9 +514,3 @@
|
|
|
574
514
|
margin-top: -0.1em;
|
|
575
515
|
}
|
|
576
516
|
|
|
577
|
-
.tabbar_item {
|
|
578
|
-
background-color: red;
|
|
579
|
-
}
|
|
580
|
-
.tabbar_item:focus {
|
|
581
|
-
background-color: green;
|
|
582
|
-
}
|
package/dist/es/index.js
CHANGED
|
@@ -17,24 +17,21 @@ import PropTypes from 'prop-types';
|
|
|
17
17
|
|
|
18
18
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
19
19
|
const libName = "@khanacademy/math-input";
|
|
20
|
-
const libVersion = "16.
|
|
20
|
+
const libVersion = "16.1.1";
|
|
21
21
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
22
22
|
|
|
23
23
|
function _extends() {
|
|
24
|
-
_extends = Object.assign
|
|
24
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
25
25
|
for (var i = 1; i < arguments.length; i++) {
|
|
26
26
|
var source = arguments[i];
|
|
27
|
-
|
|
28
27
|
for (var key in source) {
|
|
29
28
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
30
29
|
target[key] = source[key];
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
|
|
35
33
|
return target;
|
|
36
34
|
};
|
|
37
|
-
|
|
38
35
|
return _extends.apply(this, arguments);
|
|
39
36
|
}
|
|
40
37
|
|
|
@@ -106,11 +103,6 @@ View.styles = StyleSheet.create({
|
|
|
106
103
|
/**
|
|
107
104
|
* Common parameters used to style components.
|
|
108
105
|
*/
|
|
109
|
-
const wonderBlocksBlue = Color.blue;
|
|
110
|
-
const offBlack = Color.offBlack;
|
|
111
|
-
Color.offBlack32;
|
|
112
|
-
Color.offBlack16;
|
|
113
|
-
Color.offBlack8;
|
|
114
106
|
const cursorHandleRadiusPx = 11;
|
|
115
107
|
|
|
116
108
|
// The amount to multiply the radius by to get the distance from the
|
|
@@ -118,10 +110,6 @@ const cursorHandleRadiusPx = 11;
|
|
|
118
110
|
// one quadrant replace with a square. The hypotenuse of the square is
|
|
119
111
|
// 1.045 times the radius of the circle.
|
|
120
112
|
const cursorHandleDistanceMultiplier = 1.045;
|
|
121
|
-
// HACK(charlie): This should be injected by webapp somehow.
|
|
122
|
-
// TODO(charlie): Add a link to the webapp location as soon as the footer
|
|
123
|
-
// has settled down.
|
|
124
|
-
const toolbarHeightPx = 60;
|
|
125
113
|
|
|
126
114
|
const touchTargetRadiusPx = 2 * cursorHandleRadiusPx;
|
|
127
115
|
const touchTargetHeightPx = 2 * touchTargetRadiusPx;
|
|
@@ -1321,6 +1309,11 @@ class MathWrapper {
|
|
|
1321
1309
|
* TODO(charlie): Move this scroll logic out of our components and into a higher
|
|
1322
1310
|
* level in the component tree--perhaps even into webapp, beyond Perseus.
|
|
1323
1311
|
*/
|
|
1312
|
+
|
|
1313
|
+
// HACK(charlie): This should be injected by webapp somehow.
|
|
1314
|
+
// TODO(charlie): Add a link to the webapp location as soon as the footer
|
|
1315
|
+
// has settled down.
|
|
1316
|
+
const toolbarHeightPx = 60;
|
|
1324
1317
|
const scrollIntoView = (containerNode, keypadNode) => {
|
|
1325
1318
|
// TODO(charlie): There's no need for us to be reading the keypad bounds
|
|
1326
1319
|
// here, since they're pre-determined by logic in the store. We should
|
|
@@ -2003,6 +1996,8 @@ class MathInput extends React.Component {
|
|
|
2003
1996
|
window.addEventListener("resize", this._clearKeypadBoundsCache);
|
|
2004
1997
|
window.addEventListener("orientationchange", this._clearKeypadBoundsCache);
|
|
2005
1998
|
}
|
|
1999
|
+
|
|
2000
|
+
// eslint-disable-next-line react/no-unsafe
|
|
2006
2001
|
UNSAFE_componentWillReceiveProps(props) {
|
|
2007
2002
|
if (this.props.keypadElement !== props.keypadElement) {
|
|
2008
2003
|
this._clearKeypadBoundsCache();
|
|
@@ -2038,7 +2033,7 @@ class MathInput extends React.Component {
|
|
|
2038
2033
|
const innerStyle = _extends({}, inlineStyles.innerContainer, {
|
|
2039
2034
|
borderWidth: this.getBorderWidthPx()
|
|
2040
2035
|
}, focused ? {
|
|
2041
|
-
borderColor:
|
|
2036
|
+
borderColor: Color.blue
|
|
2042
2037
|
} : {}, style);
|
|
2043
2038
|
|
|
2044
2039
|
// NOTE(diedra): This label explicitly refers to tapping because this field
|
|
@@ -2124,7 +2119,7 @@ const inlineStyles = {
|
|
|
2124
2119
|
borderStyle: "solid",
|
|
2125
2120
|
borderColor: Color.offBlack50,
|
|
2126
2121
|
borderRadius: 4,
|
|
2127
|
-
color: offBlack
|
|
2122
|
+
color: Color.offBlack
|
|
2128
2123
|
}
|
|
2129
2124
|
};
|
|
2130
2125
|
|
|
@@ -2361,37 +2356,9 @@ function Tabbar(props) {
|
|
|
2361
2356
|
})));
|
|
2362
2357
|
}
|
|
2363
2358
|
|
|
2364
|
-
/**
|
|
2365
|
-
* Constants that are shared between multiple files.
|
|
2366
|
-
*/
|
|
2367
|
-
|
|
2368
|
-
let KeypadType = /*#__PURE__*/function (KeypadType) {
|
|
2369
|
-
KeypadType["FRACTION"] = "FRACTION";
|
|
2370
|
-
KeypadType["EXPRESSION"] = "EXPRESSION";
|
|
2371
|
-
return KeypadType;
|
|
2372
|
-
}({});
|
|
2373
|
-
let BorderDirection = /*#__PURE__*/function (BorderDirection) {
|
|
2374
|
-
BorderDirection["LEFT"] = "LEFT";
|
|
2375
|
-
BorderDirection["BOTTOM"] = "BOTTOM";
|
|
2376
|
-
return BorderDirection;
|
|
2377
|
-
}({});
|
|
2378
|
-
({
|
|
2379
|
-
LEFT: [BorderDirection.LEFT],
|
|
2380
|
-
BOTTOM: [BorderDirection.BOTTOM],
|
|
2381
|
-
ALL: [BorderDirection.LEFT, BorderDirection.BOTTOM],
|
|
2382
|
-
NONE: []
|
|
2383
|
-
});
|
|
2384
|
-
let IconType = /*#__PURE__*/function (IconType) {
|
|
2385
|
-
IconType["MATH"] = "MATH";
|
|
2386
|
-
IconType["SVG"] = "SVG";
|
|
2387
|
-
IconType["TEXT"] = "TEXT";
|
|
2388
|
-
return IconType;
|
|
2389
|
-
}({});
|
|
2390
|
-
|
|
2391
2359
|
const getDefaultOperatorFields = ({
|
|
2392
2360
|
key,
|
|
2393
2361
|
keyType: _keyType = "OPERATOR",
|
|
2394
|
-
iconType: _iconType = IconType.SVG,
|
|
2395
2362
|
ariaLabel: _ariaLabel = key,
|
|
2396
2363
|
data: _data = key
|
|
2397
2364
|
}) => ({
|
|
@@ -2399,14 +2366,12 @@ const getDefaultOperatorFields = ({
|
|
|
2399
2366
|
type: _keyType,
|
|
2400
2367
|
ariaLabel: _ariaLabel,
|
|
2401
2368
|
icon: {
|
|
2402
|
-
type: _iconType,
|
|
2403
2369
|
data: _data
|
|
2404
2370
|
}
|
|
2405
2371
|
});
|
|
2406
2372
|
const getDefaultValueFields = ({
|
|
2407
2373
|
key,
|
|
2408
2374
|
keyType: _keyType2 = "VALUE",
|
|
2409
|
-
iconType: _iconType2 = IconType.MATH,
|
|
2410
2375
|
ariaLabel: _ariaLabel2 = key,
|
|
2411
2376
|
data: _data2 = key
|
|
2412
2377
|
}) => ({
|
|
@@ -2414,7 +2379,6 @@ const getDefaultValueFields = ({
|
|
|
2414
2379
|
type: _keyType2,
|
|
2415
2380
|
ariaLabel: _ariaLabel2,
|
|
2416
2381
|
icon: {
|
|
2417
|
-
type: _iconType2,
|
|
2418
2382
|
data: _data2
|
|
2419
2383
|
}
|
|
2420
2384
|
});
|
|
@@ -2422,14 +2386,12 @@ const getDefaultNumberFields = ({
|
|
|
2422
2386
|
key,
|
|
2423
2387
|
data: _data3 = key.replace("NUM_", ""),
|
|
2424
2388
|
keyType: _keyType3 = "VALUE",
|
|
2425
|
-
iconType: _iconType3 = IconType.TEXT,
|
|
2426
2389
|
ariaLabel: _ariaLabel3 = _data3
|
|
2427
2390
|
}) => ({
|
|
2428
2391
|
id: key,
|
|
2429
2392
|
type: _keyType3,
|
|
2430
2393
|
ariaLabel: _ariaLabel3,
|
|
2431
2394
|
icon: {
|
|
2432
|
-
type: _iconType3,
|
|
2433
2395
|
data: _data3
|
|
2434
2396
|
}
|
|
2435
2397
|
});
|
|
@@ -5614,5 +5576,15 @@ const KeyArray = ["PLUS", "MINUS", "NEGATIVE", "TIMES", "DIVIDE", "DECIMAL", "PE
|
|
|
5614
5576
|
// Perseus' Expression MathInput
|
|
5615
5577
|
"PHI", "NTHROOT3", "POW", "LOG_B"];
|
|
5616
5578
|
|
|
5579
|
+
/**
|
|
5580
|
+
* Constants that are shared between multiple files.
|
|
5581
|
+
*/
|
|
5582
|
+
|
|
5583
|
+
let KeypadType = /*#__PURE__*/function (KeypadType) {
|
|
5584
|
+
KeypadType["FRACTION"] = "FRACTION";
|
|
5585
|
+
KeypadType["EXPRESSION"] = "EXPRESSION";
|
|
5586
|
+
return KeypadType;
|
|
5587
|
+
}({});
|
|
5588
|
+
|
|
5617
5589
|
export { CursorContext, Keypad as DesktopKeypad, KeyArray, KeyConfigs, KeypadContext, MathInput as KeypadInput, KeypadType, MobileKeypad, StatefulKeypadContextProvider, createMathField, getCursorContext, keyToMathquillMap as keyTranslator, keypadElementPropType, libVersion, mathQuillInstance };
|
|
5618
5590
|
//# sourceMappingURL=index.js.map
|