@khanacademy/math-input 18.1.0 → 19.0.0
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/index.js
CHANGED
|
@@ -44,7 +44,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
|
44
44
|
|
|
45
45
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
46
46
|
const libName = "@khanacademy/math-input";
|
|
47
|
-
const libVersion = "
|
|
47
|
+
const libVersion = "19.0.0";
|
|
48
48
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
49
49
|
|
|
50
50
|
function _extends() {
|
|
@@ -607,7 +607,7 @@ const createBaseConfig = () => ({
|
|
|
607
607
|
* This allows callers to do minimal configuration as only configs
|
|
608
608
|
* that vary from the default need to be provided.
|
|
609
609
|
*/
|
|
610
|
-
function createMathField(container, strings, configCallback) {
|
|
610
|
+
function createMathField(container, locale, strings, configCallback) {
|
|
611
611
|
const baseConfig = createBaseConfig();
|
|
612
612
|
const config = configCallback ? configCallback(baseConfig) : baseConfig;
|
|
613
613
|
const mathField = mathQuillInstance.MathField(container, config).setAriaLabel(strings.mathInputBox).setAriaStringsOverrideMap({
|
|
@@ -644,7 +644,7 @@ function createMathField(container, strings, configCallback) {
|
|
|
644
644
|
// HTTP request to fetch non-english speech rules, and cannot be easily
|
|
645
645
|
// mocked in consuming packages now that we do not bundle source code.
|
|
646
646
|
// When it eventually times out, it will cause arbitrary test failures.
|
|
647
|
-
!inJest && mathjaxRenderer.SpeechRuleEngine.setup().then(SRE => mathField.setMathspeakOverride(SRE.texToSpeech));
|
|
647
|
+
!inJest && mathjaxRenderer.SpeechRuleEngine.setup(locale).then(SRE => mathField.setMathspeakOverride(SRE.texToSpeech));
|
|
648
648
|
return mathField;
|
|
649
649
|
}
|
|
650
650
|
|
|
@@ -1459,7 +1459,7 @@ class MathWrapper {
|
|
|
1459
1459
|
mobileKeyTranslator;
|
|
1460
1460
|
constructor(element, strings, locale) {
|
|
1461
1461
|
let callbacks = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
1462
|
-
this.mathField = createMathField(element, strings, () => {
|
|
1462
|
+
this.mathField = createMathField(element, locale, strings, () => {
|
|
1463
1463
|
return {
|
|
1464
1464
|
// use a span instead of a textarea so that we don't bring up the
|
|
1465
1465
|
// native keyboard on mobile when selecting the input
|