@khanacademy/perseus-editor 2.9.1 → 2.11.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 +24 -0
- package/dist/es/index.css +0 -8
- package/dist/es/index.js +8 -10
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +0 -8
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/package.json +15 -13
- package/src/__stories__/editor.stories.tsx +2 -0
- package/src/styles/perseus-editor.less +0 -9
- package/src/widgets/__tests__/expression-editor.test.tsx +56 -0
- package/src/widgets/expression-editor.tsx +7 -7
- package/tsconfig-build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @khanacademy/perseus-editor
|
|
2
2
|
|
|
3
|
+
## 2.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#827](https://github.com/Khan/perseus/pull/827) [`c7410ccc`](https://github.com/Khan/perseus/commit/c7410ccc6254034b599e1909b3cbbd7a6c9ea9b2) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Revert defensive code in ExpressionEditor that caused a crash when an expression config's answer form was missing a `key` property.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`cdcd162e`](https://github.com/Khan/perseus/commit/cdcd162ea0902d3ff1d77b1b66ad15f2d55a86cd), [`7cb40e4c`](https://github.com/Khan/perseus/commit/7cb40e4c919be50e5ced41e4937178bbf849ec74), [`8f1f0208`](https://github.com/Khan/perseus/commit/8f1f0208fcc08e137053bfd05d330b6f8bf3522d)]:
|
|
12
|
+
- @khanacademy/perseus@14.0.0
|
|
13
|
+
|
|
14
|
+
## 2.10.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [#811](https://github.com/Khan/perseus/pull/811) [`bca527ab`](https://github.com/Khan/perseus/commit/bca527abc4d8b29942efec12509f9cf8be401e75) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Bump all Wonder Blocks dependencies to latest
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#808](https://github.com/Khan/perseus/pull/808) [`8358da80`](https://github.com/Khan/perseus/commit/8358da8010dcb8976d8cfb542afa7e303ce4971a) Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! - Removing unnecessary conflicting CSS for #problemarea.
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [[`8358da80`](https://github.com/Khan/perseus/commit/8358da8010dcb8976d8cfb542afa7e303ce4971a), [`691d29b4`](https://github.com/Khan/perseus/commit/691d29b4224a523a3dd8d53a7aab28c80118e7ac), [`021f9462`](https://github.com/Khan/perseus/commit/021f946255f423de8df13f6872b0664f79408484), [`bca527ab`](https://github.com/Khan/perseus/commit/bca527abc4d8b29942efec12509f9cf8be401e75), [`6d31e044`](https://github.com/Khan/perseus/commit/6d31e044d6f5b304e63602795e9bbd7ba443dac5)]:
|
|
25
|
+
- @khanacademy/perseus@13.2.0
|
|
26
|
+
|
|
3
27
|
## 2.9.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/dist/es/index.css
CHANGED
|
@@ -180,14 +180,6 @@
|
|
|
180
180
|
#perseus {
|
|
181
181
|
margin: 20px;
|
|
182
182
|
}
|
|
183
|
-
#perseus #problemarea {
|
|
184
|
-
/* Override the min-height property used for displaying the problem.
|
|
185
|
-
While editing, the size of the editor itself is a better constraint on
|
|
186
|
-
the size of the problemarea, and having a smaller problemarea is nicer
|
|
187
|
-
if it means it aligns better with the editor. */
|
|
188
|
-
min-height: 0;
|
|
189
|
-
width: 100%;
|
|
190
|
-
}
|
|
191
183
|
#perseus #problemarea #workarea {
|
|
192
184
|
margin: 0;
|
|
193
185
|
}
|
package/dist/es/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import * as i18n$1 from '@khanacademy/wonder-blocks-i18n';
|
|
|
22
22
|
|
|
23
23
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
24
24
|
const libName = "@khanacademy/perseus-editor";
|
|
25
|
-
const libVersion = "2.
|
|
25
|
+
const libVersion = "2.11.0";
|
|
26
26
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
27
27
|
|
|
28
28
|
function _extends() {
|
|
@@ -26756,20 +26756,18 @@ const {
|
|
|
26756
26756
|
PropCheckBox: PropCheckBox$b,
|
|
26757
26757
|
TexButtons
|
|
26758
26758
|
} = components;
|
|
26759
|
-
const {
|
|
26760
|
-
getDependencies: getDependencies$2
|
|
26761
|
-
} = Dependencies;
|
|
26762
26759
|
|
|
26763
26760
|
// types for iterables
|
|
26764
26761
|
|
|
26765
26762
|
const parseAnswerKey = ({
|
|
26766
26763
|
key
|
|
26767
26764
|
}) => {
|
|
26768
|
-
|
|
26769
|
-
|
|
26770
|
-
|
|
26771
|
-
|
|
26772
|
-
|
|
26765
|
+
// We don't throw here because there is data stored in some
|
|
26766
|
+
// exercises/articles where the answer forms don't have a key. If we throw,
|
|
26767
|
+
// it blocks content editors from loading the page at all.
|
|
26768
|
+
// TODO(Jeremy): find a way to handle these answer forms that are missing
|
|
26769
|
+
// keys more gracefully.
|
|
26770
|
+
return Number.parseInt(key != null ? key : "");
|
|
26773
26771
|
};
|
|
26774
26772
|
|
|
26775
26773
|
// Pick a key that isn't currently used by an answer in answerForms
|
|
@@ -27009,7 +27007,7 @@ class ExpressionEditor extends React.Component {
|
|
|
27009
27007
|
});
|
|
27010
27008
|
const {
|
|
27011
27009
|
TeX
|
|
27012
|
-
} = getDependencies
|
|
27010
|
+
} = Dependencies.getDependencies(); // OldExpression only
|
|
27013
27011
|
|
|
27014
27012
|
buttonSetChoices.splice(1, 1, /*#__PURE__*/React.createElement("label", {
|
|
27015
27013
|
key: "show-div"
|