@khanacademy/perseus-core 4.0.0 → 5.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/analytics.d.ts +0 -9
- package/dist/data-schema.d.ts +3 -0
- package/dist/es/index.js +388 -140
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +401 -123
- package/dist/index.js.map +1 -1
- package/dist/keypad.d.ts +12 -0
- package/dist/types.d.ts +0 -3
- package/dist/widgets/expression/derive-extra-keys.d.ts +8 -0
- package/dist/widgets/expression/expression-upgrade.d.ts +1 -0
- package/dist/widgets/expression/expression-util.d.ts +2 -1
- package/dist/widgets/radio/radio-upgrade.d.ts +2 -0
- package/dist/widgets/radio/radio-util.d.ts +10 -0
- package/package.json +4 -2
package/dist/analytics.d.ts
CHANGED
|
@@ -12,15 +12,6 @@ export type PerseusAnalyticsEvent = {
|
|
|
12
12
|
} | {
|
|
13
13
|
type: "perseus:expression-focused";
|
|
14
14
|
payload: null;
|
|
15
|
-
} | {
|
|
16
|
-
type: "perseus:widget-rendering-error";
|
|
17
|
-
payload: {
|
|
18
|
-
widgetSubType: string;
|
|
19
|
-
widgetType: string;
|
|
20
|
-
widgetId: string;
|
|
21
|
-
message: string;
|
|
22
|
-
userAgent: string;
|
|
23
|
-
};
|
|
24
15
|
} | {
|
|
25
16
|
type: "perseus:widget-rendering-error:ti";
|
|
26
17
|
payload: {
|
package/dist/data-schema.d.ts
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
* b) the parsing code (`util/parse-perseus-json/`) is updated to handle
|
|
27
27
|
* the new format _as well as_ the old format.
|
|
28
28
|
*/
|
|
29
|
+
import type { KeypadKey } from "./keypad";
|
|
29
30
|
export type Coord = [x: number, y: number];
|
|
30
31
|
export type Interval = [min: number, max: number];
|
|
31
32
|
export type Vector2 = Coord;
|
|
@@ -365,6 +366,7 @@ export type PerseusExpressionWidgetOptions = {
|
|
|
365
366
|
buttonSets: LegacyButtonSets;
|
|
366
367
|
functions: ReadonlyArray<string>;
|
|
367
368
|
times: boolean;
|
|
369
|
+
extraKeys?: ReadonlyArray<KeypadKey>;
|
|
368
370
|
visibleLabel?: string;
|
|
369
371
|
ariaLabel?: string;
|
|
370
372
|
buttonsVisible?: "always" | "never" | "focused";
|
|
@@ -833,6 +835,7 @@ export type PerseusRadioWidgetOptions = {
|
|
|
833
835
|
choices: ReadonlyArray<PerseusRadioChoice>;
|
|
834
836
|
hasNoneOfTheAbove?: boolean;
|
|
835
837
|
countChoices?: boolean;
|
|
838
|
+
numCorrect?: number;
|
|
836
839
|
randomize?: boolean;
|
|
837
840
|
multipleSelect?: boolean;
|
|
838
841
|
deselectEnabled?: boolean;
|