@khanacademy/perseus 66.3.0 → 66.4.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.
Files changed (30) hide show
  1. package/dist/es/index.css +1 -1
  2. package/dist/es/index.css.map +1 -1
  3. package/dist/es/index.js +19 -19
  4. package/dist/es/index.js.map +1 -1
  5. package/dist/index.css +1 -1
  6. package/dist/index.css.map +1 -1
  7. package/dist/index.js +19 -19
  8. package/dist/index.js.map +1 -1
  9. package/dist/widget-ai-utils/matrix/matrix-ai-utils.d.ts +1 -1
  10. package/dist/widgets/categorizer/categorizer.d.ts +2 -6
  11. package/dist/widgets/dropdown/dropdown.d.ts +10 -10
  12. package/dist/widgets/expression/expression.d.ts +14 -21
  13. package/dist/widgets/graded-group/graded-group.d.ts +1 -2
  14. package/dist/widgets/graded-group-set/graded-group-set.d.ts +1 -2
  15. package/dist/widgets/grapher/grapher.d.ts +2 -34
  16. package/dist/widgets/group/group.d.ts +1 -2
  17. package/dist/widgets/image/image.d.ts +1 -2
  18. package/dist/widgets/input-number/input-number.d.ts +1 -4
  19. package/dist/widgets/interactive-graphs/interactive-graph-question-builder.d.ts +7 -0
  20. package/dist/widgets/interactive-graphs/interactive-graph.d.ts +16 -1
  21. package/dist/widgets/interactive-graphs/mafs-graph.d.ts +1 -0
  22. package/dist/widgets/interactive-graphs/reducer/use-graph-config.d.ts +2 -1
  23. package/dist/widgets/interactive-graphs/stateful-mafs-graph.d.ts +1 -0
  24. package/dist/widgets/matrix/matrix.d.ts +1 -11
  25. package/dist/widgets/passage/passage.d.ts +1 -8
  26. package/dist/widgets/passage-ref/passage-ref.d.ts +0 -5
  27. package/dist/widgets/passage-ref-target/passage-ref-target.d.ts +0 -1
  28. package/dist/widgets/plotter/plotter.d.ts +0 -1
  29. package/dist/widgets/video/video.d.ts +1 -2
  30. package/package.json +7 -7
@@ -7,7 +7,7 @@ export type MatrixPromptJSON = {
7
7
  width: number;
8
8
  };
9
9
  userInput: {
10
- answerRows: ReadonlyArray<ReadonlyArray<number>>;
10
+ answerRows: ReadonlyArray<ReadonlyArray<string>>;
11
11
  };
12
12
  };
13
13
  export declare const getPromptJSON: (renderProps: React.ComponentProps<typeof matrix.widget>) => MatrixPromptJSON;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { PerseusI18nContext } from "../../components/i18n-context";
3
3
  import type { Widget, WidgetProps } from "../../types";
4
4
  import type { CategorizerPromptJSON } from "../../widget-ai-utils/categorizer/categorizer-ai-utils";
5
- import type { PerseusCategorizerWidgetOptions, PerseusCategorizerUserInput, CategorizerPublicWidgetOptions } from "@khanacademy/perseus-core";
5
+ import type { PerseusCategorizerWidgetOptions, PerseusCategorizerUserInput } from "@khanacademy/perseus-core";
6
6
  type Props = WidgetProps<RenderProps, PerseusCategorizerUserInput>;
7
7
  type DefaultProps = {
8
8
  items: Props["items"];
@@ -39,19 +39,15 @@ type RenderProps = {
39
39
  declare function getUserInputFromSerializedState(serializedState: any): PerseusCategorizerUserInput;
40
40
  /**
41
41
  * you need this along with _getAllWidgetsStartProps
42
- * to generate userInput for static widgets since staticTransform
43
- * used to populate correct input and now can't
42
+ * to generate userInput for static widgets
44
43
  */
45
44
  declare function getCorrectUserInput(options: PerseusCategorizerWidgetOptions): PerseusCategorizerUserInput;
46
45
  declare function getStartUserInput(): PerseusCategorizerUserInput;
47
- declare function transform(widgetOptions: CategorizerPublicWidgetOptions): RenderProps;
48
46
  declare const _default: {
49
47
  name: string;
50
48
  displayName: string;
51
49
  hidden: true;
52
50
  widget: typeof Categorizer;
53
- transform: typeof transform;
54
- staticTransform: typeof transform;
55
51
  getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
56
52
  getCorrectUserInput: typeof getCorrectUserInput;
57
53
  getStartUserInput: typeof getStartUserInput;
@@ -2,14 +2,8 @@ import * as React from "react";
2
2
  import { PerseusI18nContext } from "../../components/i18n-context";
3
3
  import type { Widget, WidgetProps } from "../../types";
4
4
  import type { DropdownPromptJSON } from "../../widget-ai-utils/dropdown/dropdown-ai-utils";
5
- import type { DropdownPublicWidgetOptions, PerseusDropdownWidgetOptions, PerseusDropdownUserInput } from "@khanacademy/perseus-core";
6
- type RenderProps = {
7
- placeholder: PerseusDropdownWidgetOptions["placeholder"];
8
- visibleLabel: PerseusDropdownWidgetOptions["visibleLabel"];
9
- ariaLabel: PerseusDropdownWidgetOptions["ariaLabel"];
10
- choices: ReadonlyArray<string>;
11
- };
12
- type Props = WidgetProps<RenderProps, PerseusDropdownUserInput>;
5
+ import type { PerseusDropdownWidgetOptions, PerseusDropdownUserInput } from "@khanacademy/perseus-core";
6
+ type Props = WidgetProps<PerseusDropdownWidgetOptions, PerseusDropdownUserInput>;
13
7
  type DefaultProps = {
14
8
  choices: Props["choices"];
15
9
  placeholder: Props["placeholder"];
@@ -29,9 +23,16 @@ declare class Dropdown extends React.Component<Props> implements Widget {
29
23
  * [LEMS-3185] do not trust serializedState/restoreSerializedState
30
24
  */
31
25
  getSerializedState(): any;
26
+ /**
27
+ * @deprecated and likely very broken API
28
+ * [LEMS-3185] do not trust serializedState/restoreSerializedState
29
+ */
30
+ restoreSerializedState(state: any): {
31
+ state: any;
32
+ choices: any;
33
+ };
32
34
  render(): React.ReactNode;
33
35
  }
34
- declare function transform(widgetOptions: DropdownPublicWidgetOptions): RenderProps;
35
36
  /**
36
37
  * @deprecated and likely a very broken API
37
38
  * [LEMS-3185] do not trust serializedState/restoreSerializedState
@@ -42,7 +43,6 @@ declare const _default: {
42
43
  name: string;
43
44
  displayName: string;
44
45
  widget: typeof Dropdown;
45
- transform: typeof transform;
46
46
  getStartUserInput: typeof getStartUserInput;
47
47
  getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
48
48
  };
@@ -3,18 +3,9 @@ import { PerseusI18nContext } from "../../components/i18n-context";
3
3
  import type { DependenciesContext } from "../../dependencies";
4
4
  import type { WidgetProps, Widget } from "../../types";
5
5
  import type { ExpressionPromptJSON } from "../../widget-ai-utils/expression/expression-ai-utils";
6
- import type { PerseusExpressionWidgetOptions, ExpressionPublicWidgetOptions, KeypadConfiguration, KeypadKey, PerseusExpressionRubric, PerseusExpressionUserInput } from "@khanacademy/perseus-core";
6
+ import type { PerseusExpressionWidgetOptions, KeypadConfiguration, KeypadKey, PerseusExpressionRubric, PerseusExpressionUserInput } from "@khanacademy/perseus-core";
7
7
  type InputPath = ReadonlyArray<string>;
8
- type RenderProps = {
9
- buttonSets: PerseusExpressionWidgetOptions["buttonSets"];
10
- buttonsVisible?: PerseusExpressionWidgetOptions["buttonsVisible"];
11
- functions: PerseusExpressionWidgetOptions["functions"];
12
- times: PerseusExpressionWidgetOptions["times"];
13
- visibleLabel: PerseusExpressionWidgetOptions["visibleLabel"];
14
- ariaLabel: PerseusExpressionWidgetOptions["ariaLabel"];
15
- keypadConfiguration: KeypadConfiguration;
16
- };
17
- type ExternalProps = WidgetProps<RenderProps, PerseusExpressionUserInput>;
8
+ type ExternalProps = WidgetProps<PerseusExpressionWidgetOptions, PerseusExpressionUserInput>;
18
9
  type Props = ExternalProps & Partial<React.ContextType<typeof DependenciesContext>> & {
19
10
  apiOptions: NonNullable<ExternalProps["apiOptions"]>;
20
11
  buttonSets: NonNullable<ExternalProps["buttonSets"]>;
@@ -55,19 +46,21 @@ export declare class Expression extends React.Component<Props> implements Widget
55
46
  blurInputPath(inputPath: InputPath): void;
56
47
  insert(keyPressed: KeypadKey): void;
57
48
  getInputPaths: () => ReadonlyArray<ReadonlyArray<any>>;
49
+ getKeypadConfiguration(): KeypadConfiguration;
58
50
  /**
59
51
  * @deprecated and likely very broken API
60
52
  * [LEMS-3185] do not trust serializedState/restoreSerializedState
61
53
  */
62
54
  getSerializedState(): {
63
55
  value: string;
64
- buttonSets: PerseusExpressionWidgetOptions["buttonSets"];
65
- buttonsVisible?: PerseusExpressionWidgetOptions["buttonsVisible"];
66
- functions: PerseusExpressionWidgetOptions["functions"];
67
- times: PerseusExpressionWidgetOptions["times"];
68
- visibleLabel: PerseusExpressionWidgetOptions["visibleLabel"];
69
- ariaLabel: PerseusExpressionWidgetOptions["ariaLabel"];
70
56
  keypadConfiguration: KeypadConfiguration;
57
+ buttonSets: import("@khanacademy/perseus-core").LegacyButtonSets;
58
+ functions: string[];
59
+ times: boolean;
60
+ extraKeys?: KeypadKey[];
61
+ visibleLabel: string;
62
+ ariaLabel: string;
63
+ buttonsVisible?: "always" | "never" | "focused";
71
64
  reviewModeRubric?: Empty | null | undefined;
72
65
  trackInteraction: (extraData?: Empty | undefined) => void;
73
66
  widgetId: string;
@@ -149,10 +142,11 @@ export declare class Expression extends React.Component<Props> implements Widget
149
142
  */
150
143
  declare function getUserInputFromSerializedState(serializedState: any): PerseusExpressionUserInput;
151
144
  declare function getStartUserInput(): PerseusExpressionUserInput;
145
+ declare function getOneCorrectAnswerFromRubric(rubric: PerseusExpressionRubric): string | null | undefined;
152
146
  declare const _default: {
153
147
  name: string;
154
148
  displayName: string;
155
- widget: React.ForwardRefExoticComponent<Omit<Pick<RenderProps & import("../../types").UniversalWidgetProps<Empty, string, Empty> & Partial<import("../..").PerseusDependenciesV2> & {
149
+ widget: React.ForwardRefExoticComponent<Omit<Pick<PerseusExpressionWidgetOptions & import("../../types").UniversalWidgetProps<Empty, string, Empty> & Partial<import("../..").PerseusDependenciesV2> & {
156
150
  apiOptions: NonNullable<ExternalProps["apiOptions"]>;
157
151
  buttonSets: NonNullable<ExternalProps["buttonSets"]>;
158
152
  functions: NonNullable<ExternalProps["functions"]>;
@@ -162,7 +156,7 @@ declare const _default: {
162
156
  times: NonNullable<ExternalProps["times"]>;
163
157
  visibleLabel: PerseusExpressionWidgetOptions["visibleLabel"];
164
158
  ariaLabel: PerseusExpressionWidgetOptions["ariaLabel"];
165
- }, "static" | "onChange" | "ariaLabel" | "buttonsVisible" | "trackInteraction" | "containerSizeClass" | "widgetId" | "problemNum" | "questionCompleted" | "findWidgets" | "keypadElement" | "isLastUsedWidget" | "handleUserInput" | "showSolutions" | "reviewMode" | "reviewModeRubric" | keyof import("../..").PerseusDependenciesV2 | "alignment" | "visibleLabel" | "keypadConfiguration"> & {
159
+ }, "static" | "onChange" | "ariaLabel" | "extraKeys" | "buttonsVisible" | "trackInteraction" | "containerSizeClass" | "widgetId" | "problemNum" | "questionCompleted" | "findWidgets" | "keypadElement" | "isLastUsedWidget" | "handleUserInput" | "showSolutions" | "reviewMode" | "reviewModeRubric" | keyof import("../..").PerseusDependenciesV2 | "alignment" | "visibleLabel" | "answerForms"> & {
166
160
  buttonSets?: import("@khanacademy/perseus-core").LegacyButtonSets | undefined;
167
161
  onFocus?: ((blurPath: import("../..").FocusPath) => void) | undefined;
168
162
  onBlur?: ((blurPath: import("../..").FocusPath) => void) | undefined;
@@ -219,10 +213,9 @@ declare const _default: {
219
213
  functions?: string[] | undefined;
220
214
  times?: boolean | undefined;
221
215
  } & {}, keyof import("../..").PerseusDependenciesV2> & React.RefAttributes<Expression>>;
222
- transform: (widgetOptions: PerseusExpressionWidgetOptions | ExpressionPublicWidgetOptions) => RenderProps;
223
216
  version: import("@khanacademy/perseus-core").Version | undefined;
224
217
  isLintable: true;
225
- getOneCorrectAnswerFromRubric(rubric: PerseusExpressionRubric): string | null | undefined;
218
+ getOneCorrectAnswerFromRubric: typeof getOneCorrectAnswerFromRubric;
226
219
  getStartUserInput: typeof getStartUserInput;
227
220
  getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
228
221
  };
@@ -11,8 +11,7 @@ declare const GRADING_STATUSES: {
11
11
  readonly incorrect: "incorrect";
12
12
  readonly invalid: "invalid";
13
13
  };
14
- type RenderProps = PerseusGradedGroupWidgetOptions;
15
- type Props = WidgetProps<RenderProps, Empty, TrackingGradedGroupExtraArguments> & {
14
+ type Props = WidgetProps<PerseusGradedGroupWidgetOptions, Empty, TrackingGradedGroupExtraArguments> & {
16
15
  inGradedGroupSet?: boolean;
17
16
  onNextQuestion?: () => unknown;
18
17
  };
@@ -3,8 +3,7 @@ import { GradedGroup } from "../graded-group/graded-group";
3
3
  import type { FocusPath, Widget, WidgetProps } from "../../types";
4
4
  import type { GradedGroupSetPromptJSON } from "../../widget-ai-utils/graded-group-set/graded-group-set-ai-utils";
5
5
  import type { PerseusGradedGroupSetWidgetOptions } from "@khanacademy/perseus-core";
6
- type RenderProps = PerseusGradedGroupSetWidgetOptions;
7
- type Props = WidgetProps<RenderProps> & {
6
+ type Props = WidgetProps<PerseusGradedGroupSetWidgetOptions> & {
8
7
  trackInteraction: () => void;
9
8
  };
10
9
  type DefaultProps = {
@@ -6,8 +6,7 @@ import type { GridDimensions } from "../../util";
6
6
  import type { GrapherPromptJSON } from "../../widget-ai-utils/grapher/grapher-ai-utils";
7
7
  import type { PerseusGrapherWidgetOptions, PerseusGrapherUserInput, GrapherPublicWidgetOptions } from "@khanacademy/perseus-core";
8
8
  import type { PropsFor } from "@khanacademy/wonder-blocks-core";
9
- type RenderProps = Pick<GrapherPublicWidgetOptions, "availableTypes" | "graph">;
10
- type Props = WidgetProps<RenderProps, PerseusGrapherUserInput>;
9
+ type Props = WidgetProps<PerseusGrapherWidgetOptions, PerseusGrapherUserInput>;
11
10
  declare class Grapher extends React.Component<Props> implements Widget {
12
11
  horizHairline: any;
13
12
  vertHairline: any;
@@ -28,6 +27,7 @@ declare class Grapher extends React.Component<Props> implements Widget {
28
27
  */
29
28
  getSerializedState(): {
30
29
  plot: import("@khanacademy/perseus-core").GrapherAnswerTypes;
30
+ availableTypes: Array<"absolute_value" | "exponential" | "linear" | "logarithm" | "quadratic" | "sinusoid" | "tangent">;
31
31
  graph: {
32
32
  backgroundImage: {
33
33
  bottom?: number;
@@ -52,7 +52,6 @@ declare class Grapher extends React.Component<Props> implements Widget {
52
52
  step: [number, number];
53
53
  valid?: boolean | string;
54
54
  };
55
- availableTypes: Array<"absolute_value" | "exponential" | "linear" | "logarithm" | "quadratic" | "sinusoid" | "tangent">;
56
55
  reviewModeRubric?: Empty | null | undefined;
57
56
  trackInteraction: (extraData?: Empty | undefined) => void;
58
57
  widgetId: string;
@@ -122,35 +121,6 @@ declare class Grapher extends React.Component<Props> implements Widget {
122
121
  };
123
122
  render(): React.ReactNode;
124
123
  }
125
- declare function transform(options: GrapherPublicWidgetOptions): RenderProps;
126
- declare function staticTransform(options: PerseusGrapherWidgetOptions): {
127
- availableTypes: ("linear" | "quadratic" | "sinusoid" | "tangent" | "exponential" | "logarithm" | "absolute_value")[];
128
- plot: import("@khanacademy/perseus-core").GrapherAnswerTypes;
129
- graph: {
130
- backgroundImage: {
131
- bottom?: number;
132
- height?: number;
133
- left?: number;
134
- scale?: number;
135
- url?: string | null | undefined;
136
- width?: number;
137
- };
138
- box?: [number, number];
139
- editableSettings?: Array<"graph" | "snap" | "image" | "measure">;
140
- gridStep?: [number, number];
141
- labels: [string, string];
142
- markings: import("@khanacademy/perseus-core").MarkingsType;
143
- range: import("@khanacademy/perseus-core").GraphRange;
144
- rulerLabel: "";
145
- rulerTicks: number;
146
- showProtractor?: boolean;
147
- showRuler?: boolean;
148
- showTooltips?: boolean;
149
- snapStep?: [number, number];
150
- step: [number, number];
151
- valid?: boolean | string;
152
- };
153
- };
154
124
  /**
155
125
  * @deprecated and likely a very broken API
156
126
  * [LEMS-3185] do not trust serializedState/restoreSerializedState
@@ -163,8 +133,6 @@ declare const _default: {
163
133
  displayName: string;
164
134
  hidden: true;
165
135
  widget: typeof Grapher;
166
- transform: typeof transform;
167
- staticTransform: typeof staticTransform;
168
136
  getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
169
137
  getStartUserInput: typeof getStartUserInput;
170
138
  getCorrectUserInput: typeof getCorrectUserInput;
@@ -12,8 +12,7 @@ import Renderer from "../../renderer";
12
12
  import type { ChangeFn, FocusPath, Widget, WidgetProps } from "../../types";
13
13
  import type { GroupPromptJSON } from "../../widget-ai-utils/group/group-ai-utils";
14
14
  import type { PerseusGroupUserInput, PerseusGroupWidgetOptions, PerseusRenderer } from "@khanacademy/perseus-core";
15
- type RenderProps = PerseusGroupWidgetOptions;
16
- type Props = WidgetProps<RenderProps, PerseusGroupUserInput>;
15
+ type Props = WidgetProps<PerseusGroupWidgetOptions, PerseusGroupUserInput>;
17
16
  type DefaultProps = {
18
17
  content: Props["content"];
19
18
  widgets: Props["widgets"];
@@ -3,8 +3,7 @@ import { PerseusI18nContext } from "../../components/i18n-context";
3
3
  import type { WidgetProps, Widget } from "../../types";
4
4
  import type { ImagePromptJSON } from "../../widget-ai-utils/image/image-ai-utils";
5
5
  import type { PerseusImageWidgetOptions } from "@khanacademy/perseus-core";
6
- type RenderProps = PerseusImageWidgetOptions;
7
- type ExternalProps = WidgetProps<RenderProps>;
6
+ type ExternalProps = WidgetProps<PerseusImageWidgetOptions>;
8
7
  type Props = ExternalProps & {
9
8
  alignment: NonNullable<ExternalProps["alignment"]>;
10
9
  title: NonNullable<ExternalProps["title"]>;
@@ -3,8 +3,7 @@ import { PerseusI18nContext } from "../../components/i18n-context";
3
3
  import type { Path, Widget, WidgetProps } from "../../types";
4
4
  import type { InputNumberPromptJSON } from "../../widget-ai-utils/input-number/input-number-ai-utils";
5
5
  import type { PerseusInputNumberWidgetOptions, PerseusInputNumberUserInput } from "@khanacademy/perseus-core";
6
- type RenderProps = Pick<PerseusInputNumberWidgetOptions, "simplify" | "size" | "answerType" | "rightAlign">;
7
- type ExternalProps = WidgetProps<RenderProps, PerseusInputNumberUserInput>;
6
+ type ExternalProps = WidgetProps<PerseusInputNumberWidgetOptions, PerseusInputNumberUserInput>;
8
7
  type Props = ExternalProps & {
9
8
  apiOptions: NonNullable<ExternalProps["apiOptions"]>;
10
9
  linterContext: NonNullable<ExternalProps["linterContext"]>;
@@ -34,7 +33,6 @@ declare class InputNumber extends React.Component<Props> implements Widget {
34
33
  getSerializedState(): any;
35
34
  render(): React.ReactNode;
36
35
  }
37
- declare function transform(widgetOptions: PerseusInputNumberWidgetOptions): RenderProps;
38
36
  declare function getOneCorrectAnswerFromRubric(rubric: any): string | undefined;
39
37
  /**
40
38
  * @deprecated and likely a very broken API
@@ -48,7 +46,6 @@ declare const _default: {
48
46
  hidden: true;
49
47
  widget: typeof InputNumber;
50
48
  isLintable: true;
51
- transform: typeof transform;
52
49
  getOneCorrectAnswerFromRubric: typeof getOneCorrectAnswerFromRubric;
53
50
  getStartUserInput: typeof getStartUserInput;
54
51
  getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
@@ -28,6 +28,7 @@ declare class InteractiveGraphQuestionBuilder {
28
28
  private markings;
29
29
  private xRange;
30
30
  private yRange;
31
+ private showAxisArrows;
31
32
  private snapStep;
32
33
  private tickStep;
33
34
  private showProtractor;
@@ -55,6 +56,12 @@ declare class InteractiveGraphQuestionBuilder {
55
56
  withMarkings(markings: MarkingsType): InteractiveGraphQuestionBuilder;
56
57
  withXRange(min: number, max: number): InteractiveGraphQuestionBuilder;
57
58
  withYRange(min: number, max: number): InteractiveGraphQuestionBuilder;
59
+ withShowAxisArrows({ xMin, xMax, yMin, yMax, }: {
60
+ xMin?: boolean;
61
+ xMax?: boolean;
62
+ yMin?: boolean;
63
+ yMax?: boolean;
64
+ }): InteractiveGraphQuestionBuilder;
58
65
  withSnapStep(x: number, y: number): InteractiveGraphQuestionBuilder;
59
66
  withTickStep(x: number, y: number): InteractiveGraphQuestionBuilder;
60
67
  withProtractor(): InteractiveGraphQuestionBuilder;
@@ -84,6 +84,15 @@ type RenderProps = {
84
84
  * NOTE(kevinb): perseus_data.go defines this as Array<Array<number>>
85
85
  */
86
86
  range: GraphRange;
87
+ /**
88
+ * Whether to show the arrows on the axis.
89
+ */
90
+ showAxisArrows: {
91
+ xMin: boolean;
92
+ xMax: boolean;
93
+ yMin: boolean;
94
+ yMax: boolean;
95
+ };
87
96
  /**
88
97
  * The type of graph
89
98
  */
@@ -112,6 +121,7 @@ type DefaultProps = {
112
121
  labels: string[];
113
122
  labelLocation: Props["labelLocation"];
114
123
  range: Props["range"];
124
+ showAxisArrows: Props["showAxisArrows"];
115
125
  step: Props["step"];
116
126
  backgroundImage: Props["backgroundImage"];
117
127
  markings: Props["markings"];
@@ -143,6 +153,12 @@ declare class InteractiveGraph extends React.Component<Props, State> {
143
153
  rulerLabel?: string;
144
154
  rulerTicks?: number;
145
155
  range: GraphRange;
156
+ showAxisArrows: {
157
+ xMin: boolean;
158
+ xMax: boolean;
159
+ yMin: boolean;
160
+ yMax: boolean;
161
+ };
146
162
  correct?: PerseusGraphType;
147
163
  lockedFigures: LockedFigure[];
148
164
  fullGraphAriaLabel?: string;
@@ -275,7 +291,6 @@ declare const _default: {
275
291
  name: string;
276
292
  displayName: string;
277
293
  widget: typeof InteractiveGraph;
278
- staticTransform: <T>(value: T) => T;
279
294
  getStartUserInput: typeof getStartUserInput;
280
295
  getCorrectUserInput: typeof getCorrectUserInput;
281
296
  getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
@@ -15,6 +15,7 @@ export type MafsGraphProps = {
15
15
  showProtractor: boolean;
16
16
  labels: ReadonlyArray<string>;
17
17
  labelLocation?: InteractiveGraphProps["labelLocation"];
18
+ showAxisArrows: InteractiveGraphProps["showAxisArrows"];
18
19
  fullGraphAriaLabel?: InteractiveGraphProps["fullGraphAriaLabel"];
19
20
  fullGraphAriaDescription?: InteractiveGraphProps["fullGraphAriaDescription"];
20
21
  state: InteractiveGraphState;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { AxisLabelLocation, MarkingsType } from "@khanacademy/perseus-core";
2
+ import type { AxisLabelLocation, ShowAxisArrows, MarkingsType } from "@khanacademy/perseus-core";
3
3
  import type { Interval, vec } from "mafs";
4
4
  export type GraphConfig = {
5
5
  range: [Interval, Interval];
@@ -15,6 +15,7 @@ export type GraphConfig = {
15
15
  labelLocation?: AxisLabelLocation;
16
16
  disableKeyboardInteraction?: boolean;
17
17
  interactiveColor?: string;
18
+ showAxisArrows: ShowAxisArrows;
18
19
  };
19
20
  export declare const GraphConfigContext: React.Context<GraphConfig>;
20
21
  export default function useGraphConfig(): GraphConfig;
@@ -25,6 +25,7 @@ export type StatefulMafsGraphProps = {
25
25
  fullGraphAriaDescription?: InteractiveGraphProps["fullGraphAriaDescription"];
26
26
  readOnly: boolean;
27
27
  static: InteractiveGraphProps["static"];
28
+ showAxisArrows: InteractiveGraphProps["showAxisArrows"];
28
29
  };
29
30
  export type StatefulMafsGraphType = {
30
31
  getUserInput: () => PerseusInteractiveGraphUserInput;
@@ -3,8 +3,7 @@ import { PerseusI18nContext } from "../../components/i18n-context";
3
3
  import type { FocusPath, Widget, WidgetProps } from "../../types";
4
4
  import type { MatrixPromptJSON } from "../../widget-ai-utils/matrix/matrix-ai-utils";
5
5
  import type { MatrixPublicWidgetOptions, PerseusMatrixUserInput, PerseusMatrixWidgetOptions } from "@khanacademy/perseus-core";
6
- type RenderProps = Pick<PerseusMatrixWidgetOptions, "matrixBoardSize" | "prefix" | "suffix">;
7
- type Props = WidgetProps<RenderProps, PerseusMatrixUserInput> & {
6
+ type Props = WidgetProps<MatrixPublicWidgetOptions, PerseusMatrixUserInput> & {
8
7
  cursorPosition: ReadonlyArray<number>;
9
8
  onChange: (nextProps: {
10
9
  cursorPosition?: ReadonlyArray<number>;
@@ -46,13 +45,6 @@ declare class Matrix extends React.Component<Props, State> implements Widget {
46
45
  getSerializedState(): any;
47
46
  render(): React.ReactNode;
48
47
  }
49
- /**
50
- * TODO: I don't really think we need this. The default for a transform
51
- * is an identity function and all this is doing is taking a selection from
52
- * widget options; it's probably fine to pass all widget options down.
53
- * @deprecated [LEMS-3199]
54
- */
55
- declare function transform(widgetOptions: MatrixPublicWidgetOptions): RenderProps;
56
48
  declare function getStartUserInput(): PerseusMatrixUserInput;
57
49
  declare function getCorrectUserInput(options: PerseusMatrixWidgetOptions): PerseusMatrixUserInput;
58
50
  /**
@@ -65,8 +57,6 @@ declare const _default: {
65
57
  displayName: string;
66
58
  hidden: true;
67
59
  widget: typeof Matrix;
68
- transform: typeof transform;
69
- staticTransform: typeof transform;
70
60
  isLintable: true;
71
61
  getStartUserInput: typeof getStartUserInput;
72
62
  getCorrectUserInput: typeof getCorrectUserInput;
@@ -12,14 +12,8 @@ export declare class LineHeightMeasurer extends React.Component<Record<any, any>
12
12
  measureLineHeight(): number;
13
13
  render(): React.ReactNode;
14
14
  }
15
- type RenderProps = {
16
- passageTitle: PerseusPassageWidgetOptions["passageTitle"];
17
- passageText: PerseusPassageWidgetOptions["passageText"];
18
- footnotes: PerseusPassageWidgetOptions["footnotes"];
19
- showLineNumbers: PerseusPassageWidgetOptions["showLineNumbers"];
20
- };
21
15
  type FindWidgetsCallback = (id: string, widgetInfo: PerseusWidget) => boolean;
22
- type PassageProps = ChangeableProps & WidgetProps<RenderProps> & {
16
+ type PassageProps = ChangeableProps & WidgetProps<PerseusPassageWidgetOptions> & {
23
17
  findWidgets: (arg1: FindWidgetsCallback) => ReadonlyArray<Passage>;
24
18
  highlights: SerializedHighlightSet;
25
19
  };
@@ -103,7 +97,6 @@ declare const _default: {
103
97
  displayName: string;
104
98
  hidden: true;
105
99
  widget: typeof Passage;
106
- transform: (editorProps: any) => RenderProps;
107
100
  isLintable: true;
108
101
  };
109
102
  export default _default;
@@ -41,11 +41,6 @@ declare const _default: {
41
41
  displayName: string;
42
42
  hidden: true;
43
43
  widget: typeof PassageRef;
44
- transform: (widgetOptions: PerseusPassageRefWidgetOptions) => {
45
- passageNumber: number;
46
- referenceNumber: number;
47
- summaryText: string | undefined;
48
- };
49
44
  version: import("@khanacademy/perseus-core").Version | undefined;
50
45
  };
51
46
  export default _default;
@@ -24,7 +24,6 @@ declare const _default: {
24
24
  displayName: string;
25
25
  widget: typeof PassageRefTarget;
26
26
  hidden: true;
27
- transform: (editorProps: any) => any;
28
27
  isLintable: true;
29
28
  };
30
29
  export default _default;
@@ -172,7 +172,6 @@ declare const _default: {
172
172
  hidden: true;
173
173
  widget: typeof Plotter;
174
174
  getCorrectUserInput: typeof getCorrectUserInput;
175
- staticTransform: <T>(value: T) => T;
176
175
  getStartUserInput: typeof getStartUserInput;
177
176
  getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
178
177
  };
@@ -6,8 +6,7 @@ import { PerseusI18nContext } from "../../components/i18n-context";
6
6
  import type { Widget, WidgetProps } from "../../types";
7
7
  import type { UnsupportedWidgetPromptJSON } from "../../widget-ai-utils/unsupported-widget";
8
8
  import type { PerseusVideoWidgetOptions } from "@khanacademy/perseus-core";
9
- type RenderProps = PerseusVideoWidgetOptions;
10
- type Props = WidgetProps<RenderProps> & {
9
+ type Props = WidgetProps<PerseusVideoWidgetOptions> & {
11
10
  alignment: string;
12
11
  };
13
12
  /**
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": "66.3.0",
6
+ "version": "66.4.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -42,12 +42,12 @@
42
42
  "tiny-invariant": "1.3.1",
43
43
  "uuid": "^10.0.0",
44
44
  "@khanacademy/kas": "2.1.0",
45
- "@khanacademy/keypad-context": "3.1.2",
46
- "@khanacademy/kmath": "2.1.2",
47
- "@khanacademy/math-input": "26.1.3",
48
- "@khanacademy/perseus-core": "18.5.0",
49
- "@khanacademy/perseus-linter": "4.2.2",
50
- "@khanacademy/perseus-score": "7.5.0",
45
+ "@khanacademy/keypad-context": "3.1.3",
46
+ "@khanacademy/kmath": "2.1.3",
47
+ "@khanacademy/math-input": "26.1.4",
48
+ "@khanacademy/perseus-core": "18.6.0",
49
+ "@khanacademy/perseus-linter": "4.2.3",
50
+ "@khanacademy/perseus-score": "7.6.0",
51
51
  "@khanacademy/perseus-utils": "2.1.0",
52
52
  "@khanacademy/pure-markdown": "2.2.0",
53
53
  "@khanacademy/simple-markdown": "2.1.0"