@khanacademy/math-input 22.3.0 → 23.0.1

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/types.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import type { CursorContext } from "./components/input/cursor-contexts";
2
- import type Key from "./data/keys";
3
- import type { KeyType, KeypadType } from "./enums";
4
- import type { KeypadContextRendererInterface } from "@khanacademy/perseus-core";
2
+ import type { KeyType } from "./enums";
3
+ import type { KeypadConfiguration, KeypadContextRendererInterface, KeypadKey } from "@khanacademy/perseus-core";
5
4
  import type * as React from "react";
6
5
  import type ReactDOM from "react-dom";
7
6
  export declare enum MathFieldActionType {
@@ -14,22 +13,16 @@ type IconConfig = {
14
13
  data: string;
15
14
  };
16
15
  export type KeyConfig = {
17
- id: Key;
16
+ id: KeypadKey;
18
17
  type: KeyType;
19
18
  icon: IconConfig;
20
19
  ariaLabel: string;
21
20
  };
22
- export type KeypadConfiguration = {
23
- keypadType: KeypadType;
24
- extraKeys?: ReadonlyArray<Key>;
25
- times?: boolean;
26
- scientific?: boolean;
27
- };
28
- export type KeyHandler = (key: Key) => Cursor;
21
+ export type KeyHandler = (key: KeypadKey) => Cursor;
29
22
  export type Cursor = {
30
23
  context: (typeof CursorContext)[keyof typeof CursorContext];
31
24
  };
32
- export type ClickKeyCallback = (key: Key, event?: React.SyntheticEvent) => void;
25
+ export type ClickKeyCallback = (key: KeypadKey, event?: React.SyntheticEvent) => void;
33
26
  export type KeypadPageType = "Geometry" | "Operators" | "Numbers" | "Fractions" | "Extras" | "Dismiss";
34
27
  export interface KeypadAPI {
35
28
  activate: () => void;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Khan Academy's new expression editor for the mobile web.",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "22.3.0",
6
+ "version": "23.0.1",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -38,16 +38,16 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "mathquill": "https://github.com/Khan/mathquill/releases/download/v1.0.0/mathquill-v1.0.0.tgz",
41
- "@khanacademy/keypad-context": "1.1.0",
42
- "@khanacademy/perseus-core": "4.0.0"
41
+ "@khanacademy/keypad-context": "1.1.2",
42
+ "@khanacademy/perseus-core": "5.1.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@khanacademy/mathjax-renderer": "^2.1.1",
46
- "@khanacademy/wonder-blocks-clickable": "6.1.1",
47
- "@khanacademy/wonder-blocks-core": "12.1.1",
48
- "@khanacademy/wonder-blocks-popover": "5.1.1",
46
+ "@khanacademy/wonder-blocks-clickable": "6.1.2",
47
+ "@khanacademy/wonder-blocks-core": "12.2.0",
48
+ "@khanacademy/wonder-blocks-popover": "5.2.0",
49
49
  "@khanacademy/wonder-blocks-timing": "7.0.1",
50
- "@khanacademy/wonder-blocks-tokens": "4.2.1",
50
+ "@khanacademy/wonder-blocks-tokens": "5.0.0",
51
51
  "@khanacademy/wonder-stuff-core": "1.5.4",
52
52
  "@phosphor-icons/core": "^2.0.2",
53
53
  "aphrodite": "^1.2.5",
@@ -61,11 +61,11 @@
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@khanacademy/mathjax-renderer": "^2.1.1",
64
- "@khanacademy/wonder-blocks-clickable": "6.1.1",
65
- "@khanacademy/wonder-blocks-core": "12.1.1",
66
- "@khanacademy/wonder-blocks-popover": "5.1.1",
64
+ "@khanacademy/wonder-blocks-clickable": "6.1.2",
65
+ "@khanacademy/wonder-blocks-core": "12.2.0",
66
+ "@khanacademy/wonder-blocks-popover": "5.2.0",
67
67
  "@khanacademy/wonder-blocks-timing": "7.0.1",
68
- "@khanacademy/wonder-blocks-tokens": "4.2.1",
68
+ "@khanacademy/wonder-blocks-tokens": "5.0.0",
69
69
  "@khanacademy/wonder-stuff-core": "1.5.4",
70
70
  "@phosphor-icons/core": "^2.0.2",
71
71
  "aphrodite": "^1.2.5",