@pie-element/math-templated 2.22.5-next.42 → 2.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/configure.js +36 -32
- package/module/element.js +36 -32
- package/module/print.js +36 -32
- package/package.json +3 -3
package/configure/package.json
CHANGED
package/controller/package.json
CHANGED
package/module/configure.js
CHANGED
|
@@ -43057,7 +43057,7 @@ mathjaxScript.initializeMathJax = mathjaxScript.MathJaxVersion = void 0;
|
|
|
43057
43057
|
var _renderMath = renderMath$1;
|
|
43058
43058
|
var MathJaxVersion = '3.2.2';
|
|
43059
43059
|
mathjaxScript.MathJaxVersion = MathJaxVersion;
|
|
43060
|
-
var initializeMathJax = function initializeMathJax(renderOpts) {
|
|
43060
|
+
var initializeMathJax = function initializeMathJax(renderOpts, callback) {
|
|
43061
43061
|
if (renderOpts !== null && renderOpts !== void 0 && renderOpts.useSingleDollar) {
|
|
43062
43062
|
console.warn('[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)');
|
|
43063
43063
|
}
|
|
@@ -43099,7 +43099,12 @@ var initializeMathJax = function initializeMathJax(renderOpts) {
|
|
|
43099
43099
|
MathJax.startup.defaultReady();
|
|
43100
43100
|
var globalObj = (0, _renderMath.getGlobal)();
|
|
43101
43101
|
globalObj.instance = MathJax;
|
|
43102
|
-
|
|
43102
|
+
window.mathjaxIsInitialised = true;
|
|
43103
|
+
if (callback) {
|
|
43104
|
+
callback();
|
|
43105
|
+
} else {
|
|
43106
|
+
resolve();
|
|
43107
|
+
}
|
|
43103
43108
|
}
|
|
43104
43109
|
},
|
|
43105
43110
|
loader: {
|
|
@@ -102816,11 +102821,36 @@ getDefaultExportFromCjs(mathRendering);
|
|
|
102816
102821
|
fixMathElements(executeOn);
|
|
102817
102822
|
adjustMathMLStyle(executeOn);
|
|
102818
102823
|
var mathJaxCustomKey = getMathJaxCustomKey();
|
|
102824
|
+
var workingWithMathJax = function workingWithMathJax() {
|
|
102825
|
+
var mathJaxInstance = getGlobal().instance;
|
|
102826
|
+
if (mathJaxInstance) {
|
|
102827
|
+
mathJaxInstance.texReset();
|
|
102828
|
+
mathJaxInstance.typesetClear();
|
|
102829
|
+
mathJaxInstance.typesetPromise([executeOn]).then(function () {
|
|
102830
|
+
try {
|
|
102831
|
+
removeExcessMjxContainers(executeOn);
|
|
102832
|
+
removePlaceholdersAndRestoreDisplay();
|
|
102833
|
+
var updatedDocument = mathJaxInstance.startup.document;
|
|
102834
|
+
var list = updatedDocument.math.list;
|
|
102835
|
+
for (var item = list.next; (0, _typeof2["default"])(item.data) !== 'symbol'; item = item.next) {
|
|
102836
|
+
var mathMl = toMMl(item.data.root);
|
|
102837
|
+
var parsedMathMl = mathMl.replaceAll('\n', '');
|
|
102838
|
+
item.data.typesetRoot.setAttribute('data-mathml', parsedMathMl);
|
|
102839
|
+
}
|
|
102840
|
+
} catch (e) {
|
|
102841
|
+
console.error('Error post-processing MathJax typesetting:', e.toString());
|
|
102842
|
+
}
|
|
102843
|
+
mathJaxInstance.startup.document.clear();
|
|
102844
|
+
})["catch"](function (error) {
|
|
102845
|
+
console.error('Error in typesetting with MathJax:', error);
|
|
102846
|
+
});
|
|
102847
|
+
}
|
|
102848
|
+
};
|
|
102819
102849
|
if ((!window.MathJax || window.MathJax.version !== _mathjaxScript.MathJaxVersion) && !window.mathjaxLoadedP || mathJaxCustomKey && mathJaxCustomKey !== mathRenderingAccessibleKEY) {
|
|
102820
102850
|
renderOpts = renderOpts || defaultOpts();
|
|
102821
|
-
(0, _mathjaxScript.initializeMathJax)(renderOpts);
|
|
102851
|
+
(0, _mathjaxScript.initializeMathJax)(renderOpts, workingWithMathJax);
|
|
102822
102852
|
}
|
|
102823
|
-
if (isString && window.MathJax && window.
|
|
102853
|
+
if (isString && window.MathJax && window.mathjaxIsInitialised) {
|
|
102824
102854
|
try {
|
|
102825
102855
|
MathJax.texReset();
|
|
102826
102856
|
MathJax.typesetClear();
|
|
@@ -102835,34 +102865,8 @@ getDefaultExportFromCjs(mathRendering);
|
|
|
102835
102865
|
console.error('Error rendering math:', error.message);
|
|
102836
102866
|
}
|
|
102837
102867
|
}
|
|
102838
|
-
if (window.
|
|
102839
|
-
|
|
102840
|
-
var mathJaxInstance = getGlobal().instance;
|
|
102841
|
-
if (mathJaxInstance) {
|
|
102842
|
-
mathJaxInstance.texReset();
|
|
102843
|
-
mathJaxInstance.typesetClear();
|
|
102844
|
-
mathJaxInstance.typesetPromise([executeOn]).then(function () {
|
|
102845
|
-
try {
|
|
102846
|
-
removeExcessMjxContainers(executeOn);
|
|
102847
|
-
removePlaceholdersAndRestoreDisplay();
|
|
102848
|
-
var _updatedDocument = mathJaxInstance.startup.document;
|
|
102849
|
-
var _list = _updatedDocument.math.list;
|
|
102850
|
-
for (var _item = _list.next; (0, _typeof2["default"])(_item.data) !== 'symbol'; _item = _item.next) {
|
|
102851
|
-
var _mathMl = toMMl(_item.data.root);
|
|
102852
|
-
var _parsedMathMl = _mathMl.replaceAll('\n', '');
|
|
102853
|
-
_item.data.typesetRoot.setAttribute('data-mathml', _parsedMathMl);
|
|
102854
|
-
}
|
|
102855
|
-
} catch (e) {
|
|
102856
|
-
console.error('Error post-processing MathJax typesetting:', e.toString());
|
|
102857
|
-
}
|
|
102858
|
-
mathJaxInstance.startup.document.clear();
|
|
102859
|
-
})["catch"](function (error) {
|
|
102860
|
-
console.error('Error in typesetting with MathJax:', error);
|
|
102861
|
-
});
|
|
102862
|
-
}
|
|
102863
|
-
})["catch"](function (error) {
|
|
102864
|
-
console.error('Error in initializing MathJax:', error);
|
|
102865
|
-
});
|
|
102868
|
+
if (window.mathjaxIsInitialised) {
|
|
102869
|
+
workingWithMathJax();
|
|
102866
102870
|
}
|
|
102867
102871
|
};
|
|
102868
102872
|
if (skipWaitForMathRenderingLib) {
|
package/module/element.js
CHANGED
|
@@ -21852,7 +21852,7 @@ mathjaxScript.initializeMathJax = mathjaxScript.MathJaxVersion = void 0;
|
|
|
21852
21852
|
var _renderMath = renderMath$2;
|
|
21853
21853
|
var MathJaxVersion = '3.2.2';
|
|
21854
21854
|
mathjaxScript.MathJaxVersion = MathJaxVersion;
|
|
21855
|
-
var initializeMathJax = function initializeMathJax(renderOpts) {
|
|
21855
|
+
var initializeMathJax = function initializeMathJax(renderOpts, callback) {
|
|
21856
21856
|
if (renderOpts !== null && renderOpts !== void 0 && renderOpts.useSingleDollar) {
|
|
21857
21857
|
console.warn('[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)');
|
|
21858
21858
|
}
|
|
@@ -21894,7 +21894,12 @@ var initializeMathJax = function initializeMathJax(renderOpts) {
|
|
|
21894
21894
|
MathJax.startup.defaultReady();
|
|
21895
21895
|
var globalObj = (0, _renderMath.getGlobal)();
|
|
21896
21896
|
globalObj.instance = MathJax;
|
|
21897
|
-
|
|
21897
|
+
window.mathjaxIsInitialised = true;
|
|
21898
|
+
if (callback) {
|
|
21899
|
+
callback();
|
|
21900
|
+
} else {
|
|
21901
|
+
resolve();
|
|
21902
|
+
}
|
|
21898
21903
|
}
|
|
21899
21904
|
},
|
|
21900
21905
|
loader: {
|
|
@@ -81751,11 +81756,36 @@ getDefaultExportFromCjs(mathRendering);
|
|
|
81751
81756
|
fixMathElements(executeOn);
|
|
81752
81757
|
adjustMathMLStyle(executeOn);
|
|
81753
81758
|
var mathJaxCustomKey = getMathJaxCustomKey();
|
|
81759
|
+
var workingWithMathJax = function workingWithMathJax() {
|
|
81760
|
+
var mathJaxInstance = getGlobal().instance;
|
|
81761
|
+
if (mathJaxInstance) {
|
|
81762
|
+
mathJaxInstance.texReset();
|
|
81763
|
+
mathJaxInstance.typesetClear();
|
|
81764
|
+
mathJaxInstance.typesetPromise([executeOn]).then(function () {
|
|
81765
|
+
try {
|
|
81766
|
+
removeExcessMjxContainers(executeOn);
|
|
81767
|
+
removePlaceholdersAndRestoreDisplay();
|
|
81768
|
+
var updatedDocument = mathJaxInstance.startup.document;
|
|
81769
|
+
var list = updatedDocument.math.list;
|
|
81770
|
+
for (var item = list.next; (0, _typeof2["default"])(item.data) !== 'symbol'; item = item.next) {
|
|
81771
|
+
var mathMl = toMMl(item.data.root);
|
|
81772
|
+
var parsedMathMl = mathMl.replaceAll('\n', '');
|
|
81773
|
+
item.data.typesetRoot.setAttribute('data-mathml', parsedMathMl);
|
|
81774
|
+
}
|
|
81775
|
+
} catch (e) {
|
|
81776
|
+
console.error('Error post-processing MathJax typesetting:', e.toString());
|
|
81777
|
+
}
|
|
81778
|
+
mathJaxInstance.startup.document.clear();
|
|
81779
|
+
})["catch"](function (error) {
|
|
81780
|
+
console.error('Error in typesetting with MathJax:', error);
|
|
81781
|
+
});
|
|
81782
|
+
}
|
|
81783
|
+
};
|
|
81754
81784
|
if ((!window.MathJax || window.MathJax.version !== _mathjaxScript.MathJaxVersion) && !window.mathjaxLoadedP || mathJaxCustomKey && mathJaxCustomKey !== mathRenderingAccessibleKEY) {
|
|
81755
81785
|
renderOpts = renderOpts || defaultOpts();
|
|
81756
|
-
(0, _mathjaxScript.initializeMathJax)(renderOpts);
|
|
81786
|
+
(0, _mathjaxScript.initializeMathJax)(renderOpts, workingWithMathJax);
|
|
81757
81787
|
}
|
|
81758
|
-
if (isString && window.MathJax && window.
|
|
81788
|
+
if (isString && window.MathJax && window.mathjaxIsInitialised) {
|
|
81759
81789
|
try {
|
|
81760
81790
|
MathJax.texReset();
|
|
81761
81791
|
MathJax.typesetClear();
|
|
@@ -81770,34 +81800,8 @@ getDefaultExportFromCjs(mathRendering);
|
|
|
81770
81800
|
console.error('Error rendering math:', error.message);
|
|
81771
81801
|
}
|
|
81772
81802
|
}
|
|
81773
|
-
if (window.
|
|
81774
|
-
|
|
81775
|
-
var mathJaxInstance = getGlobal().instance;
|
|
81776
|
-
if (mathJaxInstance) {
|
|
81777
|
-
mathJaxInstance.texReset();
|
|
81778
|
-
mathJaxInstance.typesetClear();
|
|
81779
|
-
mathJaxInstance.typesetPromise([executeOn]).then(function () {
|
|
81780
|
-
try {
|
|
81781
|
-
removeExcessMjxContainers(executeOn);
|
|
81782
|
-
removePlaceholdersAndRestoreDisplay();
|
|
81783
|
-
var _updatedDocument = mathJaxInstance.startup.document;
|
|
81784
|
-
var _list = _updatedDocument.math.list;
|
|
81785
|
-
for (var _item = _list.next; (0, _typeof2["default"])(_item.data) !== 'symbol'; _item = _item.next) {
|
|
81786
|
-
var _mathMl = toMMl(_item.data.root);
|
|
81787
|
-
var _parsedMathMl = _mathMl.replaceAll('\n', '');
|
|
81788
|
-
_item.data.typesetRoot.setAttribute('data-mathml', _parsedMathMl);
|
|
81789
|
-
}
|
|
81790
|
-
} catch (e) {
|
|
81791
|
-
console.error('Error post-processing MathJax typesetting:', e.toString());
|
|
81792
|
-
}
|
|
81793
|
-
mathJaxInstance.startup.document.clear();
|
|
81794
|
-
})["catch"](function (error) {
|
|
81795
|
-
console.error('Error in typesetting with MathJax:', error);
|
|
81796
|
-
});
|
|
81797
|
-
}
|
|
81798
|
-
})["catch"](function (error) {
|
|
81799
|
-
console.error('Error in initializing MathJax:', error);
|
|
81800
|
-
});
|
|
81803
|
+
if (window.mathjaxIsInitialised) {
|
|
81804
|
+
workingWithMathJax();
|
|
81801
81805
|
}
|
|
81802
81806
|
};
|
|
81803
81807
|
if (skipWaitForMathRenderingLib) {
|
package/module/print.js
CHANGED
|
@@ -21815,7 +21815,7 @@ mathjaxScript.initializeMathJax = mathjaxScript.MathJaxVersion = void 0;
|
|
|
21815
21815
|
var _renderMath = renderMath$3;
|
|
21816
21816
|
var MathJaxVersion = '3.2.2';
|
|
21817
21817
|
mathjaxScript.MathJaxVersion = MathJaxVersion;
|
|
21818
|
-
var initializeMathJax = function initializeMathJax(renderOpts) {
|
|
21818
|
+
var initializeMathJax = function initializeMathJax(renderOpts, callback) {
|
|
21819
21819
|
if (renderOpts !== null && renderOpts !== void 0 && renderOpts.useSingleDollar) {
|
|
21820
21820
|
console.warn('[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)');
|
|
21821
21821
|
}
|
|
@@ -21857,7 +21857,12 @@ var initializeMathJax = function initializeMathJax(renderOpts) {
|
|
|
21857
21857
|
MathJax.startup.defaultReady();
|
|
21858
21858
|
var globalObj = (0, _renderMath.getGlobal)();
|
|
21859
21859
|
globalObj.instance = MathJax;
|
|
21860
|
-
|
|
21860
|
+
window.mathjaxIsInitialised = true;
|
|
21861
|
+
if (callback) {
|
|
21862
|
+
callback();
|
|
21863
|
+
} else {
|
|
21864
|
+
resolve();
|
|
21865
|
+
}
|
|
21861
21866
|
}
|
|
21862
21867
|
},
|
|
21863
21868
|
loader: {
|
|
@@ -81714,11 +81719,36 @@ getDefaultExportFromCjs(mathRendering);
|
|
|
81714
81719
|
fixMathElements(executeOn);
|
|
81715
81720
|
adjustMathMLStyle(executeOn);
|
|
81716
81721
|
var mathJaxCustomKey = getMathJaxCustomKey();
|
|
81722
|
+
var workingWithMathJax = function workingWithMathJax() {
|
|
81723
|
+
var mathJaxInstance = getGlobal().instance;
|
|
81724
|
+
if (mathJaxInstance) {
|
|
81725
|
+
mathJaxInstance.texReset();
|
|
81726
|
+
mathJaxInstance.typesetClear();
|
|
81727
|
+
mathJaxInstance.typesetPromise([executeOn]).then(function () {
|
|
81728
|
+
try {
|
|
81729
|
+
removeExcessMjxContainers(executeOn);
|
|
81730
|
+
removePlaceholdersAndRestoreDisplay();
|
|
81731
|
+
var updatedDocument = mathJaxInstance.startup.document;
|
|
81732
|
+
var list = updatedDocument.math.list;
|
|
81733
|
+
for (var item = list.next; (0, _typeof2["default"])(item.data) !== 'symbol'; item = item.next) {
|
|
81734
|
+
var mathMl = toMMl(item.data.root);
|
|
81735
|
+
var parsedMathMl = mathMl.replaceAll('\n', '');
|
|
81736
|
+
item.data.typesetRoot.setAttribute('data-mathml', parsedMathMl);
|
|
81737
|
+
}
|
|
81738
|
+
} catch (e) {
|
|
81739
|
+
console.error('Error post-processing MathJax typesetting:', e.toString());
|
|
81740
|
+
}
|
|
81741
|
+
mathJaxInstance.startup.document.clear();
|
|
81742
|
+
})["catch"](function (error) {
|
|
81743
|
+
console.error('Error in typesetting with MathJax:', error);
|
|
81744
|
+
});
|
|
81745
|
+
}
|
|
81746
|
+
};
|
|
81717
81747
|
if ((!window.MathJax || window.MathJax.version !== _mathjaxScript.MathJaxVersion) && !window.mathjaxLoadedP || mathJaxCustomKey && mathJaxCustomKey !== mathRenderingAccessibleKEY) {
|
|
81718
81748
|
renderOpts = renderOpts || defaultOpts();
|
|
81719
|
-
(0, _mathjaxScript.initializeMathJax)(renderOpts);
|
|
81749
|
+
(0, _mathjaxScript.initializeMathJax)(renderOpts, workingWithMathJax);
|
|
81720
81750
|
}
|
|
81721
|
-
if (isString && window.MathJax && window.
|
|
81751
|
+
if (isString && window.MathJax && window.mathjaxIsInitialised) {
|
|
81722
81752
|
try {
|
|
81723
81753
|
MathJax.texReset();
|
|
81724
81754
|
MathJax.typesetClear();
|
|
@@ -81733,34 +81763,8 @@ getDefaultExportFromCjs(mathRendering);
|
|
|
81733
81763
|
console.error('Error rendering math:', error.message);
|
|
81734
81764
|
}
|
|
81735
81765
|
}
|
|
81736
|
-
if (window.
|
|
81737
|
-
|
|
81738
|
-
var mathJaxInstance = getGlobal().instance;
|
|
81739
|
-
if (mathJaxInstance) {
|
|
81740
|
-
mathJaxInstance.texReset();
|
|
81741
|
-
mathJaxInstance.typesetClear();
|
|
81742
|
-
mathJaxInstance.typesetPromise([executeOn]).then(function () {
|
|
81743
|
-
try {
|
|
81744
|
-
removeExcessMjxContainers(executeOn);
|
|
81745
|
-
removePlaceholdersAndRestoreDisplay();
|
|
81746
|
-
var _updatedDocument = mathJaxInstance.startup.document;
|
|
81747
|
-
var _list = _updatedDocument.math.list;
|
|
81748
|
-
for (var _item = _list.next; (0, _typeof2["default"])(_item.data) !== 'symbol'; _item = _item.next) {
|
|
81749
|
-
var _mathMl = toMMl(_item.data.root);
|
|
81750
|
-
var _parsedMathMl = _mathMl.replaceAll('\n', '');
|
|
81751
|
-
_item.data.typesetRoot.setAttribute('data-mathml', _parsedMathMl);
|
|
81752
|
-
}
|
|
81753
|
-
} catch (e) {
|
|
81754
|
-
console.error('Error post-processing MathJax typesetting:', e.toString());
|
|
81755
|
-
}
|
|
81756
|
-
mathJaxInstance.startup.document.clear();
|
|
81757
|
-
})["catch"](function (error) {
|
|
81758
|
-
console.error('Error in typesetting with MathJax:', error);
|
|
81759
|
-
});
|
|
81760
|
-
}
|
|
81761
|
-
})["catch"](function (error) {
|
|
81762
|
-
console.error('Error in initializing MathJax:', error);
|
|
81763
|
-
});
|
|
81766
|
+
if (window.mathjaxIsInitialised) {
|
|
81767
|
+
workingWithMathJax();
|
|
81764
81768
|
}
|
|
81765
81769
|
};
|
|
81766
81770
|
if (skipWaitForMathRenderingLib) {
|
package/package.json
CHANGED
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "2.22.5-next.
|
|
7
|
+
"version": "2.22.5-next.43+524ed2558",
|
|
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": "
|
|
12
|
+
"@pie-lib/pie-toolbox": "next",
|
|
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": "
|
|
19
|
+
"gitHead": "524ed2558cc92380d2e6d271a81a8da02b521cf5",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"postpublish": "../../scripts/postpublish"
|
|
22
22
|
},
|