@pie-element/explicit-constructed-response 7.5.7-next.4 → 7.5.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
  "@material-ui/core": "^3.9.2",
9
9
  "@material-ui/icons": "^3.0.1",
10
10
  "@pie-framework/pie-configure-events": "^1.3.0",
11
- "@pie-lib/pie-toolbox": "2.16.0",
11
+ "@pie-lib/pie-toolbox": "2.17.4",
12
12
  "classnames": "^2.2.6",
13
13
  "debug": "^3.1.0",
14
14
  "lodash": "^4.17.15",
@@ -8,7 +8,7 @@
8
8
  "author": "",
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
- "@pie-lib/pie-toolbox": "2.16.0",
11
+ "@pie-lib/pie-toolbox": "2.17.4",
12
12
  "debug": "^3.1.0",
13
13
  "he": "^1.2.0",
14
14
  "lodash": "^4.17.15",
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.9.0/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@6.2.0/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@4.1.3/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui} 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;
package/module/element.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_classnames, _dll_react_dom, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.9.0/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@6.2.0/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_classnames, _dll_react_dom, _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_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} 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) {
@@ -92221,6 +92221,10 @@ const require$$23$2 = _dll_debug;
92221
92221
  }
92222
92222
  if (typeof window !== 'undefined') {
92223
92223
  (0, _html.RegisterHTMLHandler)((0, _browserAdaptor.browserAdaptor)());
92224
+ if (window.MathJax && window.MathJax.Menu) {
92225
+ console.log('Prevent MathJax v2 from interfering with v3 MenuHandler');
92226
+ delete window.MathJax.Menu;
92227
+ }
92224
92228
  }
92225
92229
  var sreReady = false;
92226
92230
  (0, _system.engineReady)().then(function () {
@@ -92338,7 +92342,9 @@ const require$$23$2 = _dll_debug;
92338
92342
  };
92339
92343
  var mml = new _mathml.MathML(mmlConfig);
92340
92344
  var customMmlFactory = new _MmlFactory.MmlFactory(_objectSpread(_objectSpread({}, _MmlFactory.MmlFactory.defaultNodes), _mstack.mmlNodes));
92341
- var classFactory = (0, _semanticEnrich.EnrichHandler)((0, _MenuHandler.MenuHandler)((0, _assistiveMml.AssistiveMmlHandler)(_mathjax.mathjax.handlers.handlesDocument(docProvided))), mml);
92345
+ var withAssistive = (0, _assistiveMml.AssistiveMmlHandler)(_mathjax.mathjax.handlers.handlesDocument(docProvided));
92346
+ var handler = window.MathJax && window.MathJax.Menu ? withAssistive : (0, _MenuHandler.MenuHandler)(withAssistive);
92347
+ var classFactory = (0, _semanticEnrich.EnrichHandler)(handler, mml);
92342
92348
  var html = classFactory.create(docProvided, {
92343
92349
  compileError: function compileError(mj, math, err) {
92344
92350
  console.log('bad math?:', math);
@@ -92349,6 +92355,13 @@ const require$$23$2 = _dll_debug;
92349
92355
  console.error(err);
92350
92356
  doc.typesetError(math, err);
92351
92357
  },
92358
+ menuOptions: {
92359
+ settings: {
92360
+ assistiveMml: true,
92361
+ collapsible: false,
92362
+ explorer: false
92363
+ }
92364
+ },
92352
92365
  sre: {
92353
92366
  speech: 'deep'
92354
92367
  },
@@ -92383,13 +92396,19 @@ const require$$23$2 = _dll_debug;
92383
92396
  var attemptRender = function attemptRender() {
92384
92397
  var _updatedDocument$math, _updatedDocument$math2;
92385
92398
  var temporary = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
92399
+ var usesMenuHandler = !(window.MathJax && window.MathJax.Menu);
92386
92400
  var updatedDocument = _this.html.findMath(elements.length ? {
92387
92401
  elements: elements
92388
92402
  } : {}).compile();
92389
92403
  if (!temporary && sreReady) {
92390
92404
  updatedDocument = updatedDocument.enrich();
92391
92405
  }
92392
- updatedDocument = updatedDocument.getMetrics().typeset().assistiveMml().attachSpeech().addMenu().updateDocument();
92406
+ updatedDocument = updatedDocument.getMetrics().typeset().assistiveMml().attachSpeech();
92407
+ if (usesMenuHandler) {
92408
+ console.log('Using MenuHandler');
92409
+ updatedDocument = updatedDocument.addMenu();
92410
+ }
92411
+ updatedDocument = updatedDocument.updateDocument();
92393
92412
  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') {
92394
92413
  enrichSpeechInitialized = true;
92395
92414
  }
@@ -4,11 +4,11 @@
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "3.9.0"
7
+ "version": "4.1.3"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
11
- "version": "6.2.0"
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_debug, _dll_lodash, _dll_react_dom_server, _dll_classnames, _dll_react_dom, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.9.0/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@6.2.0/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_classnames, _dll_react_dom, _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_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} 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) {
@@ -92184,6 +92184,10 @@ const require$$23$2 = _dll_debug;
92184
92184
  }
92185
92185
  if (typeof window !== 'undefined') {
92186
92186
  (0, _html.RegisterHTMLHandler)((0, _browserAdaptor.browserAdaptor)());
92187
+ if (window.MathJax && window.MathJax.Menu) {
92188
+ console.log('Prevent MathJax v2 from interfering with v3 MenuHandler');
92189
+ delete window.MathJax.Menu;
92190
+ }
92187
92191
  }
92188
92192
  var sreReady = false;
92189
92193
  (0, _system.engineReady)().then(function () {
@@ -92301,7 +92305,9 @@ const require$$23$2 = _dll_debug;
92301
92305
  };
92302
92306
  var mml = new _mathml.MathML(mmlConfig);
92303
92307
  var customMmlFactory = new _MmlFactory.MmlFactory(_objectSpread(_objectSpread({}, _MmlFactory.MmlFactory.defaultNodes), _mstack.mmlNodes));
92304
- var classFactory = (0, _semanticEnrich.EnrichHandler)((0, _MenuHandler.MenuHandler)((0, _assistiveMml.AssistiveMmlHandler)(_mathjax.mathjax.handlers.handlesDocument(docProvided))), mml);
92308
+ var withAssistive = (0, _assistiveMml.AssistiveMmlHandler)(_mathjax.mathjax.handlers.handlesDocument(docProvided));
92309
+ var handler = window.MathJax && window.MathJax.Menu ? withAssistive : (0, _MenuHandler.MenuHandler)(withAssistive);
92310
+ var classFactory = (0, _semanticEnrich.EnrichHandler)(handler, mml);
92305
92311
  var html = classFactory.create(docProvided, {
92306
92312
  compileError: function compileError(mj, math, err) {
92307
92313
  console.log('bad math?:', math);
@@ -92312,6 +92318,13 @@ const require$$23$2 = _dll_debug;
92312
92318
  console.error(err);
92313
92319
  doc.typesetError(math, err);
92314
92320
  },
92321
+ menuOptions: {
92322
+ settings: {
92323
+ assistiveMml: true,
92324
+ collapsible: false,
92325
+ explorer: false
92326
+ }
92327
+ },
92315
92328
  sre: {
92316
92329
  speech: 'deep'
92317
92330
  },
@@ -92346,13 +92359,19 @@ const require$$23$2 = _dll_debug;
92346
92359
  var attemptRender = function attemptRender() {
92347
92360
  var _updatedDocument$math, _updatedDocument$math2;
92348
92361
  var temporary = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
92362
+ var usesMenuHandler = !(window.MathJax && window.MathJax.Menu);
92349
92363
  var updatedDocument = _this.html.findMath(elements.length ? {
92350
92364
  elements: elements
92351
92365
  } : {}).compile();
92352
92366
  if (!temporary && sreReady) {
92353
92367
  updatedDocument = updatedDocument.enrich();
92354
92368
  }
92355
- updatedDocument = updatedDocument.getMetrics().typeset().assistiveMml().attachSpeech().addMenu().updateDocument();
92369
+ updatedDocument = updatedDocument.getMetrics().typeset().assistiveMml().attachSpeech();
92370
+ if (usesMenuHandler) {
92371
+ console.log('Using MenuHandler');
92372
+ updatedDocument = updatedDocument.addMenu();
92373
+ }
92374
+ updatedDocument = updatedDocument.updateDocument();
92356
92375
  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') {
92357
92376
  enrichSpeechInitialized = true;
92358
92377
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "7.5.7-next.4+ce7898271",
7
+ "version": "7.5.7-next.8+a98d9306e",
8
8
  "description": "",
9
9
  "scripts": {
10
10
  "postpublish": "../../scripts/postpublish"
@@ -12,7 +12,7 @@
12
12
  "dependencies": {
13
13
  "@material-ui/core": "^3.9.2",
14
14
  "@pie-framework/pie-player-events": "^0.1.0",
15
- "@pie-lib/pie-toolbox": "2.16.0",
15
+ "@pie-lib/pie-toolbox": "2.17.4",
16
16
  "classnames": "^2.2.5",
17
17
  "he": "^1.2.0",
18
18
  "lodash": "^4.17.10",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "author": "",
24
24
  "license": "ISC",
25
- "gitHead": "ce7898271621e769a4c5eeeb148f9176615dc034",
25
+ "gitHead": "a98d9306e52686234b7c27133fcca6f04500c448",
26
26
  "main": "lib/index.js",
27
27
  "module": "src/index.js",
28
28
  "exports": {