@khanacademy/math-input 21.1.1 → 21.1.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/dist/index.js CHANGED
@@ -45,7 +45,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
45
45
 
46
46
  // This file is processed by a Rollup plugin (replace) to inject the production
47
47
  const libName = "@khanacademy/math-input";
48
- const libVersion = "21.1.1";
48
+ const libVersion = "21.1.2";
49
49
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
50
50
 
51
51
  function _extends() {
@@ -5368,9 +5368,6 @@ function SharedKeys(props) {
5368
5368
  }));
5369
5369
  }
5370
5370
 
5371
- const defaultProps = {
5372
- extraKeys: []
5373
- };
5374
5371
  function getAvailableTabs(props) {
5375
5372
  // We don't want to show any available tabs on the fractions keypad
5376
5373
  if (props.fractionsOnly) {
@@ -5393,7 +5390,11 @@ function getAvailableTabs(props) {
5393
5390
 
5394
5391
  // The main (v2) Keypad. Use this component to present an accessible, onscreen
5395
5392
  // keypad to learners for entering math expressions.
5396
- function Keypad(props) {
5393
+ function Keypad(_ref) {
5394
+ let {
5395
+ extraKeys = [],
5396
+ ...props
5397
+ } = _ref;
5397
5398
  // If we're using the Fractions keypad, we want to default select that page
5398
5399
  // Otherwise, we want to default to the Numbers page
5399
5400
  const defaultSelectedPage = props.fractionsOnly ? "Fractions" : "Numbers";
@@ -5401,11 +5402,13 @@ function Keypad(props) {
5401
5402
  const [isMounted, setIsMounted] = React__namespace.useState(false);
5402
5403
 
5403
5404
  // We don't want any tabs available on mobile fractions keypad
5404
- const availableTabs = getAvailableTabs(props);
5405
+ const availableTabs = getAvailableTabs({
5406
+ ...props,
5407
+ extraKeys
5408
+ });
5405
5409
  const {
5406
5410
  onClickKey,
5407
5411
  cursorContext,
5408
- extraKeys,
5409
5412
  convertDotToTimes,
5410
5413
  divisionKey,
5411
5414
  preAlgebra,
@@ -5489,7 +5492,6 @@ function Keypad(props) {
5489
5492
  onClickKey: onClickKey
5490
5493
  }))));
5491
5494
  }
5492
- Keypad.defaultProps = defaultProps;
5493
5495
  const styles$1 = aphrodite.StyleSheet.create({
5494
5496
  keypadOuterContainer: {
5495
5497
  display: "flex",