@khanacademy/math-input 10.1.0 → 11.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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @khanacademy/math-input
2
2
 
3
+ ## 11.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 2af4f9fa: Switch from using ProvideKeypad in ArticleRenderer to passing the keypad element down instead
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [2af4f9fa]
12
+ - @khanacademy/perseus-core@1.0.0
13
+
14
+ ## 10.1.1
15
+
16
+ ### Patch Changes
17
+
18
+ - 3f7be05a: Updated Keypad V2 TabbarItemType to KeypadPageType as a more accurate description.
19
+ - 810c7bd9: Resize letter SVGs
20
+ - b161d004: Ensured that the keypad is hidden from screen readers when it is closed.
21
+ - a99a9ca4: Fix direction types for MathQuill interface
22
+
3
23
  ## 10.1.0
4
24
 
5
25
  ### Minor Changes
@@ -1,7 +1,7 @@
1
1
  import type Key from "../../data/keys";
2
2
  export interface MathQuillInterface {
3
- L: "L";
4
- R: "R";
3
+ L: -1;
4
+ R: 1;
5
5
  /**
6
6
  * Creates an editable MathQuill initialized with the contents of the HTML
7
7
  * element and returns a MathField object.
@@ -1,10 +1,9 @@
1
1
  /// <reference types="react" />
2
- import type { ClickKeyCallback } from "../../types";
2
+ import type { ClickKeyCallback, KeypadPageType } from "../../types";
3
3
  import type { CursorContext } from "../input/cursor-contexts";
4
- import type { TabbarItemType } from "../tabbar";
5
4
  type Props = {
6
5
  onClickKey: ClickKeyCallback;
7
- selectedPage: TabbarItemType;
6
+ selectedPage: KeypadPageType;
8
7
  cursorContext?: typeof CursorContext[keyof typeof CursorContext];
9
8
  multiplicationDot?: boolean;
10
9
  divisionKey?: boolean;
@@ -7,12 +7,13 @@
7
7
  * ExerciseFooter.
8
8
  */
9
9
  import * as React from "react";
10
- import type { RendererInterface } from "@khanacademy/perseus-core";
10
+ import type { KeypadAPI } from "../types";
11
+ import type { KeypadContextRendererInterface } from "@khanacademy/perseus-core";
11
12
  type KeypadContext = {
12
- setKeypadElement: (keypadElement?: HTMLElement | null | undefined) => void;
13
- keypadElement: HTMLElement | null | undefined;
14
- setRenderer: (renderer?: RendererInterface | null | undefined) => void;
15
- renderer: RendererInterface | null | undefined;
13
+ setKeypadElement: (keypadElement?: KeypadAPI) => void;
14
+ keypadElement: KeypadAPI | null | undefined;
15
+ setRenderer: (renderer?: KeypadContextRendererInterface | null | undefined) => void;
16
+ renderer: KeypadContextRendererInterface | null | undefined;
16
17
  setScrollableElement: (scrollableElement?: HTMLElement | null | undefined) => void;
17
18
  scrollableElement: HTMLElement | null | undefined;
18
19
  };
@@ -2,7 +2,7 @@
2
2
  * A keypad with two pages of keys.
3
3
  */
4
4
  import * as React from "react";
5
- import type { TabbarItemType } from "../tabbar";
5
+ import type { KeypadPageType } from "../../types";
6
6
  interface ReduxProps {
7
7
  paginationEnabled: boolean;
8
8
  }
@@ -11,7 +11,7 @@ interface Props extends ReduxProps {
11
11
  rightPage: React.ReactNode;
12
12
  }
13
13
  type State = {
14
- selectedPage: TabbarItemType;
14
+ selectedPage: KeypadPageType;
15
15
  };
16
16
  declare class TwoPageKeypad extends React.Component<Props, State> {
17
17
  state: State;
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
- import type { TabbarItemType } from "./types";
2
+ import type { KeypadPageType } from "../../types";
3
3
  type Props = {
4
4
  tintColor: string;
5
- type: TabbarItemType;
5
+ type: KeypadPageType;
6
6
  };
7
7
  declare const IconAsset: ({ tintColor, type }: Props) => React.ReactElement;
8
8
  export default IconAsset;
@@ -1,2 +1 @@
1
1
  export { default } from "./tabbar";
2
- export { TabbarItemType } from "./types";
@@ -1,10 +1,10 @@
1
1
  import * as React from "react";
2
- import type { TabbarItemType } from "./types";
2
+ import type { KeypadPageType } from "../../types";
3
3
  export type ItemState = "active" | "inactive" | "disabled";
4
4
  type Props = {
5
5
  onClick: () => void;
6
6
  itemState: ItemState;
7
- itemType: TabbarItemType;
7
+ itemType: KeypadPageType;
8
8
  };
9
9
  declare class TabbarItem extends React.Component<Props> {
10
10
  render(): React.ReactNode;
@@ -1,11 +1,11 @@
1
1
  import * as React from "react";
2
- import type { TabbarItemType } from "./types";
2
+ import type { KeypadPageType } from "../../types";
3
3
  import type { StyleType } from "@khanacademy/wonder-blocks-core";
4
4
  type Props = {
5
- items: ReadonlyArray<TabbarItemType>;
6
- selectedItem: TabbarItemType;
5
+ items: ReadonlyArray<KeypadPageType>;
6
+ selectedItem: KeypadPageType;
7
7
  onClickClose?: () => void;
8
- onSelectItem: (item: TabbarItemType) => void;
8
+ onSelectItem: (item: KeypadPageType) => void;
9
9
  style?: StyleType;
10
10
  };
11
11
  declare function Tabbar(props: Props): React.ReactElement;