@khanacademy/perseus-editor 26.1.0 → 26.1.2
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/__docs__/editor-page-with-storybook-preview.d.ts +10 -0
- package/dist/es/index.css +1 -1
- package/dist/es/index.css.map +1 -1
- package/dist/es/index.js +11 -5
- 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 +11 -5
- package/dist/index.js.map +1 -1
- package/dist/widgets/radio/auto-resizing-text-area.d.ts +6 -0
- package/dist/widgets/radio/editor.d.ts +2 -0
- package/dist/widgets/radio/radio-option-settings-actions.d.ts +11 -0
- package/dist/widgets/radio/radio-option-settings.d.ts +4 -1
- package/dist/widgets/radio/utils.d.ts +3 -0
- package/package.json +35 -35
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TextArea } from "@khanacademy/wonder-blocks-form";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type { PropsFor } from "@khanacademy/wonder-blocks-core";
|
|
4
|
+
type TextAreaProps = Omit<PropsFor<typeof TextArea>, "rows">;
|
|
5
|
+
export declare const AutoResizingTextArea: (props: TextAreaProps) => React.JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import type { ChoiceMovementType } from "./radio-option-settings-actions";
|
|
2
3
|
import type { Changeable, APIOptions } from "@khanacademy/perseus";
|
|
3
4
|
import type { PerseusRadioWidgetOptions, PerseusRadioChoice, RadioDefaultWidgetOptions } from "@khanacademy/perseus-core";
|
|
4
5
|
export interface RadioEditorProps extends Changeable.ChangeableProps {
|
|
@@ -22,6 +23,7 @@ declare class RadioEditor extends React.Component<RadioEditorProps> {
|
|
|
22
23
|
onRationaleChange: (choiceIndex: number, newRationale: string) => void;
|
|
23
24
|
onDelete: (arg1: number) => void;
|
|
24
25
|
addChoice: (arg1: boolean, arg2: any) => void;
|
|
26
|
+
handleMove: (choiceIndex: number, movement: ChoiceMovementType) => void;
|
|
25
27
|
focus: () => boolean;
|
|
26
28
|
getSaveWarnings: () => ReadonlyArray<string>;
|
|
27
29
|
serialize(): PerseusRadioWidgetOptions;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ChoiceMovementType = "up" | "down" | "top" | "bottom";
|
|
3
|
+
interface RadioOptionSettingsActionsProps {
|
|
4
|
+
content: string;
|
|
5
|
+
showDelete: boolean;
|
|
6
|
+
showMove: boolean;
|
|
7
|
+
onDelete: () => void;
|
|
8
|
+
onMove: (movement: ChoiceMovementType) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function RadioOptionSettingsActions({ content, showDelete, showMove, onDelete, onMove, }: RadioOptionSettingsActionsProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import type { ChoiceMovementType } from "./radio-option-settings-actions";
|
|
2
3
|
import type { PerseusRadioChoice } from "@khanacademy/perseus-core";
|
|
3
4
|
interface RadioOptionSettingsProps {
|
|
4
5
|
index: number;
|
|
@@ -8,7 +9,9 @@ interface RadioOptionSettingsProps {
|
|
|
8
9
|
onContentChange: (choiceIndex: number, content: string) => void;
|
|
9
10
|
onRationaleChange: (choiceIndex: number, rationale: string) => void;
|
|
10
11
|
showDelete: boolean;
|
|
12
|
+
showMove: boolean;
|
|
11
13
|
onDelete: () => void;
|
|
14
|
+
onMove: (choiceIndex: number, movement: ChoiceMovementType) => void;
|
|
12
15
|
}
|
|
13
|
-
export declare function RadioOptionSettings({ index, choice, multipleSelect, onStatusChange, onContentChange, onRationaleChange, showDelete, onDelete, }: RadioOptionSettingsProps): React.JSX.Element;
|
|
16
|
+
export declare function RadioOptionSettings({ index, choice, multipleSelect, onStatusChange, onContentChange, onRationaleChange, showDelete, showMove, onDelete, onMove, }: RadioOptionSettingsProps): React.JSX.Element;
|
|
14
17
|
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ChoiceMovementType } from "./radio-option-settings-actions";
|
|
2
|
+
import type { PerseusRadioChoice } from "@khanacademy/perseus-core";
|
|
3
|
+
export declare function getMovedChoices(choices: PerseusRadioChoice[], hasNoneOfTheAbove: boolean, choiceIndex: number, movement: ChoiceMovementType): PerseusRadioChoice[];
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Perseus editors",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "26.1.
|
|
6
|
+
"version": "26.1.2",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -36,35 +36,35 @@
|
|
|
36
36
|
"tiny-invariant": "1.3.1",
|
|
37
37
|
"@khanacademy/kas": "2.0.9",
|
|
38
38
|
"@khanacademy/keypad-context": "3.0.29",
|
|
39
|
-
"@khanacademy/kmath": "2.0.29",
|
|
40
39
|
"@khanacademy/perseus-linter": "4.1.2",
|
|
41
40
|
"@khanacademy/math-input": "26.0.18",
|
|
42
|
-
"@khanacademy/perseus": "66.0.
|
|
41
|
+
"@khanacademy/perseus": "66.0.2",
|
|
43
42
|
"@khanacademy/perseus-core": "18.2.2",
|
|
43
|
+
"@khanacademy/kmath": "2.0.29",
|
|
44
44
|
"@khanacademy/perseus-score": "7.1.16",
|
|
45
45
|
"@khanacademy/perseus-utils": "2.0.5",
|
|
46
46
|
"@khanacademy/pure-markdown": "2.1.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@khanacademy/mathjax-renderer": "3.0.0",
|
|
50
|
-
"@khanacademy/wonder-blocks-accordion": "3.1.
|
|
51
|
-
"@khanacademy/wonder-blocks-banner": "4.2.
|
|
52
|
-
"@khanacademy/wonder-blocks-button": "10.2.
|
|
53
|
-
"@khanacademy/wonder-blocks-clickable": "7.1.
|
|
50
|
+
"@khanacademy/wonder-blocks-accordion": "3.1.32",
|
|
51
|
+
"@khanacademy/wonder-blocks-banner": "4.2.10",
|
|
52
|
+
"@khanacademy/wonder-blocks-button": "10.2.14",
|
|
53
|
+
"@khanacademy/wonder-blocks-clickable": "7.1.18",
|
|
54
54
|
"@khanacademy/wonder-blocks-core": "12.3.0",
|
|
55
|
-
"@khanacademy/wonder-blocks-dropdown": "10.2.
|
|
56
|
-
"@khanacademy/wonder-blocks-form": "7.2.
|
|
57
|
-
"@khanacademy/wonder-blocks-icon": "5.2.
|
|
58
|
-
"@khanacademy/wonder-blocks-icon-button": "10.3.
|
|
59
|
-
"@khanacademy/wonder-blocks-labeled-field": "3.
|
|
60
|
-
"@khanacademy/wonder-blocks-layout": "3.1.
|
|
61
|
-
"@khanacademy/wonder-blocks-link": "9.1.
|
|
62
|
-
"@khanacademy/wonder-blocks-pill": "3.1.
|
|
63
|
-
"@khanacademy/wonder-blocks-switch": "3.3.
|
|
55
|
+
"@khanacademy/wonder-blocks-dropdown": "10.2.8",
|
|
56
|
+
"@khanacademy/wonder-blocks-form": "7.2.5",
|
|
57
|
+
"@khanacademy/wonder-blocks-icon": "5.2.12",
|
|
58
|
+
"@khanacademy/wonder-blocks-icon-button": "10.3.13",
|
|
59
|
+
"@khanacademy/wonder-blocks-labeled-field": "3.2.1",
|
|
60
|
+
"@khanacademy/wonder-blocks-layout": "3.1.29",
|
|
61
|
+
"@khanacademy/wonder-blocks-link": "9.1.18",
|
|
62
|
+
"@khanacademy/wonder-blocks-pill": "3.1.33",
|
|
63
|
+
"@khanacademy/wonder-blocks-switch": "3.3.11",
|
|
64
64
|
"@khanacademy/wonder-blocks-timing": "7.0.2",
|
|
65
|
-
"@khanacademy/wonder-blocks-tokens": "
|
|
66
|
-
"@khanacademy/wonder-blocks-tooltip": "4.1.
|
|
67
|
-
"@khanacademy/wonder-blocks-typography": "4.2.
|
|
65
|
+
"@khanacademy/wonder-blocks-tokens": "12.0.0",
|
|
66
|
+
"@khanacademy/wonder-blocks-tooltip": "4.1.35",
|
|
67
|
+
"@khanacademy/wonder-blocks-typography": "4.2.14",
|
|
68
68
|
"@khanacademy/wonder-stuff-core": "1.5.5",
|
|
69
69
|
"@phosphor-icons/core": "2.0.2",
|
|
70
70
|
"aphrodite": "1.2.5",
|
|
@@ -79,24 +79,24 @@
|
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@khanacademy/mathjax-renderer": "^3.0.0",
|
|
82
|
-
"@khanacademy/wonder-blocks-accordion": "^3.1.
|
|
83
|
-
"@khanacademy/wonder-blocks-banner": "^4.2.
|
|
84
|
-
"@khanacademy/wonder-blocks-button": "^10.2.
|
|
85
|
-
"@khanacademy/wonder-blocks-clickable": "^7.1.
|
|
82
|
+
"@khanacademy/wonder-blocks-accordion": "^3.1.32",
|
|
83
|
+
"@khanacademy/wonder-blocks-banner": "^4.2.10",
|
|
84
|
+
"@khanacademy/wonder-blocks-button": "^10.2.14",
|
|
85
|
+
"@khanacademy/wonder-blocks-clickable": "^7.1.18",
|
|
86
86
|
"@khanacademy/wonder-blocks-core": "^12.3.0",
|
|
87
|
-
"@khanacademy/wonder-blocks-dropdown": "^10.2.
|
|
88
|
-
"@khanacademy/wonder-blocks-form": "^7.2.
|
|
89
|
-
"@khanacademy/wonder-blocks-icon": "^5.2.
|
|
90
|
-
"@khanacademy/wonder-blocks-icon-button": "^10.3.
|
|
91
|
-
"@khanacademy/wonder-blocks-labeled-field": "^3.
|
|
92
|
-
"@khanacademy/wonder-blocks-layout": "^3.1.
|
|
93
|
-
"@khanacademy/wonder-blocks-link": "^9.1.
|
|
94
|
-
"@khanacademy/wonder-blocks-pill": "^3.1.
|
|
95
|
-
"@khanacademy/wonder-blocks-switch": "^3.3.
|
|
87
|
+
"@khanacademy/wonder-blocks-dropdown": "^10.2.8",
|
|
88
|
+
"@khanacademy/wonder-blocks-form": "^7.2.5",
|
|
89
|
+
"@khanacademy/wonder-blocks-icon": "^5.2.12",
|
|
90
|
+
"@khanacademy/wonder-blocks-icon-button": "^10.3.13",
|
|
91
|
+
"@khanacademy/wonder-blocks-labeled-field": "^3.2.1",
|
|
92
|
+
"@khanacademy/wonder-blocks-layout": "^3.1.29",
|
|
93
|
+
"@khanacademy/wonder-blocks-link": "^9.1.18",
|
|
94
|
+
"@khanacademy/wonder-blocks-pill": "^3.1.33",
|
|
95
|
+
"@khanacademy/wonder-blocks-switch": "^3.3.11",
|
|
96
96
|
"@khanacademy/wonder-blocks-timing": "^7.0.2",
|
|
97
|
-
"@khanacademy/wonder-blocks-tokens": "^
|
|
98
|
-
"@khanacademy/wonder-blocks-tooltip": "^4.1.
|
|
99
|
-
"@khanacademy/wonder-blocks-typography": "^4.2.
|
|
97
|
+
"@khanacademy/wonder-blocks-tokens": "^12.0.0",
|
|
98
|
+
"@khanacademy/wonder-blocks-tooltip": "^4.1.35",
|
|
99
|
+
"@khanacademy/wonder-blocks-typography": "^4.2.14",
|
|
100
100
|
"@khanacademy/wonder-stuff-core": "^1.5.5",
|
|
101
101
|
"@phosphor-icons/core": "^2.0.2",
|
|
102
102
|
"aphrodite": "^1.2.5",
|