@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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @khanacademy/perseus
|
|
2
2
|
|
|
3
|
+
## 16.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#847](https://github.com/Khan/perseus/pull/847) [`45350a24`](https://github.com/Khan/perseus/commit/45350a2458cd3f816bc87af40997e426feb4b13b) Thanks [@handeyeco](https://github.com/handeyeco)! - Add back ItemRenderer temporarily
|
|
8
|
+
|
|
9
|
+
## 15.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- [#833](https://github.com/Khan/perseus/pull/833) [`3cf5ac4c`](https://github.com/Khan/perseus/commit/3cf5ac4c3f9d51dbcddc6f75bfbf0f8778b20f78) Thanks [@handeyeco](https://github.com/handeyeco)! - Remove export of ItemRenderer
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#794](https://github.com/Khan/perseus/pull/794) [`a91c84fe`](https://github.com/Khan/perseus/commit/a91c84fe53827ff4333220777a9918882b7fe9f0) Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! - Removing the useV2Keypad apiOption as the V1 keypad is no longer in use.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#839](https://github.com/Khan/perseus/pull/839) [`3e176246`](https://github.com/Khan/perseus/commit/3e176246025ba237682569481dd9960f7a0dabf4) Thanks [@nedredmond](https://github.com/nedredmond)! - Wrap string in internationalization function
|
|
22
|
+
|
|
23
|
+
* [#814](https://github.com/Khan/perseus/pull/814) [`105d2060`](https://github.com/Khan/perseus/commit/105d20603d935d35cff237b17f0bfb57ca751e4c) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Minor build change to how we provide Typescript type definitions (should be no change to build output).
|
|
24
|
+
|
|
25
|
+
* Updated dependencies [[`a91c84fe`](https://github.com/Khan/perseus/commit/a91c84fe53827ff4333220777a9918882b7fe9f0), [`105d2060`](https://github.com/Khan/perseus/commit/105d20603d935d35cff237b17f0bfb57ca751e4c)]:
|
|
26
|
+
- @khanacademy/math-input@16.1.0
|
|
27
|
+
- @khanacademy/perseus-core@1.4.0
|
|
28
|
+
- @khanacademy/kas@0.3.6
|
|
29
|
+
- @khanacademy/kmath@0.1.7
|
|
30
|
+
- @khanacademy/perseus-linter@0.3.9
|
|
31
|
+
- @khanacademy/pure-markdown@0.2.12
|
|
32
|
+
- @khanacademy/simple-markdown@0.11.1
|
|
33
|
+
|
|
3
34
|
## 14.0.0
|
|
4
35
|
|
|
5
36
|
### Major Changes
|
package/dist/es/index.js
CHANGED
|
@@ -32,20 +32,17 @@ import Link from '@khanacademy/wonder-blocks-link';
|
|
|
32
32
|
import { addLibraryVersionToPerseusDebug } from '@khanacademy/perseus-core';
|
|
33
33
|
|
|
34
34
|
function _extends() {
|
|
35
|
-
_extends = Object.assign
|
|
35
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
36
36
|
for (var i = 1; i < arguments.length; i++) {
|
|
37
37
|
var source = arguments[i];
|
|
38
|
-
|
|
39
38
|
for (var key in source) {
|
|
40
39
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
41
40
|
target[key] = source[key];
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
|
-
|
|
46
44
|
return target;
|
|
47
45
|
};
|
|
48
|
-
|
|
49
46
|
return _extends.apply(this, arguments);
|
|
50
47
|
}
|
|
51
48
|
|
|
@@ -54,13 +51,11 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
54
51
|
var target = {};
|
|
55
52
|
var sourceKeys = Object.keys(source);
|
|
56
53
|
var key, i;
|
|
57
|
-
|
|
58
54
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
59
55
|
key = sourceKeys[i];
|
|
60
56
|
if (excluded.indexOf(key) >= 0) continue;
|
|
61
57
|
target[key] = source[key];
|
|
62
58
|
}
|
|
63
|
-
|
|
64
59
|
return target;
|
|
65
60
|
}
|
|
66
61
|
|
|
@@ -875,10 +870,6 @@ const ApiOptions = {
|
|
|
875
870
|
nativeKeypadProxy: PropTypes.func,
|
|
876
871
|
// Indicates whether or not to use mobile styling.
|
|
877
872
|
isMobile: PropTypes.bool,
|
|
878
|
-
// Whether to use v1 (Legacy) Keypad for MathInput mobile or
|
|
879
|
-
// use the new v2 Keypad
|
|
880
|
-
// TODO [LC-1088]: remove after v2 release
|
|
881
|
-
useV2Keypad: PropTypes.bool,
|
|
882
873
|
// A function, called with a bool indicating whether use of the
|
|
883
874
|
// drawing area (scratchpad) should be allowed/disallowed.
|
|
884
875
|
// Previously handled by `Khan.scratchpad.enable/disable`
|
|
@@ -917,7 +908,6 @@ const ApiOptions = {
|
|
|
917
908
|
defaults: {
|
|
918
909
|
isArticle: false,
|
|
919
910
|
isMobile: false,
|
|
920
|
-
useV2Keypad: false,
|
|
921
911
|
onInputError: function () {},
|
|
922
912
|
onFocusChange: function () {},
|
|
923
913
|
GroupMetadataEditor: StubTagEditor,
|
|
@@ -1924,7 +1914,7 @@ const deriveKeypadVersion = apiOptions => {
|
|
|
1924
1914
|
// a bit tricky, but this code will be relatively short-lived
|
|
1925
1915
|
// as we coalesce onto the new, v2 Keypad, at which point we
|
|
1926
1916
|
// can remove this `virtualKeypadVersion` field entirely.
|
|
1927
|
-
return apiOptions.nativeKeypadProxy != null ? "REACT_NATIVE_KEYPAD" :
|
|
1917
|
+
return apiOptions.nativeKeypadProxy != null ? "REACT_NATIVE_KEYPAD" : "MATH_INPUT_KEYPAD_V2";
|
|
1928
1918
|
};
|
|
1929
1919
|
// The new, MathQuill input expression widget
|
|
1930
1920
|
class Expression extends React.Component {
|
|
@@ -44089,7 +44079,7 @@ const init = function init(options) {
|
|
|
44089
44079
|
|
|
44090
44080
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
44091
44081
|
const libName = "@khanacademy/perseus";
|
|
44092
|
-
const libVersion = "
|
|
44082
|
+
const libVersion = "16.0.0";
|
|
44093
44083
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
44094
44084
|
|
|
44095
44085
|
const apiVersion = {
|
|
@@ -44427,6 +44417,8 @@ class HintsRenderer extends React.Component {
|
|
|
44427
44417
|
componentDidMount() {
|
|
44428
44418
|
this._cacheHintImages();
|
|
44429
44419
|
}
|
|
44420
|
+
|
|
44421
|
+
// eslint-disable-next-line react/no-unsafe
|
|
44430
44422
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
44431
44423
|
// @ts-expect-error - TS2532 - Object is possibly 'undefined'. | TS2532 - Object is possibly 'undefined'.
|
|
44432
44424
|
if (nextProps.hintsVisible - this.props.hintsVisible > 1) {
|
|
@@ -45107,6 +45099,8 @@ class ServerItemRenderer extends React.Component {
|
|
|
45107
45099
|
this._currentFocus = null;
|
|
45108
45100
|
this._fullyRendered = false;
|
|
45109
45101
|
}
|
|
45102
|
+
|
|
45103
|
+
// eslint-disable-next-line react/no-unsafe
|
|
45110
45104
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
45111
45105
|
this.setState({
|
|
45112
45106
|
questionHighlightedWidgets: []
|