@khanacademy/perseus-core 3.4.0 → 3.6.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 +30 -1
- package/dist/data-schema.d.ts +2 -2
- package/dist/es/index.js +288 -166
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +306 -165
- package/dist/index.js.map +1 -1
- package/dist/parse-perseus-json/general-purpose-parsers/index.d.ts +0 -1
- package/dist/parse-perseus-json/general-purpose-parsers/test-helpers.d.ts +1 -0
- package/dist/parse-perseus-json/perseus-parsers/legacy-button-sets.d.ts +2 -0
- package/dist/parse-perseus-json/perseus-parsers/legacy-button-sets.typetest.d.ts +1 -0
- package/dist/parse-perseus-json/result.d.ts +7 -0
- package/dist/utils/split-perseus-item.d.ts +2 -0
- package/dist/widgets/core-widget-registry.d.ts +2 -0
- package/dist/widgets/grapher/grapher-util.d.ts +4 -0
- package/dist/widgets/iframe/iframe-util.d.ts +2 -0
- package/dist/widgets/interactive-graph/interactive-graph-util.d.ts +4 -0
- package/dist/widgets/logic-export.types.d.ts +28 -0
- package/dist/widgets/matrix/matrix-util.d.ts +4 -0
- package/dist/widgets/plotter/plotter-util.d.ts +12 -0
- package/dist/widgets/radio/radio-util.d.ts +26 -0
- package/dist/widgets/table/table-util.d.ts +4 -0
- package/package.json +1 -1
- package/dist/parse-perseus-json/general-purpose-parsers/unknown.d.ts +0 -2
package/dist/analytics.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type VirtualKeypadVersion = "MATH_INPUT_KEYPAD_V2" | "REACT_NATIVE_KEYPAD";
|
|
2
2
|
/**
|
|
3
3
|
* A type union of all the events that any package in the Perseus ecosystem can
|
|
4
4
|
* send.
|
|
@@ -15,8 +15,20 @@ export type PerseusAnalyticsEvent = {
|
|
|
15
15
|
} | {
|
|
16
16
|
type: "perseus:widget-rendering-error";
|
|
17
17
|
payload: {
|
|
18
|
+
widgetSubType: string;
|
|
18
19
|
widgetType: string;
|
|
19
20
|
widgetId: string;
|
|
21
|
+
message: string;
|
|
22
|
+
userAgent: string;
|
|
23
|
+
};
|
|
24
|
+
} | {
|
|
25
|
+
type: "perseus:widget-rendering-error:ti";
|
|
26
|
+
payload: {
|
|
27
|
+
widgetSubType: string;
|
|
28
|
+
widgetType: string;
|
|
29
|
+
widgetId: string;
|
|
30
|
+
message: string;
|
|
31
|
+
userAgent: string;
|
|
20
32
|
};
|
|
21
33
|
} | {
|
|
22
34
|
type: "perseus:interactive-graph-widget:rendered";
|
|
@@ -25,6 +37,13 @@ export type PerseusAnalyticsEvent = {
|
|
|
25
37
|
widgetType: string;
|
|
26
38
|
widgetId: string;
|
|
27
39
|
};
|
|
40
|
+
} | {
|
|
41
|
+
type: "perseus:widget:rendered:ti";
|
|
42
|
+
payload: {
|
|
43
|
+
widgetSubType: string;
|
|
44
|
+
widgetType: string;
|
|
45
|
+
widgetId: string;
|
|
46
|
+
};
|
|
28
47
|
} | {
|
|
29
48
|
type: "perseus:label-image:toggle-answers-hidden";
|
|
30
49
|
payload: null;
|
|
@@ -34,6 +53,15 @@ export type PerseusAnalyticsEvent = {
|
|
|
34
53
|
} | {
|
|
35
54
|
type: "perseus:label-image:choiced-interacted-with";
|
|
36
55
|
payload: null;
|
|
56
|
+
} | {
|
|
57
|
+
type: "perseus:label-image:toggle-answers-hidden:ti";
|
|
58
|
+
payload: null;
|
|
59
|
+
} | {
|
|
60
|
+
type: "perseus:label-image:marker-interacted-with:ti";
|
|
61
|
+
payload: null;
|
|
62
|
+
} | {
|
|
63
|
+
type: "perseus:label-image:choiced-interacted-with:ti";
|
|
64
|
+
payload: null;
|
|
37
65
|
} | {
|
|
38
66
|
type: "math-input:keypad-closed";
|
|
39
67
|
payload: {
|
|
@@ -47,3 +75,4 @@ export type PerseusAnalyticsEvent = {
|
|
|
47
75
|
};
|
|
48
76
|
/** A function that is called when Perseus emits an analytics event. */
|
|
49
77
|
export type AnalyticsEventHandlerFn = (event: PerseusAnalyticsEvent) => Promise<void>;
|
|
78
|
+
export {};
|
package/dist/data-schema.d.ts
CHANGED
|
@@ -560,7 +560,7 @@ export type LockedFunctionType = {
|
|
|
560
560
|
strokeStyle: LockedLineStyle;
|
|
561
561
|
equation: string;
|
|
562
562
|
directionalAxis: "x" | "y";
|
|
563
|
-
domain?:
|
|
563
|
+
domain?: [min: number | null, max: number | null];
|
|
564
564
|
labels?: LockedLabelType[];
|
|
565
565
|
ariaLabel?: string;
|
|
566
566
|
};
|
|
@@ -647,7 +647,7 @@ export type PerseusGraphTypeRay = {
|
|
|
647
647
|
type AngleGraphCorrect = {
|
|
648
648
|
type: "angle";
|
|
649
649
|
allowReflexAngles: boolean;
|
|
650
|
-
match
|
|
650
|
+
match?: "congruent";
|
|
651
651
|
coords: [Coord, Coord, Coord];
|
|
652
652
|
};
|
|
653
653
|
type CircleGraphCorrect = {
|