@khanacademy/math-input 23.0.5 → 23.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/es/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { addLibraryVersionToPerseusDebug } from '@khanacademy/perseus-utils';
1
2
  import _extends from '@babel/runtime/helpers/extends';
2
3
  import { KeypadContext } from '@khanacademy/keypad-context';
3
4
  import { color } from '@khanacademy/wonder-blocks-tokens';
@@ -16,51 +17,9 @@ import { TransitionGroup } from 'react-transition-group';
16
17
  import { withActionScheduler } from '@khanacademy/wonder-blocks-timing';
17
18
  import PropTypes from 'prop-types';
18
19
 
19
- /**
20
- * Adds the given perseus library version information to the __perseus_debug__
21
- * object and ensures that the object is attached to `globalThis` (`window` in
22
- * browser environments).
23
- *
24
- * This allows each library to provide runtime version information to assist in
25
- * debugging in production environments.
26
- */
27
- const addLibraryVersionToPerseusDebug = (libraryName, libraryVersion) => {
28
- // If the library version is the default value, then we don't want to
29
- // prefix it with a "v" to indicate that it is a version number.
30
- let prefix = "v";
31
- if (libraryVersion === "__lib_version__") {
32
- prefix = "";
33
- }
34
- const formattedVersion = `${prefix}${libraryVersion}`;
35
- if (typeof globalThis !== "undefined") {
36
- var _globalThis$__perseus;
37
- globalThis.__perseus_debug__ = (_globalThis$__perseus = globalThis.__perseus_debug__) != null ? _globalThis$__perseus : {};
38
- const existingVersionEntry = globalThis.__perseus_debug__[libraryName];
39
- if (existingVersionEntry) {
40
- // If we already have an entry and it doesn't match the registered
41
- // version, we morph the entry into an array and log a warning.
42
- if (existingVersionEntry !== formattedVersion) {
43
- // Existing entry might be an array already (oops, at least 2
44
- // versions of the library already loaded!).
45
- const allVersions = Array.isArray(existingVersionEntry) ? existingVersionEntry : [existingVersionEntry];
46
- allVersions.push(formattedVersion);
47
- globalThis.__perseus_debug__[libraryName] = allVersions;
48
-
49
- // eslint-disable-next-line no-console
50
- console.warn(`Multiple versions of ${libraryName} loaded on this page: ${allVersions.sort().join(", ")}`);
51
- }
52
- } else {
53
- globalThis.__perseus_debug__[libraryName] = formattedVersion;
54
- }
55
- } else {
56
- // eslint-disable-next-line no-console
57
- console.warn(`globalThis not found found (${formattedVersion})`);
58
- }
59
- };
60
-
61
20
  // This file is processed by a Rollup plugin (replace) to inject the production
62
21
  const libName = "@khanacademy/math-input";
63
- const libVersion = "23.0.5";
22
+ const libVersion = "23.0.6";
64
23
  addLibraryVersionToPerseusDebug(libName, libVersion);
65
24
 
66
25
  class View extends React.Component {
@@ -5055,7 +5014,7 @@ function SharedKeys(props) {
5055
5014
  keyConfig: Keys.BACKSPACE,
5056
5015
  onClickKey: onClickKey,
5057
5016
  coord: [5, 3],
5058
- action: true
5017
+ secondary: true
5059
5018
  }));
5060
5019
  }
5061
5020