@khanacademy/perseus-core 0.0.0-PR2969-20251028001807 → 0.0.0-PR2969-20251028002754

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.
@@ -4,7 +4,7 @@ import type { Alignment } from "../types";
4
4
  export declare function registerWidget(type: string, logic: WidgetLogic): void;
5
5
  export declare function isWidgetRegistered(type: string): boolean;
6
6
  export declare function getCurrentVersion(type: string): import("..").Version;
7
- export declare function getSaveWarningsFnForWidget(type: string): import("./logic-export.types").SaveWarningsFunction;
7
+ export declare function getSaveWarningsFnForWidget(type: string): typeof import("./radio/radio-util").getSaveWarningsForRadioWidget;
8
8
  export declare const getPublicWidgetOptionsFunction: (type: string) => PublicWidgetOptionsFunction;
9
9
  export declare function getDefaultWidgetOptions(type: string): any;
10
10
  export declare function isAccessible(type: string, widgetOptions: PerseusWidgetOptions): boolean;
@@ -1,3 +1,4 @@
1
+ import { type getSaveWarningsForRadioWidget } from "./radio/radio-util";
1
2
  import type getCategorizerPublicWidgetOptions from "./categorizer/categorizer-util";
2
3
  import type getCSProgramPublicWidgetOptions from "./cs-program/cs-program-util";
3
4
  import type getDropdownPublicWidgetOptions from "./dropdown/dropdown-util";
@@ -18,7 +19,7 @@ import type getPlotterPublicWidgetOptions from "./plotter/plotter-util";
18
19
  import type getRadioPublicWidgetOptions from "./radio/radio-util";
19
20
  import type getSorterPublicWidgetOptions from "./sorter/sorter-util";
20
21
  import type getTablePublicWidgetOptions from "./table/table-util";
21
- import type { PerseusWidget, PerseusWidgetOptions, Version } from "../data-schema";
22
+ import type { PerseusWidgetOptions, Version } from "../data-schema";
22
23
  import type { Alignment } from "../types";
23
24
  export type WidgetOptionsUpgradeMap = {
24
25
  [targetMajorVersion: string]: (arg1: any) => any;
@@ -30,7 +31,7 @@ export type WidgetOptionsUpgradeMap = {
30
31
  * so reliant on a set group of widgets
31
32
  */
32
33
  export type PublicWidgetOptionsFunction = typeof getCategorizerPublicWidgetOptions | typeof getCSProgramPublicWidgetOptions | typeof getDropdownPublicWidgetOptions | typeof getExpressionPublicWidgetOptions | typeof getFreeResponsePublicWidgetOptions | typeof getGrapherPublicWidgetOptions | typeof getGroupPublicWidgetOptions | typeof getIFramePublicWidgetOptions | typeof getInputNumberPublicWidgetOptions | typeof getInteractiveGraphPublicWidgetOptions | typeof getLabelImagePublicWidgetOptions | typeof getMatcherPublicWidgetOptions | typeof getMatrixPublicWidgetOptions | typeof getNumberLinePublicWidgetOptions | typeof getNumericInputPublicWidgetOptions | typeof getOrdererPublicWidgetOptions | typeof getPlotterPublicWidgetOptions | typeof getRadioPublicWidgetOptions | typeof getSorterPublicWidgetOptions | typeof getTablePublicWidgetOptions;
33
- export type SaveWarningsFunction = (widget: PerseusWidget) => Array<string>;
34
+ export type SaveWarningsFunction = typeof getSaveWarningsForRadioWidget;
34
35
  export type WidgetLogic = {
35
36
  name: string;
36
37
  version?: Version;
@@ -1,4 +1,4 @@
1
- import type { PerseusRadioChoice, PerseusRadioWidgetOptions, PerseusWidget } from "../../data-schema";
1
+ import type { PerseusRadioChoice, PerseusRadioWidgetOptions, RadioWidget } from "../../data-schema";
2
2
  /**
3
3
  * For details on the individual options, see the
4
4
  * PerseusRadioWidgetOptions type.
@@ -16,7 +16,7 @@ export type RadioPublicWidgetOptions = {
16
16
  * Only the options from each Radio choice that should be exposed to the client.
17
17
  */
18
18
  type RadioChoicePublicData = Pick<PerseusRadioChoice, "id" | "content" | "isNoneOfTheAbove">;
19
- export declare function getSaveWarningsForRadioWidget(widget: PerseusWidget): Array<string>;
19
+ export declare function getSaveWarningsForRadioWidget(widget: RadioWidget): Array<string>;
20
20
  /**
21
21
  * Shared functionality to determine if numCorrect is used, because:
22
22
  *
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Shared Perseus infrastructure",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "0.0.0-PR2969-20251028001807",
6
+ "version": "0.0.0-PR2969-20251028002754",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },