bertui-icons 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,169 @@
1
+ # ๐Ÿš€ BERTUI Icons
2
+
3
+ **The world's fastest icon library.** Powered by Zig + Bun FFI.
4
+
5
+ Lucide-compatible API with revolutionary text overlay support and unlimited imports without bundle bloat.
6
+
7
+ ## Features
8
+
9
+ - โšก **Zig-Transpiled Performance**: Icons pre-compiled to optimized Zig code
10
+ - ๐ŸŽจ **Text Overlays**: Add dynamic text/numbers inside any icon
11
+ - ๐Ÿ“ฆ **Zero Bundle Bloat**: Import unlimited icons without size worries
12
+ - ๐Ÿ”„ **Lucide Compatible**: Drop-in replacement for lucide-react
13
+ - ๐ŸŽฏ **Type-Safe**: Full TypeScript support
14
+ - ๐Ÿ”ฅ **Bun FFI**: Lightning-fast runtime rendering
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ bun add bertui-icons
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ ### Basic Usage (Lucide-Compatible)
25
+
26
+ ```jsx
27
+ import { ArrowRight, Home, Heart } from 'bertui-icons';
28
+
29
+ function App() {
30
+ return (
31
+ <div>
32
+ <ArrowRight />
33
+ <Home size={32} color="blue" />
34
+ </div>
35
+ );
36
+ }
37
+ ```
38
+
39
+ ### Text Overlays (Revolutionary!)
40
+
41
+ ```jsx
42
+ import { ArrowRight, Home, Bell } from 'bertui-icons';
43
+
44
+ function App() {
45
+ return (
46
+ <div>
47
+ {/* Number badge */}
48
+ <Bell>5</Bell>
49
+
50
+ {/* Text label */}
51
+ <ArrowRight>Next</ArrowRight>
52
+
53
+ {/* Custom positioning */}
54
+ <Home x={30} y={15} fontSize={14}>Home</Home>
55
+ </div>
56
+ );
57
+ }
58
+ ```
59
+
60
+ ### Unlimited Imports
61
+
62
+ ```jsx
63
+ // Import everything without worrying about bundle size!
64
+ import * as Icons from 'bertui-icons';
65
+
66
+ function IconGallery() {
67
+ return Object.keys(Icons).map(name => {
68
+ const Icon = Icons[name];
69
+ return <Icon key={name} />;
70
+ });
71
+ }
72
+ ```
73
+
74
+ ### Dynamic Icons
75
+
76
+ ```jsx
77
+ import { Icon } from 'bertui-icons';
78
+
79
+ function DynamicIcon({ iconName, label }) {
80
+ return <Icon name={iconName}>{label}</Icon>;
81
+ }
82
+ ```
83
+
84
+ ## API
85
+
86
+ ### Icon Props
87
+
88
+ ```typescript
89
+ interface IconProps {
90
+ size?: number; // Default: 24
91
+ color?: string; // Default: 'currentColor'
92
+ strokeWidth?: number; // Default: 2
93
+ className?: string; // CSS class
94
+ children?: string | number; // Text overlay
95
+ x?: number; // Text X position (default: beside icon)
96
+ y?: number; // Text Y position (default: centered)
97
+ fontSize?: number; // Text size (default: 12)
98
+ }
99
+ ```
100
+
101
+ ### All Available Icons
102
+
103
+ Based on Lucide icon set. See [Lucide Icons](https://lucide.dev/icons/) for complete list.
104
+
105
+ ## How It Works
106
+
107
+ 1. **Build Time**: Lucide SVGs โ†’ Zig-transpiled code via `build-icons.js`
108
+ 2. **Distribution**: Users get pre-optimized Zig binaries (no raw SVGs)
109
+ 3. **Runtime**: Bun FFI calls Zig for ultra-fast rendering
110
+ 4. **Result**: Blazing performance + innovative features
111
+
112
+ ## Development
113
+
114
+ ```bash
115
+ # Install dependencies
116
+ bun install
117
+
118
+ # Build icons from /icons folder
119
+ bun run build:icons
120
+
121
+ # Compile Zig library
122
+ bun run build:zig
123
+
124
+ # Full build
125
+ bun run build
126
+
127
+ # Test
128
+ bun test
129
+ ```
130
+
131
+ ## Project Structure
132
+
133
+ ```
134
+ bertui-icons/
135
+ โ”œโ”€โ”€ icons/ # Source Lucide SVGs
136
+ โ”œโ”€โ”€ icon_renderer.zig # Core Zig renderer
137
+ โ”œโ”€โ”€ build-icons.js # SVG โ†’ Zig transpiler
138
+ โ”œโ”€โ”€ build.zig # Zig build config
139
+ โ”œโ”€โ”€ react-wrapper.jsx # React components
140
+ โ”œโ”€โ”€ generated/ # Auto-generated files
141
+ โ”‚ โ”œโ”€โ”€ icons_generated.zig
142
+ โ”‚ โ”œโ”€โ”€ index.js
143
+ โ”‚ โ””โ”€โ”€ index.d.ts
144
+ โ””โ”€โ”€ libicons.* # Compiled Zig library
145
+ ```
146
+
147
+ ## Comparison
148
+
149
+ | Feature | bertui-icons | lucide-react | react-icons |
150
+ |---------|--------------|--------------|-------------|
151
+ | Bundle Size | Minimal | Large | Very Large |
152
+ | Performance | โšกโšกโšก | โšก | โšก |
153
+ | Text Overlays | โœ… | โŒ | โŒ |
154
+ | Unlimited Imports | โœ… | โš ๏ธ | โš ๏ธ |
155
+ | Tech Stack | Zig + Bun | JavaScript | JavaScript |
156
+
157
+ ## License
158
+
159
+ MIT
160
+
161
+ ## Credits
162
+
163
+ - Icons from [Lucide](https://lucide.dev/)
164
+ - Built with [Zig](https://ziglang.org/) + [Bun](https://bun.sh/)
165
+ - Part of the [BERTUI](https://github.com/BunElysiaReact/BERTUI) family
166
+
167
+ ---
168
+
169
+ Made with โšก by the BERTUI team# bertui-icons