@khanacademy/perseus-core 5.1.0 → 5.3.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/es/index.js +6 -2
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/split-perseus-item.d.ts +4 -0
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -1022,7 +1022,7 @@ function parseWidgetWithVersion(parseVersion, parseType, parseOptions) {
|
|
|
1022
1022
|
graded: optional(boolean),
|
|
1023
1023
|
alignment: optional(string),
|
|
1024
1024
|
options: parseOptions,
|
|
1025
|
-
key: optional(number),
|
|
1025
|
+
key: optional(nullable(number)),
|
|
1026
1026
|
version: parseVersion
|
|
1027
1027
|
});
|
|
1028
1028
|
}
|
|
@@ -2844,7 +2844,7 @@ const addLibraryVersionToPerseusDebug = (libraryName, libraryVersion) => {
|
|
|
2844
2844
|
|
|
2845
2845
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
2846
2846
|
const libName = "@khanacademy/perseus-core";
|
|
2847
|
-
const libVersion = "5.
|
|
2847
|
+
const libVersion = "5.3.0";
|
|
2848
2848
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
2849
2849
|
|
|
2850
2850
|
/**
|
|
@@ -4024,6 +4024,10 @@ function getUpgradedWidgetOptions(oldWidgetOptions) {
|
|
|
4024
4024
|
});
|
|
4025
4025
|
}
|
|
4026
4026
|
|
|
4027
|
+
/**
|
|
4028
|
+
* Upgrades widget options and removes answerful data for all the widgets in a
|
|
4029
|
+
* Perseus item.
|
|
4030
|
+
*/
|
|
4027
4031
|
function splitPerseusItem(originalItem) {
|
|
4028
4032
|
var _item$widgets;
|
|
4029
4033
|
const item = _.clone(originalItem);
|