Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@khanacademy/perseus-core

Package Overview
Dependencies
Maintainers
1
Versions
270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@khanacademy/perseus-core - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

6

CHANGELOG.md
# @khanacademy/perseus-core
## 0.0.2
### Patch Changes
- 71c631ea: Add keypad opened and closed analytics events
## 0.0.1

@@ -4,0 +10,0 @@

12

dist/analytics.d.ts
export type PerseusAnalyticsEvent = {
type: "perseus:expression-evaluated";
payload: {
virtualKeypadVersion: string;
virtualKeypadVersion?: string;
result: "correct" | "incorrect" | "invalid";
};
} | {
type: "math-input:keypad-closed";
payload: {
virtualKeypadVersion: string;
};
} | {
type: "math-input:keypad-opened";
payload: {
virtualKeypadVersion: string;
};
};
/** A function to send analytics events. */
export type SendEventFn = (event: PerseusAnalyticsEvent) => Promise<void>;

2

package.json

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "0.0.1",
"version": "0.0.2",
"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: {
// Keypad version can be supplied by Perseus sometimes, but not always.
// The host application will need to fill this in if it's not present.
virtualKeypadVersion?: string;
result: "correct" | "incorrect" | "invalid";
};
}
| {
type: "math-input:keypad-closed";
payload: {
virtualKeypadVersion: string;
};
}
| {
type: "math-input:keypad-opened";
payload: {
virtualKeypadVersion: string;
};
};
// Add more events here as needed. Note that each event should have a `type`

@@ -11,0 +26,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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc