@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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @khanacademy/math-input
|
|
2
2
|
|
|
3
|
+
## 0.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6f8f1ac9: Use wonder-blocks-i18n to determine the decimal separator
|
|
8
|
+
|
|
9
|
+
## 0.5.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- f29b4975: Export the KeyConfigs type
|
|
14
|
+
|
|
15
|
+
## 0.5.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 96288b87: Export CursorContexts
|
|
20
|
+
|
|
3
21
|
## 0.5.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/es/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Color from '@khanacademy/wonder-blocks-color';
|
|
2
2
|
import * as i18n from '@khanacademy/wonder-blocks-i18n';
|
|
3
|
+
import { getDecimalSeparator } from '@khanacademy/wonder-blocks-i18n';
|
|
3
4
|
import { StyleSheet, css } from 'aphrodite';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
5
6
|
import * as React from 'react';
|
|
@@ -359,17 +360,13 @@ var EchoAnimationTypes = {
|
|
|
359
360
|
LONG_FADE_ONLY: "LONG_FADE_ONLY"
|
|
360
361
|
};
|
|
361
362
|
|
|
362
|
-
//
|
|
363
|
-
//
|
|
364
|
-
//
|
|
363
|
+
// - In order to get the correct decimal separator for the current locale,
|
|
364
|
+
// the locale must bet set using `setLocale(kaLocale)` which can be
|
|
365
|
+
// imported from wonder-blocks-i18n.
|
|
366
|
+
// - Some languages/locales use different decimal separators than the ones
|
|
367
|
+
// listed here. Much of the Arab world uses U+066C.
|
|
365
368
|
|
|
366
|
-
var decimalSeparator;
|
|
367
|
-
|
|
368
|
-
if (typeof window !== "undefined" && window.icu && window.icu.getDecimalFormatSymbols().decimal_separator === ",") {
|
|
369
|
-
decimalSeparator = DecimalSeparators.COMMA;
|
|
370
|
-
} else {
|
|
371
|
-
decimalSeparator = DecimalSeparators.PERIOD;
|
|
372
|
-
}
|
|
369
|
+
var decimalSeparator = getDecimalSeparator() === "," ? DecimalSeparators.COMMA : DecimalSeparators.PERIOD;
|
|
373
370
|
|
|
374
371
|
var KeyConfigs = {
|
|
375
372
|
// Basic math keys.
|
|
@@ -7794,5 +7791,5 @@ class ProvidedKeypad extends React.Component {
|
|
|
7794
7791
|
|
|
7795
7792
|
}
|
|
7796
7793
|
|
|
7797
|
-
export { ProvidedKeypad as Keypad, MathInput as KeypadInput, KeypadTypes, keypadConfigurationPropType, keypadElementPropType };
|
|
7794
|
+
export { CursorContexts, KeyConfigs, ProvidedKeypad as Keypad, MathInput as KeypadInput, KeypadTypes, keypadConfigurationPropType, keypadElementPropType };
|
|
7798
7795
|
//# sourceMappingURL=index.js.map
|