@khanacademy/math-input 8.1.2 → 8.1.3
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/CHANGELOG.md +6 -0
- package/dist/components/input/mathquill-types.d.ts +1 -1
- package/dist/components/input/mathquill-types.js.flow +4 -1
- package/dist/components/keypad/mobile-keypad.d.ts +2 -2
- package/dist/components/keypad/mobile-keypad.js.flow +1 -1
- package/dist/components/prop-types.d.ts +12 -0
- package/dist/components/prop-types.js.flow +17 -0
- package/dist/es/index.js +1 -0
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.flow +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/input/mathquill-types.ts +4 -1
- package/src/components/keypad/mobile-keypad.tsx +8 -2
- package/src/components/{prop-types.js → prop-types.ts} +1 -0
- package/src/full-math-input.stories.tsx +1 -1
- package/src/index.ts +1 -0
- package/tsconfig-build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -148,7 +148,7 @@ export type MathFieldConfig = {
|
|
|
148
148
|
handlers?: {
|
|
149
149
|
edit?: (mathField: MathFieldInterface) => void;
|
|
150
150
|
enter?: (mathField: MathFieldInterface) => void;
|
|
151
|
-
moveOutOf?: (mathField: MathFieldInterface) => void;
|
|
151
|
+
moveOutOf?: (direction: MathQuillDirection, mathField: MathFieldInterface) => void;
|
|
152
152
|
upOutOf?: (mathField: MathFieldInterface) => void;
|
|
153
153
|
downOutOf?: (mathField: MathFieldInterface) => void;
|
|
154
154
|
deleteOutOf?: (direction: MathQuillDirection, mathField: MathFieldInterface) => void;
|
|
@@ -171,7 +171,10 @@ export type MathFieldConfig = {|
|
|
|
171
171
|
handlers?: {|
|
|
172
172
|
edit?: (mathField: MathFieldInterface) => void,
|
|
173
173
|
enter?: (mathField: MathFieldInterface) => void,
|
|
174
|
-
moveOutOf?: (
|
|
174
|
+
moveOutOf?: (
|
|
175
|
+
direction: MathQuillDirection,
|
|
176
|
+
mathField: MathFieldInterface
|
|
177
|
+
) => void,
|
|
175
178
|
upOutOf?: (mathField: MathFieldInterface) => void,
|
|
176
179
|
downOutOf?: (mathField: MathFieldInterface) => void,
|
|
177
180
|
deleteOutOf?: (
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StyleType } from "@khanacademy/wonder-blocks-core";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import ReactDOM from "react-dom";
|
|
4
|
-
import Key from "../../data/keys";
|
|
5
|
-
import { Cursor, KeypadConfiguration, KeyHandler, KeypadAPI } from "../../types";
|
|
4
|
+
import type Key from "../../data/keys";
|
|
5
|
+
import type { Cursor, KeypadConfiguration, KeyHandler, KeypadAPI } from "../../types";
|
|
6
6
|
/**
|
|
7
7
|
* This is the v2 equivalent of v1's ProvidedKeypad. It follows the same
|
|
8
8
|
* external API so that it can be hot-swapped with the v1 keypad and
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React PropTypes that may be shared between components.
|
|
3
|
+
*/
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
|
+
export declare const keypadElementPropType: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
+
activate: PropTypes.Validator<(...args: any[]) => any>;
|
|
7
|
+
dismiss: PropTypes.Validator<(...args: any[]) => any>;
|
|
8
|
+
configure: PropTypes.Validator<(...args: any[]) => any>;
|
|
9
|
+
setCursor: PropTypes.Validator<(...args: any[]) => any>;
|
|
10
|
+
setKeyHandler: PropTypes.Validator<(...args: any[]) => any>;
|
|
11
|
+
getDOMNode: PropTypes.Validator<(...args: any[]) => any>;
|
|
12
|
+
}>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for data
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import PropTypes from "prop-types";
|
|
8
|
+
declare export var keypadElementPropType: PropTypes.Requireable<
|
|
9
|
+
PropTypes.InferProps<{|
|
|
10
|
+
activate: PropTypes.Validator<(...args: any[]) => any>,
|
|
11
|
+
dismiss: PropTypes.Validator<(...args: any[]) => any>,
|
|
12
|
+
configure: PropTypes.Validator<(...args: any[]) => any>,
|
|
13
|
+
setCursor: PropTypes.Validator<(...args: any[]) => any>,
|
|
14
|
+
setKeyHandler: PropTypes.Validator<(...args: any[]) => any>,
|
|
15
|
+
getDOMNode: PropTypes.Validator<(...args: any[]) => any>,
|
|
16
|
+
|}>
|
|
17
|
+
>;
|
package/dist/es/index.js
CHANGED
|
@@ -8836,6 +8836,7 @@ const context = /*#__PURE__*/React.createContext({
|
|
|
8836
8836
|
*/
|
|
8837
8837
|
|
|
8838
8838
|
// NOTE(jared): This is no longer guaranteed to be React element
|
|
8839
|
+
// @deprecated Use `KeypadAPI` Typescript interface instead.
|
|
8839
8840
|
const keypadElementPropType = PropTypes.shape({
|
|
8840
8841
|
activate: PropTypes.func.isRequired,
|
|
8841
8842
|
dismiss: PropTypes.func.isRequired,
|