@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/index.js CHANGED
@@ -1053,7 +1053,7 @@ function parseWidgetWithVersion(parseVersion, parseType, parseOptions) {
1053
1053
  graded: optional(boolean),
1054
1054
  alignment: optional(string),
1055
1055
  options: parseOptions,
1056
- key: optional(number),
1056
+ key: optional(nullable(number)),
1057
1057
  version: parseVersion
1058
1058
  });
1059
1059
  }
@@ -2885,7 +2885,7 @@ const addLibraryVersionToPerseusDebug = (libraryName, libraryVersion) => {
2885
2885
 
2886
2886
  // This file is processed by a Rollup plugin (replace) to inject the production
2887
2887
  const libName = "@khanacademy/perseus-core";
2888
- const libVersion = "5.1.0";
2888
+ const libVersion = "5.3.0";
2889
2889
  addLibraryVersionToPerseusDebug(libName, libVersion);
2890
2890
 
2891
2891
  /**
@@ -4088,6 +4088,10 @@ function getUpgradedWidgetOptions(oldWidgetOptions) {
4088
4088
  });
4089
4089
  }
4090
4090
 
4091
+ /**
4092
+ * Upgrades widget options and removes answerful data for all the widgets in a
4093
+ * Perseus item.
4094
+ */
4091
4095
  function splitPerseusItem(originalItem) {
4092
4096
  const item = ___default["default"].clone(originalItem);
4093
4097
  const originalWidgets = item.widgets ?? {};