@khanacademy/perseus 91.1.0 → 92.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/{chunk-register-all-widgets-for-testing-CWjQ_I3u.js → chunk-register-all-widgets-for-testing-BqbrdgLs.js} +17 -25
- package/dist/chunk-register-all-widgets-for-testing-BqbrdgLs.js.map +1 -0
- package/dist/components/number-input.d.ts +66 -39
- package/dist/components/range-input.d.ts +39 -12
- package/dist/components/unsupported-widget-message.d.ts +14 -0
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/strings.d.ts +2 -2
- package/dist/strings.js +1 -1
- package/dist/strings.js.map +1 -1
- package/dist/testing.js +2 -2
- package/dist/util/register-all-widgets-for-testing.d.ts +1 -2
- package/dist/util/widget-enum-utils.d.ts +1 -1
- package/dist/util.d.ts +2 -3
- package/dist/widgets.d.ts +0 -30
- package/package.json +20 -20
- package/dist/chunk-register-all-widgets-for-testing-CWjQ_I3u.js.map +0 -1
- package/dist/widgets/deprecated-standin/deprecated-standin.d.ts +0 -9
- package/dist/widgets/deprecated-standin/index.d.ts +0 -1
package/dist/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a5 as registerAllWidgetsForTesting, j as jsxRuntimeExports } from './chunk-register-all-widgets-for-testing-BqbrdgLs.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { View } from '@khanacademy/wonder-blocks-core';
|
|
4
4
|
import { spacing } from '@khanacademy/wonder-blocks-tokens';
|
|
@@ -32,6 +32,7 @@ import '@khanacademy/simple-markdown';
|
|
|
32
32
|
import '@khanacademy/pure-markdown';
|
|
33
33
|
import '@phosphor-icons/core/fill/dot-outline-fill.svg';
|
|
34
34
|
import '@phosphor-icons/core/fill/warning-circle-fill.svg';
|
|
35
|
+
import '@khanacademy/wonder-blocks-banner';
|
|
35
36
|
import '@khanacademy/wonder-blocks-announcer';
|
|
36
37
|
import '@phosphor-icons/core/regular/caret-left.svg';
|
|
37
38
|
import '@phosphor-icons/core/regular/caret-right.svg';
|
|
@@ -39,7 +40,6 @@ import '@khanacademy/wonder-blocks-icon';
|
|
|
39
40
|
import '@phosphor-icons/core/bold/check-bold.svg';
|
|
40
41
|
import '@phosphor-icons/core/bold/minus-circle-bold.svg';
|
|
41
42
|
import '@dnd-kit/react';
|
|
42
|
-
import '@khanacademy/wonder-blocks-banner';
|
|
43
43
|
import '@khanacademy/wonder-blocks-dropdown';
|
|
44
44
|
import '@khanacademy/wonder-blocks-button';
|
|
45
45
|
import '@phosphor-icons/core/regular/caret-down.svg';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Some tests require some or all of the widgets and editors to be registered
|
|
3
|
-
* in order for them to work. This function registers all built-in widgets
|
|
4
|
-
* (and registers the deprecated-standin for deprecated widgets).
|
|
3
|
+
* in order for them to work. This function registers all built-in widgets.
|
|
5
4
|
*
|
|
6
5
|
* @hidden - not for use outside of the project.
|
|
7
6
|
*/
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* PerseusWidgetUsedInProblemAttempt CEDAR event, we needed
|
|
5
5
|
* to: get the type and convert that to an enum value.
|
|
6
6
|
*/
|
|
7
|
-
type WidgetEnum = "BLANK" | "CATEGORIZER" | "CS_PROGRAM" | "DEFINITION" | "
|
|
7
|
+
type WidgetEnum = "BLANK" | "CATEGORIZER" | "CS_PROGRAM" | "DEFINITION" | "DROPDOWN" | "EXPLANATION" | "EXPRESSION" | "FILL_IN_THE_BLANK" | "FREE_RESPONSE" | "GRADED_GROUP" | "GRADED_GROUP_SET" | "GRAPHER" | "GROUP" | "IFRAME" | "IMAGE" | "INPUT_NUMBER" | "INTERACTIVE" | "INTERACTIVE_GRAPH" | "LABEL_IMAGE" | "LIGHTS_PUZZLE" | "MATCHER" | "MATRIX" | "MEASURER" | "MOLECULE" | "NUMBER_LINE" | "NUMERIC_INPUT" | "ORDERER" | "PASSAGE" | "PASSAGE_REF" | "PASSAGE_REF_TARGET" | "PHET_SIMULATION" | "PLOTTER" | "PYTHON_PROGRAM" | "REACTION_DIAGRAM" | "RADIO" | "SEQUENCE" | "SIMULATOR" | "SORTER" | "TABLE" | "UNIT" | "VIDEO";
|
|
8
8
|
export declare function convertWidgetNameToEnum(name: string): WidgetEnum;
|
|
9
9
|
export {};
|
package/dist/util.d.ts
CHANGED
|
@@ -63,10 +63,9 @@ declare function joinAdjacentTextNodes(ast: ASTNode): ASTNode;
|
|
|
63
63
|
*/
|
|
64
64
|
declare function splitBlockWidgetsFromParagraphs(ast: ASTNode): ASTNode;
|
|
65
65
|
/**
|
|
66
|
-
* Return the first valid interpretation of 'text' as a number
|
|
67
|
-
* {value: 2.3, exact: true}.
|
|
66
|
+
* Return the first valid interpretation of 'text' as a number.
|
|
68
67
|
*/
|
|
69
|
-
declare function firstNumericalParse(text: string):
|
|
68
|
+
declare function firstNumericalParse(text: string | number | null): number | null | undefined;
|
|
70
69
|
declare function stringArrayOfSize(size: number): string[];
|
|
71
70
|
declare function stringArrayOfSize2D(opt: {
|
|
72
71
|
rows: number;
|
package/dist/widgets.d.ts
CHANGED
|
@@ -1,38 +1,9 @@
|
|
|
1
1
|
import type { Tracking, WidgetExports } from "./types";
|
|
2
2
|
import type * as React from "react";
|
|
3
|
-
type Editor = any;
|
|
4
3
|
export declare const registerWidget: (type: string, widget: WidgetExports) => void;
|
|
5
4
|
export declare const registerWidgets: (widgetArr: ReadonlyArray<WidgetExports>) => void;
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param type - the widget that you are trying to replace
|
|
9
|
-
* @param replacementType - the type of the widget that takes its place
|
|
10
|
-
*
|
|
11
|
-
* e.g. replaceWidget("transformer", "deprecated-standin") will make it so the
|
|
12
|
-
* transformer widget is replaced by the always correct widget
|
|
13
|
-
*/
|
|
14
|
-
export declare const replaceWidget: (type: string, replacementType: string) => void;
|
|
15
|
-
export declare const replaceDeprecatedWidgets: () => void;
|
|
16
|
-
/**
|
|
17
|
-
* Register widget editors, keyed by the type of widget each one edits.
|
|
18
|
-
*
|
|
19
|
-
* The keys are widget types as they appear in Perseus content (eg. `radio`),
|
|
20
|
-
* which is what `getEditor` looks up when the editor page renders a widget.
|
|
21
|
-
*/
|
|
22
|
-
export declare const registerEditors: (editorsToRegister: Record<string, Editor>) => void;
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @param type - the widget that you are trying to replace
|
|
26
|
-
* @param replacementType - the type of the widget that takes its place
|
|
27
|
-
*
|
|
28
|
-
* e.g. replaceEditor("transformer", "deprecated-standin") will make it so the
|
|
29
|
-
* transformer widget is replaced by the deprecated stand-in widget
|
|
30
|
-
*/
|
|
31
|
-
export declare const replaceEditor: (type: string, replacementType: string) => void;
|
|
32
|
-
export declare const replaceDeprecatedEditors: () => void;
|
|
33
5
|
export declare const getWidget: (type: string) => React.ComponentType<any> | null | undefined;
|
|
34
6
|
export declare const getWidgetExport: (type: string) => WidgetExports | null;
|
|
35
|
-
export declare const getEditor: (type: string) => Editor | null;
|
|
36
7
|
export declare const getPublicWidgets: () => Record<string, WidgetExports>;
|
|
37
8
|
export declare const getAllWidgetTypes: () => ReadonlyArray<string>;
|
|
38
9
|
/**
|
|
@@ -60,4 +31,3 @@ export declare const getTracking: (type: string) => Tracking;
|
|
|
60
31
|
* and supports a highlightLint prop, or false otherwise.
|
|
61
32
|
*/
|
|
62
33
|
export declare const isLintable: (type: string) => boolean;
|
|
63
|
-
export {};
|
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": "92.0.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -28,22 +28,22 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@dnd-kit/dom": "^0.5.0",
|
|
30
30
|
"@dnd-kit/react": "^0.5.0",
|
|
31
|
+
"@khanacademy/kas": "3.0.2",
|
|
32
|
+
"@khanacademy/keypad-context": "6.0.7",
|
|
33
|
+
"@khanacademy/kmath": "3.1.0",
|
|
34
|
+
"@khanacademy/math-input": "30.1.2",
|
|
35
|
+
"@khanacademy/perseus-core": "42.0.0",
|
|
36
|
+
"@khanacademy/perseus-linter": "6.1.5",
|
|
37
|
+
"@khanacademy/perseus-score": "9.0.8",
|
|
38
|
+
"@khanacademy/perseus-utils": "3.0.1",
|
|
39
|
+
"@khanacademy/pure-markdown": "3.0.1",
|
|
40
|
+
"@khanacademy/simple-markdown": "4.0.1",
|
|
31
41
|
"@use-gesture/react": "^10.2.27",
|
|
32
42
|
"gifuct-js": "^2.1.2",
|
|
33
43
|
"jquery": "^2.1.1",
|
|
34
44
|
"mafs": "0.19.0",
|
|
35
45
|
"tiny-invariant": "1.3.1",
|
|
36
|
-
"uuid": "^10.0.0"
|
|
37
|
-
"@khanacademy/kas": "3.0.0",
|
|
38
|
-
"@khanacademy/keypad-context": "6.0.5",
|
|
39
|
-
"@khanacademy/kmath": "3.0.6",
|
|
40
|
-
"@khanacademy/math-input": "30.1.0",
|
|
41
|
-
"@khanacademy/perseus-core": "41.2.1",
|
|
42
|
-
"@khanacademy/perseus-linter": "6.1.3",
|
|
43
|
-
"@khanacademy/perseus-score": "9.0.6",
|
|
44
|
-
"@khanacademy/perseus-utils": "3.0.0",
|
|
45
|
-
"@khanacademy/pure-markdown": "3.0.0",
|
|
46
|
-
"@khanacademy/simple-markdown": "4.0.0"
|
|
46
|
+
"uuid": "^10.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@khanacademy/wonder-blocks-announcer": "1.1.2",
|
|
@@ -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.13.
|
|
55
|
+
"@khanacademy/wonder-blocks-dropdown": "10.13.1",
|
|
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",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@khanacademy/wonder-blocks-layout": "3.1.62",
|
|
61
61
|
"@khanacademy/wonder-blocks-link": "10.4.1",
|
|
62
62
|
"@khanacademy/wonder-blocks-modal": "8.9.0",
|
|
63
|
-
"@khanacademy/wonder-blocks-popover": "7.0.
|
|
63
|
+
"@khanacademy/wonder-blocks-popover": "7.0.1",
|
|
64
64
|
"@khanacademy/wonder-blocks-progress-spinner": "3.1.62",
|
|
65
65
|
"@khanacademy/wonder-blocks-switch": "3.4.14",
|
|
66
66
|
"@khanacademy/wonder-blocks-timing": "7.1.0",
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
"@popperjs/core": "2.10.2",
|
|
73
73
|
"aphrodite": "1.2.5",
|
|
74
74
|
"classnames": "1.1.4",
|
|
75
|
+
"perseus-build-settings": "0.9.2",
|
|
75
76
|
"prop-types": "15.8.1",
|
|
77
|
+
"raphael": "1.5.4",
|
|
76
78
|
"react": "18.2.0",
|
|
77
79
|
"react-dom": "18.2.0",
|
|
78
80
|
"react-popper": "^2.2.5",
|
|
79
|
-
"underscore": "1.4.4"
|
|
80
|
-
"perseus-build-settings": "0.9.2",
|
|
81
|
-
"raphael": "1.5.4"
|
|
81
|
+
"underscore": "1.4.4"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
84
|
"@khanacademy/wonder-blocks-announcer": "^1.1.2",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@khanacademy/wonder-blocks-clickable": "^8.3.1",
|
|
88
88
|
"@khanacademy/wonder-blocks-core": "^12.5.0",
|
|
89
89
|
"@khanacademy/wonder-blocks-data": "^15.1.0",
|
|
90
|
-
"@khanacademy/wonder-blocks-dropdown": "^10.13.
|
|
90
|
+
"@khanacademy/wonder-blocks-dropdown": "^10.13.1",
|
|
91
91
|
"@khanacademy/wonder-blocks-form": "^7.6.15",
|
|
92
92
|
"@khanacademy/wonder-blocks-icon": "^6.0.2",
|
|
93
93
|
"@khanacademy/wonder-blocks-icon-button": "^12.0.1",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@khanacademy/wonder-blocks-layout": "^3.1.62",
|
|
96
96
|
"@khanacademy/wonder-blocks-link": "^10.4.1",
|
|
97
97
|
"@khanacademy/wonder-blocks-modal": "^8.9.0",
|
|
98
|
-
"@khanacademy/wonder-blocks-popover": "^7.0.
|
|
98
|
+
"@khanacademy/wonder-blocks-popover": "^7.0.1",
|
|
99
99
|
"@khanacademy/wonder-blocks-progress-spinner": "^3.1.62",
|
|
100
100
|
"@khanacademy/wonder-blocks-switch": "^3.4.14",
|
|
101
101
|
"@khanacademy/wonder-blocks-timing": "^7.1.0",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
},
|
|
116
116
|
"keywords": [],
|
|
117
117
|
"khan": {
|
|
118
|
-
"catalogHash": "
|
|
118
|
+
"catalogHash": "c1e18e75c3555ad9"
|
|
119
119
|
},
|
|
120
120
|
"scripts": {}
|
|
121
121
|
}
|