@pie-element/math-templated 3.6.7-next.6 → 3.6.7-next.8

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.
@@ -8,7 +8,7 @@
8
8
  "dependencies": {
9
9
  "@material-ui/core": "^3.9.2",
10
10
  "@pie-framework/pie-configure-events": "^1.3.0",
11
- "@pie-lib/pie-toolbox": "2.17.3",
11
+ "@pie-lib/pie-toolbox": "2.17.4",
12
12
  "debug": "^3.1.0",
13
13
  "lodash": "^4.17.15",
14
14
  "prop-types": "^15.6.2",
@@ -7,7 +7,7 @@
7
7
  "module": "src/index.js",
8
8
  "dependencies": {
9
9
  "@pie-framework/math-validation": "^1.2.3",
10
- "@pie-lib/pie-toolbox": "2.17.3",
10
+ "@pie-lib/pie-toolbox": "2.17.4",
11
11
  "debug": "^3.1.0",
12
12
  "lodash": "^4.17.15"
13
13
  },
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.2/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_editable_html} from "../../../@pie-lib/pie-toolbox-module@7.0.1/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.3/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_editable_html} from "../../../@pie-lib/pie-toolbox-module@7.0.2/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
5
5
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -115782,7 +115782,9 @@ const require$$23 = _dll_debug;
115782
115782
  };
115783
115783
  var mml = new _mathml.MathML(mmlConfig);
115784
115784
  var customMmlFactory = new _MmlFactory.MmlFactory(_objectSpread(_objectSpread({}, _MmlFactory.MmlFactory.defaultNodes), _mstack.mmlNodes));
115785
- var classFactory = (0, _semanticEnrich.EnrichHandler)((0, _MenuHandler.MenuHandler)((0, _assistiveMml.AssistiveMmlHandler)(_mathjax.mathjax.handlers.handlesDocument(docProvided))), mml);
115785
+ var withAssistive = (0, _assistiveMml.AssistiveMmlHandler)(_mathjax.mathjax.handlers.handlesDocument(docProvided));
115786
+ var handler = window.MathJax && window.MathJax.Menu ? withAssistive : (0, _MenuHandler.MenuHandler)(withAssistive);
115787
+ var classFactory = (0, _semanticEnrich.EnrichHandler)(handler, mml);
115786
115788
  var html = classFactory.create(docProvided, {
115787
115789
  compileError: function compileError(mj, math, err) {
115788
115790
  console.log('bad math?:', math);
@@ -115834,13 +115836,19 @@ const require$$23 = _dll_debug;
115834
115836
  var attemptRender = function attemptRender() {
115835
115837
  var _updatedDocument$math, _updatedDocument$math2;
115836
115838
  var temporary = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
115839
+ var usesMenuHandler = !(window.MathJax && window.MathJax.Menu);
115837
115840
  var updatedDocument = _this.html.findMath(elements.length ? {
115838
115841
  elements: elements
115839
115842
  } : {}).compile();
115840
115843
  if (!temporary && sreReady) {
115841
115844
  updatedDocument = updatedDocument.enrich();
115842
115845
  }
115843
- updatedDocument = updatedDocument.getMetrics().typeset().assistiveMml().attachSpeech().addMenu().updateDocument();
115846
+ updatedDocument = updatedDocument.getMetrics().typeset().assistiveMml().attachSpeech();
115847
+ if (usesMenuHandler) {
115848
+ console.log('Using MenuHandler');
115849
+ updatedDocument = updatedDocument.addMenu();
115850
+ }
115851
+ updatedDocument = updatedDocument.updateDocument();
115844
115852
  if (!enrichSpeechInitialized && (0, _typeof2["default"])((_updatedDocument$math = updatedDocument.math.list) === null || _updatedDocument$math === void 0 ? void 0 : (_updatedDocument$math2 = _updatedDocument$math.next) === null || _updatedDocument$math2 === void 0 ? void 0 : _updatedDocument$math2.data) === 'object') {
115845
115853
  enrichSpeechInitialized = true;
115846
115854
  }
package/module/element.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.2/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@7.0.1/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.3/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@7.0.2/module/index.js";
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
5
5
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
@@ -95038,7 +95038,9 @@ const require$$23$2 = _dll_debug;
95038
95038
  };
95039
95039
  var mml = new _mathml.MathML(mmlConfig);
95040
95040
  var customMmlFactory = new _MmlFactory.MmlFactory(_objectSpread(_objectSpread({}, _MmlFactory.MmlFactory.defaultNodes), _mstack.mmlNodes));
95041
- var classFactory = (0, _semanticEnrich.EnrichHandler)((0, _MenuHandler.MenuHandler)((0, _assistiveMml.AssistiveMmlHandler)(_mathjax.mathjax.handlers.handlesDocument(docProvided))), mml);
95041
+ var withAssistive = (0, _assistiveMml.AssistiveMmlHandler)(_mathjax.mathjax.handlers.handlesDocument(docProvided));
95042
+ var handler = window.MathJax && window.MathJax.Menu ? withAssistive : (0, _MenuHandler.MenuHandler)(withAssistive);
95043
+ var classFactory = (0, _semanticEnrich.EnrichHandler)(handler, mml);
95042
95044
  var html = classFactory.create(docProvided, {
95043
95045
  compileError: function compileError(mj, math, err) {
95044
95046
  console.log('bad math?:', math);
@@ -95090,13 +95092,19 @@ const require$$23$2 = _dll_debug;
95090
95092
  var attemptRender = function attemptRender() {
95091
95093
  var _updatedDocument$math, _updatedDocument$math2;
95092
95094
  var temporary = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
95095
+ var usesMenuHandler = !(window.MathJax && window.MathJax.Menu);
95093
95096
  var updatedDocument = _this.html.findMath(elements.length ? {
95094
95097
  elements: elements
95095
95098
  } : {}).compile();
95096
95099
  if (!temporary && sreReady) {
95097
95100
  updatedDocument = updatedDocument.enrich();
95098
95101
  }
95099
- updatedDocument = updatedDocument.getMetrics().typeset().assistiveMml().attachSpeech().addMenu().updateDocument();
95102
+ updatedDocument = updatedDocument.getMetrics().typeset().assistiveMml().attachSpeech();
95103
+ if (usesMenuHandler) {
95104
+ console.log('Using MenuHandler');
95105
+ updatedDocument = updatedDocument.addMenu();
95106
+ }
95107
+ updatedDocument = updatedDocument.updateDocument();
95100
95108
  if (!enrichSpeechInitialized && (0, _typeof2["default"])((_updatedDocument$math = updatedDocument.math.list) === null || _updatedDocument$math === void 0 ? void 0 : (_updatedDocument$math2 = _updatedDocument$math.next) === null || _updatedDocument$math2 === void 0 ? void 0 : _updatedDocument$math2.data) === 'object') {
95101
95109
  enrichSpeechInitialized = true;
95102
95110
  }
@@ -4,11 +4,11 @@
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "4.1.2"
7
+ "version": "4.1.3"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
11
- "version": "7.0.1"
11
+ "version": "7.0.2"
12
12
  }
13
13
  ]
14
14
  }
package/module/print.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.2/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@7.0.1/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.3/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@7.0.2/module/index.js";
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
5
5
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
@@ -95001,7 +95001,9 @@ const require$$23$2 = _dll_debug;
95001
95001
  };
95002
95002
  var mml = new _mathml.MathML(mmlConfig);
95003
95003
  var customMmlFactory = new _MmlFactory.MmlFactory(_objectSpread(_objectSpread({}, _MmlFactory.MmlFactory.defaultNodes), _mstack.mmlNodes));
95004
- var classFactory = (0, _semanticEnrich.EnrichHandler)((0, _MenuHandler.MenuHandler)((0, _assistiveMml.AssistiveMmlHandler)(_mathjax.mathjax.handlers.handlesDocument(docProvided))), mml);
95004
+ var withAssistive = (0, _assistiveMml.AssistiveMmlHandler)(_mathjax.mathjax.handlers.handlesDocument(docProvided));
95005
+ var handler = window.MathJax && window.MathJax.Menu ? withAssistive : (0, _MenuHandler.MenuHandler)(withAssistive);
95006
+ var classFactory = (0, _semanticEnrich.EnrichHandler)(handler, mml);
95005
95007
  var html = classFactory.create(docProvided, {
95006
95008
  compileError: function compileError(mj, math, err) {
95007
95009
  console.log('bad math?:', math);
@@ -95053,13 +95055,19 @@ const require$$23$2 = _dll_debug;
95053
95055
  var attemptRender = function attemptRender() {
95054
95056
  var _updatedDocument$math, _updatedDocument$math2;
95055
95057
  var temporary = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
95058
+ var usesMenuHandler = !(window.MathJax && window.MathJax.Menu);
95056
95059
  var updatedDocument = _this.html.findMath(elements.length ? {
95057
95060
  elements: elements
95058
95061
  } : {}).compile();
95059
95062
  if (!temporary && sreReady) {
95060
95063
  updatedDocument = updatedDocument.enrich();
95061
95064
  }
95062
- updatedDocument = updatedDocument.getMetrics().typeset().assistiveMml().attachSpeech().addMenu().updateDocument();
95065
+ updatedDocument = updatedDocument.getMetrics().typeset().assistiveMml().attachSpeech();
95066
+ if (usesMenuHandler) {
95067
+ console.log('Using MenuHandler');
95068
+ updatedDocument = updatedDocument.addMenu();
95069
+ }
95070
+ updatedDocument = updatedDocument.updateDocument();
95063
95071
  if (!enrichSpeechInitialized && (0, _typeof2["default"])((_updatedDocument$math = updatedDocument.math.list) === null || _updatedDocument$math === void 0 ? void 0 : (_updatedDocument$math2 = _updatedDocument$math.next) === null || _updatedDocument$math2 === void 0 ? void 0 : _updatedDocument$math2.data) === 'object') {
95064
95072
  enrichSpeechInitialized = true;
95065
95073
  }
package/package.json CHANGED
@@ -4,19 +4,19 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "3.6.7-next.6+e5b8139f0",
7
+ "version": "3.6.7-next.8+a98d9306e",
8
8
  "description": "",
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.2",
11
11
  "@pie-framework/pie-player-events": "^0.1.0",
12
- "@pie-lib/pie-toolbox": "2.17.3",
12
+ "@pie-lib/pie-toolbox": "2.17.4",
13
13
  "prop-types": "^15.6.1",
14
14
  "react": "^16.8.1",
15
15
  "react-dom": "^16.8.1"
16
16
  },
17
17
  "author": "",
18
18
  "license": "ISC",
19
- "gitHead": "e5b8139f0c9d8b2a894051393c4d37fc33a09e84",
19
+ "gitHead": "a98d9306e52686234b7c27133fcca6f04500c448",
20
20
  "scripts": {
21
21
  "postpublish": "../../scripts/postpublish"
22
22
  },