@khanacademy/perseus 42.0.0 → 42.0.2

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.
@@ -0,0 +1,13 @@
1
+ import type { PerseusRenderer, PerseusWidgetsMap, UserInputMap } from "@khanacademy/perseus";
2
+ type WidgetRenameMap = {
3
+ [oldKey: string]: string;
4
+ };
5
+ export declare const inputNumberToNumericInput: (json: PerseusRenderer) => PerseusRenderer;
6
+ export declare const convertInputNumberWidgetOptions: (json: PerseusRenderer, renameMap: WidgetRenameMap) => PerseusWidgetsMap;
7
+ export declare const getInputNumberRenameMap: (json: PerseusRenderer) => WidgetRenameMap;
8
+ export declare const convertUserInputNumberData: (userInputMap: UserInputMap, renameMap: WidgetRenameMap) => UserInputMap;
9
+ export declare const convertInputNumberForScoring: (rubric: PerseusRenderer, userInputMap: UserInputMap) => {
10
+ convertedRubric: PerseusRenderer;
11
+ convertedUserData: UserInputMap;
12
+ };
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { PerseusRenderer, UserInputMap } from "@khanacademy/perseus";
2
+ export declare const convertDeprecatedWidgets: (json: PerseusRenderer) => PerseusRenderer;
3
+ export declare const conversionRequired: (json: PerseusRenderer) => boolean;
4
+ /**
5
+ * Convert the deprecated widgets in the rubric and user data to their
6
+ * modern equivalents for scoring. These need to be updated together
7
+ * in order to ensure that the widgetKeys match between the rubric and user data.
8
+ */
9
+ export declare const convertDeprecatedWidgetsForScoring: (rubric: PerseusRenderer, userInputMap: UserInputMap) => {
10
+ convertedRubric: PerseusRenderer;
11
+ convertedUserData: UserInputMap;
12
+ };
@@ -272,7 +272,7 @@ declare const _default: {
272
272
  visibleLabel: string | undefined;
273
273
  ariaLabel: string | undefined;
274
274
  value: string;
275
- }, "ariaLabel" | "static" | "onChange" | "keypadElement" | "containerSizeClass" | "widgetId" | "problemNum" | "questionCompleted" | "findWidgets" | "trackInteraction" | "reviewMode" | keyof import("../../types").PerseusDependenciesV2 | "alignment" | "reviewModeRubric" | "isLastUsedWidget" | "buttonsVisible" | "visibleLabel" | "keypadConfiguration"> & {
275
+ }, "ariaLabel" | "static" | "onChange" | "keypadElement" | "containerSizeClass" | "widgetId" | "problemNum" | "questionCompleted" | "findWidgets" | "trackInteraction" | "buttonsVisible" | keyof import("../../types").PerseusDependenciesV2 | "visibleLabel" | "keypadConfiguration" | "alignment" | "reviewModeRubric" | "reviewMode" | "isLastUsedWidget"> & {
276
276
  value?: string | undefined;
277
277
  onFocus?: ((blurPath: FocusPath) => void) | undefined;
278
278
  onBlur?: ((blurPath: FocusPath) => void) | undefined;
@@ -352,10 +352,10 @@ declare const _default: {
352
352
  setDrawingAreaAvailable: (arg1: boolean) => unknown;
353
353
  showAlignmentOptions: NonNullable<boolean | undefined>;
354
354
  }> | undefined;
355
- linterContext?: import("@khanacademy/perseus-linter").LinterContextProps | undefined;
356
355
  buttonSets?: import("../../perseus-types").LegacyButtonSets | undefined;
357
356
  functions?: readonly string[] | undefined;
358
357
  times?: boolean | undefined;
358
+ linterContext?: import("@khanacademy/perseus-linter").LinterContextProps | undefined;
359
359
  } & {}, keyof import("../../types").PerseusDependenciesV2> & React.RefAttributes<Expression>>;
360
360
  transform: (widgetOptions: PerseusExpressionWidgetOptions) => RenderProps;
361
361
  version: {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Core Perseus API (includes renderers and widgets)",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "42.0.0",
6
+ "version": "42.0.2",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },