@khanacademy/perseus-editor 28.12.1 → 28.14.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.
@@ -5,13 +5,6 @@
5
5
  import type { APIOptions, DeviceType } from "@khanacademy/perseus";
6
6
  import type { Hint, PerseusArticle, PerseusItem } from "@khanacademy/perseus-core";
7
7
  import type { LinterContextProps } from "@khanacademy/perseus-linter";
8
- /**
9
- * Base type for all preview messages
10
- */
11
- interface PreviewMessageBase {
12
- source: "perseus-preview";
13
- id: string | number;
14
- }
15
8
  /**
16
9
  * Data for question preview (full item with question, answer area, and hints)
17
10
  */
@@ -60,36 +53,3 @@ export type PreviewContent = {
60
53
  type: "article-all";
61
54
  data: ArticlePreviewData[];
62
55
  };
63
- /**
64
- * Message from iframe requesting data from parent
65
- * (iframe sends its ID as a string)
66
- */
67
- export type PreviewDataRequestMessage = string;
68
- /**
69
- * Message from parent sending data to iframe
70
- * (parent sends iframe ID as a string, iframe looks up data in iframeDataStore)
71
- */
72
- export type PreviewDataResponseMessage = string | number;
73
- /**
74
- * Message from iframe reporting its content height
75
- */
76
- export type PreviewHeightUpdateMessage = PreviewMessageBase & {
77
- type: "height-update";
78
- height: number;
79
- };
80
- /**
81
- * Message from iframe reporting lint warnings
82
- */
83
- export type PreviewLintReportMessage = PreviewMessageBase & {
84
- type: "lint-report";
85
- lintWarnings: ReadonlyArray<any>;
86
- };
87
- /**
88
- * Union of all messages sent from iframe to parent
89
- */
90
- export type IframeToParentMessage = PreviewDataRequestMessage | PreviewHeightUpdateMessage | PreviewLintReportMessage;
91
- /**
92
- * Union of all messages sent from parent to iframe
93
- */
94
- export type ParentToIframeMessage = PreviewDataResponseMessage;
95
- export {};
@@ -1,7 +1,8 @@
1
1
  declare const DEFAULT_FEATURE_FLAGS: {
2
2
  "new-radio-widget": boolean;
3
- "image-widget-upgrade": boolean;
4
3
  "image-widget-upgrade-alignment": boolean;
4
+ "image-widget-upgrade-gif-controls": boolean;
5
+ "image-widget-upgrade-scale": boolean;
5
6
  };
6
7
  /** Utility to get feature flags with optional overrides for testing.
7
8
  * sample usage:
@@ -9,7 +10,8 @@ declare const DEFAULT_FEATURE_FLAGS: {
9
10
  */
10
11
  export declare function getFeatureFlags(overrides?: Partial<typeof DEFAULT_FEATURE_FLAGS>): {
11
12
  "new-radio-widget": boolean;
12
- "image-widget-upgrade": boolean;
13
13
  "image-widget-upgrade-alignment": boolean;
14
+ "image-widget-upgrade-gif-controls": boolean;
15
+ "image-widget-upgrade-scale": boolean;
14
16
  };
15
17
  export {};
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import type { Props as ImageEditorProps } from "../image-editor";
3
+ import type { PerseusImageBackground } from "@khanacademy/perseus-core";
4
+ interface Props {
5
+ backgroundImage: PerseusImageBackground;
6
+ scale: number;
7
+ onChange: ImageEditorProps["onChange"];
8
+ }
9
+ export default function ImageScaleInput({ backgroundImage, scale, onChange, }: Props): React.JSX.Element;
10
+ export {};
@@ -1,3 +1,3 @@
1
1
  import * as React from "react";
2
2
  import type { Props } from "../image-editor";
3
- export default function ImageSettings({ alt, backgroundImage, apiOptions, caption, decorative, longDescription, title, onChange, }: Props): React.JSX.Element | null;
3
+ export default function ImageSettings({ alt, backgroundImage, scale, apiOptions, caption, decorative, longDescription, title, onChange, }: Props): React.JSX.Element | null;