@pie-element/complex-rubric 3.1.2 → 3.1.3-next.21
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/index.html +1 -1
- package/module/manifest.json +2 -2
- package/module/print.html +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.11/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_pie_lib__pie_toolbox_math_rendering_accessible, _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_pie_lib__pie_toolbox_math_rendering_accessible, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.11/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) {
|
|
@@ -72313,6 +72313,52 @@ MmlVisitor$1.MmlVisitor = MmlVisitor;
|
|
|
72313
72313
|
exports.SerializedMmlVisitor = SerializedMmlVisitor;
|
|
72314
72314
|
})(SerializedMmlVisitor);
|
|
72315
72315
|
getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
72316
|
+
var TexError$1 = {};
|
|
72317
|
+
Object.defineProperty(TexError$1, "__esModule", {
|
|
72318
|
+
value: true
|
|
72319
|
+
});
|
|
72320
|
+
var TexError = (function () {
|
|
72321
|
+
function TexError(id, message) {
|
|
72322
|
+
var rest = [];
|
|
72323
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
72324
|
+
rest[_i - 2] = arguments[_i];
|
|
72325
|
+
}
|
|
72326
|
+
this.id = id;
|
|
72327
|
+
this.message = TexError.processString(message, rest);
|
|
72328
|
+
}
|
|
72329
|
+
TexError.processString = function (str, args) {
|
|
72330
|
+
var parts = str.split(TexError.pattern);
|
|
72331
|
+
for (var i = 1, m = parts.length; i < m; i += 2) {
|
|
72332
|
+
var c = parts[i].charAt(0);
|
|
72333
|
+
if (c >= '0' && c <= '9') {
|
|
72334
|
+
parts[i] = args[parseInt(parts[i], 10) - 1];
|
|
72335
|
+
if (typeof parts[i] === 'number') {
|
|
72336
|
+
parts[i] = parts[i].toString();
|
|
72337
|
+
}
|
|
72338
|
+
} else if (c === '{') {
|
|
72339
|
+
c = parts[i].substr(1);
|
|
72340
|
+
if (c >= '0' && c <= '9') {
|
|
72341
|
+
parts[i] = args[parseInt(parts[i].substr(1, parts[i].length - 2), 10) - 1];
|
|
72342
|
+
if (typeof parts[i] === 'number') {
|
|
72343
|
+
parts[i] = parts[i].toString();
|
|
72344
|
+
}
|
|
72345
|
+
} else {
|
|
72346
|
+
var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
|
|
72347
|
+
if (match) {
|
|
72348
|
+
parts[i] = '%' + parts[i];
|
|
72349
|
+
}
|
|
72350
|
+
}
|
|
72351
|
+
}
|
|
72352
|
+
if (parts[i] == null) {
|
|
72353
|
+
parts[i] = '???';
|
|
72354
|
+
}
|
|
72355
|
+
}
|
|
72356
|
+
return parts.join('');
|
|
72357
|
+
};
|
|
72358
|
+
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g;
|
|
72359
|
+
return TexError;
|
|
72360
|
+
})();
|
|
72361
|
+
TexError$1.default = TexError;
|
|
72316
72362
|
(function (exports) {
|
|
72317
72363
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
72318
72364
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -72322,6 +72368,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
72322
72368
|
var _typeof2 = _interopRequireDefault(_typeof$s.exports);
|
|
72323
72369
|
var _normalization = normalization;
|
|
72324
72370
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
72371
|
+
var _TexError = _interopRequireDefault(TexError$1);
|
|
72325
72372
|
var visitor = new _SerializedMmlVisitor.SerializedMmlVisitor();
|
|
72326
72373
|
var toMMl = function toMMl(node) {
|
|
72327
72374
|
return visitor.visitTree(node);
|
|
@@ -72436,10 +72483,77 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
72436
72483
|
});
|
|
72437
72484
|
}
|
|
72438
72485
|
};
|
|
72486
|
+
var convertMathJax2ToMathJax3 = function convertMathJax2ToMathJax3() {
|
|
72487
|
+
var CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
|
|
72488
|
+
var requireMap = MathJax.config.startup.requireMap;
|
|
72489
|
+
var RequireLoad = MathJax._.input.tex.require.RequireConfiguration.RequireLoad;
|
|
72490
|
+
var RequireMethods = {
|
|
72491
|
+
Require: function Require(parser, name) {
|
|
72492
|
+
var required = parser.GetArgument(name);
|
|
72493
|
+
if (required.match(/[^_a-zA-Z0-9]/) || required === "") {
|
|
72494
|
+
throw new _TexError["default"]("BadPackageName", "Argument for %1 is not a valid package name", name);
|
|
72495
|
+
}
|
|
72496
|
+
if (requireMap.hasOwnProperty(required)) {
|
|
72497
|
+
required = requireMap[required];
|
|
72498
|
+
}
|
|
72499
|
+
RequireLoad(parser, required);
|
|
72500
|
+
}
|
|
72501
|
+
};
|
|
72502
|
+
new CommandMap("require", {
|
|
72503
|
+
require: "Require"
|
|
72504
|
+
}, RequireMethods);
|
|
72505
|
+
MathJax.Callback = function (args) {
|
|
72506
|
+
if (Array.isArray(args)) {
|
|
72507
|
+
if (args.length === 1 && typeof args[0] === "function") {
|
|
72508
|
+
return args[0];
|
|
72509
|
+
} else if (typeof args[0] === "string" && args[1] instanceof Object && typeof args[1][args[0]] === "function") {
|
|
72510
|
+
return Function.bind.apply(args[1][args[0]], args.slice(1));
|
|
72511
|
+
} else if (typeof args[0] === "function") {
|
|
72512
|
+
return Function.bind.apply(args[0], [window].concat(args.slice(1)));
|
|
72513
|
+
} else if (typeof args[1] === "function") {
|
|
72514
|
+
return Function.bind.apply(args[1], [args[0]].concat(args.slice(2)));
|
|
72515
|
+
}
|
|
72516
|
+
} else if (typeof args === "function") {
|
|
72517
|
+
return args;
|
|
72518
|
+
}
|
|
72519
|
+
throw Error("Can't make callback from given data");
|
|
72520
|
+
};
|
|
72521
|
+
MathJax.Hub = {
|
|
72522
|
+
Queue: function Queue() {
|
|
72523
|
+
for (var i = 0, m = arguments.length; i < m; i++) {
|
|
72524
|
+
var fn = MathJax.Callback(arguments[i]);
|
|
72525
|
+
MathJax.startup.promise = MathJax.startup.promise.then(fn);
|
|
72526
|
+
}
|
|
72527
|
+
return MathJax.startup.promise;
|
|
72528
|
+
},
|
|
72529
|
+
Typeset: function Typeset(elements, callback) {
|
|
72530
|
+
var promise = MathJax.typesetPromise(elements);
|
|
72531
|
+
if (callback) {
|
|
72532
|
+
promise = promise.then(callback);
|
|
72533
|
+
}
|
|
72534
|
+
return promise;
|
|
72535
|
+
},
|
|
72536
|
+
Register: {
|
|
72537
|
+
MessageHook: function MessageHook() {
|
|
72538
|
+
console.log("MessageHooks are not supported in version 3");
|
|
72539
|
+
},
|
|
72540
|
+
StartupHook: function StartupHook() {
|
|
72541
|
+
console.log("StartupHooks are not supported in version 3");
|
|
72542
|
+
},
|
|
72543
|
+
LoadHook: function LoadHook() {
|
|
72544
|
+
console.log("LoadHooks are not supported in version 3");
|
|
72545
|
+
}
|
|
72546
|
+
},
|
|
72547
|
+
Config: function Config() {
|
|
72548
|
+
console.log("MathJax configurations should be converted for version 3");
|
|
72549
|
+
}
|
|
72550
|
+
};
|
|
72551
|
+
};
|
|
72439
72552
|
var initializeMathJax = function initializeMathJax(callback) {
|
|
72440
72553
|
if (window.mathjaxLoadedP) {
|
|
72441
72554
|
return;
|
|
72442
72555
|
}
|
|
72556
|
+
var PreviousMathJaxIsUsed = window.MathJax && window.MathJax.version && window.MathJax.version !== MathJaxVersion && window.MathJax.version[0] === '2';
|
|
72443
72557
|
var texConfig = {
|
|
72444
72558
|
macros: {
|
|
72445
72559
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
@@ -72449,11 +72563,28 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
72449
72563
|
},
|
|
72450
72564
|
displayMath: [["$$", "$$"], ["\\[", "\\]"]]
|
|
72451
72565
|
};
|
|
72566
|
+
if (PreviousMathJaxIsUsed) {
|
|
72567
|
+
texConfig.autoload = {
|
|
72568
|
+
color: [],
|
|
72569
|
+
colorv2: ["color"]
|
|
72570
|
+
};
|
|
72571
|
+
}
|
|
72452
72572
|
window.mathjaxLoadedP = new Promise(function (resolve) {
|
|
72453
72573
|
window.MathJax = {
|
|
72454
72574
|
startup: {
|
|
72575
|
+
requireMap: PreviousMathJaxIsUsed ? {
|
|
72576
|
+
AMSmath: "ams",
|
|
72577
|
+
AMSsymbols: "ams",
|
|
72578
|
+
AMScd: "amscd",
|
|
72579
|
+
HTML: "html",
|
|
72580
|
+
noErrors: "noerrors",
|
|
72581
|
+
noUndefined: "noundefined"
|
|
72582
|
+
} : {},
|
|
72455
72583
|
typeset: false,
|
|
72456
72584
|
ready: function ready() {
|
|
72585
|
+
if (PreviousMathJaxIsUsed) {
|
|
72586
|
+
convertMathJax2ToMathJax3();
|
|
72587
|
+
}
|
|
72457
72588
|
var mathjax = MathJax._.mathjax.mathjax;
|
|
72458
72589
|
var STATE = MathJax._.core.MathItem.STATE;
|
|
72459
72590
|
var Menu = MathJax._.ui.menu.Menu.Menu;
|
package/module/index.html
CHANGED
package/module/manifest.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/complex-rubric",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"modules": [
|
|
5
5
|
{
|
|
6
6
|
"name": "@pie-lib/pie-toolbox-math-rendering-module",
|
|
7
|
-
"version": "2.0.
|
|
7
|
+
"version": "2.0.11"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"name": "@pie-lib/pie-toolbox-module",
|
package/module/print.html
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_pie_lib__pie_toolbox_math_rendering_accessible, _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_pie_lib__pie_toolbox_math_rendering_accessible, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.11/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) {
|
|
@@ -72313,6 +72313,52 @@ MmlVisitor$1.MmlVisitor = MmlVisitor;
|
|
|
72313
72313
|
exports.SerializedMmlVisitor = SerializedMmlVisitor;
|
|
72314
72314
|
})(SerializedMmlVisitor);
|
|
72315
72315
|
getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
72316
|
+
var TexError$1 = {};
|
|
72317
|
+
Object.defineProperty(TexError$1, "__esModule", {
|
|
72318
|
+
value: true
|
|
72319
|
+
});
|
|
72320
|
+
var TexError = (function () {
|
|
72321
|
+
function TexError(id, message) {
|
|
72322
|
+
var rest = [];
|
|
72323
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
72324
|
+
rest[_i - 2] = arguments[_i];
|
|
72325
|
+
}
|
|
72326
|
+
this.id = id;
|
|
72327
|
+
this.message = TexError.processString(message, rest);
|
|
72328
|
+
}
|
|
72329
|
+
TexError.processString = function (str, args) {
|
|
72330
|
+
var parts = str.split(TexError.pattern);
|
|
72331
|
+
for (var i = 1, m = parts.length; i < m; i += 2) {
|
|
72332
|
+
var c = parts[i].charAt(0);
|
|
72333
|
+
if (c >= '0' && c <= '9') {
|
|
72334
|
+
parts[i] = args[parseInt(parts[i], 10) - 1];
|
|
72335
|
+
if (typeof parts[i] === 'number') {
|
|
72336
|
+
parts[i] = parts[i].toString();
|
|
72337
|
+
}
|
|
72338
|
+
} else if (c === '{') {
|
|
72339
|
+
c = parts[i].substr(1);
|
|
72340
|
+
if (c >= '0' && c <= '9') {
|
|
72341
|
+
parts[i] = args[parseInt(parts[i].substr(1, parts[i].length - 2), 10) - 1];
|
|
72342
|
+
if (typeof parts[i] === 'number') {
|
|
72343
|
+
parts[i] = parts[i].toString();
|
|
72344
|
+
}
|
|
72345
|
+
} else {
|
|
72346
|
+
var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
|
|
72347
|
+
if (match) {
|
|
72348
|
+
parts[i] = '%' + parts[i];
|
|
72349
|
+
}
|
|
72350
|
+
}
|
|
72351
|
+
}
|
|
72352
|
+
if (parts[i] == null) {
|
|
72353
|
+
parts[i] = '???';
|
|
72354
|
+
}
|
|
72355
|
+
}
|
|
72356
|
+
return parts.join('');
|
|
72357
|
+
};
|
|
72358
|
+
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g;
|
|
72359
|
+
return TexError;
|
|
72360
|
+
})();
|
|
72361
|
+
TexError$1.default = TexError;
|
|
72316
72362
|
(function (exports) {
|
|
72317
72363
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
72318
72364
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -72322,6 +72368,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
72322
72368
|
var _typeof2 = _interopRequireDefault(_typeof$s.exports);
|
|
72323
72369
|
var _normalization = normalization;
|
|
72324
72370
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
72371
|
+
var _TexError = _interopRequireDefault(TexError$1);
|
|
72325
72372
|
var visitor = new _SerializedMmlVisitor.SerializedMmlVisitor();
|
|
72326
72373
|
var toMMl = function toMMl(node) {
|
|
72327
72374
|
return visitor.visitTree(node);
|
|
@@ -72436,10 +72483,77 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
72436
72483
|
});
|
|
72437
72484
|
}
|
|
72438
72485
|
};
|
|
72486
|
+
var convertMathJax2ToMathJax3 = function convertMathJax2ToMathJax3() {
|
|
72487
|
+
var CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
|
|
72488
|
+
var requireMap = MathJax.config.startup.requireMap;
|
|
72489
|
+
var RequireLoad = MathJax._.input.tex.require.RequireConfiguration.RequireLoad;
|
|
72490
|
+
var RequireMethods = {
|
|
72491
|
+
Require: function Require(parser, name) {
|
|
72492
|
+
var required = parser.GetArgument(name);
|
|
72493
|
+
if (required.match(/[^_a-zA-Z0-9]/) || required === "") {
|
|
72494
|
+
throw new _TexError["default"]("BadPackageName", "Argument for %1 is not a valid package name", name);
|
|
72495
|
+
}
|
|
72496
|
+
if (requireMap.hasOwnProperty(required)) {
|
|
72497
|
+
required = requireMap[required];
|
|
72498
|
+
}
|
|
72499
|
+
RequireLoad(parser, required);
|
|
72500
|
+
}
|
|
72501
|
+
};
|
|
72502
|
+
new CommandMap("require", {
|
|
72503
|
+
require: "Require"
|
|
72504
|
+
}, RequireMethods);
|
|
72505
|
+
MathJax.Callback = function (args) {
|
|
72506
|
+
if (Array.isArray(args)) {
|
|
72507
|
+
if (args.length === 1 && typeof args[0] === "function") {
|
|
72508
|
+
return args[0];
|
|
72509
|
+
} else if (typeof args[0] === "string" && args[1] instanceof Object && typeof args[1][args[0]] === "function") {
|
|
72510
|
+
return Function.bind.apply(args[1][args[0]], args.slice(1));
|
|
72511
|
+
} else if (typeof args[0] === "function") {
|
|
72512
|
+
return Function.bind.apply(args[0], [window].concat(args.slice(1)));
|
|
72513
|
+
} else if (typeof args[1] === "function") {
|
|
72514
|
+
return Function.bind.apply(args[1], [args[0]].concat(args.slice(2)));
|
|
72515
|
+
}
|
|
72516
|
+
} else if (typeof args === "function") {
|
|
72517
|
+
return args;
|
|
72518
|
+
}
|
|
72519
|
+
throw Error("Can't make callback from given data");
|
|
72520
|
+
};
|
|
72521
|
+
MathJax.Hub = {
|
|
72522
|
+
Queue: function Queue() {
|
|
72523
|
+
for (var i = 0, m = arguments.length; i < m; i++) {
|
|
72524
|
+
var fn = MathJax.Callback(arguments[i]);
|
|
72525
|
+
MathJax.startup.promise = MathJax.startup.promise.then(fn);
|
|
72526
|
+
}
|
|
72527
|
+
return MathJax.startup.promise;
|
|
72528
|
+
},
|
|
72529
|
+
Typeset: function Typeset(elements, callback) {
|
|
72530
|
+
var promise = MathJax.typesetPromise(elements);
|
|
72531
|
+
if (callback) {
|
|
72532
|
+
promise = promise.then(callback);
|
|
72533
|
+
}
|
|
72534
|
+
return promise;
|
|
72535
|
+
},
|
|
72536
|
+
Register: {
|
|
72537
|
+
MessageHook: function MessageHook() {
|
|
72538
|
+
console.log("MessageHooks are not supported in version 3");
|
|
72539
|
+
},
|
|
72540
|
+
StartupHook: function StartupHook() {
|
|
72541
|
+
console.log("StartupHooks are not supported in version 3");
|
|
72542
|
+
},
|
|
72543
|
+
LoadHook: function LoadHook() {
|
|
72544
|
+
console.log("LoadHooks are not supported in version 3");
|
|
72545
|
+
}
|
|
72546
|
+
},
|
|
72547
|
+
Config: function Config() {
|
|
72548
|
+
console.log("MathJax configurations should be converted for version 3");
|
|
72549
|
+
}
|
|
72550
|
+
};
|
|
72551
|
+
};
|
|
72439
72552
|
var initializeMathJax = function initializeMathJax(callback) {
|
|
72440
72553
|
if (window.mathjaxLoadedP) {
|
|
72441
72554
|
return;
|
|
72442
72555
|
}
|
|
72556
|
+
var PreviousMathJaxIsUsed = window.MathJax && window.MathJax.version && window.MathJax.version !== MathJaxVersion && window.MathJax.version[0] === '2';
|
|
72443
72557
|
var texConfig = {
|
|
72444
72558
|
macros: {
|
|
72445
72559
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
@@ -72449,11 +72563,28 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
|
|
|
72449
72563
|
},
|
|
72450
72564
|
displayMath: [["$$", "$$"], ["\\[", "\\]"]]
|
|
72451
72565
|
};
|
|
72566
|
+
if (PreviousMathJaxIsUsed) {
|
|
72567
|
+
texConfig.autoload = {
|
|
72568
|
+
color: [],
|
|
72569
|
+
colorv2: ["color"]
|
|
72570
|
+
};
|
|
72571
|
+
}
|
|
72452
72572
|
window.mathjaxLoadedP = new Promise(function (resolve) {
|
|
72453
72573
|
window.MathJax = {
|
|
72454
72574
|
startup: {
|
|
72575
|
+
requireMap: PreviousMathJaxIsUsed ? {
|
|
72576
|
+
AMSmath: "ams",
|
|
72577
|
+
AMSsymbols: "ams",
|
|
72578
|
+
AMScd: "amscd",
|
|
72579
|
+
HTML: "html",
|
|
72580
|
+
noErrors: "noerrors",
|
|
72581
|
+
noUndefined: "noundefined"
|
|
72582
|
+
} : {},
|
|
72455
72583
|
typeset: false,
|
|
72456
72584
|
ready: function ready() {
|
|
72585
|
+
if (PreviousMathJaxIsUsed) {
|
|
72586
|
+
convertMathJax2ToMathJax3();
|
|
72587
|
+
}
|
|
72457
72588
|
var mathjax = MathJax._.mathjax.mathjax;
|
|
72458
72589
|
var STATE = MathJax._.core.MathItem.STATE;
|
|
72459
72590
|
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.
|
|
4
|
+
"version": "3.1.3-next.21+420be5bce",
|
|
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.
|
|
11
|
-
"@pie-element/rubric": "^4.1.
|
|
10
|
+
"@pie-element/multi-trait-rubric": "^4.1.3-next.21+420be5bce",
|
|
11
|
+
"@pie-element/rubric": "^4.1.3-next.21+420be5bce",
|
|
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": "420be5bce4ed0b09964ebd009aaf9d680afde1fa",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"postpublish": "../../scripts/postpublish"
|
|
21
21
|
},
|