- Deprecated: Should now use `avoidClientSideDownload` in place of

`avoidClientSide` (config for `ext-server_opensave.js`).
- Enhancement: Added `avoidClientSideOpen` config for
    `ext-server_opensave.js`
- npm: Update devDeps (including switching from deprecate opn-cli
    package to open-cli)
master
Brett Zamir 2019-05-21 17:50:17 +08:00
parent 597644999d
commit 8d179aee0c
15 changed files with 158 additions and 117 deletions

View File

@ -2,7 +2,13 @@
## ?
- Deprecated: Should now use `avoidClientSideDownload` in place of
`avoidClientSide` (config for `ext-server_opensave.js`).
- Enhancement: Added `avoidClientSideOpen` config for
`ext-server_opensave.js`
- Refactoring: Use `static` keyword for classes
- npm: Update devDeps (including switching from deprecate opn-cli
package to open-cli)
## 5.0.0

View File

@ -4874,7 +4874,7 @@ var svgEditorExtension_server_opensave = (function () {
var _init = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee5(_ref) {
var $, decode64, encode64, importLocale, strings, svgEditor, _svgEditor$curConfig, extPath, avoidClientSide, svgCanvas, getFileNameFromTitle, xhtmlEscape, clientDownloadSupport, saveSvgAction, saveImgAction, cancelled, openSvgAction, importSvgAction, importImgAction, openSvgForm, importSvgForm, importImgForm, rebuildInput;
var $, decode64, encode64, importLocale, strings, svgEditor, _svgEditor$curConfig, extPath, avoidClientSide, avoidClientSideDownload, avoidClientSideOpen, svgCanvas, getFileNameFromTitle, xhtmlEscape, clientDownloadSupport, saveSvgAction, saveImgAction, cancelled, openSvgAction, importSvgAction, importImgAction, openSvgForm, importSvgForm, importImgForm, rebuildInput;
return regeneratorRuntime.wrap(function _callee5$(_context5) {
while (1) {
@ -4981,7 +4981,7 @@ var svgEditorExtension_server_opensave = (function () {
};
clientDownloadSupport = function _ref6(filename, suffix, uri) {
if (avoidClientSide) {
if (avoidClientSide || avoidClientSideDownload) {
return false;
}
@ -5017,7 +5017,7 @@ var svgEditorExtension_server_opensave = (function () {
case 7:
strings = _context5.sent;
svgEditor = this;
_svgEditor$curConfig = svgEditor.curConfig, extPath = _svgEditor$curConfig.extPath, avoidClientSide = _svgEditor$curConfig.avoidClientSide, svgCanvas = svgEditor.canvas;
_svgEditor$curConfig = svgEditor.curConfig, extPath = _svgEditor$curConfig.extPath, avoidClientSide = _svgEditor$curConfig.avoidClientSide, avoidClientSideDownload = _svgEditor$curConfig.avoidClientSideDownload, avoidClientSideOpen = _svgEditor$curConfig.avoidClientSideOpen, svgCanvas = svgEditor.canvas;
/**
*
* @returns {string}
@ -5137,7 +5137,7 @@ var svgEditorExtension_server_opensave = (function () {
}()
}); // Do nothing if client support is found
if (!window.FileReader) {
if (!(window.FileReader && !avoidClientSideOpen)) {
_context5.next = 16;
break;
}

11
dist/index-es.js vendored
View File

@ -28792,7 +28792,9 @@ defaultExtensions = ['ext-connector.js', 'ext-eyedropper.js', 'ext-grid.js', 'ex
* @property {boolean} [noStorageOnLoad=false] Some interaction with `ext-storage.js`; prevent even the loading of previously saved local storage.
* @property {boolean} [forceStorage=false] Some interaction with `ext-storage.js`; strongly discouraged from modification as it bypasses user privacy by preventing them from choosing whether to keep local storage or not (and may be required by law in some regions)
* @property {boolean} [emptyStorageOnDecline=false] Used by `ext-storage.js`; empty any prior storage if the user declines to store
* @property {boolean} [avoidClientSide=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSide=false] DEPRECATED (use `avoidClientSideDownload` instead); Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSideDownload=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSideOpen=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always open from the server and not only as fallback when FileReader client support is lacking
* @property {string[]} [extensions=module:SVGEditor~defaultExtensions] Extensions to load on startup. Use an array in `setConfig` and comma separated file names in the URL. Extension names must begin with "ext-". Note that as of version 2.7, paths containing "/", "\", or ":", are disallowed for security reasons. Although previous versions of this list would entirely override the default list, as of version 2.7, the defaults will always be added to this explicit list unless the configuration `noDefaultExtensions` is included.
* @property {module:SVGEditor.Stylesheet[]} [stylesheets=["@default"]] An array of required stylesheets to load in parallel; include the value `"@default"` within this array to ensure all default stylesheets are loaded.
* @property {string[]} [allowedOrigins=[]] Used by `ext-xdomain-messaging.js` to indicate which origins are permitted for cross-domain messaging (e.g., between the embedded editor and main editor code). Besides explicit domains, one might add '*' to allow all domains (not recommended for privacy/data integrity of your user's content!), `window.location.origin` for allowing the same origin (should be safe if you trust all apps on your domain), 'null' to allow `file:///` URL usage
@ -28901,8 +28903,11 @@ defaultConfig = {
// Some interaction with ext-storage.js; strongly discouraged from modification as it bypasses user privacy by preventing them from choosing whether to keep local storage or not
emptyStorageOnDecline: false,
// Used by ext-storage.js; empty any prior storage if the user declines to store
// EXTENSION (CLIENT VS. SERVER SAVING)
avoidClientSide: false
// EXTENSION (CLIENT VS. SERVER SAVING/OPENING)
avoidClientSide: false,
// Deprecated in favor of `avoidClientSideDownload`
avoidClientSideDownload: false,
avoidClientSideOpen: false
},
/**

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

11
dist/index-umd.js vendored
View File

@ -28798,7 +28798,9 @@
* @property {boolean} [noStorageOnLoad=false] Some interaction with `ext-storage.js`; prevent even the loading of previously saved local storage.
* @property {boolean} [forceStorage=false] Some interaction with `ext-storage.js`; strongly discouraged from modification as it bypasses user privacy by preventing them from choosing whether to keep local storage or not (and may be required by law in some regions)
* @property {boolean} [emptyStorageOnDecline=false] Used by `ext-storage.js`; empty any prior storage if the user declines to store
* @property {boolean} [avoidClientSide=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSide=false] DEPRECATED (use `avoidClientSideDownload` instead); Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSideDownload=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSideOpen=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always open from the server and not only as fallback when FileReader client support is lacking
* @property {string[]} [extensions=module:SVGEditor~defaultExtensions] Extensions to load on startup. Use an array in `setConfig` and comma separated file names in the URL. Extension names must begin with "ext-". Note that as of version 2.7, paths containing "/", "\", or ":", are disallowed for security reasons. Although previous versions of this list would entirely override the default list, as of version 2.7, the defaults will always be added to this explicit list unless the configuration `noDefaultExtensions` is included.
* @property {module:SVGEditor.Stylesheet[]} [stylesheets=["@default"]] An array of required stylesheets to load in parallel; include the value `"@default"` within this array to ensure all default stylesheets are loaded.
* @property {string[]} [allowedOrigins=[]] Used by `ext-xdomain-messaging.js` to indicate which origins are permitted for cross-domain messaging (e.g., between the embedded editor and main editor code). Besides explicit domains, one might add '*' to allow all domains (not recommended for privacy/data integrity of your user's content!), `window.location.origin` for allowing the same origin (should be safe if you trust all apps on your domain), 'null' to allow `file:///` URL usage
@ -28907,8 +28909,11 @@
// Some interaction with ext-storage.js; strongly discouraged from modification as it bypasses user privacy by preventing them from choosing whether to keep local storage or not
emptyStorageOnDecline: false,
// Used by ext-storage.js; empty any prior storage if the user declines to store
// EXTENSION (CLIENT VS. SERVER SAVING)
avoidClientSide: false
// EXTENSION (CLIENT VS. SERVER SAVING/OPENING)
avoidClientSide: false,
// Deprecated in favor of `avoidClientSideDownload`
avoidClientSideDownload: false,
avoidClientSideOpen: false
},
/**

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,7 @@
- `Security fix: `
- `Known regression: `
- `Breaking change: `
- `Deprecated:`
- `Compatibility fix: `
- `Fix: `
- `Fix (<component>): ` - Component may be an extension, locale, etc.

View File

@ -14,7 +14,11 @@ export default {
const strings = await importLocale();
const svgEditor = this;
const {
curConfig: {extPath, avoidClientSide},
curConfig: {
extPath,
avoidClientSide, // Deprecated
avoidClientSideDownload, avoidClientSideOpen
},
canvas: svgCanvas
} = svgEditor;
@ -44,7 +48,7 @@ export default {
* @returns {boolean}
*/
function clientDownloadSupport (filename, suffix, uri) {
if (avoidClientSide) {
if (avoidClientSide || avoidClientSideDownload) {
return false;
}
const support = $('<a>')[0].download === '';
@ -155,7 +159,7 @@ export default {
});
// Do nothing if client support is found
if (window.FileReader) { return; }
if (window.FileReader && !avoidClientSideOpen) { return; }
// Change these to appropriate script file
const openSvgAction = extPath + 'fileopen.php?type=load_svg';

View File

@ -181,7 +181,9 @@ const callbacks = [],
* @property {boolean} [noStorageOnLoad=false] Some interaction with `ext-storage.js`; prevent even the loading of previously saved local storage.
* @property {boolean} [forceStorage=false] Some interaction with `ext-storage.js`; strongly discouraged from modification as it bypasses user privacy by preventing them from choosing whether to keep local storage or not (and may be required by law in some regions)
* @property {boolean} [emptyStorageOnDecline=false] Used by `ext-storage.js`; empty any prior storage if the user declines to store
* @property {boolean} [avoidClientSide=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSide=false] DEPRECATED (use `avoidClientSideDownload` instead); Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSideDownload=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSideOpen=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always open from the server and not only as fallback when FileReader client support is lacking
* @property {string[]} [extensions=module:SVGEditor~defaultExtensions] Extensions to load on startup. Use an array in `setConfig` and comma separated file names in the URL. Extension names must begin with "ext-". Note that as of version 2.7, paths containing "/", "\", or ":", are disallowed for security reasons. Although previous versions of this list would entirely override the default list, as of version 2.7, the defaults will always be added to this explicit list unless the configuration `noDefaultExtensions` is included.
* @property {module:SVGEditor.Stylesheet[]} [stylesheets=["@default"]] An array of required stylesheets to load in parallel; include the value `"@default"` within this array to ensure all default stylesheets are loaded.
* @property {string[]} [allowedOrigins=[]] Used by `ext-xdomain-messaging.js` to indicate which origins are permitted for cross-domain messaging (e.g., between the embedded editor and main editor code). Besides explicit domains, one might add '*' to allow all domains (not recommended for privacy/data integrity of your user's content!), `window.location.origin` for allowing the same origin (should be safe if you trust all apps on your domain), 'null' to allow `file:///` URL usage
@ -275,8 +277,10 @@ const callbacks = [],
noStorageOnLoad: false, // Some interaction with ext-storage.js; prevent even the loading of previously saved local storage
forceStorage: false, // Some interaction with ext-storage.js; strongly discouraged from modification as it bypasses user privacy by preventing them from choosing whether to keep local storage or not
emptyStorageOnDecline: false, // Used by ext-storage.js; empty any prior storage if the user declines to store
// EXTENSION (CLIENT VS. SERVER SAVING)
avoidClientSide: false
// EXTENSION (CLIENT VS. SERVER SAVING/OPENING)
avoidClientSide: false, // Deprecated in favor of `avoidClientSideDownload`
avoidClientSideDownload: false,
avoidClientSideOpen: false
},
/**
* LOCALE

View File

@ -28795,7 +28795,9 @@
* @property {boolean} [noStorageOnLoad=false] Some interaction with `ext-storage.js`; prevent even the loading of previously saved local storage.
* @property {boolean} [forceStorage=false] Some interaction with `ext-storage.js`; strongly discouraged from modification as it bypasses user privacy by preventing them from choosing whether to keep local storage or not (and may be required by law in some regions)
* @property {boolean} [emptyStorageOnDecline=false] Used by `ext-storage.js`; empty any prior storage if the user declines to store
* @property {boolean} [avoidClientSide=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSide=false] DEPRECATED (use `avoidClientSideDownload` instead); Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSideDownload=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSideOpen=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always open from the server and not only as fallback when FileReader client support is lacking
* @property {string[]} [extensions=module:SVGEditor~defaultExtensions] Extensions to load on startup. Use an array in `setConfig` and comma separated file names in the URL. Extension names must begin with "ext-". Note that as of version 2.7, paths containing "/", "\", or ":", are disallowed for security reasons. Although previous versions of this list would entirely override the default list, as of version 2.7, the defaults will always be added to this explicit list unless the configuration `noDefaultExtensions` is included.
* @property {module:SVGEditor.Stylesheet[]} [stylesheets=["@default"]] An array of required stylesheets to load in parallel; include the value `"@default"` within this array to ensure all default stylesheets are loaded.
* @property {string[]} [allowedOrigins=[]] Used by `ext-xdomain-messaging.js` to indicate which origins are permitted for cross-domain messaging (e.g., between the embedded editor and main editor code). Besides explicit domains, one might add '*' to allow all domains (not recommended for privacy/data integrity of your user's content!), `window.location.origin` for allowing the same origin (should be safe if you trust all apps on your domain), 'null' to allow `file:///` URL usage
@ -28904,8 +28906,11 @@
// Some interaction with ext-storage.js; strongly discouraged from modification as it bypasses user privacy by preventing them from choosing whether to keep local storage or not
emptyStorageOnDecline: false,
// Used by ext-storage.js; empty any prior storage if the user declines to store
// EXTENSION (CLIENT VS. SERVER SAVING)
avoidClientSide: false
// EXTENSION (CLIENT VS. SERVER SAVING/OPENING)
avoidClientSide: false,
// Deprecated in favor of `avoidClientSideDownload`
avoidClientSideDownload: false,
avoidClientSideOpen: false
},
/**

168
package-lock.json generated
View File

@ -1369,9 +1369,15 @@
"dev": true
},
"@types/lodash": {
"version": "4.14.123",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.123.tgz",
"integrity": "sha512-pQvPkc4Nltyx7G1Ww45OjVqUsJP4UsZm+GWJpigXgkikZqJgRm4c48g027o6tdgubWHwFRF15iFd+Y4Pmqv6+Q==",
"version": "4.14.130",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.130.tgz",
"integrity": "sha512-H++wk0tbneBsRVfLkgAAd0IIpmpVr2Bj4T0HncoOsQf3/xrJexRYQK2Tqo0Ej3pFslM8GkMgdis9bu6xIb1ycw==",
"dev": true
},
"@types/node": {
"version": "12.0.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz",
"integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==",
"dev": true
},
"@typescript-eslint/eslint-plugin": {
@ -1785,12 +1791,6 @@
"source-map": "^0.5.7"
},
"dependencies": {
"babylon": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
"dev": true
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
@ -2661,14 +2661,6 @@
"babel-types": "^6.26.0",
"babylon": "^6.18.0",
"lodash": "^4.17.4"
},
"dependencies": {
"babylon": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
"dev": true
}
}
},
"babel-traverse": {
@ -2688,12 +2680,6 @@
"lodash": "^4.17.4"
},
"dependencies": {
"babylon": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
"dev": true
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
@ -2737,6 +2723,12 @@
}
}
},
"babylon": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
"dev": true
},
"bail": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/bail/-/bail-1.0.3.tgz",
@ -3333,9 +3325,9 @@
"dev": true
},
"core-js-bundle": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.0.1.tgz",
"integrity": "sha512-UyodMvPq3EauF/+9rJWleyOiSLnF4WZfeeJ7W+z05ok1w6KD3Jum/+znK6PZdXxl+t8PCfICmysG9blOYsewcA==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.1.1.tgz",
"integrity": "sha512-1V4gR+n2H8KCKyBUjJl7FIZIIF/TreqPerSxoFo/iY9iJyqVOOg0QnkxQdRaZKbre+XT/be3+9rvHoc7u2blmg==",
"dev": true
},
"core-js-compat": {
@ -4133,9 +4125,9 @@
}
},
"eslint-plugin-jsdoc": {
"version": "4.8.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-4.8.3.tgz",
"integrity": "sha512-lKOaphUUzv0qKJrAdEwQGEWcNN2Foae5W111u1ASKQeliyJkKXCVxia0dakATuI/s2ojr6Q3FVzWwT6uE1icBg==",
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-5.0.2.tgz",
"integrity": "sha512-ACSu4NEEG5KZK7liCZz9jm5f5hFHcCL29zsN0RTixIZe1kuZOVO3oVbvnpe6o/U/3h9dMLJ42Yhe6umBS6aO7A==",
"dev": true,
"requires": {
"comment-parser": "^0.5.4",
@ -4641,9 +4633,9 @@
}
},
"file-type": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-10.10.0.tgz",
"integrity": "sha512-3CTQE/db3dnK2jsfd4XiXMKw9nD0QVEMRLdBzqYDRr5BvYMUccDpP8hMc1uPb1VZ9Iw/cAJjYPNwJ5UzxGqsRg==",
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-11.0.0.tgz",
"integrity": "sha512-ixd0mHkDO8KJ1S+ANTM+cZoZgL+TB0txLMm9KjTndfOjFYuRmrUcOtmSEm+e9s7wrynZOvvRD/8LwMQ6a24Irg==",
"dev": true
},
"fill-range": {
@ -5359,9 +5351,9 @@
"dev": true
},
"get-stdin": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
"integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz",
"integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==",
"dev": true
},
"get-value": {
@ -6281,9 +6273,9 @@
"dev": true
},
"jsdoc": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.1.tgz",
"integrity": "sha512-mMMsst31b8c7/Z6ewnO6ORIdVMwsobg1enX9b/2XAzW8mM3KuMANRWcMD1KMBq91IAUMOIhC5NsXu7xvNQrRyQ==",
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.2.tgz",
"integrity": "sha512-S2vzg99C5+gb7FWlrK4TVdyzVPGGkdvpDkCEJH1JABi2PKzPeLu5/zZffcJUifgWUJqXWl41Hoc+MmuM2GukIg==",
"dev": true,
"requires": {
"@babel/parser": "^7.4.4",
@ -7291,25 +7283,25 @@
}
},
"open": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/open/-/open-6.1.0.tgz",
"integrity": "sha512-Vqch7NFb/WsMujhqfq+B3u0xkssRjZlxh+NSsBSphpcgaFD7gfB0SUBfR91E9ygBlyNGNogXR2cUB8rRfoo2kQ==",
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/open/-/open-6.3.0.tgz",
"integrity": "sha512-6AHdrJxPvAXIowO/aIaeHZ8CeMdDf7qCyRNq8NwJpinmCdXhz+NZR7ie1Too94lpciCDsG+qHGO9Mt0svA4OqA==",
"dev": true,
"requires": {
"is-wsl": "^1.1.0"
}
},
"opn-cli": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/opn-cli/-/opn-cli-4.1.0.tgz",
"integrity": "sha512-nVJ9dVb4fEKtmACWxUql+hhQxVWMt7BSRT+6TnB85W3xs5Pgk9sKW3icYeCIwOtOKALBw/6WUCoNmI1+ADfAow==",
"open-cli": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/open-cli/-/open-cli-5.0.0.tgz",
"integrity": "sha512-Y2KQDS6NqNtk+PSXzSgwH41vTDMRndwFgVWsfgMhXv7lNe1cImLCe19Vo8oKwMsL7WeNsGmmbX7Ml74Ydj61Cg==",
"dev": true,
"requires": {
"file-type": "^10.10.0",
"get-stdin": "^6.0.0",
"file-type": "^11.0.0",
"get-stdin": "^7.0.0",
"meow": "^5.0.0",
"open": "^6.1.0",
"temp-write": "^3.4.0"
"open": "^6.3.0",
"temp-write": "^4.0.0"
}
},
"optimist": {
@ -8179,22 +8171,16 @@
}
},
"rollup": {
"version": "1.11.2",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-1.11.2.tgz",
"integrity": "sha512-H5sS7GZ/Rn0t119Et8mw0QXtg5HTOI/1FL57EKHk5oduRmGaraOf3KcEt6j+dXJ9tXxWQkG+/FBjPS4dzxo6EA==",
"version": "1.12.3",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-1.12.3.tgz",
"integrity": "sha512-ueWhPijWN+GaPgD3l77hXih/gcDXmYph6sWeQegwBYtaqAE834e8u+MC2wT6FKIUsz1DBOyOXAQXUZB+rjWDoQ==",
"dev": true,
"requires": {
"@types/estree": "0.0.39",
"@types/node": "^11.13.9",
"@types/node": "^12.0.2",
"acorn": "^6.1.1"
},
"dependencies": {
"@types/node": {
"version": "11.13.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.10.tgz",
"integrity": "sha512-leUNzbFTMX94TWaIKz8N15Chu55F9QSH+INKayQr5xpkasBQBRF3qQXfo3/dOnMU/dEIit+Y/SU8HyOjq++GwA==",
"dev": true
},
"acorn": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz",
@ -8825,23 +8811,43 @@
"dev": true
},
"temp-write": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/temp-write/-/temp-write-3.4.0.tgz",
"integrity": "sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI=",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/temp-write/-/temp-write-4.0.0.tgz",
"integrity": "sha512-HIeWmj77uOOHb0QX7siN3OtwV3CTntquin6TNVg6SHOqCP3hYKmox90eeFOGaY1MqJ9WYDDjkyZrW6qS5AWpbw==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"is-stream": "^1.1.0",
"make-dir": "^1.0.0",
"pify": "^3.0.0",
"graceful-fs": "^4.1.15",
"is-stream": "^2.0.0",
"make-dir": "^3.0.0",
"temp-dir": "^1.0.0",
"uuid": "^3.0.1"
"uuid": "^3.3.2"
},
"dependencies": {
"pify": {
"graceful-fs": {
"version": "4.1.15",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
"integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==",
"dev": true
},
"is-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz",
"integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==",
"dev": true
},
"make-dir": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz",
"integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==",
"dev": true,
"requires": {
"semver": "^6.0.0"
}
},
"semver": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz",
"integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==",
"dev": true
}
}
@ -8872,9 +8878,9 @@
}
},
"testcafe": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/testcafe/-/testcafe-1.1.3.tgz",
"integrity": "sha512-AnwNHaJJPG5JrIB0UcPgQ/TjdraADGamh63D8m+4l0DLhgBUr/u7TYocucSDSq1tciR0HhE8Mgh5N4wriHH4Yw==",
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/testcafe/-/testcafe-1.1.4.tgz",
"integrity": "sha512-2c0erAxmRd8o018e0sQ1SVVyX1JlTXwUHlRIITF3u7bPAe40IFINhPGBA8KhDYwWDSaOUZp4ft6bxDef2g8Zgg==",
"dev": true,
"requires": {
"@types/node": "^10.12.19",
@ -8937,7 +8943,7 @@
"source-map-support": "^0.5.5",
"strip-bom": "^2.0.0",
"testcafe-browser-tools": "1.6.8",
"testcafe-hammerhead": "14.6.2",
"testcafe-hammerhead": "14.6.3",
"testcafe-legacy-api": "3.1.11",
"testcafe-reporter-json": "^2.1.0",
"testcafe-reporter-list": "^2.1.0",
@ -8952,9 +8958,9 @@
},
"dependencies": {
"@types/node": {
"version": "10.14.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.6.tgz",
"integrity": "sha512-Fvm24+u85lGmV4hT5G++aht2C5I4Z4dYlWZIh62FAfFO/TfzXtPpoLI6I7AuBWkIFqZCnhFOoTT7RjjaIL5Fjg==",
"version": "10.14.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.7.tgz",
"integrity": "sha512-on4MmIDgHXiuJDELPk1NFaKVUxxCFr37tm8E9yN6rAiF5Pzp/9bBfBHkoexqRiY+hk/Z04EJU9kKEb59YqJ82A==",
"dev": true
},
"ansi-regex": {
@ -9166,9 +9172,9 @@
}
},
"testcafe-hammerhead": {
"version": "14.6.2",
"resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-14.6.2.tgz",
"integrity": "sha512-07ay6koiLYOMDfJ/kfMwwiNGmWkXRuqNFoK8q+HmOl1AWN0C/hqV70ZIqaGuzUVa2Izn/nKslZ2sWLU0sST6bA==",
"version": "14.6.3",
"resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-14.6.3.tgz",
"integrity": "sha512-vMQGfO7d6Vy0wkyzAdBUQ4Rin7vLqJGrBvgjlvBaj2ec1oH+RX0IlOwCB3HFMA/JljM7BpVD7y97Jq9Ebcgs4g==",
"dev": true,
"requires": {
"acorn-hammerhead": "^0.2.0",
@ -9176,7 +9182,7 @@
"brotli": "^1.3.1",
"crypto-md5": "^1.0.0",
"css": "2.2.3",
"esotope-hammerhead": "^0.2.0",
"esotope-hammerhead": "^0.2.1",
"iconv-lite": "0.4.11",
"lodash": "4.17.11",
"lru-cache": "2.6.3",

View File

@ -16,9 +16,9 @@
"prepublishOnly": "npm run test-prep",
"build-config": "rollup -c rollup-config.config.js",
"types-docs": "npx babel-node --plugins @babel/plugin-transform-modules-commonjs jsdoc-check-overly-generic-types.js",
"open-es-allext": "opn http://localhost:8000/editor/svg-editor-es.html?extensions=ext-arrows.js,ext-closepath.js,ext-foreignobject.js,ext-helloworld.js,ext-mathjax.js,ext-php_savefile.js,ext-server_moinsave.js,ext-server_opensave.js,ext-webappfind.js,ext-xdomain-messaging.js",
"open-es-allext": "open-cli http://localhost:8000/editor/svg-editor-es.html?extensions=ext-arrows.js,ext-closepath.js,ext-foreignobject.js,ext-helloworld.js,ext-mathjax.js,ext-php_savefile.js,ext-server_moinsave.js,ext-server_opensave.js,ext-webappfind.js,ext-xdomain-messaging.js",
"build-docs": "rm -rf docs/jsdoc/*;jsdoc --pedantic -c docs/jsdoc-config.js editor",
"open-docs": "opn http://localhost:8000/docs/jsdoc/ && npm start",
"open-docs": "open-cli http://localhost:8000/docs/jsdoc/ && npm start",
"build-html": "npx babel-node --plugins @babel/plugin-transform-modules-commonjs build-html.js",
"compress-images": "imageoptim 'chrome-app/*.png' && imageoptim 'editor/extensions/*.png' && imageoptim 'editor/spinbtn/*.png' && imageoptim 'editor/jgraduate/images/*.{png,gif}' && imageoptim 'editor/images/*.png'",
"copy": "cp node_modules/load-stylesheets/dist/index-es.js editor/external/load-stylesheets/index-es.js && cp node_modules/jamilih/dist/jml-es.js editor/external/jamilih/jml-es.js && cp node_modules/query-result/esm/index.js editor/external/query-result/esm/index.js && cp node_modules/qr-manipulation/dist/index-es.js editor/external/qr-manipulation/dist/index-es.js && cp node_modules/stackblur-canvas/dist/stackblur-es.js editor/external/stackblur-canvas/dist/stackblur-es.js && cp node_modules/regenerator-runtime/runtime.js editor/external/regenerator-runtime/runtime.js && cp node_modules/core-js-bundle/minified.js editor/external/core-js-bundle/minified.js",
@ -27,10 +27,10 @@
"rollup": "rollup -c",
"start-embedded": "echo \"Open file to http://localhost:8000/editor/embedapi.html\" && static -p 8000 | static -p 8001 -H '{\"Access-Control-Allow-Origin\": \"*\"}'",
"start": "echo \"Open file to http://localhost:8000/test/all_tests.html\" && static -p 8000",
"test-no-build": "npm run eslint && npm run build-html && npm run build-config && opn http://localhost:8000/test/all_tests.html && static -p 8000",
"test-no-build": "npm run eslint && npm run build-html && npm run build-config && open-cli http://localhost:8000/test/all_tests.html && static -p 8000",
"test-prep": "npm run eslint && npm run build-html && npm run rollup && npm run build-config",
"test": "testcafe chrome test/ui-tests/**/*.js --skip-js-errors",
"browser-test": "npm run test-prep && opn http://localhost:8000/test/all_tests.html && static -p 8000"
"browser-test": "npm run test-prep && open-cli http://localhost:8000/test/all_tests.html && static -p 8000"
},
"repository": {
"type": "git",
@ -84,14 +84,14 @@
"@mysticatea/eslint-plugin": "^10.0.3",
"axe-testcafe": "^1.1.0",
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3",
"core-js-bundle": "^3.0.1",
"core-js-bundle": "^3.1.1",
"eslint": "5.16.0",
"eslint-config-ash-nazg": "4.0.0",
"eslint-config-standard": "12.0.0",
"eslint-plugin-compat": "^3.1.1",
"eslint-plugin-eslint-comments": "^3.1.1",
"eslint-plugin-import": "2.17.2",
"eslint-plugin-jsdoc": "^4.8.3",
"eslint-plugin-jsdoc": "^5.0.2",
"eslint-plugin-markdown": "^1.0.0",
"eslint-plugin-no-use-extend-native": "^0.4.0",
"eslint-plugin-node": "9.0.1",
@ -103,10 +103,10 @@
"find-in-files": "^0.5.0",
"imageoptim-cli": "^2.3.5",
"jamilih": "^0.44.0",
"jsdoc": "^3.6.1",
"jsdoc": "^3.6.2",
"load-stylesheets": "^0.7.0",
"node-static": "^0.7.11",
"opn-cli": "^4.1.0",
"open-cli": "^5.0.0",
"promise-fs": "^2.1.0",
"qr-manipulation": "https://github.com/brettz9/qr-manipulation",
"query-result": "https://github.com/WebReflection/query-result",
@ -114,13 +114,13 @@
"regenerator-runtime": "^0.13.2",
"remark-cli": "^6.0.1",
"remark-lint-ordered-list-marker-value": "^1.0.2",
"rollup": "1.11.2",
"rollup": "1.12.3",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-re": "^1.0.7",
"rollup-plugin-terser": "^4.0.4",
"sinon": "^7.3.2",
"sinon-test": "^2.4.0",
"stackblur-canvas": "^2.2.0",
"testcafe": "^1.1.3"
"testcafe": "^1.1.4"
}
}

View File

@ -28795,7 +28795,9 @@
* @property {boolean} [noStorageOnLoad=false] Some interaction with `ext-storage.js`; prevent even the loading of previously saved local storage.
* @property {boolean} [forceStorage=false] Some interaction with `ext-storage.js`; strongly discouraged from modification as it bypasses user privacy by preventing them from choosing whether to keep local storage or not (and may be required by law in some regions)
* @property {boolean} [emptyStorageOnDecline=false] Used by `ext-storage.js`; empty any prior storage if the user declines to store
* @property {boolean} [avoidClientSide=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSide=false] DEPRECATED (use `avoidClientSideDownload` instead); Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSideDownload=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking
* @property {boolean} [avoidClientSideOpen=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always open from the server and not only as fallback when FileReader client support is lacking
* @property {string[]} [extensions=module:SVGEditor~defaultExtensions] Extensions to load on startup. Use an array in `setConfig` and comma separated file names in the URL. Extension names must begin with "ext-". Note that as of version 2.7, paths containing "/", "\", or ":", are disallowed for security reasons. Although previous versions of this list would entirely override the default list, as of version 2.7, the defaults will always be added to this explicit list unless the configuration `noDefaultExtensions` is included.
* @property {module:SVGEditor.Stylesheet[]} [stylesheets=["@default"]] An array of required stylesheets to load in parallel; include the value `"@default"` within this array to ensure all default stylesheets are loaded.
* @property {string[]} [allowedOrigins=[]] Used by `ext-xdomain-messaging.js` to indicate which origins are permitted for cross-domain messaging (e.g., between the embedded editor and main editor code). Besides explicit domains, one might add '*' to allow all domains (not recommended for privacy/data integrity of your user's content!), `window.location.origin` for allowing the same origin (should be safe if you trust all apps on your domain), 'null' to allow `file:///` URL usage
@ -28904,8 +28906,11 @@
// Some interaction with ext-storage.js; strongly discouraged from modification as it bypasses user privacy by preventing them from choosing whether to keep local storage or not
emptyStorageOnDecline: false,
// Used by ext-storage.js; empty any prior storage if the user declines to store
// EXTENSION (CLIENT VS. SERVER SAVING)
avoidClientSide: false
// EXTENSION (CLIENT VS. SERVER SAVING/OPENING)
avoidClientSide: false,
// Deprecated in favor of `avoidClientSideDownload`
avoidClientSideDownload: false,
avoidClientSideOpen: false
},
/**