@pie-element/explicit-constructed-response 6.22.5-next.36 → 6.22.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.
- package/configure/package.json +1 -1
- package/controller/package.json +1 -1
- package/module/element.js +36 -32
- package/module/print.js +36 -32
- package/package.json +3 -3
package/configure/package.json
CHANGED
|
@@ -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": "
|
|
11
|
+
"@pie-lib/pie-toolbox": "next",
|
|
12
12
|
"classnames": "^2.2.6",
|
|
13
13
|
"debug": "^3.1.0",
|
|
14
14
|
"lodash": "^4.17.15",
|
package/controller/package.json
CHANGED
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,7 +19198,12 @@ var initializeMathJax = function initializeMathJax(renderOpts) {
|
|
|
19198
19198
|
MathJax.startup.defaultReady();
|
|
19199
19199
|
var globalObj = (0, _renderMath.getGlobal)();
|
|
19200
19200
|
globalObj.instance = MathJax;
|
|
19201
|
-
|
|
19201
|
+
window.mathjaxIsInitialised = true;
|
|
19202
|
+
if (callback) {
|
|
19203
|
+
callback();
|
|
19204
|
+
} else {
|
|
19205
|
+
resolve();
|
|
19206
|
+
}
|
|
19202
19207
|
}
|
|
19203
19208
|
},
|
|
19204
19209
|
loader: {
|
|
@@ -79055,11 +79060,36 @@ getDefaultExportFromCjs(mathRendering);
|
|
|
79055
79060
|
fixMathElements(executeOn);
|
|
79056
79061
|
adjustMathMLStyle(executeOn);
|
|
79057
79062
|
var mathJaxCustomKey = getMathJaxCustomKey();
|
|
79063
|
+
var workingWithMathJax = function workingWithMathJax() {
|
|
79064
|
+
var mathJaxInstance = getGlobal().instance;
|
|
79065
|
+
if (mathJaxInstance) {
|
|
79066
|
+
mathJaxInstance.texReset();
|
|
79067
|
+
mathJaxInstance.typesetClear();
|
|
79068
|
+
mathJaxInstance.typesetPromise([executeOn]).then(function () {
|
|
79069
|
+
try {
|
|
79070
|
+
removeExcessMjxContainers(executeOn);
|
|
79071
|
+
removePlaceholdersAndRestoreDisplay();
|
|
79072
|
+
var updatedDocument = mathJaxInstance.startup.document;
|
|
79073
|
+
var list = updatedDocument.math.list;
|
|
79074
|
+
for (var item = list.next; (0, _typeof2["default"])(item.data) !== 'symbol'; item = item.next) {
|
|
79075
|
+
var mathMl = toMMl(item.data.root);
|
|
79076
|
+
var parsedMathMl = mathMl.replaceAll('\n', '');
|
|
79077
|
+
item.data.typesetRoot.setAttribute('data-mathml', parsedMathMl);
|
|
79078
|
+
}
|
|
79079
|
+
} catch (e) {
|
|
79080
|
+
console.error('Error post-processing MathJax typesetting:', e.toString());
|
|
79081
|
+
}
|
|
79082
|
+
mathJaxInstance.startup.document.clear();
|
|
79083
|
+
})["catch"](function (error) {
|
|
79084
|
+
console.error('Error in typesetting with MathJax:', error);
|
|
79085
|
+
});
|
|
79086
|
+
}
|
|
79087
|
+
};
|
|
79058
79088
|
if ((!window.MathJax || window.MathJax.version !== _mathjaxScript.MathJaxVersion) && !window.mathjaxLoadedP || mathJaxCustomKey && mathJaxCustomKey !== mathRenderingAccessibleKEY) {
|
|
79059
79089
|
renderOpts = renderOpts || defaultOpts();
|
|
79060
|
-
(0, _mathjaxScript.initializeMathJax)(renderOpts);
|
|
79090
|
+
(0, _mathjaxScript.initializeMathJax)(renderOpts, workingWithMathJax);
|
|
79061
79091
|
}
|
|
79062
|
-
if (isString && window.MathJax && window.
|
|
79092
|
+
if (isString && window.MathJax && window.mathjaxIsInitialised) {
|
|
79063
79093
|
try {
|
|
79064
79094
|
MathJax.texReset();
|
|
79065
79095
|
MathJax.typesetClear();
|
|
@@ -79074,34 +79104,8 @@ getDefaultExportFromCjs(mathRendering);
|
|
|
79074
79104
|
console.error('Error rendering math:', error.message);
|
|
79075
79105
|
}
|
|
79076
79106
|
}
|
|
79077
|
-
if (window.
|
|
79078
|
-
|
|
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
|
-
});
|
|
79107
|
+
if (window.mathjaxIsInitialised) {
|
|
79108
|
+
workingWithMathJax();
|
|
79105
79109
|
}
|
|
79106
79110
|
};
|
|
79107
79111
|
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,7 +19161,12 @@ var initializeMathJax = function initializeMathJax(renderOpts) {
|
|
|
19161
19161
|
MathJax.startup.defaultReady();
|
|
19162
19162
|
var globalObj = (0, _renderMath.getGlobal)();
|
|
19163
19163
|
globalObj.instance = MathJax;
|
|
19164
|
-
|
|
19164
|
+
window.mathjaxIsInitialised = true;
|
|
19165
|
+
if (callback) {
|
|
19166
|
+
callback();
|
|
19167
|
+
} else {
|
|
19168
|
+
resolve();
|
|
19169
|
+
}
|
|
19165
19170
|
}
|
|
19166
19171
|
},
|
|
19167
19172
|
loader: {
|
|
@@ -79018,11 +79023,36 @@ getDefaultExportFromCjs(mathRendering);
|
|
|
79018
79023
|
fixMathElements(executeOn);
|
|
79019
79024
|
adjustMathMLStyle(executeOn);
|
|
79020
79025
|
var mathJaxCustomKey = getMathJaxCustomKey();
|
|
79026
|
+
var workingWithMathJax = function workingWithMathJax() {
|
|
79027
|
+
var mathJaxInstance = getGlobal().instance;
|
|
79028
|
+
if (mathJaxInstance) {
|
|
79029
|
+
mathJaxInstance.texReset();
|
|
79030
|
+
mathJaxInstance.typesetClear();
|
|
79031
|
+
mathJaxInstance.typesetPromise([executeOn]).then(function () {
|
|
79032
|
+
try {
|
|
79033
|
+
removeExcessMjxContainers(executeOn);
|
|
79034
|
+
removePlaceholdersAndRestoreDisplay();
|
|
79035
|
+
var updatedDocument = mathJaxInstance.startup.document;
|
|
79036
|
+
var list = updatedDocument.math.list;
|
|
79037
|
+
for (var item = list.next; (0, _typeof2["default"])(item.data) !== 'symbol'; item = item.next) {
|
|
79038
|
+
var mathMl = toMMl(item.data.root);
|
|
79039
|
+
var parsedMathMl = mathMl.replaceAll('\n', '');
|
|
79040
|
+
item.data.typesetRoot.setAttribute('data-mathml', parsedMathMl);
|
|
79041
|
+
}
|
|
79042
|
+
} catch (e) {
|
|
79043
|
+
console.error('Error post-processing MathJax typesetting:', e.toString());
|
|
79044
|
+
}
|
|
79045
|
+
mathJaxInstance.startup.document.clear();
|
|
79046
|
+
})["catch"](function (error) {
|
|
79047
|
+
console.error('Error in typesetting with MathJax:', error);
|
|
79048
|
+
});
|
|
79049
|
+
}
|
|
79050
|
+
};
|
|
79021
79051
|
if ((!window.MathJax || window.MathJax.version !== _mathjaxScript.MathJaxVersion) && !window.mathjaxLoadedP || mathJaxCustomKey && mathJaxCustomKey !== mathRenderingAccessibleKEY) {
|
|
79022
79052
|
renderOpts = renderOpts || defaultOpts();
|
|
79023
|
-
(0, _mathjaxScript.initializeMathJax)(renderOpts);
|
|
79053
|
+
(0, _mathjaxScript.initializeMathJax)(renderOpts, workingWithMathJax);
|
|
79024
79054
|
}
|
|
79025
|
-
if (isString && window.MathJax && window.
|
|
79055
|
+
if (isString && window.MathJax && window.mathjaxIsInitialised) {
|
|
79026
79056
|
try {
|
|
79027
79057
|
MathJax.texReset();
|
|
79028
79058
|
MathJax.typesetClear();
|
|
@@ -79037,34 +79067,8 @@ getDefaultExportFromCjs(mathRendering);
|
|
|
79037
79067
|
console.error('Error rendering math:', error.message);
|
|
79038
79068
|
}
|
|
79039
79069
|
}
|
|
79040
|
-
if (window.
|
|
79041
|
-
|
|
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
|
-
});
|
|
79070
|
+
if (window.mathjaxIsInitialised) {
|
|
79071
|
+
workingWithMathJax();
|
|
79068
79072
|
}
|
|
79069
79073
|
};
|
|
79070
79074
|
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.
|
|
7
|
+
"version": "6.22.5-next.43+524ed2558",
|
|
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": "
|
|
15
|
+
"@pie-lib/pie-toolbox": "next",
|
|
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": "
|
|
24
|
+
"gitHead": "524ed2558cc92380d2e6d271a81a8da02b521cf5",
|
|
25
25
|
"main": "lib/index.js",
|
|
26
26
|
"module": "src/index.js",
|
|
27
27
|
"exports": {
|