@pie-element/explicit-constructed-response 6.22.5-next.42 → 6.22.5-next.44

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": "1.31.4",
11
+ "@pie-lib/pie-toolbox": "1.31.5-next.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": "1.31.4",
11
+ "@pie-lib/pie-toolbox": "1.31.5-next.4",
12
12
  "debug": "^3.1.0",
13
13
  "lodash": "^4.17.15",
14
14
  "type-of": "^2.0.1"
package/module/element.js CHANGED
@@ -19156,7 +19156,7 @@ mathjaxScript.initializeMathJax = mathjaxScript.MathJaxVersion = void 0;
19156
19156
  var _renderMath = renderMath$2;
19157
19157
  var MathJaxVersion = '3.2.2';
19158
19158
  mathjaxScript.MathJaxVersion = MathJaxVersion;
19159
- var initializeMathJax = function initializeMathJax(renderOpts) {
19159
+ var initializeMathJax = function initializeMathJax(renderOpts, callback) {
19160
19160
  if (renderOpts !== null && renderOpts !== void 0 && renderOpts.useSingleDollar) {
19161
19161
  console.warn('[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)');
19162
19162
  }
@@ -19198,11 +19198,17 @@ var initializeMathJax = function initializeMathJax(renderOpts) {
19198
19198
  MathJax.startup.defaultReady();
19199
19199
  var globalObj = (0, _renderMath.getGlobal)();
19200
19200
  globalObj.instance = MathJax;
19201
- resolve();
19201
+ window.mathjaxIsInitialised = true;
19202
+ if (callback) {
19203
+ callback();
19204
+ } else {
19205
+ resolve();
19206
+ }
19202
19207
  }
19203
19208
  },
19204
19209
  loader: {
19205
- load: ['input/mml']
19210
+ load: ['input/mml'],
19211
+ preLoad: function preLoad() {}
19206
19212
  },
19207
19213
  tex: texConfig,
19208
19214
  chtml: {
@@ -79055,11 +79061,36 @@ getDefaultExportFromCjs(mathRendering);
79055
79061
  fixMathElements(executeOn);
79056
79062
  adjustMathMLStyle(executeOn);
79057
79063
  var mathJaxCustomKey = getMathJaxCustomKey();
79064
+ var workingWithMathJax = function workingWithMathJax() {
79065
+ var mathJaxInstance = getGlobal().instance;
79066
+ if (mathJaxInstance) {
79067
+ mathJaxInstance.texReset();
79068
+ mathJaxInstance.typesetClear();
79069
+ mathJaxInstance.typesetPromise([executeOn]).then(function () {
79070
+ try {
79071
+ removeExcessMjxContainers(executeOn);
79072
+ removePlaceholdersAndRestoreDisplay();
79073
+ var updatedDocument = mathJaxInstance.startup.document;
79074
+ var list = updatedDocument.math.list;
79075
+ for (var item = list.next; (0, _typeof2["default"])(item.data) !== 'symbol'; item = item.next) {
79076
+ var mathMl = toMMl(item.data.root);
79077
+ var parsedMathMl = mathMl.replaceAll('\n', '');
79078
+ item.data.typesetRoot.setAttribute('data-mathml', parsedMathMl);
79079
+ }
79080
+ } catch (e) {
79081
+ console.error('Error post-processing MathJax typesetting:', e.toString());
79082
+ }
79083
+ mathJaxInstance.startup.document.clear();
79084
+ })["catch"](function (error) {
79085
+ console.error('Error in typesetting with MathJax:', error);
79086
+ });
79087
+ }
79088
+ };
79058
79089
  if ((!window.MathJax || window.MathJax.version !== _mathjaxScript.MathJaxVersion) && !window.mathjaxLoadedP || mathJaxCustomKey && mathJaxCustomKey !== mathRenderingAccessibleKEY) {
79059
79090
  renderOpts = renderOpts || defaultOpts();
79060
- (0, _mathjaxScript.initializeMathJax)(renderOpts);
79091
+ (0, _mathjaxScript.initializeMathJax)(renderOpts, workingWithMathJax);
79061
79092
  }
79062
- if (isString && window.MathJax && window.mathjaxLoadedP) {
79093
+ if (isString && window.MathJax && window.mathjaxIsInitialised) {
79063
79094
  try {
79064
79095
  MathJax.texReset();
79065
79096
  MathJax.typesetClear();
@@ -79074,34 +79105,8 @@ getDefaultExportFromCjs(mathRendering);
79074
79105
  console.error('Error rendering math:', error.message);
79075
79106
  }
79076
79107
  }
79077
- if (window.mathjaxLoadedP) {
79078
- window.mathjaxLoadedP.then(function () {
79079
- var mathJaxInstance = getGlobal().instance;
79080
- if (mathJaxInstance) {
79081
- mathJaxInstance.texReset();
79082
- mathJaxInstance.typesetClear();
79083
- mathJaxInstance.typesetPromise([executeOn]).then(function () {
79084
- try {
79085
- removeExcessMjxContainers(executeOn);
79086
- removePlaceholdersAndRestoreDisplay();
79087
- var _updatedDocument = mathJaxInstance.startup.document;
79088
- var _list = _updatedDocument.math.list;
79089
- for (var _item = _list.next; (0, _typeof2["default"])(_item.data) !== 'symbol'; _item = _item.next) {
79090
- var _mathMl = toMMl(_item.data.root);
79091
- var _parsedMathMl = _mathMl.replaceAll('\n', '');
79092
- _item.data.typesetRoot.setAttribute('data-mathml', _parsedMathMl);
79093
- }
79094
- } catch (e) {
79095
- console.error('Error post-processing MathJax typesetting:', e.toString());
79096
- }
79097
- mathJaxInstance.startup.document.clear();
79098
- })["catch"](function (error) {
79099
- console.error('Error in typesetting with MathJax:', error);
79100
- });
79101
- }
79102
- })["catch"](function (error) {
79103
- console.error('Error in initializing MathJax:', error);
79104
- });
79108
+ if (window.mathjaxIsInitialised) {
79109
+ workingWithMathJax();
79105
79110
  }
79106
79111
  };
79107
79112
  if (skipWaitForMathRenderingLib) {
package/module/print.js CHANGED
@@ -19119,7 +19119,7 @@ mathjaxScript.initializeMathJax = mathjaxScript.MathJaxVersion = void 0;
19119
19119
  var _renderMath = renderMath$2;
19120
19120
  var MathJaxVersion = '3.2.2';
19121
19121
  mathjaxScript.MathJaxVersion = MathJaxVersion;
19122
- var initializeMathJax = function initializeMathJax(renderOpts) {
19122
+ var initializeMathJax = function initializeMathJax(renderOpts, callback) {
19123
19123
  if (renderOpts !== null && renderOpts !== void 0 && renderOpts.useSingleDollar) {
19124
19124
  console.warn('[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)');
19125
19125
  }
@@ -19161,11 +19161,17 @@ var initializeMathJax = function initializeMathJax(renderOpts) {
19161
19161
  MathJax.startup.defaultReady();
19162
19162
  var globalObj = (0, _renderMath.getGlobal)();
19163
19163
  globalObj.instance = MathJax;
19164
- resolve();
19164
+ window.mathjaxIsInitialised = true;
19165
+ if (callback) {
19166
+ callback();
19167
+ } else {
19168
+ resolve();
19169
+ }
19165
19170
  }
19166
19171
  },
19167
19172
  loader: {
19168
- load: ['input/mml']
19173
+ load: ['input/mml'],
19174
+ preLoad: function preLoad() {}
19169
19175
  },
19170
19176
  tex: texConfig,
19171
19177
  chtml: {
@@ -79018,11 +79024,36 @@ getDefaultExportFromCjs(mathRendering);
79018
79024
  fixMathElements(executeOn);
79019
79025
  adjustMathMLStyle(executeOn);
79020
79026
  var mathJaxCustomKey = getMathJaxCustomKey();
79027
+ var workingWithMathJax = function workingWithMathJax() {
79028
+ var mathJaxInstance = getGlobal().instance;
79029
+ if (mathJaxInstance) {
79030
+ mathJaxInstance.texReset();
79031
+ mathJaxInstance.typesetClear();
79032
+ mathJaxInstance.typesetPromise([executeOn]).then(function () {
79033
+ try {
79034
+ removeExcessMjxContainers(executeOn);
79035
+ removePlaceholdersAndRestoreDisplay();
79036
+ var updatedDocument = mathJaxInstance.startup.document;
79037
+ var list = updatedDocument.math.list;
79038
+ for (var item = list.next; (0, _typeof2["default"])(item.data) !== 'symbol'; item = item.next) {
79039
+ var mathMl = toMMl(item.data.root);
79040
+ var parsedMathMl = mathMl.replaceAll('\n', '');
79041
+ item.data.typesetRoot.setAttribute('data-mathml', parsedMathMl);
79042
+ }
79043
+ } catch (e) {
79044
+ console.error('Error post-processing MathJax typesetting:', e.toString());
79045
+ }
79046
+ mathJaxInstance.startup.document.clear();
79047
+ })["catch"](function (error) {
79048
+ console.error('Error in typesetting with MathJax:', error);
79049
+ });
79050
+ }
79051
+ };
79021
79052
  if ((!window.MathJax || window.MathJax.version !== _mathjaxScript.MathJaxVersion) && !window.mathjaxLoadedP || mathJaxCustomKey && mathJaxCustomKey !== mathRenderingAccessibleKEY) {
79022
79053
  renderOpts = renderOpts || defaultOpts();
79023
- (0, _mathjaxScript.initializeMathJax)(renderOpts);
79054
+ (0, _mathjaxScript.initializeMathJax)(renderOpts, workingWithMathJax);
79024
79055
  }
79025
- if (isString && window.MathJax && window.mathjaxLoadedP) {
79056
+ if (isString && window.MathJax && window.mathjaxIsInitialised) {
79026
79057
  try {
79027
79058
  MathJax.texReset();
79028
79059
  MathJax.typesetClear();
@@ -79037,34 +79068,8 @@ getDefaultExportFromCjs(mathRendering);
79037
79068
  console.error('Error rendering math:', error.message);
79038
79069
  }
79039
79070
  }
79040
- if (window.mathjaxLoadedP) {
79041
- window.mathjaxLoadedP.then(function () {
79042
- var mathJaxInstance = getGlobal().instance;
79043
- if (mathJaxInstance) {
79044
- mathJaxInstance.texReset();
79045
- mathJaxInstance.typesetClear();
79046
- mathJaxInstance.typesetPromise([executeOn]).then(function () {
79047
- try {
79048
- removeExcessMjxContainers(executeOn);
79049
- removePlaceholdersAndRestoreDisplay();
79050
- var _updatedDocument = mathJaxInstance.startup.document;
79051
- var _list = _updatedDocument.math.list;
79052
- for (var _item = _list.next; (0, _typeof2["default"])(_item.data) !== 'symbol'; _item = _item.next) {
79053
- var _mathMl = toMMl(_item.data.root);
79054
- var _parsedMathMl = _mathMl.replaceAll('\n', '');
79055
- _item.data.typesetRoot.setAttribute('data-mathml', _parsedMathMl);
79056
- }
79057
- } catch (e) {
79058
- console.error('Error post-processing MathJax typesetting:', e.toString());
79059
- }
79060
- mathJaxInstance.startup.document.clear();
79061
- })["catch"](function (error) {
79062
- console.error('Error in typesetting with MathJax:', error);
79063
- });
79064
- }
79065
- })["catch"](function (error) {
79066
- console.error('Error in initializing MathJax:', error);
79067
- });
79071
+ if (window.mathjaxIsInitialised) {
79072
+ workingWithMathJax();
79068
79073
  }
79069
79074
  };
79070
79075
  if (skipWaitForMathRenderingLib) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "6.22.5-next.42+2171996d6",
7
+ "version": "6.22.5-next.44+a2e933cd2",
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": "1.31.4",
15
+ "@pie-lib/pie-toolbox": "1.31.5-next.4",
16
16
  "classnames": "^2.2.5",
17
17
  "lodash": "^4.17.10",
18
18
  "prop-types": "^15.6.1",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "author": "",
23
23
  "license": "ISC",
24
- "gitHead": "2171996d6514e8391df9e95b87e56cb2c53229bd",
24
+ "gitHead": "a2e933cd27bb052046e245672d3e01cb5ba1b518",
25
25
  "main": "lib/index.js",
26
26
  "module": "src/index.js",
27
27
  "exports": {