@khanacademy/perseus 71.1.0 → 71.2.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/math-input.d.ts +1 -0
- package/dist/es/index.css +2 -2
- package/dist/es/index.css.map +1 -1
- package/dist/es/index.js +11 -11
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/widgets/dropdown/dropdown.d.ts +3 -1
- package/dist/widgets/expression/expression.d.ts +4 -2
- package/dist/widgets/input-number/input-number.d.ts +2 -0
- package/dist/widgets/label-image/label-image.d.ts +2 -0
- package/dist/widgets/numeric-input/numeric-input.class.d.ts +3 -1
- package/package.json +8 -8
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
3
3
|
import type { Widget, WidgetProps } from "../../types";
|
|
4
4
|
import type { DropdownPromptJSON } from "../../widget-ai-utils/dropdown/dropdown-ai-utils";
|
|
5
|
-
import type {
|
|
5
|
+
import type { PerseusDropdownUserInput, PerseusDropdownWidgetOptions } from "@khanacademy/perseus-core";
|
|
6
6
|
type Props = WidgetProps<PerseusDropdownWidgetOptions, PerseusDropdownUserInput>;
|
|
7
7
|
type DefaultProps = {
|
|
8
8
|
choices: Props["choices"];
|
|
@@ -31,11 +31,13 @@ declare class Dropdown extends React.Component<Props> implements Widget {
|
|
|
31
31
|
*/
|
|
32
32
|
declare function getUserInputFromSerializedState(serializedState: any): PerseusDropdownUserInput;
|
|
33
33
|
declare function getStartUserInput(): PerseusDropdownUserInput;
|
|
34
|
+
declare function getCorrectUserInput(options: PerseusDropdownWidgetOptions): PerseusDropdownUserInput;
|
|
34
35
|
declare const _default: {
|
|
35
36
|
name: string;
|
|
36
37
|
displayName: string;
|
|
37
38
|
widget: typeof Dropdown;
|
|
38
39
|
getStartUserInput: typeof getStartUserInput;
|
|
40
|
+
getCorrectUserInput: typeof getCorrectUserInput;
|
|
39
41
|
getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
|
|
40
42
|
};
|
|
41
43
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
3
3
|
import type { DependenciesContext } from "../../dependencies";
|
|
4
|
-
import type {
|
|
4
|
+
import type { Widget, WidgetProps } from "../../types";
|
|
5
5
|
import type { ExpressionPromptJSON } from "../../widget-ai-utils/expression/expression-ai-utils";
|
|
6
|
-
import type {
|
|
6
|
+
import type { KeypadConfiguration, KeypadKey, PerseusExpressionRubric, PerseusExpressionUserInput, PerseusExpressionWidgetOptions } from "@khanacademy/perseus-core";
|
|
7
7
|
type InputPath = ReadonlyArray<string>;
|
|
8
8
|
type ExternalProps = WidgetProps<PerseusExpressionWidgetOptions, PerseusExpressionUserInput>;
|
|
9
9
|
type Props = ExternalProps & Partial<React.ContextType<typeof DependenciesContext>> & {
|
|
@@ -141,6 +141,7 @@ export declare class Expression extends React.Component<Props> implements Widget
|
|
|
141
141
|
declare function getUserInputFromSerializedState(serializedState: any): PerseusExpressionUserInput;
|
|
142
142
|
declare function getStartUserInput(): PerseusExpressionUserInput;
|
|
143
143
|
declare function getOneCorrectAnswerFromRubric(rubric: PerseusExpressionRubric): string | null | undefined;
|
|
144
|
+
declare function getCorrectUserInput(options: PerseusExpressionWidgetOptions): PerseusExpressionUserInput;
|
|
144
145
|
declare const _default: {
|
|
145
146
|
name: string;
|
|
146
147
|
displayName: string;
|
|
@@ -214,6 +215,7 @@ declare const _default: {
|
|
|
214
215
|
isLintable: true;
|
|
215
216
|
getOneCorrectAnswerFromRubric: typeof getOneCorrectAnswerFromRubric;
|
|
216
217
|
getStartUserInput: typeof getStartUserInput;
|
|
218
|
+
getCorrectUserInput: typeof getCorrectUserInput;
|
|
217
219
|
getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
|
|
218
220
|
};
|
|
219
221
|
export default _default;
|
|
@@ -40,6 +40,7 @@ declare function getOneCorrectAnswerFromRubric(rubric: any): string | undefined;
|
|
|
40
40
|
*/
|
|
41
41
|
declare function getUserInputFromSerializedState(serializedState: any): PerseusInputNumberUserInput;
|
|
42
42
|
declare function getStartUserInput(): PerseusInputNumberUserInput;
|
|
43
|
+
declare function getCorrectUserInput(options: PerseusInputNumberWidgetOptions): PerseusInputNumberUserInput;
|
|
43
44
|
declare const _default: {
|
|
44
45
|
name: string;
|
|
45
46
|
displayName: string;
|
|
@@ -48,6 +49,7 @@ declare const _default: {
|
|
|
48
49
|
isLintable: true;
|
|
49
50
|
getOneCorrectAnswerFromRubric: typeof getOneCorrectAnswerFromRubric;
|
|
50
51
|
getStartUserInput: typeof getStartUserInput;
|
|
52
|
+
getCorrectUserInput: typeof getCorrectUserInput;
|
|
51
53
|
getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
|
|
52
54
|
};
|
|
53
55
|
export default _default;
|
|
@@ -105,6 +105,7 @@ declare function getStartUserInput(options: LabelImagePublicWidgetOptions): Pers
|
|
|
105
105
|
* [LEMS-3185] do not trust serializedState
|
|
106
106
|
*/
|
|
107
107
|
declare function getUserInputFromSerializedState(serializedState: any): PerseusLabelImageUserInput;
|
|
108
|
+
declare function getCorrectUserInput(options: PerseusLabelImageWidgetOptions): PerseusLabelImageUserInput;
|
|
108
109
|
declare const _default: {
|
|
109
110
|
name: string;
|
|
110
111
|
displayName: string;
|
|
@@ -116,6 +117,7 @@ declare const _default: {
|
|
|
116
117
|
}, keyof import("../..").PerseusDependenciesV2> & React.RefAttributes<LabelImage>>;
|
|
117
118
|
isLintable: true;
|
|
118
119
|
getStartUserInput: typeof getStartUserInput;
|
|
120
|
+
getCorrectUserInput: typeof getCorrectUserInput;
|
|
119
121
|
getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
|
|
120
122
|
};
|
|
121
123
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Focusable, Widget, WidgetProps } from "../../types";
|
|
3
3
|
import type { NumericInputPromptJSON } from "../../widget-ai-utils/numeric-input/prompt-utils";
|
|
4
|
-
import type {
|
|
4
|
+
import type { PerseusNumericInputAnswerForm, PerseusNumericInputRubric, PerseusNumericInputUserInput, PerseusNumericInputWidgetOptions } from "@khanacademy/perseus-core";
|
|
5
5
|
type ExternalProps = WidgetProps<PerseusNumericInputWidgetOptions, PerseusNumericInputUserInput>;
|
|
6
6
|
export type NumericInputProps = ExternalProps & {
|
|
7
7
|
size: NonNullable<ExternalProps["size"]>;
|
|
@@ -116,11 +116,13 @@ declare function getStartUserInput(): PerseusNumericInputUserInput;
|
|
|
116
116
|
* [LEMS-3185] do not trust serializedState
|
|
117
117
|
*/
|
|
118
118
|
declare function getUserInputFromSerializedState(serializedState: any): PerseusNumericInputUserInput;
|
|
119
|
+
declare function getCorrectUserInput(options: PerseusNumericInputWidgetOptions): PerseusNumericInputUserInput;
|
|
119
120
|
declare const _default: {
|
|
120
121
|
name: string;
|
|
121
122
|
displayName: string;
|
|
122
123
|
widget: typeof NumericInput;
|
|
123
124
|
isLintable: true;
|
|
125
|
+
getCorrectUserInput: typeof getCorrectUserInput;
|
|
124
126
|
getOneCorrectAnswerFromRubric(rubric: PerseusNumericInputRubric): string | null | undefined;
|
|
125
127
|
getStartUserInput: typeof getStartUserInput;
|
|
126
128
|
getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
|
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": "71.
|
|
6
|
+
"version": "71.2.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
"tiny-invariant": "1.3.1",
|
|
43
43
|
"uuid": "^10.0.0",
|
|
44
44
|
"@khanacademy/kas": "2.1.2",
|
|
45
|
-
"@khanacademy/keypad-context": "3.2.
|
|
46
|
-
"@khanacademy/kmath": "2.2.
|
|
47
|
-
"@khanacademy/math-input": "26.2.
|
|
48
|
-
"@khanacademy/perseus-core": "19.
|
|
49
|
-
"@khanacademy/perseus-linter": "4.
|
|
50
|
-
"@khanacademy/perseus-score": "7.7.9",
|
|
45
|
+
"@khanacademy/keypad-context": "3.2.10",
|
|
46
|
+
"@khanacademy/kmath": "2.2.10",
|
|
47
|
+
"@khanacademy/math-input": "26.2.11",
|
|
48
|
+
"@khanacademy/perseus-core": "19.5.0",
|
|
49
|
+
"@khanacademy/perseus-linter": "4.4.0",
|
|
51
50
|
"@khanacademy/perseus-utils": "2.1.0",
|
|
52
51
|
"@khanacademy/pure-markdown": "2.2.0",
|
|
53
|
-
"@khanacademy/simple-markdown": "2.1.0"
|
|
52
|
+
"@khanacademy/simple-markdown": "2.1.0",
|
|
53
|
+
"@khanacademy/perseus-score": "7.7.10"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@khanacademy/wonder-blocks-announcer": "1.0.3",
|