@khanacademy/perseus 86.0.1 → 87.0.0
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/button-group.d.ts +0 -2
- package/dist/es/index.js +6 -6
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/widgets/graded-group/graded-group.d.ts +18 -37
- package/dist/widgets/graded-group-set/graded-group-set.d.ts +4 -6
- package/package.json +8 -8
|
@@ -1,47 +1,28 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import Renderer from "../../renderer";
|
|
4
|
-
import type { ANSWER_BAR_STATES } from "./graded-group-answer-bar";
|
|
5
|
-
import type { FocusPath, PerseusDependenciesV2, TrackingGradedGroupExtraArguments, Widget, WidgetProps } from "../../types";
|
|
2
|
+
import type { FocusPath, TrackingGradedGroupExtraArguments, WidgetProps } from "../../types";
|
|
6
3
|
import type { GradedGroupPromptJSON } from "../../widget-ai-utils/graded-group/graded-group-ai-utils";
|
|
7
|
-
import type { PerseusGradedGroupWidgetOptions
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
type Props = WidgetProps<PerseusGradedGroupWidgetOptions, Empty, TrackingGradedGroupExtraArguments> & {
|
|
15
|
-
inGradedGroupSet?: boolean;
|
|
16
|
-
onNextQuestion?: () => unknown;
|
|
17
|
-
dependencies: PerseusDependenciesV2;
|
|
18
|
-
};
|
|
19
|
-
type State = {
|
|
20
|
-
status: (typeof GRADING_STATUSES)[keyof typeof GRADING_STATUSES];
|
|
21
|
-
showHint: boolean;
|
|
22
|
-
message: string;
|
|
23
|
-
answerBarState: ANSWER_BAR_STATES;
|
|
24
|
-
};
|
|
25
|
-
export declare class GradedGroup extends React.Component<Props, State> implements Widget {
|
|
26
|
-
static contextType: React.Context<import("../../components/i18n-context").I18nContextType>;
|
|
27
|
-
context: React.ContextType<typeof PerseusI18nContext>;
|
|
28
|
-
state: State;
|
|
29
|
-
rendererRef: React.RefObject<Renderer>;
|
|
30
|
-
hintRendererRef: React.RefObject<Renderer>;
|
|
31
|
-
componentDidMount(): void;
|
|
32
|
-
_handleUserInput(_userInput: UserInputMap, widgetsEmpty: boolean): void;
|
|
33
|
-
_checkAnswer: () => void;
|
|
34
|
-
getInputPaths: () => ReadonlyArray<FocusPath>;
|
|
4
|
+
import type { PerseusGradedGroupWidgetOptions } from "@khanacademy/perseus-core";
|
|
5
|
+
/**
|
|
6
|
+
* Provides a more specific interface than Widget for GradedGroupSet to use.
|
|
7
|
+
*/
|
|
8
|
+
export interface GradedGroupHandle {
|
|
9
|
+
getInputPaths(): ReadonlyArray<FocusPath>;
|
|
35
10
|
getPromptJSON(): GradedGroupPromptJSON;
|
|
36
|
-
focus
|
|
37
|
-
focusInputPath
|
|
38
|
-
blurInputPath
|
|
39
|
-
render(): React.ReactNode;
|
|
11
|
+
focus(): boolean;
|
|
12
|
+
focusInputPath(path: FocusPath): void;
|
|
13
|
+
blurInputPath(path: FocusPath): void;
|
|
40
14
|
}
|
|
15
|
+
export declare const GradedGroup: React.ForwardRefExoticComponent<WidgetProps<PerseusGradedGroupWidgetOptions, Empty, TrackingGradedGroupExtraArguments> & {
|
|
16
|
+
inGradedGroupSet?: boolean;
|
|
17
|
+
onNextQuestion?: () => unknown;
|
|
18
|
+
} & React.RefAttributes<GradedGroupHandle>>;
|
|
41
19
|
declare const _default: {
|
|
42
20
|
name: string;
|
|
43
21
|
displayName: string;
|
|
44
|
-
widget: React.ForwardRefExoticComponent<
|
|
22
|
+
widget: React.ForwardRefExoticComponent<WidgetProps<PerseusGradedGroupWidgetOptions, Empty, TrackingGradedGroupExtraArguments> & {
|
|
23
|
+
inGradedGroupSet?: boolean;
|
|
24
|
+
onNextQuestion?: () => unknown;
|
|
25
|
+
} & React.RefAttributes<GradedGroupHandle>>;
|
|
45
26
|
hidden: false;
|
|
46
27
|
tracking: "all";
|
|
47
28
|
isLintable: true;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Widget, WidgetProps } from "../../types";
|
|
3
3
|
import type { PerseusGradedGroupSetWidgetOptions } from "@khanacademy/perseus-core";
|
|
4
|
-
type Props = WidgetProps<PerseusGradedGroupSetWidgetOptions> & {
|
|
5
|
-
trackInteraction: () => void;
|
|
6
|
-
dependencies: PerseusDependenciesV2;
|
|
7
|
-
};
|
|
8
4
|
declare const _default: {
|
|
9
5
|
name: string;
|
|
10
6
|
displayName: string;
|
|
11
|
-
widget: React.ForwardRefExoticComponent<
|
|
7
|
+
widget: React.ForwardRefExoticComponent<WidgetProps<PerseusGradedGroupSetWidgetOptions> & {
|
|
8
|
+
trackInteraction: () => void;
|
|
9
|
+
} & React.RefAttributes<Widget>>;
|
|
12
10
|
hidden: false;
|
|
13
11
|
tracking: "all";
|
|
14
12
|
isLintable: true;
|
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": "
|
|
6
|
+
"version": "87.0.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"uuid": "^10.0.0",
|
|
46
46
|
"jquery": "^2.1.1",
|
|
47
47
|
"@khanacademy/kas": "2.2.6",
|
|
48
|
-
"@khanacademy/keypad-context": "3.2.89",
|
|
49
|
-
"@khanacademy/kmath": "2.4.48",
|
|
50
48
|
"@khanacademy/math-input": "27.0.11",
|
|
51
49
|
"@khanacademy/perseus-core": "38.1.1",
|
|
52
|
-
"@khanacademy/perseus-linter": "5.
|
|
50
|
+
"@khanacademy/perseus-linter": "5.3.0",
|
|
53
51
|
"@khanacademy/perseus-score": "8.12.21",
|
|
52
|
+
"@khanacademy/perseus-utils": "2.1.5",
|
|
54
53
|
"@khanacademy/pure-markdown": "2.3.2",
|
|
55
54
|
"@khanacademy/simple-markdown": "3.0.1",
|
|
56
|
-
"@khanacademy/
|
|
55
|
+
"@khanacademy/keypad-context": "3.2.89",
|
|
56
|
+
"@khanacademy/kmath": "2.4.48"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@khanacademy/wonder-blocks-announcer": "1.1.1",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@khanacademy/wonder-blocks-data": "15.0.3",
|
|
65
65
|
"@khanacademy/wonder-blocks-dropdown": "10.12.0",
|
|
66
66
|
"@khanacademy/wonder-blocks-form": "7.6.10",
|
|
67
|
-
"@khanacademy/wonder-blocks-icon": "
|
|
67
|
+
"@khanacademy/wonder-blocks-icon": "6.0.0",
|
|
68
68
|
"@khanacademy/wonder-blocks-icon-button": "11.4.5",
|
|
69
69
|
"@khanacademy/wonder-blocks-labeled-field": "4.1.9",
|
|
70
70
|
"@khanacademy/wonder-blocks-layout": "3.1.60",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"@khanacademy/wonder-blocks-data": "^15.0.3",
|
|
101
101
|
"@khanacademy/wonder-blocks-dropdown": "^10.12.0",
|
|
102
102
|
"@khanacademy/wonder-blocks-form": "^7.6.10",
|
|
103
|
-
"@khanacademy/wonder-blocks-icon": "^
|
|
103
|
+
"@khanacademy/wonder-blocks-icon": "^6.0.0",
|
|
104
104
|
"@khanacademy/wonder-blocks-icon-button": "^11.4.5",
|
|
105
105
|
"@khanacademy/wonder-blocks-labeled-field": "^4.1.9",
|
|
106
106
|
"@khanacademy/wonder-blocks-layout": "^3.1.60",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
},
|
|
128
128
|
"keywords": [],
|
|
129
129
|
"khan": {
|
|
130
|
-
"catalogHash": "
|
|
130
|
+
"catalogHash": "c99ab3425f4c3dbc"
|
|
131
131
|
},
|
|
132
132
|
"scripts": {}
|
|
133
133
|
}
|