@khanacademy/math-input 14.2.0 → 14.2.2
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 +22 -0
- package/dist/es/index.js +18 -19
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +17 -18
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/aphrodite-css-transition-group/transition-child.tsx +2 -1
- package/src/components/keypad/keypad-pages/keypad-pages.stories.tsx +9 -2
- package/src/components/keypad/keypad.tsx +2 -2
- package/src/components/keypad/navigation-pad.stories.tsx +2 -1
- package/src/components/keypad-context.tsx +25 -16
- package/src/components/keypad-legacy/text-icon.tsx +1 -1
- package/src/full-keypad.stories.tsx +7 -1
- package/tsconfig-build.tsbuildinfo +1 -1
package/dist/index.js
CHANGED
|
@@ -53,7 +53,7 @@ var Redux__namespace = /*#__PURE__*/_interopNamespace(Redux);
|
|
|
53
53
|
|
|
54
54
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
55
55
|
const libName = "@khanacademy/math-input";
|
|
56
|
-
const libVersion = "14.2.
|
|
56
|
+
const libVersion = "14.2.2";
|
|
57
57
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
58
58
|
|
|
59
59
|
function _defineProperty(obj, key, value) {
|
|
@@ -5261,7 +5261,7 @@ function getAvailableTabs(props) {
|
|
|
5261
5261
|
// The main (v2) Keypad. Use this component to present an accessible, onscreen
|
|
5262
5262
|
// keypad to learners for entering math expressions.
|
|
5263
5263
|
function Keypad$2(props) {
|
|
5264
|
-
// If we're using the Fractions
|
|
5264
|
+
// If we're using the Fractions keypad, we want to default select that page
|
|
5265
5265
|
// Otherwise, we want to default to the Numbers page
|
|
5266
5266
|
const defaultSelectedPage = props.fractionsOnly ? "Fractions" : "Numbers";
|
|
5267
5267
|
const [selectedPage, setSelectedPage] = React__namespace.useState(defaultSelectedPage);
|
|
@@ -5288,7 +5288,7 @@ function Keypad$2(props) {
|
|
|
5288
5288
|
// Use a different grid for our fraction keypad
|
|
5289
5289
|
const gridStyle = fractionsOnly ? styles$d.fractionsGrid : styles$d.expressionGrid;
|
|
5290
5290
|
|
|
5291
|
-
// This
|
|
5291
|
+
// This useEffect is only used to ensure that we can test the keypad in storybook
|
|
5292
5292
|
React.useEffect(() => {
|
|
5293
5293
|
setSelectedPage(defaultSelectedPage);
|
|
5294
5294
|
}, [fractionsOnly, defaultSelectedPage]);
|
|
@@ -5596,7 +5596,8 @@ class TransitionChild extends React__namespace.Component {
|
|
|
5596
5596
|
}
|
|
5597
5597
|
queueClass(removeClassName, addClassName) {
|
|
5598
5598
|
this.classNameQueue.push([removeClassName, addClassName]);
|
|
5599
|
-
|
|
5599
|
+
// Queue operation for after the next paint.
|
|
5600
|
+
this.props.schedule.timeout(this.flushClassNameQueue, 0);
|
|
5600
5601
|
}
|
|
5601
5602
|
render() {
|
|
5602
5603
|
const {
|
|
@@ -5876,20 +5877,18 @@ function StatefulKeypadContextProvider(props) {
|
|
|
5876
5877
|
// this is a KeypadContextRendererInterface from Perseus
|
|
5877
5878
|
const [renderer, setRenderer] = React.useState();
|
|
5878
5879
|
const [scrollableElement, setScrollableElement] = React.useState();
|
|
5880
|
+
const memoizedValue = React.useMemo(() => ({
|
|
5881
|
+
keypadActive,
|
|
5882
|
+
setKeypadActive,
|
|
5883
|
+
keypadElement,
|
|
5884
|
+
setKeypadElement,
|
|
5885
|
+
renderer,
|
|
5886
|
+
setRenderer,
|
|
5887
|
+
scrollableElement,
|
|
5888
|
+
setScrollableElement
|
|
5889
|
+
}), [keypadActive, setKeypadActive, keypadElement, setKeypadElement, renderer, setRenderer, scrollableElement, setScrollableElement]);
|
|
5879
5890
|
return /*#__PURE__*/React__namespace.createElement(KeypadContext.Provider, {
|
|
5880
|
-
value:
|
|
5881
|
-
setKeypadActive,
|
|
5882
|
-
keypadActive,
|
|
5883
|
-
setKeypadElement,
|
|
5884
|
-
keypadElement,
|
|
5885
|
-
setRenderer,
|
|
5886
|
-
renderer,
|
|
5887
|
-
// The scrollableElement options can likely be removed after
|
|
5888
|
-
// the exercises-package is officially deprecated. They don't appear
|
|
5889
|
-
// to be used anywhere except for the exercises-package and tests.
|
|
5890
|
-
setScrollableElement,
|
|
5891
|
-
scrollableElement
|
|
5892
|
-
}
|
|
5891
|
+
value: memoizedValue
|
|
5893
5892
|
}, props.children);
|
|
5894
5893
|
}
|
|
5895
5894
|
|
|
@@ -7188,7 +7187,7 @@ const styles$9 = aphrodite.StyleSheet.create({
|
|
|
7188
7187
|
width: iconSizeWidthPx
|
|
7189
7188
|
},
|
|
7190
7189
|
base: {
|
|
7191
|
-
fontFamily: "
|
|
7190
|
+
fontFamily: "'Lato', sans-serif",
|
|
7192
7191
|
fontSize: 25
|
|
7193
7192
|
}
|
|
7194
7193
|
});
|