fix several configuration issue and linter

master
JFH 2021-05-19 23:09:40 +02:00
parent ab6a2a3ca2
commit e71958e705
27 changed files with 214 additions and 336 deletions

View File

@ -20,17 +20,12 @@ svgedit-custom.css
# Vendor/minified files
src/editor/jquery.min.js
src/editor/jquery-ui
# Previously minified though exporting
src/editor/js-hotkeys
src/editor/jspdf/jspdf.min.js
src/editor/jspdf/underscore-min.js
src/editor/extensions/ext-mathjax/mathjax
# jquery files
src/editor/svgicons/jQuery.svgIcons.js
src/editor/jgraduate/jQuery.jPicker.js

View File

@ -25,8 +25,10 @@ module.exports = {
"max-len": [ "warn", { "code": 250 } ],
/** @todo jsdoc should be made warn or error */
"valid-jsdoc": "off",
/** @todo cognitive complexity should be much lower (25-50?) */
/** @todo cognitive complexity should be much lower (25-50?) */
"sonarjs/cognitive-complexity": [ "warn", 200 ],
/** @todo no param reassign creates too many warnings but should be a warning */
"no-param-reassign": "off",
"node/no-unsupported-features/es-syntax": 0,
"no-unused-vars": [ "error", { "argsIgnorePattern": "^_" } ],
"sonarjs/no-duplicate-string": 0,
@ -39,7 +41,6 @@ module.exports = {
"warn",
{ "allow": [ "warn", "error", "info", "table" ] }
],
"no-param-reassign": [ "warn", { "props": false } ],
"arrow-parens": [ "error", "always" ],
},
overrides: [
@ -75,6 +76,12 @@ module.exports = {
}
]
}
},
{
files: [ 'src/editor/locale/*.js' ],
rules: { // lang files may have long length
"max-len": "off",
}
}
]
};

View File

@ -1,5 +1,11 @@
# SVG-Edit CHANGES
## 7.0.0 (preview - work in progress)
- New UI
- Rearchitecture the code (more modular)
- simplify and refresh the build process
- Introduce Web Component to replace jQuery UI
- update dependencies
## 6.0.0 (unreleased)
- Project: Add `FUNDING.yml` to accept contributions

153
README.md
View File

@ -16,167 +16,53 @@
[![Total Alerts](https://img.shields.io/lgtm/alerts/g/SVG-Edit/svgedit.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/SVG-Edit/svgedit/alerts)
[![Code Quality: Javascript](https://img.shields.io/lgtm/grade/javascript/g/SVG-Edit/svgedit.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/SVG-Edit/svgedit/context:javascript)
[![Licenses badge](https://raw.githubusercontent.com/SVG-Edit/svgedit/master/badges/licenses-badge.svg?sanitize=true)](badges/licenses-badge.svg)
(see also [licenses for dev. deps.](https://raw.githubusercontent.com/SVG-Edit/svgedit/master/badges/licenses-badge-dev.svg?sanitize=true))
[![issuehunt-to-marktext](https://issuehunt.io/static/embed/issuehunt-button-v1.svg)](https://issuehunt.io/r/SVG-Edit/svgedit)
SVG-edit is a fast, web-based, JavaScript-driven SVG drawing editor that
works in any modern browser.
![screenshot](docs/screenshot.png)
[SVG](https://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg)
[](https://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg)
## Help wanted
We need more maintainers for SVG-Edit
SVG-Edit is the most popular open source SVG editor. It was started more than 10 years ago by a fantastic team of developers. Unfortunately, the product was not maintained for a quite long period. We decided to give this tool a new life by refreshing many aspects.
If you can help us to maintain SVG-Edit, you are more than welcome!
## Demo
### [Try SVG-edit here](https://svgedit.netlify.app/editor/index.html)
Thanks to Netlify, you can test the following builds:
Thanks to netlify, you can test the following builds:
### [Try SVG-edit V7-preview here](https://svgedit.netlify.app/editor/index.html)
[Try SVG-edit 5.1.0 here](https://6098683962bf91702907ee33--svgedit.netlify.app/editor/svg-editor.html)
[Try SVG-edit 6.1.0 here](https://60a0000fc9900b0008fd268d--svgedit.netlify.app/editor/index.html)
/
## Installation
### Quick install
1. Clone or copy the repository contents (at least the `editor` directory).
Please note that you should not do a recursive Git clone (i.e., with the
`--recursive` or `--recurse-submodules` flags), as you will get assorted
past versions (which are available on the parent as branches anyways).
(The reason these past versions are available as submodules is merely
for convenience in hosting these versions, along with `master`, online
on Github Pages.)
1. If you need programmatic customization, see its section below.
1. Otherwise, just add an iframe to your site, adding any extensions or
configuration (see `docs/tutorials/ConfigOptions.md`
([ConfigOptions]{@tutorial ConfigOptions})) within the URL:
1. Clone or copy the repository contents
1. run `npm i` to install dependencies
1. run `npm run start` to start a local server
1. Use your browser to access `http://localhost:8000/src/editor/index.html`
```html
<iframe src="svgedit/src/editor/svg-editor.html?extensions="
width="100%" height="100%"></iframe>
```
### Integrating SVG-edit into your own application
### Integrating SVG-edit into your own npm package
V7 is changing significantly the way to integrate and customize SVG-Edit. The documentation will be detailed here.
These steps are only needed if you wish to set up your own npm package
incorporating SVGEdit. You will need to have Node.js/npm installed.
1. Create and enter an empty folder somewhere on your desktop.
1. Create your npm package: `npm init` (complete the fields).
1. Install SVG-edit into your package:
`npm i --save svgedit`.
1. Look within `node_modules/svgedit/`, e.g., `node_modules/svgedit/src/editor/svg-editor.html`
for the files your package needs and use accordingly (from outside of
`node_modules`).
1. If you want to publish your own work, you can use `npm publish`.
## Programmatic customization
1. If you are not concerned about supporting ES6 Modules (see the
"ES6 Modules file" section), you can add your config directly to
`svgedit-config-iife.js` within the SVG-Edit project root.
1. Note: Do not remove the `import svgEditor...` code which is responsible
for importing the SVG edit code. Versions prior to 3.0 did not require
this, but the advantage is that your HTML does not need to be polluted
with extra script references.
1. Modify or utilize any options. See `docs/tutorials/ConfigOptions.md`
([ConfigOptions]{@tutorial ConfigOptions}).
## ES6 Modules file
1. `svg-editor-es.html` is an HTML file directly using ES6 modules.
It is only supported in the latest browsers. It is probably mostly
useful for debugging, as it requires more network requests.
If you would like to work with this file, you should make configuration
changes in `svgedit-config-es.js` (in the SVG-Edit project root).
1. If you are working with the ES6 Modules config but also wish to work with
the normal `svg-editor.html` version (so your code can work in older
browsers or get the presumable performance benefits of this file which
references JavaScript rolled up into a single file), you can follow these
steps after any config changes you make, so that your changes can also be
automatically made available to both versions.
1. JavaScript:
1. Run `npm install` within the svgedit directory
(`node_modules/svgedit` if you installed via npm) and the root
repository directory if you cloned the Git repository instead.
This will install the build tools for SVG-edit.
1. Run `npm run build-by-config` within the svgedit directory mentioned
in the step above.
1. This will rebuild `svgedit-config-iife.js` (applying Babel to
allow it to work on older browsers and applying Rollup to build
all JavaScript into one file). The file will then contain
non-ES6 module JavaScript that can work in older browsers.
Note that it bundles all of SVGEdit, so it is to be expected
that this file will be much larger in size than the original
ES6 config file.
1. HTML:
1. If you wish to make changes to both HTML files, it is recommended that
you work and test on `svg-editor-es.html` and then run
`npm run build-html` to have the changes properly copied to
`svg-editor.html`.
## Recent news
- 2020-02-22 Published 6.0.0 License clarifications/updates, PDF export
improvements, clipboard `sessionStorage`, and other changes.
- 2019-11-16 Published 5.1.0 Misc. fixes and refactoring
- 2019-05-07 Published 5.0.0 Change from `@babel/polyfill`
- 2019-04-03 Published 4.3.0 Fix for double click on gradient
picker droplets affecting some browsers and dragging control
point of arc. Other misc. fixes. Some accessibility and i18n.
- 2018-12-13 Published 4.2.0 (Chinese (simplified) and Russian locale
updates; retaining lines with grid mode)
- 2018-11-29 Published 4.1.0 (Fix for hyphenated locales, svgcanvas
distributions)
- 2018-11-16 Published 4.0.0/4.0.1 (Move to Promise-based APIs)
- 2018-11-01 Published 3.2.0 (Update qunit to resolve security vulnerability
of a dependency)
- 2018-10-25 Published 3.1.1 (Fix for saving SVG on Firefox)
- 2018-10-24 Published 3.1.0 (Redirect on modular page for non-module-support;
versions document (for migrating))
- 2018-10-22 Published 3.0.1 (Revert fix affecting polygon selection)
- 2018-10-21 Published 3.0.0 (misc. improvements including centering canvas and
key locale fixes since last RC)
- 2018-09-30 Published 3.0.0-rc.3 with security and other fixes
- 2018-07-31 Published 3.0.0-rc.2 with misc. fixes
- 2018-07-19 Published 3.0.0-rc.1 allowing for extensions and locales to be
expressed as modules
- 2018-05-26 Published 3.0.0-alpha.2 with ES6 Modules support
- 2017-07 Added to Packagist: https://packagist.org/packages/svg-edit/svgedit
- 2015-12-02 SVG-edit 2.8.1 was released.
- 2015-11-24 SVG-edit 2.8 was released.
- 2015-11-24 Code, issue tracking, and docs are being moved to github
(previously [code.google.com](https://code.google.com/p/svg-edit)).
- 2014-04-17 2.7 and stable branches updated to reflect 2.7.1 important bug
fixes for the embedded editor.
- 2014-04-07 SVG-edit 2.7 was released.
- 2013-01-15 SVG-edit 2.6 was released.
## Videos
* [SVG-edit 2.4 Part 1](https://www.youtube.com/watch?v=zpC7b1ZJvvM)
* [SVG-edit 2.4 Part 2](https://www.youtube.com/watch?v=mDzZEoGUDe8)
* [SVG-edit 2.3 Features](https://www.youtube.com/watch?v=RVIcIy5fXOc)
* [Introduction to SVG-edit](https://www.youtube.com/watch?v=ZJKmEI06YiY) (Version 2.2)
SVG-Edit is made of two major components:
1. The "svgcanvas" that takes care of the underlying svg edition. It can be used to build your own editor. See example in the demos folder or the svg-edit-react repository.
1. The "editor" that takes care of the editor UI (menus, buttons, etc.)
For earlier versions of SVG-Edit, please look in their respective branches.
## Supported browsers
- Opera 59+,
- IE 12+,
- Chrome 75+,
- FireFox 68+,
- Safari 10+
- Safari 11+
- Edge 18+
Support for old browsers may require to use an older version of the package. However,
please open an issue if you need support for a specific version of your browser so
@ -191,11 +77,6 @@ incorporating SVGEdit. You will need to have Node.js/npm installed.
* See [AUTHORS](AUTHORS) file for authors.
* [StackOverflow](https://stackoverflow.com/tags/svg-edit) group.
## Older references
* Join the [svg-edit mailing list](https://groups.google.com/forum/#!forum/svg-edit).
* Join us on `#svg-edit` on `freenode.net` (or use the
[web client](https://webchat.freenode.net/?channels=svg-edit)).
# Hosting
SVGedit versions are deployed to:
[![Deploys by Netlify](https://www.netlify.com/img/global/badges/netlify-color-accent.svg)](https://www.netlify.com)

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="863" height="116"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="navy" d="M0 0h227v116H0z"/><path fill="green" d="M227 0h265v116H227z"/><path fill="#cc0" d="M492 0h128v116H492z"/><path fill="#a9a9a9" d="M620 0h243v116H620z"/><path fill="url(#smooth)" d="M0 0h863v116H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">License types</text><text class="high" x="5" y="14">License types</text><text class="shadow" x="5.5" y="27">(project, deps, and bundled devDeps)</text><text class="high" x="5" y="26">(project, deps, and bundled devDeps)</text><text class="shadow" x="232.5" y="15">Permissive</text><text class="high" x="232" y="14">Permissive</text><text class="shadow" x="232.5" y="39">1. (MIT OR Apache-2.0)</text><text class="high" x="232" y="38">1. (MIT OR Apache-2.0)</text><text class="shadow" x="232.5" y="51">2. (MPL-2.0 OR Apache-2.0)</text><text class="high" x="232" y="50">2. (MPL-2.0 OR Apache-2.0)</text><text class="shadow" x="232.5" y="63">3. Apache-2.0</text><text class="high" x="232" y="62">3. Apache-2.0</text><text class="shadow" x="232.5" y="75">4. ISC</text><text class="high" x="232" y="74">4. ISC</text><text class="shadow" x="232.5" y="87">5. MIT</text><text class="high" x="232" y="86">5. MIT</text><text class="shadow" x="232.5" y="99">6. MIT OR SEE LICENSE IN FEEL-FREE.md</text><text class="high" x="232" y="98">6. MIT OR SEE LICENSE IN FEEL-FREE.md</text><text class="shadow" x="232.5" y="111">7. X11</text><text class="high" x="232" y="110">7. X11</text><text class="shadow" x="497.5" y="15">Weakly</text><text class="high" x="497" y="14">Weakly</text><text class="shadow" x="497.5" y="27">protective</text><text class="high" x="497" y="26">protective</text><text class="shadow" x="497.5" y="51">1. LGPL-3.0-or-later</text><text class="high" x="497" y="50">1. LGPL-3.0-or-later</text><text class="shadow" x="625.5" y="15">Uncategorized</text><text class="high" x="625" y="14">Uncategorized</text><text class="shadow" x="625.5" y="39">1. Chromium&apos;s License (pathseg (1.2.0))</text><text class="high" x="625" y="38">1. Chromium&apos;s License (pathseg (1.2.0))</text></g></svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -25,6 +25,10 @@
{
"name": "Brett Zamir",
"email": "brettz9@yahoo.com"
},
{
"name": "Optimistik SAS",
"email": "contact@optimistik.fr"
}
],
"keywords": [

View File

@ -1,4 +1,4 @@
/* eslint-disable max-len */
/* eslint-disable max-len, no-console */
import '../../../instrumented/editor/jquery.min.js';
import SvgCanvas from '../../../instrumented/svgcanvas/svgcanvas.js';

View File

@ -1,4 +1,4 @@
/* eslint-disable max-len */
/* eslint-disable max-len, no-console */
import 'pathseg';
import '../../../instrumented/editor/jquery.min.js';

View File

@ -151,7 +151,7 @@ const localeStrings = await importSetGlobalDefault(url, {
});
// Use `localeStrings`
console.log(localeStrings);
console.info(localeStrings);
})();
```

View File

@ -2,7 +2,4 @@ extraction:
javascript:
index:
filters:
- exclude: "src/xdomain-svgedit-config-iife.js"
- exclude: "src/svgedit-config-iife.js"
- exclude: "src/editor/redirect-on-no-module-support.js"
- exclude: "dist"

240
package-lock.json generated
View File

@ -1,28 +1,28 @@
{
"name": "svgedit",
"version": "6.0.0",
"version": "7.0.0-preview",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "6.0.0",
"version": "7.0.0-preview",
"license": "(MIT AND Apache-2.0 AND ISC AND LGPL-3.0-or-later AND X11)",
"dependencies": {
"@babel/polyfill": "7.12.1",
"@web/dev-server-rollup": "0.3.3",
"@web/dev-server-rollup": "0.3.4",
"canvg": "3.0.7",
"core-js": "3.12.1",
"deparam": "^1.0.5",
"elix": "^15.0.0",
"i18next": "^20.2.2",
"deparam": "1.0.5",
"elix": "15.0.0",
"i18next": "20.2.4",
"jspdf": "2.3.1",
"pathseg": "1.2.0",
"regenerator-runtime": "0.13.7",
"rollup-plugin-polyfill-node": "^0.6.2",
"rollup-plugin-polyfill-node": "0.6.2",
"svg2pdf.js": "2.1.0"
},
"devDependencies": {
"@babel/core": "7.14.2",
"@babel/core": "7.14.3",
"@babel/preset-env": "7.14.2",
"@babel/register": "7.13.16",
"@babel/runtime-corejs3": "7.14.0",
@ -37,8 +37,8 @@
"@rollup/plugin-node-resolve": "11.2.1",
"@rollup/plugin-replace": "2.4.2",
"@rollup/plugin-url": "6.0.0",
"@web/dev-server": "^0.1.17",
"axe-core": "4.2.0",
"@web/dev-server": "0.1.17",
"axe-core": "4.2.1",
"babel-plugin-transform-object-rest-spread": "7.0.0-beta.3",
"copyfiles": "2.4.1",
"core-js-bundle": "3.12.1",
@ -59,8 +59,8 @@
"eslint-plugin-cypress": "2.11.3",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-html": "^6.1.2",
"eslint-plugin-import": "2.23.0",
"eslint-plugin-jsdoc": "34.2.2",
"eslint-plugin-import": "2.23.2",
"eslint-plugin-jsdoc": "34.8.2",
"eslint-plugin-markdown": "^2.1.0",
"eslint-plugin-mocha": "8.1.0",
"eslint-plugin-mocha-cleanup": "1.9.1",
@ -73,7 +73,7 @@
"eslint-plugin-unicorn": "32.0.1",
"imageoptim-cli": "3.0.2",
"jamilih": "0.54.0",
"jsdoc": "3.6.6",
"jsdoc": "3.6.7",
"mocha": "8.4.0",
"mocha-badge-generator": "0.9.0",
"mochawesome": "6.2.2",
@ -90,7 +90,7 @@
"remark-lint-ordered-list-marker-value": "2.0.1",
"requirejs": "2.3.6",
"rimraf": "3.0.2",
"rollup": "2.47.0",
"rollup": "2.48.0",
"rollup-plugin-copy": "3.4.0",
"rollup-plugin-filesize": "9.1.1",
"rollup-plugin-node-polyfills": "0.2.1",
@ -123,17 +123,17 @@
"dev": true
},
"node_modules/@babel/core": {
"version": "7.14.2",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.2.tgz",
"integrity": "sha512-OgC1mON+l4U4B4wiohJlQNUU3H73mpTyYY3j/c8U9dr9UagGGSm+WFpzjy/YLdoyjiG++c1kIDgxCo/mLwQJeQ==",
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.3.tgz",
"integrity": "sha512-jB5AmTKOCSJIZ72sd78ECEhuPiDMKlQdDI/4QRI6lzYATx5SSogS1oQA2AoPecRCknm30gHi2l+QVvNUu3wZAg==",
"dev": true,
"dependencies": {
"@babel/code-frame": "^7.12.13",
"@babel/generator": "^7.14.2",
"@babel/generator": "^7.14.3",
"@babel/helper-compilation-targets": "^7.13.16",
"@babel/helper-module-transforms": "^7.14.2",
"@babel/helpers": "^7.14.0",
"@babel/parser": "^7.14.2",
"@babel/parser": "^7.14.3",
"@babel/template": "^7.12.13",
"@babel/traverse": "^7.14.2",
"@babel/types": "^7.14.2",
@ -203,9 +203,9 @@
}
},
"node_modules/@babel/generator": {
"version": "7.14.2",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.2.tgz",
"integrity": "sha512-OnADYbKrffDVai5qcpkMxQ7caomHOoEwjkouqnN2QhydAjowFAZcsdecFIRUBdb+ZcruwYE4ythYmF1UBZU5xQ==",
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.3.tgz",
"integrity": "sha512-bn0S6flG/j0xtQdz3hsjJ624h3W0r3llttBMfyHX3YrZ/KtLYr15bjA0FXkgW7FpvrDuTuElXeVjiKlYRpnOFA==",
"dev": true,
"dependencies": {
"@babel/types": "^7.14.2",
@ -530,9 +530,9 @@
}
},
"node_modules/@babel/parser": {
"version": "7.14.2",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.2.tgz",
"integrity": "sha512-IoVDIHpsgE/fu7eXBeRWt8zLbDrSvD7H1gpomOkPpBoEN8KCruCqSDdqo8dddwQQrui30KSvQBaMUOJiuFu6QQ==",
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.3.tgz",
"integrity": "sha512-7MpZDIfI7sUC5zWo2+foJ50CSI5lcqDehZ0lVgIhSi4bFEk94fLAKlF3Q0nzSQQ+ca0lm+O6G9ztKVBeu8PMRQ==",
"dev": true,
"bin": {
"parser": "bin/babel-parser.js"
@ -2492,9 +2492,9 @@
"dev": true
},
"node_modules/@es-joy/jsdoccomment": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.4.4.tgz",
"integrity": "sha512-ua4qDt9dQb4qt5OI38eCZcQZYE5Bq3P0GzgvDARdT8Lt0mAUpxKTPy8JGGqEvF77tG1irKDZ3WreeezEa3P43w==",
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.6.0.tgz",
"integrity": "sha512-zT1EtysKMITJ7vE4RvOJqitxk/Str6It8hq+fykxkwLuTyzgak+TnVuVSIyovT/qrEz3i46ypCSXgNtIDYwNOg==",
"dev": true,
"dependencies": {
"comment-parser": "^1.1.5",
@ -4253,7 +4253,6 @@
"dependencies": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
"fsevents": "~2.3.1",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
@ -4376,9 +4375,9 @@
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"node_modules/@web/dev-server-rollup": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.3.3.tgz",
"integrity": "sha512-3v+PG9xC+Q07NOVTqqYuab/XqDQfWXltVzOI6HstBD0RWP7u7Bk4G0BwSjD3RNdIzyrTW//zCwyCN7UkHNhIBA==",
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.3.4.tgz",
"integrity": "sha512-QFaqHpJXri1TuN1yN0N670bxF5noC1RtIHPhoM5Sp6YX7v3610Z/fq465V7fNaeHnTNN7dIUmNkK9vqLIrsYTg==",
"dependencies": {
"@web/dev-server-core": "^0.3.3",
"chalk": "^4.1.0",
@ -5242,9 +5241,9 @@
"dev": true
},
"node_modules/axe-core": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.2.0.tgz",
"integrity": "sha512-1uIESzroqpaTzt9uX48HO+6gfnKu3RwvWdCcWSrX4csMInJfCo1yvKPNXCwXFRpJqRW25tiASb6No0YH57PXqg==",
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.2.1.tgz",
"integrity": "sha512-evY7DN8qSIbsW2H/TWQ1bX3sXN1d4MNb5Vb4n7BzPuCwRHdkZ1H2eNLuSh73EoQqkGKUtju2G2HCcjCfhvZIAA==",
"dev": true,
"engines": {
"node": ">=4"
@ -7284,15 +7283,15 @@
"dev": true
},
"node_modules/catharsis": {
"version": "0.8.11",
"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz",
"integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==",
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz",
"integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==",
"dev": true,
"dependencies": {
"lodash": "^4.17.14"
"lodash": "^4.17.15"
},
"engines": {
"node": ">= 8"
"node": ">= 10"
}
},
"node_modules/chalk": {
@ -7351,7 +7350,6 @@
"anymatch": "^2.0.0",
"async-each": "^1.0.1",
"braces": "^2.3.2",
"fsevents": "^1.2.7",
"glob-parent": "^3.1.0",
"inherits": "^2.0.3",
"is-binary-path": "^1.0.0",
@ -9944,8 +9942,7 @@
"esprima": "^4.0.1",
"estraverse": "^4.2.0",
"esutils": "^2.0.2",
"optionator": "^0.8.1",
"source-map": "~0.6.1"
"optionator": "^0.8.1"
},
"bin": {
"escodegen": "bin/escodegen.js",
@ -10324,9 +10321,9 @@
}
},
"node_modules/eslint-plugin-import": {
"version": "2.23.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.23.0.tgz",
"integrity": "sha512-W5v1f7Cbam6BwbSSKtN6+yoUAms07ozbqAEhLOtf5erEqRv7w67PeZuAuBThaUkzdq2GfBx/5GBvxF+NWJshrQ==",
"version": "2.23.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.23.2.tgz",
"integrity": "sha512-LmNoRptHBxOP+nb0PIKz1y6OSzCJlB+0g0IGS3XV4KaKk2q4szqQ6s6F1utVf5ZRkxk/QOTjdxe7v4VjS99Bsg==",
"dev": true,
"dependencies": {
"array-includes": "^3.1.3",
@ -10424,12 +10421,12 @@
}
},
"node_modules/eslint-plugin-jsdoc": {
"version": "34.2.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-34.2.2.tgz",
"integrity": "sha512-9JCeUUZ2MefGd/Pl3blx9/EDjCd7/Z2+fcVBuJdNdvSLApRqZ8CwjGjLHf5s4uVikqF968A0CfnID0WK9B/H/w==",
"version": "34.8.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-34.8.2.tgz",
"integrity": "sha512-UOU9A40Cl806JMtla2vF+RM6sNqfLPbhLv9FZqhcC7+LmChD3DVaWqM7ADxpF0kMyZNWe1QKUnqGnXaA3NTn+w==",
"dev": true,
"dependencies": {
"@es-joy/jsdoccomment": "^0.4.4",
"@es-joy/jsdoccomment": "^0.6.0",
"comment-parser": "1.1.5",
"debug": "^4.3.1",
"esquery": "^1.4.0",
@ -13122,9 +13119,9 @@
}
},
"node_modules/i18next": {
"version": "20.2.2",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-20.2.2.tgz",
"integrity": "sha512-uWCv9LzKpe+OwvnKKrb8CbJwgAhasQofD58cB0PQ6bTPXEl5PlItl5C4esmY8HtriLu9nrjc2Hi0IfYv3Fy8BQ==",
"version": "20.2.4",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-20.2.4.tgz",
"integrity": "sha512-goE1LCA/IZOGG26PkkqoOl2KWR7YP606SvokVQZ29J6QwE02KycrzNetoMUJeqYrTxs4rmiiZgZp+q8qofQL6Q==",
"dependencies": {
"@babel/runtime": "^7.12.0"
}
@ -14473,25 +14470,25 @@
"dev": true
},
"node_modules/jsdoc": {
"version": "3.6.6",
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.6.tgz",
"integrity": "sha512-znR99e1BHeyEkSvgDDpX0sTiTu+8aQyDl9DawrkOGZTTW8hv0deIFXx87114zJ7gRaDZKVQD/4tr1ifmJp9xhQ==",
"version": "3.6.7",
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.7.tgz",
"integrity": "sha512-sxKt7h0vzCd+3Y81Ey2qinupL6DpRSZJclS04ugHDNmRUXGzqicMJ6iwayhSA0S0DwwX30c5ozyUthr1QKF6uw==",
"dev": true,
"dependencies": {
"@babel/parser": "^7.9.4",
"bluebird": "^3.7.2",
"catharsis": "^0.8.11",
"catharsis": "^0.9.0",
"escape-string-regexp": "^2.0.0",
"js2xmlparser": "^4.0.1",
"klaw": "^3.0.0",
"markdown-it": "^10.0.0",
"markdown-it-anchor": "^5.2.7",
"marked": "^0.8.2",
"marked": "^2.0.3",
"mkdirp": "^1.0.4",
"requizzle": "^0.2.3",
"strip-json-comments": "^3.1.0",
"taffydb": "2.6.2",
"underscore": "~1.10.2"
"underscore": "~1.13.1"
},
"bin": {
"jsdoc": "jsdoc.js"
@ -14536,12 +14533,6 @@
"node": ">=8"
}
},
"node_modules/jsdoc/node_modules/underscore": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz",
"integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==",
"dev": true
},
"node_modules/jsdoctypeparser": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz",
@ -14729,8 +14720,7 @@
"canvg": "^3.0.6",
"core-js": "^3.6.0",
"dompurify": "^2.2.0",
"fflate": "^0.4.8",
"html2canvas": "^1.0.0-rc.5"
"fflate": "^0.4.8"
},
"optionalDependencies": {
"html2canvas": "^1.0.0-rc.5"
@ -15777,9 +15767,9 @@
"dev": true
},
"node_modules/marked": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz",
"integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/marked/-/marked-2.0.3.tgz",
"integrity": "sha512-5otztIIcJfPc2qGTN8cVtOJEjNJZ0jwa46INMagrYfk0EvqtRuEHLsEe0LrFS0/q+ZRKT0+kXK7P2T1AN5lWRA==",
"dev": true,
"bin": {
"marked": "bin/marked"
@ -16289,7 +16279,6 @@
"integrity": "sha512-akCrLDWfbdAWkMLBxJEeWTdNsjML+dt5YgOI4gJ53vuO0vrmYQkUPxa6j6V65s9CcePIr2SSWqjT2EcrNseryQ==",
"dev": true,
"dependencies": {
"encoding": "^0.1.12",
"minipass": "^3.1.0",
"minipass-sized": "^1.0.3",
"minizlib": "^2.0.0"
@ -16531,7 +16520,6 @@
"dependencies": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
"fsevents": "~2.3.1",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
@ -20281,12 +20269,9 @@
}
},
"node_modules/rollup": {
"version": "2.47.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.47.0.tgz",
"integrity": "sha512-rqBjgq9hQfW0vRmz+0S062ORRNJXvwRpzxhFXORvar/maZqY6za3rgQ/p1Glg+j1hnc1GtYyQCPiAei95uTElg==",
"dependencies": {
"fsevents": "~2.3.1"
},
"version": "2.48.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.48.0.tgz",
"integrity": "sha512-wl9ZSSSsi5579oscSDYSzGn092tCS076YB+TQrzsGuSfYyJeep8eEWj0eaRjuC5McuMNmcnR8icBqiE/FWNB1A==",
"bin": {
"rollup": "dist/bin/rollup"
},
@ -22862,7 +22847,6 @@
"dependencies": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
"fsevents": "~2.1.2",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
@ -24328,17 +24312,17 @@
"dev": true
},
"@babel/core": {
"version": "7.14.2",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.2.tgz",
"integrity": "sha512-OgC1mON+l4U4B4wiohJlQNUU3H73mpTyYY3j/c8U9dr9UagGGSm+WFpzjy/YLdoyjiG++c1kIDgxCo/mLwQJeQ==",
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.3.tgz",
"integrity": "sha512-jB5AmTKOCSJIZ72sd78ECEhuPiDMKlQdDI/4QRI6lzYATx5SSogS1oQA2AoPecRCknm30gHi2l+QVvNUu3wZAg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",
"@babel/generator": "^7.14.2",
"@babel/generator": "^7.14.3",
"@babel/helper-compilation-targets": "^7.13.16",
"@babel/helper-module-transforms": "^7.14.2",
"@babel/helpers": "^7.14.0",
"@babel/parser": "^7.14.2",
"@babel/parser": "^7.14.3",
"@babel/template": "^7.12.13",
"@babel/traverse": "^7.14.2",
"@babel/types": "^7.14.2",
@ -24393,9 +24377,9 @@
}
},
"@babel/generator": {
"version": "7.14.2",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.2.tgz",
"integrity": "sha512-OnADYbKrffDVai5qcpkMxQ7caomHOoEwjkouqnN2QhydAjowFAZcsdecFIRUBdb+ZcruwYE4ythYmF1UBZU5xQ==",
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.3.tgz",
"integrity": "sha512-bn0S6flG/j0xtQdz3hsjJ624h3W0r3llttBMfyHX3YrZ/KtLYr15bjA0FXkgW7FpvrDuTuElXeVjiKlYRpnOFA==",
"dev": true,
"requires": {
"@babel/types": "^7.14.2",
@ -24701,9 +24685,9 @@
}
},
"@babel/parser": {
"version": "7.14.2",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.2.tgz",
"integrity": "sha512-IoVDIHpsgE/fu7eXBeRWt8zLbDrSvD7H1gpomOkPpBoEN8KCruCqSDdqo8dddwQQrui30KSvQBaMUOJiuFu6QQ==",
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.3.tgz",
"integrity": "sha512-7MpZDIfI7sUC5zWo2+foJ50CSI5lcqDehZ0lVgIhSi4bFEk94fLAKlF3Q0nzSQQ+ca0lm+O6G9ztKVBeu8PMRQ==",
"dev": true
},
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
@ -26496,9 +26480,9 @@
}
},
"@es-joy/jsdoccomment": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.4.4.tgz",
"integrity": "sha512-ua4qDt9dQb4qt5OI38eCZcQZYE5Bq3P0GzgvDARdT8Lt0mAUpxKTPy8JGGqEvF77tG1irKDZ3WreeezEa3P43w==",
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.6.0.tgz",
"integrity": "sha512-zT1EtysKMITJ7vE4RvOJqitxk/Str6It8hq+fykxkwLuTyzgak+TnVuVSIyovT/qrEz3i46ypCSXgNtIDYwNOg==",
"dev": true,
"requires": {
"comment-parser": "^1.1.5",
@ -28229,9 +28213,9 @@
}
},
"@web/dev-server-rollup": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.3.3.tgz",
"integrity": "sha512-3v+PG9xC+Q07NOVTqqYuab/XqDQfWXltVzOI6HstBD0RWP7u7Bk4G0BwSjD3RNdIzyrTW//zCwyCN7UkHNhIBA==",
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.3.4.tgz",
"integrity": "sha512-QFaqHpJXri1TuN1yN0N670bxF5noC1RtIHPhoM5Sp6YX7v3610Z/fq465V7fNaeHnTNN7dIUmNkK9vqLIrsYTg==",
"requires": {
"@web/dev-server-core": "^0.3.3",
"chalk": "^4.1.0",
@ -28824,9 +28808,9 @@
"dev": true
},
"axe-core": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.2.0.tgz",
"integrity": "sha512-1uIESzroqpaTzt9uX48HO+6gfnKu3RwvWdCcWSrX4csMInJfCo1yvKPNXCwXFRpJqRW25tiASb6No0YH57PXqg==",
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.2.1.tgz",
"integrity": "sha512-evY7DN8qSIbsW2H/TWQ1bX3sXN1d4MNb5Vb4n7BzPuCwRHdkZ1H2eNLuSh73EoQqkGKUtju2G2HCcjCfhvZIAA==",
"dev": true
},
"axios": {
@ -30690,12 +30674,12 @@
"dev": true
},
"catharsis": {
"version": "0.8.11",
"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz",
"integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==",
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz",
"integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==",
"dev": true,
"requires": {
"lodash": "^4.17.14"
"lodash": "^4.17.15"
}
},
"chalk": {
@ -33477,9 +33461,9 @@
}
},
"eslint-plugin-import": {
"version": "2.23.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.23.0.tgz",
"integrity": "sha512-W5v1f7Cbam6BwbSSKtN6+yoUAms07ozbqAEhLOtf5erEqRv7w67PeZuAuBThaUkzdq2GfBx/5GBvxF+NWJshrQ==",
"version": "2.23.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.23.2.tgz",
"integrity": "sha512-LmNoRptHBxOP+nb0PIKz1y6OSzCJlB+0g0IGS3XV4KaKk2q4szqQ6s6F1utVf5ZRkxk/QOTjdxe7v4VjS99Bsg==",
"dev": true,
"requires": {
"array-includes": "^3.1.3",
@ -33555,12 +33539,12 @@
}
},
"eslint-plugin-jsdoc": {
"version": "34.2.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-34.2.2.tgz",
"integrity": "sha512-9JCeUUZ2MefGd/Pl3blx9/EDjCd7/Z2+fcVBuJdNdvSLApRqZ8CwjGjLHf5s4uVikqF968A0CfnID0WK9B/H/w==",
"version": "34.8.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-34.8.2.tgz",
"integrity": "sha512-UOU9A40Cl806JMtla2vF+RM6sNqfLPbhLv9FZqhcC7+LmChD3DVaWqM7ADxpF0kMyZNWe1QKUnqGnXaA3NTn+w==",
"dev": true,
"requires": {
"@es-joy/jsdoccomment": "^0.4.4",
"@es-joy/jsdoccomment": "^0.6.0",
"comment-parser": "1.1.5",
"debug": "^4.3.1",
"esquery": "^1.4.0",
@ -35476,9 +35460,9 @@
}
},
"i18next": {
"version": "20.2.2",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-20.2.2.tgz",
"integrity": "sha512-uWCv9LzKpe+OwvnKKrb8CbJwgAhasQofD58cB0PQ6bTPXEl5PlItl5C4esmY8HtriLu9nrjc2Hi0IfYv3Fy8BQ==",
"version": "20.2.4",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-20.2.4.tgz",
"integrity": "sha512-goE1LCA/IZOGG26PkkqoOl2KWR7YP606SvokVQZ29J6QwE02KycrzNetoMUJeqYrTxs4rmiiZgZp+q8qofQL6Q==",
"requires": {
"@babel/runtime": "^7.12.0"
}
@ -36548,25 +36532,25 @@
"dev": true
},
"jsdoc": {
"version": "3.6.6",
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.6.tgz",
"integrity": "sha512-znR99e1BHeyEkSvgDDpX0sTiTu+8aQyDl9DawrkOGZTTW8hv0deIFXx87114zJ7gRaDZKVQD/4tr1ifmJp9xhQ==",
"version": "3.6.7",
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.7.tgz",
"integrity": "sha512-sxKt7h0vzCd+3Y81Ey2qinupL6DpRSZJclS04ugHDNmRUXGzqicMJ6iwayhSA0S0DwwX30c5ozyUthr1QKF6uw==",
"dev": true,
"requires": {
"@babel/parser": "^7.9.4",
"bluebird": "^3.7.2",
"catharsis": "^0.8.11",
"catharsis": "^0.9.0",
"escape-string-regexp": "^2.0.0",
"js2xmlparser": "^4.0.1",
"klaw": "^3.0.0",
"markdown-it": "^10.0.0",
"markdown-it-anchor": "^5.2.7",
"marked": "^0.8.2",
"marked": "^2.0.3",
"mkdirp": "^1.0.4",
"requizzle": "^0.2.3",
"strip-json-comments": "^3.1.0",
"taffydb": "2.6.2",
"underscore": "~1.10.2"
"underscore": "~1.13.1"
},
"dependencies": {
"bluebird": {
@ -36592,12 +36576,6 @@
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"dev": true
},
"underscore": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz",
"integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==",
"dev": true
}
}
},
@ -37625,9 +37603,9 @@
"dev": true
},
"marked": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz",
"integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/marked/-/marked-2.0.3.tgz",
"integrity": "sha512-5otztIIcJfPc2qGTN8cVtOJEjNJZ0jwa46INMagrYfk0EvqtRuEHLsEe0LrFS0/q+ZRKT0+kXK7P2T1AN5lWRA==",
"dev": true
},
"md5.js": {
@ -41275,9 +41253,9 @@
}
},
"rollup": {
"version": "2.47.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.47.0.tgz",
"integrity": "sha512-rqBjgq9hQfW0vRmz+0S062ORRNJXvwRpzxhFXORvar/maZqY6za3rgQ/p1Glg+j1hnc1GtYyQCPiAei95uTElg==",
"version": "2.48.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.48.0.tgz",
"integrity": "sha512-wl9ZSSSsi5579oscSDYSzGn092tCS076YB+TQrzsGuSfYyJeep8eEWj0eaRjuC5McuMNmcnR8icBqiE/FWNB1A==",
"requires": {
"fsevents": "~2.3.1"
},

View File

@ -1,9 +1,9 @@
{
"name": "svgedit",
"version": "6.0.0",
"version": "7.0.0-preview",
"description": "Powerful SVG-Editor for your browser ",
"main": "dist/index-umd.js",
"module": "dist/index-es.js",
"main": "dist/index.js",
"module": "dist/index.js",
"directories": {
"doc": "docs",
"example": "examples",
@ -24,12 +24,6 @@
"start:watch": "web-dev-server --node-resolve --watch",
"cypress:open": "run-p start cypress:open-no-start",
"cypress:open-no-start": "cypress open",
"add-release": "git submodule add --depth=1 -b \"release-v$npm_config_release\" -- https://github.com/SVG-Edit/svgedit.git \"releases/svg-edit-$npm_config_release\"",
"add-new-release": "cross-var npm run add-release --release=$npm_package_version && cross-var git config --file=.gitmodules submodule.releases/latest.branch \"release-v$npm_package_version\"",
"remove-release": "git submodule deinit -f \"releases/svg-edit-$npm_config_release\" && rm -rf .git/modules/releases/svg-edit-$npm_config_release && git rm -f releases/svg-edit-$npm_config_release",
"submodules": "run-s submodules-init submodules-update",
"submodules-init": "echo \"Performing non-recursive init as don't want submodules to have their own releases!\" && git submodule update --init",
"submodules-update": "echo \"Performing non-recursive fetch as don't want submodules to have their own releases!\" && git submodule foreach git fetch && git submodule update --remote && git submodule foreach git merge origin master",
"start-allow-origin": "static -p 8001 -H '{\"Access-Control-Allow-Origin\": \"*\"}'",
"start-embedded": "run-p start start-allow-origin",
"open-docs-no-start": "open-cli http://localhost:8000/docs/jsdoc/",
@ -39,16 +33,11 @@
"build-docs": "run-s -c build-docs-remove build-docs-create",
"build-and-open-docs-no-start": "run-s build-docs open-docs-no-start",
"build-and-open-docs": "run-s build-docs open-docs",
"open-embedded-no-start": "open-cli http://localhost:8000/editor/embedapi.html",
"open-all-ext-no-start": "open-cli http://localhost:8000/src/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-compiled-no-start": "open-cli http://localhost:8000/src/editor/svg-editor.html",
"report": "run-s report-no-mochawesome mochawesome-cli",
"report-summary": "run-s report-text-summary mochawesome-cli-dot",
"coverage-badge": "coveradge badges/coverage-badge",
"imageoptim": "imageoptim",
"compress-images": "imageoptim \"src/editor/extensions/*.png\" \"src/editor/spinbtn/*.png\" \"src/editor/jgraduate/images/*.{png,gif}\" \"src/editor/images/*.png\"",
"remark": "remark -q -f .",
"install-offline": "npm install --prefer-offline --no-audit",
"prepublishOnly": "run-s license-badges copy prep build-docs",
"open-tests": "run-s cypress:instrument cypress:open",
"cypress:merge": "mochawesome-merge \"cypress/results/mochaw*.json\" > mochawesome.json && marge mochawesome.json && mbg --file ./mochawesome.json --badge_output badges/tests-badge.svg",
@ -104,20 +93,20 @@
],
"dependencies": {
"@babel/polyfill": "7.12.1",
"@web/dev-server-rollup": "0.3.3",
"@web/dev-server-rollup": "0.3.4",
"canvg": "3.0.7",
"core-js": "3.12.1",
"deparam": "^1.0.5",
"elix": "^15.0.0",
"i18next": "^20.2.2",
"deparam": "1.0.5",
"elix": "15.0.0",
"i18next": "20.2.4",
"jspdf": "2.3.1",
"pathseg": "1.2.0",
"regenerator-runtime": "0.13.7",
"rollup-plugin-polyfill-node": "^0.6.2",
"rollup-plugin-polyfill-node": "0.6.2",
"svg2pdf.js": "2.1.0"
},
"devDependencies": {
"@babel/core": "7.14.2",
"@babel/core": "7.14.3",
"@babel/preset-env": "7.14.2",
"@babel/register": "7.13.16",
"@babel/runtime-corejs3": "7.14.0",
@ -132,8 +121,8 @@
"@rollup/plugin-node-resolve": "11.2.1",
"@rollup/plugin-replace": "2.4.2",
"@rollup/plugin-url": "6.0.0",
"@web/dev-server": "^0.1.17",
"axe-core": "4.2.0",
"@web/dev-server": "0.1.17",
"axe-core": "4.2.1",
"babel-plugin-transform-object-rest-spread": "7.0.0-beta.3",
"copyfiles": "2.4.1",
"core-js-bundle": "3.12.1",
@ -154,8 +143,8 @@
"eslint-plugin-cypress": "2.11.3",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-html": "^6.1.2",
"eslint-plugin-import": "2.23.0",
"eslint-plugin-jsdoc": "34.2.2",
"eslint-plugin-import": "2.23.2",
"eslint-plugin-jsdoc": "34.8.2",
"eslint-plugin-markdown": "^2.1.0",
"eslint-plugin-mocha": "8.1.0",
"eslint-plugin-mocha-cleanup": "1.9.1",
@ -168,7 +157,7 @@
"eslint-plugin-unicorn": "32.0.1",
"imageoptim-cli": "3.0.2",
"jamilih": "0.54.0",
"jsdoc": "3.6.6",
"jsdoc": "3.6.7",
"mocha": "8.4.0",
"mocha-badge-generator": "0.9.0",
"mochawesome": "6.2.2",
@ -185,7 +174,7 @@
"remark-lint-ordered-list-marker-value": "2.0.1",
"requirejs": "2.3.6",
"rimraf": "3.0.2",
"rollup": "2.47.0",
"rollup": "2.48.0",
"rollup-plugin-copy": "3.4.0",
"rollup-plugin-filesize": "9.1.1",
"rollup-plugin-node-polyfills": "0.2.1",

View File

@ -58,18 +58,28 @@ export default class ConfigObj {
* @property {string} [canvasName="default"] Used to namespace storage provided via `ext-storage.js`; you can use this if you wish to have multiple independent instances of SVG Edit on the same domain
* @property {boolean} [no_save_warning=false] If `true`, prevents the warning dialog box from appearing when closing/reloading the page. Mostly useful for testing.
* @property {string} [imgPath="images/"] The path where the SVG icons are located, with trailing slash. Note that as of version 2.7, this is not configurable by URL for security reasons.
* @property {boolean} [preventAllURLConfig=false] Set to `true` to override the ability for URLs to set non-content configuration (including extension config). Must be set early, i.e., in `svgedit-config-iife.js`; extension loading is too late!
* @property {boolean} [preventURLContentLoading=false] Set to `true` to override the ability for URLs to set URL-based SVG content. Must be set early, i.e., in `svgedit-config-iife.js`; extension loading is too late!
* @property {boolean} [lockExtensions=false] Set to `true` to override the ability for URLs to set their own extensions; disallowed in URL setting. There is no need for this when `preventAllURLConfig` is used. Must be set early, i.e., in `svgedit-config-iife.js`; extension loading is too late!
* @property {boolean} [noDefaultExtensions=false] If set to `true`, prohibits automatic inclusion of default extensions (though "extensions" can still be used to add back any desired default extensions along with any other extensions). This can only be meaningfully used in `svgedit-config-iife.js` or in the URL
* @property {boolean} [preventAllURLConfig=false] Set to `true` to override the ability for URLs to set non-content configuration (including extension config).
* Must be set early, i.e., in `svgedit-config-iife.js`; extension loading is too late!
* @property {boolean} [preventURLContentLoading=false] Set to `true` to override the ability for URLs to set URL-based SVG content.
* Must be set early, i.e., in `svgedit-config-iife.js`; extension loading is too late!
* @property {boolean} [lockExtensions=false] Set to `true` to override the ability for URLs to set their own extensions; disallowed in URL setting. There is no need for this when `preventAllURLConfig` is used.
* Must be set early, i.e., in `svgedit-config-iife.js`; extension loading is too late!
* @property {boolean} [noDefaultExtensions=false] If set to `true`, prohibits automatic inclusion of default extensions (though "extensions" can still be used to add back any desired default extensions along with any other extensions).
* This can only be meaningfully used in `svgedit-config-iife.js` or in the URL
* @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} [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] 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=[]] 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. See {@link module:SVGEditor~defaultExtensions}.
* @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
* @property {string[]} [extensions=[]] 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.
* See {@link module:SVGEditor~defaultExtensions}.
* @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
* @property {string} [paramurl] This was available via URL only. Allowed an un-encoded URL within the query string (use "url" or "source" with a data: URI instead)
* @property {Float} [canvas_expansion=3] The minimum area visible outside the canvas, as a multiple of the image dimensions. The larger the number, the more one can scroll outside the canvas.
* @property {PlainObject} [initFill] Init fill properties
@ -93,10 +103,12 @@ export default class ConfigObj {
* @property {string} [initTool="select"] The initially selected tool. Must be either the ID of the button for the tool, or the ID without `tool_` prefix (e.g., "select").
* @property {boolean} [wireframe=false] Start in wireframe mode
* @property {boolean} [showlayers=false] Open the layers side-panel by default.
* @property {"new"|"same"} [exportWindowType="new"] Can be "new" or "same" to indicate whether new windows will be generated for each export; the `window.name` of the export window is namespaced based on the `canvasName` (and incremented if "new" is selected as the type). Introduced 2.8.
* @property {"new"|"same"} [exportWindowType="new"] Can be "new" or "same" to indicate whether new windows will be generated for each export;
* the `window.name` of the export window is namespaced based on the `canvasName` (and incremented if "new" is selected as the type). Introduced 2.8.
* @property {boolean} [showGrid=false] Set by `ext-grid.js`; determines whether or not to show the grid by default
* @property {boolean} [show_outside_canvas=true] Defines whether or not elements outside the canvas should be visible. Set and used in `svgcanvas.js`.
* @property {boolean} [selectNew=true] If true, will replace the selection with the current element and automatically select element objects (when not in "path" mode) after they are created, showing their grips (v2.6). Set and used in `svgcanvas.js` (`mouseUp`).
* @property {boolean} [selectNew=true] If true, will replace the selection with the current element and automatically select element objects (when not in "path" mode) after they are created, showing their grips (v2.6).
* Set and used in `svgcanvas.js` (`mouseUp`).
*/
this.defaultConfig = {
canvasName: 'default',

View File

@ -781,7 +781,7 @@ class EditorStartup {
this.svgCanvas.call('extensions_added');
} catch (err) {
// Todo: Report errors through the UI
console.log(err);
console.error(err);
}
}

View File

@ -113,7 +113,7 @@ iframe.addEventListener('load', function () {
try {
doc = frame.contentDocument || frame.contentWindow.document;
} catch (err) {
console.log('Blocked from accessing document', err);
console.error('Blocked from accessing document', err);
}
if (doc) {
// Todo: Provide a way to get this to occur by `postMessage`

View File

@ -89,7 +89,7 @@ export default {
svgCanvas.clearSelection();
} catch (e) {
// Todo: Surface error to user
console.log(e);
console.error(e);
return false;
}

View File

@ -24,7 +24,7 @@ export default {
// to configure
const { allowedOrigins } = svgEditor.configObj.curConfig;
if (!allowedOrigins.includes('*') && !allowedOrigins.includes(e.origin)) {
console.log(`Origin ${e.origin} not whitelisted for posting to ${window.origin}`);
console.warn(`Origin ${e.origin} not whitelisted for posting to ${window.origin}`);
return;
}
const cbid = data.id;
@ -43,7 +43,7 @@ export default {
e.source.postMessage(JSON.stringify(message), '*');
});
} catch (err) {
console.log('Error with xdomain message listener: ' + err);
console.error('Error with xdomain message listener: ' + err);
}
}
};

View File

@ -60,7 +60,7 @@ export const insertItemBeforeMethod = function (elem, newseg, index) {
list.appendItem(arr[i]);
}
};
/* eslint-disable max-len */
/**
* @function module:path.ptObjToArr
* @todo See if this should just live in `replacePathSeg`
@ -68,6 +68,7 @@ export const insertItemBeforeMethod = function (elem, newseg, index) {
* @param {SVGPathSegMovetoAbs|SVGPathSegLinetoAbs|SVGPathSegCurvetoCubicAbs|SVGPathSegCurvetoQuadraticAbs|SVGPathSegArcAbs|SVGPathSegLinetoHorizontalAbs|SVGPathSegLinetoVerticalAbs|SVGPathSegCurvetoCubicSmoothAbs|SVGPathSegCurvetoQuadraticSmoothAbs} segItem
* @returns {ArgumentsArray}
*/
/* eslint-enable max-len */
export const ptObjToArrMethod = function (type, segItem) {
const segData = pathMethodsContext_.getSegData();
const props = segData[type];

View File

@ -272,7 +272,7 @@ pathMethodInit(
* @returns {void}
*/
export const insertItemBefore = insertItemBeforeMethod;
/* eslint-disable max-len */
/**
* @function module:path.ptObjToArr
* @todo See if this should just live in `replacePathSeg`
@ -280,6 +280,7 @@ export const insertItemBefore = insertItemBeforeMethod;
* @param {SVGPathSegMovetoAbs|SVGPathSegLinetoAbs|SVGPathSegCurvetoCubicAbs|SVGPathSegCurvetoQuadraticAbs|SVGPathSegArcAbs|SVGPathSegLinetoHorizontalAbs|SVGPathSegLinetoVerticalAbs|SVGPathSegCurvetoCubicSmoothAbs|SVGPathSegCurvetoQuadraticSmoothAbs} segItem
* @returns {ArgumentsArray}
*/
/* eslint-enable max-len */
export const ptObjToArr = ptObjToArrMethod;
/**

View File

@ -451,7 +451,7 @@ export class SelectorManager {
sel = this.selectorMap[elem.id];
if (sel && !sel.locked) {
// TODO(codedread): Ensure this exists in this module.
console.log('WARNING! selector was released but was already unlocked');
console.warn('WARNING! selector was released but was already unlocked');
}
for (let i = 0; i < N; ++i) {
if (this.selectors[i] && this.selectors[i] === sel) {

View File

@ -822,7 +822,7 @@ export const convertToGroup = function (elem) {
try {
recalculateDimensions(n);
} catch (e) {
console.log(e);
console.error(e);
}
});
@ -841,7 +841,7 @@ export const convertToGroup = function (elem) {
elementContext_.addCommandToHistory(batchCmd);
} else {
console.log('Unexpected element to ungroup:', elem);
console.warn('Unexpected element to ungroup:', elem);
}
};

View File

@ -195,6 +195,7 @@ export const getMouseTargetMethod = function (evt) {
* @param {string} name
* @returns {boolean}
*/
/* eslint-disable max-len */
/**
* @todo Consider: Should this return an array by default, so extension results aren't overwritten?
* @todo Would be easier to document if passing in object with key of action and vars as value; could then define an interface which tied both together
@ -205,6 +206,7 @@ export const getMouseTargetMethod = function (evt) {
* @param {module:svgcanvas.ExtensionNameFilter} nameFilter
* @returns {GenericArray<module:svgcanvas.ExtensionStatus>|module:svgcanvas.ExtensionStatus|false} See {@tutorial ExtensionDocs} on the ExtensionStatus.
*/
/* eslint-enable max-len */
export const runExtensionsMethod = function (action, vars, returnArray, nameFilter) {
let result = returnArray ? [] : false;
for (const [ name, ext ] of Object.entries(selectionContext_.getExtensions())) {

View File

@ -482,7 +482,7 @@ export const setSvgString = function (xmlString, preventUndo) {
if (!preventUndo) svgContext_.addCommandToHistory(batchCmd);
svgContext_.call('changed', [ svgContext_.getSVGContent() ]);
} catch (e) {
console.log(e);
console.error(e);
return false;
}
@ -611,7 +611,7 @@ export const importSvgString = function (xmlString) {
svgContext_.addCommandToHistory(batchCmd);
svgContext_.call('changed', [ svgContext_.getSVGContent() ]);
} catch (e) {
console.log(e);
console.error(e);
return null;
}

View File

@ -849,7 +849,8 @@ class SvgCanvas {
this.runExtension = function (name, action, vars) {
return this.runExtensions(action, vars, false, (n) => n === name);
};
/**
/* eslint-disable max-len */
/**
* @todo Consider: Should this return an array by default, so extension results aren't overwritten?
* @todo Would be easier to document if passing in object with key of action and vars as value; could then define an interface which tied both together
* @function module:svgcanvas.SvgCanvas#runExtensions
@ -859,6 +860,8 @@ class SvgCanvas {
* @param {module:svgcanvas.ExtensionNameFilter} nameFilter
* @returns {GenericArray<module:svgcanvas.ExtensionStatus>|module:svgcanvas.ExtensionStatus|false} See {@tutorial ExtensionDocs} on the ExtensionStatus.
*/
/* eslint-enable max-len */
this.runExtensions = runExtensionsMethod;
/**
@ -1040,12 +1043,14 @@ class SvgCanvas {
* @event module:svgcanvas.SvgCanvas#event:exportedPDF
* @type {module:svgcanvas.PDFExportedResults}
*/
/**
/* eslint-disable max-len */
/**
* Creating a cover-all class until {@link https://github.com/jsdoc3/jsdoc/issues/1545} may be supported.
* `undefined` may be returned by {@link module:svgcanvas.SvgCanvas#event:extension_added} if the extension's `init` returns `undefined` It is also the type for the following events "zoomDone", "unsetnonce", "cleared", and "extensions_added".
* @event module:svgcanvas.SvgCanvas#event:GenericCanvasEvent
* @type {module:svgcanvas.SvgCanvas#event:selected|module:svgcanvas.SvgCanvas#event:changed|module:svgcanvas.SvgCanvas#event:contextset|module:svgcanvas.SvgCanvas#event:pointsAdded|module:svgcanvas.SvgCanvas#event:extension_added|module:svgcanvas.SvgCanvas#event:extensions_added|module:svgcanvas.SvgCanvas#event:message|module:svgcanvas.SvgCanvas#event:transition|module:svgcanvas.SvgCanvas#event:zoomed|module:svgcanvas.SvgCanvas#event:updateCanvas|module:svgcanvas.SvgCanvas#event:saved|module:svgcanvas.SvgCanvas#event:exported|module:svgcanvas.SvgCanvas#event:exportedPDF|module:svgcanvas.SvgCanvas#event:setnonce|module:svgcanvas.SvgCanvas#event:unsetnonce|void}
*/
/* eslint-enable max-len */
/**
* The promise return, if present, resolves to `undefined`
@ -1060,7 +1065,7 @@ class SvgCanvas {
* @listens module:svgcanvas.SvgCanvas#event:GenericCanvasEvent
* @returns {module:svgcanvas.EventHandlerReturn}
*/
/* eslint-disable max-len */
/**
* Attaches a callback function to an event.
* @function module:svgcanvas.SvgCanvas#bind
@ -1068,6 +1073,7 @@ class SvgCanvas {
* @param {module:svgcanvas.EventHandler} f - The callback function to bind to the event
* @returns {module:svgcanvas.EventHandler} The previous event
*/
/* eslint-enable max-len */
canvas.bind = function (ev, f) {
const old = events[ev];
events[ev] = f;
@ -1109,7 +1115,7 @@ class SvgCanvas {
* @returns {void}
*/
const logMatrix = function (m) {
console.log([ m.a, m.b, m.c, m.d, m.e, m.f ]);
console.info([ m.a, m.b, m.c, m.d, m.e, m.f ]);
};
// Root Current Transformation Matrix in user units

View File

@ -40,7 +40,8 @@ let svgroot_ = null;
* Object with the following keys/values.
* @typedef {PlainObject} module:utilities.SVGElementJSON
* @property {string} element - Tag name of the SVG element to create
* @property {PlainObject<string, string>} attr - Has key-value attributes to assign to the new element. An `id` should be set so that {@link module:utilities.EditorContext#addSVGElementFromJson} can later re-identify the element for modification or replacement.
* @property {PlainObject<string, string>} attr - Has key-value attributes to assign to the new element.
* An `id` should be set so that {@link module:utilities.EditorContext#addSVGElementFromJson} can later re-identify the element for modification or replacement.
* @property {boolean} [curStyles=false] - Indicates whether current style attributes should be applied first
* @property {module:utilities.SVGElementJSON[]} [children] - Data objects to be added recursively as children
* @property {string} [namespace="http://www.w3.org/2000/svg"] - Indicate a (non-SVG) namespace

View File

@ -41,7 +41,7 @@ const runner = new Runner(
);
runner.stats = stats;
console.log('Mocha results:');
console.info('Mocha results:');
// eslint-disable-next-line no-new -- Has side effects
new MochaReporter(runner);
@ -109,6 +109,6 @@ const lastRan = new Intl.DateTimeFormat('en-US', {
hour: 'numeric', minute: 'numeric'
}).format(endDate);
console.log(
console.info(
`Tests finished: ${lastRan}`
);