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 +169 -0
- package/generated/icons_generated.zig +17284 -0
- package/generated/index.js +3423 -0
- package/generated/search-index.json +34372 -0
- package/generated/server.js +3432 -0
- package/generated/svg-templates.json +1669 -0
- package/package.json +54 -0
- package/react-wrapper.jsx +99 -0
- package/zig-out/lib/libicons.so +0 -0
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
|