@khanacademy/perseus-core
Advanced tools
Comparing version 0.0.0-PR587-20230627183130 to 0.0.0-PR595-20230629191052
# @khanacademy/perseus-core | ||
## 0.0.0-PR587-20230627183130 | ||
## 0.0.0-PR595-20230629191052 | ||
### Patch Changes | ||
- f2919102: on keypad opened CEDAR event integration | ||
## 0.0.1 | ||
### Patch Changes | ||
- 1f3fdc6c: Introducing `perseus-core` for types and functionality shared across the Perseus ecosystem |
@@ -7,4 +7,14 @@ export type PerseusAnalyticsEvent = { | ||
}; | ||
} | { | ||
type: "perseus:keypad-closed"; | ||
payload: { | ||
virtualKeypadVersion: string; | ||
}; | ||
} | { | ||
type: "perseus:keypad-opened"; | ||
payload: { | ||
virtualKeypadVersion: string; | ||
}; | ||
}; | ||
/** A function to send analytics events. */ | ||
export type SendEventFn = (event: PerseusAnalyticsEvent) => Promise<void>; |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "0.0.0-PR587-20230627183130", | ||
"version": "0.0.0-PR595-20230629191052", | ||
"publishConfig": { | ||
@@ -9,0 +9,0 @@ "access": "public" |
// A type union of all the events that any package in the Perseus ecosystem can | ||
// send. | ||
export type PerseusAnalyticsEvent = { | ||
type: "perseus:expression-evaluated"; | ||
payload: { | ||
virtualKeypadVersion: string; | ||
result: "correct" | "incorrect" | "invalid"; | ||
}; | ||
}; | ||
export type PerseusAnalyticsEvent = | ||
| { | ||
type: "perseus:expression-evaluated"; | ||
payload: { | ||
virtualKeypadVersion: string; | ||
result: "correct" | "incorrect" | "invalid"; | ||
}; | ||
} | ||
| { | ||
type: "perseus:keypad-closed"; | ||
payload: { | ||
virtualKeypadVersion: string; | ||
}; | ||
} | ||
| { | ||
type: "perseus:keypad-opened"; | ||
payload: { | ||
virtualKeypadVersion: string; | ||
}; | ||
}; | ||
// Add more events here as needed. Note that each event should have a `type` | ||
@@ -11,0 +24,0 @@ // key and a payload that varies by type. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
50316
89