@rootnative/cli 0.0.0-alpha.0 → 0.0.0-alpha.10

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 CHANGED
@@ -1,3 +1,6 @@
1
+ <!-- Absolute URL: npm does not resolve repository-relative image paths. -->
2
+ <img src="https://raw.githubusercontent.com/rootnative/ui/main/assets/brand/rootnative-mark.png" alt="" width="88" height="88" />
3
+
1
4
  # rootnative
2
5
 
3
6
  CLI for adding [RootNative UI](https://github.com/rootnative/ui) components directly into your React Native or Expo project. Inspired by [shadcn/ui](https://ui.shadcn.com) — you own the code.
@@ -69,8 +72,11 @@ This will:
69
72
  2. Detect your package manager (npm, yarn, pnpm, bun)
70
73
  3. Detect path aliases from your `tsconfig.json`
71
74
  4. Prompt for component and utility output directories
72
- 5. Install `@rootnative/core`
73
- 6. Create an `rootnative.json` config file
75
+ 5. Create an `rootnative.json` config file
76
+ 6. Offer to add the LLM-docs pointer to your project's `CLAUDE.md`
77
+ 7. Offer to install `@rootnative/core`
78
+
79
+ Steps 6 and 7 are confirmation prompts; `-y` accepts both.
74
80
 
75
81
  Options:
76
82
 
@@ -98,7 +104,7 @@ Add one or more components to your project.
98
104
  ```bash
99
105
  npx rootnative add button
100
106
  npx rootnative add card chip text-field
101
- npx rootnative add appbar # auto-adds icon-button + typography dependencies
107
+ npx rootnative add appbar # auto-adds button + icon-button + typography dependencies
102
108
  ```
103
109
 
104
110
  Options:
@@ -111,7 +117,7 @@ Options:
111
117
 
112
118
  The `add` command:
113
119
 
114
- 1. Resolves the full dependency graph (e.g. `appbar` requires `icon-button` and `typography`)
120
+ 1. Resolves the full dependency graph (e.g. `appbar` requires `button`, `icon-button` and `typography`)
115
121
  2. Shows a plan of components, utilities, and npm packages to install
116
122
  3. Copies component files with import paths rewritten to match your project
117
123
  4. Generates a utility barrel file (`rootnative-utils.ts`)
@@ -161,6 +167,8 @@ The `upgrade` command:
161
167
  5. Upgrades `@rootnative/core` and installs any new required peer dependencies
162
168
  6. Reports optional peer deps that aren't installed (does not auto-install them)
163
169
  7. Lists peer deps that are no longer required so you can remove them manually
170
+ 8. Moves `registryVersion` in `rootnative.json` forward to the new release tag, so subsequent `add`/`update` calls fetch matching sources
171
+ 9. With `-a, --all`, also updates the installed component files
164
172
 
165
173
  Non-interactive mode for CI/automation:
166
174
 
@@ -190,7 +198,8 @@ Checks include:
190
198
  - `@rootnative/core` is installed
191
199
  - React Native version compatibility
192
200
  - Installed component file integrity
193
- - Peer dependencies (`react-native-safe-area-context`, `@expo/vector-icons`)
201
+ - `@rootnative/inertia` a hard failure when missing, since every animated component needs it
202
+ - Optional peer dependencies (`react-native-safe-area-context`, `@expo/vector-icons`) — reported as warnings
194
203
 
195
204
  ## Configuration
196
205
 
@@ -204,7 +213,7 @@ Checks include:
204
213
  "lib": "@/lib"
205
214
  },
206
215
  "registryUrl": "https://raw.githubusercontent.com/rootnative/ui",
207
- "registryVersion": "main"
216
+ "registryVersion": "v0.0.0-alpha.4"
208
217
  }
209
218
  ```
210
219
 
@@ -213,7 +222,7 @@ Checks include:
213
222
  | `aliases.components` | Where component directories are created |
214
223
  | `aliases.lib` | Where utility files are placed |
215
224
  | `registryUrl` | Base URL for fetching component source files |
216
- | `registryVersion` | Git ref to fetch from (branch, tag, or commit) |
225
+ | `registryVersion` | Git ref to fetch from (branch, tag, or commit). `init` pins this to the `v<version>` tag of the latest published release, falling back to `main` only when npm is unreachable or the tag isn't pushed yet. `upgrade` moves the pin forward |
217
226
 
218
227
  ## Output structure
219
228
 
@@ -228,28 +237,41 @@ src/
228
237
  types.ts
229
238
  styles.ts
230
239
  index.ts
240
+ elevationShadow.ts # shared internal, flattened per component
241
+ usePressMorph.ts
242
+ useStateLayer.ts
231
243
  icon-button/ # auto-added (appbar dependency)
232
244
  IconButton.tsx
233
245
  types.ts
234
246
  styles.ts
235
247
  index.ts
248
+ useBooleanProgress.ts
249
+ usePressMorph.ts
250
+ useStateLayer.ts
236
251
  typography/ # auto-added (appbar dependency)
237
252
  Typography.tsx
238
253
  types.ts
254
+ styles.ts
239
255
  index.ts
240
256
  appbar/
241
257
  AppBar.tsx
242
258
  types.ts
243
259
  styles.ts
244
260
  index.ts
261
+ safe-area.tsx
245
262
  lib/
246
263
  color.ts
247
264
  elevation.ts
248
- icon.ts
265
+ pressable.ts
266
+ render-icon.tsx
249
267
  rtl.ts
250
268
  rootnative-utils.ts # generated barrel
251
269
  ```
252
270
 
271
+ Shared internal hooks (`useStateLayer`, `usePressMorph`, …) are copied into
272
+ *each* component directory that uses them rather than into a shared folder, so
273
+ each installed component stays self-contained.
274
+
253
275
  ## Available components
254
276
 
255
277
  | Component | Description |
@@ -271,7 +293,16 @@ src/
271
293
  | `text-field` | Text input with animated floating label, 2 variants (filled, outlined) |
272
294
  | `layout` | Layout primitives: Box, Row, Column, Grid, and SafeAreaView wrapper |
273
295
  | `list` | List container with interactive items and dividers |
296
+ | `divider` | Horizontal or vertical 1dp rule with optional leading/trailing insets and thickness/color overrides. |
297
+ | `loading-indicator` | MD3 Expressive shape-morphing loading spinner (contained + uncontained, determinate + indeterminate) |
274
298
  | `portal` | Render children into a host elsewhere in the tree (overlays, dialogs, sheets) |
299
+ | `dialog` | Basic and full-screen modal dialogs with Icon / Title / Content / Actions slots, scrim, and Android back handling. |
300
+ | `snackbar` | Imperative snackbar queue — SnackbarProvider plus useSnackbar() with actions, durations, and safe-area aware placement. |
301
+ | `menu` | Anchored dropdown menu (Menu + Menu.Item) that flips and shifts to stay on screen, with self-managing or controlled visibility. |
302
+ | `tooltip` | Plain and rich tooltips anchored to a control, shown on hover or a long press |
303
+ | `bottom-sheet` | MD3 bottom sheet — modal (scrim) and standard variants, drag handle, velocity-based snap points, drag-to-dismiss. |
304
+ | `tabs` | Primary and secondary tab rows, fixed or scrollable, with a sliding active indicator |
305
+ | `navigation-bar` | MD3 navigation bar — 80dp bottom destination bar with an animated indicator pill |
275
306
  | `keyboard-avoiding-wrapper` | Zero-config keyboard-aware wrapper for form layouts |
276
307
 
277
308
  ## Import rewriting
@@ -305,6 +336,12 @@ export default function App() {
305
336
  }
306
337
  ```
307
338
 
339
+ ## Docs
340
+
341
+ Full docs: https://rootnative.github.io/ui/cli
342
+
343
+ LLM-optimized reference: https://rootnative.github.io/ui/llms-full.txt — or read `node_modules/@rootnative/cli/llms.txt` for the exact installed version.
344
+
308
345
  ## License
309
346
 
310
347
  MIT