@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.
@@ -1,4 +1,4 @@
1
- export type VirtualKeypadVersion = "MATH_INPUT_KEYPAD_V2" | "REACT_NATIVE_KEYPAD";
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 {};
@@ -560,7 +560,7 @@ export type LockedFunctionType = {
560
560
  strokeStyle: LockedLineStyle;
561
561
  equation: string;
562
562
  directionalAxis: "x" | "y";
563
- domain?: Interval;
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: "congruent";
650
+ match?: "congruent";
651
651
  coords: [Coord, Coord, Coord];
652
652
  };
653
653
  type CircleGraphCorrect = {