@khanacademy/math-input 22.0.7 → 22.1.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/components/keypad/keypad-pages/numbers-page.d.ts +2 -1
- package/dist/components/keypad/keypad.d.ts +1 -0
- package/dist/es/index.js +15 -7
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +16 -7
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import type { ClickKeyCallback } from "../../../types";
|
|
3
3
|
type Props = {
|
|
4
4
|
onClickKey: ClickKeyCallback;
|
|
5
|
+
scientific?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export default function NumbersPage(
|
|
7
|
+
export default function NumbersPage({ onClickKey, scientific }: Props): React.JSX.Element;
|
|
7
8
|
export {};
|
package/dist/es/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import PropTypes from 'prop-types';
|
|
|
16
16
|
|
|
17
17
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
18
18
|
const libName = "@khanacademy/math-input";
|
|
19
|
-
const libVersion = "22.0
|
|
19
|
+
const libVersion = "22.1.0";
|
|
20
20
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
21
21
|
|
|
22
22
|
function _extends() {
|
|
@@ -4753,10 +4753,10 @@ function GeometryPage(props) {
|
|
|
4753
4753
|
}));
|
|
4754
4754
|
}
|
|
4755
4755
|
|
|
4756
|
-
function NumbersPage(
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4756
|
+
function NumbersPage({
|
|
4757
|
+
onClickKey,
|
|
4758
|
+
scientific
|
|
4759
|
+
}) {
|
|
4760
4760
|
const {
|
|
4761
4761
|
strings
|
|
4762
4762
|
} = useMathInputI18n();
|
|
@@ -4817,6 +4817,11 @@ function NumbersPage(props) {
|
|
|
4817
4817
|
onClickKey: onClickKey,
|
|
4818
4818
|
coord: [3, 0],
|
|
4819
4819
|
secondary: true
|
|
4820
|
+
}), scientific && /*#__PURE__*/React.createElement(KeypadButton, {
|
|
4821
|
+
keyConfig: Keys.EXP,
|
|
4822
|
+
onClickKey: onClickKey,
|
|
4823
|
+
coord: [3, 2],
|
|
4824
|
+
secondary: true
|
|
4820
4825
|
}));
|
|
4821
4826
|
}
|
|
4822
4827
|
|
|
@@ -5148,6 +5153,7 @@ function Keypad(_ref) {
|
|
|
5148
5153
|
logarithms,
|
|
5149
5154
|
basicRelations,
|
|
5150
5155
|
advancedRelations,
|
|
5156
|
+
scientific,
|
|
5151
5157
|
showDismiss,
|
|
5152
5158
|
onAnalyticsEvent,
|
|
5153
5159
|
fractionsOnly,
|
|
@@ -5203,7 +5209,8 @@ function Keypad(_ref) {
|
|
|
5203
5209
|
onClickKey: onClickKey,
|
|
5204
5210
|
cursorContext: cursorContext
|
|
5205
5211
|
}), selectedPage === "Numbers" && /*#__PURE__*/React.createElement(NumbersPage, {
|
|
5206
|
-
onClickKey: onClickKey
|
|
5212
|
+
onClickKey: onClickKey,
|
|
5213
|
+
scientific: scientific
|
|
5207
5214
|
}), selectedPage === "Extras" && /*#__PURE__*/React.createElement(ExtrasPage, {
|
|
5208
5215
|
onClickKey: onClickKey,
|
|
5209
5216
|
extraKeys: extraKeys
|
|
@@ -5699,7 +5706,8 @@ class MobileKeypadInternals extends React.Component {
|
|
|
5699
5706
|
basicRelations: isExpression,
|
|
5700
5707
|
advancedRelations: isExpression,
|
|
5701
5708
|
expandedView: containerWidth > expandedViewThreshold,
|
|
5702
|
-
showDismiss: true
|
|
5709
|
+
showDismiss: true,
|
|
5710
|
+
scientific: isExpression && (keypadConfig == null ? void 0 : keypadConfig.scientific)
|
|
5703
5711
|
}) : null));
|
|
5704
5712
|
}
|
|
5705
5713
|
}
|