react-icons-sprite 1.2.1 → 1.3.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/dist/{build-sprite-DpqABaHa.mjs → build-sprite-Dci5SlWn.mjs} +1 -1
- package/dist/{collector-D0VUmoK8.mjs → collector-dvzR3TG1.mjs} +1 -1
- package/dist/{compute-icon-id-CGZBEP3i.mjs → compute-icon-id-1Gop_fRM.mjs} +4 -3
- package/dist/{transform-module-BwmW_20G.mjs → transform-module-BakS0Tzh.mjs} +1 -1
- package/dist/vite/plugin.mjs +3 -3
- package/dist/webpack/loader.mjs +3 -3
- package/dist/webpack/plugin.mjs +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as resolveIconImport, t as computeIconId } from "./compute-icon-id-
|
|
1
|
+
import { o as resolveIconImport, t as computeIconId } from "./compute-icon-id-1Gop_fRM.mjs";
|
|
2
2
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
@@ -52,7 +52,8 @@ const DEFAULT_ICON_SOURCES = [
|
|
|
52
52
|
/^@ant-design\/icons(?:\/.*)?$/,
|
|
53
53
|
/^@fluentui\/react-icons(?:\/svg\/[\w-]+)?$/,
|
|
54
54
|
/^@primer\/octicons-react$/,
|
|
55
|
-
/^@hugeicons\/core-free-icons(?:\/.*)
|
|
55
|
+
/^@hugeicons\/core-free-icons(?:\/.*)?$/,
|
|
56
|
+
/^@pillage-first\/graphics$/
|
|
56
57
|
];
|
|
57
58
|
const phosphorIconPathName = (name) => name.endsWith("Icon") ? name.slice(0, -4) : name;
|
|
58
59
|
const fluentIconPathName = (name) => {
|
|
@@ -71,7 +72,7 @@ const exactResolvers = {
|
|
|
71
72
|
"devicons-react": (pack, name) => `${pack}/icons/${name}`,
|
|
72
73
|
"@carbon/icons-react": (pack, name) => `${pack}/es/${name}.js`,
|
|
73
74
|
"@ant-design/icons": (pack, name) => `${pack}/lib/icons/${name}.js`,
|
|
74
|
-
"@fluentui/react-icons": (pack, name) => `${pack}/lib
|
|
75
|
+
"@fluentui/react-icons": (pack, name) => `${pack}/lib/atoms/svg/${fluentIconPathName(name)}`,
|
|
75
76
|
"@primer/octicons-react": (pack) => pack,
|
|
76
77
|
"@hugeicons/core-free-icons": (pack, name) => `${pack}/${name}`
|
|
77
78
|
};
|
|
@@ -81,7 +82,7 @@ const resolveIconImport = (pack, exportName) => {
|
|
|
81
82
|
if (/^@mui\/icons-material(?:\/.*)?$/.test(pack)) return pack.split("/").length > 2 ? pack : `${pack}/${exportName}`;
|
|
82
83
|
if (/^@ant-design\/icons\/.+$/.test(pack)) return `@ant-design/icons/lib/icons/${exportName === "default" ? pack.split("/").at(-1) : exportName}.js`;
|
|
83
84
|
const fluentSubpath = /^@fluentui\/react-icons\/svg\/(.+)$/.exec(pack);
|
|
84
|
-
if (fluentSubpath) return `@fluentui/react-icons/lib
|
|
85
|
+
if (fluentSubpath) return `@fluentui/react-icons/lib/atoms/svg/${fluentSubpath[1]}`;
|
|
85
86
|
if (/^@hugeicons\/core-free-icons\/.+$/.test(pack)) return pack;
|
|
86
87
|
if (/^@heroicons\/react\/(?:\d{2})\/(?:outline|solid)$/.test(pack)) return `${pack}/${exportName}`;
|
|
87
88
|
if (/^@fortawesome\/[\w-]+-svg-icons$/.test(pack)) return `${pack}/${exportName}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DEFAULT_ICON_SOURCES, n as normalizePackAlias } from "./compute-icon-id-
|
|
1
|
+
import { a as DEFAULT_ICON_SOURCES, n as normalizePackAlias } from "./compute-icon-id-1Gop_fRM.mjs";
|
|
2
2
|
import MagicString from "magic-string";
|
|
3
3
|
//#region src/transform/edit-applier.ts
|
|
4
4
|
const applyEdits = (code, edits) => {
|
package/dist/vite/plugin.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { REACT_ICONS_SPRITE_URL_PLACEHOLDER } from "../index.mjs";
|
|
2
|
-
import { i as createSpriteAssetName, r as createIconSources, s as createCollector } from "../compute-icon-id-
|
|
3
|
-
import { t as buildSprite } from "../build-sprite-
|
|
4
|
-
import { t as transformModule } from "../transform-module-
|
|
2
|
+
import { i as createSpriteAssetName, r as createIconSources, s as createCollector } from "../compute-icon-id-1Gop_fRM.mjs";
|
|
3
|
+
import { t as buildSprite } from "../build-sprite-Dci5SlWn.mjs";
|
|
4
|
+
import { t as transformModule } from "../transform-module-BakS0Tzh.mjs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
//#region src/vite/plugin.ts
|
|
7
7
|
const reactIconsSprite = (options = {}) => {
|
package/dist/webpack/loader.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as createIconSources } from "../compute-icon-id-
|
|
2
|
-
import { t as transformModule } from "../transform-module-
|
|
3
|
-
import { t as collector } from "../collector-
|
|
1
|
+
import { r as createIconSources } from "../compute-icon-id-1Gop_fRM.mjs";
|
|
2
|
+
import { t as transformModule } from "../transform-module-BakS0Tzh.mjs";
|
|
3
|
+
import { t as collector } from "../collector-dvzR3TG1.mjs";
|
|
4
4
|
//#region src/webpack/loader.ts
|
|
5
5
|
const reactIconsSpriteLoader = async function(source) {
|
|
6
6
|
if (this.mode === "development") return source;
|
package/dist/webpack/plugin.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { REACT_ICONS_SPRITE_URL_PLACEHOLDER } from "../index.mjs";
|
|
2
|
-
import { i as createSpriteAssetName } from "../compute-icon-id-
|
|
3
|
-
import { t as buildSprite } from "../build-sprite-
|
|
4
|
-
import { t as collector } from "../collector-
|
|
2
|
+
import { i as createSpriteAssetName } from "../compute-icon-id-1Gop_fRM.mjs";
|
|
3
|
+
import { t as buildSprite } from "../build-sprite-Dci5SlWn.mjs";
|
|
4
|
+
import { t as collector } from "../collector-dvzR3TG1.mjs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
//#region src/webpack/plugin.ts
|
|
7
7
|
var ReactIconsSpriteWebpackPlugin = class {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://www.schemastore.org/package.json",
|
|
3
3
|
"name": "react-icons-sprite",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A lightweight Vite, Rsbuild and Webpack plugin for popular icon libraries that builds a single SVG sprite and rewrites icons to <use>, reducing bundle size and runtime overhead.",
|
|
7
7
|
"author": "Jure Rotar <hello@jurerotar.com>",
|