@khanacademy/math-input 0.5.2 → 0.5.5
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 +18 -0
- package/dist/es/index.js +8 -11
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/less/main.less +4 -4
- package/package.json +1 -1
- package/src/components/input/cursor-contexts.js +1 -0
- package/src/index.js +5 -0
- package/src/utils.js +11 -14
package/less/main.less
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@import "echo.less";
|
|
2
|
-
@import "overrides.less";
|
|
3
|
-
@import "popover.less";
|
|
1
|
+
@import "./echo.less";
|
|
2
|
+
@import "./overrides.less";
|
|
3
|
+
@import "./popover.less";
|
|
4
4
|
@import "../../../node_modules/mathquill/build/mathquill.css";
|
|
5
|
-
@import "tabbar.less";
|
|
5
|
+
@import "./tabbar.less";
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -12,3 +12,8 @@ export {
|
|
|
12
12
|
} from "./components/prop-types.js";
|
|
13
13
|
export {default as Keypad} from "./components/provided-keypad.js";
|
|
14
14
|
export {KeypadTypes} from "./consts.js";
|
|
15
|
+
export {default as KeyConfigs} from "./data/key-configs.js";
|
|
16
|
+
|
|
17
|
+
import * as CursorContexts from "./components/input/cursor-contexts.js";
|
|
18
|
+
|
|
19
|
+
export {CursorContexts};
|
package/src/utils.js
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
// @flow
|
|
2
|
+
import {getDecimalSeparator} from "@khanacademy/wonder-blocks-i18n";
|
|
2
3
|
|
|
3
4
|
import {DecimalSeparators} from "./consts.js";
|
|
4
5
|
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
decimalSeparator = DecimalSeparators.COMMA;
|
|
16
|
-
} else {
|
|
17
|
-
decimalSeparator = DecimalSeparators.PERIOD;
|
|
18
|
-
}
|
|
6
|
+
// NOTES(kevinb):
|
|
7
|
+
// - In order to get the correct decimal separator for the current locale,
|
|
8
|
+
// the locale must bet set using `setLocale(kaLocale)` which can be
|
|
9
|
+
// imported from wonder-blocks-i18n.
|
|
10
|
+
// - Some languages/locales use different decimal separators than the ones
|
|
11
|
+
// listed here. Much of the Arab world uses U+066C.
|
|
12
|
+
export const decimalSeparator: string =
|
|
13
|
+
getDecimalSeparator() === ","
|
|
14
|
+
? DecimalSeparators.COMMA
|
|
15
|
+
: DecimalSeparators.PERIOD;
|