@khanacademy/perseus 63.1.0 → 64.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/es/index.js +8 -27
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +7 -26
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +4 -16
- package/dist/widgets/expression/expression.d.ts +0 -1
- package/dist/widgets/measurer/measurer.d.ts +0 -1
- package/dist/widgets/radio/radio.d.ts +0 -1
- package/package.json +56 -56
package/dist/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { PerseusStrings } from "./strings";
|
|
|
3
3
|
import type { SizeClass } from "./util/sizing-utils";
|
|
4
4
|
import type { WidgetPromptJSON } from "./widget-ai-utils/prompt-types";
|
|
5
5
|
import type { KeypadAPI } from "@khanacademy/math-input";
|
|
6
|
-
import type { Hint, PerseusAnswerArea, PerseusGraphType, PerseusFeatureFlags, PerseusWidget, PerseusWidgetsMap, AnalyticsEventHandlerFn, Version,
|
|
6
|
+
import type { Hint, PerseusAnswerArea, PerseusGraphType, PerseusFeatureFlags, PerseusWidget, PerseusWidgetsMap, AnalyticsEventHandlerFn, Version, Rubric, UserInput, UserInputArray, UserInputMap, Relationship, LabelImageMarkerPublicData, PerseusLabelImageMarker } from "@khanacademy/perseus-core";
|
|
7
7
|
import type { LinterContextProps } from "@khanacademy/perseus-linter";
|
|
8
8
|
import type { Result } from "@khanacademy/wonder-blocks-data";
|
|
9
9
|
import type * as React from "react";
|
|
@@ -354,7 +354,7 @@ export type WidgetExports<T extends React.ComponentType<any> & Widget = React.Co
|
|
|
354
354
|
hidden?: boolean;
|
|
355
355
|
/**
|
|
356
356
|
* The widget version. Any time the _major_ version changes, the widget
|
|
357
|
-
* should provide a new entry in the
|
|
357
|
+
* should provide a new entry in the widget parser to migrate from the
|
|
358
358
|
* older version to the current (new) version. Minor version changes must
|
|
359
359
|
* be backwards compatible with previous minor versions widget options.
|
|
360
360
|
*
|
|
@@ -374,18 +374,6 @@ export type WidgetExports<T extends React.ComponentType<any> & Widget = React.Co
|
|
|
374
374
|
*/
|
|
375
375
|
staticTransform?: WidgetTransform;
|
|
376
376
|
getOneCorrectAnswerFromRubric?: (rubric: Rubric) => string | null | undefined;
|
|
377
|
-
/**
|
|
378
|
-
* A map of major version numbers (as a string, eg "1") to a function that
|
|
379
|
-
* migrates from the _previous_ major version.
|
|
380
|
-
*
|
|
381
|
-
* Example:
|
|
382
|
-
* ```
|
|
383
|
-
* propUpgrades: {'1': (options) => ({...options})}
|
|
384
|
-
* ```
|
|
385
|
-
*
|
|
386
|
-
* This configuration would migrate options from major version 0 to 1.
|
|
387
|
-
*/
|
|
388
|
-
propUpgrades?: WidgetOptionsUpgradeMap;
|
|
389
377
|
}>;
|
|
390
378
|
export type FilterCriterion = string | ((id: string, widgetInfo: PerseusWidget, widget?: Widget | null | undefined) => boolean);
|
|
391
379
|
/**
|
|
@@ -393,8 +381,8 @@ export type FilterCriterion = string | ((id: string, widgetInfo: PerseusWidget,
|
|
|
393
381
|
* `RenderProps` generic argument are the widget-specific props that originate
|
|
394
382
|
* from the stored PerseusItem. Note that they may not match the serialized
|
|
395
383
|
* widget options exactly as they are the result of running the options through
|
|
396
|
-
*
|
|
397
|
-
*
|
|
384
|
+
* the parser as well as its `transform` or `staticTransform` functions
|
|
385
|
+
* (depending on the options `static` flag).
|
|
398
386
|
*/
|
|
399
387
|
export type WidgetProps<RenderProps, Rubric = Empty, TrackingExtraArgs = Empty> = RenderProps & UniversalWidgetProps<Rubric, TrackingExtraArgs>;
|
|
400
388
|
/**
|
|
@@ -144,7 +144,6 @@ declare const _default: {
|
|
|
144
144
|
} & {}, keyof import("../..").PerseusDependenciesV2> & React.RefAttributes<Expression>>;
|
|
145
145
|
transform: (widgetOptions: PerseusExpressionWidgetOptions | ExpressionPublicWidgetOptions) => RenderProps;
|
|
146
146
|
version: import("@khanacademy/perseus-core").Version | undefined;
|
|
147
|
-
propUpgrades: import("@khanacademy/perseus-core").WidgetOptionsUpgradeMap | undefined;
|
|
148
147
|
isLintable: true;
|
|
149
148
|
getOneCorrectAnswerFromRubric(rubric: PerseusExpressionRubric): string | null | undefined;
|
|
150
149
|
};
|
|
@@ -10,7 +10,6 @@ declare const _default: {
|
|
|
10
10
|
transform: (widgetOptions: PerseusRadioWidgetOptions, strings: PerseusStrings, problemNum?: number | null) => RenderProps;
|
|
11
11
|
staticTransform: (widgetOptions: PerseusRadioWidgetOptions, strings: PerseusStrings, problemNum?: number | null) => RenderProps;
|
|
12
12
|
version: import("@khanacademy/perseus-core").Version | undefined;
|
|
13
|
-
propUpgrades: import("@khanacademy/perseus-core").WidgetOptionsUpgradeMap | undefined;
|
|
14
13
|
isLintable: true;
|
|
15
14
|
};
|
|
16
15
|
export default _default;
|
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": "64.0.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -39,85 +39,85 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@use-gesture/react": "^10.2.27",
|
|
41
41
|
"mafs": "0.19.0",
|
|
42
|
-
"tiny-invariant": "
|
|
42
|
+
"tiny-invariant": "1.3.1",
|
|
43
43
|
"uuid": "^10.0.0",
|
|
44
44
|
"@khanacademy/kas": "2.0.5",
|
|
45
|
-
"@khanacademy/keypad-context": "3.0.
|
|
46
|
-
"@khanacademy/kmath": "2.0.
|
|
47
|
-
"@khanacademy/math-input": "26.0.
|
|
48
|
-
"@khanacademy/perseus-core": "
|
|
49
|
-
"@khanacademy/perseus-linter": "3.0.
|
|
50
|
-
"@khanacademy/perseus-score": "7.0.
|
|
45
|
+
"@khanacademy/keypad-context": "3.0.12",
|
|
46
|
+
"@khanacademy/kmath": "2.0.12",
|
|
47
|
+
"@khanacademy/math-input": "26.0.1",
|
|
48
|
+
"@khanacademy/perseus-core": "13.0.0",
|
|
49
|
+
"@khanacademy/perseus-linter": "3.0.12",
|
|
50
|
+
"@khanacademy/perseus-score": "7.0.2",
|
|
51
51
|
"@khanacademy/perseus-utils": "2.0.4",
|
|
52
52
|
"@khanacademy/pure-markdown": "2.0.5",
|
|
53
53
|
"@khanacademy/simple-markdown": "2.0.5"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@khanacademy/wonder-blocks-banner": "4.1.
|
|
57
|
-
"@khanacademy/wonder-blocks-button": "10.0.
|
|
58
|
-
"@khanacademy/wonder-blocks-clickable": "7.1.
|
|
59
|
-
"@khanacademy/wonder-blocks-core": "12.
|
|
60
|
-
"@khanacademy/wonder-blocks-data": "14.1.
|
|
61
|
-
"@khanacademy/wonder-blocks-dropdown": "10.1.
|
|
62
|
-
"@khanacademy/wonder-blocks-form": "7.1.
|
|
63
|
-
"@khanacademy/wonder-blocks-icon-button": "10.
|
|
64
|
-
"@khanacademy/wonder-blocks-icon": "5.1.
|
|
65
|
-
"@khanacademy/wonder-blocks-labeled-field": "3.0.
|
|
66
|
-
"@khanacademy/wonder-blocks-layout": "3.1.
|
|
67
|
-
"@khanacademy/wonder-blocks-link": "9.1.
|
|
68
|
-
"@khanacademy/wonder-blocks-pill": "3.1.
|
|
69
|
-
"@khanacademy/wonder-blocks-popover": "6.1.
|
|
70
|
-
"@khanacademy/wonder-blocks-progress-spinner": "3.1.
|
|
71
|
-
"@khanacademy/wonder-blocks-switch": "3.2.
|
|
72
|
-
"@khanacademy/wonder-blocks-tokens": "10.
|
|
73
|
-
"@khanacademy/wonder-blocks-tooltip": "4.1.
|
|
74
|
-
"@khanacademy/wonder-blocks-typography": "
|
|
56
|
+
"@khanacademy/wonder-blocks-banner": "4.1.21",
|
|
57
|
+
"@khanacademy/wonder-blocks-button": "10.0.5",
|
|
58
|
+
"@khanacademy/wonder-blocks-clickable": "7.1.5",
|
|
59
|
+
"@khanacademy/wonder-blocks-core": "12.3.0",
|
|
60
|
+
"@khanacademy/wonder-blocks-data": "14.1.4",
|
|
61
|
+
"@khanacademy/wonder-blocks-dropdown": "10.1.5",
|
|
62
|
+
"@khanacademy/wonder-blocks-form": "7.1.18",
|
|
63
|
+
"@khanacademy/wonder-blocks-icon-button": "10.2.1",
|
|
64
|
+
"@khanacademy/wonder-blocks-icon": "5.1.4",
|
|
65
|
+
"@khanacademy/wonder-blocks-labeled-field": "3.0.13",
|
|
66
|
+
"@khanacademy/wonder-blocks-layout": "3.1.16",
|
|
67
|
+
"@khanacademy/wonder-blocks-link": "9.1.5",
|
|
68
|
+
"@khanacademy/wonder-blocks-pill": "3.1.18",
|
|
69
|
+
"@khanacademy/wonder-blocks-popover": "6.1.6",
|
|
70
|
+
"@khanacademy/wonder-blocks-progress-spinner": "3.1.16",
|
|
71
|
+
"@khanacademy/wonder-blocks-switch": "3.2.9",
|
|
72
|
+
"@khanacademy/wonder-blocks-tokens": "10.4.0",
|
|
73
|
+
"@khanacademy/wonder-blocks-tooltip": "4.1.20",
|
|
74
|
+
"@khanacademy/wonder-blocks-typography": "4.2.0",
|
|
75
75
|
"@khanacademy/wonder-stuff-core": "1.5.4",
|
|
76
|
-
"@phosphor-icons/core": "
|
|
77
|
-
"@popperjs/core": "
|
|
78
|
-
"aphrodite": "
|
|
76
|
+
"@phosphor-icons/core": "2.0.2",
|
|
77
|
+
"@popperjs/core": "2.10.2",
|
|
78
|
+
"aphrodite": "1.2.5",
|
|
79
79
|
"classnames": "1.1.4",
|
|
80
80
|
"csstype": "^3.1.3",
|
|
81
81
|
"intersection-observer": "^0.12.0",
|
|
82
|
-
"jquery": "
|
|
82
|
+
"jquery": "2.1.1",
|
|
83
83
|
"lodash.debounce": "^4.0.8",
|
|
84
84
|
"prop-types": "15.6.1",
|
|
85
|
-
"react": "
|
|
86
|
-
"react-dom": "
|
|
85
|
+
"react": "18.2.0",
|
|
86
|
+
"react-dom": "18.2.0",
|
|
87
87
|
"react-popper": "^2.2.5",
|
|
88
|
-
"underscore": "
|
|
88
|
+
"underscore": "1.4.4",
|
|
89
89
|
"perseus-build-settings": "0.6.2",
|
|
90
90
|
"raphael": "1.5.4"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
|
-
"@khanacademy/wonder-blocks-banner": "4.1.
|
|
94
|
-
"@khanacademy/wonder-blocks-button": "10.0.
|
|
95
|
-
"@khanacademy/wonder-blocks-clickable": "7.1.
|
|
96
|
-
"@khanacademy/wonder-blocks-core": "12.
|
|
97
|
-
"@khanacademy/wonder-blocks-data": "14.1.
|
|
98
|
-
"@khanacademy/wonder-blocks-dropdown": "10.1.
|
|
99
|
-
"@khanacademy/wonder-blocks-form": "7.1.
|
|
100
|
-
"@khanacademy/wonder-blocks-icon": "5.1.
|
|
101
|
-
"@khanacademy/wonder-blocks-icon-button": "10.
|
|
102
|
-
"@khanacademy/wonder-blocks-labeled-field": "3.0.
|
|
103
|
-
"@khanacademy/wonder-blocks-layout": "3.1.
|
|
104
|
-
"@khanacademy/wonder-blocks-link": "9.1.
|
|
105
|
-
"@khanacademy/wonder-blocks-pill": "3.1.
|
|
106
|
-
"@khanacademy/wonder-blocks-popover": "6.1.
|
|
107
|
-
"@khanacademy/wonder-blocks-progress-spinner": "3.1.
|
|
108
|
-
"@khanacademy/wonder-blocks-switch": "3.2.
|
|
109
|
-
"@khanacademy/wonder-blocks-tokens": "10.
|
|
110
|
-
"@khanacademy/wonder-blocks-tooltip": "4.1.
|
|
111
|
-
"@khanacademy/wonder-blocks-typography": "
|
|
112
|
-
"@khanacademy/wonder-stuff-core": "1.5.4",
|
|
93
|
+
"@khanacademy/wonder-blocks-banner": "^4.1.21",
|
|
94
|
+
"@khanacademy/wonder-blocks-button": "^10.0.5",
|
|
95
|
+
"@khanacademy/wonder-blocks-clickable": "^7.1.5",
|
|
96
|
+
"@khanacademy/wonder-blocks-core": "^12.3.0",
|
|
97
|
+
"@khanacademy/wonder-blocks-data": "^14.1.4",
|
|
98
|
+
"@khanacademy/wonder-blocks-dropdown": "^10.1.5",
|
|
99
|
+
"@khanacademy/wonder-blocks-form": "^7.1.18",
|
|
100
|
+
"@khanacademy/wonder-blocks-icon": "^5.1.4",
|
|
101
|
+
"@khanacademy/wonder-blocks-icon-button": "^10.2.1",
|
|
102
|
+
"@khanacademy/wonder-blocks-labeled-field": "^3.0.13",
|
|
103
|
+
"@khanacademy/wonder-blocks-layout": "^3.1.16",
|
|
104
|
+
"@khanacademy/wonder-blocks-link": "^9.1.5",
|
|
105
|
+
"@khanacademy/wonder-blocks-pill": "^3.1.18",
|
|
106
|
+
"@khanacademy/wonder-blocks-popover": "^6.1.6",
|
|
107
|
+
"@khanacademy/wonder-blocks-progress-spinner": "^3.1.16",
|
|
108
|
+
"@khanacademy/wonder-blocks-switch": "^3.2.9",
|
|
109
|
+
"@khanacademy/wonder-blocks-tokens": "^10.4.0",
|
|
110
|
+
"@khanacademy/wonder-blocks-tooltip": "^4.1.20",
|
|
111
|
+
"@khanacademy/wonder-blocks-typography": "^4.2.0",
|
|
112
|
+
"@khanacademy/wonder-stuff-core": "^1.5.4",
|
|
113
113
|
"@phosphor-icons/core": "^2.0.2",
|
|
114
114
|
"@popperjs/core": "^2.10.2",
|
|
115
115
|
"aphrodite": "^1.2.5",
|
|
116
|
-
"classnames": "1.1.4",
|
|
116
|
+
"classnames": "^1.1.4",
|
|
117
117
|
"intersection-observer": "^0.12.0",
|
|
118
118
|
"jquery": "^2.1.1",
|
|
119
119
|
"lodash.debounce": "^4.0.8",
|
|
120
|
-
"prop-types": "15.6.1",
|
|
120
|
+
"prop-types": "^15.6.1",
|
|
121
121
|
"react": "^18.2.0",
|
|
122
122
|
"react-dom": "^18.2.0",
|
|
123
123
|
"react-popper": "^2.2.5",
|