Add yet-another-react-lightbox package and update .gitignore to exclude node_modules
This commit is contained in:
66
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/CHANGELOG.md
generated
vendored
66
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/CHANGELOG.md
generated
vendored
@@ -1,66 +0,0 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [8.0.0](https://github.com/gregberge/svgr/compare/v7.0.0...v8.0.0) (2023-05-09)
|
||||
|
||||
**Note:** Version bump only for package @svgr/babel-plugin-add-jsx-attribute
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [7.0.0](https://github.com/gregberge/svgr/compare/v6.5.1...v7.0.0) (2023-03-24)
|
||||
|
||||
**Note:** Version bump only for package @svgr/babel-plugin-add-jsx-attribute
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [6.5.1](https://github.com/gregberge/svgr/compare/v6.5.0...v6.5.1) (2022-10-27)
|
||||
|
||||
**Note:** Version bump only for package @svgr/babel-plugin-add-jsx-attribute
|
||||
|
||||
# [6.5.0](https://github.com/gregberge/svgr/compare/v6.4.0...v6.5.0) (2022-10-14)
|
||||
|
||||
**Note:** Version bump only for package @svgr/babel-plugin-add-jsx-attribute
|
||||
|
||||
## [6.3.1](https://github.com/gregberge/svgr/compare/v6.3.0...v6.3.1) (2022-07-22)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- fix exports compat with ESM ([#749](https://github.com/gregberge/svgr/issues/749)) ([f3e304c](https://github.com/gregberge/svgr/commit/f3e304c166282f042ecd4d6c396a0798a7f0b490))
|
||||
|
||||
# [6.3.0](https://github.com/gregberge/svgr/compare/v6.2.1...v6.3.0) (2022-07-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **package.json:** fix exports ([#745](https://github.com/gregberge/svgr/issues/745)) ([2a368d1](https://github.com/gregberge/svgr/commit/2a368d1305949ec6426c7c7312c04224071ec2bd))
|
||||
|
||||
# [5.4.0](https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-add-jsx-attribute/compare/v5.3.1...v5.4.0) (2020-04-27)
|
||||
|
||||
**Note:** Version bump only for package @svgr/babel-plugin-add-jsx-attribute
|
||||
|
||||
## [5.0.1](https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-add-jsx-attribute/compare/v5.0.0...v5.0.1) (2019-12-29)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- fix engines in package.json ([a45d6fc](https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-add-jsx-attribute/commit/a45d6fc8b43402bec60ed4e9273f90fdc65a23a7))
|
||||
|
||||
# [4.2.0](https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-add-jsx-attribute/compare/v4.1.0...v4.2.0) (2019-04-11)
|
||||
|
||||
**Note:** Version bump only for package @svgr/babel-plugin-add-jsx-attribute
|
||||
|
||||
# [4.0.0](https://github.com/gregberge/svgr/compare/v3.1.0...v4.0.0) (2018-11-04)
|
||||
|
||||
### Features
|
||||
|
||||
- **v4:** new architecture ([ac8b8ca](https://github.com/gregberge/svgr/commit/ac8b8ca))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **v4:** - `template` option must now returns a Babel AST
|
||||
|
||||
* `@svgr/core` does not include svgo & prettier by default
|
||||
7
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/LICENSE
generated
vendored
7
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/LICENSE
generated
vendored
@@ -1,7 +0,0 @@
|
||||
Copyright 2017 Smooth Code
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
37
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/README.md
generated
vendored
37
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/README.md
generated
vendored
@@ -1,37 +0,0 @@
|
||||
# @svgr/babel-plugin-add-jsx-attribute
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install --save-dev @svgr/babel-plugin-add-jsx-attribute
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": [
|
||||
[
|
||||
"@svgr/babel-plugin-add-jsx-attribute",
|
||||
{
|
||||
"elements": ["svg"],
|
||||
"attributes": [
|
||||
{
|
||||
"name": "width",
|
||||
"value": "200",
|
||||
"spread": false,
|
||||
"literal": false,
|
||||
"position": "end"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
20
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/dist/index.d.ts
generated
vendored
20
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/dist/index.d.ts
generated
vendored
@@ -1,20 +0,0 @@
|
||||
import { ConfigAPI, NodePath, types } from '@babel/core';
|
||||
|
||||
interface Attribute {
|
||||
name: string;
|
||||
value?: boolean | number | string | null;
|
||||
spread?: boolean;
|
||||
literal?: boolean;
|
||||
position?: 'start' | 'end';
|
||||
}
|
||||
interface Options {
|
||||
elements: string[];
|
||||
attributes: Attribute[];
|
||||
}
|
||||
declare const addJSXAttribute: (_: ConfigAPI, opts: Options) => {
|
||||
visitor: {
|
||||
JSXOpeningElement(path: NodePath<types.JSXOpeningElement>): void;
|
||||
};
|
||||
};
|
||||
|
||||
export { Attribute, Options, addJSXAttribute as default };
|
||||
79
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/dist/index.js
generated
vendored
79
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/dist/index.js
generated
vendored
@@ -1,79 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var core = require('@babel/core');
|
||||
|
||||
const positionMethod = {
|
||||
start: "unshiftContainer",
|
||||
end: "pushContainer"
|
||||
};
|
||||
const addJSXAttribute = (_, opts) => {
|
||||
function getAttributeValue({
|
||||
literal,
|
||||
value
|
||||
}) {
|
||||
if (typeof value === "boolean") {
|
||||
return core.types.jsxExpressionContainer(core.types.booleanLiteral(value));
|
||||
}
|
||||
if (typeof value === "number") {
|
||||
return core.types.jsxExpressionContainer(core.types.numericLiteral(value));
|
||||
}
|
||||
if (typeof value === "string" && literal) {
|
||||
return core.types.jsxExpressionContainer(
|
||||
core.template.ast(value).expression
|
||||
);
|
||||
}
|
||||
if (typeof value === "string") {
|
||||
return core.types.stringLiteral(value);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function getAttribute({ spread, name, value, literal }) {
|
||||
if (spread) {
|
||||
return core.types.jsxSpreadAttribute(core.types.identifier(name));
|
||||
}
|
||||
return core.types.jsxAttribute(
|
||||
core.types.jsxIdentifier(name),
|
||||
getAttributeValue({ value, literal })
|
||||
);
|
||||
}
|
||||
return {
|
||||
visitor: {
|
||||
JSXOpeningElement(path) {
|
||||
if (!core.types.isJSXIdentifier(path.node.name))
|
||||
return;
|
||||
if (!opts.elements.includes(path.node.name.name))
|
||||
return;
|
||||
opts.attributes.forEach(
|
||||
({
|
||||
name,
|
||||
value = null,
|
||||
spread = false,
|
||||
literal = false,
|
||||
position = "end"
|
||||
}) => {
|
||||
const method = positionMethod[position];
|
||||
const newAttribute = getAttribute({ spread, name, value, literal });
|
||||
const attributes = path.get("attributes");
|
||||
const isEqualAttribute = (attribute) => {
|
||||
if (spread)
|
||||
return attribute.isJSXSpreadAttribute() && attribute.get("argument").isIdentifier({ name });
|
||||
return attribute.isJSXAttribute() && attribute.get("name").isJSXIdentifier({ name });
|
||||
};
|
||||
const replaced = attributes.some((attribute) => {
|
||||
if (!isEqualAttribute(attribute))
|
||||
return false;
|
||||
attribute.replaceWith(newAttribute);
|
||||
return true;
|
||||
});
|
||||
if (!replaced) {
|
||||
path[method]("attributes", newAttribute);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = addJSXAttribute;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/dist/index.js.map
generated
vendored
1
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
40
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/package.json
generated
vendored
40
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/package.json
generated
vendored
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"name": "@svgr/babel-plugin-add-jsx-attribute",
|
||||
"description": "Add JSX attribute",
|
||||
"version": "8.0.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": "https://github.com/gregberge/svgr/tree/main/packages/babel-plugin-add-jsx-attribute",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"scripts": {
|
||||
"reset": "rm -rf dist",
|
||||
"build": "rollup -c ../../build/rollup.config.mjs",
|
||||
"prepublishOnly": "pnpm run reset && pnpm run build"
|
||||
},
|
||||
"gitHead": "52a1079681477587ef0d842c0e78531adf2d2520"
|
||||
}
|
||||
4
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/tsconfig.json
generated
vendored
4
frontend/node_modules/@svgr/babel-plugin-add-jsx-attribute/tsconfig.json
generated
vendored
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig",
|
||||
"include": ["src"]
|
||||
}
|
||||
7
frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/LICENSE
generated
vendored
7
frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/LICENSE
generated
vendored
@@ -1,7 +0,0 @@
|
||||
Copyright 2017 Smooth Code
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
29
frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/README.md
generated
vendored
29
frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/README.md
generated
vendored
@@ -1,29 +0,0 @@
|
||||
# @svgr/babel-plugin-remove-jsx-attribute
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install --save-dev @svgr/babel-plugin-remove-jsx-attribute
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": [
|
||||
[
|
||||
"@svgr/babel-plugin-remove-jsx-attribute",
|
||||
{
|
||||
"elements": ["svg"],
|
||||
"attributes": ["width", "height"]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
13
frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/dist/index.d.ts
generated
vendored
13
frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/dist/index.d.ts
generated
vendored
@@ -1,13 +0,0 @@
|
||||
import { ConfigAPI, NodePath, types } from '@babel/core';
|
||||
|
||||
interface Options {
|
||||
elements: string[];
|
||||
attributes: string[];
|
||||
}
|
||||
declare const removeJSXAttribute: (_: ConfigAPI, opts: Options) => {
|
||||
visitor: {
|
||||
JSXOpeningElement(path: NodePath<types.JSXOpeningElement>): void;
|
||||
};
|
||||
};
|
||||
|
||||
export { Options, removeJSXAttribute as default };
|
||||
22
frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/dist/index.js
generated
vendored
22
frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/dist/index.js
generated
vendored
@@ -1,22 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var core = require('@babel/core');
|
||||
|
||||
const removeJSXAttribute = (_, opts) => ({
|
||||
visitor: {
|
||||
JSXOpeningElement(path) {
|
||||
if (!core.types.isJSXIdentifier(path.node.name))
|
||||
return;
|
||||
if (!opts.elements.includes(path.node.name.name))
|
||||
return;
|
||||
path.get("attributes").forEach((attribute) => {
|
||||
if (core.types.isJSXAttribute(attribute.node) && core.types.isJSXIdentifier(attribute.node.name) && opts.attributes.includes(attribute.node.name.name)) {
|
||||
attribute.remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = removeJSXAttribute;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/dist/index.js.map
generated
vendored
1
frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/dist/index.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { ConfigAPI, types as t, NodePath } from '@babel/core'\n\nexport interface Options {\n elements: string[]\n attributes: string[]\n}\n\nconst removeJSXAttribute = (_: ConfigAPI, opts: Options) => ({\n visitor: {\n JSXOpeningElement(path: NodePath<t.JSXOpeningElement>) {\n if (!t.isJSXIdentifier(path.node.name)) return\n if (!opts.elements.includes(path.node.name.name)) return\n\n // @ts-ignore\n path.get('attributes').forEach((attribute) => {\n if (\n t.isJSXAttribute(attribute.node) &&\n t.isJSXIdentifier(attribute.node.name) &&\n opts.attributes.includes(attribute.node.name.name)\n ) {\n attribute.remove()\n }\n })\n },\n },\n})\n\nexport default removeJSXAttribute\n"],"names":["t"],"mappings":";;;;AAQM,MAAA,kBAAA,GAAqB,CAAC,CAAA,EAAc,IAAmB,MAAA;AAAA,EAC3D,OAAS,EAAA;AAAA,IACP,kBAAkB,IAAqC,EAAA;AACrD,MAAA,IAAI,CAACA,UAAA,CAAE,eAAgB,CAAA,IAAA,CAAK,KAAK,IAAI,CAAA;AAAG,QAAA,OAAA;AACxC,MAAA,IAAI,CAAC,IAAK,CAAA,QAAA,CAAS,SAAS,IAAK,CAAA,IAAA,CAAK,KAAK,IAAI,CAAA;AAAG,QAAA,OAAA;AAGlD,MAAA,IAAA,CAAK,GAAI,CAAA,YAAY,CAAE,CAAA,OAAA,CAAQ,CAAC,SAAc,KAAA;AAC5C,QAAA,IACEA,WAAE,cAAe,CAAA,SAAA,CAAU,IAAI,CAC/B,IAAAA,UAAA,CAAE,gBAAgB,SAAU,CAAA,IAAA,CAAK,IAAI,CAAA,IACrC,KAAK,UAAW,CAAA,QAAA,CAAS,UAAU,IAAK,CAAA,IAAA,CAAK,IAAI,CACjD,EAAA;AACA,UAAA,SAAA,CAAU,MAAO,EAAA,CAAA;AAAA,SACnB;AAAA,OACD,CAAA,CAAA;AAAA,KACH;AAAA,GACF;AACF,CAAA;;;;"}
|
||||
40
frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/package.json
generated
vendored
40
frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/package.json
generated
vendored
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"name": "@svgr/babel-plugin-remove-jsx-attribute",
|
||||
"description": "Remove JSX attribute",
|
||||
"version": "8.0.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": "https://github.com/gregberge/svgr/tree/main/packages/babel-plugin-remove-jsx-attribute",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"scripts": {
|
||||
"reset": "rm -rf dist",
|
||||
"build": "rollup -c ../../build/rollup.config.mjs",
|
||||
"prepublishOnly": "pnpm run reset && pnpm run build"
|
||||
},
|
||||
"gitHead": "52a1079681477587ef0d842c0e78531adf2d2520"
|
||||
}
|
||||
7
frontend/node_modules/@svgr/babel-plugin-remove-jsx-empty-expression/LICENSE
generated
vendored
7
frontend/node_modules/@svgr/babel-plugin-remove-jsx-empty-expression/LICENSE
generated
vendored
@@ -1,7 +0,0 @@
|
||||
Copyright 2017 Smooth Code
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
21
frontend/node_modules/@svgr/babel-plugin-remove-jsx-empty-expression/README.md
generated
vendored
21
frontend/node_modules/@svgr/babel-plugin-remove-jsx-empty-expression/README.md
generated
vendored
@@ -1,21 +0,0 @@
|
||||
# @svgr/babel-plugin-remove-jsx-empty-expression
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install --save-dev @svgr/babel-plugin-remove-jsx-empty-expression
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["@svgr/babel-plugin-remove-jsx-empty-expression"]
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
9
frontend/node_modules/@svgr/babel-plugin-remove-jsx-empty-expression/dist/index.d.ts
generated
vendored
9
frontend/node_modules/@svgr/babel-plugin-remove-jsx-empty-expression/dist/index.d.ts
generated
vendored
@@ -1,9 +0,0 @@
|
||||
import { NodePath, types } from '@babel/core';
|
||||
|
||||
declare const removeJSXEmptyExpression: () => {
|
||||
visitor: {
|
||||
JSXExpressionContainer(path: NodePath<types.JSXExpressionContainer>): void;
|
||||
};
|
||||
};
|
||||
|
||||
export { removeJSXEmptyExpression as default };
|
||||
16
frontend/node_modules/@svgr/babel-plugin-remove-jsx-empty-expression/dist/index.js
generated
vendored
16
frontend/node_modules/@svgr/babel-plugin-remove-jsx-empty-expression/dist/index.js
generated
vendored
@@ -1,16 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var core = require('@babel/core');
|
||||
|
||||
const removeJSXEmptyExpression = () => ({
|
||||
visitor: {
|
||||
JSXExpressionContainer(path) {
|
||||
if (core.types.isJSXEmptyExpression(path.get("expression"))) {
|
||||
path.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = removeJSXEmptyExpression;
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { types as t, NodePath } from '@babel/core'\n\nconst removeJSXEmptyExpression = () => ({\n visitor: {\n JSXExpressionContainer(path: NodePath<t.JSXExpressionContainer>) {\n if (t.isJSXEmptyExpression(path.get('expression'))) {\n path.remove()\n }\n },\n },\n})\n\nexport default removeJSXEmptyExpression\n"],"names":["t"],"mappings":";;;;AAGA,MAAM,2BAA2B,OAAO;AAAA,EACtC,OAAS,EAAA;AAAA,IACP,uBAAuB,IAA0C,EAAA;AAC/D,MAAA,IAAIA,WAAE,oBAAqB,CAAA,IAAA,CAAK,GAAI,CAAA,YAAY,CAAC,CAAG,EAAA;AAClD,QAAA,IAAA,CAAK,MAAO,EAAA,CAAA;AAAA,OACd;AAAA,KACF;AAAA,GACF;AACF,CAAA;;;;"}
|
||||
40
frontend/node_modules/@svgr/babel-plugin-remove-jsx-empty-expression/package.json
generated
vendored
40
frontend/node_modules/@svgr/babel-plugin-remove-jsx-empty-expression/package.json
generated
vendored
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"name": "@svgr/babel-plugin-remove-jsx-empty-expression",
|
||||
"description": "Remove JSX empty expression",
|
||||
"version": "8.0.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": "https://github.com/gregberge/svgr/tree/main/packages/babel-plugin-remove-jsx-empty-expression",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"scripts": {
|
||||
"reset": "rm -rf dist",
|
||||
"build": "rollup -c ../../build/rollup.config.mjs",
|
||||
"prepublishOnly": "pnpm run reset && pnpm run build"
|
||||
},
|
||||
"gitHead": "52a1079681477587ef0d842c0e78531adf2d2520"
|
||||
}
|
||||
7
frontend/node_modules/@svgr/babel-plugin-replace-jsx-attribute-value/LICENSE
generated
vendored
7
frontend/node_modules/@svgr/babel-plugin-replace-jsx-attribute-value/LICENSE
generated
vendored
@@ -1,7 +0,0 @@
|
||||
Copyright 2017 Smooth Code
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
31
frontend/node_modules/@svgr/babel-plugin-replace-jsx-attribute-value/README.md
generated
vendored
31
frontend/node_modules/@svgr/babel-plugin-replace-jsx-attribute-value/README.md
generated
vendored
@@ -1,31 +0,0 @@
|
||||
# @svgr/babel-plugin-replace-jsx-attribute-value
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install --save-dev @svgr/babel-plugin-replace-jsx-attribute-value
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": [
|
||||
[
|
||||
"@svgr/babel-plugin-replace-jsx-attribute-value",
|
||||
{
|
||||
"values": [
|
||||
{ "value": "#000", "newValue": "#fff" },
|
||||
{ "value": "blue", "newValue": "props.color", "literal": true }
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
17
frontend/node_modules/@svgr/babel-plugin-replace-jsx-attribute-value/dist/index.d.ts
generated
vendored
17
frontend/node_modules/@svgr/babel-plugin-replace-jsx-attribute-value/dist/index.d.ts
generated
vendored
@@ -1,17 +0,0 @@
|
||||
import { ConfigAPI, NodePath, types } from '@babel/core';
|
||||
|
||||
interface Value {
|
||||
value: string;
|
||||
newValue: string | boolean | number;
|
||||
literal?: boolean;
|
||||
}
|
||||
interface Options {
|
||||
values: Value[];
|
||||
}
|
||||
declare const addJSXAttribute: (api: ConfigAPI, opts: Options) => {
|
||||
visitor: {
|
||||
JSXAttribute(path: NodePath<types.JSXAttribute>): void;
|
||||
};
|
||||
};
|
||||
|
||||
export { Options, Value, addJSXAttribute as default };
|
||||
43
frontend/node_modules/@svgr/babel-plugin-replace-jsx-attribute-value/dist/index.js
generated
vendored
43
frontend/node_modules/@svgr/babel-plugin-replace-jsx-attribute-value/dist/index.js
generated
vendored
@@ -1,43 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var core = require('@babel/core');
|
||||
|
||||
const addJSXAttribute = (api, opts) => {
|
||||
const getAttributeValue = (value, literal) => {
|
||||
if (typeof value === "string" && literal) {
|
||||
return core.types.jsxExpressionContainer(
|
||||
core.template.ast(value).expression
|
||||
);
|
||||
}
|
||||
if (typeof value === "string") {
|
||||
return core.types.stringLiteral(value);
|
||||
}
|
||||
if (typeof value === "boolean") {
|
||||
return core.types.jsxExpressionContainer(core.types.booleanLiteral(value));
|
||||
}
|
||||
if (typeof value === "number") {
|
||||
return core.types.jsxExpressionContainer(core.types.numericLiteral(value));
|
||||
}
|
||||
return null;
|
||||
};
|
||||
return {
|
||||
visitor: {
|
||||
JSXAttribute(path) {
|
||||
const valuePath = path.get("value");
|
||||
if (!valuePath.isStringLiteral())
|
||||
return;
|
||||
opts.values.forEach(({ value, newValue, literal }) => {
|
||||
if (!valuePath.isStringLiteral({ value }))
|
||||
return;
|
||||
const attributeValue = getAttributeValue(newValue, literal);
|
||||
if (attributeValue) {
|
||||
valuePath.replaceWith(attributeValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = addJSXAttribute;
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { ConfigAPI, types as t, NodePath, template } from '@babel/core'\n\nexport interface Value {\n value: string\n newValue: string | boolean | number\n literal?: boolean\n}\n\nexport interface Options {\n values: Value[]\n}\n\nconst addJSXAttribute = (api: ConfigAPI, opts: Options) => {\n const getAttributeValue = (\n value: string | boolean | number,\n literal?: boolean,\n ) => {\n if (typeof value === 'string' && literal) {\n return t.jsxExpressionContainer(\n (template.ast(value) as t.ExpressionStatement).expression,\n )\n }\n\n if (typeof value === 'string') {\n return t.stringLiteral(value)\n }\n\n if (typeof value === 'boolean') {\n return t.jsxExpressionContainer(t.booleanLiteral(value))\n }\n\n if (typeof value === 'number') {\n return t.jsxExpressionContainer(t.numericLiteral(value))\n }\n\n return null\n }\n\n return {\n visitor: {\n JSXAttribute(path: NodePath<t.JSXAttribute>) {\n const valuePath = path.get('value')\n if (!valuePath.isStringLiteral()) return\n\n opts.values.forEach(({ value, newValue, literal }) => {\n if (!valuePath.isStringLiteral({ value })) return\n const attributeValue = getAttributeValue(newValue, literal)\n if (attributeValue) {\n valuePath.replaceWith(attributeValue)\n }\n })\n },\n },\n }\n}\n\nexport default addJSXAttribute\n"],"names":["t","template"],"mappings":";;;;AAaM,MAAA,eAAA,GAAkB,CAAC,GAAA,EAAgB,IAAkB,KAAA;AACzD,EAAM,MAAA,iBAAA,GAAoB,CACxB,KAAA,EACA,OACG,KAAA;AACH,IAAI,IAAA,OAAO,KAAU,KAAA,QAAA,IAAY,OAAS,EAAA;AACxC,MAAA,OAAOA,UAAE,CAAA,sBAAA;AAAA,QACNC,aAAA,CAAS,GAAI,CAAA,KAAK,CAA4B,CAAA,UAAA;AAAA,OACjD,CAAA;AAAA,KACF;AAEA,IAAI,IAAA,OAAO,UAAU,QAAU,EAAA;AAC7B,MAAO,OAAAD,UAAA,CAAE,cAAc,KAAK,CAAA,CAAA;AAAA,KAC9B;AAEA,IAAI,IAAA,OAAO,UAAU,SAAW,EAAA;AAC9B,MAAA,OAAOA,UAAE,CAAA,sBAAA,CAAuBA,UAAE,CAAA,cAAA,CAAe,KAAK,CAAC,CAAA,CAAA;AAAA,KACzD;AAEA,IAAI,IAAA,OAAO,UAAU,QAAU,EAAA;AAC7B,MAAA,OAAOA,UAAE,CAAA,sBAAA,CAAuBA,UAAE,CAAA,cAAA,CAAe,KAAK,CAAC,CAAA,CAAA;AAAA,KACzD;AAEA,IAAO,OAAA,IAAA,CAAA;AAAA,GACT,CAAA;AAEA,EAAO,OAAA;AAAA,IACL,OAAS,EAAA;AAAA,MACP,aAAa,IAAgC,EAAA;AAC3C,QAAM,MAAA,SAAA,GAAY,IAAK,CAAA,GAAA,CAAI,OAAO,CAAA,CAAA;AAClC,QAAI,IAAA,CAAC,UAAU,eAAgB,EAAA;AAAG,UAAA,OAAA;AAElC,QAAA,IAAA,CAAK,OAAO,OAAQ,CAAA,CAAC,EAAE,KAAO,EAAA,QAAA,EAAU,SAAc,KAAA;AACpD,UAAA,IAAI,CAAC,SAAA,CAAU,eAAgB,CAAA,EAAE,OAAO,CAAA;AAAG,YAAA,OAAA;AAC3C,UAAM,MAAA,cAAA,GAAiB,iBAAkB,CAAA,QAAA,EAAU,OAAO,CAAA,CAAA;AAC1D,UAAA,IAAI,cAAgB,EAAA;AAClB,YAAA,SAAA,CAAU,YAAY,cAAc,CAAA,CAAA;AAAA,WACtC;AAAA,SACD,CAAA,CAAA;AAAA,OACH;AAAA,KACF;AAAA,GACF,CAAA;AACF;;;;"}
|
||||
40
frontend/node_modules/@svgr/babel-plugin-replace-jsx-attribute-value/package.json
generated
vendored
40
frontend/node_modules/@svgr/babel-plugin-replace-jsx-attribute-value/package.json
generated
vendored
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"name": "@svgr/babel-plugin-replace-jsx-attribute-value",
|
||||
"description": "Replace JSX attribute value",
|
||||
"version": "8.0.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": "https://github.com/gregberge/svgr/tree/main/packages/babel-plugin-replace-jsx-attribute-value",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"scripts": {
|
||||
"reset": "rm -rf dist",
|
||||
"build": "rollup -c ../../build/rollup.config.mjs",
|
||||
"prepublishOnly": "pnpm run reset && pnpm run build"
|
||||
},
|
||||
"gitHead": "52a1079681477587ef0d842c0e78531adf2d2520"
|
||||
}
|
||||
7
frontend/node_modules/@svgr/babel-plugin-svg-dynamic-title/LICENSE
generated
vendored
7
frontend/node_modules/@svgr/babel-plugin-svg-dynamic-title/LICENSE
generated
vendored
@@ -1,7 +0,0 @@
|
||||
Copyright 2017 Smooth Code
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
25
frontend/node_modules/@svgr/babel-plugin-svg-dynamic-title/README.md
generated
vendored
25
frontend/node_modules/@svgr/babel-plugin-svg-dynamic-title/README.md
generated
vendored
@@ -1,25 +0,0 @@
|
||||
# @svgr/babel-plugin-svg-dynamic-title
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install --save-dev @svgr/babel-plugin-svg-dynamic-title
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["@svgr/babel-plugin-svg-dynamic-title"]
|
||||
}
|
||||
```
|
||||
|
||||
## Note
|
||||
|
||||
This plugin handles both the titleProp and descProp options. By default, it will handle titleProp only.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
16
frontend/node_modules/@svgr/babel-plugin-svg-dynamic-title/dist/index.d.ts
generated
vendored
16
frontend/node_modules/@svgr/babel-plugin-svg-dynamic-title/dist/index.d.ts
generated
vendored
@@ -1,16 +0,0 @@
|
||||
import { NodePath, types } from '@babel/core';
|
||||
|
||||
type tag = 'title' | 'desc';
|
||||
interface Options {
|
||||
tag: tag | null;
|
||||
}
|
||||
interface State {
|
||||
opts: Options;
|
||||
}
|
||||
declare const plugin: () => {
|
||||
visitor: {
|
||||
JSXElement(path: NodePath<types.JSXElement>, state: State): void;
|
||||
};
|
||||
};
|
||||
|
||||
export { Options, plugin as default };
|
||||
101
frontend/node_modules/@svgr/babel-plugin-svg-dynamic-title/dist/index.js
generated
vendored
101
frontend/node_modules/@svgr/babel-plugin-svg-dynamic-title/dist/index.js
generated
vendored
@@ -1,101 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var core = require('@babel/core');
|
||||
|
||||
const elements = ["svg", "Svg"];
|
||||
const createTagElement = (tag, children = [], attributes = []) => {
|
||||
const eleName = core.types.jsxIdentifier(tag);
|
||||
return core.types.jsxElement(
|
||||
core.types.jsxOpeningElement(eleName, attributes),
|
||||
core.types.jsxClosingElement(eleName),
|
||||
children
|
||||
);
|
||||
};
|
||||
const createTagIdAttribute = (tag) => core.types.jsxAttribute(
|
||||
core.types.jsxIdentifier("id"),
|
||||
core.types.jsxExpressionContainer(core.types.identifier(`${tag}Id`))
|
||||
);
|
||||
const addTagIdAttribute = (tag, attributes) => {
|
||||
const existingId = attributes.find(
|
||||
(attribute) => core.types.isJSXAttribute(attribute) && attribute.name.name === "id"
|
||||
);
|
||||
if (!existingId) {
|
||||
return [...attributes, createTagIdAttribute(tag)];
|
||||
}
|
||||
existingId.value = core.types.jsxExpressionContainer(
|
||||
core.types.isStringLiteral(existingId.value) ? core.types.logicalExpression("||", core.types.identifier(`${tag}Id`), existingId.value) : core.types.identifier(`${tag}Id`)
|
||||
);
|
||||
return attributes;
|
||||
};
|
||||
const plugin = () => ({
|
||||
visitor: {
|
||||
JSXElement(path, state) {
|
||||
const tag = state.opts.tag || "title";
|
||||
if (!elements.length)
|
||||
return;
|
||||
const openingElement = path.get("openingElement");
|
||||
const openingElementName = openingElement.get("name");
|
||||
if (!elements.some(
|
||||
(element) => openingElementName.isJSXIdentifier({ name: element })
|
||||
)) {
|
||||
return;
|
||||
}
|
||||
const getTagElement = (existingTitle) => {
|
||||
var _a;
|
||||
const tagExpression = core.types.identifier(tag);
|
||||
if (existingTitle) {
|
||||
existingTitle.openingElement.attributes = addTagIdAttribute(
|
||||
tag,
|
||||
existingTitle.openingElement.attributes
|
||||
);
|
||||
}
|
||||
const conditionalTitle = core.types.conditionalExpression(
|
||||
tagExpression,
|
||||
createTagElement(
|
||||
tag,
|
||||
[core.types.jsxExpressionContainer(tagExpression)],
|
||||
existingTitle ? existingTitle.openingElement.attributes : [createTagIdAttribute(tag)]
|
||||
),
|
||||
core.types.nullLiteral()
|
||||
);
|
||||
if ((_a = existingTitle == null ? void 0 : existingTitle.children) == null ? void 0 : _a.length) {
|
||||
return core.types.jsxExpressionContainer(
|
||||
core.types.conditionalExpression(
|
||||
core.types.binaryExpression(
|
||||
"===",
|
||||
tagExpression,
|
||||
core.types.identifier("undefined")
|
||||
),
|
||||
existingTitle,
|
||||
conditionalTitle
|
||||
)
|
||||
);
|
||||
}
|
||||
return core.types.jsxExpressionContainer(conditionalTitle);
|
||||
};
|
||||
let tagElement = null;
|
||||
const hasTitle = path.get("children").some((childPath) => {
|
||||
if (childPath.node === tagElement)
|
||||
return false;
|
||||
if (!childPath.isJSXElement())
|
||||
return false;
|
||||
const name = childPath.get("openingElement").get("name");
|
||||
if (!name.isJSXIdentifier())
|
||||
return false;
|
||||
if (name.node.name !== tag)
|
||||
return false;
|
||||
tagElement = getTagElement(childPath.node);
|
||||
childPath.replaceWith(tagElement);
|
||||
return true;
|
||||
});
|
||||
tagElement = tagElement || getTagElement();
|
||||
if (!hasTitle) {
|
||||
path.node.children.unshift(tagElement);
|
||||
path.replaceWith(path.node);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = plugin;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@svgr/babel-plugin-svg-dynamic-title/dist/index.js.map
generated
vendored
1
frontend/node_modules/@svgr/babel-plugin-svg-dynamic-title/dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
40
frontend/node_modules/@svgr/babel-plugin-svg-dynamic-title/package.json
generated
vendored
40
frontend/node_modules/@svgr/babel-plugin-svg-dynamic-title/package.json
generated
vendored
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"name": "@svgr/babel-plugin-svg-dynamic-title",
|
||||
"description": "Transform SVG by adding a dynamic title element",
|
||||
"version": "8.0.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": "https://github.com/gregberge/svgr/tree/main/packages/babel-plugin-svg-dynamic-title",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"scripts": {
|
||||
"reset": "rm -rf dist",
|
||||
"build": "rollup -c ../../build/rollup.config.mjs",
|
||||
"prepublishOnly": "pnpm run reset && pnpm run build"
|
||||
},
|
||||
"gitHead": "52a1079681477587ef0d842c0e78531adf2d2520"
|
||||
}
|
||||
7
frontend/node_modules/@svgr/babel-plugin-svg-em-dimensions/LICENSE
generated
vendored
7
frontend/node_modules/@svgr/babel-plugin-svg-em-dimensions/LICENSE
generated
vendored
@@ -1,7 +0,0 @@
|
||||
Copyright 2017 Smooth Code
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
23
frontend/node_modules/@svgr/babel-plugin-svg-em-dimensions/README.md
generated
vendored
23
frontend/node_modules/@svgr/babel-plugin-svg-em-dimensions/README.md
generated
vendored
@@ -1,23 +0,0 @@
|
||||
# @svgr/babel-plugin-svg-em-dimensions
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install --save-dev @svgr/babel-plugin-svg-em-dimensions
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": [
|
||||
["@svgr/babel-plugin-svg-em-dimensions", { "width": 24, "height": 24 }]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
13
frontend/node_modules/@svgr/babel-plugin-svg-em-dimensions/dist/index.d.ts
generated
vendored
13
frontend/node_modules/@svgr/babel-plugin-svg-em-dimensions/dist/index.d.ts
generated
vendored
@@ -1,13 +0,0 @@
|
||||
import { ConfigAPI, NodePath, types } from '@babel/core';
|
||||
|
||||
interface Options {
|
||||
width: number | string;
|
||||
height: number | string;
|
||||
}
|
||||
declare const plugin: (_: ConfigAPI, opts: Options) => {
|
||||
visitor: {
|
||||
JSXOpeningElement(path: NodePath<types.JSXOpeningElement>): void;
|
||||
};
|
||||
};
|
||||
|
||||
export { Options, plugin as default };
|
||||
57
frontend/node_modules/@svgr/babel-plugin-svg-em-dimensions/dist/index.js
generated
vendored
57
frontend/node_modules/@svgr/babel-plugin-svg-em-dimensions/dist/index.js
generated
vendored
@@ -1,57 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var core = require('@babel/core');
|
||||
|
||||
const elements = ["svg", "Svg"];
|
||||
const getValue = (raw) => {
|
||||
if (raw === void 0)
|
||||
return core.types.stringLiteral("1em");
|
||||
switch (typeof raw) {
|
||||
case "number":
|
||||
return core.types.jsxExpressionContainer(core.types.numericLiteral(raw));
|
||||
case "string":
|
||||
return core.types.stringLiteral(raw);
|
||||
default:
|
||||
return core.types.stringLiteral("1em");
|
||||
}
|
||||
};
|
||||
const plugin = (_, opts) => ({
|
||||
visitor: {
|
||||
JSXOpeningElement(path) {
|
||||
if (!elements.some(
|
||||
(element) => path.get("name").isJSXIdentifier({ name: element })
|
||||
))
|
||||
return;
|
||||
const values = {
|
||||
width: getValue(opts.width),
|
||||
height: getValue(opts.height)
|
||||
};
|
||||
const requiredAttributes = Object.keys(values);
|
||||
path.get("attributes").forEach((attributePath) => {
|
||||
if (!attributePath.isJSXAttribute())
|
||||
return;
|
||||
const namePath = attributePath.get("name");
|
||||
if (!namePath.isJSXIdentifier())
|
||||
return;
|
||||
const index = requiredAttributes.indexOf(namePath.node.name);
|
||||
if (index === -1)
|
||||
return;
|
||||
const valuePath = attributePath.get("value");
|
||||
valuePath.replaceWith(values[namePath.node.name]);
|
||||
requiredAttributes.splice(index, 1);
|
||||
});
|
||||
path.pushContainer(
|
||||
"attributes",
|
||||
requiredAttributes.map(
|
||||
(attr) => core.types.jsxAttribute(
|
||||
core.types.jsxIdentifier(attr),
|
||||
values[attr]
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = plugin;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@svgr/babel-plugin-svg-em-dimensions/dist/index.js.map
generated
vendored
1
frontend/node_modules/@svgr/babel-plugin-svg-em-dimensions/dist/index.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { types as t, NodePath, ConfigAPI } from '@babel/core'\n\nconst elements = ['svg', 'Svg']\n\nexport interface Options {\n width: number | string\n height: number | string\n}\n\nconst getValue = (raw: undefined | number | string) => {\n if (raw === undefined) return t.stringLiteral('1em')\n switch (typeof raw) {\n case 'number':\n return t.jsxExpressionContainer(t.numericLiteral(raw))\n case 'string':\n return t.stringLiteral(raw)\n default:\n return t.stringLiteral('1em')\n }\n}\n\nconst plugin = (_: ConfigAPI, opts: Options) => ({\n visitor: {\n JSXOpeningElement(path: NodePath<t.JSXOpeningElement>) {\n if (\n !elements.some((element) =>\n path.get('name').isJSXIdentifier({ name: element }),\n )\n )\n return\n\n const values = {\n width: getValue(opts.width),\n height: getValue(opts.height),\n }\n const requiredAttributes = Object.keys(values)\n\n path.get('attributes').forEach((attributePath) => {\n if (!attributePath.isJSXAttribute()) return\n const namePath = attributePath.get('name')\n if (!namePath.isJSXIdentifier()) return\n const index = requiredAttributes.indexOf(namePath.node.name)\n\n if (index === -1) return\n\n const valuePath = attributePath.get('value')\n valuePath.replaceWith(values[namePath.node.name as 'width' | 'height'])\n requiredAttributes.splice(index, 1)\n })\n\n path.pushContainer(\n 'attributes',\n requiredAttributes.map((attr) =>\n t.jsxAttribute(\n t.jsxIdentifier(attr),\n values[attr as 'width' | 'height'],\n ),\n ),\n )\n },\n },\n})\n\nexport default plugin\n"],"names":["t"],"mappings":";;;;AAGA,MAAM,QAAA,GAAW,CAAC,KAAA,EAAO,KAAK,CAAA,CAAA;AAO9B,MAAM,QAAA,GAAW,CAAC,GAAqC,KAAA;AACrD,EAAA,IAAI,GAAQ,KAAA,KAAA,CAAA;AAAW,IAAO,OAAAA,UAAA,CAAE,cAAc,KAAK,CAAA,CAAA;AACnD,EAAA,QAAQ,OAAO,GAAK;AAAA,IAClB,KAAK,QAAA;AACH,MAAA,OAAOA,UAAE,CAAA,sBAAA,CAAuBA,UAAE,CAAA,cAAA,CAAe,GAAG,CAAC,CAAA,CAAA;AAAA,IACvD,KAAK,QAAA;AACH,MAAO,OAAAA,UAAA,CAAE,cAAc,GAAG,CAAA,CAAA;AAAA,IAC5B;AACE,MAAO,OAAAA,UAAA,CAAE,cAAc,KAAK,CAAA,CAAA;AAAA,GAChC;AACF,CAAA,CAAA;AAEM,MAAA,MAAA,GAAS,CAAC,CAAA,EAAc,IAAmB,MAAA;AAAA,EAC/C,OAAS,EAAA;AAAA,IACP,kBAAkB,IAAqC,EAAA;AACrD,MAAA,IACE,CAAC,QAAS,CAAA,IAAA;AAAA,QAAK,CAAC,OACd,KAAA,IAAA,CAAK,GAAI,CAAA,MAAM,EAAE,eAAgB,CAAA,EAAE,IAAM,EAAA,OAAA,EAAS,CAAA;AAAA,OACpD;AAEA,QAAA,OAAA;AAEF,MAAA,MAAM,MAAS,GAAA;AAAA,QACb,KAAA,EAAO,QAAS,CAAA,IAAA,CAAK,KAAK,CAAA;AAAA,QAC1B,MAAA,EAAQ,QAAS,CAAA,IAAA,CAAK,MAAM,CAAA;AAAA,OAC9B,CAAA;AACA,MAAM,MAAA,kBAAA,GAAqB,MAAO,CAAA,IAAA,CAAK,MAAM,CAAA,CAAA;AAE7C,MAAA,IAAA,CAAK,GAAI,CAAA,YAAY,CAAE,CAAA,OAAA,CAAQ,CAAC,aAAkB,KAAA;AAChD,QAAI,IAAA,CAAC,cAAc,cAAe,EAAA;AAAG,UAAA,OAAA;AACrC,QAAM,MAAA,QAAA,GAAW,aAAc,CAAA,GAAA,CAAI,MAAM,CAAA,CAAA;AACzC,QAAI,IAAA,CAAC,SAAS,eAAgB,EAAA;AAAG,UAAA,OAAA;AACjC,QAAA,MAAM,KAAQ,GAAA,kBAAA,CAAmB,OAAQ,CAAA,QAAA,CAAS,KAAK,IAAI,CAAA,CAAA;AAE3D,QAAA,IAAI,KAAU,KAAA,CAAA,CAAA;AAAI,UAAA,OAAA;AAElB,QAAM,MAAA,SAAA,GAAY,aAAc,CAAA,GAAA,CAAI,OAAO,CAAA,CAAA;AAC3C,QAAA,SAAA,CAAU,WAAY,CAAA,MAAA,CAAO,QAAS,CAAA,IAAA,CAAK,IAA0B,CAAC,CAAA,CAAA;AACtE,QAAmB,kBAAA,CAAA,MAAA,CAAO,OAAO,CAAC,CAAA,CAAA;AAAA,OACnC,CAAA,CAAA;AAED,MAAK,IAAA,CAAA,aAAA;AAAA,QACH,YAAA;AAAA,QACA,kBAAmB,CAAA,GAAA;AAAA,UAAI,CAAC,SACtBA,UAAE,CAAA,YAAA;AAAA,YACAA,UAAA,CAAE,cAAc,IAAI,CAAA;AAAA,YACpB,OAAO,IAA0B,CAAA;AAAA,WACnC;AAAA,SACF;AAAA,OACF,CAAA;AAAA,KACF;AAAA,GACF;AACF,CAAA;;;;"}
|
||||
40
frontend/node_modules/@svgr/babel-plugin-svg-em-dimensions/package.json
generated
vendored
40
frontend/node_modules/@svgr/babel-plugin-svg-em-dimensions/package.json
generated
vendored
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"name": "@svgr/babel-plugin-svg-em-dimensions",
|
||||
"description": "Transform SVG to use em-based dimensions",
|
||||
"version": "8.0.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": "https://github.com/gregberge/svgr/tree/main/packages/babel-plugin-svg-em-dimensions",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"scripts": {
|
||||
"reset": "rm -rf dist",
|
||||
"build": "rollup -c ../../build/rollup.config.mjs",
|
||||
"prepublishOnly": "pnpm run reset && pnpm run build"
|
||||
},
|
||||
"gitHead": "52a1079681477587ef0d842c0e78531adf2d2520"
|
||||
}
|
||||
7
frontend/node_modules/@svgr/babel-plugin-transform-react-native-svg/LICENSE
generated
vendored
7
frontend/node_modules/@svgr/babel-plugin-transform-react-native-svg/LICENSE
generated
vendored
@@ -1,7 +0,0 @@
|
||||
Copyright 2017 Smooth Code
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
21
frontend/node_modules/@svgr/babel-plugin-transform-react-native-svg/README.md
generated
vendored
21
frontend/node_modules/@svgr/babel-plugin-transform-react-native-svg/README.md
generated
vendored
@@ -1,21 +0,0 @@
|
||||
# @svgr/babel-plugin-transform-react-native-svg
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install --save-dev @svgr/babel-plugin-transform-react-native-svg
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["@svgr/babel-plugin-transform-react-native-svg"]
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
13
frontend/node_modules/@svgr/babel-plugin-transform-react-native-svg/dist/index.d.ts
generated
vendored
13
frontend/node_modules/@svgr/babel-plugin-transform-react-native-svg/dist/index.d.ts
generated
vendored
@@ -1,13 +0,0 @@
|
||||
import { NodePath, types } from '@babel/core';
|
||||
|
||||
interface State {
|
||||
replacedComponents: Set<string>;
|
||||
unsupportedComponents: Set<string>;
|
||||
}
|
||||
declare const plugin: () => {
|
||||
visitor: {
|
||||
Program(path: NodePath<types.Program>, state: Partial<State>): void;
|
||||
};
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
107
frontend/node_modules/@svgr/babel-plugin-transform-react-native-svg/dist/index.js
generated
vendored
107
frontend/node_modules/@svgr/babel-plugin-transform-react-native-svg/dist/index.js
generated
vendored
@@ -1,107 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var core = require('@babel/core');
|
||||
|
||||
const elementToComponent = {
|
||||
svg: "Svg",
|
||||
circle: "Circle",
|
||||
clipPath: "ClipPath",
|
||||
ellipse: "Ellipse",
|
||||
g: "G",
|
||||
linearGradient: "LinearGradient",
|
||||
radialGradient: "RadialGradient",
|
||||
line: "Line",
|
||||
path: "Path",
|
||||
pattern: "Pattern",
|
||||
polygon: "Polygon",
|
||||
polyline: "Polyline",
|
||||
rect: "Rect",
|
||||
symbol: "Symbol",
|
||||
text: "Text",
|
||||
textPath: "TextPath",
|
||||
tspan: "TSpan",
|
||||
use: "Use",
|
||||
defs: "Defs",
|
||||
stop: "Stop",
|
||||
mask: "Mask",
|
||||
image: "Image",
|
||||
foreignObject: "ForeignObject"
|
||||
};
|
||||
const plugin = () => {
|
||||
function replaceElement(path, state) {
|
||||
const namePath = path.get("openingElement").get("name");
|
||||
if (!namePath.isJSXIdentifier())
|
||||
return;
|
||||
const { name } = namePath.node;
|
||||
const component = elementToComponent[name];
|
||||
if (component) {
|
||||
namePath.replaceWith(core.types.jsxIdentifier(component));
|
||||
if (path.has("closingElement")) {
|
||||
const closingNamePath = path.get("closingElement").get("name");
|
||||
closingNamePath.replaceWith(core.types.jsxIdentifier(component));
|
||||
}
|
||||
state.replacedComponents.add(component);
|
||||
return;
|
||||
}
|
||||
state.unsupportedComponents.add(name);
|
||||
path.remove();
|
||||
}
|
||||
const svgElementVisitor = {
|
||||
JSXElement(path, state) {
|
||||
if (!path.get("openingElement").get("name").isJSXIdentifier({ name: "svg" })) {
|
||||
return;
|
||||
}
|
||||
replaceElement(path, state);
|
||||
path.traverse(jsxElementVisitor, state);
|
||||
}
|
||||
};
|
||||
const jsxElementVisitor = {
|
||||
JSXElement(path, state) {
|
||||
replaceElement(path, state);
|
||||
}
|
||||
};
|
||||
const importDeclarationVisitor = {
|
||||
ImportDeclaration(path, state) {
|
||||
if (path.get("source").isStringLiteral({ value: "react-native-svg" }) && !path.get("importKind").hasNode()) {
|
||||
state.replacedComponents.forEach((component) => {
|
||||
if (path.get("specifiers").some(
|
||||
(specifier) => specifier.get("local").isIdentifier({ name: component })
|
||||
)) {
|
||||
return;
|
||||
}
|
||||
path.pushContainer(
|
||||
"specifiers",
|
||||
core.types.importSpecifier(core.types.identifier(component), core.types.identifier(component))
|
||||
);
|
||||
});
|
||||
} else if (path.get("source").isStringLiteral({ value: "expo" })) {
|
||||
path.pushContainer(
|
||||
"specifiers",
|
||||
core.types.importSpecifier(core.types.identifier("Svg"), core.types.identifier("Svg"))
|
||||
);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (state.unsupportedComponents.size && !path.has("trailingComments")) {
|
||||
const componentList = [...state.unsupportedComponents].join(", ");
|
||||
path.addComment(
|
||||
"trailing",
|
||||
` SVGR has dropped some elements not supported by react-native-svg: ${componentList} `
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
return {
|
||||
visitor: {
|
||||
Program(path, state) {
|
||||
state.replacedComponents = /* @__PURE__ */ new Set();
|
||||
state.unsupportedComponents = /* @__PURE__ */ new Set();
|
||||
path.traverse(svgElementVisitor, state);
|
||||
path.traverse(importDeclarationVisitor, state);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = plugin;
|
||||
//# sourceMappingURL=index.js.map
|
||||
File diff suppressed because one or more lines are too long
40
frontend/node_modules/@svgr/babel-plugin-transform-react-native-svg/package.json
generated
vendored
40
frontend/node_modules/@svgr/babel-plugin-transform-react-native-svg/package.json
generated
vendored
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"name": "@svgr/babel-plugin-transform-react-native-svg",
|
||||
"description": "Transform DOM elements into react-native-svg components",
|
||||
"version": "8.1.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": "https://github.com/gregberge/svgr/tree/main/packages/babel-plugin-transform-react-native-svg",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"scripts": {
|
||||
"reset": "rm -rf dist",
|
||||
"build": "rollup -c ../../build/rollup.config.mjs",
|
||||
"prepublishOnly": "pnpm run reset && pnpm run build"
|
||||
},
|
||||
"gitHead": "772592e042be5063e782bfb8711d024b2fefc6b8"
|
||||
}
|
||||
7
frontend/node_modules/@svgr/babel-plugin-transform-svg-component/LICENSE
generated
vendored
7
frontend/node_modules/@svgr/babel-plugin-transform-svg-component/LICENSE
generated
vendored
@@ -1,7 +0,0 @@
|
||||
Copyright 2017 Smooth Code
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
23
frontend/node_modules/@svgr/babel-plugin-transform-svg-component/README.md
generated
vendored
23
frontend/node_modules/@svgr/babel-plugin-transform-svg-component/README.md
generated
vendored
@@ -1,23 +0,0 @@
|
||||
# @svgr/babel-plugin-transform-svg-component
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install --save-dev @svgr/babel-plugin-transform-svg-component
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": [
|
||||
["@svgr/babel-plugin-transform-svg-component", { "titleProp": true }]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
54
frontend/node_modules/@svgr/babel-plugin-transform-svg-component/dist/index.d.ts
generated
vendored
54
frontend/node_modules/@svgr/babel-plugin-transform-svg-component/dist/index.d.ts
generated
vendored
@@ -1,54 +0,0 @@
|
||||
import { types, ConfigAPI, NodePath } from '@babel/core';
|
||||
import { TemplateBuilder } from '@babel/template';
|
||||
|
||||
interface TemplateVariables {
|
||||
componentName: string;
|
||||
interfaces: types.TSInterfaceDeclaration[];
|
||||
props: (types.ObjectPattern | types.Identifier)[];
|
||||
imports: types.ImportDeclaration[];
|
||||
exports: (types.VariableDeclaration | types.ExportDeclaration | types.Statement)[];
|
||||
jsx: types.JSXElement;
|
||||
}
|
||||
interface TemplateContext {
|
||||
options: Options;
|
||||
tpl: TemplateBuilder<types.Statement | types.Statement[]>['ast'];
|
||||
}
|
||||
interface Template {
|
||||
(variables: TemplateVariables, context: TemplateContext): types.Statement | types.Statement[];
|
||||
}
|
||||
interface State {
|
||||
componentName: string;
|
||||
caller?: {
|
||||
previousExport?: string | null;
|
||||
};
|
||||
}
|
||||
interface JSXRuntimeImport {
|
||||
source: string;
|
||||
namespace?: string;
|
||||
defaultSpecifier?: string;
|
||||
specifiers?: string[];
|
||||
}
|
||||
interface Options {
|
||||
typescript?: boolean;
|
||||
titleProp?: boolean;
|
||||
descProp?: boolean;
|
||||
expandProps?: boolean | 'start' | 'end';
|
||||
ref?: boolean;
|
||||
template?: Template;
|
||||
state: State;
|
||||
native?: boolean;
|
||||
memo?: boolean;
|
||||
exportType?: 'named' | 'default';
|
||||
namedExport?: string;
|
||||
jsxRuntime?: 'automatic' | 'classic';
|
||||
jsxRuntimeImport?: JSXRuntimeImport;
|
||||
importSource?: string;
|
||||
}
|
||||
|
||||
declare const plugin: (_: ConfigAPI, opts: Options) => {
|
||||
visitor: {
|
||||
Program(path: NodePath<types.Program>): void;
|
||||
};
|
||||
};
|
||||
|
||||
export { Options, Template, plugin as default };
|
||||
302
frontend/node_modules/@svgr/babel-plugin-transform-svg-component/dist/index.js
generated
vendored
302
frontend/node_modules/@svgr/babel-plugin-transform-svg-component/dist/index.js
generated
vendored
@@ -1,302 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var core = require('@babel/core');
|
||||
|
||||
const defaultTemplate = (variables, { tpl }) => {
|
||||
return tpl`
|
||||
${variables.imports};
|
||||
|
||||
${variables.interfaces};
|
||||
|
||||
const ${variables.componentName} = (${variables.props}) => (
|
||||
${variables.jsx}
|
||||
);
|
||||
|
||||
${variables.exports};
|
||||
`;
|
||||
};
|
||||
|
||||
var __defProp = Object.defineProperty;
|
||||
var __defProps = Object.defineProperties;
|
||||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||||
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols)
|
||||
for (var prop of __getOwnPropSymbols(b)) {
|
||||
if (__propIsEnum.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
||||
const tsOptionalPropertySignature = (...args) => {
|
||||
return __spreadProps(__spreadValues({}, core.types.tsPropertySignature(...args)), {
|
||||
optional: true
|
||||
});
|
||||
};
|
||||
const getOrCreateImport = ({ imports }, sourceValue, importKind = void 0) => {
|
||||
const existing = imports.find(
|
||||
(imp2) => imp2.source.value === sourceValue && imp2.importKind === importKind && !imp2.specifiers.some(
|
||||
(specifier) => specifier.type === "ImportNamespaceSpecifier"
|
||||
)
|
||||
);
|
||||
if (existing)
|
||||
return existing;
|
||||
const imp = core.types.importDeclaration([], core.types.stringLiteral(sourceValue));
|
||||
if (importKind !== void 0) {
|
||||
imp.importKind = importKind;
|
||||
}
|
||||
imports.push(imp);
|
||||
return imp;
|
||||
};
|
||||
const tsTypeReferenceSVGProps = (ctx) => {
|
||||
if (ctx.opts.native) {
|
||||
const identifier2 = core.types.identifier("SvgProps");
|
||||
getOrCreateImport(ctx, "react-native-svg", "type").specifiers.push(
|
||||
core.types.importSpecifier(identifier2, identifier2)
|
||||
);
|
||||
return core.types.tsTypeReference(identifier2);
|
||||
}
|
||||
const identifier = core.types.identifier("SVGProps");
|
||||
getOrCreateImport(ctx, ctx.importSource, "type").specifiers.push(
|
||||
core.types.importSpecifier(identifier, identifier)
|
||||
);
|
||||
return core.types.tsTypeReference(
|
||||
identifier,
|
||||
core.types.tsTypeParameterInstantiation([
|
||||
core.types.tsTypeReference(core.types.identifier("SVGSVGElement"))
|
||||
])
|
||||
);
|
||||
};
|
||||
const tsTypeReferenceSVGRef = (ctx) => {
|
||||
const identifier = core.types.identifier("Ref");
|
||||
getOrCreateImport(ctx, ctx.importSource).specifiers.push(
|
||||
core.types.importSpecifier(identifier, identifier)
|
||||
);
|
||||
return core.types.tsTypeReference(
|
||||
identifier,
|
||||
core.types.tsTypeParameterInstantiation([
|
||||
core.types.tsTypeReference(core.types.identifier("SVGSVGElement"))
|
||||
])
|
||||
);
|
||||
};
|
||||
const getJsxRuntimeImport = (cfg) => {
|
||||
const specifiers = (() => {
|
||||
if (cfg.namespace)
|
||||
return [core.types.importNamespaceSpecifier(core.types.identifier(cfg.namespace))];
|
||||
if (cfg.defaultSpecifier) {
|
||||
const identifier = core.types.identifier(cfg.defaultSpecifier);
|
||||
return [core.types.importDefaultSpecifier(identifier)];
|
||||
}
|
||||
if (cfg.specifiers)
|
||||
return cfg.specifiers.map((specifier) => {
|
||||
const identifier = core.types.identifier(specifier);
|
||||
return core.types.importSpecifier(identifier, identifier);
|
||||
});
|
||||
throw new Error(
|
||||
`Specify "namespace", "defaultSpecifier", or "specifiers" in "jsxRuntimeImport" option`
|
||||
);
|
||||
})();
|
||||
return core.types.importDeclaration(specifiers, core.types.stringLiteral(cfg.source));
|
||||
};
|
||||
const defaultJsxRuntimeImport = {
|
||||
source: "react",
|
||||
namespace: "React"
|
||||
};
|
||||
const defaultImportSource = "react";
|
||||
const getVariables = ({
|
||||
opts,
|
||||
jsx
|
||||
}) => {
|
||||
var _a, _b, _c, _d;
|
||||
const interfaces = [];
|
||||
const props = [];
|
||||
const imports = [];
|
||||
const exports = [];
|
||||
const ctx = {
|
||||
importSource: (_a = opts.importSource) != null ? _a : defaultImportSource,
|
||||
exportIdentifier: core.types.identifier(opts.state.componentName),
|
||||
opts,
|
||||
interfaces,
|
||||
props,
|
||||
imports,
|
||||
exports
|
||||
};
|
||||
if (opts.jsxRuntime !== "automatic") {
|
||||
imports.push(
|
||||
getJsxRuntimeImport((_b = opts.jsxRuntimeImport) != null ? _b : defaultJsxRuntimeImport)
|
||||
);
|
||||
}
|
||||
if (opts.native) {
|
||||
getOrCreateImport(ctx, "react-native-svg").specifiers.push(
|
||||
core.types.importDefaultSpecifier(core.types.identifier("Svg"))
|
||||
);
|
||||
}
|
||||
if (opts.titleProp || opts.descProp) {
|
||||
const properties = [];
|
||||
const propertySignatures = [];
|
||||
const createProperty = (attr) => {
|
||||
return core.types.objectProperty(
|
||||
core.types.identifier(attr),
|
||||
core.types.identifier(attr),
|
||||
false,
|
||||
true
|
||||
);
|
||||
};
|
||||
const createSignature = (attr) => {
|
||||
return tsOptionalPropertySignature(
|
||||
core.types.identifier(attr),
|
||||
core.types.tsTypeAnnotation(core.types.tsStringKeyword())
|
||||
);
|
||||
};
|
||||
if (opts.titleProp) {
|
||||
properties.push(createProperty("title"), createProperty("titleId"));
|
||||
if (opts.typescript) {
|
||||
propertySignatures.push(
|
||||
createSignature("title"),
|
||||
createSignature("titleId")
|
||||
);
|
||||
}
|
||||
}
|
||||
if (opts.descProp) {
|
||||
properties.push(createProperty("desc"), createProperty("descId"));
|
||||
if (opts.typescript) {
|
||||
propertySignatures.push(
|
||||
createSignature("desc"),
|
||||
createSignature("descId")
|
||||
);
|
||||
}
|
||||
}
|
||||
const prop = core.types.objectPattern(properties);
|
||||
props.push(prop);
|
||||
if (opts.typescript) {
|
||||
interfaces.push(
|
||||
core.types.tsInterfaceDeclaration(
|
||||
core.types.identifier("SVGRProps"),
|
||||
null,
|
||||
null,
|
||||
core.types.tSInterfaceBody(propertySignatures)
|
||||
)
|
||||
);
|
||||
prop.typeAnnotation = core.types.tsTypeAnnotation(
|
||||
core.types.tsTypeReference(core.types.identifier("SVGRProps"))
|
||||
);
|
||||
}
|
||||
}
|
||||
if (opts.expandProps) {
|
||||
const identifier = core.types.identifier("props");
|
||||
if (core.types.isObjectPattern(props[0])) {
|
||||
props[0].properties.push(core.types.restElement(identifier));
|
||||
if (opts.typescript) {
|
||||
props[0].typeAnnotation = core.types.tsTypeAnnotation(
|
||||
core.types.tsIntersectionType([
|
||||
tsTypeReferenceSVGProps(ctx),
|
||||
props[0].typeAnnotation.typeAnnotation
|
||||
])
|
||||
);
|
||||
}
|
||||
} else {
|
||||
props.push(identifier);
|
||||
if (opts.typescript) {
|
||||
identifier.typeAnnotation = core.types.tsTypeAnnotation(
|
||||
tsTypeReferenceSVGProps(ctx)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (opts.ref) {
|
||||
if (props.length === 0) {
|
||||
props.push(core.types.identifier("_"));
|
||||
}
|
||||
const prop = core.types.identifier("ref");
|
||||
props.push(prop);
|
||||
if (opts.typescript) {
|
||||
prop.typeAnnotation = core.types.tsTypeAnnotation(tsTypeReferenceSVGRef(ctx));
|
||||
}
|
||||
const forwardRef = core.types.identifier("forwardRef");
|
||||
const ForwardRef = core.types.identifier("ForwardRef");
|
||||
getOrCreateImport(ctx, ctx.importSource).specifiers.push(
|
||||
core.types.importSpecifier(forwardRef, forwardRef)
|
||||
);
|
||||
exports.push(
|
||||
core.types.variableDeclaration("const", [
|
||||
core.types.variableDeclarator(
|
||||
ForwardRef,
|
||||
core.types.callExpression(forwardRef, [ctx.exportIdentifier])
|
||||
)
|
||||
])
|
||||
);
|
||||
ctx.exportIdentifier = ForwardRef;
|
||||
}
|
||||
if (opts.memo) {
|
||||
const memo = core.types.identifier("memo");
|
||||
const Memo = core.types.identifier("Memo");
|
||||
getOrCreateImport(ctx, ctx.importSource).specifiers.push(
|
||||
core.types.importSpecifier(memo, memo)
|
||||
);
|
||||
exports.push(
|
||||
core.types.variableDeclaration("const", [
|
||||
core.types.variableDeclarator(
|
||||
Memo,
|
||||
core.types.callExpression(memo, [ctx.exportIdentifier])
|
||||
)
|
||||
])
|
||||
);
|
||||
ctx.exportIdentifier = Memo;
|
||||
}
|
||||
if (((_c = opts.state.caller) == null ? void 0 : _c.previousExport) || opts.exportType === "named") {
|
||||
if (!opts.namedExport) {
|
||||
throw new Error(`"namedExport" not specified`);
|
||||
}
|
||||
exports.push(
|
||||
core.types.exportNamedDeclaration(null, [
|
||||
core.types.exportSpecifier(ctx.exportIdentifier, core.types.identifier(opts.namedExport))
|
||||
])
|
||||
);
|
||||
if ((_d = opts.state.caller) == null ? void 0 : _d.previousExport) {
|
||||
const previousExportAst = core.template.ast(opts.state.caller.previousExport);
|
||||
exports.push(
|
||||
...Array.isArray(previousExportAst) ? previousExportAst : [previousExportAst]
|
||||
);
|
||||
}
|
||||
} else {
|
||||
exports.push(core.types.exportDefaultDeclaration(ctx.exportIdentifier));
|
||||
}
|
||||
return {
|
||||
componentName: opts.state.componentName,
|
||||
props,
|
||||
interfaces,
|
||||
imports,
|
||||
exports,
|
||||
jsx
|
||||
};
|
||||
};
|
||||
|
||||
const plugin = (_, opts) => {
|
||||
const template = opts.template || defaultTemplate;
|
||||
const plugins = opts.typescript ? ["jsx", "typescript"] : ["jsx"];
|
||||
const tpl = core.template.smart({ plugins, preserveComments: true }).ast;
|
||||
return {
|
||||
visitor: {
|
||||
Program(path) {
|
||||
const jsx = path.node.body[0].expression;
|
||||
const variables = getVariables({
|
||||
opts,
|
||||
jsx
|
||||
});
|
||||
const body = template(variables, { options: opts, tpl });
|
||||
path.node.body = Array.isArray(body) ? body : [body];
|
||||
path.replaceWith(path.node);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = plugin;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@svgr/babel-plugin-transform-svg-component/dist/index.js.map
generated
vendored
1
frontend/node_modules/@svgr/babel-plugin-transform-svg-component/dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
43
frontend/node_modules/@svgr/babel-plugin-transform-svg-component/package.json
generated
vendored
43
frontend/node_modules/@svgr/babel-plugin-transform-svg-component/package.json
generated
vendored
@@ -1,43 +0,0 @@
|
||||
{
|
||||
"name": "@svgr/babel-plugin-transform-svg-component",
|
||||
"description": "Transform SVG into component",
|
||||
"version": "8.0.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": "https://github.com/gregberge/svgr/tree/main/packages/babel-plugin-transform-svg-component",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"scripts": {
|
||||
"reset": "rm -rf dist",
|
||||
"build": "rollup -c ../../build/rollup.config.mjs",
|
||||
"prepublishOnly": "pnpm run reset && pnpm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/babel__template": "^7.4.1"
|
||||
},
|
||||
"gitHead": "52a1079681477587ef0d842c0e78531adf2d2520"
|
||||
}
|
||||
7
frontend/node_modules/@svgr/babel-preset/LICENSE
generated
vendored
7
frontend/node_modules/@svgr/babel-preset/LICENSE
generated
vendored
@@ -1,7 +0,0 @@
|
||||
Copyright 2017 Smooth Code
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
21
frontend/node_modules/@svgr/babel-preset/README.md
generated
vendored
21
frontend/node_modules/@svgr/babel-preset/README.md
generated
vendored
@@ -1,21 +0,0 @@
|
||||
# @svgr/babel-preset
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install --save-dev @svgr/babel-preset
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"presets": [["@svgr/babel-preset", { "svgProps": { "width": 200 } }]]
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
23
frontend/node_modules/@svgr/babel-preset/dist/index.d.ts
generated
vendored
23
frontend/node_modules/@svgr/babel-preset/dist/index.d.ts
generated
vendored
@@ -1,23 +0,0 @@
|
||||
import { ConfigAPI } from '@babel/core';
|
||||
import { Options as Options$1 } from '@svgr/babel-plugin-transform-svg-component';
|
||||
|
||||
interface Options extends Options$1 {
|
||||
ref?: boolean;
|
||||
titleProp?: boolean;
|
||||
descProp?: boolean;
|
||||
expandProps?: boolean | 'start' | 'end';
|
||||
dimensions?: boolean;
|
||||
icon?: boolean | string | number;
|
||||
native?: boolean;
|
||||
svgProps?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
replaceAttrValues?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
}
|
||||
declare const plugin: (_: ConfigAPI, opts: Options) => {
|
||||
plugins: any[];
|
||||
};
|
||||
|
||||
export { Options, plugin as default };
|
||||
114
frontend/node_modules/@svgr/babel-preset/dist/index.js
generated
vendored
114
frontend/node_modules/@svgr/babel-preset/dist/index.js
generated
vendored
@@ -1,114 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var addJSXAttribute = require('@svgr/babel-plugin-add-jsx-attribute');
|
||||
var removeJSXAttribute = require('@svgr/babel-plugin-remove-jsx-attribute');
|
||||
var removeJSXEmptyExpression = require('@svgr/babel-plugin-remove-jsx-empty-expression');
|
||||
var replaceJSXAttributeValue = require('@svgr/babel-plugin-replace-jsx-attribute-value');
|
||||
var svgDynamicTitle = require('@svgr/babel-plugin-svg-dynamic-title');
|
||||
var svgEmDimensions = require('@svgr/babel-plugin-svg-em-dimensions');
|
||||
var transformReactNativeSVG = require('@svgr/babel-plugin-transform-react-native-svg');
|
||||
var transformSvgComponent = require('@svgr/babel-plugin-transform-svg-component');
|
||||
|
||||
const getAttributeValue = (value) => {
|
||||
const literal = typeof value === "string" && value.startsWith("{") && value.endsWith("}");
|
||||
return { value: literal ? value.slice(1, -1) : value, literal };
|
||||
};
|
||||
const propsToAttributes = (props) => {
|
||||
return Object.keys(props).map((name) => {
|
||||
const { literal, value } = getAttributeValue(props[name]);
|
||||
return { name, literal, value };
|
||||
});
|
||||
};
|
||||
function replaceMapToValues(replaceMap) {
|
||||
return Object.keys(replaceMap).map((value) => {
|
||||
const { literal, value: newValue } = getAttributeValue(replaceMap[value]);
|
||||
return { value, newValue, literal };
|
||||
});
|
||||
}
|
||||
const plugin = (_, opts) => {
|
||||
let toRemoveAttributes = ["version"];
|
||||
let toAddAttributes = [];
|
||||
if (opts.svgProps) {
|
||||
toAddAttributes = [...toAddAttributes, ...propsToAttributes(opts.svgProps)];
|
||||
}
|
||||
if (opts.ref) {
|
||||
toAddAttributes = [
|
||||
...toAddAttributes,
|
||||
{
|
||||
name: "ref",
|
||||
value: "ref",
|
||||
literal: true
|
||||
}
|
||||
];
|
||||
}
|
||||
if (opts.titleProp) {
|
||||
toAddAttributes = [
|
||||
...toAddAttributes,
|
||||
{
|
||||
name: "aria-labelledby",
|
||||
value: "titleId",
|
||||
literal: true
|
||||
}
|
||||
];
|
||||
}
|
||||
if (opts.descProp) {
|
||||
toAddAttributes = [
|
||||
...toAddAttributes,
|
||||
{
|
||||
name: "aria-describedby",
|
||||
value: "descId",
|
||||
literal: true
|
||||
}
|
||||
];
|
||||
}
|
||||
if (opts.expandProps) {
|
||||
toAddAttributes = [
|
||||
...toAddAttributes,
|
||||
{
|
||||
name: "props",
|
||||
spread: true,
|
||||
position: opts.expandProps === "start" || opts.expandProps === "end" ? opts.expandProps : void 0
|
||||
}
|
||||
];
|
||||
}
|
||||
if (!opts.dimensions) {
|
||||
toRemoveAttributes = [...toRemoveAttributes, "width", "height"];
|
||||
}
|
||||
const plugins = [
|
||||
[transformSvgComponent, opts],
|
||||
...opts.icon !== false && opts.dimensions ? [
|
||||
[
|
||||
svgEmDimensions,
|
||||
opts.icon !== true ? { width: opts.icon, height: opts.icon } : opts.native ? { width: 24, height: 24 } : {}
|
||||
]
|
||||
] : [],
|
||||
[
|
||||
removeJSXAttribute,
|
||||
{ elements: ["svg", "Svg"], attributes: toRemoveAttributes }
|
||||
],
|
||||
[
|
||||
addJSXAttribute,
|
||||
{ elements: ["svg", "Svg"], attributes: toAddAttributes }
|
||||
],
|
||||
removeJSXEmptyExpression
|
||||
];
|
||||
if (opts.replaceAttrValues) {
|
||||
plugins.push([
|
||||
replaceJSXAttributeValue,
|
||||
{ values: replaceMapToValues(opts.replaceAttrValues) }
|
||||
]);
|
||||
}
|
||||
if (opts.titleProp) {
|
||||
plugins.push(svgDynamicTitle);
|
||||
}
|
||||
if (opts.descProp) {
|
||||
plugins.push([svgDynamicTitle, { tag: "desc" }, "desc"]);
|
||||
}
|
||||
if (opts.native) {
|
||||
plugins.push(transformReactNativeSVG);
|
||||
}
|
||||
return { plugins };
|
||||
};
|
||||
|
||||
module.exports = plugin;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@svgr/babel-preset/dist/index.js.map
generated
vendored
1
frontend/node_modules/@svgr/babel-preset/dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
51
frontend/node_modules/@svgr/babel-preset/package.json
generated
vendored
51
frontend/node_modules/@svgr/babel-preset/package.json
generated
vendored
@@ -1,51 +0,0 @@
|
||||
{
|
||||
"name": "@svgr/babel-preset",
|
||||
"description": "SVGR preset that apply transformations from config",
|
||||
"version": "8.1.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": "https://github.com/gregberge/svgr/tree/main/packages/babel-preset",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin",
|
||||
"babel-preset"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@svgr/babel-plugin-add-jsx-attribute": "8.0.0",
|
||||
"@svgr/babel-plugin-remove-jsx-attribute": "8.0.0",
|
||||
"@svgr/babel-plugin-remove-jsx-empty-expression": "8.0.0",
|
||||
"@svgr/babel-plugin-replace-jsx-attribute-value": "8.0.0",
|
||||
"@svgr/babel-plugin-svg-dynamic-title": "8.0.0",
|
||||
"@svgr/babel-plugin-svg-em-dimensions": "8.0.0",
|
||||
"@svgr/babel-plugin-transform-react-native-svg": "8.1.0",
|
||||
"@svgr/babel-plugin-transform-svg-component": "8.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"scripts": {
|
||||
"reset": "rm -rf dist",
|
||||
"build": "rollup -c ../../build/rollup.config.mjs",
|
||||
"prepublishOnly": "pnpm run reset && pnpm run build"
|
||||
},
|
||||
"gitHead": "772592e042be5063e782bfb8711d024b2fefc6b8"
|
||||
}
|
||||
7
frontend/node_modules/@svgr/core/LICENSE
generated
vendored
7
frontend/node_modules/@svgr/core/LICENSE
generated
vendored
@@ -1,7 +0,0 @@
|
||||
Copyright 2017 Smooth Code
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
56
frontend/node_modules/@svgr/core/README.md
generated
vendored
56
frontend/node_modules/@svgr/core/README.md
generated
vendored
@@ -1,56 +0,0 @@
|
||||
# @svgr/core
|
||||
|
||||
[![Build Status][build-badge]][build]
|
||||
[![version][version-badge]][package]
|
||||
[![MIT License][license-badge]][license]
|
||||
|
||||
Node API of SVGR.
|
||||
|
||||
```
|
||||
npm install @svgr/core
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import { transform } from '@svgr/core'
|
||||
|
||||
const svgCode = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<rect x="10" y="10" height="100" width="100"
|
||||
style="stroke:#ff0000; fill: #0000ff"/>
|
||||
</svg>
|
||||
`
|
||||
|
||||
transform(svgCode, { icon: true }, { componentName: 'MyComponent' }).then(
|
||||
(jsCode) => {
|
||||
console.log(jsCode)
|
||||
},
|
||||
)
|
||||
```
|
||||
|
||||
Use `svgr.sync(code, config, state)` if you would like to use sync version.
|
||||
|
||||
### Plugins
|
||||
|
||||
By default `@svgr/core` doesn't include any plugin, if you want them, you have to install them and include them in config.
|
||||
|
||||
```js
|
||||
svgr(svgCode, {
|
||||
plugins: ['@svgr/plugin-svgo', '@svgr/plugin-jsx', '@svgr/plugin-prettier'],
|
||||
}).then((jsCode) => {
|
||||
console.log(jsCode)
|
||||
})
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[build-badge]: https://img.shields.io/travis/smooth-code/svgr.svg?style=flat-square
|
||||
[build]: https://travis-ci.org/smooth-code/svgr
|
||||
[version-badge]: https://img.shields.io/npm/v/@svgr/core.svg?style=flat-square
|
||||
[package]: https://www.npmjs.com/package/@svgr/core
|
||||
[license-badge]: https://img.shields.io/npm/l/@svgr/core.svg?style=flat-square
|
||||
[license]: https://github.com/smooth-code/svgr/blob/master/LICENSE
|
||||
78
frontend/node_modules/@svgr/core/dist/index.d.ts
generated
vendored
78
frontend/node_modules/@svgr/core/dist/index.d.ts
generated
vendored
@@ -1,78 +0,0 @@
|
||||
import { Options } from 'prettier';
|
||||
import { Config as Config$1 } from 'svgo';
|
||||
import { Options as Options$1 } from '@svgr/babel-preset';
|
||||
import { TransformOptions } from '@babel/core';
|
||||
|
||||
interface State {
|
||||
filePath?: string;
|
||||
componentName: string;
|
||||
caller?: {
|
||||
name?: string;
|
||||
previousExport?: string | null;
|
||||
defaultPlugins?: ConfigPlugin[];
|
||||
};
|
||||
}
|
||||
|
||||
interface Plugin {
|
||||
(code: string, config: Config, state: State): string;
|
||||
}
|
||||
type ConfigPlugin = string | Plugin;
|
||||
|
||||
interface Config {
|
||||
ref?: boolean;
|
||||
titleProp?: boolean;
|
||||
descProp?: boolean;
|
||||
expandProps?: boolean | 'start' | 'end';
|
||||
dimensions?: boolean;
|
||||
icon?: boolean | string | number;
|
||||
native?: boolean;
|
||||
svgProps?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
replaceAttrValues?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
runtimeConfig?: boolean;
|
||||
typescript?: boolean;
|
||||
prettier?: boolean;
|
||||
prettierConfig?: Options;
|
||||
svgo?: boolean;
|
||||
svgoConfig?: Config$1;
|
||||
configFile?: string;
|
||||
template?: Options$1['template'];
|
||||
memo?: boolean;
|
||||
exportType?: 'named' | 'default';
|
||||
namedExport?: string;
|
||||
jsxRuntime?: 'classic' | 'classic-preact' | 'automatic';
|
||||
jsxRuntimeImport?: {
|
||||
source: string;
|
||||
namespace?: string;
|
||||
specifiers?: string[];
|
||||
defaultSpecifier?: string;
|
||||
};
|
||||
index?: boolean;
|
||||
plugins?: ConfigPlugin[];
|
||||
jsx?: {
|
||||
babelConfig?: TransformOptions;
|
||||
};
|
||||
}
|
||||
declare const DEFAULT_CONFIG: Config;
|
||||
declare const resolveConfig: {
|
||||
(searchFrom?: string, configFile?: string): Promise<Config | null>;
|
||||
sync(searchFrom?: string, configFile?: string): Config | null;
|
||||
};
|
||||
declare const resolveConfigFile: {
|
||||
(filePath: string): Promise<string | null>;
|
||||
sync(filePath: string): string | null;
|
||||
};
|
||||
declare const loadConfig: {
|
||||
({ configFile, ...baseConfig }: Config, state?: Pick<State, 'filePath'>): Promise<Config>;
|
||||
sync({ configFile, ...baseConfig }: Config, state?: Pick<State, 'filePath'>): Config;
|
||||
};
|
||||
|
||||
declare const transform: {
|
||||
(code: string, config?: Config, state?: Partial<State>): Promise<string>;
|
||||
sync(code: string, config?: Config, state?: Partial<State>): string;
|
||||
};
|
||||
|
||||
export { Config, ConfigPlugin, DEFAULT_CONFIG, Plugin, State, loadConfig, resolveConfig, resolveConfigFile, transform };
|
||||
192
frontend/node_modules/@svgr/core/dist/index.js
generated
vendored
192
frontend/node_modules/@svgr/core/dist/index.js
generated
vendored
@@ -1,192 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
var camelCase = require('camelcase');
|
||||
var cosmiconfig = require('cosmiconfig');
|
||||
|
||||
var __defProp$1 = Object.defineProperty;
|
||||
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues$1 = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp$1.call(b, prop))
|
||||
__defNormalProp$1(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols$1)
|
||||
for (var prop of __getOwnPropSymbols$1(b)) {
|
||||
if (__propIsEnum$1.call(b, prop))
|
||||
__defNormalProp$1(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
const VALID_CHAR_REGEX = /[^a-zA-Z0-9 _-]/g;
|
||||
const getComponentName = (filePath) => {
|
||||
if (!filePath)
|
||||
return "SvgComponent";
|
||||
const pascalCaseFileName = camelCase(
|
||||
path.parse(filePath).name.replace(VALID_CHAR_REGEX, ""),
|
||||
{
|
||||
pascalCase: true
|
||||
}
|
||||
);
|
||||
return `Svg${pascalCaseFileName}`;
|
||||
};
|
||||
const expandState = (state) => {
|
||||
return __spreadValues$1({
|
||||
componentName: state.componentName || getComponentName(state.filePath)
|
||||
}, state);
|
||||
};
|
||||
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols)
|
||||
for (var prop of __getOwnPropSymbols(b)) {
|
||||
if (__propIsEnum.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
var __objRest = (source, exclude) => {
|
||||
var target = {};
|
||||
for (var prop in source)
|
||||
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
||||
target[prop] = source[prop];
|
||||
if (source != null && __getOwnPropSymbols)
|
||||
for (var prop of __getOwnPropSymbols(source)) {
|
||||
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
||||
target[prop] = source[prop];
|
||||
}
|
||||
return target;
|
||||
};
|
||||
const DEFAULT_CONFIG = {
|
||||
dimensions: true,
|
||||
expandProps: "end",
|
||||
icon: false,
|
||||
native: false,
|
||||
typescript: false,
|
||||
prettier: true,
|
||||
prettierConfig: void 0,
|
||||
memo: false,
|
||||
ref: false,
|
||||
replaceAttrValues: void 0,
|
||||
svgProps: void 0,
|
||||
svgo: true,
|
||||
svgoConfig: void 0,
|
||||
template: void 0,
|
||||
index: false,
|
||||
titleProp: false,
|
||||
descProp: false,
|
||||
runtimeConfig: true,
|
||||
namedExport: "ReactComponent",
|
||||
exportType: "default"
|
||||
};
|
||||
const explorer = cosmiconfig.cosmiconfig("svgr");
|
||||
const explorerSync = cosmiconfig.cosmiconfigSync("svgr");
|
||||
const resolveConfig = async (searchFrom, configFile) => {
|
||||
if (configFile == null) {
|
||||
const result2 = await explorer.search(searchFrom);
|
||||
return result2 ? result2.config : null;
|
||||
}
|
||||
const result = await explorer.load(configFile);
|
||||
return result ? result.config : null;
|
||||
};
|
||||
resolveConfig.sync = (searchFrom, configFile) => {
|
||||
if (configFile == null) {
|
||||
const result2 = explorerSync.search(searchFrom);
|
||||
return result2 ? result2.config : null;
|
||||
}
|
||||
const result = explorerSync.load(configFile);
|
||||
return result ? result.config : null;
|
||||
};
|
||||
const resolveConfigFile = async (filePath) => {
|
||||
const result = await explorer.search(filePath);
|
||||
return result ? result.filepath : null;
|
||||
};
|
||||
resolveConfigFile.sync = (filePath) => {
|
||||
const result = explorerSync.search(filePath);
|
||||
return result ? result.filepath : null;
|
||||
};
|
||||
const loadConfig = async (_a, state = {}) => {
|
||||
var _b = _a, { configFile } = _b, baseConfig = __objRest(_b, ["configFile"]);
|
||||
const rcConfig = state.filePath && baseConfig.runtimeConfig !== false ? await resolveConfig(state.filePath, configFile) : {};
|
||||
return __spreadValues(__spreadValues(__spreadValues({}, DEFAULT_CONFIG), baseConfig), rcConfig);
|
||||
};
|
||||
loadConfig.sync = (_c, state = {}) => {
|
||||
var _d = _c, { configFile } = _d, baseConfig = __objRest(_d, ["configFile"]);
|
||||
const rcConfig = state.filePath && baseConfig.runtimeConfig !== false ? resolveConfig.sync(state.filePath, configFile) : {};
|
||||
return __spreadValues(__spreadValues(__spreadValues({}, DEFAULT_CONFIG), baseConfig), rcConfig);
|
||||
};
|
||||
|
||||
const DEFAULT_PLUGINS = [];
|
||||
const getPlugins = (config, state) => {
|
||||
var _a;
|
||||
if (config.plugins) {
|
||||
return config.plugins;
|
||||
}
|
||||
if ((_a = state.caller) == null ? void 0 : _a.defaultPlugins) {
|
||||
return state.caller.defaultPlugins;
|
||||
}
|
||||
return DEFAULT_PLUGINS;
|
||||
};
|
||||
const resolvePlugin = (plugin) => {
|
||||
if (typeof plugin === "function") {
|
||||
return plugin;
|
||||
}
|
||||
if (typeof plugin === "string") {
|
||||
return loadPlugin(plugin);
|
||||
}
|
||||
throw new Error(`Invalid plugin "${plugin}"`);
|
||||
};
|
||||
const pluginCache = {};
|
||||
const resolveModule = (m) => m ? m.default || m : null;
|
||||
const loadPlugin = (moduleName) => {
|
||||
if (pluginCache[moduleName]) {
|
||||
return pluginCache[moduleName];
|
||||
}
|
||||
try {
|
||||
const plugin = resolveModule(require(moduleName));
|
||||
if (!plugin) {
|
||||
throw new Error(`Invalid plugin "${moduleName}"`);
|
||||
}
|
||||
pluginCache[moduleName] = plugin;
|
||||
return pluginCache[moduleName];
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
throw new Error(
|
||||
`Module "${moduleName}" missing. Maybe \`npm install ${moduleName}\` could help!`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const run = (code, config, state) => {
|
||||
const expandedState = expandState(state);
|
||||
const plugins = getPlugins(config, state).map(resolvePlugin);
|
||||
let nextCode = String(code).replace("\0", "");
|
||||
for (const plugin of plugins) {
|
||||
nextCode = plugin(nextCode, config, expandedState);
|
||||
}
|
||||
return nextCode;
|
||||
};
|
||||
const transform = async (code, config = {}, state = {}) => {
|
||||
config = await loadConfig(config, state);
|
||||
return run(code, config, state);
|
||||
};
|
||||
transform.sync = (code, config = {}, state = {}) => {
|
||||
config = loadConfig.sync(config, state);
|
||||
return run(code, config, state);
|
||||
};
|
||||
|
||||
exports.DEFAULT_CONFIG = DEFAULT_CONFIG;
|
||||
exports.loadConfig = loadConfig;
|
||||
exports.resolveConfig = resolveConfig;
|
||||
exports.resolveConfigFile = resolveConfigFile;
|
||||
exports.transform = transform;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@svgr/core/dist/index.js.map
generated
vendored
1
frontend/node_modules/@svgr/core/dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
51
frontend/node_modules/@svgr/core/package.json
generated
vendored
51
frontend/node_modules/@svgr/core/package.json
generated
vendored
@@ -1,51 +0,0 @@
|
||||
{
|
||||
"name": "@svgr/core",
|
||||
"description": "Transform SVG into React Components.",
|
||||
"version": "8.1.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": "https://github.com/gregberge/svgr/tree/main/packages/core",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"svgr",
|
||||
"svg",
|
||||
"react",
|
||||
"core",
|
||||
"api"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"reset": "rm -rf dist",
|
||||
"build": "rollup -c ../../build/rollup.config.mjs",
|
||||
"prepublishOnly": "npm run reset && npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.21.3",
|
||||
"@svgr/babel-preset": "8.1.0",
|
||||
"camelcase": "^6.2.0",
|
||||
"cosmiconfig": "^8.1.3",
|
||||
"snake-case": "^3.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svgo": "^3.0.2"
|
||||
},
|
||||
"gitHead": "772592e042be5063e782bfb8711d024b2fefc6b8"
|
||||
}
|
||||
7
frontend/node_modules/@svgr/hast-util-to-babel-ast/LICENSE
generated
vendored
7
frontend/node_modules/@svgr/hast-util-to-babel-ast/LICENSE
generated
vendored
@@ -1,7 +0,0 @@
|
||||
Copyright 2017 Smooth Code
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
28
frontend/node_modules/@svgr/hast-util-to-babel-ast/README.md
generated
vendored
28
frontend/node_modules/@svgr/hast-util-to-babel-ast/README.md
generated
vendored
@@ -1,28 +0,0 @@
|
||||
# @svgr/hast-util-to-babel-ast
|
||||
|
||||
[](https://travis-ci.org/smooth-code/svgr)
|
||||
[](https://www.npmjs.com/package/@svgr/hast-util-to-babel-ast)
|
||||
[](https://github.com/smooth-code/svgr/blob/master/LICENSE)
|
||||
|
||||
Transforms HAST into Babel AST.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install --save-dev @svgr/hast-util-to-babel-ast
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import { parse } from 'svg-parser'
|
||||
import hastToBabelAst from '@svgr/hast-util-to-babel-ast'
|
||||
|
||||
const hastTree = parse(`<svg></svg>`)
|
||||
|
||||
const babelTree = hastToBabelAst(hastTree)
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
6
frontend/node_modules/@svgr/hast-util-to-babel-ast/dist/index.d.ts
generated
vendored
6
frontend/node_modules/@svgr/hast-util-to-babel-ast/dist/index.d.ts
generated
vendored
@@ -1,6 +0,0 @@
|
||||
import { RootNode } from 'svg-parser';
|
||||
import * as t from '@babel/types';
|
||||
|
||||
declare const toBabelAST: (tree: RootNode) => t.Program;
|
||||
|
||||
export { toBabelAST as default };
|
||||
805
frontend/node_modules/@svgr/hast-util-to-babel-ast/dist/index.js
generated
vendored
805
frontend/node_modules/@svgr/hast-util-to-babel-ast/dist/index.js
generated
vendored
@@ -1,805 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var t = require('@babel/types');
|
||||
var entities = require('entities');
|
||||
|
||||
function _interopNamespaceDefault(e) {
|
||||
var n = Object.create(null);
|
||||
if (e) {
|
||||
Object.keys(e).forEach(function (k) {
|
||||
if (k !== 'default') {
|
||||
var d = Object.getOwnPropertyDescriptor(e, k);
|
||||
Object.defineProperty(n, k, d.get ? d : {
|
||||
enumerable: true,
|
||||
get: function () { return e[k]; }
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
n.default = e;
|
||||
return Object.freeze(n);
|
||||
}
|
||||
|
||||
var t__namespace = /*#__PURE__*/_interopNamespaceDefault(t);
|
||||
|
||||
const one = (h, node, parent) => {
|
||||
const type = node && node.type;
|
||||
const fn = h.handlers[type];
|
||||
if (!type) {
|
||||
throw new Error(`Expected node, got \`${node}\``);
|
||||
}
|
||||
if (!fn) {
|
||||
throw new Error(`Node of type ${type} is unknown`);
|
||||
}
|
||||
return fn(h, node, parent);
|
||||
};
|
||||
|
||||
const all = (helpers, parent) => {
|
||||
const nodes = parent.children || [];
|
||||
const { length } = nodes;
|
||||
const values = [];
|
||||
let index = -1;
|
||||
while (++index < length) {
|
||||
const node = nodes[index];
|
||||
if (typeof node !== "string") {
|
||||
const result = one(helpers, node, parent);
|
||||
values.push(result);
|
||||
}
|
||||
}
|
||||
return values.filter(Boolean);
|
||||
};
|
||||
|
||||
const isNumeric = (value) => {
|
||||
return !Number.isNaN(value - parseFloat(value));
|
||||
};
|
||||
const hyphenToCamelCase = (string) => {
|
||||
return string.replace(/-(.)/g, (_, chr) => chr.toUpperCase());
|
||||
};
|
||||
const trimEnd = (haystack, needle) => {
|
||||
return haystack.endsWith(needle) ? haystack.slice(0, -needle.length) : haystack;
|
||||
};
|
||||
const KEBAB_REGEX = /[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g;
|
||||
const kebabCase = (str) => {
|
||||
return str.replace(KEBAB_REGEX, (match) => `-${match.toLowerCase()}`);
|
||||
};
|
||||
const SPACES_REGEXP = /[\t\r\n\u0085\u2028\u2029]+/g;
|
||||
const replaceSpaces = (str) => {
|
||||
return str.replace(SPACES_REGEXP, " ");
|
||||
};
|
||||
|
||||
const PX_REGEX = /^\d+px$/;
|
||||
const MS_REGEX = /^-ms-/;
|
||||
const VAR_REGEX = /^--/;
|
||||
const isConvertiblePixelValue = (value) => {
|
||||
return PX_REGEX.test(value);
|
||||
};
|
||||
const formatKey = (key) => {
|
||||
if (VAR_REGEX.test(key)) {
|
||||
return t__namespace.stringLiteral(key);
|
||||
}
|
||||
key = key.toLowerCase();
|
||||
if (MS_REGEX.test(key))
|
||||
key = key.substr(1);
|
||||
return t__namespace.identifier(hyphenToCamelCase(key));
|
||||
};
|
||||
const formatValue = (value) => {
|
||||
if (isNumeric(value))
|
||||
return t__namespace.numericLiteral(Number(value));
|
||||
if (isConvertiblePixelValue(value))
|
||||
return t__namespace.numericLiteral(Number(trimEnd(value, "px")));
|
||||
return t__namespace.stringLiteral(value);
|
||||
};
|
||||
const stringToObjectStyle = (rawStyle) => {
|
||||
const entries = rawStyle.split(";");
|
||||
const properties = [];
|
||||
let index = -1;
|
||||
while (++index < entries.length) {
|
||||
const entry = entries[index];
|
||||
const style = entry.trim();
|
||||
const firstColon = style.indexOf(":");
|
||||
const value = style.substr(firstColon + 1).trim();
|
||||
const key = style.substr(0, firstColon);
|
||||
if (key !== "") {
|
||||
const property = t__namespace.objectProperty(formatKey(key), formatValue(value));
|
||||
properties.push(property);
|
||||
}
|
||||
}
|
||||
return t__namespace.objectExpression(properties);
|
||||
};
|
||||
|
||||
const ATTRIBUTE_MAPPING = {
|
||||
// HTML
|
||||
accept: "accept",
|
||||
acceptcharset: "acceptCharset",
|
||||
"accept-charset": "acceptCharset",
|
||||
accesskey: "accessKey",
|
||||
action: "action",
|
||||
allowfullscreen: "allowFullScreen",
|
||||
alt: "alt",
|
||||
as: "as",
|
||||
async: "async",
|
||||
autocapitalize: "autoCapitalize",
|
||||
autocomplete: "autoComplete",
|
||||
autocorrect: "autoCorrect",
|
||||
autofocus: "autoFocus",
|
||||
autoplay: "autoPlay",
|
||||
autosave: "autoSave",
|
||||
capture: "capture",
|
||||
cellpadding: "cellPadding",
|
||||
cellspacing: "cellSpacing",
|
||||
challenge: "challenge",
|
||||
charset: "charSet",
|
||||
checked: "checked",
|
||||
children: "children",
|
||||
cite: "cite",
|
||||
class: "className",
|
||||
classid: "classID",
|
||||
classname: "className",
|
||||
cols: "cols",
|
||||
colspan: "colSpan",
|
||||
content: "content",
|
||||
contenteditable: "contentEditable",
|
||||
contextmenu: "contextMenu",
|
||||
controls: "controls",
|
||||
controlslist: "controlsList",
|
||||
coords: "coords",
|
||||
crossorigin: "crossOrigin",
|
||||
dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
|
||||
data: "data",
|
||||
datetime: "dateTime",
|
||||
default: "default",
|
||||
defaultchecked: "defaultChecked",
|
||||
defaultvalue: "defaultValue",
|
||||
defer: "defer",
|
||||
dir: "dir",
|
||||
disabled: "disabled",
|
||||
download: "download",
|
||||
draggable: "draggable",
|
||||
enctype: "encType",
|
||||
for: "htmlFor",
|
||||
form: "form",
|
||||
formmethod: "formMethod",
|
||||
formaction: "formAction",
|
||||
formenctype: "formEncType",
|
||||
formnovalidate: "formNoValidate",
|
||||
formtarget: "formTarget",
|
||||
frameborder: "frameBorder",
|
||||
headers: "headers",
|
||||
height: "height",
|
||||
hidden: "hidden",
|
||||
high: "high",
|
||||
href: "href",
|
||||
hreflang: "hrefLang",
|
||||
htmlfor: "htmlFor",
|
||||
httpequiv: "httpEquiv",
|
||||
"http-equiv": "httpEquiv",
|
||||
icon: "icon",
|
||||
id: "id",
|
||||
innerhtml: "innerHTML",
|
||||
inputmode: "inputMode",
|
||||
integrity: "integrity",
|
||||
is: "is",
|
||||
itemid: "itemID",
|
||||
itemprop: "itemProp",
|
||||
itemref: "itemRef",
|
||||
itemscope: "itemScope",
|
||||
itemtype: "itemType",
|
||||
keyparams: "keyParams",
|
||||
keytype: "keyType",
|
||||
kind: "kind",
|
||||
label: "label",
|
||||
lang: "lang",
|
||||
list: "list",
|
||||
loop: "loop",
|
||||
low: "low",
|
||||
manifest: "manifest",
|
||||
marginwidth: "marginWidth",
|
||||
marginheight: "marginHeight",
|
||||
max: "max",
|
||||
maxlength: "maxLength",
|
||||
media: "media",
|
||||
mediagroup: "mediaGroup",
|
||||
method: "method",
|
||||
min: "min",
|
||||
minlength: "minLength",
|
||||
multiple: "multiple",
|
||||
muted: "muted",
|
||||
name: "name",
|
||||
nomodule: "noModule",
|
||||
nonce: "nonce",
|
||||
novalidate: "noValidate",
|
||||
open: "open",
|
||||
optimum: "optimum",
|
||||
pattern: "pattern",
|
||||
placeholder: "placeholder",
|
||||
playsinline: "playsInline",
|
||||
poster: "poster",
|
||||
preload: "preload",
|
||||
profile: "profile",
|
||||
radiogroup: "radioGroup",
|
||||
readonly: "readOnly",
|
||||
referrerpolicy: "referrerPolicy",
|
||||
rel: "rel",
|
||||
required: "required",
|
||||
reversed: "reversed",
|
||||
role: "role",
|
||||
rows: "rows",
|
||||
rowspan: "rowSpan",
|
||||
sandbox: "sandbox",
|
||||
scope: "scope",
|
||||
scoped: "scoped",
|
||||
scrolling: "scrolling",
|
||||
seamless: "seamless",
|
||||
selected: "selected",
|
||||
shape: "shape",
|
||||
size: "size",
|
||||
sizes: "sizes",
|
||||
span: "span",
|
||||
spellcheck: "spellCheck",
|
||||
src: "src",
|
||||
srcdoc: "srcDoc",
|
||||
srclang: "srcLang",
|
||||
srcset: "srcSet",
|
||||
start: "start",
|
||||
step: "step",
|
||||
style: "style",
|
||||
summary: "summary",
|
||||
tabindex: "tabIndex",
|
||||
target: "target",
|
||||
title: "title",
|
||||
type: "type",
|
||||
usemap: "useMap",
|
||||
value: "value",
|
||||
width: "width",
|
||||
wmode: "wmode",
|
||||
wrap: "wrap",
|
||||
// SVG
|
||||
about: "about",
|
||||
accentheight: "accentHeight",
|
||||
"accent-height": "accentHeight",
|
||||
accumulate: "accumulate",
|
||||
additive: "additive",
|
||||
alignmentbaseline: "alignmentBaseline",
|
||||
"alignment-baseline": "alignmentBaseline",
|
||||
allowreorder: "allowReorder",
|
||||
alphabetic: "alphabetic",
|
||||
amplitude: "amplitude",
|
||||
arabicform: "arabicForm",
|
||||
"arabic-form": "arabicForm",
|
||||
ascent: "ascent",
|
||||
attributename: "attributeName",
|
||||
attributetype: "attributeType",
|
||||
autoreverse: "autoReverse",
|
||||
azimuth: "azimuth",
|
||||
basefrequency: "baseFrequency",
|
||||
baselineshift: "baselineShift",
|
||||
"baseline-shift": "baselineShift",
|
||||
baseprofile: "baseProfile",
|
||||
bbox: "bbox",
|
||||
begin: "begin",
|
||||
bias: "bias",
|
||||
by: "by",
|
||||
calcmode: "calcMode",
|
||||
capheight: "capHeight",
|
||||
"cap-height": "capHeight",
|
||||
clip: "clip",
|
||||
clippath: "clipPath",
|
||||
"clip-path": "clipPath",
|
||||
clippathunits: "clipPathUnits",
|
||||
cliprule: "clipRule",
|
||||
"clip-rule": "clipRule",
|
||||
color: "color",
|
||||
colorinterpolation: "colorInterpolation",
|
||||
"color-interpolation": "colorInterpolation",
|
||||
colorinterpolationfilters: "colorInterpolationFilters",
|
||||
"color-interpolation-filters": "colorInterpolationFilters",
|
||||
colorprofile: "colorProfile",
|
||||
"color-profile": "colorProfile",
|
||||
colorrendering: "colorRendering",
|
||||
"color-rendering": "colorRendering",
|
||||
contentscripttype: "contentScriptType",
|
||||
contentstyletype: "contentStyleType",
|
||||
cursor: "cursor",
|
||||
cx: "cx",
|
||||
cy: "cy",
|
||||
d: "d",
|
||||
datatype: "datatype",
|
||||
decelerate: "decelerate",
|
||||
descent: "descent",
|
||||
diffuseconstant: "diffuseConstant",
|
||||
direction: "direction",
|
||||
display: "display",
|
||||
divisor: "divisor",
|
||||
dominantbaseline: "dominantBaseline",
|
||||
"dominant-baseline": "dominantBaseline",
|
||||
dur: "dur",
|
||||
dx: "dx",
|
||||
dy: "dy",
|
||||
edgemode: "edgeMode",
|
||||
elevation: "elevation",
|
||||
enablebackground: "enableBackground",
|
||||
"enable-background": "enableBackground",
|
||||
end: "end",
|
||||
exponent: "exponent",
|
||||
externalresourcesrequired: "externalResourcesRequired",
|
||||
fill: "fill",
|
||||
fillopacity: "fillOpacity",
|
||||
"fill-opacity": "fillOpacity",
|
||||
fillrule: "fillRule",
|
||||
"fill-rule": "fillRule",
|
||||
filter: "filter",
|
||||
filterres: "filterRes",
|
||||
filterunits: "filterUnits",
|
||||
floodopacity: "floodOpacity",
|
||||
"flood-opacity": "floodOpacity",
|
||||
floodcolor: "floodColor",
|
||||
"flood-color": "floodColor",
|
||||
focusable: "focusable",
|
||||
fontfamily: "fontFamily",
|
||||
"font-family": "fontFamily",
|
||||
fontsize: "fontSize",
|
||||
"font-size": "fontSize",
|
||||
fontsizeadjust: "fontSizeAdjust",
|
||||
"font-size-adjust": "fontSizeAdjust",
|
||||
fontstretch: "fontStretch",
|
||||
"font-stretch": "fontStretch",
|
||||
fontstyle: "fontStyle",
|
||||
"font-style": "fontStyle",
|
||||
fontvariant: "fontVariant",
|
||||
"font-variant": "fontVariant",
|
||||
fontweight: "fontWeight",
|
||||
"font-weight": "fontWeight",
|
||||
format: "format",
|
||||
from: "from",
|
||||
fx: "fx",
|
||||
fy: "fy",
|
||||
g1: "g1",
|
||||
g2: "g2",
|
||||
glyphname: "glyphName",
|
||||
"glyph-name": "glyphName",
|
||||
glyphorientationhorizontal: "glyphOrientationHorizontal",
|
||||
"glyph-orientation-horizontal": "glyphOrientationHorizontal",
|
||||
glyphorientationvertical: "glyphOrientationVertical",
|
||||
"glyph-orientation-vertical": "glyphOrientationVertical",
|
||||
glyphref: "glyphRef",
|
||||
gradienttransform: "gradientTransform",
|
||||
gradientunits: "gradientUnits",
|
||||
hanging: "hanging",
|
||||
horizadvx: "horizAdvX",
|
||||
"horiz-adv-x": "horizAdvX",
|
||||
horizoriginx: "horizOriginX",
|
||||
"horiz-origin-x": "horizOriginX",
|
||||
ideographic: "ideographic",
|
||||
imagerendering: "imageRendering",
|
||||
"image-rendering": "imageRendering",
|
||||
in2: "in2",
|
||||
in: "in",
|
||||
inlist: "inlist",
|
||||
intercept: "intercept",
|
||||
k1: "k1",
|
||||
k2: "k2",
|
||||
k3: "k3",
|
||||
k4: "k4",
|
||||
k: "k",
|
||||
kernelmatrix: "kernelMatrix",
|
||||
kernelunitlength: "kernelUnitLength",
|
||||
kerning: "kerning",
|
||||
keypoints: "keyPoints",
|
||||
keysplines: "keySplines",
|
||||
keytimes: "keyTimes",
|
||||
lengthadjust: "lengthAdjust",
|
||||
letterspacing: "letterSpacing",
|
||||
"letter-spacing": "letterSpacing",
|
||||
lightingcolor: "lightingColor",
|
||||
"lighting-color": "lightingColor",
|
||||
limitingconeangle: "limitingConeAngle",
|
||||
local: "local",
|
||||
markerend: "markerEnd",
|
||||
"marker-end": "markerEnd",
|
||||
markerheight: "markerHeight",
|
||||
markermid: "markerMid",
|
||||
"marker-mid": "markerMid",
|
||||
markerstart: "markerStart",
|
||||
"marker-start": "markerStart",
|
||||
markerunits: "markerUnits",
|
||||
markerwidth: "markerWidth",
|
||||
mask: "mask",
|
||||
maskcontentunits: "maskContentUnits",
|
||||
maskunits: "maskUnits",
|
||||
mathematical: "mathematical",
|
||||
mode: "mode",
|
||||
numoctaves: "numOctaves",
|
||||
offset: "offset",
|
||||
opacity: "opacity",
|
||||
operator: "operator",
|
||||
order: "order",
|
||||
orient: "orient",
|
||||
orientation: "orientation",
|
||||
origin: "origin",
|
||||
overflow: "overflow",
|
||||
overlineposition: "overlinePosition",
|
||||
"overline-position": "overlinePosition",
|
||||
overlinethickness: "overlineThickness",
|
||||
"overline-thickness": "overlineThickness",
|
||||
paintorder: "paintOrder",
|
||||
"paint-order": "paintOrder",
|
||||
panose1: "panose1",
|
||||
"panose-1": "panose1",
|
||||
pathlength: "pathLength",
|
||||
patterncontentunits: "patternContentUnits",
|
||||
patterntransform: "patternTransform",
|
||||
patternunits: "patternUnits",
|
||||
pointerevents: "pointerEvents",
|
||||
"pointer-events": "pointerEvents",
|
||||
points: "points",
|
||||
pointsatx: "pointsAtX",
|
||||
pointsaty: "pointsAtY",
|
||||
pointsatz: "pointsAtZ",
|
||||
prefix: "prefix",
|
||||
preservealpha: "preserveAlpha",
|
||||
preserveaspectratio: "preserveAspectRatio",
|
||||
primitiveunits: "primitiveUnits",
|
||||
property: "property",
|
||||
r: "r",
|
||||
radius: "radius",
|
||||
refx: "refX",
|
||||
refy: "refY",
|
||||
renderingintent: "renderingIntent",
|
||||
"rendering-intent": "renderingIntent",
|
||||
repeatcount: "repeatCount",
|
||||
repeatdur: "repeatDur",
|
||||
requiredextensions: "requiredExtensions",
|
||||
requiredfeatures: "requiredFeatures",
|
||||
resource: "resource",
|
||||
restart: "restart",
|
||||
result: "result",
|
||||
results: "results",
|
||||
rotate: "rotate",
|
||||
rx: "rx",
|
||||
ry: "ry",
|
||||
scale: "scale",
|
||||
security: "security",
|
||||
seed: "seed",
|
||||
shaperendering: "shapeRendering",
|
||||
"shape-rendering": "shapeRendering",
|
||||
slope: "slope",
|
||||
spacing: "spacing",
|
||||
specularconstant: "specularConstant",
|
||||
specularexponent: "specularExponent",
|
||||
speed: "speed",
|
||||
spreadmethod: "spreadMethod",
|
||||
startoffset: "startOffset",
|
||||
stddeviation: "stdDeviation",
|
||||
stemh: "stemh",
|
||||
stemv: "stemv",
|
||||
stitchtiles: "stitchTiles",
|
||||
stopcolor: "stopColor",
|
||||
"stop-color": "stopColor",
|
||||
stopopacity: "stopOpacity",
|
||||
"stop-opacity": "stopOpacity",
|
||||
strikethroughposition: "strikethroughPosition",
|
||||
"strikethrough-position": "strikethroughPosition",
|
||||
strikethroughthickness: "strikethroughThickness",
|
||||
"strikethrough-thickness": "strikethroughThickness",
|
||||
string: "string",
|
||||
stroke: "stroke",
|
||||
strokedasharray: "strokeDasharray",
|
||||
"stroke-dasharray": "strokeDasharray",
|
||||
strokedashoffset: "strokeDashoffset",
|
||||
"stroke-dashoffset": "strokeDashoffset",
|
||||
strokelinecap: "strokeLinecap",
|
||||
"stroke-linecap": "strokeLinecap",
|
||||
strokelinejoin: "strokeLinejoin",
|
||||
"stroke-linejoin": "strokeLinejoin",
|
||||
strokemiterlimit: "strokeMiterlimit",
|
||||
"stroke-miterlimit": "strokeMiterlimit",
|
||||
strokewidth: "strokeWidth",
|
||||
"stroke-width": "strokeWidth",
|
||||
strokeopacity: "strokeOpacity",
|
||||
"stroke-opacity": "strokeOpacity",
|
||||
suppresscontenteditablewarning: "suppressContentEditableWarning",
|
||||
suppresshydrationwarning: "suppressHydrationWarning",
|
||||
surfacescale: "surfaceScale",
|
||||
systemlanguage: "systemLanguage",
|
||||
tablevalues: "tableValues",
|
||||
targetx: "targetX",
|
||||
targety: "targetY",
|
||||
textanchor: "textAnchor",
|
||||
"text-anchor": "textAnchor",
|
||||
textdecoration: "textDecoration",
|
||||
"text-decoration": "textDecoration",
|
||||
textlength: "textLength",
|
||||
textrendering: "textRendering",
|
||||
"text-rendering": "textRendering",
|
||||
to: "to",
|
||||
transform: "transform",
|
||||
typeof: "typeof",
|
||||
u1: "u1",
|
||||
u2: "u2",
|
||||
underlineposition: "underlinePosition",
|
||||
"underline-position": "underlinePosition",
|
||||
underlinethickness: "underlineThickness",
|
||||
"underline-thickness": "underlineThickness",
|
||||
unicode: "unicode",
|
||||
unicodebidi: "unicodeBidi",
|
||||
"unicode-bidi": "unicodeBidi",
|
||||
unicoderange: "unicodeRange",
|
||||
"unicode-range": "unicodeRange",
|
||||
unitsperem: "unitsPerEm",
|
||||
"units-per-em": "unitsPerEm",
|
||||
unselectable: "unselectable",
|
||||
valphabetic: "vAlphabetic",
|
||||
"v-alphabetic": "vAlphabetic",
|
||||
values: "values",
|
||||
vectoreffect: "vectorEffect",
|
||||
"vector-effect": "vectorEffect",
|
||||
version: "version",
|
||||
vertadvy: "vertAdvY",
|
||||
"vert-adv-y": "vertAdvY",
|
||||
vertoriginx: "vertOriginX",
|
||||
"vert-origin-x": "vertOriginX",
|
||||
vertoriginy: "vertOriginY",
|
||||
"vert-origin-y": "vertOriginY",
|
||||
vhanging: "vHanging",
|
||||
"v-hanging": "vHanging",
|
||||
videographic: "vIdeographic",
|
||||
"v-ideographic": "vIdeographic",
|
||||
viewbox: "viewBox",
|
||||
viewtarget: "viewTarget",
|
||||
visibility: "visibility",
|
||||
vmathematical: "vMathematical",
|
||||
"v-mathematical": "vMathematical",
|
||||
vocab: "vocab",
|
||||
widths: "widths",
|
||||
wordspacing: "wordSpacing",
|
||||
"word-spacing": "wordSpacing",
|
||||
writingmode: "writingMode",
|
||||
"writing-mode": "writingMode",
|
||||
x1: "x1",
|
||||
x2: "x2",
|
||||
x: "x",
|
||||
xchannelselector: "xChannelSelector",
|
||||
xheight: "xHeight",
|
||||
"x-height": "xHeight",
|
||||
xlinkactuate: "xlinkActuate",
|
||||
"xlink:actuate": "xlinkActuate",
|
||||
xlinkarcrole: "xlinkArcrole",
|
||||
"xlink:arcrole": "xlinkArcrole",
|
||||
xlinkhref: "xlinkHref",
|
||||
"xlink:href": "xlinkHref",
|
||||
xlinkrole: "xlinkRole",
|
||||
"xlink:role": "xlinkRole",
|
||||
xlinkshow: "xlinkShow",
|
||||
"xlink:show": "xlinkShow",
|
||||
xlinktitle: "xlinkTitle",
|
||||
"xlink:title": "xlinkTitle",
|
||||
xlinktype: "xlinkType",
|
||||
"xlink:type": "xlinkType",
|
||||
xmlbase: "xmlBase",
|
||||
"xml:base": "xmlBase",
|
||||
xmllang: "xmlLang",
|
||||
"xml:lang": "xmlLang",
|
||||
xmlns: "xmlns",
|
||||
"xml:space": "xmlSpace",
|
||||
xmlnsxlink: "xmlnsXlink",
|
||||
"xmlns:xlink": "xmlnsXlink",
|
||||
xmlspace: "xmlSpace",
|
||||
y1: "y1",
|
||||
y2: "y2",
|
||||
y: "y",
|
||||
ychannelselector: "yChannelSelector",
|
||||
z: "z",
|
||||
zoomandpan: "zoomAndPan"
|
||||
};
|
||||
const ELEMENT_ATTRIBUTE_MAPPING = {
|
||||
input: {
|
||||
checked: "defaultChecked",
|
||||
value: "defaultValue",
|
||||
maxlength: "maxLength"
|
||||
},
|
||||
form: {
|
||||
enctype: "encType"
|
||||
}
|
||||
};
|
||||
const ELEMENT_TAG_NAME_MAPPING = {
|
||||
a: "a",
|
||||
altglyph: "altGlyph",
|
||||
altglyphdef: "altGlyphDef",
|
||||
altglyphitem: "altGlyphItem",
|
||||
animate: "animate",
|
||||
animatecolor: "animateColor",
|
||||
animatemotion: "animateMotion",
|
||||
animatetransform: "animateTransform",
|
||||
audio: "audio",
|
||||
canvas: "canvas",
|
||||
circle: "circle",
|
||||
clippath: "clipPath",
|
||||
"color-profile": "colorProfile",
|
||||
cursor: "cursor",
|
||||
defs: "defs",
|
||||
desc: "desc",
|
||||
discard: "discard",
|
||||
ellipse: "ellipse",
|
||||
feblend: "feBlend",
|
||||
fecolormatrix: "feColorMatrix",
|
||||
fecomponenttransfer: "feComponentTransfer",
|
||||
fecomposite: "feComposite",
|
||||
feconvolvematrix: "feConvolveMatrix",
|
||||
fediffuselighting: "feDiffuseLighting",
|
||||
fedisplacementmap: "feDisplacementMap",
|
||||
fedistantlight: "feDistantLight",
|
||||
fedropshadow: "feDropShadow",
|
||||
feflood: "feFlood",
|
||||
fefunca: "feFuncA",
|
||||
fefuncb: "feFuncB",
|
||||
fefuncg: "feFuncG",
|
||||
fefuncr: "feFuncR",
|
||||
fegaussianblur: "feGaussianBlur",
|
||||
feimage: "feImage",
|
||||
femerge: "feMerge",
|
||||
femergenode: "feMergeNode",
|
||||
femorphology: "feMorphology",
|
||||
feoffset: "feOffset",
|
||||
fepointlight: "fePointLight",
|
||||
fespecularlighting: "feSpecularLighting",
|
||||
fespotlight: "feSpotLight",
|
||||
fetile: "feTile",
|
||||
feturbulence: "feTurbulence",
|
||||
filter: "filter",
|
||||
font: "font",
|
||||
"font-face": "fontFace",
|
||||
"font-face-format": "fontFaceFormat",
|
||||
"font-face-name": "fontFaceName",
|
||||
"font-face-src": "fontFaceSrc",
|
||||
"font-face-uri": "fontFaceUri",
|
||||
foreignobject: "foreignObject",
|
||||
g: "g",
|
||||
glyph: "glyph",
|
||||
glyphref: "glyphRef",
|
||||
hatch: "hatch",
|
||||
hatchpath: "hatchpath",
|
||||
hkern: "hkern",
|
||||
iframe: "iframe",
|
||||
image: "image",
|
||||
line: "line",
|
||||
lineargradient: "linearGradient",
|
||||
marker: "marker",
|
||||
mask: "mask",
|
||||
mesh: "mesh",
|
||||
meshgradient: "meshgradient",
|
||||
meshpatch: "meshpatch",
|
||||
meshrow: "meshrow",
|
||||
metadata: "metadata",
|
||||
"missing-glyph": "missingGlyph",
|
||||
mpath: "mpath",
|
||||
path: "path",
|
||||
pattern: "pattern",
|
||||
polygon: "polygon",
|
||||
polyline: "polyline",
|
||||
radialgradient: "radialGradient",
|
||||
rect: "rect",
|
||||
script: "script",
|
||||
set: "set",
|
||||
solidcolor: "solidcolor",
|
||||
stop: "stop",
|
||||
style: "style",
|
||||
svg: "svg",
|
||||
switch: "switch",
|
||||
symbol: "symbol",
|
||||
text: "text",
|
||||
textpath: "textPath",
|
||||
title: "title",
|
||||
tref: "tref",
|
||||
tspan: "tspan",
|
||||
unknown: "unknown",
|
||||
use: "use",
|
||||
video: "video",
|
||||
view: "view",
|
||||
vkern: "vkern"
|
||||
};
|
||||
|
||||
const convertAriaAttribute = (kebabKey) => {
|
||||
const [aria, ...parts] = kebabKey.split("-");
|
||||
return `${aria}-${parts.join("").toLowerCase()}`;
|
||||
};
|
||||
const getKey = (key, node) => {
|
||||
const lowerCaseKey = key.toLowerCase();
|
||||
const mappedElementAttribute = (
|
||||
// @ts-ignore
|
||||
ELEMENT_ATTRIBUTE_MAPPING[node.name] && // @ts-ignore
|
||||
ELEMENT_ATTRIBUTE_MAPPING[node.name][lowerCaseKey]
|
||||
);
|
||||
const mappedAttribute = ATTRIBUTE_MAPPING[lowerCaseKey];
|
||||
if (mappedElementAttribute || mappedAttribute) {
|
||||
return t__namespace.jsxIdentifier(mappedElementAttribute || mappedAttribute);
|
||||
}
|
||||
const kebabKey = kebabCase(key);
|
||||
if (kebabKey.startsWith("aria-")) {
|
||||
return t__namespace.jsxIdentifier(convertAriaAttribute(kebabKey));
|
||||
}
|
||||
if (kebabKey.startsWith("data-")) {
|
||||
return t__namespace.jsxIdentifier(kebabKey);
|
||||
}
|
||||
return t__namespace.jsxIdentifier(key);
|
||||
};
|
||||
const getValue = (key, value) => {
|
||||
if (Array.isArray(value)) {
|
||||
return t__namespace.stringLiteral(replaceSpaces(value.join(" ")));
|
||||
}
|
||||
if (key === "style") {
|
||||
return t__namespace.jsxExpressionContainer(stringToObjectStyle(value));
|
||||
}
|
||||
if (typeof value === "number" || isNumeric(value)) {
|
||||
return t__namespace.jsxExpressionContainer(t__namespace.numericLiteral(Number(value)));
|
||||
}
|
||||
return t__namespace.stringLiteral(replaceSpaces(value));
|
||||
};
|
||||
const getAttributes = (node) => {
|
||||
if (!node.properties)
|
||||
return [];
|
||||
const keys = Object.keys(node.properties);
|
||||
const attributes = [];
|
||||
let index = -1;
|
||||
while (++index < keys.length) {
|
||||
const key = keys[index];
|
||||
const value = node.properties[key];
|
||||
const attribute = t__namespace.jsxAttribute(getKey(key, node), getValue(key, value));
|
||||
attributes.push(attribute);
|
||||
}
|
||||
return attributes;
|
||||
};
|
||||
|
||||
const root = (h, node) => (
|
||||
// @ts-ignore
|
||||
t__namespace.program(all(h, node))
|
||||
);
|
||||
const comment = (_, node, parent) => {
|
||||
if (parent.type === "root" || !node.value)
|
||||
return null;
|
||||
const expression = t__namespace.jsxEmptyExpression();
|
||||
t__namespace.addComment(expression, "inner", node.value);
|
||||
return t__namespace.jsxExpressionContainer(expression);
|
||||
};
|
||||
const SPACE_REGEX = /^\s+$/;
|
||||
const text = (h, node, parent) => {
|
||||
if (parent.type === "root")
|
||||
return null;
|
||||
if (typeof node.value === "string" && SPACE_REGEX.test(node.value))
|
||||
return null;
|
||||
return t__namespace.jsxExpressionContainer(
|
||||
t__namespace.stringLiteral(entities.decodeXML(String(node.value)))
|
||||
);
|
||||
};
|
||||
const element = (h, node, parent) => {
|
||||
if (!node.tagName)
|
||||
return null;
|
||||
const children = all(h, node);
|
||||
const selfClosing = children.length === 0;
|
||||
const name = ELEMENT_TAG_NAME_MAPPING[node.tagName] || node.tagName;
|
||||
const openingElement = t__namespace.jsxOpeningElement(
|
||||
t__namespace.jsxIdentifier(name),
|
||||
getAttributes(node),
|
||||
selfClosing
|
||||
);
|
||||
const closingElement = !selfClosing ? t__namespace.jsxClosingElement(t__namespace.jsxIdentifier(name)) : null;
|
||||
const jsxElement = t__namespace.jsxElement(openingElement, closingElement, children);
|
||||
if (parent.type === "root") {
|
||||
return t__namespace.expressionStatement(jsxElement);
|
||||
}
|
||||
return jsxElement;
|
||||
};
|
||||
|
||||
var handlers = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
comment: comment,
|
||||
element: element,
|
||||
root: root,
|
||||
text: text
|
||||
});
|
||||
|
||||
const helpers = { handlers };
|
||||
|
||||
const toBabelAST = (tree) => root(helpers, tree);
|
||||
|
||||
module.exports = toBabelAST;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@svgr/hast-util-to-babel-ast/dist/index.js.map
generated
vendored
1
frontend/node_modules/@svgr/hast-util-to-babel-ast/dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
49
frontend/node_modules/@svgr/hast-util-to-babel-ast/package.json
generated
vendored
49
frontend/node_modules/@svgr/hast-util-to-babel-ast/package.json
generated
vendored
@@ -1,49 +0,0 @@
|
||||
{
|
||||
"name": "@svgr/hast-util-to-babel-ast",
|
||||
"description": "Transform HAST to Babel AST (JSX)",
|
||||
"version": "8.0.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": "https://github.com/gregberge/svgr/tree/main/packages/hast-util-to-babel-ast",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"html",
|
||||
"hast",
|
||||
"babel",
|
||||
"hast-util",
|
||||
"unist-util",
|
||||
"unist"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.21.3",
|
||||
"entities": "^4.4.0"
|
||||
},
|
||||
"scripts": {
|
||||
"reset": "rm -rf dist",
|
||||
"build": "rollup -c ../../build/rollup.config.mjs",
|
||||
"prepublishOnly": "npm run reset && npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/svg-parser": "^2.0.3"
|
||||
},
|
||||
"gitHead": "52a1079681477587ef0d842c0e78531adf2d2520"
|
||||
}
|
||||
7
frontend/node_modules/@svgr/plugin-jsx/LICENSE
generated
vendored
7
frontend/node_modules/@svgr/plugin-jsx/LICENSE
generated
vendored
@@ -1,7 +0,0 @@
|
||||
Copyright 2017 Smooth Code
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
73
frontend/node_modules/@svgr/plugin-jsx/README.md
generated
vendored
73
frontend/node_modules/@svgr/plugin-jsx/README.md
generated
vendored
@@ -1,73 +0,0 @@
|
||||
# @svgr/plugin-jsx
|
||||
|
||||
[](https://travis-ci.org/smooth-code/svgr)
|
||||
[](https://www.npmjs.com/package/@svgr/plugin-jsx)
|
||||
[](https://github.com/smooth-code/svgr/blob/master/LICENSE)
|
||||
|
||||
Transforms SVG into JSX.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install --save-dev @svgr/plugin-jsx
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**.svgrrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["@svgr/plugin-jsx"]
|
||||
}
|
||||
```
|
||||
|
||||
## How does it work?
|
||||
|
||||
`@svgr/plugin-jsx` consists in three phases:
|
||||
|
||||
- Parsing the SVG code using [svg-parser](https://github.com/Rich-Harris/svg-parser)
|
||||
- Converting the [HAST](https://github.com/syntax-tree/hast) into a [Babel AST](https://github.com/babel/babel/blob/master/packages/babel-parser/ast/spec.md)
|
||||
- Applying [`@svgr/babel-preset`](../babel-preset/README.md) transformations
|
||||
|
||||
## Applying custom transformations
|
||||
|
||||
You can extend the Babel config applied in this plugin using `jsx.babelConfig` config path:
|
||||
|
||||
```js
|
||||
// .svgrrc.js
|
||||
|
||||
module.exports = {
|
||||
jsx: {
|
||||
babelConfig: {
|
||||
plugins: [
|
||||
// For an example, this plugin will remove "id" attribute from "svg" tag
|
||||
[
|
||||
'@svgr/babel-plugin-remove-jsx-attribute',
|
||||
{
|
||||
elements: ['svg'],
|
||||
attributes: ['id'],
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Several Babel plugins are available:
|
||||
|
||||
- [`@svgr/babel-plugin-add-jsx-attribute`](../babel-plugin-add-jsx-attribute/README.md)
|
||||
- [`@svgr/babel-plugin-remove-jsx-attribute`](../babel-plugin-remove-jsx-attribute/README.md)
|
||||
- [`@svgr/babel-plugin-remove-jsx-empty-expression`](../babel-plugin-remove-jsx-empty-expression/README.md)
|
||||
- [`@svgr/babel-plugin-replace-jsx-attribute-value`](../babel-plugin-replace-jsx-attribute-value/README.md)
|
||||
- [`@svgr/babel-plugin-svg-dynamic-title`](../babel-plugin-svg-dynamic-title/README.md)
|
||||
- [`@svgr/babel-plugin-svg-em-dimensions`](../babel-plugin-svg-em-dimensions/README.md)
|
||||
- [`@svgr/babel-plugin-transform-react-native-svg`](../babel-plugin-transform-react-native-svg/README.md)
|
||||
- [`@svgr/babel-plugin-transform-svg-component`](../babel-plugin-transform-svg-component/README.md)
|
||||
|
||||
If you want to create your own, reading [Babel Handbook](https://github.com/jamiebuilds/babel-handbook/blob/master/translations/en/plugin-handbook.md) is a good start!
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
5
frontend/node_modules/@svgr/plugin-jsx/dist/index.d.ts
generated
vendored
5
frontend/node_modules/@svgr/plugin-jsx/dist/index.d.ts
generated
vendored
@@ -1,5 +0,0 @@
|
||||
import { Plugin } from '@svgr/core';
|
||||
|
||||
declare const jsxPlugin: Plugin;
|
||||
|
||||
export { jsxPlugin as default };
|
||||
101
frontend/node_modules/@svgr/plugin-jsx/dist/index.js
generated
vendored
101
frontend/node_modules/@svgr/plugin-jsx/dist/index.js
generated
vendored
@@ -1,101 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var svgParser = require('svg-parser');
|
||||
var hastToBabelAst = require('@svgr/hast-util-to-babel-ast');
|
||||
var core = require('@babel/core');
|
||||
var svgrBabelPreset = require('@svgr/babel-preset');
|
||||
|
||||
var __defProp = Object.defineProperty;
|
||||
var __defProps = Object.defineProperties;
|
||||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||||
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols)
|
||||
for (var prop of __getOwnPropSymbols(b)) {
|
||||
if (__propIsEnum.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
||||
const getJsxRuntimeOptions = (config) => {
|
||||
if (config.jsxRuntimeImport) {
|
||||
return {
|
||||
importSource: config.jsxRuntimeImport.source,
|
||||
jsxRuntimeImport: config.jsxRuntimeImport
|
||||
};
|
||||
}
|
||||
switch (config.jsxRuntime) {
|
||||
case null:
|
||||
case void 0:
|
||||
case "classic":
|
||||
return {
|
||||
jsxRuntime: "classic",
|
||||
importSource: "react",
|
||||
jsxRuntimeImport: { namespace: "React", source: "react" }
|
||||
};
|
||||
case "classic-preact":
|
||||
return {
|
||||
jsxRuntime: "classic",
|
||||
importSource: "preact/compat",
|
||||
jsxRuntimeImport: { specifiers: ["h"], source: "preact" }
|
||||
};
|
||||
case "automatic":
|
||||
return { jsxRuntime: "automatic" };
|
||||
default:
|
||||
throw new Error(`Unsupported "jsxRuntime" "${config.jsxRuntime}"`);
|
||||
}
|
||||
};
|
||||
const jsxPlugin = (code, config, state) => {
|
||||
const filePath = state.filePath || "unknown";
|
||||
const hastTree = svgParser.parse(code);
|
||||
const babelTree = hastToBabelAst(hastTree);
|
||||
const svgPresetOptions = __spreadProps(__spreadValues({
|
||||
ref: config.ref,
|
||||
titleProp: config.titleProp,
|
||||
descProp: config.descProp,
|
||||
expandProps: config.expandProps,
|
||||
dimensions: config.dimensions,
|
||||
icon: config.icon,
|
||||
native: config.native,
|
||||
svgProps: config.svgProps,
|
||||
replaceAttrValues: config.replaceAttrValues,
|
||||
typescript: config.typescript,
|
||||
template: config.template,
|
||||
memo: config.memo,
|
||||
exportType: config.exportType,
|
||||
namedExport: config.namedExport
|
||||
}, getJsxRuntimeOptions(config)), {
|
||||
state
|
||||
});
|
||||
const result = core.transformFromAstSync(babelTree, code, __spreadValues({
|
||||
caller: {
|
||||
name: "svgr"
|
||||
},
|
||||
presets: [
|
||||
core.createConfigItem([svgrBabelPreset, svgPresetOptions], {
|
||||
type: "preset"
|
||||
})
|
||||
],
|
||||
filename: filePath,
|
||||
babelrc: false,
|
||||
configFile: false,
|
||||
code: true,
|
||||
ast: false,
|
||||
// @ts-ignore
|
||||
inputSourceMap: false
|
||||
}, config.jsx && config.jsx.babelConfig));
|
||||
if (!(result == null ? void 0 : result.code)) {
|
||||
throw new Error(`Unable to generate SVG file`);
|
||||
}
|
||||
return result.code;
|
||||
};
|
||||
|
||||
module.exports = jsxPlugin;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@svgr/plugin-jsx/dist/index.js.map
generated
vendored
1
frontend/node_modules/@svgr/plugin-jsx/dist/index.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { parse } from 'svg-parser'\nimport hastToBabelAst from '@svgr/hast-util-to-babel-ast'\nimport { transformFromAstSync, createConfigItem } from '@babel/core'\nimport svgrBabelPreset, {\n Options as SvgrPresetOptions,\n} from '@svgr/babel-preset'\nimport type { Plugin, Config } from '@svgr/core'\n\nconst getJsxRuntimeOptions = (config: Config): Partial<SvgrPresetOptions> => {\n if (config.jsxRuntimeImport) {\n return {\n importSource: config.jsxRuntimeImport.source,\n jsxRuntimeImport: config.jsxRuntimeImport,\n }\n }\n switch (config.jsxRuntime) {\n case null:\n case undefined:\n case 'classic':\n return {\n jsxRuntime: 'classic',\n importSource: 'react',\n jsxRuntimeImport: { namespace: 'React', source: 'react' },\n }\n case 'classic-preact':\n return {\n jsxRuntime: 'classic',\n importSource: 'preact/compat',\n jsxRuntimeImport: { specifiers: ['h'], source: 'preact' },\n }\n case 'automatic':\n return { jsxRuntime: 'automatic' }\n default:\n throw new Error(`Unsupported \"jsxRuntime\" \"${config.jsxRuntime}\"`)\n }\n}\n\nconst jsxPlugin: Plugin = (code, config, state) => {\n const filePath = state.filePath || 'unknown'\n const hastTree = parse(code)\n\n const babelTree = hastToBabelAst(hastTree)\n\n const svgPresetOptions: SvgrPresetOptions = {\n ref: config.ref,\n titleProp: config.titleProp,\n descProp: config.descProp,\n expandProps: config.expandProps,\n dimensions: config.dimensions,\n icon: config.icon,\n native: config.native,\n svgProps: config.svgProps,\n replaceAttrValues: config.replaceAttrValues,\n typescript: config.typescript,\n template: config.template,\n memo: config.memo,\n exportType: config.exportType,\n namedExport: config.namedExport,\n ...getJsxRuntimeOptions(config),\n state,\n }\n\n const result = transformFromAstSync(babelTree, code, {\n caller: {\n name: 'svgr',\n },\n presets: [\n createConfigItem([svgrBabelPreset, svgPresetOptions], {\n type: 'preset',\n }),\n ],\n filename: filePath,\n babelrc: false,\n configFile: false,\n code: true,\n ast: false,\n // @ts-ignore\n inputSourceMap: false,\n ...(config.jsx && config.jsx.babelConfig),\n })\n\n if (!result?.code) {\n throw new Error(`Unable to generate SVG file`)\n }\n\n return result.code\n}\n\nexport default jsxPlugin\n"],"names":["parse","transformFromAstSync","createConfigItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAM,oBAAA,GAAuB,CAAC,MAA+C,KAAA;AAC3E,EAAA,IAAI,OAAO,gBAAkB,EAAA;AAC3B,IAAO,OAAA;AAAA,MACL,YAAA,EAAc,OAAO,gBAAiB,CAAA,MAAA;AAAA,MACtC,kBAAkB,MAAO,CAAA,gBAAA;AAAA,KAC3B,CAAA;AAAA,GACF;AACA,EAAA,QAAQ,OAAO,UAAY;AAAA,IACzB,KAAK,IAAA,CAAA;AAAA,IACL,KAAK,KAAA,CAAA,CAAA;AAAA,IACL,KAAK,SAAA;AACH,MAAO,OAAA;AAAA,QACL,UAAY,EAAA,SAAA;AAAA,QACZ,YAAc,EAAA,OAAA;AAAA,QACd,gBAAkB,EAAA,EAAE,SAAW,EAAA,OAAA,EAAS,QAAQ,OAAQ,EAAA;AAAA,OAC1D,CAAA;AAAA,IACF,KAAK,gBAAA;AACH,MAAO,OAAA;AAAA,QACL,UAAY,EAAA,SAAA;AAAA,QACZ,YAAc,EAAA,eAAA;AAAA,QACd,kBAAkB,EAAE,UAAA,EAAY,CAAC,GAAG,CAAA,EAAG,QAAQ,QAAS,EAAA;AAAA,OAC1D,CAAA;AAAA,IACF,KAAK,WAAA;AACH,MAAO,OAAA,EAAE,YAAY,WAAY,EAAA,CAAA;AAAA,IACnC;AACE,MAAA,MAAM,IAAI,KAAA,CAAM,CAA6B,0BAAA,EAAA,MAAA,CAAO,UAAa,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,GACrE;AACF,CAAA,CAAA;AAEA,MAAM,SAAoB,GAAA,CAAC,IAAM,EAAA,MAAA,EAAQ,KAAU,KAAA;AACjD,EAAM,MAAA,QAAA,GAAW,MAAM,QAAY,IAAA,SAAA,CAAA;AACnC,EAAM,MAAA,QAAA,GAAWA,gBAAM,IAAI,CAAA,CAAA;AAE3B,EAAM,MAAA,SAAA,GAAY,eAAe,QAAQ,CAAA,CAAA;AAEzC,EAAA,MAAM,gBAAsC,GAAA,aAAA,CAAA,cAAA,CAAA;AAAA,IAC1C,KAAK,MAAO,CAAA,GAAA;AAAA,IACZ,WAAW,MAAO,CAAA,SAAA;AAAA,IAClB,UAAU,MAAO,CAAA,QAAA;AAAA,IACjB,aAAa,MAAO,CAAA,WAAA;AAAA,IACpB,YAAY,MAAO,CAAA,UAAA;AAAA,IACnB,MAAM,MAAO,CAAA,IAAA;AAAA,IACb,QAAQ,MAAO,CAAA,MAAA;AAAA,IACf,UAAU,MAAO,CAAA,QAAA;AAAA,IACjB,mBAAmB,MAAO,CAAA,iBAAA;AAAA,IAC1B,YAAY,MAAO,CAAA,UAAA;AAAA,IACnB,UAAU,MAAO,CAAA,QAAA;AAAA,IACjB,MAAM,MAAO,CAAA,IAAA;AAAA,IACb,YAAY,MAAO,CAAA,UAAA;AAAA,IACnB,aAAa,MAAO,CAAA,WAAA;AAAA,GACjB,EAAA,oBAAA,CAAqB,MAAM,CAfY,CAAA,EAAA;AAAA,IAgB1C,KAAA;AAAA,GACF,CAAA,CAAA;AAEA,EAAM,MAAA,MAAA,GAASC,yBAAqB,CAAA,SAAA,EAAW,IAAM,EAAA,cAAA,CAAA;AAAA,IACnD,MAAQ,EAAA;AAAA,MACN,IAAM,EAAA,MAAA;AAAA,KACR;AAAA,IACA,OAAS,EAAA;AAAA,MACPC,qBAAiB,CAAA,CAAC,eAAiB,EAAA,gBAAgB,CAAG,EAAA;AAAA,QACpD,IAAM,EAAA,QAAA;AAAA,OACP,CAAA;AAAA,KACH;AAAA,IACA,QAAU,EAAA,QAAA;AAAA,IACV,OAAS,EAAA,KAAA;AAAA,IACT,UAAY,EAAA,KAAA;AAAA,IACZ,IAAM,EAAA,IAAA;AAAA,IACN,GAAK,EAAA,KAAA;AAAA;AAAA,IAEL,cAAgB,EAAA,KAAA;AAAA,GAAA,EACZ,MAAO,CAAA,GAAA,IAAO,MAAO,CAAA,GAAA,CAAI,WAC9B,CAAA,CAAA,CAAA;AAED,EAAI,IAAA,EAAC,iCAAQ,IAAM,CAAA,EAAA;AACjB,IAAM,MAAA,IAAI,MAAM,CAA6B,2BAAA,CAAA,CAAA,CAAA;AAAA,GAC/C;AAEA,EAAA,OAAO,MAAO,CAAA,IAAA,CAAA;AAChB;;;;"}
|
||||
50
frontend/node_modules/@svgr/plugin-jsx/package.json
generated
vendored
50
frontend/node_modules/@svgr/plugin-jsx/package.json
generated
vendored
@@ -1,50 +0,0 @@
|
||||
{
|
||||
"name": "@svgr/plugin-jsx",
|
||||
"description": "Transform SVG into JSX",
|
||||
"version": "8.1.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": "https://github.com/gregberge/svgr/tree/main/packages/plugin-jsx",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"svgr-plugin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"reset": "rm -rf dist",
|
||||
"build": "rollup -c ../../build/rollup.config.mjs",
|
||||
"prepublishOnly": "pnpm run reset && pnpm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.21.3",
|
||||
"@svgr/babel-preset": "8.1.0",
|
||||
"@svgr/hast-util-to-babel-ast": "8.0.0",
|
||||
"svg-parser": "^2.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@svgr/core": "8.1.0",
|
||||
"@types/svg-parser": "^2.0.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@svgr/core": "*"
|
||||
},
|
||||
"gitHead": "772592e042be5063e782bfb8711d024b2fefc6b8"
|
||||
}
|
||||
Reference in New Issue
Block a user