@khanacademy/math-input 1.0.0 → 2.0.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.
Files changed (120) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/components/compute-layout-parameters.d.ts +2 -1
  3. package/dist/components/compute-layout-parameters.js.flow +2 -21
  4. package/dist/components/echo-manager.d.ts +4 -4
  5. package/dist/components/echo-manager.js.flow +4 -4
  6. package/dist/components/expression-keypad.d.ts +1 -1
  7. package/dist/components/expression-keypad.js.flow +1 -1
  8. package/dist/components/fraction-keypad.d.ts +1 -1
  9. package/dist/components/fraction-keypad.js.flow +1 -1
  10. package/dist/components/gesture-state-machine.d.ts +7 -7
  11. package/dist/components/gesture-state-machine.js.flow +8 -8
  12. package/dist/components/icon.d.ts +2 -2
  13. package/dist/components/icon.js.flow +2 -2
  14. package/dist/components/input/cursor-contexts.d.ts +10 -9
  15. package/dist/components/input/cursor-contexts.js.flow +11 -16
  16. package/dist/components/input/math-wrapper.d.ts +3 -2
  17. package/dist/components/input/math-wrapper.js.flow +3 -16
  18. package/dist/components/keypad/index.d.ts +1 -1
  19. package/dist/components/keypad/index.js.flow +1 -3
  20. package/dist/components/keypad-button.d.ts +8 -8
  21. package/dist/components/keypad-button.js.flow +10 -9
  22. package/dist/components/keypad-container.d.ts +2 -3
  23. package/dist/components/keypad-container.js.flow +2 -3
  24. package/dist/components/keypad.d.ts +1 -1
  25. package/dist/components/keypad.js.flow +1 -1
  26. package/dist/components/multi-symbol-grid.d.ts +2 -2
  27. package/dist/components/multi-symbol-grid.js.flow +2 -2
  28. package/dist/components/node-manager.d.ts +2 -5
  29. package/dist/components/node-manager.js.flow +2 -5
  30. package/dist/components/popover-state-machine.d.ts +1 -8
  31. package/dist/components/popover-state-machine.js.flow +2 -8
  32. package/dist/components/provided-keypad.d.ts +1 -4
  33. package/dist/components/provided-keypad.js.flow +1 -4
  34. package/dist/components/styles.d.ts +1 -2
  35. package/dist/components/styles.js.flow +1 -3
  36. package/dist/components/touchable-keypad-button.d.ts +6 -6
  37. package/dist/components/touchable-keypad-button.js.flow +6 -6
  38. package/dist/data/keys.d.ts +51 -52
  39. package/dist/data/keys.js.flow +50 -99
  40. package/dist/enums.d.ts +49 -0
  41. package/dist/enums.js.flow +63 -0
  42. package/dist/es/index.css +0 -3
  43. package/dist/es/index.js +415 -455
  44. package/dist/es/index.js.map +1 -1
  45. package/dist/fake-react-native-web/view.d.ts +1 -2
  46. package/dist/fake-react-native-web/view.js.flow +1 -2
  47. package/dist/index.css +0 -3
  48. package/dist/index.d.ts +3 -6
  49. package/dist/index.js +438 -477
  50. package/dist/index.js.flow +3 -6
  51. package/dist/index.js.map +1 -1
  52. package/dist/store/actions.d.ts +64 -0
  53. package/dist/store/actions.js.flow +101 -0
  54. package/dist/store/echo-reducer.d.ts +2 -3
  55. package/dist/store/echo-reducer.js.flow +2 -6
  56. package/dist/store/index.d.ts +5 -41
  57. package/dist/store/index.js.flow +5 -52
  58. package/dist/store/input-reducer.d.ts +2 -5
  59. package/dist/store/input-reducer.js.flow +3 -6
  60. package/dist/store/keypad-reducer.d.ts +2 -7
  61. package/dist/store/keypad-reducer.js.flow +3 -8
  62. package/dist/store/layout-reducer.d.ts +2 -19
  63. package/dist/store/layout-reducer.js.flow +3 -20
  64. package/dist/store/pager-reducer.d.ts +2 -11
  65. package/dist/store/pager-reducer.js.flow +3 -12
  66. package/dist/store/shared.d.ts +2 -1
  67. package/dist/store/shared.js.flow +2 -1
  68. package/dist/store/types.d.ts +5 -5
  69. package/dist/store/types.js.flow +5 -5
  70. package/dist/types.d.ts +28 -16
  71. package/dist/types.js.flow +32 -20
  72. package/less/overrides.less +0 -6
  73. package/package.json +1 -1
  74. package/src/components/compute-layout-parameters.ts +6 -6
  75. package/src/components/echo-manager.tsx +10 -10
  76. package/src/components/expression-keypad.tsx +9 -10
  77. package/src/components/fraction-keypad.tsx +11 -12
  78. package/src/components/gesture-state-machine.ts +8 -8
  79. package/src/components/icon.tsx +6 -6
  80. package/src/components/input/__tests__/context-tracking.test.ts +20 -20
  81. package/src/components/input/cursor-contexts.ts +22 -29
  82. package/src/components/input/math-wrapper.ts +75 -67
  83. package/src/components/keypad/index.tsx +1 -1
  84. package/src/components/keypad-button.tsx +20 -21
  85. package/src/components/keypad-container.tsx +9 -10
  86. package/src/components/keypad.tsx +1 -1
  87. package/src/components/many-keypad-button.tsx +2 -2
  88. package/src/components/multi-symbol-grid.tsx +4 -5
  89. package/src/components/multi-symbol-popover.tsx +1 -1
  90. package/src/components/navigation-pad.tsx +1 -1
  91. package/src/components/node-manager.ts +2 -2
  92. package/src/components/popover-state-machine.ts +2 -10
  93. package/src/components/provided-keypad.tsx +3 -12
  94. package/src/components/touchable-keypad-button.tsx +7 -7
  95. package/src/data/key-configs.ts +58 -58
  96. package/src/data/keys.ts +53 -105
  97. package/src/enums.ts +74 -0
  98. package/src/index.ts +3 -9
  99. package/src/math-input.stories.tsx +67 -0
  100. package/src/store/actions.ts +179 -0
  101. package/src/store/echo-reducer.ts +10 -7
  102. package/src/store/index.ts +24 -24
  103. package/src/store/input-reducer.ts +7 -6
  104. package/src/store/keypad-reducer.ts +3 -6
  105. package/src/store/layout-reducer.ts +12 -11
  106. package/src/store/pager-reducer.ts +30 -46
  107. package/src/store/shared.ts +4 -4
  108. package/src/store/types.ts +21 -5
  109. package/src/types.ts +32 -20
  110. package/src/utils.ts +3 -3
  111. package/tsconfig-build.tsbuildinfo +1 -0
  112. package/dist/actions/index.d.ts +0 -31
  113. package/dist/actions/index.js.flow +0 -40
  114. package/dist/consts.d.ts +0 -51
  115. package/dist/consts.js.flow +0 -66
  116. package/src/actions/index.ts +0 -57
  117. package/src/consts.ts +0 -91
  118. package/tsconfig.tsbuildinfo +0 -1
  119. /package/src/components/{gesture-manager.tsx → gesture-manager.ts} +0 -0
  120. /package/{tsconfig.json → tsconfig-build.json} +0 -0
@@ -4,7 +4,7 @@
4
4
  * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
- import type { Border } from "../types";
7
+ import type { Border, LayoutProps } from "../types";
8
8
 
9
9
  /**
10
10
  * A manager for our node-to-ID system. In particular, this class is
@@ -57,9 +57,6 @@ declare class NodeManager {
57
57
  * @returns {{...}} - the bounding client rect for the given node, along
58
58
  * with its borders
59
59
  */
60
- layoutPropsForId(id: string): {|
61
- initialBounds: DOMRect,
62
- borders: Border,
63
- |};
60
+ layoutPropsForId(id: string): LayoutProps;
64
61
  }
65
62
  declare export default typeof NodeManager;
@@ -1,17 +1,10 @@
1
+ import type { ActiveNodesObj } from "../types";
1
2
  /**
2
3
  * A state machine for the popover state. In particular, this class manages the
3
4
  * mapping of parent nodes to their children, and translates touch events that
4
5
  * traverse various nodes to actions that are conditioned on whether a popover
5
6
  * is present.
6
7
  */
7
- type ActiveNodesObjPopover = {
8
- parentId: string;
9
- childIds: ReadonlyArray<string>;
10
- };
11
- type ActiveNodesObj = {
12
- popover: ActiveNodesObjPopover | null;
13
- focus: string | null;
14
- };
15
8
  type Handlers = {
16
9
  onActiveNodesChanged: (activeNodes: ActiveNodesObj) => void;
17
10
  onClick: (keyId: string, domNodeId: string, inPopover: boolean) => void;
@@ -4,20 +4,14 @@
4
4
  * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
+ import type { ActiveNodesObj } from "../types";
8
+
7
9
  /**
8
10
  * A state machine for the popover state. In particular, this class manages the
9
11
  * mapping of parent nodes to their children, and translates touch events that
10
12
  * traverse various nodes to actions that are conditioned on whether a popover
11
13
  * is present.
12
14
  */
13
- declare type ActiveNodesObjPopover = {|
14
- parentId: string,
15
- childIds: $ReadOnlyArray<string>,
16
- |};
17
- declare type ActiveNodesObj = {|
18
- popover: ActiveNodesObjPopover | null,
19
- focus: string | null,
20
- |};
21
15
  declare type Handlers = {|
22
16
  onActiveNodesChanged: (activeNodes: ActiveNodesObj) => void,
23
17
  onClick: (keyId: string, domNodeId: string, inPopover: boolean) => void,
@@ -8,11 +8,8 @@ type Props = {
8
8
  style?: StyleType;
9
9
  };
10
10
  declare class ProvidedKeypad extends React.Component<Props> {
11
- mounted?: boolean;
12
11
  store: any;
13
- UNSAFE_componentWillMount(): void;
14
- componentDidMount(): void;
15
- componentWillUnmount(): void;
12
+ constructor(props: any);
16
13
  activate: () => void;
17
14
  dismiss: () => void;
18
15
  configure: (configuration: KeypadConfiguration, cb: () => void) => void;
@@ -14,11 +14,8 @@ declare type Props = {|
14
14
  style?: StyleType,
15
15
  |};
16
16
  declare class ProvidedKeypad extends React.Component<Props> {
17
- mounted?: boolean;
18
17
  store: any;
19
- UNSAFE_componentWillMount(): void;
20
- componentDidMount(): void;
21
- componentWillUnmount(): void;
18
+ constructor(props: any): this;
22
19
  activate: () => void;
23
20
  dismiss: () => void;
24
21
  configure: (configuration: KeypadConfiguration, cb: () => void) => void;
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * Common styles shared across components.
3
3
  */
4
- /// <reference path="../../types/aphrodite.d.ts" />
5
- declare const _default: import("aphrodite").StyleDeclaration;
4
+ declare const _default: any;
6
5
  export default _default;
@@ -4,10 +4,8 @@
4
4
  * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
- import * as $Flowgen$Import$aphrodite from "aphrodite";
8
-
9
7
  /**
10
8
  * Common styles shared across components.
11
9
  */
12
- declare var _default: $Flowgen$Import$aphrodite.StyleDeclaration;
10
+ declare var _default: any;
13
11
  declare export default typeof _default;
@@ -4,22 +4,22 @@
4
4
  * touch events globally) opaque to the KeypadButton.
5
5
  */
6
6
  import * as React from "react";
7
- import { KeyType } from "../consts";
7
+ import Keys from "../data/keys";
8
+ import { KeyType } from "../enums";
8
9
  import GestureManager from "./gesture-manager";
9
- import type { Key } from "../data/keys";
10
- import type { Border, Icon } from "../types";
10
+ import type { Border, IconConfig } from "../types";
11
11
  import type { StyleType } from "@khanacademy/wonder-blocks-core";
12
12
  type Props = {
13
13
  borders: Border;
14
- childKeyIds: ReadonlyArray<Key>;
14
+ childKeyIds: ReadonlyArray<Keys>;
15
15
  disabled: boolean;
16
16
  focused: boolean;
17
17
  gestureManager: GestureManager;
18
- id: Key;
18
+ id: Keys;
19
19
  popoverEnabled: boolean;
20
20
  style: StyleType;
21
21
  type: KeyType;
22
- icon: Icon;
22
+ icon: IconConfig;
23
23
  };
24
24
  declare class TouchableKeypadButton extends React.Component<Props> {
25
25
  shouldComponentUpdate(newProps: any): boolean;
@@ -6,22 +6,22 @@
6
6
  */
7
7
  import * as $Flowgen$Import$react_2d_redux from "react-redux";
8
8
  import * as React from "react";
9
- import { KeyType } from "../consts";
9
+ import Keys from "../data/keys";
10
+ import { KeyType } from "../enums";
10
11
  import GestureManager from "./gesture-manager";
11
- import type { Key } from "../data/keys";
12
- import type { Border, Icon } from "../types";
12
+ import type { Border, IconConfig } from "../types";
13
13
  import type { StyleType } from "@khanacademy/wonder-blocks-core";
14
14
  declare type Props = {|
15
15
  borders: Border,
16
- childKeyIds: $ReadOnlyArray<Key>,
16
+ childKeyIds: $ReadOnlyArray<Keys>,
17
17
  disabled: boolean,
18
18
  focused: boolean,
19
19
  gestureManager: GestureManager,
20
- id: Key,
20
+ id: Keys,
21
21
  popoverEnabled: boolean,
22
22
  style: StyleType,
23
23
  type: KeyType,
24
- icon: Icon,
24
+ icon: IconConfig,
25
25
  |};
26
26
  declare class TouchableKeypadButton extends React.Component<Props> {
27
27
  shouldComponentUpdate(newProps: any): boolean;
@@ -2,56 +2,55 @@
2
2
  * This file contains constants for keypad buttons that aren't single
3
3
  * alphanumeric characters.
4
4
  */
5
- export type Key = "PLUS" | "MINUS" | "NEGATIVE" | "TIMES" | "DIVIDE" | "DECIMAL" | "PERIOD" | "PERCENT" | "CDOT" | "EQUAL" | "NEQ" | "GT" | "LT" | "GEQ" | "LEQ" | "FRAC_INCLUSIVE" | "FRAC_EXCLUSIVE" | "FRAC" | "EXP" | "EXP_2" | "EXP_3" | "SQRT" | "CUBE_ROOT" | "RADICAL" | "LEFT_PAREN" | "RIGHT_PAREN" | "LN" | "LOG" | "LOG_N" | "SIN" | "COS" | "TAN" | "PI" | "THETA" | "UP" | "RIGHT" | "DOWN" | "LEFT" | "BACKSPACE" | "DISMISS" | "JUMP_OUT_PARENTHESES" | "JUMP_OUT_EXPONENT" | "JUMP_OUT_BASE" | "JUMP_INTO_NUMERATOR" | "JUMP_OUT_NUMERATOR" | "JUMP_OUT_DENOMINATOR" | "NOOP" | "FRAC_MULTI" | "MANY";
6
- declare const Keys: {
7
- readonly PLUS: "PLUS";
8
- readonly MINUS: "MINUS";
9
- readonly NEGATIVE: "NEGATIVE";
10
- readonly TIMES: "TIMES";
11
- readonly DIVIDE: "DIVIDE";
12
- readonly DECIMAL: "DECIMAL";
13
- readonly PERIOD: "PERIOD";
14
- readonly PERCENT: "PERCENT";
15
- readonly CDOT: "CDOT";
16
- readonly EQUAL: "EQUAL";
17
- readonly NEQ: "NEQ";
18
- readonly GT: "GT";
19
- readonly LT: "LT";
20
- readonly GEQ: "GEQ";
21
- readonly LEQ: "LEQ";
22
- readonly FRAC_INCLUSIVE: "FRAC_INCLUSIVE";
23
- readonly FRAC_EXCLUSIVE: "FRAC_EXCLUSIVE";
24
- readonly FRAC: "FRAC";
25
- readonly EXP: "EXP";
26
- readonly EXP_2: "EXP_2";
27
- readonly EXP_3: "EXP_3";
28
- readonly SQRT: "SQRT";
29
- readonly CUBE_ROOT: "CUBE_ROOT";
30
- readonly RADICAL: "RADICAL";
31
- readonly LEFT_PAREN: "LEFT_PAREN";
32
- readonly RIGHT_PAREN: "RIGHT_PAREN";
33
- readonly LN: "LN";
34
- readonly LOG: "LOG";
35
- readonly LOG_N: "LOG_N";
36
- readonly SIN: "SIN";
37
- readonly COS: "COS";
38
- readonly TAN: "TAN";
39
- readonly PI: "PI";
40
- readonly THETA: "THETA";
41
- readonly UP: "UP";
42
- readonly RIGHT: "RIGHT";
43
- readonly DOWN: "DOWN";
44
- readonly LEFT: "LEFT";
45
- readonly BACKSPACE: "BACKSPACE";
46
- readonly DISMISS: "DISMISS";
47
- readonly JUMP_OUT_PARENTHESES: "JUMP_OUT_PARENTHESES";
48
- readonly JUMP_OUT_EXPONENT: "JUMP_OUT_EXPONENT";
49
- readonly JUMP_OUT_BASE: "JUMP_OUT_BASE";
50
- readonly JUMP_INTO_NUMERATOR: "JUMP_INTO_NUMERATOR";
51
- readonly JUMP_OUT_NUMERATOR: "JUMP_OUT_NUMERATOR";
52
- readonly JUMP_OUT_DENOMINATOR: "JUMP_OUT_DENOMINATOR";
53
- readonly NOOP: "NOOP";
54
- readonly FRAC_MULTI: "FRAC_MULTI";
55
- readonly MANY: "MANY";
56
- };
5
+ declare enum Keys {
6
+ PLUS = "PLUS",
7
+ MINUS = "MINUS",
8
+ NEGATIVE = "NEGATIVE",
9
+ TIMES = "TIMES",
10
+ DIVIDE = "DIVIDE",
11
+ DECIMAL = "DECIMAL",
12
+ PERIOD = "PERIOD",
13
+ PERCENT = "PERCENT",
14
+ CDOT = "CDOT",
15
+ EQUAL = "EQUAL",
16
+ NEQ = "NEQ",
17
+ GT = "GT",
18
+ LT = "LT",
19
+ GEQ = "GEQ",
20
+ LEQ = "LEQ",
21
+ FRAC_INCLUSIVE = "FRAC_INCLUSIVE",
22
+ FRAC_EXCLUSIVE = "FRAC_EXCLUSIVE",
23
+ FRAC = "FRAC",
24
+ EXP = "EXP",
25
+ EXP_2 = "EXP_2",
26
+ EXP_3 = "EXP_3",
27
+ SQRT = "SQRT",
28
+ CUBE_ROOT = "CUBE_ROOT",
29
+ RADICAL = "RADICAL",
30
+ LEFT_PAREN = "LEFT_PAREN",
31
+ RIGHT_PAREN = "RIGHT_PAREN",
32
+ LN = "LN",
33
+ LOG = "LOG",
34
+ LOG_N = "LOG_N",
35
+ SIN = "SIN",
36
+ COS = "COS",
37
+ TAN = "TAN",
38
+ PI = "PI",
39
+ THETA = "THETA",
40
+ UP = "UP",
41
+ RIGHT = "RIGHT",
42
+ DOWN = "DOWN",
43
+ LEFT = "LEFT",
44
+ BACKSPACE = "BACKSPACE",
45
+ DISMISS = "DISMISS",
46
+ JUMP_OUT_PARENTHESES = "JUMP_OUT_PARENTHESES",
47
+ JUMP_OUT_EXPONENT = "JUMP_OUT_EXPONENT",
48
+ JUMP_OUT_BASE = "JUMP_OUT_BASE",
49
+ JUMP_INTO_NUMERATOR = "JUMP_INTO_NUMERATOR",
50
+ JUMP_OUT_NUMERATOR = "JUMP_OUT_NUMERATOR",
51
+ JUMP_OUT_DENOMINATOR = "JUMP_OUT_DENOMINATOR",
52
+ NOOP = "NOOP",
53
+ FRAC_MULTI = "FRAC_MULTI",
54
+ MANY = "MANY"
55
+ }
57
56
  export default Keys;
@@ -8,105 +8,56 @@
8
8
  * This file contains constants for keypad buttons that aren't single
9
9
  * alphanumeric characters.
10
10
  */
11
- export type Key =
12
- | "PLUS"
13
- | "MINUS"
14
- | "NEGATIVE"
15
- | "TIMES"
16
- | "DIVIDE"
17
- | "DECIMAL"
18
- | "PERIOD"
19
- | "PERCENT"
20
- | "CDOT"
21
- | "EQUAL"
22
- | "NEQ"
23
- | "GT"
24
- | "LT"
25
- | "GEQ"
26
- | "LEQ"
27
- | "FRAC_INCLUSIVE"
28
- | "FRAC_EXCLUSIVE"
29
- | "FRAC"
30
- | "EXP"
31
- | "EXP_2"
32
- | "EXP_3"
33
- | "SQRT"
34
- | "CUBE_ROOT"
35
- | "RADICAL"
36
- | "LEFT_PAREN"
37
- | "RIGHT_PAREN"
38
- | "LN"
39
- | "LOG"
40
- | "LOG_N"
41
- | "SIN"
42
- | "COS"
43
- | "TAN"
44
- | "PI"
45
- | "THETA"
46
- | "UP"
47
- | "RIGHT"
48
- | "DOWN"
49
- | "LEFT"
50
- | "BACKSPACE"
51
- | "DISMISS"
52
- | "JUMP_OUT_PARENTHESES"
53
- | "JUMP_OUT_EXPONENT"
54
- | "JUMP_OUT_BASE"
55
- | "JUMP_INTO_NUMERATOR"
56
- | "JUMP_OUT_NUMERATOR"
57
- | "JUMP_OUT_DENOMINATOR"
58
- | "NOOP"
59
- | "FRAC_MULTI"
60
- | "MANY";
11
+
61
12
  declare var Keys: {|
62
- +PLUS: "PLUS",
63
- +MINUS: "MINUS",
64
- +NEGATIVE: "NEGATIVE",
65
- +TIMES: "TIMES",
66
- +DIVIDE: "DIVIDE",
67
- +DECIMAL: "DECIMAL",
68
- +PERIOD: "PERIOD",
69
- +PERCENT: "PERCENT",
70
- +CDOT: "CDOT",
71
- +EQUAL: "EQUAL",
72
- +NEQ: "NEQ",
73
- +GT: "GT",
74
- +LT: "LT",
75
- +GEQ: "GEQ",
76
- +LEQ: "LEQ",
77
- +FRAC_INCLUSIVE: "FRAC_INCLUSIVE",
78
- +FRAC_EXCLUSIVE: "FRAC_EXCLUSIVE",
79
- +FRAC: "FRAC",
80
- +EXP: "EXP",
81
- +EXP_2: "EXP_2",
82
- +EXP_3: "EXP_3",
83
- +SQRT: "SQRT",
84
- +CUBE_ROOT: "CUBE_ROOT",
85
- +RADICAL: "RADICAL",
86
- +LEFT_PAREN: "LEFT_PAREN",
87
- +RIGHT_PAREN: "RIGHT_PAREN",
88
- +LN: "LN",
89
- +LOG: "LOG",
90
- +LOG_N: "LOG_N",
91
- +SIN: "SIN",
92
- +COS: "COS",
93
- +TAN: "TAN",
94
- +PI: "PI",
95
- +THETA: "THETA",
96
- +UP: "UP",
97
- +RIGHT: "RIGHT",
98
- +DOWN: "DOWN",
99
- +LEFT: "LEFT",
100
- +BACKSPACE: "BACKSPACE",
101
- +DISMISS: "DISMISS",
102
- +JUMP_OUT_PARENTHESES: "JUMP_OUT_PARENTHESES",
103
- +JUMP_OUT_EXPONENT: "JUMP_OUT_EXPONENT",
104
- +JUMP_OUT_BASE: "JUMP_OUT_BASE",
105
- +JUMP_INTO_NUMERATOR: "JUMP_INTO_NUMERATOR",
106
- +JUMP_OUT_NUMERATOR: "JUMP_OUT_NUMERATOR",
107
- +JUMP_OUT_DENOMINATOR: "JUMP_OUT_DENOMINATOR",
108
- +NOOP: "NOOP",
109
- +FRAC_MULTI: "FRAC_MULTI",
110
- +MANY: "MANY",
13
+ +PLUS: "PLUS", // "PLUS"
14
+ +MINUS: "MINUS", // "MINUS"
15
+ +NEGATIVE: "NEGATIVE", // "NEGATIVE"
16
+ +TIMES: "TIMES", // "TIMES"
17
+ +DIVIDE: "DIVIDE", // "DIVIDE"
18
+ +DECIMAL: "DECIMAL", // "DECIMAL"
19
+ +PERIOD: "PERIOD", // "PERIOD"
20
+ +PERCENT: "PERCENT", // "PERCENT"
21
+ +CDOT: "CDOT", // "CDOT"
22
+ +EQUAL: "EQUAL", // "EQUAL"
23
+ +NEQ: "NEQ", // "NEQ"
24
+ +GT: "GT", // "GT"
25
+ +LT: "LT", // "LT"
26
+ +GEQ: "GEQ", // "GEQ"
27
+ +LEQ: "LEQ", // "LEQ"
28
+ +FRAC_INCLUSIVE: "FRAC_INCLUSIVE", // "FRAC_INCLUSIVE"
29
+ +FRAC_EXCLUSIVE: "FRAC_EXCLUSIVE", // "FRAC_EXCLUSIVE"
30
+ +FRAC: "FRAC", // "FRAC"
31
+ +EXP: "EXP", // "EXP"
32
+ +EXP_2: "EXP_2", // "EXP_2"
33
+ +EXP_3: "EXP_3", // "EXP_3"
34
+ +SQRT: "SQRT", // "SQRT"
35
+ +CUBE_ROOT: "CUBE_ROOT", // "CUBE_ROOT"
36
+ +RADICAL: "RADICAL", // "RADICAL"
37
+ +LEFT_PAREN: "LEFT_PAREN", // "LEFT_PAREN"
38
+ +RIGHT_PAREN: "RIGHT_PAREN", // "RIGHT_PAREN"
39
+ +LN: "LN", // "LN"
40
+ +LOG: "LOG", // "LOG"
41
+ +LOG_N: "LOG_N", // "LOG_N"
42
+ +SIN: "SIN", // "SIN"
43
+ +COS: "COS", // "COS"
44
+ +TAN: "TAN", // "TAN"
45
+ +PI: "PI", // "PI"
46
+ +THETA: "THETA", // "THETA"
47
+ +UP: "UP", // "UP"
48
+ +RIGHT: "RIGHT", // "RIGHT"
49
+ +DOWN: "DOWN", // "DOWN"
50
+ +LEFT: "LEFT", // "LEFT"
51
+ +BACKSPACE: "BACKSPACE", // "BACKSPACE"
52
+ +DISMISS: "DISMISS", // "DISMISS"
53
+ +JUMP_OUT_PARENTHESES: "JUMP_OUT_PARENTHESES", // "JUMP_OUT_PARENTHESES"
54
+ +JUMP_OUT_EXPONENT: "JUMP_OUT_EXPONENT", // "JUMP_OUT_EXPONENT"
55
+ +JUMP_OUT_BASE: "JUMP_OUT_BASE", // "JUMP_OUT_BASE"
56
+ +JUMP_INTO_NUMERATOR: "JUMP_INTO_NUMERATOR", // "JUMP_INTO_NUMERATOR"
57
+ +JUMP_OUT_NUMERATOR: "JUMP_OUT_NUMERATOR", // "JUMP_OUT_NUMERATOR"
58
+ +JUMP_OUT_DENOMINATOR: "JUMP_OUT_DENOMINATOR", // "JUMP_OUT_DENOMINATOR"
59
+ +NOOP: "NOOP", // "NOOP"
60
+ +FRAC_MULTI: "FRAC_MULTI", // "FRAC_MULTI"
61
+ +MANY: "MANY", // "MANY"
111
62
  |};
112
63
  declare export default typeof Keys;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Constants that are shared between multiple files.
3
+ */
4
+ export declare enum KeypadType {
5
+ FRACTION = "FRACTION",
6
+ EXPRESSION = "EXPRESSION"
7
+ }
8
+ export declare enum KeyType {
9
+ EMPTY = "EMPTY",
10
+ VALUE = "VALUE",
11
+ OPERATOR = "OPERATOR",
12
+ INPUT_NAVIGATION = "INPUT_NAVIGATION",
13
+ KEYPAD_NAVIGATION = "KEYPAD_NAVIGATION",
14
+ MANY = "MANY",
15
+ ECHO = "ECHO"
16
+ }
17
+ export declare enum DeviceOrientation {
18
+ LANDSCAPE = "LANDSCAPE",
19
+ PORTRAIT = "PORTRAIT"
20
+ }
21
+ export declare enum DeviceType {
22
+ PHONE = "PHONE",
23
+ TABLET = "TABLET"
24
+ }
25
+ export declare enum LayoutMode {
26
+ FULLSCREEN = "FULLSCREEN",
27
+ COMPACT = "COMPACT"
28
+ }
29
+ export declare enum BorderDirection {
30
+ LEFT = "LEFT",
31
+ BOTTOM = "BOTTOM"
32
+ }
33
+ export declare const BorderStyles: {
34
+ [style: string]: ReadonlyArray<BorderDirection>;
35
+ };
36
+ export declare enum IconType {
37
+ MATH = "MATH",
38
+ SVG = "SVG",
39
+ TEXT = "TEXT"
40
+ }
41
+ export declare enum DecimalSeparator {
42
+ COMMA = "COMMA",
43
+ PERIOD = "PERIOD"
44
+ }
45
+ export declare enum EchoAnimationType {
46
+ SLIDE_AND_FADE = "SLIDE_AND_FADE",
47
+ FADE_ONLY = "FADE_ONLY",
48
+ LONG_FADE_ONLY = "LONG_FADE_ONLY"
49
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Flowtype definitions for data
3
+ * Generated by Flowgen from a Typescript Definition
4
+ * Flowgen v1.21.0
5
+ * @flow
6
+ */
7
+ /**
8
+ * Constants that are shared between multiple files.
9
+ */
10
+
11
+ declare export var KeypadType: {|
12
+ +FRACTION: "FRACTION", // "FRACTION"
13
+ +EXPRESSION: "EXPRESSION", // "EXPRESSION"
14
+ |};
15
+
16
+ declare export var KeyType: {|
17
+ +EMPTY: "EMPTY", // "EMPTY"
18
+ +VALUE: "VALUE", // "VALUE"
19
+ +OPERATOR: "OPERATOR", // "OPERATOR"
20
+ +INPUT_NAVIGATION: "INPUT_NAVIGATION", // "INPUT_NAVIGATION"
21
+ +KEYPAD_NAVIGATION: "KEYPAD_NAVIGATION", // "KEYPAD_NAVIGATION"
22
+ +MANY: "MANY", // "MANY"
23
+ +ECHO: "ECHO", // "ECHO"
24
+ |};
25
+
26
+ declare export var DeviceOrientation: {|
27
+ +LANDSCAPE: "LANDSCAPE", // "LANDSCAPE"
28
+ +PORTRAIT: "PORTRAIT", // "PORTRAIT"
29
+ |};
30
+
31
+ declare export var DeviceType: {|
32
+ +PHONE: "PHONE", // "PHONE"
33
+ +TABLET: "TABLET", // "TABLET"
34
+ |};
35
+
36
+ declare export var LayoutMode: {|
37
+ +FULLSCREEN: "FULLSCREEN", // "FULLSCREEN"
38
+ +COMPACT: "COMPACT", // "COMPACT"
39
+ |};
40
+
41
+ declare export var BorderDirection: {|
42
+ +LEFT: "LEFT", // "LEFT"
43
+ +BOTTOM: "BOTTOM", // "BOTTOM"
44
+ |};
45
+ declare export var BorderStyles: {
46
+ [style: string]: $ReadOnlyArray<$Values<typeof BorderDirection>>,
47
+ };
48
+ declare export var IconType: {|
49
+ +MATH: "MATH", // "MATH"
50
+ +SVG: "SVG", // "SVG"
51
+ +TEXT: "TEXT", // "TEXT"
52
+ |};
53
+
54
+ declare export var DecimalSeparator: {|
55
+ +COMMA: "COMMA", // "COMMA"
56
+ +PERIOD: "PERIOD", // "PERIOD"
57
+ |};
58
+
59
+ declare export var EchoAnimationType: {|
60
+ +SLIDE_AND_FADE: "SLIDE_AND_FADE", // "SLIDE_AND_FADE"
61
+ +FADE_ONLY: "FADE_ONLY", // "FADE_ONLY"
62
+ +LONG_FADE_ONLY: "LONG_FADE_ONLY", // "LONG_FADE_ONLY"
63
+ |};
package/dist/es/index.css CHANGED
@@ -122,9 +122,6 @@
122
122
  color: white !important;
123
123
  display: inline-block !important;
124
124
  }
125
- .keypad-container .katex {
126
- color: inherit !important;
127
- }
128
125
  /**
129
126
  * Styles for managing the popover animations.
130
127
  *