@khanacademy/math-input 19.2.0 → 20.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # math-input
1
+ # @khanacademy/math-input
2
2
 
3
- Khan Academy's expression editor for the mobile web. Used in the [Perseus](https://github.com/khan/perseus) exercise framework to power math input and expression editing on small screens.
3
+ Khan Academy's expression editor for the web. Used in the [Perseus](https://github.com/khan/perseus) exercise framework to power math input and expression editing on all screens.
4
4
 
5
5
  Built with [React](https://github.com/facebook/react), [MathQuill](https://github.com/mathquill/mathquill), [Aphrodite](https://github.com/khan/aphrodite), and more.
6
6
 
@@ -11,7 +11,7 @@ Try it yourself on [Khan Academy](https://www.khanacademy.org/math/algebra-basic
11
11
  ## Getting started
12
12
 
13
13
  - Clone the project: `git clone git@github.com:Khan/math-input.git`
14
- - Install dependencies: `yarn install`
14
+ - Install dependencies: `yarn`
15
15
  - Start the development server: `yarn start`
16
16
 
17
17
  When you start the project you'll need to be on a device that supports touch or touch emulation to see the keyboard. The easiest way to get started is open the developer tools on Google Chrome.
@@ -11,6 +11,6 @@ type I18nContextType = {
11
11
  };
12
12
  export declare const MathInputI18nContext: React.Context<I18nContextType>;
13
13
  type Props = React.PropsWithChildren<I18nContextType>;
14
- export declare function MathInputI18nContextProvider({ children, strings, locale, }: Props): JSX.Element;
14
+ export declare function MathInputI18nContextProvider({ children, strings, locale, }: Props): React.JSX.Element;
15
15
  export declare const useMathInputI18n: () => I18nContextType;
16
16
  export {};
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type Key from "../../../data/keys";
3
3
  import type { ClickKeyCallback } from "../../../types";
4
4
  type Props = {
5
5
  extraKeys: ReadonlyArray<Key>;
6
6
  onClickKey: ClickKeyCallback;
7
7
  };
8
- export default function ExtrasPage(props: Props): JSX.Element;
8
+ export default function ExtrasPage(props: Props): React.JSX.Element;
9
9
  export {};
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { ClickKeyCallback } from "../../../types";
3
3
  import type { CursorContext } from "../../input/cursor-contexts";
4
4
  type Props = {
5
5
  onClickKey: ClickKeyCallback;
6
6
  cursorContext?: (typeof CursorContext)[keyof typeof CursorContext];
7
7
  };
8
- export default function FractionsPage(props: Props): JSX.Element;
8
+ export default function FractionsPage(props: Props): React.JSX.Element;
9
9
  export {};
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { ClickKeyCallback } from "../../../types";
3
3
  type Props = {
4
4
  onClickKey: ClickKeyCallback;
5
5
  };
6
- export default function GeometryPage(props: Props): JSX.Element;
6
+ export default function GeometryPage(props: Props): React.JSX.Element;
7
7
  export {};
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { ClickKeyCallback } from "../../../types";
3
3
  type Props = {
4
4
  onClickKey: ClickKeyCallback;
5
5
  };
6
- export default function NumbersPage(props: Props): JSX.Element;
6
+ export default function NumbersPage(props: Props): React.JSX.Element;
7
7
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { ClickKeyCallback } from "../../../types";
3
3
  type Props = {
4
4
  onClickKey: ClickKeyCallback;
@@ -7,5 +7,5 @@ type Props = {
7
7
  basicRelations?: boolean;
8
8
  advancedRelations?: boolean;
9
9
  };
10
- export default function OperatorsPage(props: Props): JSX.Element;
10
+ export default function OperatorsPage(props: Props): React.JSX.Element;
11
11
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type Key from "../../data/keys";
3
3
  import type { ClickKeyCallback } from "../../types";
4
4
  import type { CursorContext } from "../input/cursor-contexts";
@@ -19,7 +19,7 @@ export type Props = {
19
19
  onClickKey: ClickKeyCallback;
20
20
  onAnalyticsEvent: AnalyticsEventHandlerFn;
21
21
  };
22
- declare function Keypad(props: Props): JSX.Element;
22
+ declare function Keypad(props: Props): React.JSX.Element;
23
23
  declare namespace Keypad {
24
24
  var defaultProps: {
25
25
  extraKeys: never[];
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
2
  import MobileKeypadInternals from "./mobile-keypad-internals";
3
3
  type Props = Omit<React.ComponentProps<typeof MobileKeypadInternals>, "keypadActive" | "setKeypadActive">;
4
- export declare function MobileKeypad(props: Props): JSX.Element;
4
+ export declare function MobileKeypad(props: Props): React.JSX.Element;
5
5
  export {};
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { KeyConfig, ClickKeyCallback } from "../../types";
3
3
  export type KeypadButtonProps = {
4
4
  coord: readonly [number, number];
5
5
  keyConfig: KeyConfig;
6
6
  onClickKey: ClickKeyCallback;
7
7
  };
8
- export default function NavigationButton({ coord, keyConfig, onClickKey, }: KeypadButtonProps): JSX.Element;
8
+ export default function NavigationButton({ coord, keyConfig, onClickKey, }: KeypadButtonProps): React.JSX.Element;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { ClickKeyCallback } from "../../types";
3
3
  export type Props = {
4
4
  onClickKey: ClickKeyCallback;
5
5
  };
6
- export default function NavigationPad(props: Props): JSX.Element;
6
+ export default function NavigationPad(props: Props): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { ClickKeyCallback, KeypadPageType } from "../../types";
3
3
  import type { CursorContext } from "../input/cursor-contexts";
4
4
  type Props = {
@@ -8,5 +8,5 @@ type Props = {
8
8
  convertDotToTimes?: boolean;
9
9
  divisionKey?: boolean;
10
10
  };
11
- export default function SharedKeys(props: Props): JSX.Element;
11
+ export default function SharedKeys(props: Props): React.JSX.Element;
12
12
  export {};
@@ -11,5 +11,5 @@ import * as React from "react";
11
11
  import type { KeypadContextType } from "../types";
12
12
  export declare const KeypadContext: React.Context<KeypadContextType>;
13
13
  type Props = React.PropsWithChildren<unknown>;
14
- export declare function StatefulKeypadContextProvider(props: Props): JSX.Element;
14
+ export declare function StatefulKeypadContextProvider(props: Props): React.JSX.Element;
15
15
  export {};
@@ -6,6 +6,8 @@ import type { MathInputStrings } from "../strings";
6
6
  import type { KeyConfig } from "../types";
7
7
  declare const KeyConfigs: (strings: MathInputStrings) => {
8
8
  MANY: KeyConfig;
9
+ x: KeyConfig;
10
+ y: KeyConfig;
9
11
  a: KeyConfig;
10
12
  b: KeyConfig;
11
13
  i: KeyConfig;
@@ -14,8 +16,6 @@ declare const KeyConfigs: (strings: MathInputStrings) => {
14
16
  s: KeyConfig;
15
17
  u: KeyConfig;
16
18
  g: KeyConfig;
17
- x: KeyConfig;
18
- y: KeyConfig;
19
19
  PLUS: KeyConfig;
20
20
  MINUS: KeyConfig;
21
21
  NEGATIVE: KeyConfig;
package/dist/es/index.js CHANGED
@@ -15,7 +15,7 @@ import PropTypes from 'prop-types';
15
15
 
16
16
  // This file is processed by a Rollup plugin (replace) to inject the production
17
17
  const libName = "@khanacademy/math-input";
18
- const libVersion = "19.2.0";
18
+ const libVersion = "20.0.0";
19
19
  addLibraryVersionToPerseusDebug(libName, libVersion);
20
20
 
21
21
  function _extends() {
package/dist/index.js CHANGED
@@ -44,7 +44,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
44
44
 
45
45
  // This file is processed by a Rollup plugin (replace) to inject the production
46
46
  const libName = "@khanacademy/math-input";
47
- const libVersion = "19.2.0";
47
+ const libVersion = "20.0.0";
48
48
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
49
49
 
50
50
  function _extends() {
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": "19.2.0",
6
+ "version": "20.0.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -37,7 +37,7 @@
37
37
  ],
38
38
  "scripts": {},
39
39
  "dependencies": {
40
- "@khanacademy/perseus-core": "1.4.2",
40
+ "@khanacademy/perseus-core": "1.5.0",
41
41
  "mathquill": "https://github.com/Khan/mathquill/releases/download/v1.0.0/mathquill-v1.0.0.tgz"
42
42
  },
43
43
  "devDependencies": {
@@ -54,10 +54,10 @@
54
54
  "katex": "0.11.1",
55
55
  "perseus-build-settings": "^0.4.1",
56
56
  "prop-types": "15.6.1",
57
- "react": "16.14.0",
58
- "react-dom": "^16.8.0",
59
- "react-router": "5.2.1",
60
- "react-router-dom": "5.3.0",
57
+ "react": ">= 18",
58
+ "react-dom": ">= 18",
59
+ "react-router": "^5.2.1",
60
+ "react-router-dom": "^5.3.0",
61
61
  "react-transition-group": "^4.4.1"
62
62
  },
63
63
  "peerDependencies": {
@@ -73,10 +73,10 @@
73
73
  "jquery": "^2.1.1",
74
74
  "katex": "0.11.1",
75
75
  "prop-types": "15.6.1",
76
- "react": "16.14.0",
77
- "react-dom": "^16.8.0",
78
- "react-router": "5.2.1",
79
- "react-router-dom": "5.3.0",
76
+ "react": ">= 18",
77
+ "react-dom": ">= 18",
78
+ "react-router": "^5.2.1",
79
+ "react-router-dom": "^5.3.0",
80
80
  "react-transition-group": "^4.4.1"
81
81
  },
82
82
  "keywords": []