perf(ui): migrate icons to SVG sprite system
Replace @remixicon/react with a shared Icon component that renders via <use href> references to a single hidden SVG sprite. This reduces DOM node count by replacing inline SVGs with lightweight references. - Create Icon component with sprite injection (packages/ui/src/components/icon/) - Migrate all 164 files from @remixicon/react to Icon component - Auto-generate sprite data from remixicon bundle (scripts/generate-icon-sprite.mjs) - Add bun run icons:generate to package.json - Move @remixicon/react to devDependencies - Add icon usage instructions to theme-system skill
This commit is contained in:
+2
-1
@@ -59,6 +59,7 @@
|
||||
"vscode:type-check": "bun run --cwd packages/vscode type-check",
|
||||
"docs:validate": "node scripts/docs/validate-docs.mjs",
|
||||
"icons:sprite": "node scripts/generate-file-type-sprite.mjs",
|
||||
"icons:generate": "bun run scripts/generate-icon-sprite.mjs",
|
||||
"themes:port:opencode": "tsx scripts/port-opencode-theme.ts",
|
||||
"version:bump": "node scripts/bump-version.mjs",
|
||||
"release:prepare": "bun run build && bun run type-check && bun run lint",
|
||||
@@ -105,7 +106,6 @@
|
||||
"@radix-ui/react-slot": "^1.2.3",
|
||||
"@radix-ui/react-toggle": "^1.1.10",
|
||||
"@radix-ui/react-tooltip": "^1.2.8",
|
||||
"@remixicon/react": "^4.7.0",
|
||||
"@types/react-syntax-highlighter": "^15.5.13",
|
||||
"bun-pty": "^0.4.5",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
@@ -151,6 +151,7 @@
|
||||
"globals": "^16.3.0",
|
||||
"nodemon": "^3.1.7",
|
||||
"patch-package": "^8.0.0",
|
||||
"@remixicon/react": "^4.7.0",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"tsx": "^4.20.6",
|
||||
"tw-animate-css": "^1.3.8",
|
||||
|
||||
Reference in New Issue
Block a user