@pie-element/complex-rubric 3.1.2-next.29 → 3.1.2-next.31
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/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 +4 -4
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, _dll_react_dom_server, _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_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.10/module/index.js";
|
|
2
2
|
import RubricConfigure from '@pie-element/rubric/configure/lib';
|
|
3
3
|
import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.7/module/index.js";
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -49027,6 +49027,52 @@ MmlVisitor$1.MmlVisitor = MmlVisitor;
|
|
|
49027
49027
|
exports.SerializedMmlVisitor = SerializedMmlVisitor;
|
|
49028
49028
|
})(SerializedMmlVisitor);
|
|
49029
49029
|
getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
49030
|
+
var TexError$1 = {};
|
|
49031
|
+
Object.defineProperty(TexError$1, "__esModule", {
|
|
49032
|
+
value: true
|
|
49033
|
+
});
|
|
49034
|
+
var TexError = (function () {
|
|
49035
|
+
function TexError(id, message) {
|
|
49036
|
+
var rest = [];
|
|
49037
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
49038
|
+
rest[_i - 2] = arguments[_i];
|
|
49039
|
+
}
|
|
49040
|
+
this.id = id;
|
|
49041
|
+
this.message = TexError.processString(message, rest);
|
|
49042
|
+
}
|
|
49043
|
+
TexError.processString = function (str, args) {
|
|
49044
|
+
var parts = str.split(TexError.pattern);
|
|
49045
|
+
for (var i = 1, m = parts.length; i < m; i += 2) {
|
|
49046
|
+
var c = parts[i].charAt(0);
|
|
49047
|
+
if (c >= '0' && c <= '9') {
|
|
49048
|
+
parts[i] = args[parseInt(parts[i], 10) - 1];
|
|
49049
|
+
if (typeof parts[i] === 'number') {
|
|
49050
|
+
parts[i] = parts[i].toString();
|
|
49051
|
+
}
|
|
49052
|
+
} else if (c === '{') {
|
|
49053
|
+
c = parts[i].substr(1);
|
|
49054
|
+
if (c >= '0' && c <= '9') {
|
|
49055
|
+
parts[i] = args[parseInt(parts[i].substr(1, parts[i].length - 2), 10) - 1];
|
|
49056
|
+
if (typeof parts[i] === 'number') {
|
|
49057
|
+
parts[i] = parts[i].toString();
|
|
49058
|
+
}
|
|
49059
|
+
} else {
|
|
49060
|
+
var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
|
|
49061
|
+
if (match) {
|
|
49062
|
+
parts[i] = '%' + parts[i];
|
|
49063
|
+
}
|
|
49064
|
+
}
|
|
49065
|
+
}
|
|
49066
|
+
if (parts[i] == null) {
|
|
49067
|
+
parts[i] = '???';
|
|
49068
|
+
}
|
|
49069
|
+
}
|
|
49070
|
+
return parts.join('');
|
|
49071
|
+
};
|
|
49072
|
+
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g;
|
|
49073
|
+
return TexError;
|
|
49074
|
+
})();
|
|
49075
|
+
TexError$1.default = TexError;
|
|
49030
49076
|
(function (exports) {
|
|
49031
49077
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
49032
49078
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -49036,6 +49082,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
49036
49082
|
var _typeof2 = _interopRequireDefault(_typeof$s.exports);
|
|
49037
49083
|
var _normalization = normalization;
|
|
49038
49084
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
49085
|
+
var _TexError = _interopRequireDefault(TexError$1);
|
|
49039
49086
|
var visitor = new _SerializedMmlVisitor.SerializedMmlVisitor();
|
|
49040
49087
|
var toMMl = function toMMl(node) {
|
|
49041
49088
|
return visitor.visitTree(node);
|
|
@@ -49150,10 +49197,77 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
49150
49197
|
});
|
|
49151
49198
|
}
|
|
49152
49199
|
};
|
|
49200
|
+
var convertMathJax2ToMathJax3 = function convertMathJax2ToMathJax3() {
|
|
49201
|
+
var CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
|
|
49202
|
+
var requireMap = MathJax.config.startup.requireMap;
|
|
49203
|
+
var RequireLoad = MathJax._.input.tex.require.RequireConfiguration.RequireLoad;
|
|
49204
|
+
var RequireMethods = {
|
|
49205
|
+
Require: function Require(parser, name) {
|
|
49206
|
+
var required = parser.GetArgument(name);
|
|
49207
|
+
if (required.match(/[^_a-zA-Z0-9]/) || required === "") {
|
|
49208
|
+
throw new _TexError["default"]("BadPackageName", "Argument for %1 is not a valid package name", name);
|
|
49209
|
+
}
|
|
49210
|
+
if (requireMap.hasOwnProperty(required)) {
|
|
49211
|
+
required = requireMap[required];
|
|
49212
|
+
}
|
|
49213
|
+
RequireLoad(parser, required);
|
|
49214
|
+
}
|
|
49215
|
+
};
|
|
49216
|
+
new CommandMap("require", {
|
|
49217
|
+
require: "Require"
|
|
49218
|
+
}, RequireMethods);
|
|
49219
|
+
MathJax.Callback = function (args) {
|
|
49220
|
+
if (Array.isArray(args)) {
|
|
49221
|
+
if (args.length === 1 && typeof args[0] === "function") {
|
|
49222
|
+
return args[0];
|
|
49223
|
+
} else if (typeof args[0] === "string" && args[1] instanceof Object && typeof args[1][args[0]] === "function") {
|
|
49224
|
+
return Function.bind.apply(args[1][args[0]], args.slice(1));
|
|
49225
|
+
} else if (typeof args[0] === "function") {
|
|
49226
|
+
return Function.bind.apply(args[0], [window].concat(args.slice(1)));
|
|
49227
|
+
} else if (typeof args[1] === "function") {
|
|
49228
|
+
return Function.bind.apply(args[1], [args[0]].concat(args.slice(2)));
|
|
49229
|
+
}
|
|
49230
|
+
} else if (typeof args === "function") {
|
|
49231
|
+
return args;
|
|
49232
|
+
}
|
|
49233
|
+
throw Error("Can't make callback from given data");
|
|
49234
|
+
};
|
|
49235
|
+
MathJax.Hub = {
|
|
49236
|
+
Queue: function Queue() {
|
|
49237
|
+
for (var i = 0, m = arguments.length; i < m; i++) {
|
|
49238
|
+
var fn = MathJax.Callback(arguments[i]);
|
|
49239
|
+
MathJax.startup.promise = MathJax.startup.promise.then(fn);
|
|
49240
|
+
}
|
|
49241
|
+
return MathJax.startup.promise;
|
|
49242
|
+
},
|
|
49243
|
+
Typeset: function Typeset(elements, callback) {
|
|
49244
|
+
var promise = MathJax.typesetPromise(elements);
|
|
49245
|
+
if (callback) {
|
|
49246
|
+
promise = promise.then(callback);
|
|
49247
|
+
}
|
|
49248
|
+
return promise;
|
|
49249
|
+
},
|
|
49250
|
+
Register: {
|
|
49251
|
+
MessageHook: function MessageHook() {
|
|
49252
|
+
console.log("MessageHooks are not supported in version 3");
|
|
49253
|
+
},
|
|
49254
|
+
StartupHook: function StartupHook() {
|
|
49255
|
+
console.log("StartupHooks are not supported in version 3");
|
|
49256
|
+
},
|
|
49257
|
+
LoadHook: function LoadHook() {
|
|
49258
|
+
console.log("LoadHooks are not supported in version 3");
|
|
49259
|
+
}
|
|
49260
|
+
},
|
|
49261
|
+
Config: function Config() {
|
|
49262
|
+
console.log("MathJax configurations should be converted for version 3");
|
|
49263
|
+
}
|
|
49264
|
+
};
|
|
49265
|
+
};
|
|
49153
49266
|
var initializeMathJax = function initializeMathJax(callback) {
|
|
49154
49267
|
if (window.mathjaxLoadedP) {
|
|
49155
49268
|
return;
|
|
49156
49269
|
}
|
|
49270
|
+
var PreviousMathJaxIsUsed = window.MathJax && window.MathJax.version && window.MathJax.version !== MathJaxVersion && window.MathJax.version[0] === '2';
|
|
49157
49271
|
var texConfig = {
|
|
49158
49272
|
macros: {
|
|
49159
49273
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
@@ -49163,11 +49277,28 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
49163
49277
|
},
|
|
49164
49278
|
displayMath: [["$$", "$$"], ["\\[", "\\]"]]
|
|
49165
49279
|
};
|
|
49280
|
+
if (PreviousMathJaxIsUsed) {
|
|
49281
|
+
texConfig.autoload = {
|
|
49282
|
+
color: [],
|
|
49283
|
+
colorv2: ["color"]
|
|
49284
|
+
};
|
|
49285
|
+
}
|
|
49166
49286
|
window.mathjaxLoadedP = new Promise(function (resolve) {
|
|
49167
49287
|
window.MathJax = {
|
|
49168
49288
|
startup: {
|
|
49289
|
+
requireMap: PreviousMathJaxIsUsed ? {
|
|
49290
|
+
AMSmath: "ams",
|
|
49291
|
+
AMSsymbols: "ams",
|
|
49292
|
+
AMScd: "amscd",
|
|
49293
|
+
HTML: "html",
|
|
49294
|
+
noErrors: "noerrors",
|
|
49295
|
+
noUndefined: "noundefined"
|
|
49296
|
+
} : {},
|
|
49169
49297
|
typeset: false,
|
|
49170
49298
|
ready: function ready() {
|
|
49299
|
+
if (PreviousMathJaxIsUsed) {
|
|
49300
|
+
convertMathJax2ToMathJax3();
|
|
49301
|
+
}
|
|
49171
49302
|
var mathjax = MathJax._.mathjax.mathjax;
|
|
49172
49303
|
var STATE = MathJax._.core.MathItem.STATE;
|
|
49173
49304
|
var Menu = MathJax._.ui.menu.Menu.Menu;
|
package/module/element.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_lodash, _dll_react_dom_server, _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_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.7/module/index.js";
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -72307,6 +72307,52 @@ MmlVisitor$1.MmlVisitor = MmlVisitor;
|
|
|
72307
72307
|
exports.SerializedMmlVisitor = SerializedMmlVisitor;
|
|
72308
72308
|
})(SerializedMmlVisitor);
|
|
72309
72309
|
getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
72310
|
+
var TexError$1 = {};
|
|
72311
|
+
Object.defineProperty(TexError$1, "__esModule", {
|
|
72312
|
+
value: true
|
|
72313
|
+
});
|
|
72314
|
+
var TexError = (function () {
|
|
72315
|
+
function TexError(id, message) {
|
|
72316
|
+
var rest = [];
|
|
72317
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
72318
|
+
rest[_i - 2] = arguments[_i];
|
|
72319
|
+
}
|
|
72320
|
+
this.id = id;
|
|
72321
|
+
this.message = TexError.processString(message, rest);
|
|
72322
|
+
}
|
|
72323
|
+
TexError.processString = function (str, args) {
|
|
72324
|
+
var parts = str.split(TexError.pattern);
|
|
72325
|
+
for (var i = 1, m = parts.length; i < m; i += 2) {
|
|
72326
|
+
var c = parts[i].charAt(0);
|
|
72327
|
+
if (c >= '0' && c <= '9') {
|
|
72328
|
+
parts[i] = args[parseInt(parts[i], 10) - 1];
|
|
72329
|
+
if (typeof parts[i] === 'number') {
|
|
72330
|
+
parts[i] = parts[i].toString();
|
|
72331
|
+
}
|
|
72332
|
+
} else if (c === '{') {
|
|
72333
|
+
c = parts[i].substr(1);
|
|
72334
|
+
if (c >= '0' && c <= '9') {
|
|
72335
|
+
parts[i] = args[parseInt(parts[i].substr(1, parts[i].length - 2), 10) - 1];
|
|
72336
|
+
if (typeof parts[i] === 'number') {
|
|
72337
|
+
parts[i] = parts[i].toString();
|
|
72338
|
+
}
|
|
72339
|
+
} else {
|
|
72340
|
+
var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
|
|
72341
|
+
if (match) {
|
|
72342
|
+
parts[i] = '%' + parts[i];
|
|
72343
|
+
}
|
|
72344
|
+
}
|
|
72345
|
+
}
|
|
72346
|
+
if (parts[i] == null) {
|
|
72347
|
+
parts[i] = '???';
|
|
72348
|
+
}
|
|
72349
|
+
}
|
|
72350
|
+
return parts.join('');
|
|
72351
|
+
};
|
|
72352
|
+
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g;
|
|
72353
|
+
return TexError;
|
|
72354
|
+
})();
|
|
72355
|
+
TexError$1.default = TexError;
|
|
72310
72356
|
(function (exports) {
|
|
72311
72357
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
72312
72358
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -72316,6 +72362,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
72316
72362
|
var _typeof2 = _interopRequireDefault(_typeof$s.exports);
|
|
72317
72363
|
var _normalization = normalization;
|
|
72318
72364
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
72365
|
+
var _TexError = _interopRequireDefault(TexError$1);
|
|
72319
72366
|
var visitor = new _SerializedMmlVisitor.SerializedMmlVisitor();
|
|
72320
72367
|
var toMMl = function toMMl(node) {
|
|
72321
72368
|
return visitor.visitTree(node);
|
|
@@ -72430,10 +72477,77 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
72430
72477
|
});
|
|
72431
72478
|
}
|
|
72432
72479
|
};
|
|
72480
|
+
var convertMathJax2ToMathJax3 = function convertMathJax2ToMathJax3() {
|
|
72481
|
+
var CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
|
|
72482
|
+
var requireMap = MathJax.config.startup.requireMap;
|
|
72483
|
+
var RequireLoad = MathJax._.input.tex.require.RequireConfiguration.RequireLoad;
|
|
72484
|
+
var RequireMethods = {
|
|
72485
|
+
Require: function Require(parser, name) {
|
|
72486
|
+
var required = parser.GetArgument(name);
|
|
72487
|
+
if (required.match(/[^_a-zA-Z0-9]/) || required === "") {
|
|
72488
|
+
throw new _TexError["default"]("BadPackageName", "Argument for %1 is not a valid package name", name);
|
|
72489
|
+
}
|
|
72490
|
+
if (requireMap.hasOwnProperty(required)) {
|
|
72491
|
+
required = requireMap[required];
|
|
72492
|
+
}
|
|
72493
|
+
RequireLoad(parser, required);
|
|
72494
|
+
}
|
|
72495
|
+
};
|
|
72496
|
+
new CommandMap("require", {
|
|
72497
|
+
require: "Require"
|
|
72498
|
+
}, RequireMethods);
|
|
72499
|
+
MathJax.Callback = function (args) {
|
|
72500
|
+
if (Array.isArray(args)) {
|
|
72501
|
+
if (args.length === 1 && typeof args[0] === "function") {
|
|
72502
|
+
return args[0];
|
|
72503
|
+
} else if (typeof args[0] === "string" && args[1] instanceof Object && typeof args[1][args[0]] === "function") {
|
|
72504
|
+
return Function.bind.apply(args[1][args[0]], args.slice(1));
|
|
72505
|
+
} else if (typeof args[0] === "function") {
|
|
72506
|
+
return Function.bind.apply(args[0], [window].concat(args.slice(1)));
|
|
72507
|
+
} else if (typeof args[1] === "function") {
|
|
72508
|
+
return Function.bind.apply(args[1], [args[0]].concat(args.slice(2)));
|
|
72509
|
+
}
|
|
72510
|
+
} else if (typeof args === "function") {
|
|
72511
|
+
return args;
|
|
72512
|
+
}
|
|
72513
|
+
throw Error("Can't make callback from given data");
|
|
72514
|
+
};
|
|
72515
|
+
MathJax.Hub = {
|
|
72516
|
+
Queue: function Queue() {
|
|
72517
|
+
for (var i = 0, m = arguments.length; i < m; i++) {
|
|
72518
|
+
var fn = MathJax.Callback(arguments[i]);
|
|
72519
|
+
MathJax.startup.promise = MathJax.startup.promise.then(fn);
|
|
72520
|
+
}
|
|
72521
|
+
return MathJax.startup.promise;
|
|
72522
|
+
},
|
|
72523
|
+
Typeset: function Typeset(elements, callback) {
|
|
72524
|
+
var promise = MathJax.typesetPromise(elements);
|
|
72525
|
+
if (callback) {
|
|
72526
|
+
promise = promise.then(callback);
|
|
72527
|
+
}
|
|
72528
|
+
return promise;
|
|
72529
|
+
},
|
|
72530
|
+
Register: {
|
|
72531
|
+
MessageHook: function MessageHook() {
|
|
72532
|
+
console.log("MessageHooks are not supported in version 3");
|
|
72533
|
+
},
|
|
72534
|
+
StartupHook: function StartupHook() {
|
|
72535
|
+
console.log("StartupHooks are not supported in version 3");
|
|
72536
|
+
},
|
|
72537
|
+
LoadHook: function LoadHook() {
|
|
72538
|
+
console.log("LoadHooks are not supported in version 3");
|
|
72539
|
+
}
|
|
72540
|
+
},
|
|
72541
|
+
Config: function Config() {
|
|
72542
|
+
console.log("MathJax configurations should be converted for version 3");
|
|
72543
|
+
}
|
|
72544
|
+
};
|
|
72545
|
+
};
|
|
72433
72546
|
var initializeMathJax = function initializeMathJax(callback) {
|
|
72434
72547
|
if (window.mathjaxLoadedP) {
|
|
72435
72548
|
return;
|
|
72436
72549
|
}
|
|
72550
|
+
var PreviousMathJaxIsUsed = window.MathJax && window.MathJax.version && window.MathJax.version !== MathJaxVersion && window.MathJax.version[0] === '2';
|
|
72437
72551
|
var texConfig = {
|
|
72438
72552
|
macros: {
|
|
72439
72553
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
@@ -72443,11 +72557,28 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
72443
72557
|
},
|
|
72444
72558
|
displayMath: [["$$", "$$"], ["\\[", "\\]"]]
|
|
72445
72559
|
};
|
|
72560
|
+
if (PreviousMathJaxIsUsed) {
|
|
72561
|
+
texConfig.autoload = {
|
|
72562
|
+
color: [],
|
|
72563
|
+
colorv2: ["color"]
|
|
72564
|
+
};
|
|
72565
|
+
}
|
|
72446
72566
|
window.mathjaxLoadedP = new Promise(function (resolve) {
|
|
72447
72567
|
window.MathJax = {
|
|
72448
72568
|
startup: {
|
|
72569
|
+
requireMap: PreviousMathJaxIsUsed ? {
|
|
72570
|
+
AMSmath: "ams",
|
|
72571
|
+
AMSsymbols: "ams",
|
|
72572
|
+
AMScd: "amscd",
|
|
72573
|
+
HTML: "html",
|
|
72574
|
+
noErrors: "noerrors",
|
|
72575
|
+
noUndefined: "noundefined"
|
|
72576
|
+
} : {},
|
|
72449
72577
|
typeset: false,
|
|
72450
72578
|
ready: function ready() {
|
|
72579
|
+
if (PreviousMathJaxIsUsed) {
|
|
72580
|
+
convertMathJax2ToMathJax3();
|
|
72581
|
+
}
|
|
72451
72582
|
var mathjax = MathJax._.mathjax.mathjax;
|
|
72452
72583
|
var STATE = MathJax._.core.MathItem.STATE;
|
|
72453
72584
|
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_react_dom, _dll_classnames, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_lodash, _dll_react_dom_server, _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_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.7/module/index.js";
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -72307,6 +72307,52 @@ MmlVisitor$1.MmlVisitor = MmlVisitor;
|
|
|
72307
72307
|
exports.SerializedMmlVisitor = SerializedMmlVisitor;
|
|
72308
72308
|
})(SerializedMmlVisitor);
|
|
72309
72309
|
getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
72310
|
+
var TexError$1 = {};
|
|
72311
|
+
Object.defineProperty(TexError$1, "__esModule", {
|
|
72312
|
+
value: true
|
|
72313
|
+
});
|
|
72314
|
+
var TexError = (function () {
|
|
72315
|
+
function TexError(id, message) {
|
|
72316
|
+
var rest = [];
|
|
72317
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
72318
|
+
rest[_i - 2] = arguments[_i];
|
|
72319
|
+
}
|
|
72320
|
+
this.id = id;
|
|
72321
|
+
this.message = TexError.processString(message, rest);
|
|
72322
|
+
}
|
|
72323
|
+
TexError.processString = function (str, args) {
|
|
72324
|
+
var parts = str.split(TexError.pattern);
|
|
72325
|
+
for (var i = 1, m = parts.length; i < m; i += 2) {
|
|
72326
|
+
var c = parts[i].charAt(0);
|
|
72327
|
+
if (c >= '0' && c <= '9') {
|
|
72328
|
+
parts[i] = args[parseInt(parts[i], 10) - 1];
|
|
72329
|
+
if (typeof parts[i] === 'number') {
|
|
72330
|
+
parts[i] = parts[i].toString();
|
|
72331
|
+
}
|
|
72332
|
+
} else if (c === '{') {
|
|
72333
|
+
c = parts[i].substr(1);
|
|
72334
|
+
if (c >= '0' && c <= '9') {
|
|
72335
|
+
parts[i] = args[parseInt(parts[i].substr(1, parts[i].length - 2), 10) - 1];
|
|
72336
|
+
if (typeof parts[i] === 'number') {
|
|
72337
|
+
parts[i] = parts[i].toString();
|
|
72338
|
+
}
|
|
72339
|
+
} else {
|
|
72340
|
+
var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
|
|
72341
|
+
if (match) {
|
|
72342
|
+
parts[i] = '%' + parts[i];
|
|
72343
|
+
}
|
|
72344
|
+
}
|
|
72345
|
+
}
|
|
72346
|
+
if (parts[i] == null) {
|
|
72347
|
+
parts[i] = '???';
|
|
72348
|
+
}
|
|
72349
|
+
}
|
|
72350
|
+
return parts.join('');
|
|
72351
|
+
};
|
|
72352
|
+
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g;
|
|
72353
|
+
return TexError;
|
|
72354
|
+
})();
|
|
72355
|
+
TexError$1.default = TexError;
|
|
72310
72356
|
(function (exports) {
|
|
72311
72357
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
72312
72358
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -72316,6 +72362,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
72316
72362
|
var _typeof2 = _interopRequireDefault(_typeof$s.exports);
|
|
72317
72363
|
var _normalization = normalization;
|
|
72318
72364
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
72365
|
+
var _TexError = _interopRequireDefault(TexError$1);
|
|
72319
72366
|
var visitor = new _SerializedMmlVisitor.SerializedMmlVisitor();
|
|
72320
72367
|
var toMMl = function toMMl(node) {
|
|
72321
72368
|
return visitor.visitTree(node);
|
|
@@ -72430,10 +72477,77 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
72430
72477
|
});
|
|
72431
72478
|
}
|
|
72432
72479
|
};
|
|
72480
|
+
var convertMathJax2ToMathJax3 = function convertMathJax2ToMathJax3() {
|
|
72481
|
+
var CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
|
|
72482
|
+
var requireMap = MathJax.config.startup.requireMap;
|
|
72483
|
+
var RequireLoad = MathJax._.input.tex.require.RequireConfiguration.RequireLoad;
|
|
72484
|
+
var RequireMethods = {
|
|
72485
|
+
Require: function Require(parser, name) {
|
|
72486
|
+
var required = parser.GetArgument(name);
|
|
72487
|
+
if (required.match(/[^_a-zA-Z0-9]/) || required === "") {
|
|
72488
|
+
throw new _TexError["default"]("BadPackageName", "Argument for %1 is not a valid package name", name);
|
|
72489
|
+
}
|
|
72490
|
+
if (requireMap.hasOwnProperty(required)) {
|
|
72491
|
+
required = requireMap[required];
|
|
72492
|
+
}
|
|
72493
|
+
RequireLoad(parser, required);
|
|
72494
|
+
}
|
|
72495
|
+
};
|
|
72496
|
+
new CommandMap("require", {
|
|
72497
|
+
require: "Require"
|
|
72498
|
+
}, RequireMethods);
|
|
72499
|
+
MathJax.Callback = function (args) {
|
|
72500
|
+
if (Array.isArray(args)) {
|
|
72501
|
+
if (args.length === 1 && typeof args[0] === "function") {
|
|
72502
|
+
return args[0];
|
|
72503
|
+
} else if (typeof args[0] === "string" && args[1] instanceof Object && typeof args[1][args[0]] === "function") {
|
|
72504
|
+
return Function.bind.apply(args[1][args[0]], args.slice(1));
|
|
72505
|
+
} else if (typeof args[0] === "function") {
|
|
72506
|
+
return Function.bind.apply(args[0], [window].concat(args.slice(1)));
|
|
72507
|
+
} else if (typeof args[1] === "function") {
|
|
72508
|
+
return Function.bind.apply(args[1], [args[0]].concat(args.slice(2)));
|
|
72509
|
+
}
|
|
72510
|
+
} else if (typeof args === "function") {
|
|
72511
|
+
return args;
|
|
72512
|
+
}
|
|
72513
|
+
throw Error("Can't make callback from given data");
|
|
72514
|
+
};
|
|
72515
|
+
MathJax.Hub = {
|
|
72516
|
+
Queue: function Queue() {
|
|
72517
|
+
for (var i = 0, m = arguments.length; i < m; i++) {
|
|
72518
|
+
var fn = MathJax.Callback(arguments[i]);
|
|
72519
|
+
MathJax.startup.promise = MathJax.startup.promise.then(fn);
|
|
72520
|
+
}
|
|
72521
|
+
return MathJax.startup.promise;
|
|
72522
|
+
},
|
|
72523
|
+
Typeset: function Typeset(elements, callback) {
|
|
72524
|
+
var promise = MathJax.typesetPromise(elements);
|
|
72525
|
+
if (callback) {
|
|
72526
|
+
promise = promise.then(callback);
|
|
72527
|
+
}
|
|
72528
|
+
return promise;
|
|
72529
|
+
},
|
|
72530
|
+
Register: {
|
|
72531
|
+
MessageHook: function MessageHook() {
|
|
72532
|
+
console.log("MessageHooks are not supported in version 3");
|
|
72533
|
+
},
|
|
72534
|
+
StartupHook: function StartupHook() {
|
|
72535
|
+
console.log("StartupHooks are not supported in version 3");
|
|
72536
|
+
},
|
|
72537
|
+
LoadHook: function LoadHook() {
|
|
72538
|
+
console.log("LoadHooks are not supported in version 3");
|
|
72539
|
+
}
|
|
72540
|
+
},
|
|
72541
|
+
Config: function Config() {
|
|
72542
|
+
console.log("MathJax configurations should be converted for version 3");
|
|
72543
|
+
}
|
|
72544
|
+
};
|
|
72545
|
+
};
|
|
72433
72546
|
var initializeMathJax = function initializeMathJax(callback) {
|
|
72434
72547
|
if (window.mathjaxLoadedP) {
|
|
72435
72548
|
return;
|
|
72436
72549
|
}
|
|
72550
|
+
var PreviousMathJaxIsUsed = window.MathJax && window.MathJax.version && window.MathJax.version !== MathJaxVersion && window.MathJax.version[0] === '2';
|
|
72437
72551
|
var texConfig = {
|
|
72438
72552
|
macros: {
|
|
72439
72553
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
@@ -72443,11 +72557,28 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
72443
72557
|
},
|
|
72444
72558
|
displayMath: [["$$", "$$"], ["\\[", "\\]"]]
|
|
72445
72559
|
};
|
|
72560
|
+
if (PreviousMathJaxIsUsed) {
|
|
72561
|
+
texConfig.autoload = {
|
|
72562
|
+
color: [],
|
|
72563
|
+
colorv2: ["color"]
|
|
72564
|
+
};
|
|
72565
|
+
}
|
|
72446
72566
|
window.mathjaxLoadedP = new Promise(function (resolve) {
|
|
72447
72567
|
window.MathJax = {
|
|
72448
72568
|
startup: {
|
|
72569
|
+
requireMap: PreviousMathJaxIsUsed ? {
|
|
72570
|
+
AMSmath: "ams",
|
|
72571
|
+
AMSsymbols: "ams",
|
|
72572
|
+
AMScd: "amscd",
|
|
72573
|
+
HTML: "html",
|
|
72574
|
+
noErrors: "noerrors",
|
|
72575
|
+
noUndefined: "noundefined"
|
|
72576
|
+
} : {},
|
|
72449
72577
|
typeset: false,
|
|
72450
72578
|
ready: function ready() {
|
|
72579
|
+
if (PreviousMathJaxIsUsed) {
|
|
72580
|
+
convertMathJax2ToMathJax3();
|
|
72581
|
+
}
|
|
72451
72582
|
var mathjax = MathJax._.mathjax.mathjax;
|
|
72452
72583
|
var STATE = MathJax._.core.MathItem.STATE;
|
|
72453
72584
|
var Menu = MathJax._.ui.menu.Menu.Menu;
|
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": "3.1.2-next.
|
|
4
|
+
"version": "3.1.2-next.31+021ff6e7c",
|
|
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": "^4.1.2-next.
|
|
11
|
-
"@pie-element/rubric": "^4.1.2-next.
|
|
10
|
+
"@pie-element/multi-trait-rubric": "^4.1.2-next.31+021ff6e7c",
|
|
11
|
+
"@pie-element/rubric": "^4.1.2-next.31+021ff6e7c",
|
|
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": "
|
|
18
|
+
"gitHead": "021ff6e7c7eb5b16a8b1239730c480fc09d58e5e",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"postpublish": "../../scripts/postpublish"
|
|
21
21
|
},
|