@khanacademy/math-input 17.0.4 → 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.
Files changed (86) hide show
  1. package/dist/components/input/math-wrapper.d.ts +2 -2
  2. package/dist/components/input/mathquill-types.d.ts +49 -6
  3. package/dist/es/index.js +8 -6
  4. package/dist/es/index.js.map +1 -1
  5. package/dist/index.js +8 -7
  6. package/dist/index.js.map +1 -1
  7. package/package.json +6 -3
  8. package/.eslintrc.js +0 -18
  9. package/CHANGELOG.md +0 -660
  10. package/less/main.less +0 -2
  11. package/less/overrides.less +0 -122
  12. package/src/components/__tests__/integration.test.tsx +0 -300
  13. package/src/components/aphrodite-css-transition-group/index.tsx +0 -78
  14. package/src/components/aphrodite-css-transition-group/transition-child.tsx +0 -192
  15. package/src/components/aphrodite-css-transition-group/types.ts +0 -20
  16. package/src/components/aphrodite-css-transition-group/util.ts +0 -97
  17. package/src/components/input/__tests__/context-tracking.test.ts +0 -176
  18. package/src/components/input/__tests__/mathquill-helpers.test.ts +0 -105
  19. package/src/components/input/__tests__/mathquill.test.ts +0 -747
  20. package/src/components/input/__tests__/test-math-wrapper.ts +0 -29
  21. package/src/components/input/cursor-contexts.ts +0 -37
  22. package/src/components/input/cursor-handle.tsx +0 -137
  23. package/src/components/input/cursor-styles.ts +0 -10
  24. package/src/components/input/drag-listener.ts +0 -79
  25. package/src/components/input/math-input.tsx +0 -1036
  26. package/src/components/input/math-wrapper.ts +0 -189
  27. package/src/components/input/mathquill-helpers.ts +0 -262
  28. package/src/components/input/mathquill-instance.ts +0 -106
  29. package/src/components/input/mathquill-types.ts +0 -32
  30. package/src/components/input/scroll-into-view.ts +0 -65
  31. package/src/components/key-handlers/__tests__/handle-jump-out.test.ts +0 -94
  32. package/src/components/key-handlers/handle-arrow.ts +0 -70
  33. package/src/components/key-handlers/handle-backspace.ts +0 -277
  34. package/src/components/key-handlers/handle-exponent.ts +0 -53
  35. package/src/components/key-handlers/handle-jump-out.ts +0 -107
  36. package/src/components/key-handlers/key-translator.ts +0 -222
  37. package/src/components/keypad/__tests__/__snapshots__/keypad.test.tsx.snap +0 -1913
  38. package/src/components/keypad/__tests__/__snapshots__/mobile-keypad.test.tsx.snap +0 -600
  39. package/src/components/keypad/__tests__/keypad-button.test.tsx +0 -84
  40. package/src/components/keypad/__tests__/keypad-v2-mathquill.test.tsx +0 -304
  41. package/src/components/keypad/__tests__/keypad-v2.cypress.ts +0 -16
  42. package/src/components/keypad/__tests__/keypad.test.tsx +0 -321
  43. package/src/components/keypad/__tests__/mobile-keypad.test.tsx +0 -115
  44. package/src/components/keypad/__tests__/test-data-tabs.ts +0 -21
  45. package/src/components/keypad/button-assets.tsx +0 -1880
  46. package/src/components/keypad/index.tsx +0 -2
  47. package/src/components/keypad/keypad-button.stories.tsx +0 -81
  48. package/src/components/keypad/keypad-button.tsx +0 -124
  49. package/src/components/keypad/keypad-mathquill.stories.tsx +0 -109
  50. package/src/components/keypad/keypad-pages/extras-page.tsx +0 -35
  51. package/src/components/keypad/keypad-pages/fractions-page.tsx +0 -125
  52. package/src/components/keypad/keypad-pages/geometry-page.tsx +0 -34
  53. package/src/components/keypad/keypad-pages/keypad-pages.stories.tsx +0 -37
  54. package/src/components/keypad/keypad-pages/numbers-page.tsx +0 -94
  55. package/src/components/keypad/keypad-pages/operators-page.tsx +0 -117
  56. package/src/components/keypad/keypad.tsx +0 -233
  57. package/src/components/keypad/mobile-keypad-internals.tsx +0 -240
  58. package/src/components/keypad/mobile-keypad.tsx +0 -24
  59. package/src/components/keypad/navigation-button.tsx +0 -127
  60. package/src/components/keypad/navigation-pad.stories.tsx +0 -26
  61. package/src/components/keypad/navigation-pad.tsx +0 -67
  62. package/src/components/keypad/shared-keys.tsx +0 -109
  63. package/src/components/keypad/utils.ts +0 -34
  64. package/src/components/keypad-context.tsx +0 -70
  65. package/src/components/prop-types.ts +0 -16
  66. package/src/components/tabbar/__tests__/tabbar.test.tsx +0 -105
  67. package/src/components/tabbar/icons.tsx +0 -122
  68. package/src/components/tabbar/index.ts +0 -1
  69. package/src/components/tabbar/item.tsx +0 -146
  70. package/src/components/tabbar/tabbar.stories.tsx +0 -83
  71. package/src/components/tabbar/tabbar.tsx +0 -65
  72. package/src/data/key-configs.ts +0 -770
  73. package/src/data/keys.ts +0 -123
  74. package/src/enums.ts +0 -27
  75. package/src/fake-react-native-web/index.ts +0 -11
  76. package/src/fake-react-native-web/text.tsx +0 -55
  77. package/src/fake-react-native-web/view.tsx +0 -91
  78. package/src/full-keypad.stories.tsx +0 -142
  79. package/src/full-mobile-input.stories.tsx +0 -115
  80. package/src/index.ts +0 -52
  81. package/src/types.ts +0 -70
  82. package/src/utils.test.ts +0 -33
  83. package/src/utils.ts +0 -61
  84. package/src/version.ts +0 -10
  85. package/tsconfig-build.json +0 -11
  86. package/tsconfig-build.tsbuildinfo +0 -1
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.4";
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