@khanacademy/perseus-core 33.0.1 → 34.0.1

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.
@@ -1,8 +1,6 @@
1
1
  export declare const parseMatrixWidget: import("../parser-types").Parser<import("../..").WidgetOptions<"matrix", import("../general-purpose-parsers/object-types").OptionalizeProperties<{
2
- prefix: string | undefined;
3
- suffix: string | undefined;
2
+ prefix: string;
3
+ suffix: string;
4
4
  answers: number[][];
5
- cursorPosition: number[] | undefined;
6
5
  matrixBoardSize: number[];
7
- static: boolean | undefined;
8
6
  }>>>;
@@ -0,0 +1,3 @@
1
+ import type { MeasurerWidget, PerseusMeasurerWidgetOptions } from "../../data-schema";
2
+ export declare function generateMeasurerOptions(options?: Partial<PerseusMeasurerWidgetOptions>): PerseusMeasurerWidgetOptions;
3
+ export declare function generateMeasurerWidget(measurerWidgetProperties?: Partial<Omit<MeasurerWidget, "type">>): MeasurerWidget;
@@ -0,0 +1,3 @@
1
+ import type { PerseusPhetSimulationWidgetOptions, PhetSimulationWidget } from "../../data-schema";
2
+ export declare function generatePhetSimulationOptions(options?: Partial<PerseusPhetSimulationWidgetOptions>): PerseusPhetSimulationWidgetOptions;
3
+ export declare function generatePhetSimulationWidget(phetSimulationWidgetProperties?: Partial<Omit<PhetSimulationWidget, "type">>): PhetSimulationWidget;
@@ -493,22 +493,6 @@ export interface RubricRegistry {
493
493
  sorter: PerseusSorterRubric;
494
494
  table: PerseusTableRubric;
495
495
  }
496
- /**
497
- * A map of scoring data (previously referred to as "rubric"), keyed by
498
- * `widgetId`. This data is used to score a learner's guess for a PerseusItem.
499
- *
500
- * NOTE: The value in this map is intentionally a subset of WidgetOptions<T>.
501
- * By using the same shape (minus any unneeded render data), we are able to
502
- * share functionality that understands how to traverse maps of `widget id` to
503
- * `options`.
504
- */
505
- export type RubricMap = {
506
- [Property in keyof RubricRegistry as `${Property} ${number}`]: {
507
- type: Property;
508
- static?: boolean;
509
- options: RubricRegistry[Property];
510
- };
511
- };
512
496
  /** A union of all widget rubric types. */
513
497
  export type Rubric = RubricRegistry[keyof RubricRegistry];
514
498
  /**
@@ -1,6 +1,6 @@
1
1
  import type { MatrixPublicWidgetOptions } from "./matrix-util";
2
2
  import type { PerseusMatrixWidgetOptions } from "../../data-schema";
3
3
  import type { WidgetLogic } from "../logic-export.types";
4
- export type MatrixDefaultWidgetOptions = Pick<PerseusMatrixWidgetOptions, "matrixBoardSize" | "answers" | "prefix" | "suffix" | "cursorPosition">;
4
+ export type MatrixDefaultWidgetOptions = Pick<PerseusMatrixWidgetOptions, "matrixBoardSize" | "answers" | "prefix" | "suffix">;
5
5
  declare const matrixWidgetLogic: WidgetLogic<PerseusMatrixWidgetOptions, MatrixPublicWidgetOptions>;
6
6
  export default matrixWidgetLogic;
@@ -1,3 +1,3 @@
1
1
  import type { PerseusMatrixWidgetOptions } from "../../data-schema";
2
- export type MatrixPublicWidgetOptions = Pick<PerseusMatrixWidgetOptions, "prefix" | "suffix" | "cursorPosition" | "matrixBoardSize" | "static">;
2
+ export type MatrixPublicWidgetOptions = Pick<PerseusMatrixWidgetOptions, "prefix" | "suffix" | "matrixBoardSize">;
3
3
  export declare function getMatrixPublicWidgetOptions(options: PerseusMatrixWidgetOptions): MatrixPublicWidgetOptions;
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": "33.0.1",
6
+ "version": "34.0.1",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -37,7 +37,7 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "tiny-invariant": "1.3.1",
40
- "@khanacademy/kas": "2.2.3",
40
+ "@khanacademy/kas": "2.2.5",
41
41
  "@khanacademy/perseus-utils": "2.1.5",
42
42
  "@khanacademy/pure-markdown": "2.3.1"
43
43
  },