bertui-vicons 1.0.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 ADDED
@@ -0,0 +1,308 @@
1
+ # ๐Ÿš€ BERTUI VIcons
2
+
3
+ **Universal icon library that works EVERYWHERE.** Part of the BERTUI framework family.
4
+
5
+ โœ… Vercel | โœ… Cloudflare Pages | โœ… Netlify | โœ… Any platform
6
+
7
+ ## Why BERTUI VIcons?
8
+
9
+ - โšก **Zero Build Failures**: Works on any platform (Vercel, Cloudflare, etc.)
10
+ - ๐ŸŽจ **Text Overlays**: Add dynamic text/numbers inside icons
11
+ - ๐Ÿ“ฆ **Zero Bundle Bloat**: Pre-optimized SVG templates
12
+ - ๐Ÿ”„ **Lucide Compatible**: Drop-in replacement for lucide-react
13
+ - ๐ŸŽฏ **Type-Safe**: Full TypeScript support
14
+ - ๐Ÿ”ฅ **Blazing Fast**: String-based rendering, no DOM manipulation
15
+ - ๐Ÿท๏ธ **Smart Search**: Search by name, tags, categories (from Lucide metadata)
16
+ - ๐Ÿ“Š **1667 Icons**: Complete Lucide icon set
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ bun add bertui-vicons
22
+ # or
23
+ npm install bertui-vicons
24
+ ```
25
+
26
+ ## Quick Start
27
+
28
+ ### Basic Usage (Lucide-Compatible)
29
+
30
+ ```jsx
31
+ import { ArrowRight, Heart, Star } from 'bertui-vicons';
32
+
33
+ function App() {
34
+ return (
35
+ <div>
36
+ <ArrowRight />
37
+ <Heart size={32} color="red" />
38
+ <Star color="gold" />
39
+ </div>
40
+ );
41
+ }
42
+ ```
43
+
44
+ ### Text Overlays (Revolutionary!)
45
+
46
+ ```jsx
47
+ import { Bell, ArrowRight, Mail } from 'bertui-vicons';
48
+
49
+ function App() {
50
+ return (
51
+ <div>
52
+ {/* Number badge */}
53
+ <Bell>5</Bell>
54
+
55
+ {/* Text label */}
56
+ <ArrowRight>Next</ArrowRight>
57
+
58
+ {/* Custom positioning */}
59
+ <Mail fontSize={14} fontWeight={700}>Inbox</Mail>
60
+ </div>
61
+ );
62
+ }
63
+ ```
64
+
65
+ ### Wildcard Imports (Safe!)
66
+
67
+ ```jsx
68
+ // Import everything - works perfectly on Vercel!
69
+ import * as Icons from 'bertui-vicons';
70
+
71
+ function IconGallery() {
72
+ return (
73
+ <div>
74
+ <Icons.Heart />
75
+ <Icons.Star />
76
+ <Icons.Zap />
77
+ </div>
78
+ );
79
+ }
80
+ ```
81
+
82
+ ### Dynamic Icons
83
+
84
+ ```jsx
85
+ import { Icon } from 'bertui-vicons';
86
+
87
+ function DynamicIcon({ iconName, label }) {
88
+ return <Icon name={iconName}>{label}</Icon>;
89
+ }
90
+
91
+ // Usage
92
+ <DynamicIcon iconName="ArrowRight" label="Next" />
93
+ ```
94
+
95
+ ### Search & Filter
96
+
97
+ ```jsx
98
+ import {
99
+ searchIcons,
100
+ getIconsByCategory,
101
+ getIconsByTag,
102
+ getAllIcons,
103
+ getAllCategories,
104
+ getAllTags
105
+ } from 'bertui-vicons';
106
+
107
+ // Search icons by name/tags/categories
108
+ const results = searchIcons('arrow'); // Returns: ['ArrowRight', 'ArrowLeft', ...]
109
+
110
+ // Get by category (from Lucide metadata)
111
+ const devIcons = getIconsByCategory('development');
112
+ // Returns icons in: accessibility, account, animals, arrows, brands, buildings,
113
+ // charts, communication, connectivity, cursors, design, devices, development,
114
+ // editing, files, food-beverage, gaming, home, maps, media, multimedia, nature,
115
+ // notifications, photography, security, shapes, shopping, social, sports,
116
+ // text, time, tools, transportation, travel, weather, and more!
117
+
118
+ // Get by tag
119
+ const textIcons = getIconsByTag('formatting');
120
+
121
+ // Get all available options
122
+ const allIcons = getAllIcons(); // 1667 icons
123
+ const categories = getAllCategories(); // 43 categories
124
+ const tags = getAllTags(); // Hundreds of searchable tags
125
+ ```
126
+
127
+ ## API Reference
128
+
129
+ ### Icon Props
130
+
131
+ ```typescript
132
+ interface IconProps {
133
+ size?: number; // Default: 24
134
+ color?: string; // Default: 'currentColor'
135
+ strokeWidth?: number; // Default: 2
136
+ className?: string; // CSS class
137
+ style?: CSSProperties; // Inline styles
138
+ children?: string | number; // Text overlay
139
+ x?: number; // Text X position (default: beside icon)
140
+ y?: number; // Text Y position (default: centered)
141
+ fontSize?: number; // Text size (default: 12)
142
+ fontWeight?: number; // Text weight (default: 600)
143
+ textColor?: string; // Text color (default: same as icon)
144
+ }
145
+ ```
146
+
147
+ ### Utility Functions
148
+
149
+ ```typescript
150
+ // Search icons by name/tags/categories
151
+ searchIcons(query: string): string[]
152
+
153
+ // Get icons in a specific category
154
+ getIconsByCategory(category: string): string[]
155
+
156
+ // Get icons with a specific tag
157
+ getIconsByTag(tag: string): string[]
158
+
159
+ // Get metadata for an icon
160
+ getIconMetadata(iconName: string): {
161
+ keywords: string[];
162
+ categories: string[];
163
+ tags: string[];
164
+ } | null
165
+
166
+ // Get all available categories
167
+ getAllCategories(): string[]
168
+
169
+ // Get all available tags
170
+ getAllTags(): string[]
171
+
172
+ // Get all icon names
173
+ getAllIcons(): string[]
174
+ ```
175
+
176
+ ## Integration with BERTUI Framework
177
+
178
+ BERTUI VIcons is built specifically for the [BERTUI Framework](https://github.com/BunElysiaReact/BERTUI) and works seamlessly with:
179
+
180
+ - **Server Islands** - Icons render instantly in SSG mode
181
+ - **Client Components** - Zero hydration overhead
182
+ - **Build System** - No special configuration needed
183
+
184
+ ```jsx
185
+ // In any BERTUI page/component
186
+ import { Zap, Code, Rocket } from 'bertui-vicons';
187
+
188
+ export default function Home() {
189
+ return (
190
+ <div>
191
+ <h1><Rocket /> Built with BERTUI</h1>
192
+ <Zap>Fast</Zap>
193
+ <Code>Simple</Code>
194
+ </div>
195
+ );
196
+ }
197
+ ```
198
+
199
+ ## How It Works
200
+
201
+ 1. **Build Time**: Lucide SVGs + JSON metadata โ†’ Pre-rendered templates
202
+ 2. **Distribution**: Optimized SVG strings (no parsing needed)
203
+ 3. **Runtime**: Fast string replacement + React rendering
204
+ 4. **Result**: Works everywhere, zero platform issues
205
+
206
+ ## Platform Support
207
+
208
+ | Platform | Status | Notes |
209
+ |----------|--------|-------|
210
+ | Vercel | โœ… | Works perfectly |
211
+ | Cloudflare Pages | โœ… | Works perfectly |
212
+ | Netlify | โœ… | Works perfectly |
213
+ | Local Dev | โœ… | Works perfectly |
214
+ | Any Node.js | โœ… | Works perfectly |
215
+
216
+ ## Statistics
217
+
218
+ - **Total Icons**: 1667
219
+ - **Categories**: 43 (from Lucide metadata)
220
+ - **Tags**: Hundreds of searchable tags
221
+ - **Bundle Size**: ~2.6MB (pre-optimized, tree-shakeable)
222
+ - **Load Time**: Instant (pre-compiled)
223
+
224
+ ## Development
225
+
226
+ ```bash
227
+ # Clone the repo
228
+ git clone https://github.com/BunElysiaReact/bertui-vicons.git
229
+
230
+ # Install dependencies
231
+ bun install
232
+
233
+ # Build icons from /icons folder
234
+ bun run build
235
+
236
+ # Test all import patterns
237
+ bun run test-usage.jsx
238
+ ```
239
+
240
+ ## Project Structure
241
+
242
+ ```
243
+ bertui-vicons/
244
+ โ”œโ”€โ”€ icons/ # Source Lucide SVGs + JSON metadata
245
+ โ”œโ”€โ”€ build-icons.js # Bun-powered build script
246
+ โ”œโ”€โ”€ generated/ # Auto-generated (gitignored)
247
+ โ”‚ โ”œโ”€โ”€ index.js # Main export with all components
248
+ โ”‚ โ”œโ”€โ”€ index.d.ts # TypeScript definitions
249
+ โ”‚ โ”œโ”€โ”€ svg-templates.json # Icon templates + metadata
250
+ โ”‚ โ””โ”€โ”€ search-index.json # Search/category/tag index
251
+ โ”œโ”€โ”€ test-usage.jsx # Test file
252
+ โ””โ”€โ”€ package.json
253
+ ```
254
+
255
+ ## Comparison
256
+
257
+ | Feature | bertui-vicons | lucide-react | react-icons |
258
+ |---------|---------------|--------------|-------------|
259
+ | Bundle Size | Minimal | Large | Very Large |
260
+ | Performance | โšกโšกโšก | โšก | โšก |
261
+ | Text Overlays | โœ… | โŒ | โŒ |
262
+ | Wildcard Imports | โœ… Safe | โš ๏ธ Bloat | โš ๏ธ Bloat |
263
+ | Metadata Search | โœ… Tags + Categories | โŒ | โŒ |
264
+ | Vercel Deploy | โœ… | โœ… | โœ… |
265
+ | Platform Issues | โŒ None | โœ… | โœ… |
266
+ | Icon Count | 1667 | 1667 | 40,000+ |
267
+
268
+ ## Migration from Lucide
269
+
270
+ ```jsx
271
+ // Before (lucide-react)
272
+ import { ArrowRight, Heart } from 'lucide-react';
273
+
274
+ // After (bertui-vicons) - SAME API!
275
+ import { ArrowRight, Heart } from 'bertui-vicons';
276
+
277
+ // Bonus: Now you can add text overlays!
278
+ <ArrowRight>Next</ArrowRight>
279
+
280
+ // Bonus: Smart search with metadata!
281
+ searchIcons('formatting') // finds all text formatting icons
282
+ getIconsByCategory('development') // all dev-related icons
283
+ ```
284
+
285
+ ## Available Categories
286
+
287
+ ```
288
+ accessibility, account, animals, arrows, brands, buildings, charts,
289
+ communication, connectivity, cursors, design, devices, development,
290
+ editing, files, food-beverage, gaming, home, maps, media, multimedia,
291
+ nature, notifications, photography, security, shapes, shopping, social,
292
+ sports, text, time, tools, transportation, travel, weather, and more!
293
+ ```
294
+
295
+ ## License
296
+
297
+ MIT
298
+
299
+ ## Credits
300
+
301
+ - Icons from [Lucide](https://lucide.dev/)
302
+ - Metadata from Lucide JSON files
303
+ - Built for [BERTUI Framework](https://github.com/BunElysiaReact/BERTUI)
304
+ - Made with โšก by the BERTUI team
305
+
306
+ ---
307
+
308
+ **Need help?** Check out the [BERTUI Docs](https://bertui-docswebsite.vercel.app/) or join our [Discord](https://discord.gg/kvbXfkJG)