@khanacademy/perseus-editor 34.2.0 → 34.2.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.
@@ -2,9 +2,8 @@ import * as React from "react";
2
2
  import Editor from "./editor";
3
3
  import IframeContentRenderer from "./iframe-content-renderer";
4
4
  import ItemExtrasEditor from "./item-extras-editor";
5
- import type { Issue } from "./components/issues-panel";
6
5
  import type { APIOptions, ImageUploader, ChangeHandler, DeviceType } from "@khanacademy/perseus";
7
- import type { PerseusAnswerArea, PerseusWidgetsMap, PerseusRenderer, PerseusItem } from "@khanacademy/perseus-core";
6
+ import type { PerseusAnswerArea, PerseusRenderer, PerseusItem } from "@khanacademy/perseus-core";
8
7
  type Props = {
9
8
  /** Additional templates that the host application would like to display
10
9
  * within the Perseus Editor.
@@ -23,31 +22,16 @@ type Props = {
23
22
  * for non-content library exercise questions.
24
23
  */
25
24
  itemId?: string;
26
- issues?: Issue[];
27
25
  };
28
- type State = {
29
- issues: Issue[];
30
- axeCoreIssues: Issue[];
31
- showAxeCoreIssues: boolean;
32
- };
33
- declare class ItemEditor extends React.Component<Props, State> {
26
+ declare class ItemEditor extends React.Component<Props> {
34
27
  static defaultProps: {
35
28
  answerArea: Record<any, any>;
36
29
  onChange: () => void;
37
30
  question: Record<any, any>;
38
31
  };
39
- static prevContent: string | undefined;
40
- static prevWidgets: PerseusWidgetsMap | undefined;
41
- a11yCheckerTimeoutId: any;
42
32
  frame: React.RefObject<IframeContentRenderer>;
43
33
  questionEditor: React.RefObject<Editor>;
44
34
  itemExtrasEditor: React.RefObject<ItemExtrasEditor>;
45
- state: {
46
- issues: never[];
47
- axeCoreIssues: never[];
48
- showAxeCoreIssues: boolean;
49
- };
50
- componentDidUpdate(prevProps: Props): void;
51
35
  updateProps: (newProps: Partial<PerseusItem>) => void;
52
36
  triggerPreviewUpdate: (newData?: any) => void;
53
37
  handleEditorChange: ChangeHandler;
@@ -0,0 +1,3 @@
1
+ import type { Issue } from "../components/issues-panel";
2
+ import type { Hint, PerseusRenderer } from "@khanacademy/perseus-core";
3
+ export declare function gatherLinterIssues(question: PerseusRenderer | undefined, hints: Hint[], hostIssues?: Issue[]): Issue[];
@@ -14,3 +14,8 @@ export declare function generateSpokenMathDetails(mathString: string): Promise<s
14
14
  * spoken math using the SpeechRuleEngine.
15
15
  */
16
16
  export declare function joinLabelsAsSpokenMath(labels: LockedLabelType[]): Promise<string>;
17
+ /**
18
+ * Non-async mocked version of joinLabelsAsSpokenMath for tests.
19
+ */
20
+ export declare function mockedJoinLabelsAsSpokenMathForTests(labels: LockedLabelType[]): Promise<string>;
21
+ export declare function mockedGenerateSpokenMathDetailsForTests(mathString: string): Promise<string>;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Perseus editors",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "34.2.0",
6
+ "version": "34.2.1",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -36,12 +36,12 @@
36
36
  "mafs": "^0.19.0",
37
37
  "tiny-invariant": "1.3.1",
38
38
  "@khanacademy/kas": "2.2.3",
39
- "@khanacademy/keypad-context": "3.2.72",
40
- "@khanacademy/kmath": "2.4.31",
41
- "@khanacademy/math-input": "26.5.0",
42
- "@khanacademy/perseus": "79.2.0",
43
- "@khanacademy/perseus-core": "30.1.1",
44
- "@khanacademy/perseus-linter": "5.1.12",
39
+ "@khanacademy/keypad-context": "3.2.73",
40
+ "@khanacademy/kmath": "2.4.32",
41
+ "@khanacademy/math-input": "26.6.0",
42
+ "@khanacademy/perseus": "80.0.0",
43
+ "@khanacademy/perseus-core": "31.0.0",
44
+ "@khanacademy/perseus-linter": "5.1.13",
45
45
  "@khanacademy/perseus-utils": "2.1.5"
46
46
  },
47
47
  "devDependencies": {