From 261452ec8252fa497df19b73ea0de5f89c255d9a Mon Sep 17 00:00:00 2001 From: moklick Date: Mon, 11 Apr 2022 12:14:33 +0200 Subject: [PATCH] refactor(rollup): remove svgr --- package-lock.json | 440 +----------------- package.json | 12 +- rollup.config.js | 2 - .../Controls/Icons/FitView.tsx | 11 + .../Controls/Icons/Lock.tsx | 11 + .../Controls/Icons/Minus.tsx | 11 + .../Controls/Icons/Plus.tsx | 11 + .../Controls/Icons/Unlock.tsx | 11 + src/additional-components/Controls/index.tsx | 10 +- tsconfig.json | 19 +- 10 files changed, 71 insertions(+), 467 deletions(-) create mode 100644 src/additional-components/Controls/Icons/FitView.tsx create mode 100644 src/additional-components/Controls/Icons/Lock.tsx create mode 100644 src/additional-components/Controls/Icons/Minus.tsx create mode 100644 src/additional-components/Controls/Icons/Plus.tsx create mode 100644 src/additional-components/Controls/Icons/Unlock.tsx diff --git a/package-lock.json b/package-lock.json index be93f616..6605c76f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,6 @@ "@rollup/plugin-commonjs": "^21.0.2", "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^4.0.0", - "@svgr/rollup": "^6.2.1", "@types/d3": "^7.1.0", "@types/react": "^17.0.40", "@types/resize-observer-browser": "^0.1.7", @@ -51,7 +50,7 @@ "typescript": "^4.6.2" }, "engines": { - "node": ">=12" + "node": ">=14" }, "peerDependencies": { "react": "16 || 17", @@ -1418,21 +1417,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-react-constant-elements": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.14.5.tgz", - "integrity": "sha512-NBqLEx1GxllIOXJInJAQbrnwwYJsV3WaMHIcOwD8rhYS0AabTWn7kHdHgPgu5RmHLU0q4DMxhAMu8ue/KampgQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-transform-react-display-name": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz", @@ -2266,274 +2250,6 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, - "node_modules/@svgr/babel-plugin-add-jsx-attribute": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.0.0.tgz", - "integrity": "sha512-MdPdhdWLtQsjd29Wa4pABdhWbaRMACdM1h31BY+c6FghTZqNGT7pEYdBoaGeKtdTOBC/XNFQaKVj+r/Ei2ryWA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-remove-jsx-attribute": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-6.0.0.tgz", - "integrity": "sha512-aVdtfx9jlaaxc3unA6l+M9YRnKIZjOhQPthLKqmTXC8UVkBLDRGwPKo+r8n3VZN8B34+yVajzPTZ+ptTSuZZCw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-remove-jsx-empty-expression": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-6.0.0.tgz", - "integrity": "sha512-Ccj42ApsePD451AZJJf1QzTD1B/BOU392URJTeXFxSK709i0KUsGtbwyiqsKu7vsYxpTM0IA5clAKDyf9RCZyA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-6.0.0.tgz", - "integrity": "sha512-88V26WGyt1Sfd1emBYmBJRWMmgarrExpKNVmI9vVozha4kqs6FzQJ/Kp5+EYli1apgX44518/0+t9+NU36lThQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-svg-dynamic-title": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-6.0.0.tgz", - "integrity": "sha512-F7YXNLfGze+xv0KMQxrl2vkNbI9kzT9oDK55/kUuymh1ACyXkMV+VZWX1zEhSTfEKh7VkHVZGmVtHg8eTZ6PRg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-svg-em-dimensions": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-6.0.0.tgz", - "integrity": "sha512-+rghFXxdIqJNLQK08kwPBD3Z22/0b2tEZ9lKiL/yTfuyj1wW8HUXu4bo/XkogATIYuXSghVQOOCwURXzHGKyZA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-transform-react-native-svg": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-6.0.0.tgz", - "integrity": "sha512-VaphyHZ+xIKv5v0K0HCzyfAaLhPGJXSk2HkpYfXIOKb7DjLBv0soHDxNv6X0vr2titsxE7klb++u7iOf7TSrFQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-transform-svg-component": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-6.2.0.tgz", - "integrity": "sha512-bhYIpsORb++wpsp91fymbFkf09Z/YEKR0DnFjxvN+8JHeCUD2unnh18jIMKnDJTWtvpTaGYPXELVe4OOzFI0xg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-preset": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-6.2.0.tgz", - "integrity": "sha512-4WQNY0J71JIaL03DRn0vLiz87JXx0b9dYm2aA8XHlQJQoixMl4r/soYHm8dsaJZ3jWtkCiOYy48dp9izvXhDkQ==", - "dev": true, - "dependencies": { - "@svgr/babel-plugin-add-jsx-attribute": "^6.0.0", - "@svgr/babel-plugin-remove-jsx-attribute": "^6.0.0", - "@svgr/babel-plugin-remove-jsx-empty-expression": "^6.0.0", - "@svgr/babel-plugin-replace-jsx-attribute-value": "^6.0.0", - "@svgr/babel-plugin-svg-dynamic-title": "^6.0.0", - "@svgr/babel-plugin-svg-em-dimensions": "^6.0.0", - "@svgr/babel-plugin-transform-react-native-svg": "^6.0.0", - "@svgr/babel-plugin-transform-svg-component": "^6.2.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/core": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@svgr/core/-/core-6.2.1.tgz", - "integrity": "sha512-NWufjGI2WUyrg46mKuySfviEJ6IxHUOm/8a3Ph38VCWSp+83HBraCQrpEM3F3dB6LBs5x8OElS8h3C0oOJaJAA==", - "dev": true, - "dependencies": { - "@svgr/plugin-jsx": "^6.2.1", - "camelcase": "^6.2.0", - "cosmiconfig": "^7.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, - "node_modules/@svgr/hast-util-to-babel-ast": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-6.2.1.tgz", - "integrity": "sha512-pt7MMkQFDlWJVy9ULJ1h+hZBDGFfSCwlBNW1HkLnVi7jUhyEXUaGYWi1x6bM2IXuAR9l265khBT4Av4lPmaNLQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.6", - "entities": "^3.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, - "node_modules/@svgr/hast-util-to-babel-ast/node_modules/entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/@svgr/plugin-jsx": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-6.2.1.tgz", - "integrity": "sha512-u+MpjTsLaKo6r3pHeeSVsh9hmGRag2L7VzApWIaS8imNguqoUwDq/u6U/NDmYs/KAsrmtBjOEaAAPbwNGXXp1g==", - "dev": true, - "dependencies": { - "@babel/core": "^7.15.5", - "@svgr/babel-preset": "^6.2.0", - "@svgr/hast-util-to-babel-ast": "^6.2.1", - "svg-parser": "^2.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@svgr/core": "^6.0.0" - } - }, - "node_modules/@svgr/plugin-svgo": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-6.2.0.tgz", - "integrity": "sha512-oDdMQONKOJEbuKwuy4Np6VdV6qoaLLvoY86hjvQEgU82Vx1MSWRyYms6Sl0f+NtqxLI/rDVufATbP/ev996k3Q==", - "dev": true, - "dependencies": { - "cosmiconfig": "^7.0.1", - "deepmerge": "^4.2.2", - "svgo": "^2.5.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@svgr/core": "^6.0.0" - } - }, - "node_modules/@svgr/rollup": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@svgr/rollup/-/rollup-6.2.1.tgz", - "integrity": "sha512-5X6aMiGL1F5g0TubLY41GJ/Qf0Kz2xtbF37UbRJEHe2Z9CMlGl9Z3fQ8e28vmHrTptmymNRoHssgQ2Ejb1DARQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.15.5", - "@babel/plugin-transform-react-constant-elements": "^7.14.5", - "@babel/preset-env": "^7.15.6", - "@babel/preset-react": "^7.14.5", - "@babel/preset-typescript": "^7.16.0", - "@svgr/core": "^6.2.1", - "@svgr/plugin-jsx": "^6.2.1", - "@svgr/plugin-svgo": "^6.2.0", - "rollup-pluginutils": "^2.8.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -9736,12 +9452,6 @@ "node": ">=4" } }, - "node_modules/svg-parser": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", - "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==", - "dev": true - }, "node_modules/svgo": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", @@ -11446,15 +11156,6 @@ "@babel/helper-plugin-utils": "^7.16.7" } }, - "@babel/plugin-transform-react-constant-elements": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.14.5.tgz", - "integrity": "sha512-NBqLEx1GxllIOXJInJAQbrnwwYJsV3WaMHIcOwD8rhYS0AabTWn7kHdHgPgu5RmHLU0q4DMxhAMu8ue/KampgQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, "@babel/plugin-transform-react-display-name": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz", @@ -12105,139 +11806,6 @@ "integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw==", "dev": true }, - "@svgr/babel-plugin-add-jsx-attribute": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.0.0.tgz", - "integrity": "sha512-MdPdhdWLtQsjd29Wa4pABdhWbaRMACdM1h31BY+c6FghTZqNGT7pEYdBoaGeKtdTOBC/XNFQaKVj+r/Ei2ryWA==", - "dev": true - }, - "@svgr/babel-plugin-remove-jsx-attribute": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-6.0.0.tgz", - "integrity": "sha512-aVdtfx9jlaaxc3unA6l+M9YRnKIZjOhQPthLKqmTXC8UVkBLDRGwPKo+r8n3VZN8B34+yVajzPTZ+ptTSuZZCw==", - "dev": true - }, - "@svgr/babel-plugin-remove-jsx-empty-expression": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-6.0.0.tgz", - "integrity": "sha512-Ccj42ApsePD451AZJJf1QzTD1B/BOU392URJTeXFxSK709i0KUsGtbwyiqsKu7vsYxpTM0IA5clAKDyf9RCZyA==", - "dev": true - }, - "@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-6.0.0.tgz", - "integrity": "sha512-88V26WGyt1Sfd1emBYmBJRWMmgarrExpKNVmI9vVozha4kqs6FzQJ/Kp5+EYli1apgX44518/0+t9+NU36lThQ==", - "dev": true - }, - "@svgr/babel-plugin-svg-dynamic-title": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-6.0.0.tgz", - "integrity": "sha512-F7YXNLfGze+xv0KMQxrl2vkNbI9kzT9oDK55/kUuymh1ACyXkMV+VZWX1zEhSTfEKh7VkHVZGmVtHg8eTZ6PRg==", - "dev": true - }, - "@svgr/babel-plugin-svg-em-dimensions": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-6.0.0.tgz", - "integrity": "sha512-+rghFXxdIqJNLQK08kwPBD3Z22/0b2tEZ9lKiL/yTfuyj1wW8HUXu4bo/XkogATIYuXSghVQOOCwURXzHGKyZA==", - "dev": true - }, - "@svgr/babel-plugin-transform-react-native-svg": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-6.0.0.tgz", - "integrity": "sha512-VaphyHZ+xIKv5v0K0HCzyfAaLhPGJXSk2HkpYfXIOKb7DjLBv0soHDxNv6X0vr2titsxE7klb++u7iOf7TSrFQ==", - "dev": true - }, - "@svgr/babel-plugin-transform-svg-component": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-6.2.0.tgz", - "integrity": "sha512-bhYIpsORb++wpsp91fymbFkf09Z/YEKR0DnFjxvN+8JHeCUD2unnh18jIMKnDJTWtvpTaGYPXELVe4OOzFI0xg==", - "dev": true - }, - "@svgr/babel-preset": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-6.2.0.tgz", - "integrity": "sha512-4WQNY0J71JIaL03DRn0vLiz87JXx0b9dYm2aA8XHlQJQoixMl4r/soYHm8dsaJZ3jWtkCiOYy48dp9izvXhDkQ==", - "dev": true, - "requires": { - "@svgr/babel-plugin-add-jsx-attribute": "^6.0.0", - "@svgr/babel-plugin-remove-jsx-attribute": "^6.0.0", - "@svgr/babel-plugin-remove-jsx-empty-expression": "^6.0.0", - "@svgr/babel-plugin-replace-jsx-attribute-value": "^6.0.0", - "@svgr/babel-plugin-svg-dynamic-title": "^6.0.0", - "@svgr/babel-plugin-svg-em-dimensions": "^6.0.0", - "@svgr/babel-plugin-transform-react-native-svg": "^6.0.0", - "@svgr/babel-plugin-transform-svg-component": "^6.2.0" - } - }, - "@svgr/core": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@svgr/core/-/core-6.2.1.tgz", - "integrity": "sha512-NWufjGI2WUyrg46mKuySfviEJ6IxHUOm/8a3Ph38VCWSp+83HBraCQrpEM3F3dB6LBs5x8OElS8h3C0oOJaJAA==", - "dev": true, - "requires": { - "@svgr/plugin-jsx": "^6.2.1", - "camelcase": "^6.2.0", - "cosmiconfig": "^7.0.1" - } - }, - "@svgr/hast-util-to-babel-ast": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-6.2.1.tgz", - "integrity": "sha512-pt7MMkQFDlWJVy9ULJ1h+hZBDGFfSCwlBNW1HkLnVi7jUhyEXUaGYWi1x6bM2IXuAR9l265khBT4Av4lPmaNLQ==", - "dev": true, - "requires": { - "@babel/types": "^7.15.6", - "entities": "^3.0.1" - }, - "dependencies": { - "entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", - "dev": true - } - } - }, - "@svgr/plugin-jsx": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-6.2.1.tgz", - "integrity": "sha512-u+MpjTsLaKo6r3pHeeSVsh9hmGRag2L7VzApWIaS8imNguqoUwDq/u6U/NDmYs/KAsrmtBjOEaAAPbwNGXXp1g==", - "dev": true, - "requires": { - "@babel/core": "^7.15.5", - "@svgr/babel-preset": "^6.2.0", - "@svgr/hast-util-to-babel-ast": "^6.2.1", - "svg-parser": "^2.0.2" - } - }, - "@svgr/plugin-svgo": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-6.2.0.tgz", - "integrity": "sha512-oDdMQONKOJEbuKwuy4Np6VdV6qoaLLvoY86hjvQEgU82Vx1MSWRyYms6Sl0f+NtqxLI/rDVufATbP/ev996k3Q==", - "dev": true, - "requires": { - "cosmiconfig": "^7.0.1", - "deepmerge": "^4.2.2", - "svgo": "^2.5.0" - } - }, - "@svgr/rollup": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@svgr/rollup/-/rollup-6.2.1.tgz", - "integrity": "sha512-5X6aMiGL1F5g0TubLY41GJ/Qf0Kz2xtbF37UbRJEHe2Z9CMlGl9Z3fQ8e28vmHrTptmymNRoHssgQ2Ejb1DARQ==", - "dev": true, - "requires": { - "@babel/core": "^7.15.5", - "@babel/plugin-transform-react-constant-elements": "^7.14.5", - "@babel/preset-env": "^7.15.6", - "@babel/preset-react": "^7.14.5", - "@babel/preset-typescript": "^7.16.0", - "@svgr/core": "^6.2.1", - "@svgr/plugin-jsx": "^6.2.1", - "@svgr/plugin-svgo": "^6.2.0", - "rollup-pluginutils": "^2.8.2" - } - }, "@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", @@ -17646,12 +17214,6 @@ "has-flag": "^3.0.0" } }, - "svg-parser": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", - "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==", - "dev": true - }, "svgo": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", diff --git a/package.json b/package.json index c1292a97..caa50b9e 100644 --- a/package.json +++ b/package.json @@ -2,16 +2,17 @@ "name": "react-flow-renderer", "version": "10.0.7", "engines": { - "node": ">=12" + "node": ">=14" }, - "type": "module", - "main": "dist/esm/index.js", + "main": "dist/umd/index.js", "module": "dist/esm/index.js", "jsdelivr": "dist/umd/index.js", "unpkg": "dist/umd/index.js", "exports": { - "umd": "./dist/umd/index.js", - "default": "./dist/esm/index.js" + ".": { + "import": "./dist/esm/index.js", + "require": "./dist/umd/index.js" + } }, "types": "dist/esm/index.d.ts", "license": "MIT", @@ -55,7 +56,6 @@ "@rollup/plugin-commonjs": "^21.0.2", "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^4.0.0", - "@svgr/rollup": "^6.2.1", "@types/d3": "^7.1.0", "@types/react": "^17.0.40", "@types/resize-observer-browser": "^0.1.7", diff --git a/rollup.config.js b/rollup.config.js index 433562b9..f03126eb 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -3,7 +3,6 @@ import commonjs from '@rollup/plugin-commonjs'; import babel from '@rollup/plugin-babel'; import postcss from 'rollup-plugin-postcss'; import replace from '@rollup/plugin-replace'; -import svgr from '@svgr/rollup'; import typescript from 'rollup-plugin-typescript2'; import { DEFAULT_EXTENSIONS as DEFAULT_BABEL_EXTENSIONS } from '@babel/core'; import { visualizer } from 'rollup-plugin-visualizer'; @@ -77,7 +76,6 @@ export const baseConfig = ({ outputOptions = {}, injectCSS = true } = {}) => { minimize: isProd, inject: false, }), - svgr(), resolve(), typescript({ clean: true, diff --git a/src/additional-components/Controls/Icons/FitView.tsx b/src/additional-components/Controls/Icons/FitView.tsx new file mode 100644 index 00000000..c745a0d4 --- /dev/null +++ b/src/additional-components/Controls/Icons/FitView.tsx @@ -0,0 +1,11 @@ +import React from 'react'; + +function FitViewIcon() { + return ( + + + + ); +} + +export default FitViewIcon; diff --git a/src/additional-components/Controls/Icons/Lock.tsx b/src/additional-components/Controls/Icons/Lock.tsx new file mode 100644 index 00000000..167cb899 --- /dev/null +++ b/src/additional-components/Controls/Icons/Lock.tsx @@ -0,0 +1,11 @@ +import React from 'react'; + +function LockIcon() { + return ( + + + + ); +} + +export default LockIcon; diff --git a/src/additional-components/Controls/Icons/Minus.tsx b/src/additional-components/Controls/Icons/Minus.tsx new file mode 100644 index 00000000..4bb29f35 --- /dev/null +++ b/src/additional-components/Controls/Icons/Minus.tsx @@ -0,0 +1,11 @@ +import React from 'react'; + +function MinusIcon() { + return ( + + + + ); +} + +export default MinusIcon; diff --git a/src/additional-components/Controls/Icons/Plus.tsx b/src/additional-components/Controls/Icons/Plus.tsx new file mode 100644 index 00000000..cc82c56c --- /dev/null +++ b/src/additional-components/Controls/Icons/Plus.tsx @@ -0,0 +1,11 @@ +import React from 'react'; + +function PlusIcon() { + return ( + + + + ); +} + +export default PlusIcon; diff --git a/src/additional-components/Controls/Icons/Unlock.tsx b/src/additional-components/Controls/Icons/Unlock.tsx new file mode 100644 index 00000000..7c921f1b --- /dev/null +++ b/src/additional-components/Controls/Icons/Unlock.tsx @@ -0,0 +1,11 @@ +import React from 'react'; + +function UnlockIcon() { + return ( + + + + ); +} + +export default UnlockIcon; diff --git a/src/additional-components/Controls/index.tsx b/src/additional-components/Controls/index.tsx index 2e931582..b7f4698c 100644 --- a/src/additional-components/Controls/index.tsx +++ b/src/additional-components/Controls/index.tsx @@ -4,11 +4,11 @@ import cc from 'classcat'; import { useStore, useStoreApi } from '../../store'; import useReactFlow from '../../hooks/useReactFlow'; -import PlusIcon from '../../../assets/icons/plus.svg'; -import MinusIcon from '../../../assets/icons/minus.svg'; -import FitviewIcon from '../../../assets/icons/fitview.svg'; -import LockIcon from '../../../assets/icons/lock.svg'; -import UnlockIcon from '../../../assets/icons/unlock.svg'; +import PlusIcon from './Icons/Plus'; +import MinusIcon from './Icons/Minus'; +import FitviewIcon from './Icons/FitView'; +import LockIcon from './Icons/Lock'; +import UnlockIcon from './Icons/Unlock'; import { ControlProps, ControlButtonProps, ReactFlowState } from '../../types'; diff --git a/tsconfig.json b/tsconfig.json index b1226b99..33a51e49 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,10 +3,7 @@ "outDir": "dist", "module": "esnext", "target": "esnext", - "lib": [ - "dom", - "esnext" - ], + "lib": ["dom", "esnext"], "jsx": "react", "moduleResolution": "node", "declaration": true, @@ -24,14 +21,6 @@ "allowSyntheticDefaultImports": true, "esModuleInterop": true }, - "include": [ - "src" - ], - "exclude": [ - "node_modules", - "build", - "dist", - "example", - "rollup.config.js" - ] -} \ No newline at end of file + "include": ["src"], + "exclude": ["node_modules", "build", "dist", "example", "rollup.config.js"] +}