add iife build

master
JFH 2021-11-17 19:53:20 +01:00
parent caa9edce65
commit 81f4a9acbf
6 changed files with 252 additions and 142 deletions

View File

@ -1,5 +1,9 @@
# SVG-Edit CHANGES
## 7.0.2
- create an IIFE build.
## 7.0.1
- remove ext-overview in default extensions for performance reasons
## 7.0.0
- New UI
- Rearchitecture the code (more modular)

279
package-lock.json generated
View File

@ -1,21 +1,21 @@
{
"name": "svgedit",
"version": "7.0.1",
"version": "7.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "svgedit",
"version": "7.0.1",
"version": "7.0.2",
"license": "(MIT AND Apache-2.0 AND ISC AND LGPL-3.0-or-later AND X11)",
"dependencies": {
"@babel/polyfill": "7.12.1",
"browser-fs-access": "0.21.1",
"canvg": "3.0.9",
"core-js": "3.19.1",
"elix": "15.0.0",
"elix": "15.0.1",
"html2canvas": "1.3.2",
"i18next": "21.4.2",
"i18next": "21.5.2",
"jspdf": "2.4.0",
"pathseg": "1.2.1",
"regenerator-runtime": "0.13.9",
@ -24,7 +24,7 @@
},
"devDependencies": {
"@babel/core": "7.16.0",
"@babel/preset-env": "7.16.0",
"@babel/preset-env": "7.16.4",
"@babel/register": "7.16.0",
"@babel/runtime-corejs3": "7.16.3",
"@cypress/code-coverage": "3.9.11",
@ -37,6 +37,7 @@
"@rollup/plugin-replace": "3.0.0",
"@rollup/plugin-url": "6.1.0",
"@web/dev-server": "0.1.28",
"@web/dev-server-esbuild": "^0.2.16",
"@web/dev-server-rollup": "0.3.13",
"babel-plugin-transform-object-rest-spread": "7.0.0-beta.3",
"copyfiles": "2.4.1",
@ -101,9 +102,9 @@
}
},
"node_modules/@babel/compat-data": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.0.tgz",
"integrity": "sha512-DGjt2QZse5SGd9nfOSqO4WLJ8NN/oHkijbXbPrxuoJO3oIPJL3TciZs9FX+cOHNiY9E9l0opL8g7BmLe3T+9ew==",
"version": "7.16.4",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.4.tgz",
"integrity": "sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==",
"dev": true,
"engines": {
"node": ">=6.9.0"
@ -269,9 +270,9 @@
}
},
"node_modules/@babel/helper-define-polyfill-provider": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.4.tgz",
"integrity": "sha512-OrpPZ97s+aPi6h2n1OXzdhVis1SGSsMU2aMHgLcOKfsp4/v1NWpx3CWT3lBj5eeBq9cDkPkh+YCfdF7O12uNDQ==",
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.0.tgz",
"integrity": "sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg==",
"dev": true,
"dependencies": {
"@babel/helper-compilation-targets": "^7.13.0",
@ -434,9 +435,9 @@
}
},
"node_modules/@babel/helper-remap-async-to-generator": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.0.tgz",
"integrity": "sha512-MLM1IOMe9aQBqMWxcRw8dcb9jlM86NIw7KA0Wri91Xkfied+dE0QuBFSBjMNvqzmS0OSIDsMNC24dBEkPUi7ew==",
"version": "7.16.4",
"resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.4.tgz",
"integrity": "sha512-vGERmmhR+s7eH5Y/cp8PCVzj4XEjerq8jooMfxFdA5xVtAk9Sh4AQsrWgiErUEBjtGrBtOFKDUcWQFW4/dFwMA==",
"dev": true,
"dependencies": {
"@babel/helper-annotate-as-pure": "^7.16.0",
@ -604,13 +605,13 @@
}
},
"node_modules/@babel/plugin-proposal-async-generator-functions": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.0.tgz",
"integrity": "sha512-nyYmIo7ZqKsY6P4lnVmBlxp9B3a96CscbLotlsNuktMHahkDwoPYEjXrZHU0Tj844Z9f1IthVxQln57mhkcExw==",
"version": "7.16.4",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.4.tgz",
"integrity": "sha512-/CUekqaAaZCQHleSK/9HajvcD/zdnJiKRiuUFq8ITE+0HsPzquf53cpFiqAwl/UfmJbR6n5uGPQSPdrmKOvHHg==",
"dev": true,
"dependencies": {
"@babel/helper-plugin-utils": "^7.14.5",
"@babel/helper-remap-async-to-generator": "^7.16.0",
"@babel/helper-remap-async-to-generator": "^7.16.4",
"@babel/plugin-syntax-async-generators": "^7.8.4"
},
"engines": {
@ -1593,18 +1594,18 @@
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
},
"node_modules/@babel/preset-env": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.0.tgz",
"integrity": "sha512-cdTu/W0IrviamtnZiTfixPfIncr2M1VqRrkjzZWlr1B4TVYimCFK5jkyOdP4qw2MrlKHi+b3ORj6x8GoCew8Dg==",
"version": "7.16.4",
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.4.tgz",
"integrity": "sha512-v0QtNd81v/xKj4gNKeuAerQ/azeNn/G1B1qMLeXOcV8+4TWlD2j3NV1u8q29SDFBXx/NBq5kyEAO+0mpRgacjA==",
"dev": true,
"dependencies": {
"@babel/compat-data": "^7.16.0",
"@babel/helper-compilation-targets": "^7.16.0",
"@babel/compat-data": "^7.16.4",
"@babel/helper-compilation-targets": "^7.16.3",
"@babel/helper-plugin-utils": "^7.14.5",
"@babel/helper-validator-option": "^7.14.5",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.0",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.2",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.0",
"@babel/plugin-proposal-async-generator-functions": "^7.16.0",
"@babel/plugin-proposal-async-generator-functions": "^7.16.4",
"@babel/plugin-proposal-class-properties": "^7.16.0",
"@babel/plugin-proposal-class-static-block": "^7.16.0",
"@babel/plugin-proposal-dynamic-import": "^7.16.0",
@ -1654,7 +1655,7 @@
"@babel/plugin-transform-named-capturing-groups-regex": "^7.16.0",
"@babel/plugin-transform-new-target": "^7.16.0",
"@babel/plugin-transform-object-super": "^7.16.0",
"@babel/plugin-transform-parameters": "^7.16.0",
"@babel/plugin-transform-parameters": "^7.16.3",
"@babel/plugin-transform-property-literals": "^7.16.0",
"@babel/plugin-transform-regenerator": "^7.16.0",
"@babel/plugin-transform-reserved-words": "^7.16.0",
@ -1667,10 +1668,10 @@
"@babel/plugin-transform-unicode-regex": "^7.16.0",
"@babel/preset-modules": "^0.1.5",
"@babel/types": "^7.16.0",
"babel-plugin-polyfill-corejs2": "^0.2.3",
"babel-plugin-polyfill-corejs3": "^0.3.0",
"babel-plugin-polyfill-regenerator": "^0.2.3",
"core-js-compat": "^3.19.0",
"babel-plugin-polyfill-corejs2": "^0.3.0",
"babel-plugin-polyfill-corejs3": "^0.4.0",
"babel-plugin-polyfill-regenerator": "^0.3.0",
"core-js-compat": "^3.19.1",
"semver": "^6.3.0"
},
"engines": {
@ -4078,6 +4079,34 @@
"node": ">=8.0"
}
},
"node_modules/@web/dev-server-esbuild": {
"version": "0.2.16",
"resolved": "https://registry.npmjs.org/@web/dev-server-esbuild/-/dev-server-esbuild-0.2.16.tgz",
"integrity": "sha512-a82uKy9vQ4HvfWtjd7hJ3GtaqkL2ofxpEu3a1wIZyXB2dFWPvhRSmLNe/4IPPHe4vj6PVdRpLSFPEA3lXUW5Pw==",
"dev": true,
"dependencies": {
"@mdn/browser-compat-data": "^4.0.0",
"@web/dev-server-core": "^0.3.17",
"esbuild": "^0.12.21",
"parse5": "^6.0.1",
"ua-parser-js": "^1.0.2"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/@web/dev-server-esbuild/node_modules/@mdn/browser-compat-data": {
"version": "4.0.11",
"resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-4.0.11.tgz",
"integrity": "sha512-rmQPBLe3/DuJy0Bcr1KNuSiIcgV67R2AeLxagKMQTI0R8F9lLC894wJRYhA5ytV0CIi7dzxILqdFeuVbqrkoCA==",
"dev": true
},
"node_modules/@web/dev-server-esbuild/node_modules/parse5": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
"integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==",
"dev": true
},
"node_modules/@web/dev-server-rollup": {
"version": "0.3.13",
"resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.3.13.tgz",
@ -4894,13 +4923,13 @@
}
},
"node_modules/babel-plugin-polyfill-corejs2": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.3.tgz",
"integrity": "sha512-NDZ0auNRzmAfE1oDDPW2JhzIMXUk+FFe2ICejmt5T4ocKgiQx3e0VCRx9NCAidcMtL2RUZaWtXnmjTCkx0tcbA==",
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.0.tgz",
"integrity": "sha512-wMDoBJ6uG4u4PNFh72Ty6t3EgfA91puCuAwKIazbQlci+ENb/UU9A3xG5lutjUIiXCIn1CY5L15r9LimiJyrSA==",
"dev": true,
"dependencies": {
"@babel/compat-data": "^7.13.11",
"@babel/helper-define-polyfill-provider": "^0.2.4",
"@babel/helper-define-polyfill-provider": "^0.3.0",
"semver": "^6.1.1"
},
"peerDependencies": {
@ -4917,12 +4946,12 @@
}
},
"node_modules/babel-plugin-polyfill-corejs3": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.3.0.tgz",
"integrity": "sha512-JLwi9vloVdXLjzACL80j24bG6/T1gYxwowG44dg6HN/7aTPdyPbJJidf6ajoA3RPHHtW0j9KMrSOLpIZpAnPpg==",
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.4.0.tgz",
"integrity": "sha512-YxFreYwUfglYKdLUGvIF2nJEsGwj+RhWSX/ije3D2vQPOXuyMLMtg/cCGMDpOA7Nd+MwlNdnGODbd2EwUZPlsw==",
"dev": true,
"dependencies": {
"@babel/helper-define-polyfill-provider": "^0.2.4",
"@babel/helper-define-polyfill-provider": "^0.3.0",
"core-js-compat": "^3.18.0"
},
"peerDependencies": {
@ -4930,12 +4959,12 @@
}
},
"node_modules/babel-plugin-polyfill-regenerator": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.3.tgz",
"integrity": "sha512-JVE78oRZPKFIeUqFGrSORNzQnrDwZR16oiWeGM8ZyjBn2XAT5OjP+wXx5ESuo33nUsFUEJYjtklnsKbxW5L+7g==",
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.0.tgz",
"integrity": "sha512-dhAPTDLGoMW5/84wkgwiLRwMnio2i1fUe53EuvtKMv0pn2p3S8OCoV1xAzfJPl0KOX7IB89s2ib85vbYiea3jg==",
"dev": true,
"dependencies": {
"@babel/helper-define-polyfill-provider": "^0.2.4"
"@babel/helper-define-polyfill-provider": "^0.3.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
@ -7628,9 +7657,9 @@
"dev": true
},
"node_modules/elix": {
"version": "15.0.0",
"resolved": "https://registry.npmjs.org/elix/-/elix-15.0.0.tgz",
"integrity": "sha512-Va7hBkoR/tEdn8v8JD6gdgxm4fd5JRLlLCpxMLd9OyLUps+vEesa19YuziPstWy3bexu7+Z3dxhWOeKX11zkHg=="
"version": "15.0.1",
"resolved": "https://registry.npmjs.org/elix/-/elix-15.0.1.tgz",
"integrity": "sha512-hgL6EDdMO/JBJLmDfaM8AL0f3zQXDIwkjQEhaLi9OTLV+3q445ErkBZuHGK9UzAoIq3I062ldDXRX48l1vfqCg=="
},
"node_modules/elliptic": {
"version": "6.5.3",
@ -7899,6 +7928,16 @@
"integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
"dev": true
},
"node_modules/esbuild": {
"version": "0.12.29",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.29.tgz",
"integrity": "sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g==",
"dev": true,
"hasInstallScript": true,
"bin": {
"esbuild": "bin/esbuild"
}
},
"node_modules/escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@ -10544,9 +10583,9 @@
}
},
"node_modules/i18next": {
"version": "21.4.2",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-21.4.2.tgz",
"integrity": "sha512-vVWsmTnZNdYHPLt01MvT5YNM2lxec2R6r5T72J89eaazp8XQnGSqA66O+a918qqmjHZGB6HHRSs02xp753he9g==",
"version": "21.5.2",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-21.5.2.tgz",
"integrity": "sha512-Iuztr2+7CPCh5SYQV0utw2HXMx1za18xfznrw/PmgX+98oIpm84bhIM7VUPODjLycwIZ299oP7sEVQ9oCgmzfg==",
"dependencies": {
"@babel/runtime": "^7.12.0"
}
@ -19990,6 +20029,25 @@
"node": ">=8"
}
},
"node_modules/ua-parser-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.2.tgz",
"integrity": "sha512-00y/AXhx0/SsnI51fTc0rLRmafiGOM4/O+ny10Ps7f+j/b8p/ZY11ytMgznXkOVo4GQ+KwQG5UQLkLGirsACRg==",
"dev": true,
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/ua-parser-js"
},
{
"type": "paypal",
"url": "https://paypal.me/faisalman"
}
],
"engines": {
"node": "*"
}
},
"node_modules/uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
@ -21943,9 +22001,9 @@
}
},
"@babel/compat-data": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.0.tgz",
"integrity": "sha512-DGjt2QZse5SGd9nfOSqO4WLJ8NN/oHkijbXbPrxuoJO3oIPJL3TciZs9FX+cOHNiY9E9l0opL8g7BmLe3T+9ew==",
"version": "7.16.4",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.4.tgz",
"integrity": "sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==",
"dev": true
},
"@babel/core": {
@ -22069,9 +22127,9 @@
}
},
"@babel/helper-define-polyfill-provider": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.4.tgz",
"integrity": "sha512-OrpPZ97s+aPi6h2n1OXzdhVis1SGSsMU2aMHgLcOKfsp4/v1NWpx3CWT3lBj5eeBq9cDkPkh+YCfdF7O12uNDQ==",
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.0.tgz",
"integrity": "sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg==",
"dev": true,
"requires": {
"@babel/helper-compilation-targets": "^7.13.0",
@ -22195,9 +22253,9 @@
"dev": true
},
"@babel/helper-remap-async-to-generator": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.0.tgz",
"integrity": "sha512-MLM1IOMe9aQBqMWxcRw8dcb9jlM86NIw7KA0Wri91Xkfied+dE0QuBFSBjMNvqzmS0OSIDsMNC24dBEkPUi7ew==",
"version": "7.16.4",
"resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.4.tgz",
"integrity": "sha512-vGERmmhR+s7eH5Y/cp8PCVzj4XEjerq8jooMfxFdA5xVtAk9Sh4AQsrWgiErUEBjtGrBtOFKDUcWQFW4/dFwMA==",
"dev": true,
"requires": {
"@babel/helper-annotate-as-pure": "^7.16.0",
@ -22317,13 +22375,13 @@
}
},
"@babel/plugin-proposal-async-generator-functions": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.0.tgz",
"integrity": "sha512-nyYmIo7ZqKsY6P4lnVmBlxp9B3a96CscbLotlsNuktMHahkDwoPYEjXrZHU0Tj844Z9f1IthVxQln57mhkcExw==",
"version": "7.16.4",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.4.tgz",
"integrity": "sha512-/CUekqaAaZCQHleSK/9HajvcD/zdnJiKRiuUFq8ITE+0HsPzquf53cpFiqAwl/UfmJbR6n5uGPQSPdrmKOvHHg==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.14.5",
"@babel/helper-remap-async-to-generator": "^7.16.0",
"@babel/helper-remap-async-to-generator": "^7.16.4",
"@babel/plugin-syntax-async-generators": "^7.8.4"
}
},
@ -22990,18 +23048,18 @@
}
},
"@babel/preset-env": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.0.tgz",
"integrity": "sha512-cdTu/W0IrviamtnZiTfixPfIncr2M1VqRrkjzZWlr1B4TVYimCFK5jkyOdP4qw2MrlKHi+b3ORj6x8GoCew8Dg==",
"version": "7.16.4",
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.4.tgz",
"integrity": "sha512-v0QtNd81v/xKj4gNKeuAerQ/azeNn/G1B1qMLeXOcV8+4TWlD2j3NV1u8q29SDFBXx/NBq5kyEAO+0mpRgacjA==",
"dev": true,
"requires": {
"@babel/compat-data": "^7.16.0",
"@babel/helper-compilation-targets": "^7.16.0",
"@babel/compat-data": "^7.16.4",
"@babel/helper-compilation-targets": "^7.16.3",
"@babel/helper-plugin-utils": "^7.14.5",
"@babel/helper-validator-option": "^7.14.5",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.0",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.2",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.0",
"@babel/plugin-proposal-async-generator-functions": "^7.16.0",
"@babel/plugin-proposal-async-generator-functions": "^7.16.4",
"@babel/plugin-proposal-class-properties": "^7.16.0",
"@babel/plugin-proposal-class-static-block": "^7.16.0",
"@babel/plugin-proposal-dynamic-import": "^7.16.0",
@ -23051,7 +23109,7 @@
"@babel/plugin-transform-named-capturing-groups-regex": "^7.16.0",
"@babel/plugin-transform-new-target": "^7.16.0",
"@babel/plugin-transform-object-super": "^7.16.0",
"@babel/plugin-transform-parameters": "^7.16.0",
"@babel/plugin-transform-parameters": "^7.16.3",
"@babel/plugin-transform-property-literals": "^7.16.0",
"@babel/plugin-transform-regenerator": "^7.16.0",
"@babel/plugin-transform-reserved-words": "^7.16.0",
@ -23064,10 +23122,10 @@
"@babel/plugin-transform-unicode-regex": "^7.16.0",
"@babel/preset-modules": "^0.1.5",
"@babel/types": "^7.16.0",
"babel-plugin-polyfill-corejs2": "^0.2.3",
"babel-plugin-polyfill-corejs3": "^0.3.0",
"babel-plugin-polyfill-regenerator": "^0.2.3",
"core-js-compat": "^3.19.0",
"babel-plugin-polyfill-corejs2": "^0.3.0",
"babel-plugin-polyfill-corejs3": "^0.4.0",
"babel-plugin-polyfill-regenerator": "^0.3.0",
"core-js-compat": "^3.19.1",
"semver": "^6.3.0"
},
"dependencies": {
@ -25233,6 +25291,33 @@
}
}
},
"@web/dev-server-esbuild": {
"version": "0.2.16",
"resolved": "https://registry.npmjs.org/@web/dev-server-esbuild/-/dev-server-esbuild-0.2.16.tgz",
"integrity": "sha512-a82uKy9vQ4HvfWtjd7hJ3GtaqkL2ofxpEu3a1wIZyXB2dFWPvhRSmLNe/4IPPHe4vj6PVdRpLSFPEA3lXUW5Pw==",
"dev": true,
"requires": {
"@mdn/browser-compat-data": "^4.0.0",
"@web/dev-server-core": "^0.3.17",
"esbuild": "^0.12.21",
"parse5": "^6.0.1",
"ua-parser-js": "^1.0.2"
},
"dependencies": {
"@mdn/browser-compat-data": {
"version": "4.0.11",
"resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-4.0.11.tgz",
"integrity": "sha512-rmQPBLe3/DuJy0Bcr1KNuSiIcgV67R2AeLxagKMQTI0R8F9lLC894wJRYhA5ytV0CIi7dzxILqdFeuVbqrkoCA==",
"dev": true
},
"parse5": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
"integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==",
"dev": true
}
}
},
"@web/dev-server-rollup": {
"version": "0.3.13",
"resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.3.13.tgz",
@ -25861,13 +25946,13 @@
}
},
"babel-plugin-polyfill-corejs2": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.3.tgz",
"integrity": "sha512-NDZ0auNRzmAfE1oDDPW2JhzIMXUk+FFe2ICejmt5T4ocKgiQx3e0VCRx9NCAidcMtL2RUZaWtXnmjTCkx0tcbA==",
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.0.tgz",
"integrity": "sha512-wMDoBJ6uG4u4PNFh72Ty6t3EgfA91puCuAwKIazbQlci+ENb/UU9A3xG5lutjUIiXCIn1CY5L15r9LimiJyrSA==",
"dev": true,
"requires": {
"@babel/compat-data": "^7.13.11",
"@babel/helper-define-polyfill-provider": "^0.2.4",
"@babel/helper-define-polyfill-provider": "^0.3.0",
"semver": "^6.1.1"
},
"dependencies": {
@ -25880,22 +25965,22 @@
}
},
"babel-plugin-polyfill-corejs3": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.3.0.tgz",
"integrity": "sha512-JLwi9vloVdXLjzACL80j24bG6/T1gYxwowG44dg6HN/7aTPdyPbJJidf6ajoA3RPHHtW0j9KMrSOLpIZpAnPpg==",
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.4.0.tgz",
"integrity": "sha512-YxFreYwUfglYKdLUGvIF2nJEsGwj+RhWSX/ije3D2vQPOXuyMLMtg/cCGMDpOA7Nd+MwlNdnGODbd2EwUZPlsw==",
"dev": true,
"requires": {
"@babel/helper-define-polyfill-provider": "^0.2.4",
"@babel/helper-define-polyfill-provider": "^0.3.0",
"core-js-compat": "^3.18.0"
}
},
"babel-plugin-polyfill-regenerator": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.3.tgz",
"integrity": "sha512-JVE78oRZPKFIeUqFGrSORNzQnrDwZR16oiWeGM8ZyjBn2XAT5OjP+wXx5ESuo33nUsFUEJYjtklnsKbxW5L+7g==",
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.0.tgz",
"integrity": "sha512-dhAPTDLGoMW5/84wkgwiLRwMnio2i1fUe53EuvtKMv0pn2p3S8OCoV1xAzfJPl0KOX7IB89s2ib85vbYiea3jg==",
"dev": true,
"requires": {
"@babel/helper-define-polyfill-provider": "^0.2.4"
"@babel/helper-define-polyfill-provider": "^0.3.0"
}
},
"babel-plugin-syntax-object-rest-spread": {
@ -28109,9 +28194,9 @@
"dev": true
},
"elix": {
"version": "15.0.0",
"resolved": "https://registry.npmjs.org/elix/-/elix-15.0.0.tgz",
"integrity": "sha512-Va7hBkoR/tEdn8v8JD6gdgxm4fd5JRLlLCpxMLd9OyLUps+vEesa19YuziPstWy3bexu7+Z3dxhWOeKX11zkHg=="
"version": "15.0.1",
"resolved": "https://registry.npmjs.org/elix/-/elix-15.0.1.tgz",
"integrity": "sha512-hgL6EDdMO/JBJLmDfaM8AL0f3zQXDIwkjQEhaLi9OTLV+3q445ErkBZuHGK9UzAoIq3I062ldDXRX48l1vfqCg=="
},
"elliptic": {
"version": "6.5.3",
@ -28363,6 +28448,12 @@
"integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
"dev": true
},
"esbuild": {
"version": "0.12.29",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.29.tgz",
"integrity": "sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g==",
"dev": true
},
"escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@ -30421,9 +30512,9 @@
}
},
"i18next": {
"version": "21.4.2",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-21.4.2.tgz",
"integrity": "sha512-vVWsmTnZNdYHPLt01MvT5YNM2lxec2R6r5T72J89eaazp8XQnGSqA66O+a918qqmjHZGB6HHRSs02xp753he9g==",
"version": "21.5.2",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-21.5.2.tgz",
"integrity": "sha512-Iuztr2+7CPCh5SYQV0utw2HXMx1za18xfznrw/PmgX+98oIpm84bhIM7VUPODjLycwIZ299oP7sEVQ9oCgmzfg==",
"requires": {
"@babel/runtime": "^7.12.0"
}
@ -37753,6 +37844,12 @@
"integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==",
"dev": true
},
"ua-parser-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.2.tgz",
"integrity": "sha512-00y/AXhx0/SsnI51fTc0rLRmafiGOM4/O+ny10Ps7f+j/b8p/ZY11ytMgznXkOVo4GQ+KwQG5UQLkLGirsACRg==",
"dev": true
},
"uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",

View File

@ -1,6 +1,6 @@
{
"name": "svgedit",
"version": "7.0.1",
"version": "7.0.2",
"description": "Powerful SVG-Editor for your browser ",
"main": "dist/Editor.js",
"module": "dist/Editor.js",
@ -19,7 +19,7 @@
"build:watch": "rollup -c --watch",
"start": "web-dev-server --app-index src/editor/index.html --open --node-resolve",
"start:test": "web-dev-server --app-index src/editor/index.html --node-resolve",
"start:watch": "web-dev-server --app-index src/editor/index.html --open --node-resolve --watch",
"start:iife": "web-dev-server --app-index dist/editor/iife-index.html --esbuild-target auto --open",
"cypress:open": "run-p start cypress:open-no-start",
"cypress:open-no-start": "cypress open",
"cypress:run": "rimraf \".nyc_output/*\" && cypress run -q && nyc report --reporter=text-summary",
@ -72,9 +72,9 @@
"browser-fs-access": "0.21.1",
"canvg": "3.0.9",
"core-js": "3.19.1",
"elix": "15.0.0",
"elix": "15.0.1",
"html2canvas": "1.3.2",
"i18next": "21.4.2",
"i18next": "21.5.2",
"jspdf": "2.4.0",
"pathseg": "1.2.1",
"regenerator-runtime": "0.13.9",
@ -83,7 +83,7 @@
},
"devDependencies": {
"@babel/core": "7.16.0",
"@babel/preset-env": "7.16.0",
"@babel/preset-env": "7.16.4",
"@babel/register": "7.16.0",
"@babel/runtime-corejs3": "7.16.3",
"@cypress/code-coverage": "3.9.11",
@ -96,6 +96,7 @@
"@rollup/plugin-replace": "3.0.0",
"@rollup/plugin-url": "6.1.0",
"@web/dev-server": "0.1.28",
"@web/dev-server-esbuild": "^0.2.16",
"@web/dev-server-rollup": "0.3.13",
"babel-plugin-transform-object-rest-spread": "7.0.0-beta.3",
"copyfiles": "2.4.1",

View File

@ -22,7 +22,7 @@ const getDirectories = (source) => {
const isDirectory = (dir) => {
return lstatSync(dir).isDirectory();
};
return readdirSync(source).map((nme) => path.join(source, nme)).filter((i) => isDirectory(i));
return readdirSync(source).map((name) => path.join(source, name)).filter((i) => isDirectory(i));
};
// capture the list of files to build for extensions and ext-locales
@ -51,6 +51,13 @@ const config = [ {
sourcemap: true,
file: 'dist/editor/xdomain-Editor.js',
intro: 'const XDOMAIN = true;'
},
{
file: 'dist/editor/iife-Editor.js',
format: 'iife',
inlineDynamicImports: true,
name: 'Editor',
sourcemap: true
}
],
plugins: [
@ -65,7 +72,16 @@ const config = [ {
dest: 'dist/editor',
rename: 'xdomain-index.html',
transform: (contents) => contents.toString()
.replace('<script type="module" src="index.js">', '<script type="module" src="xdomain-index.js">')
.replace("import Editor from './Editor.js'", "import Editor from './xdomain-Editor.js")
},
{
src: 'src/editor/index.html',
dest: 'dist/editor',
rename: 'iife-index.html',
transform: (contents) => {
const replace1 = contents.toString().replace("import Editor from './Editor.js'", "/* import Editor from './xdomain-Editor.js' */");
return replace1.replace('<script type="module">', '<script src="./iife-Editor.js"></script><script>');
}
},
{ src: 'src/editor/images', dest },
{ src: 'src/editor/extensions/ext-shapes/shapelib', dest: dest.map((d) => `${d}/extensions/ext-shapes`) },
@ -102,18 +118,10 @@ extensionDirs.forEach((extensionDir) => {
inlineDynamicImports: true,
sourcemap: true
}
/*
,
{
format: 'system',
dir: `dist/editor/system/extensions/${extensionName}`,
inlineDynamicImports: true
}
*/
],
plugins: [
url({
include: [ '**/*.svg', '**/*.png', '**/*.jpg', '**/*.gif', '**/*.xml' ],
include: [ '**/*.svg', '**/*.xml' ],
limit: 0,
fileName: '[name][extname]'
}),

View File

@ -6,47 +6,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- No-op until loaded dynamically (could make configurable) -->
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
<!-- STYLESHEETS (others loaded dynamically) -->
<style id="styleoverrides" media="screen"></style>
<link href="./svgedit.css" rel="stylesheet" media="all">
</link>
<!-- SCRIPTS -->
<!-- Lacking browser support -->
<script type="module" src="./browser-not-supported.js"></script>
<!-- If you do not wish to add extensions by URL, you can add calls
within the following file to svgEditor.setConfig -->
<script type="module">
/* for available options see the file `docs/tutorials/ConfigOptions.md */
import Editor from './Editor.js';
const svgEditor = new Editor(document.getElementById('container'));
svgEditor.init();
svgEditor.setConfig({
allowInitialUserOverride: true,
extensions: [],
noDefaultExtensions: false,
userExtensions: [/* '../ext-helloworld/ext-helloworld.js' */]
});
// Variable XDOMAIN below is created by Rollup for the Xdomain build (see rollup.config.js)
/* globals XDOMAIN */
try { // try clause to avoid js to complain if XDOMAIN undefined
if (XDOMAIN) {
svgEditor.setConfig({
canvasName: 'xdomain', // Namespace this
allowedOrigins: [ '*' ]
});
console.info('xdomain config activated');
}
} catch (error) {/* empty fn */ }
</script>
<title>SVG-edit</title>
</head>
@ -60,5 +27,29 @@
-->
<div id="container" style="width:100%;height:100vh"></div>
</body>
<!-- If you do not wish to add extensions by URL, you can add calls
within the following file to svgEditor.setConfig -->
<script type="module">
import Editor from './Editor.js';
/* for available options see the file `docs/tutorials/ConfigOptions.md */
const svgEditor = new Editor(document.getElementById('container'));
svgEditor.init();
svgEditor.setConfig({
allowInitialUserOverride: true,
extensions: [],
noDefaultExtensions: false,
userExtensions: [/* '../ext-helloworld/ext-helloworld.js' */]
});
// Variable XDOMAIN below is created by Rollup for the Xdomain build (see rollup.config.js)
/* globals XDOMAIN */
try { // try clause to avoid js to complain if XDOMAIN undefined
if (XDOMAIN) {
svgEditor.setConfig({
canvasName: 'xdomain', // Namespace this
allowedOrigins: [ '*' ]
});
console.info('xdomain config activated');
}
} catch (error) {/* empty fn */ }
</script>
</html>

View File

@ -8,7 +8,16 @@ const commonjs = fromRollup(rollupCommonjs);
export default {
plugins: [
commonjs({
exclude: [ 'src', 'dist', 'instrumented' ]
// explicitely list packages to increase performance
include: [
'**/node_modules/rgbcolor/**/*',
'**/node_modules/raf/**/*',
'**/node_modules/font-family-papandreou/**/*',
'**/node_modules/svgpath/**/*',
'**/node_modules/cssesc/**/*',
'**/node_modules/core-js/**/*',
'**/node_modules/performance-now/**/*'
]
})
]
};