@metacells/mcellui-cli 0.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 +197 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2529 -0
- package/package.json +65 -0
package/README.md
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# @nativeui/cli
|
|
2
|
+
|
|
3
|
+
CLI for adding beautifully designed, accessible UI components to your Expo and React Native projects.
|
|
4
|
+
|
|
5
|
+
**Copy-paste components. You own the code.**
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @nativeui/cli init
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or install globally:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @nativeui/cli
|
|
17
|
+
nativeui init
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
1. **Initialize your project:**
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @nativeui/cli init
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This creates a `nativeui.config.ts` with your theme preferences.
|
|
29
|
+
|
|
30
|
+
2. **Add components:**
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx @nativeui/cli add button
|
|
34
|
+
npx @nativeui/cli add card input badge
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
3. **Use in your app:**
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import { Button } from '@/components/ui/button';
|
|
41
|
+
|
|
42
|
+
export function MyScreen() {
|
|
43
|
+
return (
|
|
44
|
+
<Button onPress={() => console.log('Pressed!')}>
|
|
45
|
+
Get Started
|
|
46
|
+
</Button>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Commands
|
|
52
|
+
|
|
53
|
+
### `init`
|
|
54
|
+
|
|
55
|
+
Initialize nativeui in your project.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npx @nativeui/cli init
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Creates `nativeui.config.ts` with theme configuration.
|
|
62
|
+
|
|
63
|
+
### `add <components...>`
|
|
64
|
+
|
|
65
|
+
Add one or more components to your project.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npx @nativeui/cli add button
|
|
69
|
+
npx @nativeui/cli add card input badge avatar
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### `list`
|
|
73
|
+
|
|
74
|
+
List all available components.
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npx @nativeui/cli list
|
|
78
|
+
npx @nativeui/cli list --category="Inputs"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### `pick`
|
|
82
|
+
|
|
83
|
+
Interactive component picker with categories.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npx @nativeui/cli pick
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### `diff`
|
|
90
|
+
|
|
91
|
+
Show available updates for installed components.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
npx @nativeui/cli diff
|
|
95
|
+
npx @nativeui/cli diff button
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### `update`
|
|
99
|
+
|
|
100
|
+
Update installed components to latest version.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npx @nativeui/cli update button
|
|
104
|
+
npx @nativeui/cli update --all
|
|
105
|
+
npx @nativeui/cli update --all --dry-run
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### `doctor`
|
|
109
|
+
|
|
110
|
+
Check project setup and diagnose issues.
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npx @nativeui/cli doctor
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### `create`
|
|
117
|
+
|
|
118
|
+
Scaffold a new custom component.
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npx @nativeui/cli create my-component
|
|
122
|
+
npx @nativeui/cli create my-button --template=pressable
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Templates: `basic`, `animated`, `pressable`, `input`
|
|
126
|
+
|
|
127
|
+
## Configuration
|
|
128
|
+
|
|
129
|
+
`nativeui.config.ts`:
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
import { defineConfig } from '@nativeui/cli';
|
|
133
|
+
|
|
134
|
+
export default defineConfig({
|
|
135
|
+
// Theme preset: zinc, slate, stone, blue, green, rose, orange, violet
|
|
136
|
+
theme: 'violet',
|
|
137
|
+
|
|
138
|
+
// Border radius: none, sm, md, lg, full
|
|
139
|
+
radius: 'md',
|
|
140
|
+
|
|
141
|
+
// Color scheme: light, dark, system
|
|
142
|
+
colorScheme: 'system',
|
|
143
|
+
|
|
144
|
+
// Output directory for components
|
|
145
|
+
componentsDir: './components/ui',
|
|
146
|
+
});
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Available Components
|
|
150
|
+
|
|
151
|
+
### Inputs & Forms (13)
|
|
152
|
+
Button, Input, Textarea, Checkbox, Switch, Radio Group, Select, Slider, Stepper, Label, Search Input, DateTime Picker, Form
|
|
153
|
+
|
|
154
|
+
### Data Display (9)
|
|
155
|
+
Card, Badge, Avatar, Avatar Stack, Skeleton, Progress, Rating, Image, Stories
|
|
156
|
+
|
|
157
|
+
### Overlays & Feedback (6)
|
|
158
|
+
Dialog, Sheet, Toast, Alert Dialog, Action Sheet, Tooltip
|
|
159
|
+
|
|
160
|
+
### Navigation (3)
|
|
161
|
+
Tabs, Accordion, Segmented Control
|
|
162
|
+
|
|
163
|
+
### Mobile Patterns (2)
|
|
164
|
+
Pull to Refresh, Swipeable Row
|
|
165
|
+
|
|
166
|
+
### Layout (7)
|
|
167
|
+
Separator, Spinner, List, Horizontal List, Section Header, Chip, FAB
|
|
168
|
+
|
|
169
|
+
### Media (2)
|
|
170
|
+
Carousel, Image Gallery
|
|
171
|
+
|
|
172
|
+
## Blocks
|
|
173
|
+
|
|
174
|
+
Pre-built screen sections:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
npx @nativeui/cli add login-block
|
|
178
|
+
npx @nativeui/cli add profile-block settings-list-block
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Available: `login-block`, `signup-block`, `profile-block`, `settings-list-block`, `empty-state-block`, `error-state-block`, and more.
|
|
182
|
+
|
|
183
|
+
## Requirements
|
|
184
|
+
|
|
185
|
+
- Node.js 18+
|
|
186
|
+
- Expo SDK 54+ or React Native 0.76+
|
|
187
|
+
- TypeScript recommended
|
|
188
|
+
|
|
189
|
+
## Links
|
|
190
|
+
|
|
191
|
+
- [Documentation](https://mcellui.dev/docs)
|
|
192
|
+
- [Components](https://mcellui.dev/docs/components)
|
|
193
|
+
- [GitHub](https://github.com/metacells/nativeui)
|
|
194
|
+
|
|
195
|
+
## License
|
|
196
|
+
|
|
197
|
+
MIT
|
package/dist/index.d.ts
ADDED