@pie-element/math-templated 3.1.2-next.29 → 3.1.2-next.35
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 +132 -1
- package/module/element.js +132 -1
- package/module/manifest.json +1 -1
- package/module/print.js +132 -1
- package/package.json +3 -3
package/configure/package.json
CHANGED
package/controller/package.json
CHANGED
package/module/configure.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.10/module/index.js";
|
|
2
2
|
import {_dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_editable_html} from "../../../@pie-lib/pie-toolbox-module@5.0.7/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) {
|
|
@@ -49977,6 +49977,52 @@ MmlVisitor$1.MmlVisitor = MmlVisitor;
|
|
|
49977
49977
|
exports.SerializedMmlVisitor = SerializedMmlVisitor;
|
|
49978
49978
|
})(SerializedMmlVisitor);
|
|
49979
49979
|
getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
49980
|
+
var TexError$1 = {};
|
|
49981
|
+
Object.defineProperty(TexError$1, "__esModule", {
|
|
49982
|
+
value: true
|
|
49983
|
+
});
|
|
49984
|
+
var TexError = (function () {
|
|
49985
|
+
function TexError(id, message) {
|
|
49986
|
+
var rest = [];
|
|
49987
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
49988
|
+
rest[_i - 2] = arguments[_i];
|
|
49989
|
+
}
|
|
49990
|
+
this.id = id;
|
|
49991
|
+
this.message = TexError.processString(message, rest);
|
|
49992
|
+
}
|
|
49993
|
+
TexError.processString = function (str, args) {
|
|
49994
|
+
var parts = str.split(TexError.pattern);
|
|
49995
|
+
for (var i = 1, m = parts.length; i < m; i += 2) {
|
|
49996
|
+
var c = parts[i].charAt(0);
|
|
49997
|
+
if (c >= '0' && c <= '9') {
|
|
49998
|
+
parts[i] = args[parseInt(parts[i], 10) - 1];
|
|
49999
|
+
if (typeof parts[i] === 'number') {
|
|
50000
|
+
parts[i] = parts[i].toString();
|
|
50001
|
+
}
|
|
50002
|
+
} else if (c === '{') {
|
|
50003
|
+
c = parts[i].substr(1);
|
|
50004
|
+
if (c >= '0' && c <= '9') {
|
|
50005
|
+
parts[i] = args[parseInt(parts[i].substr(1, parts[i].length - 2), 10) - 1];
|
|
50006
|
+
if (typeof parts[i] === 'number') {
|
|
50007
|
+
parts[i] = parts[i].toString();
|
|
50008
|
+
}
|
|
50009
|
+
} else {
|
|
50010
|
+
var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
|
|
50011
|
+
if (match) {
|
|
50012
|
+
parts[i] = '%' + parts[i];
|
|
50013
|
+
}
|
|
50014
|
+
}
|
|
50015
|
+
}
|
|
50016
|
+
if (parts[i] == null) {
|
|
50017
|
+
parts[i] = '???';
|
|
50018
|
+
}
|
|
50019
|
+
}
|
|
50020
|
+
return parts.join('');
|
|
50021
|
+
};
|
|
50022
|
+
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g;
|
|
50023
|
+
return TexError;
|
|
50024
|
+
})();
|
|
50025
|
+
TexError$1.default = TexError;
|
|
49980
50026
|
(function (exports) {
|
|
49981
50027
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
49982
50028
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -49986,6 +50032,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
49986
50032
|
var _typeof2 = _interopRequireDefault(_typeof$3.exports);
|
|
49987
50033
|
var _normalization = normalization;
|
|
49988
50034
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
50035
|
+
var _TexError = _interopRequireDefault(TexError$1);
|
|
49989
50036
|
var visitor = new _SerializedMmlVisitor.SerializedMmlVisitor();
|
|
49990
50037
|
var toMMl = function toMMl(node) {
|
|
49991
50038
|
return visitor.visitTree(node);
|
|
@@ -50100,10 +50147,77 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
50100
50147
|
});
|
|
50101
50148
|
}
|
|
50102
50149
|
};
|
|
50150
|
+
var convertMathJax2ToMathJax3 = function convertMathJax2ToMathJax3() {
|
|
50151
|
+
var CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
|
|
50152
|
+
var requireMap = MathJax.config.startup.requireMap;
|
|
50153
|
+
var RequireLoad = MathJax._.input.tex.require.RequireConfiguration.RequireLoad;
|
|
50154
|
+
var RequireMethods = {
|
|
50155
|
+
Require: function Require(parser, name) {
|
|
50156
|
+
var required = parser.GetArgument(name);
|
|
50157
|
+
if (required.match(/[^_a-zA-Z0-9]/) || required === "") {
|
|
50158
|
+
throw new _TexError["default"]("BadPackageName", "Argument for %1 is not a valid package name", name);
|
|
50159
|
+
}
|
|
50160
|
+
if (requireMap.hasOwnProperty(required)) {
|
|
50161
|
+
required = requireMap[required];
|
|
50162
|
+
}
|
|
50163
|
+
RequireLoad(parser, required);
|
|
50164
|
+
}
|
|
50165
|
+
};
|
|
50166
|
+
new CommandMap("require", {
|
|
50167
|
+
require: "Require"
|
|
50168
|
+
}, RequireMethods);
|
|
50169
|
+
MathJax.Callback = function (args) {
|
|
50170
|
+
if (Array.isArray(args)) {
|
|
50171
|
+
if (args.length === 1 && typeof args[0] === "function") {
|
|
50172
|
+
return args[0];
|
|
50173
|
+
} else if (typeof args[0] === "string" && args[1] instanceof Object && typeof args[1][args[0]] === "function") {
|
|
50174
|
+
return Function.bind.apply(args[1][args[0]], args.slice(1));
|
|
50175
|
+
} else if (typeof args[0] === "function") {
|
|
50176
|
+
return Function.bind.apply(args[0], [window].concat(args.slice(1)));
|
|
50177
|
+
} else if (typeof args[1] === "function") {
|
|
50178
|
+
return Function.bind.apply(args[1], [args[0]].concat(args.slice(2)));
|
|
50179
|
+
}
|
|
50180
|
+
} else if (typeof args === "function") {
|
|
50181
|
+
return args;
|
|
50182
|
+
}
|
|
50183
|
+
throw Error("Can't make callback from given data");
|
|
50184
|
+
};
|
|
50185
|
+
MathJax.Hub = {
|
|
50186
|
+
Queue: function Queue() {
|
|
50187
|
+
for (var i = 0, m = arguments.length; i < m; i++) {
|
|
50188
|
+
var fn = MathJax.Callback(arguments[i]);
|
|
50189
|
+
MathJax.startup.promise = MathJax.startup.promise.then(fn);
|
|
50190
|
+
}
|
|
50191
|
+
return MathJax.startup.promise;
|
|
50192
|
+
},
|
|
50193
|
+
Typeset: function Typeset(elements, callback) {
|
|
50194
|
+
var promise = MathJax.typesetPromise(elements);
|
|
50195
|
+
if (callback) {
|
|
50196
|
+
promise = promise.then(callback);
|
|
50197
|
+
}
|
|
50198
|
+
return promise;
|
|
50199
|
+
},
|
|
50200
|
+
Register: {
|
|
50201
|
+
MessageHook: function MessageHook() {
|
|
50202
|
+
console.log("MessageHooks are not supported in version 3");
|
|
50203
|
+
},
|
|
50204
|
+
StartupHook: function StartupHook() {
|
|
50205
|
+
console.log("StartupHooks are not supported in version 3");
|
|
50206
|
+
},
|
|
50207
|
+
LoadHook: function LoadHook() {
|
|
50208
|
+
console.log("LoadHooks are not supported in version 3");
|
|
50209
|
+
}
|
|
50210
|
+
},
|
|
50211
|
+
Config: function Config() {
|
|
50212
|
+
console.log("MathJax configurations should be converted for version 3");
|
|
50213
|
+
}
|
|
50214
|
+
};
|
|
50215
|
+
};
|
|
50103
50216
|
var initializeMathJax = function initializeMathJax(callback) {
|
|
50104
50217
|
if (window.mathjaxLoadedP) {
|
|
50105
50218
|
return;
|
|
50106
50219
|
}
|
|
50220
|
+
var PreviousMathJaxIsUsed = window.MathJax && window.MathJax.version && window.MathJax.version !== MathJaxVersion && window.MathJax.version[0] === '2';
|
|
50107
50221
|
var texConfig = {
|
|
50108
50222
|
macros: {
|
|
50109
50223
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
@@ -50113,11 +50227,28 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
50113
50227
|
},
|
|
50114
50228
|
displayMath: [["$$", "$$"], ["\\[", "\\]"]]
|
|
50115
50229
|
};
|
|
50230
|
+
if (PreviousMathJaxIsUsed) {
|
|
50231
|
+
texConfig.autoload = {
|
|
50232
|
+
color: [],
|
|
50233
|
+
colorv2: ["color"]
|
|
50234
|
+
};
|
|
50235
|
+
}
|
|
50116
50236
|
window.mathjaxLoadedP = new Promise(function (resolve) {
|
|
50117
50237
|
window.MathJax = {
|
|
50118
50238
|
startup: {
|
|
50239
|
+
requireMap: PreviousMathJaxIsUsed ? {
|
|
50240
|
+
AMSmath: "ams",
|
|
50241
|
+
AMSsymbols: "ams",
|
|
50242
|
+
AMScd: "amscd",
|
|
50243
|
+
HTML: "html",
|
|
50244
|
+
noErrors: "noerrors",
|
|
50245
|
+
noUndefined: "noundefined"
|
|
50246
|
+
} : {},
|
|
50119
50247
|
typeset: false,
|
|
50120
50248
|
ready: function ready() {
|
|
50249
|
+
if (PreviousMathJaxIsUsed) {
|
|
50250
|
+
convertMathJax2ToMathJax3();
|
|
50251
|
+
}
|
|
50121
50252
|
var mathjax = MathJax._.mathjax.mathjax;
|
|
50122
50253
|
var STATE = MathJax._.core.MathItem.STATE;
|
|
50123
50254
|
var Menu = MathJax._.ui.menu.Menu.Menu;
|
package/module/element.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.10/module/index.js";
|
|
2
2
|
import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.0.7/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) {
|
|
@@ -28867,6 +28867,52 @@ MmlVisitor$1.MmlVisitor = MmlVisitor;
|
|
|
28867
28867
|
exports.SerializedMmlVisitor = SerializedMmlVisitor;
|
|
28868
28868
|
})(SerializedMmlVisitor);
|
|
28869
28869
|
getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
28870
|
+
var TexError$1 = {};
|
|
28871
|
+
Object.defineProperty(TexError$1, "__esModule", {
|
|
28872
|
+
value: true
|
|
28873
|
+
});
|
|
28874
|
+
var TexError = (function () {
|
|
28875
|
+
function TexError(id, message) {
|
|
28876
|
+
var rest = [];
|
|
28877
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
28878
|
+
rest[_i - 2] = arguments[_i];
|
|
28879
|
+
}
|
|
28880
|
+
this.id = id;
|
|
28881
|
+
this.message = TexError.processString(message, rest);
|
|
28882
|
+
}
|
|
28883
|
+
TexError.processString = function (str, args) {
|
|
28884
|
+
var parts = str.split(TexError.pattern);
|
|
28885
|
+
for (var i = 1, m = parts.length; i < m; i += 2) {
|
|
28886
|
+
var c = parts[i].charAt(0);
|
|
28887
|
+
if (c >= '0' && c <= '9') {
|
|
28888
|
+
parts[i] = args[parseInt(parts[i], 10) - 1];
|
|
28889
|
+
if (typeof parts[i] === 'number') {
|
|
28890
|
+
parts[i] = parts[i].toString();
|
|
28891
|
+
}
|
|
28892
|
+
} else if (c === '{') {
|
|
28893
|
+
c = parts[i].substr(1);
|
|
28894
|
+
if (c >= '0' && c <= '9') {
|
|
28895
|
+
parts[i] = args[parseInt(parts[i].substr(1, parts[i].length - 2), 10) - 1];
|
|
28896
|
+
if (typeof parts[i] === 'number') {
|
|
28897
|
+
parts[i] = parts[i].toString();
|
|
28898
|
+
}
|
|
28899
|
+
} else {
|
|
28900
|
+
var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
|
|
28901
|
+
if (match) {
|
|
28902
|
+
parts[i] = '%' + parts[i];
|
|
28903
|
+
}
|
|
28904
|
+
}
|
|
28905
|
+
}
|
|
28906
|
+
if (parts[i] == null) {
|
|
28907
|
+
parts[i] = '???';
|
|
28908
|
+
}
|
|
28909
|
+
}
|
|
28910
|
+
return parts.join('');
|
|
28911
|
+
};
|
|
28912
|
+
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g;
|
|
28913
|
+
return TexError;
|
|
28914
|
+
})();
|
|
28915
|
+
TexError$1.default = TexError;
|
|
28870
28916
|
(function (exports) {
|
|
28871
28917
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
28872
28918
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -28876,6 +28922,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
28876
28922
|
var _typeof2 = _interopRequireDefault(_typeof$b.exports);
|
|
28877
28923
|
var _normalization = normalization;
|
|
28878
28924
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
28925
|
+
var _TexError = _interopRequireDefault(TexError$1);
|
|
28879
28926
|
var visitor = new _SerializedMmlVisitor.SerializedMmlVisitor();
|
|
28880
28927
|
var toMMl = function toMMl(node) {
|
|
28881
28928
|
return visitor.visitTree(node);
|
|
@@ -28990,10 +29037,77 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
28990
29037
|
});
|
|
28991
29038
|
}
|
|
28992
29039
|
};
|
|
29040
|
+
var convertMathJax2ToMathJax3 = function convertMathJax2ToMathJax3() {
|
|
29041
|
+
var CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
|
|
29042
|
+
var requireMap = MathJax.config.startup.requireMap;
|
|
29043
|
+
var RequireLoad = MathJax._.input.tex.require.RequireConfiguration.RequireLoad;
|
|
29044
|
+
var RequireMethods = {
|
|
29045
|
+
Require: function Require(parser, name) {
|
|
29046
|
+
var required = parser.GetArgument(name);
|
|
29047
|
+
if (required.match(/[^_a-zA-Z0-9]/) || required === "") {
|
|
29048
|
+
throw new _TexError["default"]("BadPackageName", "Argument for %1 is not a valid package name", name);
|
|
29049
|
+
}
|
|
29050
|
+
if (requireMap.hasOwnProperty(required)) {
|
|
29051
|
+
required = requireMap[required];
|
|
29052
|
+
}
|
|
29053
|
+
RequireLoad(parser, required);
|
|
29054
|
+
}
|
|
29055
|
+
};
|
|
29056
|
+
new CommandMap("require", {
|
|
29057
|
+
require: "Require"
|
|
29058
|
+
}, RequireMethods);
|
|
29059
|
+
MathJax.Callback = function (args) {
|
|
29060
|
+
if (Array.isArray(args)) {
|
|
29061
|
+
if (args.length === 1 && typeof args[0] === "function") {
|
|
29062
|
+
return args[0];
|
|
29063
|
+
} else if (typeof args[0] === "string" && args[1] instanceof Object && typeof args[1][args[0]] === "function") {
|
|
29064
|
+
return Function.bind.apply(args[1][args[0]], args.slice(1));
|
|
29065
|
+
} else if (typeof args[0] === "function") {
|
|
29066
|
+
return Function.bind.apply(args[0], [window].concat(args.slice(1)));
|
|
29067
|
+
} else if (typeof args[1] === "function") {
|
|
29068
|
+
return Function.bind.apply(args[1], [args[0]].concat(args.slice(2)));
|
|
29069
|
+
}
|
|
29070
|
+
} else if (typeof args === "function") {
|
|
29071
|
+
return args;
|
|
29072
|
+
}
|
|
29073
|
+
throw Error("Can't make callback from given data");
|
|
29074
|
+
};
|
|
29075
|
+
MathJax.Hub = {
|
|
29076
|
+
Queue: function Queue() {
|
|
29077
|
+
for (var i = 0, m = arguments.length; i < m; i++) {
|
|
29078
|
+
var fn = MathJax.Callback(arguments[i]);
|
|
29079
|
+
MathJax.startup.promise = MathJax.startup.promise.then(fn);
|
|
29080
|
+
}
|
|
29081
|
+
return MathJax.startup.promise;
|
|
29082
|
+
},
|
|
29083
|
+
Typeset: function Typeset(elements, callback) {
|
|
29084
|
+
var promise = MathJax.typesetPromise(elements);
|
|
29085
|
+
if (callback) {
|
|
29086
|
+
promise = promise.then(callback);
|
|
29087
|
+
}
|
|
29088
|
+
return promise;
|
|
29089
|
+
},
|
|
29090
|
+
Register: {
|
|
29091
|
+
MessageHook: function MessageHook() {
|
|
29092
|
+
console.log("MessageHooks are not supported in version 3");
|
|
29093
|
+
},
|
|
29094
|
+
StartupHook: function StartupHook() {
|
|
29095
|
+
console.log("StartupHooks are not supported in version 3");
|
|
29096
|
+
},
|
|
29097
|
+
LoadHook: function LoadHook() {
|
|
29098
|
+
console.log("LoadHooks are not supported in version 3");
|
|
29099
|
+
}
|
|
29100
|
+
},
|
|
29101
|
+
Config: function Config() {
|
|
29102
|
+
console.log("MathJax configurations should be converted for version 3");
|
|
29103
|
+
}
|
|
29104
|
+
};
|
|
29105
|
+
};
|
|
28993
29106
|
var initializeMathJax = function initializeMathJax(callback) {
|
|
28994
29107
|
if (window.mathjaxLoadedP) {
|
|
28995
29108
|
return;
|
|
28996
29109
|
}
|
|
29110
|
+
var PreviousMathJaxIsUsed = window.MathJax && window.MathJax.version && window.MathJax.version !== MathJaxVersion && window.MathJax.version[0] === '2';
|
|
28997
29111
|
var texConfig = {
|
|
28998
29112
|
macros: {
|
|
28999
29113
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
@@ -29003,11 +29117,28 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
29003
29117
|
},
|
|
29004
29118
|
displayMath: [["$$", "$$"], ["\\[", "\\]"]]
|
|
29005
29119
|
};
|
|
29120
|
+
if (PreviousMathJaxIsUsed) {
|
|
29121
|
+
texConfig.autoload = {
|
|
29122
|
+
color: [],
|
|
29123
|
+
colorv2: ["color"]
|
|
29124
|
+
};
|
|
29125
|
+
}
|
|
29006
29126
|
window.mathjaxLoadedP = new Promise(function (resolve) {
|
|
29007
29127
|
window.MathJax = {
|
|
29008
29128
|
startup: {
|
|
29129
|
+
requireMap: PreviousMathJaxIsUsed ? {
|
|
29130
|
+
AMSmath: "ams",
|
|
29131
|
+
AMSsymbols: "ams",
|
|
29132
|
+
AMScd: "amscd",
|
|
29133
|
+
HTML: "html",
|
|
29134
|
+
noErrors: "noerrors",
|
|
29135
|
+
noUndefined: "noundefined"
|
|
29136
|
+
} : {},
|
|
29009
29137
|
typeset: false,
|
|
29010
29138
|
ready: function ready() {
|
|
29139
|
+
if (PreviousMathJaxIsUsed) {
|
|
29140
|
+
convertMathJax2ToMathJax3();
|
|
29141
|
+
}
|
|
29011
29142
|
var mathjax = MathJax._.mathjax.mathjax;
|
|
29012
29143
|
var STATE = MathJax._.core.MathItem.STATE;
|
|
29013
29144
|
var Menu = MathJax._.ui.menu.Menu.Menu;
|
package/module/manifest.json
CHANGED
package/module/print.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.10/module/index.js";
|
|
2
2
|
import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.0.7/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) {
|
|
@@ -28830,6 +28830,52 @@ MmlVisitor$1.MmlVisitor = MmlVisitor;
|
|
|
28830
28830
|
exports.SerializedMmlVisitor = SerializedMmlVisitor;
|
|
28831
28831
|
})(SerializedMmlVisitor);
|
|
28832
28832
|
getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
28833
|
+
var TexError$1 = {};
|
|
28834
|
+
Object.defineProperty(TexError$1, "__esModule", {
|
|
28835
|
+
value: true
|
|
28836
|
+
});
|
|
28837
|
+
var TexError = (function () {
|
|
28838
|
+
function TexError(id, message) {
|
|
28839
|
+
var rest = [];
|
|
28840
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
28841
|
+
rest[_i - 2] = arguments[_i];
|
|
28842
|
+
}
|
|
28843
|
+
this.id = id;
|
|
28844
|
+
this.message = TexError.processString(message, rest);
|
|
28845
|
+
}
|
|
28846
|
+
TexError.processString = function (str, args) {
|
|
28847
|
+
var parts = str.split(TexError.pattern);
|
|
28848
|
+
for (var i = 1, m = parts.length; i < m; i += 2) {
|
|
28849
|
+
var c = parts[i].charAt(0);
|
|
28850
|
+
if (c >= '0' && c <= '9') {
|
|
28851
|
+
parts[i] = args[parseInt(parts[i], 10) - 1];
|
|
28852
|
+
if (typeof parts[i] === 'number') {
|
|
28853
|
+
parts[i] = parts[i].toString();
|
|
28854
|
+
}
|
|
28855
|
+
} else if (c === '{') {
|
|
28856
|
+
c = parts[i].substr(1);
|
|
28857
|
+
if (c >= '0' && c <= '9') {
|
|
28858
|
+
parts[i] = args[parseInt(parts[i].substr(1, parts[i].length - 2), 10) - 1];
|
|
28859
|
+
if (typeof parts[i] === 'number') {
|
|
28860
|
+
parts[i] = parts[i].toString();
|
|
28861
|
+
}
|
|
28862
|
+
} else {
|
|
28863
|
+
var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
|
|
28864
|
+
if (match) {
|
|
28865
|
+
parts[i] = '%' + parts[i];
|
|
28866
|
+
}
|
|
28867
|
+
}
|
|
28868
|
+
}
|
|
28869
|
+
if (parts[i] == null) {
|
|
28870
|
+
parts[i] = '???';
|
|
28871
|
+
}
|
|
28872
|
+
}
|
|
28873
|
+
return parts.join('');
|
|
28874
|
+
};
|
|
28875
|
+
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g;
|
|
28876
|
+
return TexError;
|
|
28877
|
+
})();
|
|
28878
|
+
TexError$1.default = TexError;
|
|
28833
28879
|
(function (exports) {
|
|
28834
28880
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
28835
28881
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -28839,6 +28885,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
28839
28885
|
var _typeof2 = _interopRequireDefault(_typeof$b.exports);
|
|
28840
28886
|
var _normalization = normalization;
|
|
28841
28887
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
28888
|
+
var _TexError = _interopRequireDefault(TexError$1);
|
|
28842
28889
|
var visitor = new _SerializedMmlVisitor.SerializedMmlVisitor();
|
|
28843
28890
|
var toMMl = function toMMl(node) {
|
|
28844
28891
|
return visitor.visitTree(node);
|
|
@@ -28953,10 +29000,77 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
28953
29000
|
});
|
|
28954
29001
|
}
|
|
28955
29002
|
};
|
|
29003
|
+
var convertMathJax2ToMathJax3 = function convertMathJax2ToMathJax3() {
|
|
29004
|
+
var CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
|
|
29005
|
+
var requireMap = MathJax.config.startup.requireMap;
|
|
29006
|
+
var RequireLoad = MathJax._.input.tex.require.RequireConfiguration.RequireLoad;
|
|
29007
|
+
var RequireMethods = {
|
|
29008
|
+
Require: function Require(parser, name) {
|
|
29009
|
+
var required = parser.GetArgument(name);
|
|
29010
|
+
if (required.match(/[^_a-zA-Z0-9]/) || required === "") {
|
|
29011
|
+
throw new _TexError["default"]("BadPackageName", "Argument for %1 is not a valid package name", name);
|
|
29012
|
+
}
|
|
29013
|
+
if (requireMap.hasOwnProperty(required)) {
|
|
29014
|
+
required = requireMap[required];
|
|
29015
|
+
}
|
|
29016
|
+
RequireLoad(parser, required);
|
|
29017
|
+
}
|
|
29018
|
+
};
|
|
29019
|
+
new CommandMap("require", {
|
|
29020
|
+
require: "Require"
|
|
29021
|
+
}, RequireMethods);
|
|
29022
|
+
MathJax.Callback = function (args) {
|
|
29023
|
+
if (Array.isArray(args)) {
|
|
29024
|
+
if (args.length === 1 && typeof args[0] === "function") {
|
|
29025
|
+
return args[0];
|
|
29026
|
+
} else if (typeof args[0] === "string" && args[1] instanceof Object && typeof args[1][args[0]] === "function") {
|
|
29027
|
+
return Function.bind.apply(args[1][args[0]], args.slice(1));
|
|
29028
|
+
} else if (typeof args[0] === "function") {
|
|
29029
|
+
return Function.bind.apply(args[0], [window].concat(args.slice(1)));
|
|
29030
|
+
} else if (typeof args[1] === "function") {
|
|
29031
|
+
return Function.bind.apply(args[1], [args[0]].concat(args.slice(2)));
|
|
29032
|
+
}
|
|
29033
|
+
} else if (typeof args === "function") {
|
|
29034
|
+
return args;
|
|
29035
|
+
}
|
|
29036
|
+
throw Error("Can't make callback from given data");
|
|
29037
|
+
};
|
|
29038
|
+
MathJax.Hub = {
|
|
29039
|
+
Queue: function Queue() {
|
|
29040
|
+
for (var i = 0, m = arguments.length; i < m; i++) {
|
|
29041
|
+
var fn = MathJax.Callback(arguments[i]);
|
|
29042
|
+
MathJax.startup.promise = MathJax.startup.promise.then(fn);
|
|
29043
|
+
}
|
|
29044
|
+
return MathJax.startup.promise;
|
|
29045
|
+
},
|
|
29046
|
+
Typeset: function Typeset(elements, callback) {
|
|
29047
|
+
var promise = MathJax.typesetPromise(elements);
|
|
29048
|
+
if (callback) {
|
|
29049
|
+
promise = promise.then(callback);
|
|
29050
|
+
}
|
|
29051
|
+
return promise;
|
|
29052
|
+
},
|
|
29053
|
+
Register: {
|
|
29054
|
+
MessageHook: function MessageHook() {
|
|
29055
|
+
console.log("MessageHooks are not supported in version 3");
|
|
29056
|
+
},
|
|
29057
|
+
StartupHook: function StartupHook() {
|
|
29058
|
+
console.log("StartupHooks are not supported in version 3");
|
|
29059
|
+
},
|
|
29060
|
+
LoadHook: function LoadHook() {
|
|
29061
|
+
console.log("LoadHooks are not supported in version 3");
|
|
29062
|
+
}
|
|
29063
|
+
},
|
|
29064
|
+
Config: function Config() {
|
|
29065
|
+
console.log("MathJax configurations should be converted for version 3");
|
|
29066
|
+
}
|
|
29067
|
+
};
|
|
29068
|
+
};
|
|
28956
29069
|
var initializeMathJax = function initializeMathJax(callback) {
|
|
28957
29070
|
if (window.mathjaxLoadedP) {
|
|
28958
29071
|
return;
|
|
28959
29072
|
}
|
|
29073
|
+
var PreviousMathJaxIsUsed = window.MathJax && window.MathJax.version && window.MathJax.version !== MathJaxVersion && window.MathJax.version[0] === '2';
|
|
28960
29074
|
var texConfig = {
|
|
28961
29075
|
macros: {
|
|
28962
29076
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
@@ -28966,11 +29080,28 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
28966
29080
|
},
|
|
28967
29081
|
displayMath: [["$$", "$$"], ["\\[", "\\]"]]
|
|
28968
29082
|
};
|
|
29083
|
+
if (PreviousMathJaxIsUsed) {
|
|
29084
|
+
texConfig.autoload = {
|
|
29085
|
+
color: [],
|
|
29086
|
+
colorv2: ["color"]
|
|
29087
|
+
};
|
|
29088
|
+
}
|
|
28969
29089
|
window.mathjaxLoadedP = new Promise(function (resolve) {
|
|
28970
29090
|
window.MathJax = {
|
|
28971
29091
|
startup: {
|
|
29092
|
+
requireMap: PreviousMathJaxIsUsed ? {
|
|
29093
|
+
AMSmath: "ams",
|
|
29094
|
+
AMSsymbols: "ams",
|
|
29095
|
+
AMScd: "amscd",
|
|
29096
|
+
HTML: "html",
|
|
29097
|
+
noErrors: "noerrors",
|
|
29098
|
+
noUndefined: "noundefined"
|
|
29099
|
+
} : {},
|
|
28972
29100
|
typeset: false,
|
|
28973
29101
|
ready: function ready() {
|
|
29102
|
+
if (PreviousMathJaxIsUsed) {
|
|
29103
|
+
convertMathJax2ToMathJax3();
|
|
29104
|
+
}
|
|
28974
29105
|
var mathjax = MathJax._.mathjax.mathjax;
|
|
28975
29106
|
var STATE = MathJax._.core.MathItem.STATE;
|
|
28976
29107
|
var Menu = MathJax._.ui.menu.Menu.Menu;
|
package/package.json
CHANGED
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "3.1.2-next.
|
|
7
|
+
"version": "3.1.2-next.35+e57a47c0e",
|
|
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": "2.0.
|
|
12
|
+
"@pie-lib/pie-toolbox": "2.0.12",
|
|
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": "e57a47c0e0aedd0462b18199ef8e864a4490c364",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"postpublish": "../../scripts/postpublish"
|
|
22
22
|
},
|