@pie-element/complex-rubric 2.19.5-next.42 → 2.19.5-next.43

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.
@@ -7,7 +7,7 @@
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
9
  "dependencies": {
10
- "@pie-lib/pie-toolbox": "1.31.4",
10
+ "@pie-lib/pie-toolbox": "next",
11
11
  "lodash": "^4.17.15"
12
12
  },
13
13
  "author": "",
@@ -42042,7 +42042,7 @@ mathjaxScript.initializeMathJax = mathjaxScript.MathJaxVersion = void 0;
42042
42042
  var _renderMath = renderMath$1;
42043
42043
  var MathJaxVersion = '3.2.2';
42044
42044
  mathjaxScript.MathJaxVersion = MathJaxVersion;
42045
- var initializeMathJax = function initializeMathJax(renderOpts) {
42045
+ var initializeMathJax = function initializeMathJax(renderOpts, callback) {
42046
42046
  if (renderOpts !== null && renderOpts !== void 0 && renderOpts.useSingleDollar) {
42047
42047
  console.warn('[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)');
42048
42048
  }
@@ -42084,7 +42084,12 @@ var initializeMathJax = function initializeMathJax(renderOpts) {
42084
42084
  MathJax.startup.defaultReady();
42085
42085
  var globalObj = (0, _renderMath.getGlobal)();
42086
42086
  globalObj.instance = MathJax;
42087
- resolve();
42087
+ window.mathjaxIsInitialised = true;
42088
+ if (callback) {
42089
+ callback();
42090
+ } else {
42091
+ resolve();
42092
+ }
42088
42093
  }
42089
42094
  },
42090
42095
  loader: {
@@ -101866,11 +101871,36 @@ getDefaultExportFromCjs(mathRendering);
101866
101871
  fixMathElements(executeOn);
101867
101872
  adjustMathMLStyle(executeOn);
101868
101873
  var mathJaxCustomKey = getMathJaxCustomKey();
101874
+ var workingWithMathJax = function workingWithMathJax() {
101875
+ var mathJaxInstance = getGlobal().instance;
101876
+ if (mathJaxInstance) {
101877
+ mathJaxInstance.texReset();
101878
+ mathJaxInstance.typesetClear();
101879
+ mathJaxInstance.typesetPromise([executeOn]).then(function () {
101880
+ try {
101881
+ removeExcessMjxContainers(executeOn);
101882
+ removePlaceholdersAndRestoreDisplay();
101883
+ var updatedDocument = mathJaxInstance.startup.document;
101884
+ var list = updatedDocument.math.list;
101885
+ for (var item = list.next; (0, _typeof2["default"])(item.data) !== 'symbol'; item = item.next) {
101886
+ var mathMl = toMMl(item.data.root);
101887
+ var parsedMathMl = mathMl.replaceAll('\n', '');
101888
+ item.data.typesetRoot.setAttribute('data-mathml', parsedMathMl);
101889
+ }
101890
+ } catch (e) {
101891
+ console.error('Error post-processing MathJax typesetting:', e.toString());
101892
+ }
101893
+ mathJaxInstance.startup.document.clear();
101894
+ })["catch"](function (error) {
101895
+ console.error('Error in typesetting with MathJax:', error);
101896
+ });
101897
+ }
101898
+ };
101869
101899
  if ((!window.MathJax || window.MathJax.version !== _mathjaxScript.MathJaxVersion) && !window.mathjaxLoadedP || mathJaxCustomKey && mathJaxCustomKey !== mathRenderingAccessibleKEY) {
101870
101900
  renderOpts = renderOpts || defaultOpts();
101871
- (0, _mathjaxScript.initializeMathJax)(renderOpts);
101901
+ (0, _mathjaxScript.initializeMathJax)(renderOpts, workingWithMathJax);
101872
101902
  }
101873
- if (isString && window.MathJax && window.mathjaxLoadedP) {
101903
+ if (isString && window.MathJax && window.mathjaxIsInitialised) {
101874
101904
  try {
101875
101905
  MathJax.texReset();
101876
101906
  MathJax.typesetClear();
@@ -101885,34 +101915,8 @@ getDefaultExportFromCjs(mathRendering);
101885
101915
  console.error('Error rendering math:', error.message);
101886
101916
  }
101887
101917
  }
101888
- if (window.mathjaxLoadedP) {
101889
- window.mathjaxLoadedP.then(function () {
101890
- var mathJaxInstance = getGlobal().instance;
101891
- if (mathJaxInstance) {
101892
- mathJaxInstance.texReset();
101893
- mathJaxInstance.typesetClear();
101894
- mathJaxInstance.typesetPromise([executeOn]).then(function () {
101895
- try {
101896
- removeExcessMjxContainers(executeOn);
101897
- removePlaceholdersAndRestoreDisplay();
101898
- var _updatedDocument = mathJaxInstance.startup.document;
101899
- var _list = _updatedDocument.math.list;
101900
- for (var _item = _list.next; (0, _typeof2["default"])(_item.data) !== 'symbol'; _item = _item.next) {
101901
- var _mathMl = toMMl(_item.data.root);
101902
- var _parsedMathMl = _mathMl.replaceAll('\n', '');
101903
- _item.data.typesetRoot.setAttribute('data-mathml', _parsedMathMl);
101904
- }
101905
- } catch (e) {
101906
- console.error('Error post-processing MathJax typesetting:', e.toString());
101907
- }
101908
- mathJaxInstance.startup.document.clear();
101909
- })["catch"](function (error) {
101910
- console.error('Error in typesetting with MathJax:', error);
101911
- });
101912
- }
101913
- })["catch"](function (error) {
101914
- console.error('Error in initializing MathJax:', error);
101915
- });
101918
+ if (window.mathjaxIsInitialised) {
101919
+ workingWithMathJax();
101916
101920
  }
101917
101921
  };
101918
101922
  if (skipWaitForMathRenderingLib) {
package/module/element.js CHANGED
@@ -65368,7 +65368,7 @@ mathjaxScript.initializeMathJax = mathjaxScript.MathJaxVersion = void 0;
65368
65368
  var _renderMath = renderMath$1;
65369
65369
  var MathJaxVersion = '3.2.2';
65370
65370
  mathjaxScript.MathJaxVersion = MathJaxVersion;
65371
- var initializeMathJax = function initializeMathJax(renderOpts) {
65371
+ var initializeMathJax = function initializeMathJax(renderOpts, callback) {
65372
65372
  if (renderOpts !== null && renderOpts !== void 0 && renderOpts.useSingleDollar) {
65373
65373
  console.warn('[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)');
65374
65374
  }
@@ -65410,7 +65410,12 @@ var initializeMathJax = function initializeMathJax(renderOpts) {
65410
65410
  MathJax.startup.defaultReady();
65411
65411
  var globalObj = (0, _renderMath.getGlobal)();
65412
65412
  globalObj.instance = MathJax;
65413
- resolve();
65413
+ window.mathjaxIsInitialised = true;
65414
+ if (callback) {
65415
+ callback();
65416
+ } else {
65417
+ resolve();
65418
+ }
65414
65419
  }
65415
65420
  },
65416
65421
  loader: {
@@ -125127,11 +125132,36 @@ getDefaultExportFromCjs(mathRendering);
125127
125132
  fixMathElements(executeOn);
125128
125133
  adjustMathMLStyle(executeOn);
125129
125134
  var mathJaxCustomKey = getMathJaxCustomKey();
125135
+ var workingWithMathJax = function workingWithMathJax() {
125136
+ var mathJaxInstance = getGlobal().instance;
125137
+ if (mathJaxInstance) {
125138
+ mathJaxInstance.texReset();
125139
+ mathJaxInstance.typesetClear();
125140
+ mathJaxInstance.typesetPromise([executeOn]).then(function () {
125141
+ try {
125142
+ removeExcessMjxContainers(executeOn);
125143
+ removePlaceholdersAndRestoreDisplay();
125144
+ var updatedDocument = mathJaxInstance.startup.document;
125145
+ var list = updatedDocument.math.list;
125146
+ for (var item = list.next; (0, _typeof2["default"])(item.data) !== 'symbol'; item = item.next) {
125147
+ var mathMl = toMMl(item.data.root);
125148
+ var parsedMathMl = mathMl.replaceAll('\n', '');
125149
+ item.data.typesetRoot.setAttribute('data-mathml', parsedMathMl);
125150
+ }
125151
+ } catch (e) {
125152
+ console.error('Error post-processing MathJax typesetting:', e.toString());
125153
+ }
125154
+ mathJaxInstance.startup.document.clear();
125155
+ })["catch"](function (error) {
125156
+ console.error('Error in typesetting with MathJax:', error);
125157
+ });
125158
+ }
125159
+ };
125130
125160
  if ((!window.MathJax || window.MathJax.version !== _mathjaxScript.MathJaxVersion) && !window.mathjaxLoadedP || mathJaxCustomKey && mathJaxCustomKey !== mathRenderingAccessibleKEY) {
125131
125161
  renderOpts = renderOpts || defaultOpts();
125132
- (0, _mathjaxScript.initializeMathJax)(renderOpts);
125162
+ (0, _mathjaxScript.initializeMathJax)(renderOpts, workingWithMathJax);
125133
125163
  }
125134
- if (isString && window.MathJax && window.mathjaxLoadedP) {
125164
+ if (isString && window.MathJax && window.mathjaxIsInitialised) {
125135
125165
  try {
125136
125166
  MathJax.texReset();
125137
125167
  MathJax.typesetClear();
@@ -125146,34 +125176,8 @@ getDefaultExportFromCjs(mathRendering);
125146
125176
  console.error('Error rendering math:', error.message);
125147
125177
  }
125148
125178
  }
125149
- if (window.mathjaxLoadedP) {
125150
- window.mathjaxLoadedP.then(function () {
125151
- var mathJaxInstance = getGlobal().instance;
125152
- if (mathJaxInstance) {
125153
- mathJaxInstance.texReset();
125154
- mathJaxInstance.typesetClear();
125155
- mathJaxInstance.typesetPromise([executeOn]).then(function () {
125156
- try {
125157
- removeExcessMjxContainers(executeOn);
125158
- removePlaceholdersAndRestoreDisplay();
125159
- var _updatedDocument = mathJaxInstance.startup.document;
125160
- var _list = _updatedDocument.math.list;
125161
- for (var _item = _list.next; (0, _typeof2["default"])(_item.data) !== 'symbol'; _item = _item.next) {
125162
- var _mathMl = toMMl(_item.data.root);
125163
- var _parsedMathMl = _mathMl.replaceAll('\n', '');
125164
- _item.data.typesetRoot.setAttribute('data-mathml', _parsedMathMl);
125165
- }
125166
- } catch (e) {
125167
- console.error('Error post-processing MathJax typesetting:', e.toString());
125168
- }
125169
- mathJaxInstance.startup.document.clear();
125170
- })["catch"](function (error) {
125171
- console.error('Error in typesetting with MathJax:', error);
125172
- });
125173
- }
125174
- })["catch"](function (error) {
125175
- console.error('Error in initializing MathJax:', error);
125176
- });
125179
+ if (window.mathjaxIsInitialised) {
125180
+ workingWithMathJax();
125177
125181
  }
125178
125182
  };
125179
125183
  if (skipWaitForMathRenderingLib) {
package/module/print.js CHANGED
@@ -65368,7 +65368,7 @@ mathjaxScript.initializeMathJax = mathjaxScript.MathJaxVersion = void 0;
65368
65368
  var _renderMath = renderMath$1;
65369
65369
  var MathJaxVersion = '3.2.2';
65370
65370
  mathjaxScript.MathJaxVersion = MathJaxVersion;
65371
- var initializeMathJax = function initializeMathJax(renderOpts) {
65371
+ var initializeMathJax = function initializeMathJax(renderOpts, callback) {
65372
65372
  if (renderOpts !== null && renderOpts !== void 0 && renderOpts.useSingleDollar) {
65373
65373
  console.warn('[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)');
65374
65374
  }
@@ -65410,7 +65410,12 @@ var initializeMathJax = function initializeMathJax(renderOpts) {
65410
65410
  MathJax.startup.defaultReady();
65411
65411
  var globalObj = (0, _renderMath.getGlobal)();
65412
65412
  globalObj.instance = MathJax;
65413
- resolve();
65413
+ window.mathjaxIsInitialised = true;
65414
+ if (callback) {
65415
+ callback();
65416
+ } else {
65417
+ resolve();
65418
+ }
65414
65419
  }
65415
65420
  },
65416
65421
  loader: {
@@ -125127,11 +125132,36 @@ getDefaultExportFromCjs(mathRendering);
125127
125132
  fixMathElements(executeOn);
125128
125133
  adjustMathMLStyle(executeOn);
125129
125134
  var mathJaxCustomKey = getMathJaxCustomKey();
125135
+ var workingWithMathJax = function workingWithMathJax() {
125136
+ var mathJaxInstance = getGlobal().instance;
125137
+ if (mathJaxInstance) {
125138
+ mathJaxInstance.texReset();
125139
+ mathJaxInstance.typesetClear();
125140
+ mathJaxInstance.typesetPromise([executeOn]).then(function () {
125141
+ try {
125142
+ removeExcessMjxContainers(executeOn);
125143
+ removePlaceholdersAndRestoreDisplay();
125144
+ var updatedDocument = mathJaxInstance.startup.document;
125145
+ var list = updatedDocument.math.list;
125146
+ for (var item = list.next; (0, _typeof2["default"])(item.data) !== 'symbol'; item = item.next) {
125147
+ var mathMl = toMMl(item.data.root);
125148
+ var parsedMathMl = mathMl.replaceAll('\n', '');
125149
+ item.data.typesetRoot.setAttribute('data-mathml', parsedMathMl);
125150
+ }
125151
+ } catch (e) {
125152
+ console.error('Error post-processing MathJax typesetting:', e.toString());
125153
+ }
125154
+ mathJaxInstance.startup.document.clear();
125155
+ })["catch"](function (error) {
125156
+ console.error('Error in typesetting with MathJax:', error);
125157
+ });
125158
+ }
125159
+ };
125130
125160
  if ((!window.MathJax || window.MathJax.version !== _mathjaxScript.MathJaxVersion) && !window.mathjaxLoadedP || mathJaxCustomKey && mathJaxCustomKey !== mathRenderingAccessibleKEY) {
125131
125161
  renderOpts = renderOpts || defaultOpts();
125132
- (0, _mathjaxScript.initializeMathJax)(renderOpts);
125162
+ (0, _mathjaxScript.initializeMathJax)(renderOpts, workingWithMathJax);
125133
125163
  }
125134
- if (isString && window.MathJax && window.mathjaxLoadedP) {
125164
+ if (isString && window.MathJax && window.mathjaxIsInitialised) {
125135
125165
  try {
125136
125166
  MathJax.texReset();
125137
125167
  MathJax.typesetClear();
@@ -125146,34 +125176,8 @@ getDefaultExportFromCjs(mathRendering);
125146
125176
  console.error('Error rendering math:', error.message);
125147
125177
  }
125148
125178
  }
125149
- if (window.mathjaxLoadedP) {
125150
- window.mathjaxLoadedP.then(function () {
125151
- var mathJaxInstance = getGlobal().instance;
125152
- if (mathJaxInstance) {
125153
- mathJaxInstance.texReset();
125154
- mathJaxInstance.typesetClear();
125155
- mathJaxInstance.typesetPromise([executeOn]).then(function () {
125156
- try {
125157
- removeExcessMjxContainers(executeOn);
125158
- removePlaceholdersAndRestoreDisplay();
125159
- var _updatedDocument = mathJaxInstance.startup.document;
125160
- var _list = _updatedDocument.math.list;
125161
- for (var _item = _list.next; (0, _typeof2["default"])(_item.data) !== 'symbol'; _item = _item.next) {
125162
- var _mathMl = toMMl(_item.data.root);
125163
- var _parsedMathMl = _mathMl.replaceAll('\n', '');
125164
- _item.data.typesetRoot.setAttribute('data-mathml', _parsedMathMl);
125165
- }
125166
- } catch (e) {
125167
- console.error('Error post-processing MathJax typesetting:', e.toString());
125168
- }
125169
- mathJaxInstance.startup.document.clear();
125170
- })["catch"](function (error) {
125171
- console.error('Error in typesetting with MathJax:', error);
125172
- });
125173
- }
125174
- })["catch"](function (error) {
125175
- console.error('Error in initializing MathJax:', error);
125176
- });
125179
+ if (window.mathjaxIsInitialised) {
125180
+ workingWithMathJax();
125177
125181
  }
125178
125182
  };
125179
125183
  if (skipWaitForMathRenderingLib) {
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@pie-element/complex-rubric",
3
3
  "repository": "pie-framework/pie-elements",
4
- "version": "2.19.5-next.42+2171996d6",
4
+ "version": "2.19.5-next.43+524ed2558",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "dependencies": {
9
9
  "@material-ui/core": "^3.9.2",
10
- "@pie-element/multi-trait-rubric": "^3.19.5-next.42+2171996d6",
11
- "@pie-element/rubric": "^3.19.5-next.42+2171996d6",
10
+ "@pie-element/multi-trait-rubric": "^3.19.5-next.43+524ed2558",
11
+ "@pie-element/rubric": "^3.19.5-next.43+524ed2558",
12
12
  "@pie-framework/pie-player-events": "^0.1.0",
13
13
  "classnames": "^2.2.5",
14
14
  "debug": "^4.1.1",
15
15
  "lodash": "^4.17.11",
16
16
  "prop-types": "^15.7.2"
17
17
  },
18
- "gitHead": "2171996d6514e8391df9e95b87e56cb2c53229bd",
18
+ "gitHead": "524ed2558cc92380d2e6d271a81a8da02b521cf5",
19
19
  "scripts": {
20
20
  "postpublish": "../../scripts/postpublish"
21
21
  },