- Linting (ESLint): Avoid shadowing

- npm: Update devDeps
master
Brett Zamir 2019-08-05 21:36:51 -07:00
parent 0bb9728067
commit 3808f7d7c1
12 changed files with 1131 additions and 1369 deletions

View File

@ -11,6 +11,7 @@
- Optimization: Re-rerun image optimization per update
- Linting (ESLint): Adjust per now applied rules
- Linting (ESLint): Add HTML files to linting
- Linting (ESLint): Avoid shadowing
- Refactoring: Use `static` keyword for classes
- Testing: Accessibility test API update
- Docs: Clarify need for Node.js/npm being installed

88
dist/index-es.js vendored
View File

@ -29262,7 +29262,7 @@ function _loadSvgString() {
_loadSvgString = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee23(str) {
var _ref45,
var _ref46,
noAlert,
success,
_args23 = arguments;
@ -29271,7 +29271,7 @@ function _loadSvgString() {
while (1) {
switch (_context23.prev = _context23.next) {
case 0:
_ref45 = _args23.length > 1 && _args23[1] !== undefined ? _args23[1] : {}, noAlert = _ref45.noAlert;
_ref46 = _args23.length > 1 && _args23[1] !== undefined ? _args23[1] : {}, noAlert = _ref46.noAlert;
success = svgCanvas.setSvgString(str) !== false;
if (!success) {
@ -31053,8 +31053,8 @@ editor.init = function () {
_promptImgURL = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee18() {
var _ref31,
_ref31$cancelDeletes,
var _ref32,
_ref32$cancelDeletes,
cancelDeletes,
curhref,
url,
@ -31064,7 +31064,7 @@ editor.init = function () {
while (1) {
switch (_context18.prev = _context18.next) {
case 0:
_ref31 = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {}, _ref31$cancelDeletes = _ref31.cancelDeletes, cancelDeletes = _ref31$cancelDeletes === void 0 ? false : _ref31$cancelDeletes;
_ref32 = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {}, _ref32$cancelDeletes = _ref32.cancelDeletes, cancelDeletes = _ref32$cancelDeletes === void 0 ? false : _ref32$cancelDeletes;
curhref = svgCanvas.getHref(selectedElement);
curhref = curhref.startsWith('data:') ? '' : curhref;
_context18.next = 5;
@ -36365,11 +36365,12 @@ editor.init = function () {
workarea[0].addEventListener('dragover', onDragOver);
workarea[0].addEventListener('dragleave', onDragLeave);
workarea[0].addEventListener('drop', importImage);
var open = $$b('<input type="file">').click(
var open = $$b('<input type="file">').change(
/*#__PURE__*/
_asyncToGenerator(
function () {
var _ref28 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee16() {
regeneratorRuntime.mark(function _callee16(e) {
var ok, reader;
return regeneratorRuntime.wrap(function _callee16$(_context16) {
while (1) {
@ -36398,20 +36399,22 @@ editor.init = function () {
reader.onloadend =
/*#__PURE__*/
function () {
var _ref29 = _asyncToGenerator(
var _ref30 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee15(e) {
regeneratorRuntime.mark(function _callee15(_ref29) {
var target;
return regeneratorRuntime.wrap(function _callee15$(_context15) {
while (1) {
switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return loadSvgString(e.target.result);
case 2:
updateCanvas();
target = _ref29.target;
_context15.next = 3;
return loadSvgString(target.result);
case 3:
updateCanvas();
case 4:
case "end":
return _context15.stop();
}
@ -36419,8 +36422,8 @@ editor.init = function () {
}, _callee15);
}));
return function (_x6) {
return _ref29.apply(this, arguments);
return function (_x7) {
return _ref30.apply(this, arguments);
};
}();
@ -36433,7 +36436,12 @@ editor.init = function () {
}
}
}, _callee16, this);
})));
}));
return function (_x6) {
return _ref28.apply(this, arguments);
};
}());
$$b('#tool_open').show().prepend(open);
var imgImport = $$b('<input type="file">').change(importImage);
$$b('#tool_import').show().prepend(imgImport);
@ -36456,7 +36464,7 @@ editor.init = function () {
var setLang = editor.setLang =
/*#__PURE__*/
function () {
var _ref30 = _asyncToGenerator(
var _ref31 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee17(lang, allStrings) {
var oldLayerName, renameLayer, elems;
@ -36564,8 +36572,8 @@ editor.init = function () {
}, _callee17);
}));
return function (_x7, _x8) {
return _ref30.apply(this, arguments);
return function (_x8, _x9) {
return _ref31.apply(this, arguments);
};
}();
@ -36659,9 +36667,9 @@ regeneratorRuntime.mark(function _callee20() {
case 0:
_context20.prev = 0;
_context20.next = 3;
return Promise.all(callbacks.map(function (_ref33) {
var _ref34 = _slicedToArray(_ref33, 1),
cb = _ref34[0];
return Promise.all(callbacks.map(function (_ref34) {
var _ref35 = _slicedToArray(_ref34, 1),
cb = _ref35[0];
return cb(); // eslint-disable-line promise/prefer-await-to-callbacks
}));
@ -36673,18 +36681,18 @@ regeneratorRuntime.mark(function _callee20() {
case 5:
_context20.prev = 5;
_context20.t0 = _context20["catch"](0);
callbacks.forEach(function (_ref35) {
var _ref36 = _slicedToArray(_ref35, 3),
reject = _ref36[2];
callbacks.forEach(function (_ref36) {
var _ref37 = _slicedToArray(_ref36, 3),
reject = _ref37[2];
reject();
});
throw _context20.t0;
case 9:
callbacks.forEach(function (_ref37) {
var _ref38 = _slicedToArray(_ref37, 2),
resolve = _ref38[1];
callbacks.forEach(function (_ref38) {
var _ref39 = _slicedToArray(_ref38, 2),
resolve = _ref39[1];
resolve();
});
@ -36705,8 +36713,8 @@ regeneratorRuntime.mark(function _callee20() {
*/
editor.loadFromString = function (str) {
var _ref39 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref39.noAlert;
var _ref40 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref40.noAlert;
return editor.ready(
/*#__PURE__*/
@ -36776,9 +36784,9 @@ editor.disableUI = function (featList) {// $(function () {
editor.loadFromURL = function (url) {
var _ref41 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
cache = _ref41.cache,
noAlert = _ref41.noAlert;
var _ref42 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
cache = _ref42.cache,
noAlert = _ref42.noAlert;
return editor.ready(function () {
return new Promise(function (resolve, reject) {
@ -36827,8 +36835,8 @@ editor.loadFromURL = function (url) {
editor.loadFromDataURI = function (str) {
var _ref42 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref42.noAlert;
var _ref43 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref43.noAlert;
return editor.ready(function () {
var base64 = false;
@ -36885,9 +36893,9 @@ var messageQueue = [];
* @returns {void}
*/
var messageListener = function messageListener(_ref43) {
var data = _ref43.data,
origin = _ref43.origin;
var messageListener = function messageListener(_ref44) {
var data = _ref44.data,
origin = _ref44.origin;
// eslint-disable-line no-shadow
// console.log('data, origin, extensionsAdded', data, origin, extensionsAdded);
var messageObj = {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

88
dist/index-umd.js vendored
View File

@ -29268,7 +29268,7 @@
_loadSvgString = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee23(str) {
var _ref45,
var _ref46,
noAlert,
success,
_args23 = arguments;
@ -29277,7 +29277,7 @@
while (1) {
switch (_context23.prev = _context23.next) {
case 0:
_ref45 = _args23.length > 1 && _args23[1] !== undefined ? _args23[1] : {}, noAlert = _ref45.noAlert;
_ref46 = _args23.length > 1 && _args23[1] !== undefined ? _args23[1] : {}, noAlert = _ref46.noAlert;
success = svgCanvas.setSvgString(str) !== false;
if (!success) {
@ -31059,8 +31059,8 @@
_promptImgURL = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee18() {
var _ref31,
_ref31$cancelDeletes,
var _ref32,
_ref32$cancelDeletes,
cancelDeletes,
curhref,
url,
@ -31070,7 +31070,7 @@
while (1) {
switch (_context18.prev = _context18.next) {
case 0:
_ref31 = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {}, _ref31$cancelDeletes = _ref31.cancelDeletes, cancelDeletes = _ref31$cancelDeletes === void 0 ? false : _ref31$cancelDeletes;
_ref32 = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {}, _ref32$cancelDeletes = _ref32.cancelDeletes, cancelDeletes = _ref32$cancelDeletes === void 0 ? false : _ref32$cancelDeletes;
curhref = svgCanvas.getHref(selectedElement);
curhref = curhref.startsWith('data:') ? '' : curhref;
_context18.next = 5;
@ -36371,11 +36371,12 @@
workarea[0].addEventListener('dragover', onDragOver);
workarea[0].addEventListener('dragleave', onDragLeave);
workarea[0].addEventListener('drop', importImage);
var open = $$b('<input type="file">').click(
var open = $$b('<input type="file">').change(
/*#__PURE__*/
_asyncToGenerator(
function () {
var _ref28 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee16() {
regeneratorRuntime.mark(function _callee16(e) {
var ok, reader;
return regeneratorRuntime.wrap(function _callee16$(_context16) {
while (1) {
@ -36404,20 +36405,22 @@
reader.onloadend =
/*#__PURE__*/
function () {
var _ref29 = _asyncToGenerator(
var _ref30 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee15(e) {
regeneratorRuntime.mark(function _callee15(_ref29) {
var target;
return regeneratorRuntime.wrap(function _callee15$(_context15) {
while (1) {
switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return loadSvgString(e.target.result);
case 2:
updateCanvas();
target = _ref29.target;
_context15.next = 3;
return loadSvgString(target.result);
case 3:
updateCanvas();
case 4:
case "end":
return _context15.stop();
}
@ -36425,8 +36428,8 @@
}, _callee15);
}));
return function (_x6) {
return _ref29.apply(this, arguments);
return function (_x7) {
return _ref30.apply(this, arguments);
};
}();
@ -36439,7 +36442,12 @@
}
}
}, _callee16, this);
})));
}));
return function (_x6) {
return _ref28.apply(this, arguments);
};
}());
$$b('#tool_open').show().prepend(open);
var imgImport = $$b('<input type="file">').change(importImage);
$$b('#tool_import').show().prepend(imgImport);
@ -36462,7 +36470,7 @@
var setLang = editor.setLang =
/*#__PURE__*/
function () {
var _ref30 = _asyncToGenerator(
var _ref31 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee17(lang, allStrings) {
var oldLayerName, renameLayer, elems;
@ -36570,8 +36578,8 @@
}, _callee17);
}));
return function (_x7, _x8) {
return _ref30.apply(this, arguments);
return function (_x8, _x9) {
return _ref31.apply(this, arguments);
};
}();
@ -36665,9 +36673,9 @@
case 0:
_context20.prev = 0;
_context20.next = 3;
return Promise.all(callbacks.map(function (_ref33) {
var _ref34 = _slicedToArray(_ref33, 1),
cb = _ref34[0];
return Promise.all(callbacks.map(function (_ref34) {
var _ref35 = _slicedToArray(_ref34, 1),
cb = _ref35[0];
return cb(); // eslint-disable-line promise/prefer-await-to-callbacks
}));
@ -36679,18 +36687,18 @@
case 5:
_context20.prev = 5;
_context20.t0 = _context20["catch"](0);
callbacks.forEach(function (_ref35) {
var _ref36 = _slicedToArray(_ref35, 3),
reject = _ref36[2];
callbacks.forEach(function (_ref36) {
var _ref37 = _slicedToArray(_ref36, 3),
reject = _ref37[2];
reject();
});
throw _context20.t0;
case 9:
callbacks.forEach(function (_ref37) {
var _ref38 = _slicedToArray(_ref37, 2),
resolve = _ref38[1];
callbacks.forEach(function (_ref38) {
var _ref39 = _slicedToArray(_ref38, 2),
resolve = _ref39[1];
resolve();
});
@ -36711,8 +36719,8 @@
*/
editor.loadFromString = function (str) {
var _ref39 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref39.noAlert;
var _ref40 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref40.noAlert;
return editor.ready(
/*#__PURE__*/
@ -36782,9 +36790,9 @@
editor.loadFromURL = function (url) {
var _ref41 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
cache = _ref41.cache,
noAlert = _ref41.noAlert;
var _ref42 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
cache = _ref42.cache,
noAlert = _ref42.noAlert;
return editor.ready(function () {
return new Promise(function (resolve, reject) {
@ -36833,8 +36841,8 @@
editor.loadFromDataURI = function (str) {
var _ref42 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref42.noAlert;
var _ref43 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref43.noAlert;
return editor.ready(function () {
var base64 = false;
@ -36891,9 +36899,9 @@
* @returns {void}
*/
var messageListener = function messageListener(_ref43) {
var data = _ref43.data,
origin = _ref43.origin;
var messageListener = function messageListener(_ref44) {
var data = _ref44.data,
origin = _ref44.origin;
// eslint-disable-line no-shadow
// console.log('data, origin, extensionsAdded', data, origin, extensionsAdded);
var messageObj = {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6200,8 +6200,8 @@ editor.init = function () {
if (this.files.length === 1) {
$.process_cancel(uiStrings.notification.loadingImage);
const reader = new FileReader();
reader.onloadend = async function (e) {
await loadSvgString(e.target.result);
reader.onloadend = async function ({target}) {
await loadSvgString(target.result);
updateCanvas();
};
reader.readAsText(this.files[0]);

View File

@ -29265,7 +29265,7 @@
_loadSvgString = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee23(str) {
var _ref45,
var _ref46,
noAlert,
success,
_args23 = arguments;
@ -29274,7 +29274,7 @@
while (1) {
switch (_context23.prev = _context23.next) {
case 0:
_ref45 = _args23.length > 1 && _args23[1] !== undefined ? _args23[1] : {}, noAlert = _ref45.noAlert;
_ref46 = _args23.length > 1 && _args23[1] !== undefined ? _args23[1] : {}, noAlert = _ref46.noAlert;
success = svgCanvas.setSvgString(str) !== false;
if (!success) {
@ -31056,8 +31056,8 @@
_promptImgURL = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee18() {
var _ref31,
_ref31$cancelDeletes,
var _ref32,
_ref32$cancelDeletes,
cancelDeletes,
curhref,
url,
@ -31067,7 +31067,7 @@
while (1) {
switch (_context18.prev = _context18.next) {
case 0:
_ref31 = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {}, _ref31$cancelDeletes = _ref31.cancelDeletes, cancelDeletes = _ref31$cancelDeletes === void 0 ? false : _ref31$cancelDeletes;
_ref32 = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {}, _ref32$cancelDeletes = _ref32.cancelDeletes, cancelDeletes = _ref32$cancelDeletes === void 0 ? false : _ref32$cancelDeletes;
curhref = svgCanvas.getHref(selectedElement);
curhref = curhref.startsWith('data:') ? '' : curhref;
_context18.next = 5;
@ -36370,9 +36370,10 @@
workarea[0].addEventListener('drop', importImage);
var open = $$b('<input type="file">').change(
/*#__PURE__*/
_asyncToGenerator(
function () {
var _ref28 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee16() {
regeneratorRuntime.mark(function _callee16(e) {
var ok, reader;
return regeneratorRuntime.wrap(function _callee16$(_context16) {
while (1) {
@ -36401,20 +36402,22 @@
reader.onloadend =
/*#__PURE__*/
function () {
var _ref29 = _asyncToGenerator(
var _ref30 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee15(e) {
regeneratorRuntime.mark(function _callee15(_ref29) {
var target;
return regeneratorRuntime.wrap(function _callee15$(_context15) {
while (1) {
switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return loadSvgString(e.target.result);
case 2:
updateCanvas();
target = _ref29.target;
_context15.next = 3;
return loadSvgString(target.result);
case 3:
updateCanvas();
case 4:
case "end":
return _context15.stop();
}
@ -36422,8 +36425,8 @@
}, _callee15);
}));
return function (_x6) {
return _ref29.apply(this, arguments);
return function (_x7) {
return _ref30.apply(this, arguments);
};
}();
@ -36436,7 +36439,12 @@
}
}
}, _callee16, this);
})));
}));
return function (_x6) {
return _ref28.apply(this, arguments);
};
}());
$$b('#tool_open').show().prepend(open);
var imgImport = $$b('<input type="file">').change(importImage);
$$b('#tool_import').show().prepend(imgImport);
@ -36459,7 +36467,7 @@
var setLang = editor.setLang =
/*#__PURE__*/
function () {
var _ref30 = _asyncToGenerator(
var _ref31 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee17(lang, allStrings) {
var oldLayerName, renameLayer, elems;
@ -36567,8 +36575,8 @@
}, _callee17);
}));
return function (_x7, _x8) {
return _ref30.apply(this, arguments);
return function (_x8, _x9) {
return _ref31.apply(this, arguments);
};
}();
@ -36662,9 +36670,9 @@
case 0:
_context20.prev = 0;
_context20.next = 3;
return Promise.all(callbacks.map(function (_ref33) {
var _ref34 = _slicedToArray(_ref33, 1),
cb = _ref34[0];
return Promise.all(callbacks.map(function (_ref34) {
var _ref35 = _slicedToArray(_ref34, 1),
cb = _ref35[0];
return cb(); // eslint-disable-line promise/prefer-await-to-callbacks
}));
@ -36676,18 +36684,18 @@
case 5:
_context20.prev = 5;
_context20.t0 = _context20["catch"](0);
callbacks.forEach(function (_ref35) {
var _ref36 = _slicedToArray(_ref35, 3),
reject = _ref36[2];
callbacks.forEach(function (_ref36) {
var _ref37 = _slicedToArray(_ref36, 3),
reject = _ref37[2];
reject();
});
throw _context20.t0;
case 9:
callbacks.forEach(function (_ref37) {
var _ref38 = _slicedToArray(_ref37, 2),
resolve = _ref38[1];
callbacks.forEach(function (_ref38) {
var _ref39 = _slicedToArray(_ref38, 2),
resolve = _ref39[1];
resolve();
});
@ -36708,8 +36716,8 @@
*/
editor.loadFromString = function (str) {
var _ref39 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref39.noAlert;
var _ref40 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref40.noAlert;
return editor.ready(
/*#__PURE__*/
@ -36779,9 +36787,9 @@
editor.loadFromURL = function (url) {
var _ref41 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
cache = _ref41.cache,
noAlert = _ref41.noAlert;
var _ref42 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
cache = _ref42.cache,
noAlert = _ref42.noAlert;
return editor.ready(function () {
return new Promise(function (resolve, reject) {
@ -36830,8 +36838,8 @@
editor.loadFromDataURI = function (str) {
var _ref42 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref42.noAlert;
var _ref43 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref43.noAlert;
return editor.ready(function () {
var base64 = false;
@ -36888,9 +36896,9 @@
* @returns {void}
*/
var messageListener = function messageListener(_ref43) {
var data = _ref43.data,
origin = _ref43.origin;
var messageListener = function messageListener(_ref44) {
var data = _ref44.data,
origin = _ref44.origin;
// eslint-disable-line no-shadow
// console.log('data, origin, extensionsAdded', data, origin, extensionsAdded);
var messageObj = {

1778
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -76,24 +76,25 @@
],
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.5.4",
"@babel/node": "^7.5.0",
"@babel/core": "^7.5.5",
"@babel/node": "^7.5.5",
"@babel/plugin-transform-modules-commonjs": "^7.5.0",
"@babel/preset-env": "^7.5.4",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.4.5",
"@babel/preset-env": "^7.5.5",
"@mysticatea/eslint-plugin": "^11.0.0",
"axe-core": "^3.3.0",
"axe-core": "^3.3.1",
"axe-testcafe": "^3.0.0",
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3",
"core-js-bundle": "^3.1.4",
"eslint": "6.0.1",
"eslint-config-ash-nazg": "8.5.1",
"eslint": "6.1.0",
"eslint-config-ash-nazg": "8.5.2",
"eslint-config-standard": "13.0.1",
"eslint-plugin-array-func": "^3.1.3",
"eslint-plugin-compat": "^3.2.0",
"eslint-plugin-compat": "^3.3.0",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-import": "2.18.0",
"eslint-plugin-jsdoc": "^15.5.1",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jsdoc": "^15.8.0",
"eslint-plugin-markdown": "^1.0.0",
"eslint-plugin-no-use-extend-native": "^0.4.1",
"eslint-plugin-node": "9.1.0",
@ -102,8 +103,8 @@
"eslint-plugin-sonarjs": "^0.4.0",
"eslint-plugin-standard": "4.0.0",
"eslint-plugin-testcafe": "^0.2.1",
"eslint-plugin-unicorn": "^9.1.1",
"imageoptim-cli": "^2.3.7",
"eslint-plugin-unicorn": "^10.0.0",
"imageoptim-cli": "^2.3.9",
"jamilih": "^0.45.0",
"jsdoc": "^3.6.3",
"load-stylesheets": "^0.8.0",
@ -113,16 +114,16 @@
"qr-manipulation": "https://github.com/brettz9/qr-manipulation",
"query-result": "https://github.com/WebReflection/query-result",
"qunit": "^2.9.2",
"regenerator-runtime": "^0.13.2",
"remark-cli": "^6.0.1",
"regenerator-runtime": "^0.13.3",
"remark-cli": "^7.0.0",
"remark-lint-ordered-list-marker-value": "^1.0.3",
"rollup": "1.17.0",
"rollup": "1.19.2",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-re": "^1.0.7",
"rollup-plugin-terser": "^5.1.1",
"sinon": "^7.3.2",
"sinon-test": "^2.4.0",
"stackblur-canvas": "^2.2.0",
"testcafe": "^1.3.2"
"testcafe": "^1.3.3"
}
}

View File

@ -29265,7 +29265,7 @@
_loadSvgString = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee23(str) {
var _ref45,
var _ref46,
noAlert,
success,
_args23 = arguments;
@ -29274,7 +29274,7 @@
while (1) {
switch (_context23.prev = _context23.next) {
case 0:
_ref45 = _args23.length > 1 && _args23[1] !== undefined ? _args23[1] : {}, noAlert = _ref45.noAlert;
_ref46 = _args23.length > 1 && _args23[1] !== undefined ? _args23[1] : {}, noAlert = _ref46.noAlert;
success = svgCanvas.setSvgString(str) !== false;
if (!success) {
@ -31056,8 +31056,8 @@
_promptImgURL = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee18() {
var _ref31,
_ref31$cancelDeletes,
var _ref32,
_ref32$cancelDeletes,
cancelDeletes,
curhref,
url,
@ -31067,7 +31067,7 @@
while (1) {
switch (_context18.prev = _context18.next) {
case 0:
_ref31 = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {}, _ref31$cancelDeletes = _ref31.cancelDeletes, cancelDeletes = _ref31$cancelDeletes === void 0 ? false : _ref31$cancelDeletes;
_ref32 = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {}, _ref32$cancelDeletes = _ref32.cancelDeletes, cancelDeletes = _ref32$cancelDeletes === void 0 ? false : _ref32$cancelDeletes;
curhref = svgCanvas.getHref(selectedElement);
curhref = curhref.startsWith('data:') ? '' : curhref;
_context18.next = 5;
@ -36370,9 +36370,10 @@
workarea[0].addEventListener('drop', importImage);
var open = $$b('<input type="file">').change(
/*#__PURE__*/
_asyncToGenerator(
function () {
var _ref28 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee16() {
regeneratorRuntime.mark(function _callee16(e) {
var ok, reader;
return regeneratorRuntime.wrap(function _callee16$(_context16) {
while (1) {
@ -36401,20 +36402,22 @@
reader.onloadend =
/*#__PURE__*/
function () {
var _ref29 = _asyncToGenerator(
var _ref30 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee15(e) {
regeneratorRuntime.mark(function _callee15(_ref29) {
var target;
return regeneratorRuntime.wrap(function _callee15$(_context15) {
while (1) {
switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return loadSvgString(e.target.result);
case 2:
updateCanvas();
target = _ref29.target;
_context15.next = 3;
return loadSvgString(target.result);
case 3:
updateCanvas();
case 4:
case "end":
return _context15.stop();
}
@ -36422,8 +36425,8 @@
}, _callee15);
}));
return function (_x6) {
return _ref29.apply(this, arguments);
return function (_x7) {
return _ref30.apply(this, arguments);
};
}();
@ -36436,7 +36439,12 @@
}
}
}, _callee16, this);
})));
}));
return function (_x6) {
return _ref28.apply(this, arguments);
};
}());
$$b('#tool_open').show().prepend(open);
var imgImport = $$b('<input type="file">').change(importImage);
$$b('#tool_import').show().prepend(imgImport);
@ -36459,7 +36467,7 @@
var setLang = editor.setLang =
/*#__PURE__*/
function () {
var _ref30 = _asyncToGenerator(
var _ref31 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee17(lang, allStrings) {
var oldLayerName, renameLayer, elems;
@ -36567,8 +36575,8 @@
}, _callee17);
}));
return function (_x7, _x8) {
return _ref30.apply(this, arguments);
return function (_x8, _x9) {
return _ref31.apply(this, arguments);
};
}();
@ -36662,9 +36670,9 @@
case 0:
_context20.prev = 0;
_context20.next = 3;
return Promise.all(callbacks.map(function (_ref33) {
var _ref34 = _slicedToArray(_ref33, 1),
cb = _ref34[0];
return Promise.all(callbacks.map(function (_ref34) {
var _ref35 = _slicedToArray(_ref34, 1),
cb = _ref35[0];
return cb(); // eslint-disable-line promise/prefer-await-to-callbacks
}));
@ -36676,18 +36684,18 @@
case 5:
_context20.prev = 5;
_context20.t0 = _context20["catch"](0);
callbacks.forEach(function (_ref35) {
var _ref36 = _slicedToArray(_ref35, 3),
reject = _ref36[2];
callbacks.forEach(function (_ref36) {
var _ref37 = _slicedToArray(_ref36, 3),
reject = _ref37[2];
reject();
});
throw _context20.t0;
case 9:
callbacks.forEach(function (_ref37) {
var _ref38 = _slicedToArray(_ref37, 2),
resolve = _ref38[1];
callbacks.forEach(function (_ref38) {
var _ref39 = _slicedToArray(_ref38, 2),
resolve = _ref39[1];
resolve();
});
@ -36708,8 +36716,8 @@
*/
editor.loadFromString = function (str) {
var _ref39 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref39.noAlert;
var _ref40 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref40.noAlert;
return editor.ready(
/*#__PURE__*/
@ -36779,9 +36787,9 @@
editor.loadFromURL = function (url) {
var _ref41 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
cache = _ref41.cache,
noAlert = _ref41.noAlert;
var _ref42 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
cache = _ref42.cache,
noAlert = _ref42.noAlert;
return editor.ready(function () {
return new Promise(function (resolve, reject) {
@ -36830,8 +36838,8 @@
editor.loadFromDataURI = function (str) {
var _ref42 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref42.noAlert;
var _ref43 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
noAlert = _ref43.noAlert;
return editor.ready(function () {
var base64 = false;
@ -36888,9 +36896,9 @@
* @returns {void}
*/
var messageListener = function messageListener(_ref43) {
var data = _ref43.data,
origin = _ref43.origin;
var messageListener = function messageListener(_ref44) {
var data = _ref44.data,
origin = _ref44.origin;
// eslint-disable-line no-shadow
// console.log('data, origin, extensionsAdded', data, origin, extensionsAdded);
var messageObj = {