@khanacademy/perseus 19.6.1 → 19.6.3
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/es/index.js +22 -17
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +17 -12
- package/dist/index.js.map +1 -1
- package/dist/renderer.d.ts +9 -0
- package/dist/widgets/categorizer.d.ts +1 -1
- package/package.json +2 -2
package/dist/renderer.d.ts
CHANGED
|
@@ -20,6 +20,15 @@ type WidgetUserInput = any;
|
|
|
20
20
|
type SerializedState = {
|
|
21
21
|
[id: string]: any;
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* The Widget type represents the common API that the Renderer uses to interact
|
|
25
|
+
* with all widgets. All widgets must implement the methods in this API, unless
|
|
26
|
+
* they are marked as optional (?: ...).
|
|
27
|
+
*
|
|
28
|
+
* These methods are called on the widget ref and allow the renderer to
|
|
29
|
+
* communicate with the individual widgets to coordinate actions such as
|
|
30
|
+
* scoring, state serialization/deserialization, and focus management.
|
|
31
|
+
*/
|
|
23
32
|
export type Widget = {
|
|
24
33
|
focus: () => {
|
|
25
34
|
id: string;
|
|
@@ -21,7 +21,7 @@ export declare class Categorizer extends React.Component<Props, State> {
|
|
|
21
21
|
change: (...args: ReadonlyArray<unknown>) => any;
|
|
22
22
|
getUserInput: () => UserInput;
|
|
23
23
|
render(): React.ReactNode;
|
|
24
|
-
onChange
|
|
24
|
+
onChange(itemNum: any, catNum: any): void;
|
|
25
25
|
simpleValidate: (arg1: Rubric) => PerseusScore;
|
|
26
26
|
static validate(userInput: UserInput, rubric: Rubric): PerseusScore;
|
|
27
27
|
static getUserInputFromProps(props: Props): UserInput;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Core Perseus API (includes renderers and widgets)",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "19.6.
|
|
6
|
+
"version": "19.6.3",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@khanacademy/kas": "^0.3.8",
|
|
29
29
|
"@khanacademy/kmath": "^0.1.12",
|
|
30
|
-
"@khanacademy/math-input": "^17.2.
|
|
30
|
+
"@khanacademy/math-input": "^17.2.1",
|
|
31
31
|
"@khanacademy/perseus-core": "1.4.2",
|
|
32
32
|
"@khanacademy/perseus-linter": "^0.3.12",
|
|
33
33
|
"@khanacademy/pure-markdown": "^0.3.0",
|