@khanacademy/perseus-editor 28.16.0 → 29.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.
@@ -4,7 +4,7 @@ import IframeContentRenderer from "./iframe-content-renderer";
4
4
  import ItemExtrasEditor from "./item-extras-editor";
5
5
  import type { Issue } from "./components/issues-panel";
6
6
  import type { APIOptions, ImageUploader, ChangeHandler, DeviceType } from "@khanacademy/perseus";
7
- import type { PerseusAnswerArea, PerseusWidgetsMap, PerseusRenderer } from "@khanacademy/perseus-core";
7
+ import type { PerseusAnswerArea, PerseusWidgetsMap, PerseusRenderer, PerseusItem } from "@khanacademy/perseus-core";
8
8
  type Props = {
9
9
  /** Additional templates that the host application would like to display
10
10
  * within the Perseus Editor.
@@ -18,7 +18,7 @@ type Props = {
18
18
  answerArea?: PerseusAnswerArea | null;
19
19
  /** URL of the route to show on initial load of the preview frames. */
20
20
  previewURL: string;
21
- onChange: ChangeHandler;
21
+ onChange: (changed: Partial<PerseusItem>) => void;
22
22
  /** The content ID of the AssessmentItem being edited. It may not be set
23
23
  * for non-content library exercise questions.
24
24
  */
@@ -48,7 +48,7 @@ declare class ItemEditor extends React.Component<Props, State> {
48
48
  showAxeCoreIssues: boolean;
49
49
  };
50
50
  componentDidUpdate(prevProps: Props): void;
51
- updateProps: ChangeHandler;
51
+ updateProps: (newProps: Partial<PerseusItem>) => void;
52
52
  triggerPreviewUpdate: (newData?: any) => void;
53
53
  handleEditorChange: ChangeHandler;
54
54
  handleItemExtrasChange: (newProps: Partial<PerseusAnswerArea>) => void;
@@ -4,6 +4,11 @@ declare const DEFAULT_FEATURE_FLAGS: {
4
4
  "new-radio-widget": boolean;
5
5
  "image-widget-upgrade-gif-controls": boolean;
6
6
  "image-widget-upgrade-scale": boolean;
7
+ "interactive-graph-absolute-value": boolean;
8
+ "interactive-graph-tangent": boolean;
9
+ "interactive-graph-logarithm": boolean;
10
+ "interactive-graph-exponent": boolean;
11
+ "interactive-graph-vector": boolean;
7
12
  };
8
13
  /** Utility to get feature flags with optional overrides for testing.
9
14
  * sample usage:
@@ -15,5 +20,10 @@ export declare function getFeatureFlags(overrides?: Partial<typeof DEFAULT_FEATU
15
20
  "new-radio-widget": boolean;
16
21
  "image-widget-upgrade-gif-controls": boolean;
17
22
  "image-widget-upgrade-scale": boolean;
23
+ "interactive-graph-absolute-value": boolean;
24
+ "interactive-graph-tangent": boolean;
25
+ "interactive-graph-logarithm": boolean;
26
+ "interactive-graph-exponent": boolean;
27
+ "interactive-graph-vector": boolean;
18
28
  };
19
29
  export {};