@khanacademy/math-input 27.0.10 → 27.0.12
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/es/index.js +3 -3
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
package/dist/es/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { addLibraryVersionToPerseusDebug } from '@khanacademy/perseus-utils';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default, { useContext, useEffect } from 'react';
|
|
3
|
+
import React__default, { useContext, useMemo, useEffect } from 'react';
|
|
4
4
|
import { KeypadContext } from '@khanacademy/keypad-context';
|
|
5
5
|
import { View } from '@khanacademy/wonder-blocks-core';
|
|
6
6
|
import { semanticColor, border, font, sizing } from '@khanacademy/wonder-blocks-tokens';
|
|
@@ -17,7 +17,7 @@ import { TransitionGroup } from 'react-transition-group';
|
|
|
17
17
|
import { withActionScheduler } from '@khanacademy/wonder-blocks-timing';
|
|
18
18
|
import PropTypes from 'prop-types';
|
|
19
19
|
|
|
20
|
-
const libName="@khanacademy/math-input";const libVersion="27.0.
|
|
20
|
+
const libName="@khanacademy/math-input";const libVersion="27.0.12";addLibraryVersionToPerseusDebug(libName,libVersion);
|
|
21
21
|
|
|
22
22
|
function getDefaultExportFromCjs (x) {
|
|
23
23
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -1369,7 +1369,7 @@ var jsxRuntimeExports = requireJsxRuntime();
|
|
|
1369
1369
|
|
|
1370
1370
|
const mockStrings={mathInputBox:"Math input box",fingerTap:"Tap with one or two fingers to open keyboard",before:({obj})=>`before ${obj}`,after:({obj})=>`after ${obj}`,"beginning of":({obj})=>`beginning of ${obj}`,"end of":({obj})=>`end of ${obj}`,Baseline:"Baseline",Superscript:"Superscript",selected:({obj})=>`${obj} selected`,"no answer":"no answer","nothing selected":"nothing selected","nothing to the right":"nothing to the right","nothing to the left":"nothing to the left","block is empty":"block is empty","nothing above":"nothing above",labelValue:({label,value})=>`${label}: ${value}`,plus:"Plus",minus:"Minus",negative:"Negative",times:"Multiply",divide:"Divide",decimal:"Decimal",percent:"Percent",cdot:"Multiply",equalsSign:"Equals sign",notEqualsSign:"Not-equals sign",greaterThanSign:"Greater than sign",lessThanSign:"Less than sign",greaterThanOrEqualToSign:"Greater than or equal to sign",lessThanOrEqualSign:"Less than or equal to sign",fractionExpressionInNumerator:"Fraction, with current expression in numerator",fractionExcludingExpression:"Fraction, excluding the current expression",customExponent:"Custom exponent",subscript:"Subscript",square:"Square",cube:"Cube",squareRoot:"Square root",cubeRoot:"Cube root",radicalWithCustomRoot:"Radical with custom root",leftParenthesis:"Left parenthesis",rightParenthesis:"Right parenthesis",naturalLog:"Natural logarithm",logBase10:"Logarithm with base 10",logCustomBase:"Logarithm with custom base",sine:"Sine",sin:"sin",cosine:"Cosine",cos:"cos",tangent:"Tangent",tan:"tan",pi:"Pi",theta:"Theta",upArrow:"Up arrow",rightArrow:"Right arrow",downArrow:"Down arrow",leftArrow:"Left arrow",navOutOfParentheses:"Navigate right out of a set of parentheses",navOutOfExponent:"Navigate right out of an exponent",navOutOfBase:"Navigate right out of a base",navIntoNumerator:"Navigate right into the numerator of a fraction",navOutOfNumeratorIntoDenominator:"Navigate right out of the numerator and into the denominator",navOutOfDenominator:"Navigate right out of the denominator of a fraction",delete:"Delete",dismiss:"Dismiss"};
|
|
1371
1371
|
|
|
1372
|
-
const MathInputI18nContext=React.createContext(process.env.NODE_ENV==="test"||process.env.STORYBOOK?{strings:mockStrings,locale:"en"}:null);function MathInputI18nContextProvider({children,strings,locale}){return jsxRuntimeExports.jsx(MathInputI18nContext.Provider,{value:
|
|
1372
|
+
const MathInputI18nContext=React.createContext(process.env.NODE_ENV==="test"||process.env.STORYBOOK?{strings:mockStrings,locale:"en"}:null);function MathInputI18nContextProvider({children,strings,locale}){const value=useMemo(()=>({strings,locale}),[strings,locale]);return jsxRuntimeExports.jsx(MathInputI18nContext.Provider,{value:value,children:children})}const useMathInputI18n=()=>useContext(MathInputI18nContext);
|
|
1373
1373
|
|
|
1374
1374
|
const cursorHandleRadiusPx=11;const cursorHandleDistanceMultiplier=1.045;
|
|
1375
1375
|
|