@khanacademy/perseus 14.0.0 → 16.0.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/CHANGELOG.md +31 -0
- package/dist/es/index.js +7 -13
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +6 -7
- package/dist/index.js.map +1 -1
- package/dist/multi-items/item-types.d.ts +1 -1
- package/dist/multi-items/multi-renderer.d.ts +2 -2
- package/dist/perseus-api.d.ts +0 -3
- package/dist/strings.js +1 -0
- package/dist/styles/shared.d.ts +1 -0
- package/dist/types.d.ts +0 -2
- package/dist/util/a11y.d.ts +1 -0
- package/dist/widgets/expression.d.ts +0 -12
- package/dist/widgets/graded-group.d.ts +1 -1
- package/dist/widgets/label-image.d.ts +1 -1
- package/dist/widgets/matcher.d.ts +0 -1
- package/dist/widgets/passage.d.ts +1 -1
- package/dist/widgets/radio/widget.d.ts +1 -1
- package/dist/widgets/simulator.d.ts +0 -1
- package/dist/widgets/sorter.d.ts +0 -1
- package/package.json +8 -8
- package/src/__tests__/server-item-renderer.test.tsx +1 -1
- package/src/components/svg-image.tsx +1 -1
- package/src/hints-renderer.tsx +1 -0
- package/src/multi-items/item-types.ts +1 -1
- package/src/multi-items/multi-renderer.tsx +4 -4
- package/src/perseus-api.tsx +0 -6
- package/src/server-item-renderer.tsx +1 -0
- package/src/types.ts +0 -5
- package/src/util.ts +1 -1
- package/src/widgets/__stories__/expression.stories.tsx +0 -1
- package/src/widgets/__tests__/expression-mobile.test.tsx +0 -1
- package/src/widgets/__tests__/expression.test.tsx +4 -15
- package/src/widgets/expression.tsx +1 -5
- package/src/widgets/graded-group.tsx +1 -1
- package/src/widgets/label-image/strings.ts +3 -1
- package/src/widgets/label-image.tsx +2 -2
- package/src/widgets/passage-ref.tsx +1 -1
- package/src/widgets/passage.tsx +1 -1
- package/src/widgets/radio/widget.tsx +1 -1
- package/src/widgets/radio.ts +1 -1
- package/tsconfig-build.tsbuildinfo +1 -1
package/dist/index.js
CHANGED
|
@@ -891,10 +891,6 @@ const ApiOptions = {
|
|
|
891
891
|
nativeKeypadProxy: PropTypes__default["default"].func,
|
|
892
892
|
// Indicates whether or not to use mobile styling.
|
|
893
893
|
isMobile: PropTypes__default["default"].bool,
|
|
894
|
-
// Whether to use v1 (Legacy) Keypad for MathInput mobile or
|
|
895
|
-
// use the new v2 Keypad
|
|
896
|
-
// TODO [LC-1088]: remove after v2 release
|
|
897
|
-
useV2Keypad: PropTypes__default["default"].bool,
|
|
898
894
|
// A function, called with a bool indicating whether use of the
|
|
899
895
|
// drawing area (scratchpad) should be allowed/disallowed.
|
|
900
896
|
// Previously handled by `Khan.scratchpad.enable/disable`
|
|
@@ -933,7 +929,6 @@ const ApiOptions = {
|
|
|
933
929
|
defaults: {
|
|
934
930
|
isArticle: false,
|
|
935
931
|
isMobile: false,
|
|
936
|
-
useV2Keypad: false,
|
|
937
932
|
onInputError: function () {},
|
|
938
933
|
onFocusChange: function () {},
|
|
939
934
|
GroupMetadataEditor: StubTagEditor,
|
|
@@ -1940,7 +1935,7 @@ const deriveKeypadVersion = apiOptions => {
|
|
|
1940
1935
|
// a bit tricky, but this code will be relatively short-lived
|
|
1941
1936
|
// as we coalesce onto the new, v2 Keypad, at which point we
|
|
1942
1937
|
// can remove this `virtualKeypadVersion` field entirely.
|
|
1943
|
-
return apiOptions.nativeKeypadProxy != null ? "REACT_NATIVE_KEYPAD" :
|
|
1938
|
+
return apiOptions.nativeKeypadProxy != null ? "REACT_NATIVE_KEYPAD" : "MATH_INPUT_KEYPAD_V2";
|
|
1944
1939
|
};
|
|
1945
1940
|
// The new, MathQuill input expression widget
|
|
1946
1941
|
class Expression extends React__namespace.Component {
|
|
@@ -44221,7 +44216,7 @@ const init = function (options) {
|
|
|
44221
44216
|
|
|
44222
44217
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
44223
44218
|
const libName = "@khanacademy/perseus";
|
|
44224
|
-
const libVersion = "
|
|
44219
|
+
const libVersion = "16.0.0";
|
|
44225
44220
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
44226
44221
|
|
|
44227
44222
|
const apiVersion = {
|
|
@@ -44495,6 +44490,8 @@ class HintsRenderer extends React__namespace.Component {
|
|
|
44495
44490
|
componentDidMount() {
|
|
44496
44491
|
this._cacheHintImages();
|
|
44497
44492
|
}
|
|
44493
|
+
|
|
44494
|
+
// eslint-disable-next-line react/no-unsafe
|
|
44498
44495
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
44499
44496
|
// @ts-expect-error - TS2532 - Object is possibly 'undefined'. | TS2532 - Object is possibly 'undefined'.
|
|
44500
44497
|
if (nextProps.hintsVisible - this.props.hintsVisible > 1) {
|
|
@@ -45215,6 +45212,8 @@ class ServerItemRenderer extends React__namespace.Component {
|
|
|
45215
45212
|
this._currentFocus = null;
|
|
45216
45213
|
this._fullyRendered = false;
|
|
45217
45214
|
}
|
|
45215
|
+
|
|
45216
|
+
// eslint-disable-next-line react/no-unsafe
|
|
45218
45217
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
45219
45218
|
this.setState({
|
|
45220
45219
|
questionHighlightedWidgets: []
|