@khanacademy/perseus 31.1.0 → 32.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.
Files changed (88) hide show
  1. package/dist/components/input-with-examples.d.ts +1 -1
  2. package/dist/components/number-input.d.ts +1 -1
  3. package/dist/components/range-input.d.ts +1 -1
  4. package/dist/components/sortable.d.ts +5 -5
  5. package/dist/components/text-input.d.ts +1 -1
  6. package/dist/components/text-list-editor.d.ts +1 -1
  7. package/dist/es/index.js +570 -562
  8. package/dist/es/index.js.map +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.js +1370 -1370
  11. package/dist/index.js.map +1 -1
  12. package/dist/perseus-types.d.ts +1 -10
  13. package/dist/util.d.ts +0 -1
  14. package/dist/widget-container.d.ts +1 -1
  15. package/dist/widgets/__shared__/test-keypad-context-wrapper.d.ts +6 -0
  16. package/dist/widgets/{categorizer.d.ts → categorizer/categorizer.d.ts} +14 -14
  17. package/dist/widgets/categorizer/index.d.ts +1 -0
  18. package/dist/widgets/{cs-program.d.ts → cs-program/cs-program.d.ts} +7 -7
  19. package/dist/widgets/cs-program/index.d.ts +1 -0
  20. package/dist/widgets/{definition.d.ts → definition/definition.d.ts} +11 -11
  21. package/dist/widgets/definition/index.d.ts +1 -0
  22. package/dist/widgets/{dropdown.d.ts → dropdown/dropdown.d.ts} +9 -9
  23. package/dist/widgets/dropdown/index.d.ts +1 -0
  24. package/dist/widgets/{explanation.d.ts → explanation/explanation.d.ts} +14 -14
  25. package/dist/widgets/explanation/index.d.ts +1 -0
  26. package/dist/widgets/{expression.d.ts → expression/expression.d.ts} +66 -66
  27. package/dist/widgets/expression/index.d.ts +1 -0
  28. package/dist/widgets/{graded-group-answer-bar.d.ts → graded-group/graded-group-answer-bar.d.ts} +3 -3
  29. package/dist/widgets/{graded-group.d.ts → graded-group/graded-group.d.ts} +11 -11
  30. package/dist/widgets/graded-group/index.d.ts +1 -0
  31. package/dist/widgets/{graded-group-set.d.ts → graded-group-set/graded-group-set.d.ts} +11 -11
  32. package/dist/widgets/graded-group-set/index.d.ts +1 -0
  33. package/dist/widgets/{grapher.d.ts → grapher/grapher.d.ts} +15 -15
  34. package/dist/widgets/grapher/index.d.ts +1 -0
  35. package/dist/widgets/{group.d.ts → group/group.d.ts} +12 -12
  36. package/dist/widgets/group/index.d.ts +1 -0
  37. package/dist/widgets/{iframe.d.ts → iframe/iframe.d.ts} +10 -10
  38. package/dist/widgets/iframe/index.d.ts +1 -0
  39. package/dist/widgets/{image.d.ts → image/image.d.ts} +12 -12
  40. package/dist/widgets/image/index.d.ts +1 -0
  41. package/dist/widgets/input-number/index.d.ts +1 -0
  42. package/dist/widgets/{input-number.d.ts → input-number/input-number.d.ts} +19 -19
  43. package/dist/widgets/interaction/index.d.ts +1 -0
  44. package/dist/widgets/{interaction.d.ts → interaction/interaction.d.ts} +12 -12
  45. package/dist/widgets/interactive-graph.d.ts +0 -2
  46. package/dist/widgets/interactive-graphs/reducer/interactive-graph-action.d.ts +22 -1
  47. package/dist/widgets/interactive-graphs/types.d.ts +1 -0
  48. package/dist/widgets/label-image/index.d.ts +1 -0
  49. package/dist/widgets/{label-image.d.ts → label-image/label-image.d.ts} +24 -24
  50. package/dist/widgets/matcher/index.d.ts +1 -0
  51. package/dist/widgets/{matcher.d.ts → matcher/matcher.d.ts} +11 -11
  52. package/dist/widgets/matrix/index.d.ts +1 -0
  53. package/dist/widgets/{matrix.d.ts → matrix/matrix.d.ts} +12 -12
  54. package/dist/widgets/measurer/index.d.ts +1 -0
  55. package/dist/widgets/measurer/measurer.d.ts +21 -0
  56. package/dist/widgets/molecule/index.d.ts +1 -0
  57. package/dist/widgets/{molecule.d.ts → molecule/molecule.d.ts} +10 -10
  58. package/dist/widgets/number-line/index.d.ts +1 -0
  59. package/dist/widgets/{number-line.d.ts → number-line/number-line.d.ts} +11 -11
  60. package/dist/widgets/numeric-input/index.d.ts +1 -0
  61. package/dist/widgets/{numeric-input.d.ts → numeric-input/numeric-input.d.ts} +13 -13
  62. package/dist/widgets/orderer/index.d.ts +1 -0
  63. package/dist/widgets/{orderer.d.ts → orderer/orderer.d.ts} +10 -10
  64. package/dist/widgets/passage/index.d.ts +2 -0
  65. package/dist/widgets/{passage.d.ts → passage/passage.d.ts} +15 -15
  66. package/dist/widgets/passage-ref/index.d.ts +1 -0
  67. package/dist/widgets/{passage-ref.d.ts → passage-ref/passage-ref.d.ts} +16 -16
  68. package/dist/widgets/passage-ref-target/index.d.ts +1 -0
  69. package/dist/widgets/{passage-ref-target.d.ts → passage-ref-target/passage-ref-target.d.ts} +12 -12
  70. package/dist/widgets/phet-simulation/index.d.ts +1 -0
  71. package/dist/widgets/{phet-simulation.d.ts → phet-simulation/phet-simulation.d.ts} +11 -13
  72. package/dist/widgets/plotter/index.d.ts +1 -0
  73. package/dist/widgets/{plotter.d.ts → plotter/plotter.d.ts} +11 -11
  74. package/dist/widgets/python-program/index.d.ts +1 -0
  75. package/dist/widgets/{python-program.d.ts → python-program/python-program.d.ts} +7 -7
  76. package/dist/widgets/radio/index.d.ts +2 -0
  77. package/dist/widgets/radio/radio-component.d.ts +66 -0
  78. package/dist/widgets/radio/radio.d.ts +22 -66
  79. package/dist/widgets/sorter/index.d.ts +1 -0
  80. package/dist/widgets/{sorter.d.ts → sorter/sorter.d.ts} +8 -8
  81. package/dist/widgets/table/index.d.ts +1 -0
  82. package/dist/widgets/{table.d.ts → table/table.d.ts} +10 -10
  83. package/dist/widgets/video/index.d.ts +1 -0
  84. package/dist/widgets/{video.d.ts → video/video.d.ts} +11 -11
  85. package/package.json +1 -1
  86. package/dist/widgets/measurer.d.ts +0 -21
  87. package/dist/widgets/radio.d.ts +0 -22
  88. /package/dist/widgets/{video-transcript-link.d.ts → video/video-transcript-link.d.ts} +0 -0
@@ -1,9 +1,9 @@
1
1
  import * as React from "react";
2
- import { PerseusI18nContext } from "../components/i18n-context";
3
- import type { DependenciesContext } from "../dependencies";
4
- import type { PerseusExpressionWidgetOptions } from "../perseus-types";
5
- import type { PerseusStrings } from "../strings";
6
- import type { PerseusScore, WidgetProps } from "../types";
2
+ import { PerseusI18nContext } from "../../components/i18n-context";
3
+ import type { DependenciesContext } from "../../dependencies";
4
+ import type { PerseusExpressionWidgetOptions } from "../../perseus-types";
5
+ import type { PerseusStrings } from "../../strings";
6
+ import type { PerseusScore, WidgetProps } from "../../types";
7
7
  import type { Keys as Key, KeypadConfiguration } from "@khanacademy/math-input";
8
8
  type InputPath = ReadonlyArray<string>;
9
9
  type Rubric = PerseusExpressionWidgetOptions;
@@ -108,7 +108,7 @@ declare const _default: Readonly<{
108
108
  apiOptions: Readonly<Readonly<{
109
109
  isArticle?: boolean | undefined;
110
110
  onInputError?: ((widgetId: any, value: string, message?: string | null | undefined) => unknown) | undefined;
111
- onFocusChange?: ((newFocusPath: import("../types").FocusPath, oldFocusPath: import("../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
111
+ onFocusChange?: ((newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
112
112
  GroupMetadataEditor?: React.ComponentType<any> | undefined;
113
113
  showAlignmentOptions?: boolean | undefined;
114
114
  readOnly?: boolean | undefined;
@@ -123,12 +123,12 @@ declare const _default: Readonly<{
123
123
  baseElements?: {
124
124
  Link: React.ComponentType<any>;
125
125
  } | undefined;
126
- imagePreloader?: ((dimensions: import("../types").Dimensions) => React.ReactNode) | undefined;
126
+ imagePreloader?: ((dimensions: import("../../types").Dimensions) => React.ReactNode) | undefined;
127
127
  trackInteraction?: ((args: {
128
128
  type: string;
129
129
  id: string;
130
130
  correct?: boolean | undefined;
131
- } & Partial<import("../types").TrackingGradedGroupExtraArguments> & Partial<import("../types").TrackingSequenceExtraArguments>) => void) | undefined;
131
+ } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<import("../../types").TrackingSequenceExtraArguments>) => void) | undefined;
132
132
  customKeypad?: boolean | undefined;
133
133
  nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
134
134
  isMobile?: boolean | undefined;
@@ -161,7 +161,7 @@ declare const _default: Readonly<{
161
161
  "start-coords-ui-angle"?: boolean | undefined;
162
162
  }) | undefined;
163
163
  } | undefined;
164
- onWidgetStartProps?: ((widgets: import("../perseus-types").PerseusWidgetsMap) => void) | undefined;
164
+ onWidgetStartProps?: ((widgets: import("../../perseus-types").PerseusWidgetsMap) => void) | undefined;
165
165
  }> & {
166
166
  GroupMetadataEditor: NonNullable<React.ComponentType<any> | undefined>;
167
167
  baseElements: {
@@ -173,7 +173,7 @@ declare const _default: Readonly<{
173
173
  groupAnnotator: (groupNumber: number, widgetId: string) => React.ReactNode;
174
174
  isArticle: NonNullable<boolean | undefined>;
175
175
  isMobile: NonNullable<boolean | undefined>;
176
- onFocusChange: (newFocusPath: import("../types").FocusPath, oldFocusPath: import("../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
176
+ onFocusChange: (newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
177
177
  onInputError: (widgetId: any, value: string, message?: string | null | undefined) => unknown;
178
178
  readOnly: NonNullable<boolean | undefined>;
179
179
  setDrawingAreaAvailable: (arg1: boolean) => unknown;
@@ -181,20 +181,20 @@ declare const _default: Readonly<{
181
181
  }>;
182
182
  keypadElement?: any;
183
183
  questionCompleted?: boolean | undefined;
184
- onFocus: (blurPath: import("../types").FocusPath) => void;
185
- onBlur: (blurPath: import("../types").FocusPath) => void;
186
- findWidgets: (arg1: import("../types").FilterCriterion) => readonly any[];
184
+ onFocus: (blurPath: import("../../types").FocusPath) => void;
185
+ onBlur: (blurPath: import("../../types").FocusPath) => void;
186
+ findWidgets: (arg1: import("../../types").FilterCriterion) => readonly any[];
187
187
  reviewModeRubric: PerseusExpressionWidgetOptions;
188
- onChange: import("../types").ChangeHandler;
188
+ onChange: import("../../types").ChangeHandler;
189
189
  trackInteraction: (extraData?: Empty | undefined) => void;
190
190
  isLastUsedWidget: boolean;
191
191
  linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
192
- containerSizeClass: import("../util/sizing-utils").SizeClass;
193
- } & Partial<import("../types").PerseusDependenciesV2> & {
192
+ containerSizeClass: import("../../util/sizing-utils").SizeClass;
193
+ } & Partial<import("../../types").PerseusDependenciesV2> & {
194
194
  apiOptions: Readonly<Readonly<{
195
195
  isArticle?: boolean | undefined;
196
196
  onInputError?: ((widgetId: any, value: string, message?: string | null | undefined) => unknown) | undefined;
197
- onFocusChange?: ((newFocusPath: import("../types").FocusPath, oldFocusPath: import("../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
197
+ onFocusChange?: ((newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
198
198
  GroupMetadataEditor?: React.ComponentType<any> | undefined;
199
199
  showAlignmentOptions?: boolean | undefined;
200
200
  readOnly?: boolean | undefined;
@@ -209,12 +209,12 @@ declare const _default: Readonly<{
209
209
  baseElements?: {
210
210
  Link: React.ComponentType<any>;
211
211
  } | undefined;
212
- imagePreloader?: ((dimensions: import("../types").Dimensions) => React.ReactNode) | undefined;
212
+ imagePreloader?: ((dimensions: import("../../types").Dimensions) => React.ReactNode) | undefined;
213
213
  trackInteraction?: ((args: {
214
214
  type: string;
215
215
  id: string;
216
216
  correct?: boolean | undefined;
217
- } & Partial<import("../types").TrackingGradedGroupExtraArguments> & Partial<import("../types").TrackingSequenceExtraArguments>) => void) | undefined;
217
+ } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<import("../../types").TrackingSequenceExtraArguments>) => void) | undefined;
218
218
  customKeypad?: boolean | undefined;
219
219
  nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
220
220
  isMobile?: boolean | undefined;
@@ -247,7 +247,7 @@ declare const _default: Readonly<{
247
247
  "start-coords-ui-angle"?: boolean | undefined;
248
248
  }) | undefined;
249
249
  } | undefined;
250
- onWidgetStartProps?: ((widgets: import("../perseus-types").PerseusWidgetsMap) => void) | undefined;
250
+ onWidgetStartProps?: ((widgets: import("../../perseus-types").PerseusWidgetsMap) => void) | undefined;
251
251
  }> & {
252
252
  GroupMetadataEditor: NonNullable<React.ComponentType<any> | undefined>;
253
253
  baseElements: {
@@ -259,17 +259,17 @@ declare const _default: Readonly<{
259
259
  groupAnnotator: (groupNumber: number, widgetId: string) => React.ReactNode;
260
260
  isArticle: NonNullable<boolean | undefined>;
261
261
  isMobile: NonNullable<boolean | undefined>;
262
- onFocusChange: (newFocusPath: import("../types").FocusPath, oldFocusPath: import("../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
262
+ onFocusChange: (newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
263
263
  onInputError: (widgetId: any, value: string, message?: string | null | undefined) => unknown;
264
264
  readOnly: NonNullable<boolean | undefined>;
265
265
  setDrawingAreaAvailable: (arg1: boolean) => unknown;
266
266
  showAlignmentOptions: NonNullable<boolean | undefined>;
267
267
  }>;
268
- buttonSets: import("../perseus-types").LegacyButtonSets;
268
+ buttonSets: import("../../perseus-types").LegacyButtonSets;
269
269
  functions: readonly string[];
270
270
  linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
271
- onBlur: (blurPath: import("../types").FocusPath) => void;
272
- onFocus: (blurPath: import("../types").FocusPath) => void;
271
+ onBlur: (blurPath: import("../../types").FocusPath) => void;
272
+ onFocus: (blurPath: import("../../types").FocusPath) => void;
273
273
  times: boolean;
274
274
  visibleLabel: string | undefined;
275
275
  ariaLabel: string | undefined;
@@ -280,7 +280,7 @@ declare const _default: Readonly<{
280
280
  apiOptions?: Readonly<Readonly<{
281
281
  isArticle?: boolean | undefined;
282
282
  onInputError?: ((widgetId: any, value: string, message?: string | null | undefined) => unknown) | undefined;
283
- onFocusChange?: ((newFocusPath: import("../types").FocusPath, oldFocusPath: import("../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
283
+ onFocusChange?: ((newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
284
284
  GroupMetadataEditor?: React.ComponentType<any> | undefined;
285
285
  showAlignmentOptions?: boolean | undefined;
286
286
  readOnly?: boolean | undefined;
@@ -295,12 +295,12 @@ declare const _default: Readonly<{
295
295
  baseElements?: {
296
296
  Link: React.ComponentType<any>;
297
297
  } | undefined;
298
- imagePreloader?: ((dimensions: import("../types").Dimensions) => React.ReactNode) | undefined;
298
+ imagePreloader?: ((dimensions: import("../../types").Dimensions) => React.ReactNode) | undefined;
299
299
  trackInteraction?: ((args: {
300
300
  type: string;
301
301
  id: string;
302
302
  correct?: boolean | undefined;
303
- } & Partial<import("../types").TrackingGradedGroupExtraArguments> & Partial<import("../types").TrackingSequenceExtraArguments>) => void) | undefined;
303
+ } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<import("../../types").TrackingSequenceExtraArguments>) => void) | undefined;
304
304
  customKeypad?: boolean | undefined;
305
305
  nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
306
306
  isMobile?: boolean | undefined;
@@ -333,7 +333,7 @@ declare const _default: Readonly<{
333
333
  "start-coords-ui-angle"?: boolean | undefined;
334
334
  }) | undefined;
335
335
  } | undefined;
336
- onWidgetStartProps?: ((widgets: import("../perseus-types").PerseusWidgetsMap) => void) | undefined;
336
+ onWidgetStartProps?: ((widgets: import("../../perseus-types").PerseusWidgetsMap) => void) | undefined;
337
337
  }> & {
338
338
  GroupMetadataEditor: NonNullable<React.ComponentType<any> | undefined>;
339
339
  baseElements: {
@@ -345,15 +345,15 @@ declare const _default: Readonly<{
345
345
  groupAnnotator: (groupNumber: number, widgetId: string) => React.ReactNode;
346
346
  isArticle: NonNullable<boolean | undefined>;
347
347
  isMobile: NonNullable<boolean | undefined>;
348
- onFocusChange: (newFocusPath: import("../types").FocusPath, oldFocusPath: import("../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
348
+ onFocusChange: (newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
349
349
  onInputError: (widgetId: any, value: string, message?: string | null | undefined) => unknown;
350
350
  readOnly: NonNullable<boolean | undefined>;
351
351
  setDrawingAreaAvailable: (arg1: boolean) => unknown;
352
352
  showAlignmentOptions: NonNullable<boolean | undefined>;
353
353
  }> | undefined;
354
- buttonSets?: import("../perseus-types").LegacyButtonSets | undefined;
355
- onFocus?: ((blurPath: import("../types").FocusPath) => void) | undefined;
356
- onBlur?: ((blurPath: import("../types").FocusPath) => void) | undefined;
354
+ buttonSets?: import("../../perseus-types").LegacyButtonSets | undefined;
355
+ onFocus?: ((blurPath: import("../../types").FocusPath) => void) | undefined;
356
+ onBlur?: ((blurPath: import("../../types").FocusPath) => void) | undefined;
357
357
  functions?: readonly string[] | undefined;
358
358
  times?: boolean | undefined;
359
359
  } & {}, "analytics"> & React.RefAttributes<Expression>>) | undefined;
@@ -365,7 +365,7 @@ declare const _default: Readonly<{
365
365
  apiOptions: Readonly<Readonly<{
366
366
  isArticle?: boolean | undefined;
367
367
  onInputError?: ((widgetId: any, value: string, message?: string | null | undefined) => unknown) | undefined;
368
- onFocusChange?: ((newFocusPath: import("../types").FocusPath, oldFocusPath: import("../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
368
+ onFocusChange?: ((newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
369
369
  GroupMetadataEditor?: React.ComponentType<any> | undefined;
370
370
  showAlignmentOptions?: boolean | undefined;
371
371
  readOnly?: boolean | undefined;
@@ -380,12 +380,12 @@ declare const _default: Readonly<{
380
380
  baseElements?: {
381
381
  Link: React.ComponentType<any>;
382
382
  } | undefined;
383
- imagePreloader?: ((dimensions: import("../types").Dimensions) => React.ReactNode) | undefined;
383
+ imagePreloader?: ((dimensions: import("../../types").Dimensions) => React.ReactNode) | undefined;
384
384
  trackInteraction?: ((args: {
385
385
  type: string;
386
386
  id: string;
387
387
  correct?: boolean | undefined;
388
- } & Partial<import("../types").TrackingGradedGroupExtraArguments> & Partial<import("../types").TrackingSequenceExtraArguments>) => void) | undefined;
388
+ } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<import("../../types").TrackingSequenceExtraArguments>) => void) | undefined;
389
389
  customKeypad?: boolean | undefined;
390
390
  nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
391
391
  isMobile?: boolean | undefined;
@@ -418,7 +418,7 @@ declare const _default: Readonly<{
418
418
  "start-coords-ui-angle"?: boolean | undefined;
419
419
  }) | undefined;
420
420
  } | undefined;
421
- onWidgetStartProps?: ((widgets: import("../perseus-types").PerseusWidgetsMap) => void) | undefined;
421
+ onWidgetStartProps?: ((widgets: import("../../perseus-types").PerseusWidgetsMap) => void) | undefined;
422
422
  }> & {
423
423
  GroupMetadataEditor: NonNullable<React.ComponentType<any> | undefined>;
424
424
  baseElements: {
@@ -430,7 +430,7 @@ declare const _default: Readonly<{
430
430
  groupAnnotator: (groupNumber: number, widgetId: string) => React.ReactNode;
431
431
  isArticle: NonNullable<boolean | undefined>;
432
432
  isMobile: NonNullable<boolean | undefined>;
433
- onFocusChange: (newFocusPath: import("../types").FocusPath, oldFocusPath: import("../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
433
+ onFocusChange: (newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
434
434
  onInputError: (widgetId: any, value: string, message?: string | null | undefined) => unknown;
435
435
  readOnly: NonNullable<boolean | undefined>;
436
436
  setDrawingAreaAvailable: (arg1: boolean) => unknown;
@@ -438,20 +438,20 @@ declare const _default: Readonly<{
438
438
  }>;
439
439
  keypadElement?: any;
440
440
  questionCompleted?: boolean | undefined;
441
- onFocus: (blurPath: import("../types").FocusPath) => void;
442
- onBlur: (blurPath: import("../types").FocusPath) => void;
443
- findWidgets: (arg1: import("../types").FilterCriterion) => readonly any[];
441
+ onFocus: (blurPath: import("../../types").FocusPath) => void;
442
+ onBlur: (blurPath: import("../../types").FocusPath) => void;
443
+ findWidgets: (arg1: import("../../types").FilterCriterion) => readonly any[];
444
444
  reviewModeRubric: PerseusExpressionWidgetOptions;
445
- onChange: import("../types").ChangeHandler;
445
+ onChange: import("../../types").ChangeHandler;
446
446
  trackInteraction: (extraData?: Empty | undefined) => void;
447
447
  isLastUsedWidget: boolean;
448
448
  linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
449
- containerSizeClass: import("../util/sizing-utils").SizeClass;
450
- } & Partial<import("../types").PerseusDependenciesV2> & {
449
+ containerSizeClass: import("../../util/sizing-utils").SizeClass;
450
+ } & Partial<import("../../types").PerseusDependenciesV2> & {
451
451
  apiOptions: Readonly<Readonly<{
452
452
  isArticle?: boolean | undefined;
453
453
  onInputError?: ((widgetId: any, value: string, message?: string | null | undefined) => unknown) | undefined;
454
- onFocusChange?: ((newFocusPath: import("../types").FocusPath, oldFocusPath: import("../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
454
+ onFocusChange?: ((newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
455
455
  GroupMetadataEditor?: React.ComponentType<any> | undefined;
456
456
  showAlignmentOptions?: boolean | undefined;
457
457
  readOnly?: boolean | undefined;
@@ -466,12 +466,12 @@ declare const _default: Readonly<{
466
466
  baseElements?: {
467
467
  Link: React.ComponentType<any>;
468
468
  } | undefined;
469
- imagePreloader?: ((dimensions: import("../types").Dimensions) => React.ReactNode) | undefined;
469
+ imagePreloader?: ((dimensions: import("../../types").Dimensions) => React.ReactNode) | undefined;
470
470
  trackInteraction?: ((args: {
471
471
  type: string;
472
472
  id: string;
473
473
  correct?: boolean | undefined;
474
- } & Partial<import("../types").TrackingGradedGroupExtraArguments> & Partial<import("../types").TrackingSequenceExtraArguments>) => void) | undefined;
474
+ } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<import("../../types").TrackingSequenceExtraArguments>) => void) | undefined;
475
475
  customKeypad?: boolean | undefined;
476
476
  nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
477
477
  isMobile?: boolean | undefined;
@@ -504,7 +504,7 @@ declare const _default: Readonly<{
504
504
  "start-coords-ui-angle"?: boolean | undefined;
505
505
  }) | undefined;
506
506
  } | undefined;
507
- onWidgetStartProps?: ((widgets: import("../perseus-types").PerseusWidgetsMap) => void) | undefined;
507
+ onWidgetStartProps?: ((widgets: import("../../perseus-types").PerseusWidgetsMap) => void) | undefined;
508
508
  }> & {
509
509
  GroupMetadataEditor: NonNullable<React.ComponentType<any> | undefined>;
510
510
  baseElements: {
@@ -516,17 +516,17 @@ declare const _default: Readonly<{
516
516
  groupAnnotator: (groupNumber: number, widgetId: string) => React.ReactNode;
517
517
  isArticle: NonNullable<boolean | undefined>;
518
518
  isMobile: NonNullable<boolean | undefined>;
519
- onFocusChange: (newFocusPath: import("../types").FocusPath, oldFocusPath: import("../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
519
+ onFocusChange: (newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
520
520
  onInputError: (widgetId: any, value: string, message?: string | null | undefined) => unknown;
521
521
  readOnly: NonNullable<boolean | undefined>;
522
522
  setDrawingAreaAvailable: (arg1: boolean) => unknown;
523
523
  showAlignmentOptions: NonNullable<boolean | undefined>;
524
524
  }>;
525
- buttonSets: import("../perseus-types").LegacyButtonSets;
525
+ buttonSets: import("../../perseus-types").LegacyButtonSets;
526
526
  functions: readonly string[];
527
527
  linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
528
- onBlur: (blurPath: import("../types").FocusPath) => void;
529
- onFocus: (blurPath: import("../types").FocusPath) => void;
528
+ onBlur: (blurPath: import("../../types").FocusPath) => void;
529
+ onFocus: (blurPath: import("../../types").FocusPath) => void;
530
530
  times: boolean;
531
531
  visibleLabel: string | undefined;
532
532
  ariaLabel: string | undefined;
@@ -537,7 +537,7 @@ declare const _default: Readonly<{
537
537
  apiOptions?: Readonly<Readonly<{
538
538
  isArticle?: boolean | undefined;
539
539
  onInputError?: ((widgetId: any, value: string, message?: string | null | undefined) => unknown) | undefined;
540
- onFocusChange?: ((newFocusPath: import("../types").FocusPath, oldFocusPath: import("../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
540
+ onFocusChange?: ((newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
541
541
  GroupMetadataEditor?: React.ComponentType<any> | undefined;
542
542
  showAlignmentOptions?: boolean | undefined;
543
543
  readOnly?: boolean | undefined;
@@ -552,12 +552,12 @@ declare const _default: Readonly<{
552
552
  baseElements?: {
553
553
  Link: React.ComponentType<any>;
554
554
  } | undefined;
555
- imagePreloader?: ((dimensions: import("../types").Dimensions) => React.ReactNode) | undefined;
555
+ imagePreloader?: ((dimensions: import("../../types").Dimensions) => React.ReactNode) | undefined;
556
556
  trackInteraction?: ((args: {
557
557
  type: string;
558
558
  id: string;
559
559
  correct?: boolean | undefined;
560
- } & Partial<import("../types").TrackingGradedGroupExtraArguments> & Partial<import("../types").TrackingSequenceExtraArguments>) => void) | undefined;
560
+ } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<import("../../types").TrackingSequenceExtraArguments>) => void) | undefined;
561
561
  customKeypad?: boolean | undefined;
562
562
  nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
563
563
  isMobile?: boolean | undefined;
@@ -590,7 +590,7 @@ declare const _default: Readonly<{
590
590
  "start-coords-ui-angle"?: boolean | undefined;
591
591
  }) | undefined;
592
592
  } | undefined;
593
- onWidgetStartProps?: ((widgets: import("../perseus-types").PerseusWidgetsMap) => void) | undefined;
593
+ onWidgetStartProps?: ((widgets: import("../../perseus-types").PerseusWidgetsMap) => void) | undefined;
594
594
  }> & {
595
595
  GroupMetadataEditor: NonNullable<React.ComponentType<any> | undefined>;
596
596
  baseElements: {
@@ -602,29 +602,29 @@ declare const _default: Readonly<{
602
602
  groupAnnotator: (groupNumber: number, widgetId: string) => React.ReactNode;
603
603
  isArticle: NonNullable<boolean | undefined>;
604
604
  isMobile: NonNullable<boolean | undefined>;
605
- onFocusChange: (newFocusPath: import("../types").FocusPath, oldFocusPath: import("../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
605
+ onFocusChange: (newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
606
606
  onInputError: (widgetId: any, value: string, message?: string | null | undefined) => unknown;
607
607
  readOnly: NonNullable<boolean | undefined>;
608
608
  setDrawingAreaAvailable: (arg1: boolean) => unknown;
609
609
  showAlignmentOptions: NonNullable<boolean | undefined>;
610
610
  }> | undefined;
611
- buttonSets?: import("../perseus-types").LegacyButtonSets | undefined;
612
- onFocus?: ((blurPath: import("../types").FocusPath) => void) | undefined;
613
- onBlur?: ((blurPath: import("../types").FocusPath) => void) | undefined;
611
+ buttonSets?: import("../../perseus-types").LegacyButtonSets | undefined;
612
+ onFocus?: ((blurPath: import("../../types").FocusPath) => void) | undefined;
613
+ onBlur?: ((blurPath: import("../../types").FocusPath) => void) | undefined;
614
614
  functions?: readonly string[] | undefined;
615
615
  times?: boolean | undefined;
616
616
  } & {}, "analytics"> & React.RefAttributes<Expression>>;
617
617
  accessible?: boolean | ((props: any) => boolean) | undefined;
618
618
  hidden?: boolean | undefined;
619
- version?: import("../types").Version | undefined;
620
- supportedAlignments?: readonly import("../types").Alignment[] | undefined;
621
- defaultAlignment?: import("../types").Alignment | undefined;
622
- getDefaultAlignment?: (() => import("../types").Alignment) | undefined;
619
+ version?: import("../../types").Version | undefined;
620
+ supportedAlignments?: readonly import("../../types").Alignment[] | undefined;
621
+ defaultAlignment?: import("../../types").Alignment | undefined;
622
+ getDefaultAlignment?: (() => import("../../types").Alignment) | undefined;
623
623
  isLintable?: boolean | undefined;
624
- tracking?: import("../types").Tracking | undefined;
624
+ tracking?: import("../../types").Tracking | undefined;
625
625
  traverseChildWidgets?: any;
626
- transform?: import("../types").WidgetTransform | undefined;
627
- staticTransform?: import("../types").WidgetTransform | undefined;
626
+ transform?: import("../../types").WidgetTransform | undefined;
627
+ staticTransform?: import("../../types").WidgetTransform | undefined;
628
628
  propUpgrades?: {
629
629
  [key: string]: (arg1: any) => any;
630
630
  } | undefined;
@@ -0,0 +1 @@
1
+ export { default, Expression } from "./expression";
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import { PerseusI18nContext } from "../components/i18n-context";
3
- import type { APIOptions } from "../types";
2
+ import { PerseusI18nContext } from "../../components/i18n-context";
3
+ import type { APIOptions } from "../../types";
4
4
  export type ANSWER_BAR_STATES = "HIDDEN" | "ACTIVE" | "INACTIVE" | "INCORRECT" | "CORRECT";
5
5
  type Props = {
6
6
  answerBarState: ANSWER_BAR_STATES;
@@ -10,7 +10,7 @@ type Props = {
10
10
  };
11
11
  declare class GradedGroupAnswerBar extends React.Component<Props> {
12
12
  static contextType: React.Context<{
13
- strings: import("../strings").PerseusStrings;
13
+ strings: import("../../strings").PerseusStrings;
14
14
  locale: string;
15
15
  }>;
16
16
  context: React.ContextType<typeof PerseusI18nContext>;
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
- import { PerseusI18nContext } from "../components/i18n-context";
2
+ import { PerseusI18nContext } from "../../components/i18n-context";
3
3
  import type { ANSWER_BAR_STATES } from "./graded-group-answer-bar";
4
- import type { PerseusGradedGroupWidgetOptions } from "../perseus-types";
5
- import type { TrackingGradedGroupExtraArguments, WidgetProps } from "../types";
4
+ import type { PerseusGradedGroupWidgetOptions } from "../../perseus-types";
5
+ import type { TrackingGradedGroupExtraArguments, WidgetProps } from "../../types";
6
6
  declare const GRADING_STATUSES: {
7
7
  readonly ungraded: "ungraded";
8
8
  readonly correct: "correct";
@@ -32,7 +32,7 @@ type State = {
32
32
  };
33
33
  export declare class GradedGroup extends React.Component<Props, State> {
34
34
  static contextType: React.Context<{
35
- strings: import("../strings").PerseusStrings;
35
+ strings: import("../../strings").PerseusStrings;
36
36
  locale: string;
37
37
  }>;
38
38
  context: React.ContextType<typeof PerseusI18nContext>;
@@ -56,15 +56,15 @@ declare const _default: Readonly<{
56
56
  widget: typeof GradedGroup;
57
57
  accessible?: boolean | ((props: any) => boolean) | undefined;
58
58
  hidden?: boolean | undefined;
59
- version?: import("../types").Version | undefined;
60
- supportedAlignments?: readonly import("../types").Alignment[] | undefined;
61
- defaultAlignment?: import("../types").Alignment | undefined;
62
- getDefaultAlignment?: (() => import("../types").Alignment) | undefined;
59
+ version?: import("../../types").Version | undefined;
60
+ supportedAlignments?: readonly import("../../types").Alignment[] | undefined;
61
+ defaultAlignment?: import("../../types").Alignment | undefined;
62
+ getDefaultAlignment?: (() => import("../../types").Alignment) | undefined;
63
63
  isLintable?: boolean | undefined;
64
- tracking?: import("../types").Tracking | undefined;
64
+ tracking?: import("../../types").Tracking | undefined;
65
65
  traverseChildWidgets?: any;
66
- transform?: import("../types").WidgetTransform | undefined;
67
- staticTransform?: import("../types").WidgetTransform | undefined;
66
+ transform?: import("../../types").WidgetTransform | undefined;
67
+ staticTransform?: import("../../types").WidgetTransform | undefined;
68
68
  propUpgrades?: {
69
69
  [key: string]: (arg1: any) => any;
70
70
  } | undefined;
@@ -0,0 +1 @@
1
+ export { default } from "./graded-group";
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
- import * as Changeable from "../mixins/changeable";
3
- import { GradedGroup } from "./graded-group";
4
- import type { PerseusGradedGroupSetWidgetOptions } from "../perseus-types";
5
- import type { FocusPath, WidgetProps } from "../types";
2
+ import * as Changeable from "../../mixins/changeable";
3
+ import { GradedGroup } from "../graded-group/graded-group";
4
+ import type { PerseusGradedGroupSetWidgetOptions } from "../../perseus-types";
5
+ import type { FocusPath, WidgetProps } from "../../types";
6
6
  type RenderProps = PerseusGradedGroupSetWidgetOptions;
7
7
  type Rubric = PerseusGradedGroupSetWidgetOptions;
8
8
  type Props = Changeable.ChangeableProps & WidgetProps<RenderProps, Rubric> & {
@@ -36,15 +36,15 @@ declare const _default: Readonly<{
36
36
  widget: typeof GradedGroupSet;
37
37
  accessible?: boolean | ((props: any) => boolean) | undefined;
38
38
  hidden?: boolean | undefined;
39
- version?: import("../types").Version | undefined;
40
- supportedAlignments?: readonly import("../types").Alignment[] | undefined;
41
- defaultAlignment?: import("../types").Alignment | undefined;
42
- getDefaultAlignment?: (() => import("../types").Alignment) | undefined;
39
+ version?: import("../../types").Version | undefined;
40
+ supportedAlignments?: readonly import("../../types").Alignment[] | undefined;
41
+ defaultAlignment?: import("../../types").Alignment | undefined;
42
+ getDefaultAlignment?: (() => import("../../types").Alignment) | undefined;
43
43
  isLintable?: boolean | undefined;
44
- tracking?: import("../types").Tracking | undefined;
44
+ tracking?: import("../../types").Tracking | undefined;
45
45
  traverseChildWidgets?: any;
46
- transform?: import("../types").WidgetTransform | undefined;
47
- staticTransform?: import("../types").WidgetTransform | undefined;
46
+ transform?: import("../../types").WidgetTransform | undefined;
47
+ staticTransform?: import("../../types").WidgetTransform | undefined;
48
48
  propUpgrades?: {
49
49
  [key: string]: (arg1: any) => any;
50
50
  } | undefined;
@@ -0,0 +1 @@
1
+ export { default } from "./graded-group-set";
@@ -1,9 +1,9 @@
1
1
  import * as React from "react";
2
- import Graphie from "../components/graphie";
3
- import type { Coord } from "../interactive2/types";
4
- import type { PerseusGrapherWidgetOptions } from "../perseus-types";
5
- import type { PerseusScore, WidgetProps } from "../types";
6
- import type { GridDimensions } from "../util";
2
+ import Graphie from "../../components/graphie";
3
+ import type { Coord } from "../../interactive2/types";
4
+ import type { PerseusGrapherWidgetOptions } from "../../perseus-types";
5
+ import type { PerseusScore, WidgetProps } from "../../types";
6
+ import type { GridDimensions } from "../../util";
7
7
  import type { PropsFor } from "@khanacademy/wonder-blocks-core";
8
8
  type UserInput = any;
9
9
  type RenderProps = {
@@ -24,7 +24,8 @@ declare class Grapher extends React.Component<Props> {
24
24
  horizHairline: any;
25
25
  vertHairline: any;
26
26
  static defaultProps: DefaultProps;
27
- render(): React.ReactNode;
27
+ static validate(state: UserInput, rubric: Rubric): PerseusScore;
28
+ static getUserInputFromProps(props: Props): UserInput;
28
29
  handlePlotChanges: (arg1: any) => any;
29
30
  handleActiveTypeChange: (arg1: any) => any;
30
31
  _getGridConfig(options: Props["graph"] & {
@@ -38,8 +39,7 @@ declare class Grapher extends React.Component<Props> {
38
39
  simpleValidate(rubric: Rubric): PerseusScore;
39
40
  getUserInput(): UserInput;
40
41
  focus(): void;
41
- static validate(state: UserInput, rubric: Rubric): PerseusScore;
42
- static getUserInputFromProps(props: Props): UserInput;
42
+ render(): React.ReactNode;
43
43
  }
44
44
  declare const _default: Readonly<{
45
45
  name: string;
@@ -48,15 +48,15 @@ declare const _default: Readonly<{
48
48
  widget: typeof Grapher;
49
49
  accessible?: boolean | ((props: any) => boolean) | undefined;
50
50
  hidden?: boolean | undefined;
51
- version?: import("../types").Version | undefined;
52
- supportedAlignments?: readonly import("../types").Alignment[] | undefined;
53
- defaultAlignment?: import("../types").Alignment | undefined;
54
- getDefaultAlignment?: (() => import("../types").Alignment) | undefined;
51
+ version?: import("../../types").Version | undefined;
52
+ supportedAlignments?: readonly import("../../types").Alignment[] | undefined;
53
+ defaultAlignment?: import("../../types").Alignment | undefined;
54
+ getDefaultAlignment?: (() => import("../../types").Alignment) | undefined;
55
55
  isLintable?: boolean | undefined;
56
- tracking?: import("../types").Tracking | undefined;
56
+ tracking?: import("../../types").Tracking | undefined;
57
57
  traverseChildWidgets?: any;
58
- transform?: import("../types").WidgetTransform | undefined;
59
- staticTransform?: import("../types").WidgetTransform | undefined;
58
+ transform?: import("../../types").WidgetTransform | undefined;
59
+ staticTransform?: import("../../types").WidgetTransform | undefined;
60
60
  propUpgrades?: {
61
61
  [key: string]: (arg1: any) => any;
62
62
  } | undefined;
@@ -0,0 +1 @@
1
+ export { default } from "./grapher";
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
- import { PerseusI18nContext } from "../components/i18n-context";
3
- import Renderer from "../renderer";
4
- import type { PerseusGroupWidgetOptions } from "../perseus-types";
5
- import type { ChangeFn, FocusPath, PerseusScore, WidgetProps } from "../types";
2
+ import { PerseusI18nContext } from "../../components/i18n-context";
3
+ import Renderer from "../../renderer";
4
+ import type { PerseusGroupWidgetOptions } from "../../perseus-types";
5
+ import type { ChangeFn, FocusPath, PerseusScore, WidgetProps } from "../../types";
6
6
  type Rubric = PerseusGroupWidgetOptions;
7
7
  type RenderProps = PerseusGroupWidgetOptions;
8
8
  type Props = WidgetProps<RenderProps, Rubric>;
@@ -14,7 +14,7 @@ type DefaultProps = {
14
14
  };
15
15
  declare class Group extends React.Component<Props> {
16
16
  static contextType: React.Context<{
17
- strings: import("../strings").PerseusStrings;
17
+ strings: import("../../strings").PerseusStrings;
18
18
  locale: string;
19
19
  }>;
20
20
  context: React.ContextType<typeof PerseusI18nContext>;
@@ -41,15 +41,15 @@ declare const _default: Readonly<{
41
41
  widget: typeof Group;
42
42
  accessible?: boolean | ((props: any) => boolean) | undefined;
43
43
  hidden?: boolean | undefined;
44
- version?: import("../types").Version | undefined;
45
- supportedAlignments?: readonly import("../types").Alignment[] | undefined;
46
- defaultAlignment?: import("../types").Alignment | undefined;
47
- getDefaultAlignment?: (() => import("../types").Alignment) | undefined;
44
+ version?: import("../../types").Version | undefined;
45
+ supportedAlignments?: readonly import("../../types").Alignment[] | undefined;
46
+ defaultAlignment?: import("../../types").Alignment | undefined;
47
+ getDefaultAlignment?: (() => import("../../types").Alignment) | undefined;
48
48
  isLintable?: boolean | undefined;
49
- tracking?: import("../types").Tracking | undefined;
49
+ tracking?: import("../../types").Tracking | undefined;
50
50
  traverseChildWidgets?: any;
51
- transform?: import("../types").WidgetTransform | undefined;
52
- staticTransform?: import("../types").WidgetTransform | undefined;
51
+ transform?: import("../../types").WidgetTransform | undefined;
52
+ staticTransform?: import("../../types").WidgetTransform | undefined;
53
53
  propUpgrades?: {
54
54
  [key: string]: (arg1: any) => any;
55
55
  } | undefined;
@@ -0,0 +1 @@
1
+ export { default } from "./group";