@khanacademy/perseus-editor 37.1.1 → 38.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/all-editors.d.ts +9 -2
- package/dist/components/widget-editor.d.ts +1 -1
- package/dist/editor-page.d.ts +1 -7
- package/dist/es/index.css +3 -3
- package/dist/es/index.css.map +1 -1
- package/dist/es/index.js +151 -139
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +3 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +156 -142
- package/dist/index.js.map +1 -1
- package/dist/item-editor.d.ts +5 -5
- package/dist/mixins/changeable.d.ts +37 -0
- package/dist/mixins/editor-jsonify.d.ts +8 -0
- package/dist/widgets/categorizer-editor/categorizer-editor.d.ts +4 -4
- package/dist/widgets/cs-program-editor/cs-program-editor.d.ts +3 -3
- package/dist/widgets/definition-editor/definition-editor.d.ts +5 -5
- package/dist/widgets/dropdown-editor/dropdown-editor.d.ts +2 -2
- package/dist/widgets/explanation-editor/explanation-editor.d.ts +4 -4
- package/dist/widgets/graded-group-editor/graded-group-editor.d.ts +4 -4
- package/dist/widgets/graded-group-set-editor/graded-group-set-editor.d.ts +4 -4
- package/dist/widgets/grapher-editor/grapher-editor.d.ts +2 -2
- package/dist/widgets/group-editor/group-editor.d.ts +2 -2
- package/dist/widgets/iframe-editor/iframe-editor.d.ts +4 -4
- package/dist/widgets/image-editor/components/dark-mode-toggle.d.ts +5 -0
- package/dist/widgets/image-editor/image-editor.d.ts +2 -2
- package/dist/widgets/interaction-editor/constraint-editor.d.ts +2 -2
- package/dist/widgets/interaction-editor/function-editor.d.ts +2 -2
- package/dist/widgets/interaction-editor/interaction-editor.d.ts +2 -2
- package/dist/widgets/interaction-editor/label-editor.d.ts +2 -2
- package/dist/widgets/interaction-editor/line-editor.d.ts +2 -2
- package/dist/widgets/interaction-editor/movable-line-editor.d.ts +2 -3
- package/dist/widgets/interaction-editor/movable-point-editor.d.ts +2 -3
- package/dist/widgets/interaction-editor/parametric-editor.d.ts +2 -2
- package/dist/widgets/interaction-editor/point-editor.d.ts +2 -2
- package/dist/widgets/interaction-editor/rectangle-editor.d.ts +2 -2
- package/dist/widgets/interactive-graph-editor/components/interactive-graph-settings.d.ts +1 -5
- package/dist/widgets/interactive-graph-editor/interactive-graph-editor.d.ts +8 -4
- package/dist/widgets/label-image-editor/label-image-editor.d.ts +2 -2
- package/dist/widgets/matrix-editor/matrix-editor.d.ts +4 -4
- package/dist/widgets/measurer-editor/measurer-editor.d.ts +4 -4
- package/dist/widgets/number-line-editor/number-line-editor.d.ts +4 -4
- package/dist/widgets/numeric-input-editor/numeric-input-editor.d.ts +1 -2
- package/dist/widgets/orderer-editor/orderer-editor.d.ts +1 -6
- package/dist/widgets/phet-simulation-editor/phet-simulation-editor.d.ts +3 -3
- package/dist/widgets/plotter-editor/plotter-editor.d.ts +2 -2
- package/dist/widgets/python-program-editor/python-program-editor.d.ts +4 -4
- package/dist/widgets/radio-editor/radio-editor.d.ts +2 -2
- package/dist/widgets/sorter-editor/card-editor.d.ts +19 -0
- package/dist/widgets/sorter-editor/sorter-editor.d.ts +11 -11
- package/dist/widgets/table-editor/table-editor.d.ts +2 -2
- package/dist/widgets/video-editor/video-editor.d.ts +2 -2
- package/package.json +10 -10
- /package/dist/{hint-editor.d.ts → combined-hints-editor.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Changeable } from "@khanacademy/perseus";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
import type {
|
|
4
|
-
type
|
|
2
|
+
import type { ChangeableProps } from "../../mixins/changeable";
|
|
3
|
+
import type { PerseusPythonProgramWidgetOptions } from "@khanacademy/perseus-core";
|
|
4
|
+
type Props = ChangeableProps & {
|
|
5
5
|
programID: string;
|
|
6
6
|
height: number;
|
|
7
7
|
};
|
|
@@ -11,7 +11,7 @@ export declare function validateOptions(height: Props["height"], programID: Prop
|
|
|
11
11
|
*/
|
|
12
12
|
declare class PythonProgramEditor extends React.Component<Props> {
|
|
13
13
|
static widgetName: "python-program";
|
|
14
|
-
static defaultProps:
|
|
14
|
+
static defaultProps: PerseusPythonProgramWidgetOptions;
|
|
15
15
|
change: (...args: ReadonlyArray<unknown>) => any;
|
|
16
16
|
serialize(): PerseusPythonProgramWidgetOptions;
|
|
17
17
|
getSaveWarnings: () => ReadonlyArray<string>;
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import type { RadioOptionSettingsHandle } from "./radio-option-settings";
|
|
3
3
|
import type { ChoiceMovementType } from "./radio-option-settings-actions";
|
|
4
4
|
import type { APIOptions } from "@khanacademy/perseus";
|
|
5
|
-
import type { PerseusRadioWidgetOptions, PerseusRadioChoice
|
|
5
|
+
import type { PerseusRadioWidgetOptions, PerseusRadioChoice } from "@khanacademy/perseus-core";
|
|
6
6
|
export interface RadioEditorProps {
|
|
7
7
|
apiOptions: APIOptions;
|
|
8
8
|
countChoices: boolean;
|
|
@@ -22,7 +22,7 @@ declare class RadioEditor extends React.Component<RadioEditorProps> {
|
|
|
22
22
|
url: string;
|
|
23
23
|
label: string;
|
|
24
24
|
};
|
|
25
|
-
static defaultProps:
|
|
25
|
+
static defaultProps: PerseusRadioWidgetOptions;
|
|
26
26
|
choiceRefs: Map<string, React.RefObject<RadioOptionSettingsHandle>>;
|
|
27
27
|
componentDidMount(): void;
|
|
28
28
|
getChoiceRef: (choiceId: string) => React.RefObject<RadioOptionSettingsHandle>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Props = {
|
|
3
|
+
index: number;
|
|
4
|
+
value: string;
|
|
5
|
+
isFirst: boolean;
|
|
6
|
+
isLast: boolean;
|
|
7
|
+
onChange: (value: string) => void;
|
|
8
|
+
onMoveUp: () => void;
|
|
9
|
+
onMoveDown: () => void;
|
|
10
|
+
onDelete: () => void;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* An editor for a single sorter card
|
|
14
|
+
*
|
|
15
|
+
* Renders as a list item, so it belongs inside the sorter editor's list of
|
|
16
|
+
* cards.
|
|
17
|
+
*/
|
|
18
|
+
declare function CardEditor({ index, value, isFirst, isLast, onChange, onMoveUp, onMoveDown, onDelete, }: Props): React.JSX.Element;
|
|
19
|
+
export default CardEditor;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { type PerseusSorterWidgetOptions } from "@khanacademy/perseus-core";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
type Props = PerseusSorterWidgetOptions & {
|
|
4
|
-
onChange: (newOptions: Partial<PerseusSorterWidgetOptions>, callback?: () => void) => void;
|
|
5
|
-
};
|
|
6
3
|
/**
|
|
7
|
-
*
|
|
4
|
+
* Imperative API that WidgetEditor calls
|
|
8
5
|
*/
|
|
9
|
-
|
|
10
|
-
static widgetName: "sorter";
|
|
11
|
-
static defaultProps: PerseusSorterWidgetOptions;
|
|
12
|
-
onLayoutChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
6
|
+
type SorterEditorHandle = {
|
|
13
7
|
serialize: () => PerseusSorterWidgetOptions;
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
8
|
+
getSaveWarnings: () => string[];
|
|
9
|
+
};
|
|
10
|
+
declare const _default: React.ForwardRefExoticComponent<PerseusSorterWidgetOptions & {
|
|
11
|
+
onChange: (newOptions: Partial<PerseusSorterWidgetOptions>, callback?: () => void) => void;
|
|
12
|
+
} & React.RefAttributes<SorterEditorHandle>> & {
|
|
13
|
+
widgetName: "sorter";
|
|
14
|
+
defaultProps: PerseusSorterWidgetOptions;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { components } from "@khanacademy/perseus";
|
|
2
|
-
import { type
|
|
2
|
+
import { type PerseusTableWidgetOptions } from "@khanacademy/perseus-core";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
type Props = any;
|
|
5
5
|
declare class TableEditor extends React.Component<Props> {
|
|
@@ -10,7 +10,7 @@ declare class TableEditor extends React.Component<Props> {
|
|
|
10
10
|
answers: any;
|
|
11
11
|
};
|
|
12
12
|
static widgetName: "table";
|
|
13
|
-
static defaultProps:
|
|
13
|
+
static defaultProps: PerseusTableWidgetOptions;
|
|
14
14
|
numberOfColumns: React.RefObject<components.NumberInput>;
|
|
15
15
|
focus: () => void;
|
|
16
16
|
onSizeInput: (arg1: number, arg2: number) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type PerseusVideoWidgetOptions } from "@khanacademy/perseus-core";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
export interface VideoEditorProps extends PerseusVideoWidgetOptions {
|
|
4
4
|
onChange: (options: PerseusVideoWidgetOptions) => void;
|
|
@@ -8,7 +8,7 @@ export interface VideoEditorProps extends PerseusVideoWidgetOptions {
|
|
|
8
8
|
*/
|
|
9
9
|
declare class VideoEditor extends React.Component<VideoEditorProps> {
|
|
10
10
|
static widgetName: "video";
|
|
11
|
-
static defaultProps:
|
|
11
|
+
static defaultProps: PerseusVideoWidgetOptions;
|
|
12
12
|
serialize: () => PerseusVideoWidgetOptions;
|
|
13
13
|
render(): React.ReactNode;
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Perseus editors",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "38.1.2",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"mafs": "^0.19.0",
|
|
37
37
|
"tiny-invariant": "1.3.1",
|
|
38
38
|
"@khanacademy/kas": "2.2.6",
|
|
39
|
-
"@khanacademy/
|
|
40
|
-
"@khanacademy/
|
|
41
|
-
"@khanacademy/
|
|
42
|
-
"@khanacademy/
|
|
43
|
-
"@khanacademy/perseus-
|
|
44
|
-
"@khanacademy/perseus-
|
|
39
|
+
"@khanacademy/keypad-context": "3.2.87",
|
|
40
|
+
"@khanacademy/kmath": "2.4.46",
|
|
41
|
+
"@khanacademy/math-input": "27.0.8",
|
|
42
|
+
"@khanacademy/perseus": "85.1.2",
|
|
43
|
+
"@khanacademy/perseus-core": "38.0.1",
|
|
44
|
+
"@khanacademy/perseus-linter": "5.2.0",
|
|
45
45
|
"@khanacademy/perseus-utils": "2.1.5"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@khanacademy/mathjax-renderer": "3.
|
|
48
|
+
"@khanacademy/mathjax-renderer": "3.2.0",
|
|
49
49
|
"@khanacademy/wonder-blocks-accordion": "3.1.69",
|
|
50
50
|
"@khanacademy/wonder-blocks-badge": "1.1.21",
|
|
51
51
|
"@khanacademy/wonder-blocks-banner": "5.1.11",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"perseus-build-settings": "0.9.1"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"@khanacademy/mathjax-renderer": "^3.
|
|
80
|
+
"@khanacademy/mathjax-renderer": "^3.2.0",
|
|
81
81
|
"@khanacademy/wonder-blocks-accordion": "^3.1.69",
|
|
82
82
|
"@khanacademy/wonder-blocks-badge": "^1.1.21",
|
|
83
83
|
"@khanacademy/wonder-blocks-banner": "^5.1.11",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
},
|
|
109
109
|
"keywords": [],
|
|
110
110
|
"khan": {
|
|
111
|
-
"catalogHash": "
|
|
111
|
+
"catalogHash": "a12a1605e2325e3e"
|
|
112
112
|
},
|
|
113
113
|
"scripts": {}
|
|
114
114
|
}
|
|
File without changes
|