@khanacademy/perseus 84.0.1 → 84.1.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 (48) hide show
  1. package/dist/components/drag-and-drop/choice-bank.d.ts +16 -0
  2. package/dist/components/zoomable.d.ts +34 -4
  3. package/dist/es/index.css +4 -4
  4. package/dist/es/index.css.map +1 -1
  5. package/dist/es/index.js +63 -63
  6. package/dist/es/index.js.map +1 -1
  7. package/dist/index.css +4 -4
  8. package/dist/index.css.map +1 -1
  9. package/dist/index.d.ts +0 -1
  10. package/dist/index.js +63 -63
  11. package/dist/index.js.map +1 -1
  12. package/dist/renderer.new.d.ts +2 -2
  13. package/dist/renderer.old.d.ts +2 -2
  14. package/dist/server-item-renderer.d.ts +21 -11
  15. package/dist/types.d.ts +7 -9
  16. package/dist/widget-ai-utils/matcher/matcher-ai-utils.d.ts +1 -1
  17. package/dist/widget-ai-utils/prompt-types.d.ts +1 -2
  18. package/dist/widget-container.new.d.ts +1 -8
  19. package/dist/widget-container.old.d.ts +1 -8
  20. package/dist/widgets/blank/blank.d.ts +3 -58
  21. package/dist/widgets/categorizer/categorizer.d.ts +4 -61
  22. package/dist/widgets/cs-program/cs-program.d.ts +3 -58
  23. package/dist/widgets/dropdown/dropdown.d.ts +2 -58
  24. package/dist/widgets/expression/expression.d.ts +4 -124
  25. package/dist/widgets/iframe/iframe.d.ts +0 -2
  26. package/dist/widgets/image/components/common-image-props.d.ts +11 -0
  27. package/dist/widgets/image/components/explore-image-modal-content.d.ts +4 -4
  28. package/dist/widgets/image/components/explore-image-modal.d.ts +2 -4
  29. package/dist/widgets/image/components/image-info-area.d.ts +3 -23
  30. package/dist/widgets/image/image.d.ts +3 -58
  31. package/dist/widgets/input-number/input-number.d.ts +3 -2
  32. package/dist/widgets/interaction/interaction.d.ts +0 -5
  33. package/dist/widgets/interactive-graphs/graphs/polygon.d.ts +3 -2
  34. package/dist/widgets/interactive-graphs/graphs/strings/polygon.d.ts +3 -2
  35. package/dist/widgets/interactive-graphs/interactive-graph.d.ts +20 -20
  36. package/dist/widgets/interactive-graphs/mafs-graph.d.ts +11 -10
  37. package/dist/widgets/interactive-graphs/stateful-mafs-graph.d.ts +12 -12
  38. package/dist/widgets/label-image/label-image.d.ts +2 -61
  39. package/dist/widgets/matcher/matcher.d.ts +2 -58
  40. package/dist/widgets/measurer/measurer.d.ts +1 -1
  41. package/dist/widgets/mock-widgets/mock-widget.d.ts +3 -3
  42. package/dist/widgets/number-line/number-line.d.ts +3 -59
  43. package/dist/widgets/numeric-input/numeric-input.d.ts +3 -119
  44. package/dist/widgets/phet-simulation/phet-simulation.d.ts +1 -1
  45. package/dist/widgets/python-program/python-program.d.ts +7 -8
  46. package/dist/widgets/table/table.d.ts +2 -58
  47. package/package.json +9 -9
  48. package/dist/widget-ai-utils/input-number/input-number-ai-utils.d.ts +0 -29
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import type { SortableOption } from "../../components/sortable";
3
- import type { Widget, PerseusDependenciesV2 } from "../../types";
3
+ import type { WidgetProps, Widget, PerseusDependenciesV2 } from "../../types";
4
4
  import type { PerseusMatcherWidgetOptions, PerseusMatcherUserInput, MatcherPublicWidgetOptions } from "@khanacademy/perseus-core";
5
5
  /**
6
6
  * The imperative API the Matcher widget exposes to its parent renderer. On top
@@ -21,63 +21,7 @@ declare const _default: {
21
21
  name: string;
22
22
  displayName: string;
23
23
  hidden: true;
24
- widget: React.ForwardRefExoticComponent<Omit<Omit<PerseusMatcherWidgetOptions & {
25
- trackInteraction: (extraData?: Empty | undefined) => void;
26
- widgetId: string;
27
- widgetIndex: number;
28
- alignment: string | null | undefined;
29
- static: boolean | null | undefined;
30
- graded?: boolean | null;
31
- problemNum: number | null | undefined;
32
- apiOptions: Readonly<Readonly<{
33
- isArticle?: boolean;
34
- onFocusChange?: (newFocusPath: import("../..").FocusPath, oldFocusPath: import("../..").FocusPath, keypadHeight?: number, focusedElement?: HTMLElement) => unknown;
35
- showAlignmentOptions?: boolean;
36
- readOnly?: boolean;
37
- editingDisabled?: boolean;
38
- answerableCallback?: (arg1: boolean) => unknown;
39
- getAnotherHint?: () => unknown;
40
- interactionCallback?: (widgetData: {
41
- [widgetId: string]: any;
42
- }) => void;
43
- imagePlaceholder?: React.ReactNode;
44
- widgetPlaceholder?: React.ReactNode;
45
- baseElements?: {
46
- Link: React.ComponentType<any>;
47
- };
48
- trackInteraction?: (args: {
49
- type: string;
50
- id: string;
51
- correct?: boolean;
52
- } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
53
- visible: number;
54
- }>) => void;
55
- customKeypad?: boolean;
56
- isMobile?: boolean;
57
- isMobileApp?: boolean;
58
- hintProgressColor?: string;
59
- flags?: Record<"perseus-renderer-upgrade" | "desmos-calculator", boolean>;
60
- }> & {
61
- baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
62
- isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
63
- isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
64
- isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
65
- editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
66
- onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
67
- readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
68
- showAlignmentOptions: NonNullable<import("../..").APIOptions["showAlignmentOptions"]>;
69
- }>;
70
- keypadElement?: any;
71
- onFocus: (blurPath: import("../..").FocusPath) => void;
72
- onBlur: (blurPath: import("../..").FocusPath) => void;
73
- findWidgets: import("../../types").FindWidgetsFunction;
74
- reviewMode: boolean;
75
- showSolutions?: import("@khanacademy/perseus-core").ShowSolutions;
76
- handleUserInput: (newUserInput: PerseusMatcherUserInput, cb?: () => void, silent?: boolean) => void;
77
- userInput: PerseusMatcherUserInput;
78
- linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
79
- containerSizeClass: import("../../util/sizing-utils").SizeClass;
80
- } & {
24
+ widget: React.ForwardRefExoticComponent<Omit<Omit<WidgetProps<PerseusMatcherWidgetOptions, PerseusMatcherUserInput> & {
81
25
  dependencies: PerseusDependenciesV2;
82
26
  } & React.RefAttributes<MatcherHandle>, "dependencies">, "ref"> & React.RefAttributes<any>>;
83
27
  isLintable: true;
@@ -8,7 +8,7 @@ declare class Measurer extends React.Component<Props> implements Widget {
8
8
  ruler: any;
9
9
  protractor: any;
10
10
  componentDidMount(): void;
11
- componentDidUpdate(prevProps: any): void;
11
+ componentDidUpdate(prevProps: Props): void;
12
12
  setupGraphie(): void;
13
13
  getPromptJSON(): UnsupportedWidgetPromptJSON;
14
14
  render(): React.JSX.Element;
@@ -31,12 +31,11 @@ declare class MockWidgetComponent extends React.Component<Props> implements Widg
31
31
  */
32
32
  getSerializedState(): {
33
33
  currentValue: string;
34
- static: boolean;
35
- value: string;
36
34
  trackInteraction: (extraData?: Empty | undefined) => void;
37
35
  widgetId: string;
38
36
  widgetIndex: number;
39
- alignment: string | null | undefined;
37
+ alignment: import("@khanacademy/perseus-core").Alignment | null | undefined;
38
+ static: boolean | null | undefined;
40
39
  graded?: boolean | null;
41
40
  problemNum: number | null | undefined;
42
41
  apiOptions: Readonly<Readonly<{
@@ -86,6 +85,7 @@ declare class MockWidgetComponent extends React.Component<Props> implements Widg
86
85
  handleUserInput: (newUserInput: PerseusMockWidgetUserInput, cb?: () => void, silent?: boolean) => void;
87
86
  linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
88
87
  containerSizeClass: import("../../util/sizing-utils").SizeClass;
88
+ value: string;
89
89
  };
90
90
  render(): React.ReactNode;
91
91
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import type { Widget, PerseusDependenciesV2 } from "../../types";
3
- import type { PerseusNumberLineUserInput, PerseusNumberLineWidgetOptions, NumberLinePublicWidgetOptions } from "@khanacademy/perseus-core";
2
+ import type { PerseusDependenciesV2, Widget, WidgetProps } from "../../types";
3
+ import type { NumberLinePublicWidgetOptions, PerseusNumberLineUserInput, PerseusNumberLineWidgetOptions } from "@khanacademy/perseus-core";
4
4
  /**
5
5
  * @deprecated and likely a very broken API
6
6
  * [LEMS-3185] do not trust serializedState
@@ -11,63 +11,7 @@ declare function getStartUserInput(options: NumberLinePublicWidgetOptions): Pers
11
11
  declare const _default: {
12
12
  name: string;
13
13
  displayName: string;
14
- widget: React.ForwardRefExoticComponent<Omit<Omit<PerseusNumberLineWidgetOptions & {
15
- trackInteraction: (extraData?: Empty | undefined) => void;
16
- widgetId: string;
17
- widgetIndex: number;
18
- alignment: string | null | undefined;
19
- static: boolean | null | undefined;
20
- graded?: boolean | null;
21
- problemNum: number | null | undefined;
22
- apiOptions: Readonly<Readonly<{
23
- isArticle?: boolean;
24
- onFocusChange?: (newFocusPath: import("../..").FocusPath, oldFocusPath: import("../..").FocusPath, keypadHeight?: number, focusedElement?: HTMLElement) => unknown;
25
- showAlignmentOptions?: boolean;
26
- readOnly?: boolean;
27
- editingDisabled?: boolean;
28
- answerableCallback?: (arg1: boolean) => unknown;
29
- getAnotherHint?: () => unknown;
30
- interactionCallback?: (widgetData: {
31
- [widgetId: string]: any;
32
- }) => void;
33
- imagePlaceholder?: React.ReactNode;
34
- widgetPlaceholder?: React.ReactNode;
35
- baseElements?: {
36
- Link: React.ComponentType<any>;
37
- };
38
- trackInteraction?: (args: {
39
- type: string;
40
- id: string;
41
- correct?: boolean;
42
- } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
43
- visible: number;
44
- }>) => void;
45
- customKeypad?: boolean;
46
- isMobile?: boolean;
47
- isMobileApp?: boolean;
48
- hintProgressColor?: string;
49
- flags?: Record<"perseus-renderer-upgrade" | "desmos-calculator", boolean>;
50
- }> & {
51
- baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
52
- isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
53
- isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
54
- isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
55
- editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
56
- onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
57
- readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
58
- showAlignmentOptions: NonNullable<import("../..").APIOptions["showAlignmentOptions"]>;
59
- }>;
60
- keypadElement?: any;
61
- onFocus: (blurPath: import("../..").FocusPath) => void;
62
- onBlur: (blurPath: import("../..").FocusPath) => void;
63
- findWidgets: import("../../types").FindWidgetsFunction;
64
- reviewMode: boolean;
65
- showSolutions?: import("@khanacademy/perseus-core").ShowSolutions;
66
- handleUserInput: (newUserInput: PerseusNumberLineUserInput, cb?: () => void, silent?: boolean) => void;
67
- userInput: PerseusNumberLineUserInput;
68
- linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
69
- containerSizeClass: import("../../util/sizing-utils").SizeClass;
70
- } & {
14
+ widget: React.ForwardRefExoticComponent<Omit<Omit<WidgetProps<PerseusNumberLineWidgetOptions, PerseusNumberLineUserInput> & {
71
15
  dependencies: PerseusDependenciesV2;
72
16
  } & React.RefAttributes<Widget>, "dependencies">, "ref"> & React.RefAttributes<any>>;
73
17
  getCorrectUserInput: typeof getCorrectUserInput;
@@ -1,128 +1,12 @@
1
1
  import * as React from "react";
2
2
  import { getCorrectUserInput, getOneCorrectAnswerFromRubric, getStartUserInput, getUserInputFromSerializedState } from "./utils";
3
- import type { Widget } from "../../types";
3
+ import type { Widget, WidgetProps } from "../../types";
4
4
  import type { PerseusNumericInputUserInput, PerseusNumericInputWidgetOptions } from "@khanacademy/perseus-core";
5
- /**
6
- * The NumericInput widget is a numeric input field that supports a variety of
7
- * answer forms, including integers, decimals, fractions, and mixed numbers.
8
- */
9
- export declare const NumericInput: React.ForwardRefExoticComponent<PerseusNumericInputWidgetOptions & {
10
- trackInteraction: (extraData?: Empty | undefined) => void;
11
- widgetId: string;
12
- widgetIndex: number;
13
- alignment: string | null | undefined;
14
- static: boolean | null | undefined;
15
- graded?: boolean | null;
16
- problemNum: number | null | undefined;
17
- apiOptions: Readonly<Readonly<{
18
- isArticle?: boolean;
19
- onFocusChange?: (newFocusPath: import("../..").FocusPath, oldFocusPath: import("../..").FocusPath, keypadHeight?: number, focusedElement?: HTMLElement) => unknown;
20
- showAlignmentOptions?: boolean;
21
- readOnly?: boolean;
22
- editingDisabled?: boolean;
23
- answerableCallback?: (arg1: boolean) => unknown;
24
- getAnotherHint?: () => unknown;
25
- interactionCallback?: (widgetData: {
26
- [widgetId: string]: any;
27
- }) => void;
28
- imagePlaceholder?: React.ReactNode;
29
- widgetPlaceholder?: React.ReactNode;
30
- baseElements?: {
31
- Link: React.ComponentType<any>;
32
- };
33
- trackInteraction?: (args: {
34
- type: string;
35
- id: string;
36
- correct?: boolean;
37
- } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
38
- visible: number;
39
- }>) => void;
40
- customKeypad?: boolean;
41
- isMobile?: boolean;
42
- isMobileApp?: boolean;
43
- hintProgressColor?: string;
44
- flags?: Record<"perseus-renderer-upgrade" | "desmos-calculator", boolean>;
45
- }> & {
46
- baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
47
- isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
48
- isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
49
- isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
50
- editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
51
- onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
52
- readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
53
- showAlignmentOptions: NonNullable<import("../..").APIOptions["showAlignmentOptions"]>;
54
- }>;
55
- keypadElement?: any;
56
- onFocus: (blurPath: import("../..").FocusPath) => void;
57
- onBlur: (blurPath: import("../..").FocusPath) => void;
58
- findWidgets: import("../../types").FindWidgetsFunction;
59
- reviewMode: boolean;
60
- showSolutions?: import("@khanacademy/perseus-core").ShowSolutions;
61
- handleUserInput: (newUserInput: PerseusNumericInputUserInput, cb?: () => void, silent?: boolean) => void;
62
- userInput: PerseusNumericInputUserInput;
63
- linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
64
- containerSizeClass: import("../../util/sizing-utils").SizeClass;
65
- } & React.RefAttributes<Widget>>;
5
+ type Props = WidgetProps<PerseusNumericInputWidgetOptions, PerseusNumericInputUserInput>;
66
6
  declare const _default: {
67
7
  name: string;
68
8
  displayName: string;
69
- widget: React.ForwardRefExoticComponent<PerseusNumericInputWidgetOptions & {
70
- trackInteraction: (extraData?: Empty | undefined) => void;
71
- widgetId: string;
72
- widgetIndex: number;
73
- alignment: string | null | undefined;
74
- static: boolean | null | undefined;
75
- graded?: boolean | null;
76
- problemNum: number | null | undefined;
77
- apiOptions: Readonly<Readonly<{
78
- isArticle?: boolean;
79
- onFocusChange?: (newFocusPath: import("../..").FocusPath, oldFocusPath: import("../..").FocusPath, keypadHeight?: number, focusedElement?: HTMLElement) => unknown;
80
- showAlignmentOptions?: boolean;
81
- readOnly?: boolean;
82
- editingDisabled?: boolean;
83
- answerableCallback?: (arg1: boolean) => unknown;
84
- getAnotherHint?: () => unknown;
85
- interactionCallback?: (widgetData: {
86
- [widgetId: string]: any;
87
- }) => void;
88
- imagePlaceholder?: React.ReactNode;
89
- widgetPlaceholder?: React.ReactNode;
90
- baseElements?: {
91
- Link: React.ComponentType<any>;
92
- };
93
- trackInteraction?: (args: {
94
- type: string;
95
- id: string;
96
- correct?: boolean;
97
- } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
98
- visible: number;
99
- }>) => void;
100
- customKeypad?: boolean;
101
- isMobile?: boolean;
102
- isMobileApp?: boolean;
103
- hintProgressColor?: string;
104
- flags?: Record<"perseus-renderer-upgrade" | "desmos-calculator", boolean>;
105
- }> & {
106
- baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
107
- isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
108
- isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
109
- isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
110
- editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
111
- onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
112
- readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
113
- showAlignmentOptions: NonNullable<import("../..").APIOptions["showAlignmentOptions"]>;
114
- }>;
115
- keypadElement?: any;
116
- onFocus: (blurPath: import("../..").FocusPath) => void;
117
- onBlur: (blurPath: import("../..").FocusPath) => void;
118
- findWidgets: import("../../types").FindWidgetsFunction;
119
- reviewMode: boolean;
120
- showSolutions?: import("@khanacademy/perseus-core").ShowSolutions;
121
- handleUserInput: (newUserInput: PerseusNumericInputUserInput, cb?: () => void, silent?: boolean) => void;
122
- userInput: PerseusNumericInputUserInput;
123
- linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
124
- containerSizeClass: import("../../util/sizing-utils").SizeClass;
125
- } & React.RefAttributes<Widget>>;
9
+ widget: React.ForwardRefExoticComponent<Props & React.RefAttributes<Widget>>;
126
10
  isLintable: true;
127
11
  getCorrectUserInput: typeof getCorrectUserInput;
128
12
  getOneCorrectAnswerFromRubric: typeof getOneCorrectAnswerFromRubric;
@@ -23,7 +23,7 @@ export declare class PhetSimulation extends React.Component<Props, State> implem
23
23
  isWidget: true;
24
24
  state: State;
25
25
  componentDidMount(): Promise<void>;
26
- componentDidUpdate(prevProps: any): Promise<void>;
26
+ componentDidUpdate(prevProps: Props): Promise<void>;
27
27
  private getLocale;
28
28
  getPromptJSON(): UnsupportedWidgetPromptJSON;
29
29
  displayLoadFailure: () => void;
@@ -1,13 +1,12 @@
1
- import * as React from "react";
2
- import { type PerseusDependenciesV2 } from "../../types";
3
- type Props = {
4
- programID: string;
5
- height: number;
6
- dependencies: PerseusDependenciesV2;
7
- };
1
+ import React from "react";
2
+ import type { PerseusDependenciesV2, Widget, WidgetProps } from "../../types";
3
+ import type { PerseusPythonProgramWidgetOptions } from "@khanacademy/perseus-core";
4
+ type WidgetHandle = Pick<Widget, "getPromptJSON">;
8
5
  declare const _default: {
9
6
  name: string;
10
7
  displayName: string;
11
- widget: React.ForwardRefExoticComponent<Omit<Props, "dependencies"> & React.RefAttributes<any>>;
8
+ widget: React.ForwardRefExoticComponent<Omit<Omit<WidgetProps<PerseusPythonProgramWidgetOptions> & {
9
+ dependencies: PerseusDependenciesV2;
10
+ } & React.RefAttributes<WidgetHandle>, "dependencies">, "ref"> & React.RefAttributes<any>>;
12
11
  };
13
12
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { FocusPath, Widget } from "../../types";
2
+ import type { Widget, WidgetProps } from "../../types";
3
3
  import type { PerseusTableWidgetOptions, PerseusTableUserInput } from "@khanacademy/perseus-core";
4
4
  type EditorProps = {
5
5
  editableHeaders?: boolean;
@@ -16,63 +16,7 @@ declare function getUserInputFromSerializedState(serializedState: any): PerseusT
16
16
  declare const _default: {
17
17
  name: string;
18
18
  displayName: string;
19
- widget: React.ForwardRefExoticComponent<PerseusTableWidgetOptions & {
20
- trackInteraction: (extraData?: Empty | undefined) => void;
21
- widgetId: string;
22
- widgetIndex: number;
23
- alignment: string | null | undefined;
24
- static: boolean | null | undefined;
25
- graded?: boolean | null;
26
- problemNum: number | null | undefined;
27
- apiOptions: Readonly<Readonly<{
28
- isArticle?: boolean;
29
- onFocusChange?: (newFocusPath: FocusPath, oldFocusPath: FocusPath, keypadHeight?: number, focusedElement?: HTMLElement) => unknown;
30
- showAlignmentOptions?: boolean;
31
- readOnly?: boolean;
32
- editingDisabled?: boolean;
33
- answerableCallback?: (arg1: boolean) => unknown;
34
- getAnotherHint?: () => unknown;
35
- interactionCallback?: (widgetData: {
36
- [widgetId: string]: any;
37
- }) => void;
38
- imagePlaceholder?: React.ReactNode;
39
- widgetPlaceholder?: React.ReactNode;
40
- baseElements?: {
41
- Link: React.ComponentType<any>;
42
- };
43
- trackInteraction?: (args: {
44
- type: string;
45
- id: string;
46
- correct?: boolean;
47
- } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
48
- visible: number;
49
- }>) => void;
50
- customKeypad?: boolean;
51
- isMobile?: boolean;
52
- isMobileApp?: boolean;
53
- hintProgressColor?: string;
54
- flags?: Record<"perseus-renderer-upgrade" | "desmos-calculator", boolean>;
55
- }> & {
56
- baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
57
- isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
58
- isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
59
- isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
60
- editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
61
- onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
62
- readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
63
- showAlignmentOptions: NonNullable<import("../..").APIOptions["showAlignmentOptions"]>;
64
- }>;
65
- keypadElement?: any;
66
- onFocus: (blurPath: FocusPath) => void;
67
- onBlur: (blurPath: FocusPath) => void;
68
- findWidgets: import("../../types").FindWidgetsFunction;
69
- reviewMode: boolean;
70
- showSolutions?: import("@khanacademy/perseus-core").ShowSolutions;
71
- handleUserInput: (newUserInput: PerseusTableUserInput, cb?: () => void, silent?: boolean) => void;
72
- userInput: PerseusTableUserInput;
73
- linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
74
- containerSizeClass: import("../../util/sizing-utils").SizeClass;
75
- } & EditorProps & React.RefAttributes<Widget>>;
19
+ widget: React.ForwardRefExoticComponent<WidgetProps<PerseusTableWidgetOptions, PerseusTableUserInput> & EditorProps & React.RefAttributes<Widget>>;
76
20
  hidden: true;
77
21
  isLintable: true;
78
22
  getStartUserInput: typeof getStartUserInput;
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": "84.0.1",
6
+ "version": "84.1.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -44,15 +44,15 @@
44
44
  "tiny-invariant": "1.3.1",
45
45
  "uuid": "^10.0.0",
46
46
  "@khanacademy/kas": "2.2.6",
47
- "@khanacademy/kmath": "2.4.41",
48
- "@khanacademy/keypad-context": "3.2.82",
49
- "@khanacademy/math-input": "27.0.2",
50
- "@khanacademy/perseus-core": "35.0.0",
51
- "@khanacademy/perseus-linter": "5.1.22",
47
+ "@khanacademy/keypad-context": "3.2.83",
48
+ "@khanacademy/kmath": "2.4.42",
49
+ "@khanacademy/math-input": "27.0.3",
50
+ "@khanacademy/perseus-core": "36.0.0",
51
+ "@khanacademy/perseus-linter": "5.1.23",
52
+ "@khanacademy/perseus-score": "8.12.15",
53
+ "@khanacademy/perseus-utils": "2.1.5",
52
54
  "@khanacademy/pure-markdown": "2.3.2",
53
- "@khanacademy/perseus-score": "8.12.14",
54
- "@khanacademy/simple-markdown": "3.0.1",
55
- "@khanacademy/perseus-utils": "2.1.5"
55
+ "@khanacademy/simple-markdown": "3.0.1"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@khanacademy/wonder-blocks-announcer": "1.1.1",
@@ -1,29 +0,0 @@
1
- import type inputNumber from "../../widgets/input-number/input-number";
2
- import type React from "react";
3
- /**
4
- * JSON describing an InputNumber widget. Intended for consumption by AI tools.
5
- * An InputNumber displays a text field where users can enter numbers in a
6
- * variety of formats: decimals, integers, fractions, mixed numbers,
7
- * percentages, and multiples of pi. The allowed formats are configurable by
8
- * the content creator.
9
- */
10
- export type InputNumberPromptJSON = {
11
- type: "input-number";
12
- /**
13
- * Accessible label for the input field, set by the content creator.
14
- * Shown to learners using screen readers to describe what value should
15
- * be entered.
16
- */
17
- label?: string;
18
- /**
19
- * The current state of the widget user interface. Usually represents a
20
- * learner's attempt to answer a question.
21
- */
22
- userInput: {
23
- /**
24
- * The text currently entered in the input field by the learner.
25
- */
26
- value: string;
27
- };
28
- };
29
- export declare const getPromptJSON: (widgetData: React.ComponentProps<typeof inputNumber.widget>) => InputNumberPromptJSON;