@pie-element/explicit-constructed-response 7.1.2-next.29 → 7.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.
@@ -8,7 +8,7 @@
8
8
  "@material-ui/core": "^3.9.2",
9
9
  "@material-ui/icons": "^3.0.1",
10
10
  "@pie-framework/pie-configure-events": "^1.3.0",
11
- "@pie-lib/pie-toolbox": "2.0.11",
11
+ "@pie-lib/pie-toolbox": "2.0.12",
12
12
  "classnames": "^2.2.6",
13
13
  "debug": "^3.1.0",
14
14
  "lodash": "^4.17.15",
@@ -8,7 +8,7 @@
8
8
  "author": "",
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
- "@pie-lib/pie-toolbox": "2.0.11",
11
+ "@pie-lib/pie-toolbox": "2.0.12",
12
12
  "debug": "^3.1.0",
13
13
  "lodash": "^4.17.15",
14
14
  "type-of": "^2.0.1"
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.9/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.10/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui} 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) {
package/module/element.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_react_dom, _dll_classnames, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.9/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_react_dom, _dll_classnames, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.10/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} 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) {
@@ -26171,6 +26171,52 @@ MmlVisitor$1.MmlVisitor = MmlVisitor;
26171
26171
  exports.SerializedMmlVisitor = SerializedMmlVisitor;
26172
26172
  })(SerializedMmlVisitor);
26173
26173
  getDefaultExportFromCjs(SerializedMmlVisitor);
26174
+ var TexError$1 = {};
26175
+ Object.defineProperty(TexError$1, "__esModule", {
26176
+ value: true
26177
+ });
26178
+ var TexError = (function () {
26179
+ function TexError(id, message) {
26180
+ var rest = [];
26181
+ for (var _i = 2; _i < arguments.length; _i++) {
26182
+ rest[_i - 2] = arguments[_i];
26183
+ }
26184
+ this.id = id;
26185
+ this.message = TexError.processString(message, rest);
26186
+ }
26187
+ TexError.processString = function (str, args) {
26188
+ var parts = str.split(TexError.pattern);
26189
+ for (var i = 1, m = parts.length; i < m; i += 2) {
26190
+ var c = parts[i].charAt(0);
26191
+ if (c >= '0' && c <= '9') {
26192
+ parts[i] = args[parseInt(parts[i], 10) - 1];
26193
+ if (typeof parts[i] === 'number') {
26194
+ parts[i] = parts[i].toString();
26195
+ }
26196
+ } else if (c === '{') {
26197
+ c = parts[i].substr(1);
26198
+ if (c >= '0' && c <= '9') {
26199
+ parts[i] = args[parseInt(parts[i].substr(1, parts[i].length - 2), 10) - 1];
26200
+ if (typeof parts[i] === 'number') {
26201
+ parts[i] = parts[i].toString();
26202
+ }
26203
+ } else {
26204
+ var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
26205
+ if (match) {
26206
+ parts[i] = '%' + parts[i];
26207
+ }
26208
+ }
26209
+ }
26210
+ if (parts[i] == null) {
26211
+ parts[i] = '???';
26212
+ }
26213
+ }
26214
+ return parts.join('');
26215
+ };
26216
+ TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g;
26217
+ return TexError;
26218
+ })();
26219
+ TexError$1.default = TexError;
26174
26220
  (function (exports) {
26175
26221
  var _interopRequireDefault = interopRequireDefault.exports;
26176
26222
  Object.defineProperty(exports, "__esModule", {
@@ -26180,6 +26226,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
26180
26226
  var _typeof2 = _interopRequireDefault(_typeof$d.exports);
26181
26227
  var _normalization = normalization;
26182
26228
  var _SerializedMmlVisitor = SerializedMmlVisitor;
26229
+ var _TexError = _interopRequireDefault(TexError$1);
26183
26230
  var visitor = new _SerializedMmlVisitor.SerializedMmlVisitor();
26184
26231
  var toMMl = function toMMl(node) {
26185
26232
  return visitor.visitTree(node);
@@ -26294,10 +26341,77 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
26294
26341
  });
26295
26342
  }
26296
26343
  };
26344
+ var convertMathJax2ToMathJax3 = function convertMathJax2ToMathJax3() {
26345
+ var CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
26346
+ var requireMap = MathJax.config.startup.requireMap;
26347
+ var RequireLoad = MathJax._.input.tex.require.RequireConfiguration.RequireLoad;
26348
+ var RequireMethods = {
26349
+ Require: function Require(parser, name) {
26350
+ var required = parser.GetArgument(name);
26351
+ if (required.match(/[^_a-zA-Z0-9]/) || required === "") {
26352
+ throw new _TexError["default"]("BadPackageName", "Argument for %1 is not a valid package name", name);
26353
+ }
26354
+ if (requireMap.hasOwnProperty(required)) {
26355
+ required = requireMap[required];
26356
+ }
26357
+ RequireLoad(parser, required);
26358
+ }
26359
+ };
26360
+ new CommandMap("require", {
26361
+ require: "Require"
26362
+ }, RequireMethods);
26363
+ MathJax.Callback = function (args) {
26364
+ if (Array.isArray(args)) {
26365
+ if (args.length === 1 && typeof args[0] === "function") {
26366
+ return args[0];
26367
+ } else if (typeof args[0] === "string" && args[1] instanceof Object && typeof args[1][args[0]] === "function") {
26368
+ return Function.bind.apply(args[1][args[0]], args.slice(1));
26369
+ } else if (typeof args[0] === "function") {
26370
+ return Function.bind.apply(args[0], [window].concat(args.slice(1)));
26371
+ } else if (typeof args[1] === "function") {
26372
+ return Function.bind.apply(args[1], [args[0]].concat(args.slice(2)));
26373
+ }
26374
+ } else if (typeof args === "function") {
26375
+ return args;
26376
+ }
26377
+ throw Error("Can't make callback from given data");
26378
+ };
26379
+ MathJax.Hub = {
26380
+ Queue: function Queue() {
26381
+ for (var i = 0, m = arguments.length; i < m; i++) {
26382
+ var fn = MathJax.Callback(arguments[i]);
26383
+ MathJax.startup.promise = MathJax.startup.promise.then(fn);
26384
+ }
26385
+ return MathJax.startup.promise;
26386
+ },
26387
+ Typeset: function Typeset(elements, callback) {
26388
+ var promise = MathJax.typesetPromise(elements);
26389
+ if (callback) {
26390
+ promise = promise.then(callback);
26391
+ }
26392
+ return promise;
26393
+ },
26394
+ Register: {
26395
+ MessageHook: function MessageHook() {
26396
+ console.log("MessageHooks are not supported in version 3");
26397
+ },
26398
+ StartupHook: function StartupHook() {
26399
+ console.log("StartupHooks are not supported in version 3");
26400
+ },
26401
+ LoadHook: function LoadHook() {
26402
+ console.log("LoadHooks are not supported in version 3");
26403
+ }
26404
+ },
26405
+ Config: function Config() {
26406
+ console.log("MathJax configurations should be converted for version 3");
26407
+ }
26408
+ };
26409
+ };
26297
26410
  var initializeMathJax = function initializeMathJax(callback) {
26298
26411
  if (window.mathjaxLoadedP) {
26299
26412
  return;
26300
26413
  }
26414
+ var PreviousMathJaxIsUsed = window.MathJax && window.MathJax.version && window.MathJax.version !== MathJaxVersion && window.MathJax.version[0] === '2';
26301
26415
  var texConfig = {
26302
26416
  macros: {
26303
26417
  parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
@@ -26307,11 +26421,28 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
26307
26421
  },
26308
26422
  displayMath: [["$$", "$$"], ["\\[", "\\]"]]
26309
26423
  };
26424
+ if (PreviousMathJaxIsUsed) {
26425
+ texConfig.autoload = {
26426
+ color: [],
26427
+ colorv2: ["color"]
26428
+ };
26429
+ }
26310
26430
  window.mathjaxLoadedP = new Promise(function (resolve) {
26311
26431
  window.MathJax = {
26312
26432
  startup: {
26433
+ requireMap: PreviousMathJaxIsUsed ? {
26434
+ AMSmath: "ams",
26435
+ AMSsymbols: "ams",
26436
+ AMScd: "amscd",
26437
+ HTML: "html",
26438
+ noErrors: "noerrors",
26439
+ noUndefined: "noundefined"
26440
+ } : {},
26313
26441
  typeset: false,
26314
26442
  ready: function ready() {
26443
+ if (PreviousMathJaxIsUsed) {
26444
+ convertMathJax2ToMathJax3();
26445
+ }
26315
26446
  var mathjax = MathJax._.mathjax.mathjax;
26316
26447
  var STATE = MathJax._.core.MathItem.STATE;
26317
26448
  var Menu = MathJax._.ui.menu.Menu.Menu;
@@ -4,7 +4,7 @@
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "2.0.9"
7
+ "version": "2.0.10"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
package/module/print.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_react_dom, _dll_classnames, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.9/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_react_dom, _dll_classnames, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.10/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} 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) {
@@ -26134,6 +26134,52 @@ MmlVisitor$1.MmlVisitor = MmlVisitor;
26134
26134
  exports.SerializedMmlVisitor = SerializedMmlVisitor;
26135
26135
  })(SerializedMmlVisitor);
26136
26136
  getDefaultExportFromCjs(SerializedMmlVisitor);
26137
+ var TexError$1 = {};
26138
+ Object.defineProperty(TexError$1, "__esModule", {
26139
+ value: true
26140
+ });
26141
+ var TexError = (function () {
26142
+ function TexError(id, message) {
26143
+ var rest = [];
26144
+ for (var _i = 2; _i < arguments.length; _i++) {
26145
+ rest[_i - 2] = arguments[_i];
26146
+ }
26147
+ this.id = id;
26148
+ this.message = TexError.processString(message, rest);
26149
+ }
26150
+ TexError.processString = function (str, args) {
26151
+ var parts = str.split(TexError.pattern);
26152
+ for (var i = 1, m = parts.length; i < m; i += 2) {
26153
+ var c = parts[i].charAt(0);
26154
+ if (c >= '0' && c <= '9') {
26155
+ parts[i] = args[parseInt(parts[i], 10) - 1];
26156
+ if (typeof parts[i] === 'number') {
26157
+ parts[i] = parts[i].toString();
26158
+ }
26159
+ } else if (c === '{') {
26160
+ c = parts[i].substr(1);
26161
+ if (c >= '0' && c <= '9') {
26162
+ parts[i] = args[parseInt(parts[i].substr(1, parts[i].length - 2), 10) - 1];
26163
+ if (typeof parts[i] === 'number') {
26164
+ parts[i] = parts[i].toString();
26165
+ }
26166
+ } else {
26167
+ var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
26168
+ if (match) {
26169
+ parts[i] = '%' + parts[i];
26170
+ }
26171
+ }
26172
+ }
26173
+ if (parts[i] == null) {
26174
+ parts[i] = '???';
26175
+ }
26176
+ }
26177
+ return parts.join('');
26178
+ };
26179
+ TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g;
26180
+ return TexError;
26181
+ })();
26182
+ TexError$1.default = TexError;
26137
26183
  (function (exports) {
26138
26184
  var _interopRequireDefault = interopRequireDefault.exports;
26139
26185
  Object.defineProperty(exports, "__esModule", {
@@ -26143,6 +26189,7 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
26143
26189
  var _typeof2 = _interopRequireDefault(_typeof$d.exports);
26144
26190
  var _normalization = normalization;
26145
26191
  var _SerializedMmlVisitor = SerializedMmlVisitor;
26192
+ var _TexError = _interopRequireDefault(TexError$1);
26146
26193
  var visitor = new _SerializedMmlVisitor.SerializedMmlVisitor();
26147
26194
  var toMMl = function toMMl(node) {
26148
26195
  return visitor.visitTree(node);
@@ -26257,10 +26304,77 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
26257
26304
  });
26258
26305
  }
26259
26306
  };
26307
+ var convertMathJax2ToMathJax3 = function convertMathJax2ToMathJax3() {
26308
+ var CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
26309
+ var requireMap = MathJax.config.startup.requireMap;
26310
+ var RequireLoad = MathJax._.input.tex.require.RequireConfiguration.RequireLoad;
26311
+ var RequireMethods = {
26312
+ Require: function Require(parser, name) {
26313
+ var required = parser.GetArgument(name);
26314
+ if (required.match(/[^_a-zA-Z0-9]/) || required === "") {
26315
+ throw new _TexError["default"]("BadPackageName", "Argument for %1 is not a valid package name", name);
26316
+ }
26317
+ if (requireMap.hasOwnProperty(required)) {
26318
+ required = requireMap[required];
26319
+ }
26320
+ RequireLoad(parser, required);
26321
+ }
26322
+ };
26323
+ new CommandMap("require", {
26324
+ require: "Require"
26325
+ }, RequireMethods);
26326
+ MathJax.Callback = function (args) {
26327
+ if (Array.isArray(args)) {
26328
+ if (args.length === 1 && typeof args[0] === "function") {
26329
+ return args[0];
26330
+ } else if (typeof args[0] === "string" && args[1] instanceof Object && typeof args[1][args[0]] === "function") {
26331
+ return Function.bind.apply(args[1][args[0]], args.slice(1));
26332
+ } else if (typeof args[0] === "function") {
26333
+ return Function.bind.apply(args[0], [window].concat(args.slice(1)));
26334
+ } else if (typeof args[1] === "function") {
26335
+ return Function.bind.apply(args[1], [args[0]].concat(args.slice(2)));
26336
+ }
26337
+ } else if (typeof args === "function") {
26338
+ return args;
26339
+ }
26340
+ throw Error("Can't make callback from given data");
26341
+ };
26342
+ MathJax.Hub = {
26343
+ Queue: function Queue() {
26344
+ for (var i = 0, m = arguments.length; i < m; i++) {
26345
+ var fn = MathJax.Callback(arguments[i]);
26346
+ MathJax.startup.promise = MathJax.startup.promise.then(fn);
26347
+ }
26348
+ return MathJax.startup.promise;
26349
+ },
26350
+ Typeset: function Typeset(elements, callback) {
26351
+ var promise = MathJax.typesetPromise(elements);
26352
+ if (callback) {
26353
+ promise = promise.then(callback);
26354
+ }
26355
+ return promise;
26356
+ },
26357
+ Register: {
26358
+ MessageHook: function MessageHook() {
26359
+ console.log("MessageHooks are not supported in version 3");
26360
+ },
26361
+ StartupHook: function StartupHook() {
26362
+ console.log("StartupHooks are not supported in version 3");
26363
+ },
26364
+ LoadHook: function LoadHook() {
26365
+ console.log("LoadHooks are not supported in version 3");
26366
+ }
26367
+ },
26368
+ Config: function Config() {
26369
+ console.log("MathJax configurations should be converted for version 3");
26370
+ }
26371
+ };
26372
+ };
26260
26373
  var initializeMathJax = function initializeMathJax(callback) {
26261
26374
  if (window.mathjaxLoadedP) {
26262
26375
  return;
26263
26376
  }
26377
+ var PreviousMathJaxIsUsed = window.MathJax && window.MathJax.version && window.MathJax.version !== MathJaxVersion && window.MathJax.version[0] === '2';
26264
26378
  var texConfig = {
26265
26379
  macros: {
26266
26380
  parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
@@ -26270,11 +26384,28 @@ getDefaultExportFromCjs(SerializedMmlVisitor);
26270
26384
  },
26271
26385
  displayMath: [["$$", "$$"], ["\\[", "\\]"]]
26272
26386
  };
26387
+ if (PreviousMathJaxIsUsed) {
26388
+ texConfig.autoload = {
26389
+ color: [],
26390
+ colorv2: ["color"]
26391
+ };
26392
+ }
26273
26393
  window.mathjaxLoadedP = new Promise(function (resolve) {
26274
26394
  window.MathJax = {
26275
26395
  startup: {
26396
+ requireMap: PreviousMathJaxIsUsed ? {
26397
+ AMSmath: "ams",
26398
+ AMSsymbols: "ams",
26399
+ AMScd: "amscd",
26400
+ HTML: "html",
26401
+ noErrors: "noerrors",
26402
+ noUndefined: "noundefined"
26403
+ } : {},
26276
26404
  typeset: false,
26277
26405
  ready: function ready() {
26406
+ if (PreviousMathJaxIsUsed) {
26407
+ convertMathJax2ToMathJax3();
26408
+ }
26278
26409
  var mathjax = MathJax._.mathjax.mathjax;
26279
26410
  var STATE = MathJax._.core.MathItem.STATE;
26280
26411
  var Menu = MathJax._.ui.menu.Menu.Menu;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "7.1.2-next.29+059d1f271",
7
+ "version": "7.1.2-next.31+021ff6e7c",
8
8
  "description": "",
9
9
  "scripts": {
10
10
  "postpublish": "../../scripts/postpublish"
@@ -12,7 +12,7 @@
12
12
  "dependencies": {
13
13
  "@material-ui/core": "^3.9.2",
14
14
  "@pie-framework/pie-player-events": "^0.1.0",
15
- "@pie-lib/pie-toolbox": "2.0.11",
15
+ "@pie-lib/pie-toolbox": "2.0.12",
16
16
  "classnames": "^2.2.5",
17
17
  "lodash": "^4.17.10",
18
18
  "prop-types": "^15.6.1",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "author": "",
23
23
  "license": "ISC",
24
- "gitHead": "059d1f271a6ac564f432c0567dc5e076be408393",
24
+ "gitHead": "021ff6e7c7eb5b16a8b1239730c480fc09d58e5e",
25
25
  "main": "lib/index.js",
26
26
  "module": "src/index.js",
27
27
  "exports": {