@khanacademy/math-input 26.5.0 → 26.6.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/dist/components/key-handlers/handle-subscript.d.ts +2 -0
- package/dist/components/key-handlers/insert-base-parens.d.ts +11 -0
- package/dist/es/index.js +13 -9
- package/dist/es/index.js.map +1 -1
- package/dist/es/strings.js +1 -1
- package/dist/es/strings.js.map +1 -1
- package/dist/index.js +13 -9
- package/dist/index.js.map +1 -1
- package/dist/strings.d.ts +1 -0
- package/dist/strings.js +1 -1
- package/dist/strings.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MathFieldInterface } from "../input/mathquill-types";
|
|
2
|
+
/**
|
|
3
|
+
* Ensures there's a valid base immediately before the cursor for a superscript
|
|
4
|
+
* or subscript to attach to. If the preceding node is empty or an operator that
|
|
5
|
+
* can't take a script, an empty set of parentheses is inserted to act as the
|
|
6
|
+
* base.
|
|
7
|
+
*
|
|
8
|
+
* @returns whether empty parentheses were inserted, so callers can adjust the
|
|
9
|
+
* cursor position accordingly.
|
|
10
|
+
*/
|
|
11
|
+
export default function insertBaseParens(mathField: MathFieldInterface): boolean;
|