@khanacademy/math-input 22.0.7 → 22.1.1
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 +28 -33
- 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 +11 -11
|
@@ -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,25 +16,17 @@ 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.
|
|
19
|
+
const libVersion = "22.1.1";
|
|
20
20
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
21
21
|
|
|
22
22
|
function _extends() {
|
|
23
|
-
_extends = Object.assign
|
|
24
|
-
for (var
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
for (var key in source) {
|
|
28
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
29
|
-
target[key] = source[key];
|
|
30
|
-
}
|
|
31
|
-
}
|
|
23
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
24
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
25
|
+
var t = arguments[e];
|
|
26
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
32
27
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return _extends.apply(this, arguments);
|
|
28
|
+
return n;
|
|
29
|
+
}, _extends.apply(null, arguments);
|
|
38
30
|
}
|
|
39
31
|
|
|
40
32
|
class View extends React.Component {
|
|
@@ -2355,19 +2347,14 @@ const inlineStyles = {
|
|
|
2355
2347
|
}
|
|
2356
2348
|
};
|
|
2357
2349
|
|
|
2358
|
-
function _objectWithoutPropertiesLoose(
|
|
2359
|
-
if (
|
|
2360
|
-
var
|
|
2361
|
-
var
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
2365
|
-
key = sourceKeys[i];
|
|
2366
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
2367
|
-
target[key] = source[key];
|
|
2350
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
2351
|
+
if (null == r) return {};
|
|
2352
|
+
var t = {};
|
|
2353
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
2354
|
+
if (e.includes(n)) continue;
|
|
2355
|
+
t[n] = r[n];
|
|
2368
2356
|
}
|
|
2369
|
-
|
|
2370
|
-
return target;
|
|
2357
|
+
return t;
|
|
2371
2358
|
}
|
|
2372
2359
|
|
|
2373
2360
|
const IconAsset = function IconAsset({
|
|
@@ -4753,10 +4740,10 @@ function GeometryPage(props) {
|
|
|
4753
4740
|
}));
|
|
4754
4741
|
}
|
|
4755
4742
|
|
|
4756
|
-
function NumbersPage(
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4743
|
+
function NumbersPage({
|
|
4744
|
+
onClickKey,
|
|
4745
|
+
scientific
|
|
4746
|
+
}) {
|
|
4760
4747
|
const {
|
|
4761
4748
|
strings
|
|
4762
4749
|
} = useMathInputI18n();
|
|
@@ -4817,6 +4804,11 @@ function NumbersPage(props) {
|
|
|
4817
4804
|
onClickKey: onClickKey,
|
|
4818
4805
|
coord: [3, 0],
|
|
4819
4806
|
secondary: true
|
|
4807
|
+
}), scientific && /*#__PURE__*/React.createElement(KeypadButton, {
|
|
4808
|
+
keyConfig: Keys.EXP,
|
|
4809
|
+
onClickKey: onClickKey,
|
|
4810
|
+
coord: [3, 2],
|
|
4811
|
+
secondary: true
|
|
4820
4812
|
}));
|
|
4821
4813
|
}
|
|
4822
4814
|
|
|
@@ -5148,6 +5140,7 @@ function Keypad(_ref) {
|
|
|
5148
5140
|
logarithms,
|
|
5149
5141
|
basicRelations,
|
|
5150
5142
|
advancedRelations,
|
|
5143
|
+
scientific,
|
|
5151
5144
|
showDismiss,
|
|
5152
5145
|
onAnalyticsEvent,
|
|
5153
5146
|
fractionsOnly,
|
|
@@ -5203,7 +5196,8 @@ function Keypad(_ref) {
|
|
|
5203
5196
|
onClickKey: onClickKey,
|
|
5204
5197
|
cursorContext: cursorContext
|
|
5205
5198
|
}), selectedPage === "Numbers" && /*#__PURE__*/React.createElement(NumbersPage, {
|
|
5206
|
-
onClickKey: onClickKey
|
|
5199
|
+
onClickKey: onClickKey,
|
|
5200
|
+
scientific: scientific
|
|
5207
5201
|
}), selectedPage === "Extras" && /*#__PURE__*/React.createElement(ExtrasPage, {
|
|
5208
5202
|
onClickKey: onClickKey,
|
|
5209
5203
|
extraKeys: extraKeys
|
|
@@ -5699,7 +5693,8 @@ class MobileKeypadInternals extends React.Component {
|
|
|
5699
5693
|
basicRelations: isExpression,
|
|
5700
5694
|
advancedRelations: isExpression,
|
|
5701
5695
|
expandedView: containerWidth > expandedViewThreshold,
|
|
5702
|
-
showDismiss: true
|
|
5696
|
+
showDismiss: true,
|
|
5697
|
+
scientific: isExpression && (keypadConfig == null ? void 0 : keypadConfig.scientific)
|
|
5703
5698
|
}) : null));
|
|
5704
5699
|
}
|
|
5705
5700
|
}
|