@khanacademy/math-input 17.0.5 → 17.0.6

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/index.js CHANGED
@@ -9,7 +9,6 @@ var wonderStuffCore = require('@khanacademy/wonder-stuff-core');
9
9
  var aphrodite = require('aphrodite');
10
10
  var React = require('react');
11
11
  var ReactDOM = require('react-dom');
12
- var $ = require('jquery');
13
12
  var MathQuill = require('mathquill');
14
13
  var wonderBlocksCore = require('@khanacademy/wonder-blocks-core');
15
14
  var Clickable = require('@khanacademy/wonder-blocks-clickable');
@@ -41,14 +40,13 @@ var Color__default = /*#__PURE__*/_interopDefaultLegacy(Color);
41
40
  var i18n__namespace = /*#__PURE__*/_interopNamespace(i18n);
42
41
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
43
42
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
44
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
45
43
  var MathQuill__default = /*#__PURE__*/_interopDefaultLegacy(MathQuill);
46
44
  var Clickable__default = /*#__PURE__*/_interopDefaultLegacy(Clickable);
47
45
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
48
46
 
49
47
  // This file is processed by a Rollup plugin (replace) to inject the production
50
48
  const libName = "@khanacademy/math-input";
51
- const libVersion = "17.0.5";
49
+ const libVersion = "17.0.6";
52
50
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
53
51
 
54
52
  function _extends() {
@@ -440,9 +438,12 @@ let MathFieldActionType = /*#__PURE__*/function (MathFieldActionType) {
440
438
  }({});
441
439
 
442
440
  /**
443
- * The MathQuill MathField Cursor
444
- * it's not part of the public API for MathQuill,
445
- * we reach into the internals to get it
441
+ * The MathQuill API (see mathuill.d.ts) does not include types
442
+ * for cursor() and controller(), and adding these types there
443
+ * in the MathQuill repo causes unexpected conflicts with other types.
444
+ *
445
+ * We don't want to use the cursor and controller default type `any`
446
+ * so we declare the types here.
446
447
  */
447
448
 
448
449
  const Numerals = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
@@ -1358,7 +1359,7 @@ class MathWrapper {
1358
1359
  const controller = this.mathField.controller();
1359
1360
  const pageX = x - document.body.scrollLeft;
1360
1361
  const pageY = y - document.body.scrollTop;
1361
- controller.seek($__default["default"](el), pageX, pageY).cursor.startSelection();
1362
+ controller.seek(el, pageX, pageY).cursor.startSelection();
1362
1363
 
1363
1364
  // Unless that would leave us mid-command, in which case, we
1364
1365
  // need to adjust and place the cursor inside the parens