@khanacademy/math-input 17.0.7 → 17.1.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.
@@ -42,4 +42,4 @@ export declare function maybeFindCommandBeforeParens(leftParenNode: any): {
42
42
  startNode: any;
43
43
  endNode: any;
44
44
  } | null;
45
- export declare function getCursorContext(mathField?: MathFieldInterface): typeof CursorContext[keyof typeof CursorContext];
45
+ export declare function getCursorContext(mathField?: MathFieldInterface): (typeof CursorContext)[keyof typeof CursorContext];
@@ -3,7 +3,7 @@ import type { ClickKeyCallback } from "../../../types";
3
3
  import type { CursorContext } from "../../input/cursor-contexts";
4
4
  type Props = {
5
5
  onClickKey: ClickKeyCallback;
6
- cursorContext?: typeof CursorContext[keyof typeof CursorContext];
6
+ cursorContext?: (typeof CursorContext)[keyof typeof CursorContext];
7
7
  };
8
8
  export default function FractionsPage(props: Props): JSX.Element;
9
9
  export {};
@@ -5,7 +5,7 @@ import type { CursorContext } from "../input/cursor-contexts";
5
5
  import type { AnalyticsEventHandlerFn } from "@khanacademy/perseus-core";
6
6
  export type Props = {
7
7
  extraKeys: ReadonlyArray<Key>;
8
- cursorContext?: typeof CursorContext[keyof typeof CursorContext];
8
+ cursorContext?: (typeof CursorContext)[keyof typeof CursorContext];
9
9
  showDismiss?: boolean;
10
10
  expandedView?: boolean;
11
11
  convertDotToTimes?: boolean;
@@ -4,7 +4,7 @@ import type { CursorContext } from "../input/cursor-contexts";
4
4
  type Props = {
5
5
  onClickKey: ClickKeyCallback;
6
6
  selectedPage: KeypadPageType;
7
- cursorContext?: typeof CursorContext[keyof typeof CursorContext];
7
+ cursorContext?: (typeof CursorContext)[keyof typeof CursorContext];
8
8
  convertDotToTimes?: boolean;
9
9
  divisionKey?: boolean;
10
10
  };
@@ -1,3 +1,3 @@
1
1
  import { CursorContext } from "../input/cursor-contexts";
2
2
  export declare const expandedViewThreshold = 500;
3
- export declare function getCursorContextConfig(cursorContext?: typeof CursorContext[keyof typeof CursorContext]): import("../../types").NonManyKeyConfig | null;
3
+ export declare function getCursorContextConfig(cursorContext?: (typeof CursorContext)[keyof typeof CursorContext]): import("../../types").NonManyKeyConfig | null;
@@ -1,3 +1,3 @@
1
1
  export declare const KeyArray: readonly ["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", "MANY", "NUM_0", "NUM_1", "NUM_2", "NUM_3", "NUM_4", "NUM_5", "NUM_6", "NUM_7", "NUM_8", "NUM_9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "PHI", "NTHROOT3", "POW", "LOG_B"];
2
- type Key = typeof KeyArray[number];
2
+ type Key = (typeof KeyArray)[number];
3
3
  export default Key;
package/dist/enums.d.ts CHANGED
@@ -6,4 +6,4 @@ export declare enum KeypadType {
6
6
  EXPRESSION = "EXPRESSION"
7
7
  }
8
8
  export declare const KeyTypes: string[];
9
- export type KeyType = typeof KeyTypes[number];
9
+ export type KeyType = (typeof KeyTypes)[number];
package/dist/es/index.js CHANGED
@@ -17,7 +17,7 @@ import PropTypes from 'prop-types';
17
17
 
18
18
  // This file is processed by a Rollup plugin (replace) to inject the production
19
19
  const libName = "@khanacademy/math-input";
20
- const libVersion = "17.0.7";
20
+ const libVersion = "17.1.0";
21
21
  addLibraryVersionToPerseusDebug(libName, libVersion);
22
22
 
23
23
  function _extends() {
@@ -394,9 +394,9 @@ const createBaseConfig = () => ({
394
394
  // Most of these autoOperatorNames are simply the MathQuill defaults.
395
395
  // We have to list them all in order to add the `sen` operator (see
396
396
  // comment below).
397
- autoOperatorNames: ["arccos", "arcsin", "arctan", "arg", "cos", "cosh", "cot", "coth", "csc", "deg", "det", "dim", "exp", "gcd", "hom", "inf", "ker", "lg", "lim", "liminf", "limsup", "ln", "log", "max", "min", "Pr", "projlim", "sec",
397
+ autoOperatorNames: ["arccos", "arcsin", "arctan", "arctg", "arg", "cos", "cosec", "cossec", "cosh", "cot", "cotg", "coth", "csc", "ctg", "deg", "det", "dim", "exp", "gcd", "hom", "inf", "ker", "lg", "lim", "liminf", "limsup", "ln", "log", "max", "min", "Pr", "projlim", "sec",
398
398
  // sen is used instead of sin in e.g. Portuguese
399
- "sen", "sin", "sinh", "sup", "tan", "tanh"].join(" "),
399
+ "sen", "sin", "sinh", "sup", "tan", "tanh", "tg"].join(" "),
400
400
  // Pop the cursor out of super/subscripts on arithmetic operators
401
401
  // or (in)equalities.
402
402
  charsThatBreakOutOfSupSub: "+-*/=<>≠≤≥",