@khanacademy/perseus-editor 28.10.0 → 28.10.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.
- package/dist/components/issues-panel.d.ts +6 -1
- package/dist/components/json-editor.d.ts +2 -1
- package/dist/components/show-me-issue.d.ts +5 -0
- package/dist/diffs/shared/string-array-diff.d.ts +0 -5
- package/dist/diffs/text-diff.d.ts +1 -1
- package/dist/editor-page.d.ts +14 -1
- package/dist/es/index.css +1 -1
- package/dist/es/index.css.map +1 -1
- package/dist/es/index.js +33 -25
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +36 -26
- package/dist/index.js.map +1 -1
- package/dist/item-editor.d.ts +6 -1
- package/dist/preview/message-types.d.ts +1 -5
- package/dist/util/a11y-checker.d.ts +1 -0
- package/dist/util/a11y-issues-list.d.ts +6 -0
- package/dist/widgets/radio/editor.d.ts +11 -5
- package/package.json +5 -4
package/dist/item-editor.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ type Props = {
|
|
|
27
27
|
};
|
|
28
28
|
type State = {
|
|
29
29
|
issues: Issue[];
|
|
30
|
+
axeCoreIssues: Issue[];
|
|
31
|
+
showAxeCoreIssues: boolean;
|
|
30
32
|
};
|
|
31
33
|
declare class ItemEditor extends React.Component<Props, State> {
|
|
32
34
|
static defaultProps: {
|
|
@@ -36,13 +38,16 @@ declare class ItemEditor extends React.Component<Props, State> {
|
|
|
36
38
|
};
|
|
37
39
|
static prevContent: string | undefined;
|
|
38
40
|
static prevWidgets: PerseusWidgetsMap | undefined;
|
|
41
|
+
a11yCheckerTimeoutId: any;
|
|
39
42
|
frame: React.RefObject<IframeContentRenderer>;
|
|
40
43
|
questionEditor: React.RefObject<Editor>;
|
|
41
44
|
itemExtrasEditor: React.RefObject<ItemExtrasEditor>;
|
|
42
45
|
state: {
|
|
43
46
|
issues: never[];
|
|
47
|
+
axeCoreIssues: never[];
|
|
48
|
+
showAxeCoreIssues: boolean;
|
|
44
49
|
};
|
|
45
|
-
|
|
50
|
+
componentDidUpdate(prevProps: Props): void;
|
|
46
51
|
updateProps: ChangeHandler;
|
|
47
52
|
triggerPreviewUpdate: (newData?: any) => void;
|
|
48
53
|
handleEditorChange: ChangeHandler;
|
|
@@ -5,15 +5,11 @@
|
|
|
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
|
-
* Constant identifier for all Perseus preview messages
|
|
10
|
-
*/
|
|
11
|
-
export declare const PREVIEW_MESSAGE_SOURCE: "perseus-preview";
|
|
12
8
|
/**
|
|
13
9
|
* Base type for all preview messages
|
|
14
10
|
*/
|
|
15
11
|
interface PreviewMessageBase {
|
|
16
|
-
source:
|
|
12
|
+
source: "perseus-preview";
|
|
17
13
|
id: string | number;
|
|
18
14
|
}
|
|
19
15
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const runAxeCoreOnUpdate: (priorTimeoutId: any, setState: any) => any;
|
|
@@ -19,16 +19,22 @@ declare class RadioEditor extends React.Component<RadioEditorProps> {
|
|
|
19
19
|
static widgetName: "radio";
|
|
20
20
|
static defaultProps: RadioDefaultWidgetOptions;
|
|
21
21
|
componentDidMount(): void;
|
|
22
|
-
onMultipleSelectChange: (
|
|
23
|
-
|
|
22
|
+
onMultipleSelectChange: (options: {
|
|
23
|
+
multipleSelect: boolean;
|
|
24
|
+
}) => void;
|
|
25
|
+
onCountChoicesChange: (options: {
|
|
26
|
+
countChoices: boolean;
|
|
27
|
+
}) => void;
|
|
24
28
|
generateChoiceId: (index: number) => string;
|
|
25
29
|
ensureValidIds: (choiceId: string, index: number) => string;
|
|
26
|
-
onChange: (
|
|
30
|
+
onChange: (options: {
|
|
31
|
+
checked: ReadonlyArray<boolean | undefined>;
|
|
32
|
+
}) => void;
|
|
27
33
|
onStatusChange: (choiceIndex: number, correct: boolean) => void;
|
|
28
|
-
onContentChange: (
|
|
34
|
+
onContentChange: (choiceIndex: number, newContent: string) => void;
|
|
29
35
|
onRationaleChange: (choiceIndex: number, newRationale: string) => void;
|
|
30
36
|
onDelete: (arg1: number) => void;
|
|
31
|
-
addChoice: (
|
|
37
|
+
addChoice: (noneOfTheAbove: boolean, e: React.SyntheticEvent) => void;
|
|
32
38
|
handleMove: (choiceIndex: number, movement: ChoiceMovementType) => void;
|
|
33
39
|
focus: () => boolean;
|
|
34
40
|
getSaveWarnings: () => ReadonlyArray<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": "28.10.
|
|
6
|
+
"version": "28.10.1",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -31,17 +31,18 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
+
"axe-core": "^4.11.0",
|
|
34
35
|
"katex": "0.11.1",
|
|
35
36
|
"mafs": "^0.19.0",
|
|
36
37
|
"tiny-invariant": "1.3.1",
|
|
37
38
|
"@khanacademy/kas": "2.1.7",
|
|
38
39
|
"@khanacademy/keypad-context": "3.2.30",
|
|
39
40
|
"@khanacademy/kmath": "2.2.30",
|
|
41
|
+
"@khanacademy/perseus": "74.0.1",
|
|
40
42
|
"@khanacademy/math-input": "26.3.10",
|
|
41
|
-
"@khanacademy/perseus": "74.0.0",
|
|
42
43
|
"@khanacademy/perseus-core": "23.0.0",
|
|
43
|
-
"@khanacademy/perseus-
|
|
44
|
-
"@khanacademy/perseus-
|
|
44
|
+
"@khanacademy/perseus-score": "8.2.7",
|
|
45
|
+
"@khanacademy/perseus-linter": "4.7.0",
|
|
45
46
|
"@khanacademy/perseus-utils": "2.1.4"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|