ui8kit 1.0.5 → 1.1.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 +80 -149
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1896 -0
- package/dist/index.js.map +1 -0
- package/package.json +53 -16
- package/css/dist/styles.css +0 -3325
- package/css/src/semantic/alert.css +0 -11
- package/css/src/semantic/article.css +0 -59
- package/css/src/semantic/avatar.css +0 -11
- package/css/src/semantic/badge.css +0 -19
- package/css/src/semantic/breadcrumb.css +0 -23
- package/css/src/semantic/button.css +0 -39
- package/css/src/semantic/card.css +0 -43
- package/css/src/semantic/index.css +0 -19
- package/css/src/semantic/input.css +0 -3
- package/css/src/semantic/label.css +0 -3
- package/css/src/semantic/link.css +0 -39
- package/css/src/semantic/main.css +0 -3
- package/css/src/semantic/markup.css +0 -23
- package/css/src/semantic/nav.css +0 -63
- package/css/src/semantic/pagination.css +0 -11
- package/css/src/semantic/section.css +0 -43
- package/css/src/semantic/sheet.css +0 -35
- package/css/src/semantic/skeleton.css +0 -3
- package/css/src/semantic/table.css +0 -31
- package/css/src/semantic/textarea.css +0 -3
- package/r/components/article.json +0 -17
- package/r/components/aside.json +0 -17
- package/r/components/footer.json +0 -17
- package/r/components/header.json +0 -17
- package/r/components/main.json +0 -17
- package/r/components/markup.json +0 -17
- package/r/components/media.json +0 -17
- package/r/components/nav.json +0 -18
- package/r/components/navbar.json +0 -15
- package/r/components/section.json +0 -17
- package/r/components/sheet.json +0 -18
- package/r/index.json +0 -135
- package/r/lib/utils.json +0 -18
- package/r/ui/alert.json +0 -18
- package/r/ui/avatar.json +0 -17
- package/r/ui/badge.json +0 -19
- package/r/ui/breadcrumb.json +0 -19
- package/r/ui/button.json +0 -19
- package/r/ui/card.json +0 -17
- package/r/ui/input.json +0 -17
- package/r/ui/label.json +0 -17
- package/r/ui/link.json +0 -18
- package/r/ui/skeleton.json +0 -15
- package/r/ui/table.json +0 -17
- package/r/ui/textarea.json +0 -17
package/README.md
CHANGED
|
@@ -1,194 +1,125 @@
|
|
|
1
|
-
|
|
1
|
+
# ui8kit CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Official CLI for bootstrapping and managing UI8Kit component workflows in Vite React projects.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Node.js `>=18`
|
|
8
|
+
- A Vite React project (for `init` and `add`)
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
6
11
|
|
|
7
|
-
#### 1. Initialize Base Registry (Required)
|
|
8
12
|
```bash
|
|
9
|
-
|
|
10
|
-
npx buildy-ui@latest init
|
|
13
|
+
bunx ui8kit@latest init
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
# Initialize semantic registry
|
|
16
|
-
npx buildy-ui@latest init --registry semantic
|
|
16
|
+
Initialize with defaults (non-interactive):
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
```bash
|
|
19
|
+
bunx ui8kit@latest init --yes
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
# Add specific semantic components
|
|
25
|
-
npx buildy-ui@latest add button card --registry semantic
|
|
26
|
-
npx buildy-ui@latest add input --registry semantic
|
|
22
|
+
## Commands
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
npx buildy-ui@latest add --all --registry semantic
|
|
24
|
+
### `init`
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
npx buildy-ui@latest add --all --dry-run --registry semantic
|
|
26
|
+
Initialize UI8Kit structure and config in the current project.
|
|
33
27
|
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
```bash
|
|
29
|
+
bunx ui8kit@latest init
|
|
30
|
+
bunx ui8kit@latest init --yes
|
|
31
|
+
bunx ui8kit@latest init --registry ui
|
|
36
32
|
```
|
|
37
33
|
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
semantic/
|
|
41
|
-
├── ui/ # Semantic UI components
|
|
42
|
-
├── blocks/ # Semantic blocks
|
|
43
|
-
├── components/ # Semantic components
|
|
44
|
-
├── templates/ # Semantic templates
|
|
45
|
-
└── buildy.config.json
|
|
46
|
-
|
|
47
|
-
utility/ # Base registry (required)
|
|
48
|
-
├── ui/
|
|
49
|
-
├── blocks/
|
|
50
|
-
└── buildy.config.json
|
|
51
|
-
|
|
52
|
-
lib/ # Shared utilities
|
|
53
|
-
└── utils.ts
|
|
54
|
-
```
|
|
34
|
+
Options:
|
|
55
35
|
|
|
56
|
-
|
|
36
|
+
- `-y, --yes` Skip prompts and use defaults
|
|
37
|
+
- `-r, --registry <type>` Registry type (default: `ui`)
|
|
57
38
|
|
|
58
|
-
###
|
|
39
|
+
### `add`
|
|
59
40
|
|
|
60
|
-
|
|
41
|
+
Install one or more components from the registry.
|
|
61
42
|
|
|
62
43
|
```bash
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
# or
|
|
70
|
-
bun add ui8kit@latest
|
|
44
|
+
bunx ui8kit@latest add button
|
|
45
|
+
bunx ui8kit@latest add button card
|
|
46
|
+
bunx ui8kit@latest add --all
|
|
47
|
+
bunx ui8kit@latest add badge --force
|
|
48
|
+
bunx ui8kit@latest add button --dry-run
|
|
49
|
+
bunx ui8kit@latest add --all --retry
|
|
71
50
|
```
|
|
72
51
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
```css
|
|
76
|
-
/* Import all semantic styles */
|
|
77
|
-
@import "ui8kit/css/dist/semantic/index.css";
|
|
52
|
+
Options:
|
|
78
53
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
### Why Package Installation is Required
|
|
54
|
+
- `-a, --all` Install all available components
|
|
55
|
+
- `-f, --force` Overwrite existing files
|
|
56
|
+
- `-r, --registry <type>` Registry type (default: `ui`)
|
|
57
|
+
- `--dry-run` Show planned actions without writing files
|
|
58
|
+
- `--retry` Enable retry logic for unstable connections
|
|
86
59
|
|
|
87
|
-
|
|
60
|
+
### `scan`
|
|
88
61
|
|
|
89
|
-
|
|
90
|
-
/* Example from button.css */
|
|
91
|
-
.button-default {
|
|
92
|
-
@apply bg-primary text-primary-foreground shadow-xs hover:bg-primary/90;
|
|
93
|
-
}
|
|
62
|
+
Scan source files and generate a registry manifest.
|
|
94
63
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
64
|
+
```bash
|
|
65
|
+
bunx ui8kit@latest scan
|
|
66
|
+
bunx ui8kit@latest scan --cwd ./apps/engine
|
|
67
|
+
bunx ui8kit@latest scan --source ./src --output ./src/registry.json
|
|
98
68
|
```
|
|
99
69
|
|
|
100
|
-
|
|
70
|
+
Options:
|
|
101
71
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
72
|
+
- `-r, --registry <type|path>` Registry type/path (default: `ui`)
|
|
73
|
+
- `-o, --output <file>` Output registry file
|
|
74
|
+
- `-s, --source <dir>` Source directory to scan
|
|
75
|
+
- `--cwd <dir>` Working directory
|
|
106
76
|
|
|
107
|
-
###
|
|
77
|
+
### `build`
|
|
108
78
|
|
|
109
|
-
|
|
79
|
+
Build a publishable registry from a registry JSON file.
|
|
110
80
|
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"./src/**/*.{js,ts,jsx,tsx}",
|
|
116
|
-
"./node_modules/ui8kit/**/*.{js,ts,jsx,tsx}", // Add this line
|
|
117
|
-
],
|
|
118
|
-
// ... rest of your config
|
|
119
|
-
}
|
|
81
|
+
```bash
|
|
82
|
+
bunx ui8kit@latest build
|
|
83
|
+
bunx ui8kit@latest build ./src/registry.json
|
|
84
|
+
bunx ui8kit@latest build ./src/registry.json --output ./packages/registry/r
|
|
120
85
|
```
|
|
121
86
|
|
|
122
|
-
|
|
87
|
+
Options:
|
|
123
88
|
|
|
124
|
-
|
|
89
|
+
- `[registry]` Path to registry JSON (default: `./src/registry.json`)
|
|
90
|
+
- `-o, --output <path>` Output directory (default: `./packages/registry/r`)
|
|
91
|
+
- `-c, --cwd <cwd>` Working directory
|
|
125
92
|
|
|
126
|
-
|
|
93
|
+
## Typical Flow
|
|
127
94
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ui8kit@latest/css/dist/styles.css">
|
|
132
|
-
<!-- OR -->
|
|
133
|
-
<link rel="stylesheet" href="https://unpkg.com/ui8kit@latest/css/dist/styles.css">
|
|
134
|
-
```
|
|
95
|
+
```bash
|
|
96
|
+
# 1) Initialize project
|
|
97
|
+
bunx ui8kit@latest init --yes
|
|
135
98
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
#### With CLI Installation
|
|
139
|
-
```jsx
|
|
140
|
-
// After CLI installation, components are available via aliases
|
|
141
|
-
import { Button } from '@/semantic/ui/button'
|
|
142
|
-
import { Card } from '@/semantic/ui/card'
|
|
143
|
-
|
|
144
|
-
function App() {
|
|
145
|
-
return (
|
|
146
|
-
<Card>
|
|
147
|
-
<Button variant="secondary">Semantic Button</Button>
|
|
148
|
-
</Card>
|
|
149
|
-
)
|
|
150
|
-
}
|
|
151
|
-
```
|
|
99
|
+
# 2) Add a component
|
|
100
|
+
bunx ui8kit@latest add button
|
|
152
101
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
<!DOCTYPE html>
|
|
156
|
-
<html>
|
|
157
|
-
<head>
|
|
158
|
-
<!-- Load compiled semantic styles -->
|
|
159
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ui8kit@latest/css/dist/styles.css">
|
|
160
|
-
</head>
|
|
161
|
-
<body>
|
|
162
|
-
<!-- Use semantic classes directly -->
|
|
163
|
-
<div class="card">
|
|
164
|
-
<button class="button button-secondary button-lg">
|
|
165
|
-
Semantic Button
|
|
166
|
-
</button>
|
|
167
|
-
</div>
|
|
168
|
-
</body>
|
|
169
|
-
</html>
|
|
102
|
+
# 3) Add everything from registry (optional)
|
|
103
|
+
bunx ui8kit@latest add --all
|
|
170
104
|
```
|
|
171
105
|
|
|
172
|
-
|
|
106
|
+
## Local Development (this package)
|
|
173
107
|
|
|
174
|
-
|
|
175
|
-
- ✅ Utility registry must be initialized first
|
|
176
|
-
- ✅ Components must exist in utility before installing in semantic
|
|
177
|
-
- ❌ Cannot use semantic registry without utility base
|
|
108
|
+
From `packages/cli`:
|
|
178
109
|
|
|
179
|
-
|
|
110
|
+
```bash
|
|
111
|
+
npm install
|
|
112
|
+
npm run dev
|
|
113
|
+
```
|
|
180
114
|
|
|
181
|
-
|
|
182
|
-
- ✅ Tree-shaking friendly
|
|
183
|
-
- ✅ Only includes used components
|
|
184
|
-
- ✅ TypeScript support
|
|
185
|
-
- ✅ Local development workflow
|
|
115
|
+
Build once:
|
|
186
116
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
- ⚠️ Full bundle may include unused styles
|
|
117
|
+
```bash
|
|
118
|
+
npm run build
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Run compiled CLI locally:
|
|
193
122
|
|
|
194
|
-
|
|
123
|
+
```bash
|
|
124
|
+
node dist/index.js --help
|
|
125
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|