@khanacademy/perseus 90.0.1 → 90.1.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/{chunk-register-all-widgets-for-testing-BTFpfYiU.js → chunk-register-all-widgets-for-testing-B94oNv6V.js} +19 -10
- package/dist/chunk-register-all-widgets-for-testing-B94oNv6V.js.map +1 -0
- package/dist/icon-paths.d.ts +0 -20
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/strings.d.ts +2 -0
- package/dist/strings.js +1 -1
- package/dist/strings.js.map +1 -1
- package/dist/testing.js +4 -1
- package/dist/testing.js.map +1 -1
- package/dist/widgets/graded-group/graded-group-answer-bar.d.ts +6 -9
- package/dist/widgets/iframe/iframe.d.ts +2 -22
- package/dist/widgets/radio/radio-component.d.ts +2 -1
- package/package.json +9 -9
- package/dist/chunk-register-all-widgets-for-testing-BTFpfYiU.js.map +0 -1
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export type
|
|
2
|
+
import type { APIOptions, TrackingGradedGroupExtraArguments } from "../../types";
|
|
3
|
+
export type GradingStatus = TrackingGradedGroupExtraArguments["status"];
|
|
4
|
+
export type AnswerBarState = "active" | GradingStatus;
|
|
5
5
|
type Props = {
|
|
6
|
-
answerBarState:
|
|
6
|
+
answerBarState: AnswerBarState;
|
|
7
7
|
apiOptions: APIOptions;
|
|
8
|
+
invalidMessage?: string;
|
|
8
9
|
onCheckAnswer: () => unknown;
|
|
9
10
|
onNextQuestion?: () => unknown;
|
|
10
11
|
};
|
|
11
|
-
declare
|
|
12
|
-
static contextType: React.Context<import("../../components/i18n-context").I18nContextType>;
|
|
13
|
-
context: React.ContextType<typeof PerseusI18nContext>;
|
|
14
|
-
render(): React.ReactNode;
|
|
15
|
-
}
|
|
12
|
+
declare function GradedGroupAnswerBar({ apiOptions, answerBarState, invalidMessage, onCheckAnswer, onNextQuestion, }: Props): React.JSX.Element;
|
|
16
13
|
export default GradedGroupAnswerBar;
|
|
@@ -6,30 +6,10 @@
|
|
|
6
6
|
* It's particularly well suited for embedding our ProcessingJS programs,
|
|
7
7
|
* but could also be used for embedding viz's hosted elsewhere.
|
|
8
8
|
*/
|
|
9
|
-
import
|
|
10
|
-
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
9
|
+
import React from "react";
|
|
11
10
|
import type { WidgetProps, Widget } from "../../types";
|
|
12
|
-
import type { UnsupportedWidgetPromptJSON } from "../../widget-ai-utils/unsupported-widget";
|
|
13
11
|
import type { PerseusIFrameUserInput, PerseusIFrameWidgetOptions } from "@khanacademy/perseus-core";
|
|
14
12
|
type Props = WidgetProps<PerseusIFrameWidgetOptions, PerseusIFrameUserInput>;
|
|
15
|
-
type DefaultProps = {
|
|
16
|
-
userInput: Props["userInput"];
|
|
17
|
-
};
|
|
18
|
-
declare class Iframe extends React.Component<Props> implements Widget {
|
|
19
|
-
static contextType: React.Context<import("../../components/i18n-context").I18nContextType>;
|
|
20
|
-
context: React.ContextType<typeof PerseusI18nContext>;
|
|
21
|
-
static defaultProps: DefaultProps;
|
|
22
|
-
componentDidMount(): void;
|
|
23
|
-
componentWillUnmount(): void;
|
|
24
|
-
getPromptJSON(): UnsupportedWidgetPromptJSON;
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated and likely very broken API
|
|
27
|
-
* [LEMS-3185] do not trust serializedState
|
|
28
|
-
*/
|
|
29
|
-
getSerializedState(): any;
|
|
30
|
-
handleMessageEvent: (arg1: MessageEvent) => void;
|
|
31
|
-
render(): React.ReactNode;
|
|
32
|
-
}
|
|
33
13
|
/**
|
|
34
14
|
* @deprecated and likely a very broken API
|
|
35
15
|
* [LEMS-3185] do not trust serializedState
|
|
@@ -39,7 +19,7 @@ declare function getStartUserInput(): PerseusIFrameUserInput;
|
|
|
39
19
|
declare const _default: {
|
|
40
20
|
name: string;
|
|
41
21
|
displayName: string;
|
|
42
|
-
widget:
|
|
22
|
+
widget: React.ForwardRefExoticComponent<Props & React.RefAttributes<Widget>>;
|
|
43
23
|
hidden: true;
|
|
44
24
|
getStartUserInput: typeof getStartUserInput;
|
|
45
25
|
getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
|
|
@@ -10,6 +10,7 @@ export interface RadioComponentProps {
|
|
|
10
10
|
numCorrect: number;
|
|
11
11
|
onChoiceChange: (choiceId: string, newCheckedState: boolean) => void;
|
|
12
12
|
reviewMode: boolean;
|
|
13
|
+
isRequired?: boolean;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* The RadioComponent renders the UI for multiple choice questions.
|
|
@@ -49,5 +50,5 @@ export interface RadioComponentProps {
|
|
|
49
50
|
*
|
|
50
51
|
* Created as part of the Radio Revitalization Project (LEMS-2933).
|
|
51
52
|
*/
|
|
52
|
-
declare const RadioComponent: ({ choices, countChoices, multipleSelect, numCorrect, onChoiceChange, reviewMode, }: RadioComponentProps) => React.ReactElement;
|
|
53
|
+
declare const RadioComponent: ({ choices, countChoices, multipleSelect, numCorrect, onChoiceChange, reviewMode, isRequired, }: RadioComponentProps) => React.ReactElement;
|
|
53
54
|
export default RadioComponent;
|
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": "90.0
|
|
6
|
+
"version": "90.1.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"mafs": "0.19.0",
|
|
35
35
|
"tiny-invariant": "1.3.1",
|
|
36
36
|
"uuid": "^10.0.0",
|
|
37
|
-
"@khanacademy/kas": "3.0.0",
|
|
38
37
|
"@khanacademy/keypad-context": "6.0.2",
|
|
39
38
|
"@khanacademy/kmath": "3.0.3",
|
|
40
|
-
"@khanacademy/math-input": "30.0.2",
|
|
41
39
|
"@khanacademy/perseus-core": "41.0.0",
|
|
42
|
-
"@khanacademy/
|
|
40
|
+
"@khanacademy/math-input": "30.0.3",
|
|
41
|
+
"@khanacademy/kas": "3.0.0",
|
|
42
|
+
"@khanacademy/perseus-linter": "6.1.0",
|
|
43
43
|
"@khanacademy/perseus-score": "9.0.3",
|
|
44
44
|
"@khanacademy/perseus-utils": "3.0.0",
|
|
45
45
|
"@khanacademy/pure-markdown": "3.0.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@khanacademy/wonder-blocks-clickable": "8.3.1",
|
|
53
53
|
"@khanacademy/wonder-blocks-core": "12.5.0",
|
|
54
54
|
"@khanacademy/wonder-blocks-data": "15.1.0",
|
|
55
|
-
"@khanacademy/wonder-blocks-dropdown": "10.
|
|
55
|
+
"@khanacademy/wonder-blocks-dropdown": "10.13.0",
|
|
56
56
|
"@khanacademy/wonder-blocks-form": "7.6.15",
|
|
57
57
|
"@khanacademy/wonder-blocks-icon": "6.0.2",
|
|
58
58
|
"@khanacademy/wonder-blocks-icon-button": "12.0.1",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@khanacademy/wonder-blocks-link": "10.4.1",
|
|
62
62
|
"@khanacademy/wonder-blocks-modal": "8.9.0",
|
|
63
63
|
"@khanacademy/wonder-blocks-pill": "3.1.78",
|
|
64
|
-
"@khanacademy/wonder-blocks-popover": "
|
|
64
|
+
"@khanacademy/wonder-blocks-popover": "7.0.0",
|
|
65
65
|
"@khanacademy/wonder-blocks-progress-spinner": "3.1.62",
|
|
66
66
|
"@khanacademy/wonder-blocks-switch": "3.4.14",
|
|
67
67
|
"@khanacademy/wonder-blocks-timing": "7.1.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@khanacademy/wonder-blocks-clickable": "^8.3.1",
|
|
89
89
|
"@khanacademy/wonder-blocks-core": "^12.5.0",
|
|
90
90
|
"@khanacademy/wonder-blocks-data": "^15.1.0",
|
|
91
|
-
"@khanacademy/wonder-blocks-dropdown": "^10.
|
|
91
|
+
"@khanacademy/wonder-blocks-dropdown": "^10.13.0",
|
|
92
92
|
"@khanacademy/wonder-blocks-form": "^7.6.15",
|
|
93
93
|
"@khanacademy/wonder-blocks-icon": "^6.0.2",
|
|
94
94
|
"@khanacademy/wonder-blocks-icon-button": "^12.0.1",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"@khanacademy/wonder-blocks-link": "^10.4.1",
|
|
98
98
|
"@khanacademy/wonder-blocks-modal": "^8.9.0",
|
|
99
99
|
"@khanacademy/wonder-blocks-pill": "^3.1.78",
|
|
100
|
-
"@khanacademy/wonder-blocks-popover": "^
|
|
100
|
+
"@khanacademy/wonder-blocks-popover": "^7.0.0",
|
|
101
101
|
"@khanacademy/wonder-blocks-progress-spinner": "^3.1.62",
|
|
102
102
|
"@khanacademy/wonder-blocks-switch": "^3.4.14",
|
|
103
103
|
"@khanacademy/wonder-blocks-timing": "^7.1.0",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
},
|
|
118
118
|
"keywords": [],
|
|
119
119
|
"khan": {
|
|
120
|
-
"catalogHash": "
|
|
120
|
+
"catalogHash": "e8edf77dbb8ea2a1"
|
|
121
121
|
},
|
|
122
122
|
"scripts": {}
|
|
123
123
|
}
|