@khanacademy/math-input 0.6.8 → 0.7.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.
- package/.eslintrc.js +1 -0
- package/CHANGELOG.md +6 -0
- package/dist/components/common-style.d.ts +21 -0
- package/dist/components/common-style.js.flow +27 -0
- package/dist/components/input/cursor-contexts.d.ts +19 -0
- package/dist/components/input/cursor-contexts.js.flow +32 -0
- package/dist/components/input/cursor-handle.d.ts +25 -0
- package/dist/components/input/cursor-handle.js.flow +28 -0
- package/dist/components/input/math-input.d.ts +128 -0
- package/dist/components/input/math-input.js.flow +152 -0
- package/dist/components/keypad/button-assets.d.ts +6 -0
- package/dist/components/keypad/button-assets.js.flow +12 -0
- package/dist/components/keypad/button.d.ts +14 -0
- package/dist/components/keypad/button.js.flow +19 -0
- package/dist/components/keypad/index.d.ts +15 -0
- package/dist/components/keypad/index.js.flow +22 -0
- package/dist/components/keypad/keypad-page-items.d.ts +24 -0
- package/dist/components/keypad/keypad-page-items.js.flow +30 -0
- package/dist/components/keypad/numeric-input-page.d.ts +8 -0
- package/dist/components/keypad/numeric-input-page.js.flow +13 -0
- package/dist/components/keypad/pre-algebra-page.d.ts +8 -0
- package/dist/components/keypad/pre-algebra-page.js.flow +13 -0
- package/dist/components/keypad/trigonometry-page.d.ts +8 -0
- package/dist/components/keypad/trigonometry-page.js.flow +15 -0
- package/dist/components/provided-keypad.d.ts +23 -0
- package/dist/components/provided-keypad.js.flow +32 -0
- package/dist/components/tabbar/icons.d.ts +7 -0
- package/dist/components/tabbar/icons.js.flow +13 -0
- package/dist/components/tabbar/item.d.ts +14 -0
- package/dist/components/tabbar/item.js.flow +20 -0
- package/dist/components/tabbar/tabbar.d.ts +14 -0
- package/dist/components/tabbar/tabbar.js.flow +20 -0
- package/{src/components/tabbar/types.js → dist/components/tabbar/types.d.ts} +0 -2
- package/dist/components/tabbar/types.js.flow +7 -0
- package/dist/components/z-indexes.d.ts +7 -0
- package/dist/components/z-indexes.js.flow +13 -0
- package/dist/consts.d.ts +51 -0
- package/dist/consts.js.flow +66 -0
- package/dist/data/key-configs.d.ts +7 -0
- package/dist/data/key-configs.js.flow +13 -0
- package/dist/data/keys.d.ts +57 -0
- package/dist/data/keys.js.flow +112 -0
- package/dist/es/index.js +487 -985
- package/dist/es/index.js.map +1 -1
- package/dist/fake-react-native-web/index.d.ts +10 -0
- package/dist/fake-react-native-web/index.js.flow +8 -0
- package/dist/fake-react-native-web/text.d.ts +12 -0
- package/dist/fake-react-native-web/text.js.flow +18 -0
- package/dist/fake-react-native-web/view.d.ts +22 -0
- package/dist/fake-react-native-web/view.js.flow +28 -0
- package/dist/index.d.ts +14 -2
- package/dist/index.js +524 -951
- package/dist/index.js.flow +20 -2
- package/dist/index.js.map +1 -1
- package/dist/store/index.d.ts +1 -0
- package/dist/store/index.js.flow +7 -0
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js.flow +7 -0
- package/package.json +2 -2
- package/src/components/__tests__/gesture-state-machine_test.js +1 -1
- package/src/components/__tests__/node-manager_test.js +1 -1
- package/src/components/__tests__/two-page-keypad_test.js +1 -1
- package/src/components/app.js +2 -2
- package/src/components/{common-style.js → common-style.ts} +0 -1
- package/src/components/compute-layout-parameters.js +2 -2
- package/src/components/corner-decal.js +2 -2
- package/src/components/echo-manager.js +5 -5
- package/src/components/empty-keypad-button.js +3 -3
- package/src/components/expression-keypad.js +10 -10
- package/src/components/fraction-keypad.js +9 -9
- package/src/components/gesture-manager.js +3 -3
- package/src/components/icon.js +6 -6
- package/src/components/iconography/down.js +1 -1
- package/src/components/iconography/index.js +41 -41
- package/src/components/iconography/left.js +1 -1
- package/src/components/iconography/right.js +1 -1
- package/src/components/iconography/up.js +1 -1
- package/src/components/input/__tests__/context-tracking_test.js +3 -3
- package/src/components/input/__tests__/mathquill_test.js +2 -2
- package/src/components/input/__tests__/test-math-wrapper.jsx +1 -1
- package/src/components/input/{cursor-contexts.js → cursor-contexts.ts} +7 -14
- package/src/components/input/{cursor-handle.js → cursor-handle.tsx} +19 -20
- package/src/components/input/{math-input.js → math-input.tsx} +170 -151
- package/src/components/input/math-wrapper.js +5 -5
- package/src/components/input/scroll-into-view.js +1 -1
- package/src/components/keypad/{button-assets.js → button-assets.tsx} +5 -4
- package/src/components/keypad/button.stories.js +1 -1
- package/src/components/keypad/{button.js → button.tsx} +9 -9
- package/src/components/keypad/{index.js → index.tsx} +16 -15
- package/src/components/keypad/{keypad-page-items.js → keypad-page-items.tsx} +24 -39
- package/src/components/keypad/{keypad-pages.stories.js → keypad-pages.stories.tsx} +6 -8
- package/src/components/keypad/{keypad.stories.js → keypad.stories.tsx} +3 -5
- package/src/components/keypad/{numeric-input-page.js → numeric-input-page.tsx} +6 -7
- package/src/components/keypad/{pre-algebra-page.js → pre-algebra-page.tsx} +6 -7
- package/src/components/keypad/{trigonometry-page.js → trigonometry-page.tsx} +6 -7
- package/src/components/keypad-button.js +7 -11
- package/src/components/keypad-container.js +10 -10
- package/src/components/keypad.js +5 -5
- package/src/components/many-keypad-button.js +6 -6
- package/src/components/math-icon.js +3 -3
- package/src/components/multi-symbol-grid.js +6 -6
- package/src/components/multi-symbol-popover.js +5 -5
- package/src/components/navigation-pad.js +6 -6
- package/src/components/popover-manager.js +3 -3
- package/src/components/prop-types.js +3 -3
- package/src/components/{provided-keypad.js → provided-keypad.tsx} +16 -14
- package/src/components/styles.js +1 -1
- package/src/components/svg-icon.js +1 -1
- package/src/components/tabbar/__tests__/tabbar_test.js +1 -1
- package/src/components/tabbar/{icons.js → icons.tsx} +7 -12
- package/src/components/tabbar/{item.js → item.tsx} +6 -8
- package/src/components/tabbar/tabbar.stories.js +2 -2
- package/src/components/tabbar/{tabbar.js → tabbar.tsx} +6 -8
- package/src/components/tabbar/types.ts +1 -0
- package/src/components/text-icon.js +3 -3
- package/src/components/touchable-keypad-button.js +5 -5
- package/src/components/two-page-keypad.js +5 -5
- package/src/components/{z-indexes.js → z-indexes.ts} +0 -1
- package/src/{consts.js → consts.ts} +22 -27
- package/src/data/{key-configs.js → key-configs.ts} +7 -8
- package/src/data/{keys.js → keys.ts} +7 -13
- package/src/demo.js +1 -1
- package/src/fake-react-native-web/{index.js → index.ts} +2 -3
- package/src/fake-react-native-web/{text.js → text.tsx} +7 -9
- package/src/fake-react-native-web/{view.js → view.tsx} +15 -17
- package/src/{index.js → index.ts} +9 -10
- package/src/native-app.js +3 -3
- package/src/store/{index.js → index.ts} +63 -34
- package/src/{utils.js → utils.ts} +1 -2
- package/tsconfig.json +9 -0
- package/tsconfig.tsbuildinfo +1 -0
- /package/dist/{strings.js → strings} +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
declare type Props = {|
|
|
9
|
+
onClickKey: (keyConfig: string) => void,
|
|
10
|
+
|};
|
|
11
|
+
declare export default class TrigonometryInputPage
|
|
12
|
+
extends React.Component<Props>
|
|
13
|
+
{
|
|
14
|
+
render(): React.Node;
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import ReactDOM from "react-dom";
|
|
3
|
+
import type { CSSProperties } from "aphrodite";
|
|
4
|
+
type Props = {
|
|
5
|
+
onElementMounted?: (arg1: any) => void;
|
|
6
|
+
onDismiss?: () => unknown;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
};
|
|
9
|
+
declare class ProvidedKeypad extends React.Component<Props> {
|
|
10
|
+
mounted: boolean;
|
|
11
|
+
store: any;
|
|
12
|
+
UNSAFE_componentWillMount(): void;
|
|
13
|
+
componentDidMount(): void;
|
|
14
|
+
componentWillUnmount(): void;
|
|
15
|
+
activate: () => void;
|
|
16
|
+
dismiss: () => void;
|
|
17
|
+
configure: () => void;
|
|
18
|
+
setCursor: () => void;
|
|
19
|
+
setKeyHandler: (keyHandler: any) => void;
|
|
20
|
+
getDOMNode: () => ReturnType<typeof ReactDOM.findDOMNode>;
|
|
21
|
+
render(): React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export default ProvidedKeypad;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import ReactDOM from "react-dom";
|
|
9
|
+
import type { CSSProperties } from "aphrodite";
|
|
10
|
+
declare type Props = {|
|
|
11
|
+
onElementMounted?: (arg1: any) => void,
|
|
12
|
+
onDismiss?: () => mixed,
|
|
13
|
+
style?: CSSProperties,
|
|
14
|
+
|};
|
|
15
|
+
declare class ProvidedKeypad extends React.Component<Props> {
|
|
16
|
+
mounted: boolean;
|
|
17
|
+
store: any;
|
|
18
|
+
UNSAFE_componentWillMount(): void;
|
|
19
|
+
componentDidMount(): void;
|
|
20
|
+
componentWillUnmount(): void;
|
|
21
|
+
activate: () => void;
|
|
22
|
+
dismiss: () => void;
|
|
23
|
+
configure: () => void;
|
|
24
|
+
setCursor: () => void;
|
|
25
|
+
setKeyHandler: (keyHandler: any) => void;
|
|
26
|
+
getDOMNode: () => $Call<
|
|
27
|
+
<R>((...args: any[]) => R) => R,
|
|
28
|
+
typeof ReactDOM.findDOMNode
|
|
29
|
+
>;
|
|
30
|
+
render(): React.Node;
|
|
31
|
+
}
|
|
32
|
+
declare export default typeof ProvidedKeypad;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import type { TabbarItemType } from "./types";
|
|
9
|
+
declare var IconAsset: React.StatelessFunctionalComponent<{|
|
|
10
|
+
tintColor: string,
|
|
11
|
+
type: TabbarItemType,
|
|
12
|
+
|}>;
|
|
13
|
+
declare export default typeof IconAsset;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { TabbarItemType } from "./types";
|
|
3
|
+
export type ItemState = "active" | "inactive" | "disabled";
|
|
4
|
+
type Props = {
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
itemState: ItemState;
|
|
7
|
+
itemType: TabbarItemType;
|
|
8
|
+
};
|
|
9
|
+
type State = Record<any, any>;
|
|
10
|
+
declare class TabbarItem extends React.Component<Props, State> {
|
|
11
|
+
render(): React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const TabbarItemForTesting: typeof TabbarItem;
|
|
14
|
+
export default TabbarItem;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import type { TabbarItemType } from "./types";
|
|
9
|
+
export type ItemState = "active" | "inactive" | "disabled";
|
|
10
|
+
declare type Props = {|
|
|
11
|
+
onClick: () => void,
|
|
12
|
+
itemState: ItemState,
|
|
13
|
+
itemType: TabbarItemType,
|
|
14
|
+
|};
|
|
15
|
+
declare type State = { [key: any]: any };
|
|
16
|
+
declare class TabbarItem extends React.Component<Props, State> {
|
|
17
|
+
render(): React.Node;
|
|
18
|
+
}
|
|
19
|
+
declare export var TabbarItemForTesting: typeof TabbarItem;
|
|
20
|
+
declare export default typeof TabbarItem;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { TabbarItemType } from "./types";
|
|
3
|
+
type TabbarState = {
|
|
4
|
+
selectedItem: number;
|
|
5
|
+
};
|
|
6
|
+
type TabbarProps = {
|
|
7
|
+
items: Array<TabbarItemType>;
|
|
8
|
+
onSelect: (item: TabbarItemType) => void;
|
|
9
|
+
};
|
|
10
|
+
declare class Tabbar extends React.Component<TabbarProps, TabbarState> {
|
|
11
|
+
state: TabbarState;
|
|
12
|
+
render(): React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export default Tabbar;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import type { TabbarItemType } from "./types";
|
|
9
|
+
declare type TabbarState = {|
|
|
10
|
+
selectedItem: number,
|
|
11
|
+
|};
|
|
12
|
+
declare type TabbarProps = {|
|
|
13
|
+
items: Array<TabbarItemType>,
|
|
14
|
+
onSelect: (item: TabbarItemType) => void,
|
|
15
|
+
|};
|
|
16
|
+
declare class Tabbar extends React.Component<TabbarProps, TabbarState> {
|
|
17
|
+
state: TabbarState;
|
|
18
|
+
render(): React.Node;
|
|
19
|
+
}
|
|
20
|
+
declare export default typeof Tabbar;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* This file contains all of the z-index values used throughout the math-input
|
|
9
|
+
* component and its children.
|
|
10
|
+
*/
|
|
11
|
+
declare export var popover: 1;
|
|
12
|
+
declare export var echo: 2;
|
|
13
|
+
declare export var keypad: 1060;
|
package/dist/consts.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants that are shared between multiple files.
|
|
3
|
+
*/
|
|
4
|
+
export type KeypadType = "FRACTION" | "EXPRESSION";
|
|
5
|
+
export declare const KeypadTypes: {
|
|
6
|
+
readonly FRACTION: "FRACTION";
|
|
7
|
+
readonly EXPRESSION: "EXPRESSION";
|
|
8
|
+
};
|
|
9
|
+
export type KeyType = "EMPTY" | "VALUE" | "OPERATOR" | "INPUT_NAVIGATION" | "KEYPAD_NAVIGATION" | "MANY" | "ECHO";
|
|
10
|
+
export declare const KeyTypes: {
|
|
11
|
+
readonly EMPTY: "EMPTY";
|
|
12
|
+
readonly VALUE: "VALUE";
|
|
13
|
+
readonly OPERATOR: "OPERATOR";
|
|
14
|
+
readonly INPUT_NAVIGATION: "INPUT_NAVIGATION";
|
|
15
|
+
readonly KEYPAD_NAVIGATION: "KEYPAD_NAVIGATION";
|
|
16
|
+
readonly MANY: "MANY";
|
|
17
|
+
readonly ECHO: "ECHO";
|
|
18
|
+
};
|
|
19
|
+
export declare const DeviceOrientations: {
|
|
20
|
+
readonly LANDSCAPE: "LANDSCAPE";
|
|
21
|
+
readonly PORTRAIT: "PORTRAIT";
|
|
22
|
+
};
|
|
23
|
+
export declare const DeviceTypes: {
|
|
24
|
+
readonly PHONE: "PHONE";
|
|
25
|
+
readonly TABLET: "TABLET";
|
|
26
|
+
};
|
|
27
|
+
export declare const LayoutModes: {
|
|
28
|
+
readonly FULLSCREEN: "FULLSCREEN";
|
|
29
|
+
readonly COMPACT: "COMPACT";
|
|
30
|
+
};
|
|
31
|
+
export declare const BorderDirections: {
|
|
32
|
+
readonly LEFT: "LEFT";
|
|
33
|
+
readonly BOTTOM: "BOTTOM";
|
|
34
|
+
};
|
|
35
|
+
export declare const BorderStyles: {
|
|
36
|
+
[style: string]: ReadonlyArray<typeof BorderDirections[keyof typeof BorderDirections]>;
|
|
37
|
+
};
|
|
38
|
+
export declare const IconTypes: {
|
|
39
|
+
readonly MATH: "MATH";
|
|
40
|
+
readonly SVG: "SVG";
|
|
41
|
+
readonly TEXT: "TEXT";
|
|
42
|
+
};
|
|
43
|
+
export declare const DecimalSeparators: {
|
|
44
|
+
readonly COMMA: "COMMA";
|
|
45
|
+
readonly PERIOD: "PERIOD";
|
|
46
|
+
};
|
|
47
|
+
export declare const EchoAnimationTypes: {
|
|
48
|
+
readonly SLIDE_AND_FADE: "SLIDE_AND_FADE";
|
|
49
|
+
readonly FADE_ONLY: "FADE_ONLY";
|
|
50
|
+
readonly LONG_FADE_ONLY: "LONG_FADE_ONLY";
|
|
51
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
export type KeypadType = "FRACTION" | "EXPRESSION";
|
|
11
|
+
declare export var KeypadTypes: {|
|
|
12
|
+
+FRACTION: "FRACTION",
|
|
13
|
+
+EXPRESSION: "EXPRESSION",
|
|
14
|
+
|};
|
|
15
|
+
export type KeyType =
|
|
16
|
+
| "EMPTY"
|
|
17
|
+
| "VALUE"
|
|
18
|
+
| "OPERATOR"
|
|
19
|
+
| "INPUT_NAVIGATION"
|
|
20
|
+
| "KEYPAD_NAVIGATION"
|
|
21
|
+
| "MANY"
|
|
22
|
+
| "ECHO";
|
|
23
|
+
declare export var KeyTypes: {|
|
|
24
|
+
+EMPTY: "EMPTY",
|
|
25
|
+
+VALUE: "VALUE",
|
|
26
|
+
+OPERATOR: "OPERATOR",
|
|
27
|
+
+INPUT_NAVIGATION: "INPUT_NAVIGATION",
|
|
28
|
+
+KEYPAD_NAVIGATION: "KEYPAD_NAVIGATION",
|
|
29
|
+
+MANY: "MANY",
|
|
30
|
+
+ECHO: "ECHO",
|
|
31
|
+
|};
|
|
32
|
+
declare export var DeviceOrientations: {|
|
|
33
|
+
+LANDSCAPE: "LANDSCAPE",
|
|
34
|
+
+PORTRAIT: "PORTRAIT",
|
|
35
|
+
|};
|
|
36
|
+
declare export var DeviceTypes: {|
|
|
37
|
+
+PHONE: "PHONE",
|
|
38
|
+
+TABLET: "TABLET",
|
|
39
|
+
|};
|
|
40
|
+
declare export var LayoutModes: {|
|
|
41
|
+
+FULLSCREEN: "FULLSCREEN",
|
|
42
|
+
+COMPACT: "COMPACT",
|
|
43
|
+
|};
|
|
44
|
+
declare export var BorderDirections: {|
|
|
45
|
+
+LEFT: "LEFT",
|
|
46
|
+
+BOTTOM: "BOTTOM",
|
|
47
|
+
|};
|
|
48
|
+
declare export var BorderStyles: {
|
|
49
|
+
[style: string]: $ReadOnlyArray<
|
|
50
|
+
$ElementType<typeof BorderDirections, $Keys<typeof BorderDirections>>
|
|
51
|
+
>,
|
|
52
|
+
};
|
|
53
|
+
declare export var IconTypes: {|
|
|
54
|
+
+MATH: "MATH",
|
|
55
|
+
+SVG: "SVG",
|
|
56
|
+
+TEXT: "TEXT",
|
|
57
|
+
|};
|
|
58
|
+
declare export var DecimalSeparators: {|
|
|
59
|
+
+COMMA: "COMMA",
|
|
60
|
+
+PERIOD: "PERIOD",
|
|
61
|
+
|};
|
|
62
|
+
declare export var EchoAnimationTypes: {|
|
|
63
|
+
+SLIDE_AND_FADE: "SLIDE_AND_FADE",
|
|
64
|
+
+FADE_ONLY: "FADE_ONLY",
|
|
65
|
+
+LONG_FADE_ONLY: "LONG_FADE_ONLY",
|
|
66
|
+
|};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
export type KeyConfig = {|
|
|
8
|
+
id: string,
|
|
9
|
+
type: string,
|
|
10
|
+
ariaLabel: string,
|
|
11
|
+
|};
|
|
12
|
+
declare var KeyConfigs: any;
|
|
13
|
+
declare export default typeof KeyConfigs;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains constants for keypad buttons that aren't single
|
|
3
|
+
* alphanumeric characters.
|
|
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
|
+
};
|
|
57
|
+
export default Keys;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* This file contains constants for keypad buttons that aren't single
|
|
9
|
+
* alphanumeric characters.
|
|
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";
|
|
61
|
+
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",
|
|
111
|
+
|};
|
|
112
|
+
declare export default typeof Keys;
|