react-icons-sprite 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/collector-BbjpnJS-.mjs +7 -0
- package/dist/{core-BoovxbBC.mjs → core-TIimc90M.mjs} +5 -1
- package/dist/icon-DB53krat.mjs +17 -0
- package/dist/icon.mjs +1 -15
- package/dist/index.d.mts +3 -1
- package/dist/index.mjs +6 -2
- package/dist/vite/plugin.mjs +2 -2
- package/dist/webpack/loader.mjs +2 -2
- package/dist/webpack/plugin.mjs +3 -3
- package/package.json +12 -12
- package/dist/collector-DrPR8kXO.mjs +0 -7
- package/dist/src-Bf4uZBwp.mjs +0 -5
package/README.md
CHANGED
|
@@ -21,6 +21,10 @@ Out of the box, imports from the following libraries are detected and transforme
|
|
|
21
21
|
- `remixicon-react`
|
|
22
22
|
- `@remixicon/react`
|
|
23
23
|
- `devicons-react`
|
|
24
|
+
- `@fortawesome/free-solid-svg-icons` (and other Font Awesome icon packs)
|
|
25
|
+
- `@fortawesome/react-fontawesome`
|
|
26
|
+
- `@mui/icons-material`
|
|
27
|
+
- `@iconscout/react-unicons`
|
|
24
28
|
|
|
25
29
|
## Motivation
|
|
26
30
|
|
|
@@ -23,7 +23,11 @@ const DEFAULT_ICON_SOURCES = [
|
|
|
23
23
|
/^grommet-icons$/,
|
|
24
24
|
/^remixicon-react$/,
|
|
25
25
|
/^@remixicon\/react$/,
|
|
26
|
-
/^devicons-react
|
|
26
|
+
/^devicons-react$/,
|
|
27
|
+
/^@fortawesome\/react-fontawesome$/,
|
|
28
|
+
/^@fortawesome\/[\w-]+-svg-icons$/,
|
|
29
|
+
/^@mui\/icons-material$/,
|
|
30
|
+
/^@iconscout\/react-unicons$/
|
|
27
31
|
];
|
|
28
32
|
const sourceMatchesSupported = (source, sources = DEFAULT_ICON_SOURCES) => sources.some((re) => re.test(source));
|
|
29
33
|
const normalizeAlias = (pack) => {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/icon.tsx
|
|
4
|
+
const ReactIconsSpriteIcon = ({ iconId, ...rest }) => {
|
|
5
|
+
const iconHref = `__SPRITE_URL_PLACEHOLDER__#${iconId}`;
|
|
6
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
7
|
+
height: "1em",
|
|
8
|
+
width: "1em",
|
|
9
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
...rest,
|
|
12
|
+
children: /* @__PURE__ */ jsx("use", { href: iconHref })
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ReactIconsSpriteIcon as t };
|
package/dist/icon.mjs
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as ReactIconsSpriteIcon } from "./icon-DB53krat.mjs";
|
|
2
2
|
|
|
3
|
-
//#region src/icon.tsx
|
|
4
|
-
const ReactIconsSpriteIcon = ({ iconId, ...rest }) => {
|
|
5
|
-
const iconHref = `__SPRITE_URL_PLACEHOLDER__#${iconId}`;
|
|
6
|
-
return /* @__PURE__ */ jsx("svg", {
|
|
7
|
-
height: "1em",
|
|
8
|
-
width: "1em",
|
|
9
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
10
|
-
viewBox: "0 0 24 24",
|
|
11
|
-
...rest,
|
|
12
|
-
children: /* @__PURE__ */ jsx("use", { href: iconHref })
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
3
|
export { ReactIconsSpriteIcon };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { ReactIconsSpriteIcon } from "./icon.mjs";
|
|
2
|
+
|
|
1
3
|
//#region src/index.d.ts
|
|
2
4
|
declare const REACT_ICONS_SPRITE_URL_PLACEHOLDER = "__SPRITE_URL_PLACEHOLDER__";
|
|
3
5
|
//#endregion
|
|
4
|
-
export { REACT_ICONS_SPRITE_URL_PLACEHOLDER };
|
|
6
|
+
export { REACT_ICONS_SPRITE_URL_PLACEHOLDER, ReactIconsSpriteIcon };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as ReactIconsSpriteIcon } from "./icon-DB53krat.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
//#region src/index.ts
|
|
4
|
+
const REACT_ICONS_SPRITE_URL_PLACEHOLDER = "__SPRITE_URL_PLACEHOLDER__";
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
export { REACT_ICONS_SPRITE_URL_PLACEHOLDER, ReactIconsSpriteIcon };
|
package/dist/vite/plugin.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as transformModule, n as buildSprite, r as createCollector, t as DEFAULT_ICON_SOURCES } from "../core-
|
|
1
|
+
import { REACT_ICONS_SPRITE_URL_PLACEHOLDER } from "../index.mjs";
|
|
2
|
+
import { i as transformModule, n as buildSprite, r as createCollector, t as DEFAULT_ICON_SOURCES } from "../core-TIimc90M.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
|
|
5
5
|
//#region src/vite/plugin.ts
|
package/dist/webpack/loader.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as transformModule } from "../core-
|
|
2
|
-
import { t as collector } from "../collector-
|
|
1
|
+
import { i as transformModule } from "../core-TIimc90M.mjs";
|
|
2
|
+
import { t as collector } from "../collector-BbjpnJS-.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/webpack/loader.ts
|
|
5
5
|
const reactIconsSpriteLoader = async function(source) {
|
package/dist/webpack/plugin.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as buildSprite } from "../core-
|
|
3
|
-
import { t as collector } from "../collector-
|
|
1
|
+
import { REACT_ICONS_SPRITE_URL_PLACEHOLDER } from "../index.mjs";
|
|
2
|
+
import { n as buildSprite } from "../core-TIimc90M.mjs";
|
|
3
|
+
import { t as collector } from "../collector-BbjpnJS-.mjs";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
|
|
6
6
|
//#region src/webpack/plugin.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-icons-sprite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "",
|
|
@@ -62,24 +62,24 @@
|
|
|
62
62
|
"react-icons": ">= 5"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@babel/generator": "7.28.
|
|
66
|
-
"@babel/parser": "7.28.
|
|
67
|
-
"@babel/traverse": "7.28.
|
|
68
|
-
"@babel/types": "7.28.
|
|
69
|
-
"@biomejs/biome": "2.3.
|
|
65
|
+
"@babel/generator": "7.28.6",
|
|
66
|
+
"@babel/parser": "7.28.6",
|
|
67
|
+
"@babel/traverse": "7.28.6",
|
|
68
|
+
"@babel/types": "7.28.6",
|
|
69
|
+
"@biomejs/biome": "2.3.13",
|
|
70
70
|
"@types/babel__generator": "7.27.0",
|
|
71
71
|
"@types/babel__traverse": "7.28.0",
|
|
72
|
-
"@types/node": "
|
|
72
|
+
"@types/node": "25.0.10",
|
|
73
73
|
"@types/react-dom": "19.2.3",
|
|
74
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
74
|
+
"@typescript/native-preview": "7.0.0-dev.20260127.1",
|
|
75
75
|
"react": "19.2.1",
|
|
76
76
|
"react-dom": "19.2.1",
|
|
77
77
|
"react-icons": "5.5.0",
|
|
78
|
-
"tsdown": "0.
|
|
78
|
+
"tsdown": "0.20.1",
|
|
79
79
|
"typescript": "5.9.3",
|
|
80
|
-
"vite": "7.
|
|
81
|
-
"vitest": "4.0.
|
|
82
|
-
"webpack": "5.
|
|
80
|
+
"vite": "7.3.1",
|
|
81
|
+
"vitest": "4.0.18",
|
|
82
|
+
"webpack": "5.104.1"
|
|
83
83
|
},
|
|
84
84
|
"keywords": [
|
|
85
85
|
"vite",
|