@khanacademy/perseus-editor 13.1.0 → 14.0.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/all-editors.d.ts +1 -4
- package/dist/components/hover-behavior.d.ts +2 -2
- package/dist/components/widget-editor.d.ts +1 -1
- package/dist/es/index.js +187 -624
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +745 -1210
- package/dist/index.js.map +1 -1
- package/dist/widgets/expression-editor.d.ts +1 -1
- package/dist/widgets/graded-group-editor.d.ts +1 -1
- package/dist/widgets/grapher-editor.d.ts +1 -1
- package/dist/widgets/group-editor.d.ts +1 -1
- package/dist/widgets/iframe-editor.d.ts +1 -1
- package/dist/widgets/image-editor.d.ts +2 -2
- package/dist/widgets/input-number-editor.d.ts +1 -1
- package/dist/widgets/interactive-graph-editor.d.ts +30 -38
- package/dist/widgets/matcher-editor.d.ts +1 -1
- package/dist/widgets/matrix-editor.d.ts +1 -1
- package/dist/widgets/measurer-editor.d.ts +1 -1
- package/dist/widgets/numeric-input-editor.d.ts +1 -1
- package/dist/widgets/orderer-editor.d.ts +1 -1
- package/dist/widgets/phet-simulation-editor.d.ts +2 -1
- package/dist/widgets/radio/editor.d.ts +1 -1
- package/dist/widgets/table-editor.d.ts +1 -1
- package/package.json +2 -2
- package/dist/all-widgets.d.ts +0 -22
- package/dist/testing-widgets.d.ts +0 -22
- package/dist/widgets/example-graphie-widget-editor.d.ts +0 -18
- package/dist/widgets/example-graphie-widget.d.ts +0 -61
- package/dist/widgets/example-widget-editor.d.ts +0 -20
- package/dist/widgets/example-widget.d.ts +0 -89
- package/dist/widgets/simple-markdown-tester-editor.d.ts +0 -21
- package/dist/widgets/simple-markdown-tester.d.ts +0 -54
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
type TextAreaProps = any;
|
|
3
|
-
declare class TextArea extends React.Component<TextAreaProps> {
|
|
4
|
-
render(): React.ReactNode;
|
|
5
|
-
focus: () => boolean;
|
|
6
|
-
changeValue: (e: any) => void;
|
|
7
|
-
}
|
|
8
|
-
type SimpleMarkdownTesterEditorProps = any;
|
|
9
|
-
declare class SimpleMarkdownTesterEditor extends React.Component<SimpleMarkdownTesterEditorProps> {
|
|
10
|
-
static propTypes: {
|
|
11
|
-
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
12
|
-
};
|
|
13
|
-
static widgetName: "simple-markdown-tester";
|
|
14
|
-
static defaultProps: SimpleMarkdownTesterEditorProps;
|
|
15
|
-
input: React.RefObject<TextArea>;
|
|
16
|
-
render(): React.ReactNode;
|
|
17
|
-
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
18
|
-
focus: () => boolean;
|
|
19
|
-
serialize: () => any;
|
|
20
|
-
}
|
|
21
|
-
export default SimpleMarkdownTesterEditor;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Changeable } from "@khanacademy/perseus";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import type { PerseusSimpleMarkdownTesterWidgetOptions } from "@khanacademy/perseus";
|
|
4
|
-
type Props = Changeable.ChangeableProps & {
|
|
5
|
-
value: PerseusSimpleMarkdownTesterWidgetOptions["value"];
|
|
6
|
-
};
|
|
7
|
-
type DefaultProps = {
|
|
8
|
-
value: Props["value"];
|
|
9
|
-
};
|
|
10
|
-
declare class SimpleMarkdownTester extends React.Component<Props> {
|
|
11
|
-
static defaultProps: DefaultProps;
|
|
12
|
-
/**
|
|
13
|
-
* This is the widget's grading function.
|
|
14
|
-
*
|
|
15
|
-
* simpleValidate generally defers to this function
|
|
16
|
-
*
|
|
17
|
-
* state is usually the result of toJSON on the widget
|
|
18
|
-
* rubric is the result of calling toJSON() on the editor
|
|
19
|
-
*/
|
|
20
|
-
static validate(state: any, rubric: any): any;
|
|
21
|
-
change: (arg1: any, arg2: any, arg3: any) => any;
|
|
22
|
-
toJSON: () => Record<any, any>;
|
|
23
|
-
render(): React.ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* Widgets that are focusable should add a focus method that returns
|
|
26
|
-
* true if focusing succeeded. The first such widget found will be
|
|
27
|
-
* focused on page load.
|
|
28
|
-
*/
|
|
29
|
-
focus: () => boolean;
|
|
30
|
-
/**
|
|
31
|
-
* simpleValidate is called for grading. Rubric is the result of calling
|
|
32
|
-
* toJSON() on the editor that created this widget.
|
|
33
|
-
*
|
|
34
|
-
* Should return an object representing the grading result, such as
|
|
35
|
-
* {
|
|
36
|
-
* type: "points",
|
|
37
|
-
* earned: 1,
|
|
38
|
-
* total: 1,
|
|
39
|
-
* message: null
|
|
40
|
-
* }
|
|
41
|
-
*/
|
|
42
|
-
simpleValidate: (arg1: any) => any;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* For this widget to work, we must import this file in src/all-widgets.js
|
|
46
|
-
*/
|
|
47
|
-
declare const _default: {
|
|
48
|
-
name: string;
|
|
49
|
-
displayName: string;
|
|
50
|
-
hidden: boolean;
|
|
51
|
-
widget: typeof SimpleMarkdownTester;
|
|
52
|
-
transform: <T>(value: T) => T;
|
|
53
|
-
};
|
|
54
|
-
export default _default;
|