@wireservers-ui/react-natives 1.0.1-rc3 → 1.0.1
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 +102 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,40 +34,122 @@ React-Natives is a collection of 70+ production-ready, accessible React Native c
|
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
-
## Quick Start
|
|
37
|
+
## Quick Start (Easy Setup)
|
|
38
38
|
|
|
39
|
-
###
|
|
39
|
+
### Option A: Fully Automated Setup (Recommended)
|
|
40
|
+
|
|
41
|
+
Use this when starting a new Expo consumer app for the first time.
|
|
40
42
|
|
|
41
43
|
```bash
|
|
42
|
-
|
|
44
|
+
npx create-expo-app@latest wsui-init --template blank-typescript
|
|
45
|
+
cd wsui-init
|
|
46
|
+
npm install @wireservers-ui/react-natives@1.0.1
|
|
47
|
+
npx @wireservers-ui/react-natives@1.0.1 init
|
|
48
|
+
npx expo start --clear --web
|
|
43
49
|
```
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
The `init` command will:
|
|
52
|
+
|
|
53
|
+
- Install required runtime styling packages
|
|
54
|
+
- Match `react-dom` to your installed `react` version exactly (prevents React/DOM mismatch)
|
|
55
|
+
- Create config files only when missing
|
|
56
|
+
- Never overwrite existing app/config files in your project
|
|
57
|
+
- Generate a working volume-slider demo in `App.tsx` only if `App.tsx` does not already exist
|
|
58
|
+
|
|
59
|
+
### Option B: Manual Setup
|
|
60
|
+
|
|
61
|
+
If you prefer full manual control:
|
|
46
62
|
|
|
47
63
|
```bash
|
|
48
|
-
npm install
|
|
64
|
+
npm install @wireservers-ui/react-natives
|
|
65
|
+
npm install nativewind tailwindcss tailwind-variants tailwind-merge react-native-reanimated react-native-worklets react-native-svg react-native-web react-dom
|
|
49
66
|
```
|
|
50
67
|
|
|
51
|
-
|
|
68
|
+
Then configure Tailwind, Babel, Metro, and theme CSS yourself.
|
|
52
69
|
|
|
53
|
-
|
|
70
|
+
---
|
|
54
71
|
|
|
55
|
-
|
|
72
|
+
## Setup Changes (What, How, Why)
|
|
56
73
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
This section documents the major setup hardening changes made to ensure reliable first-time consumer setup.
|
|
75
|
+
|
|
76
|
+
### 1. Added CLI init bootstrap command
|
|
77
|
+
|
|
78
|
+
- What changed:
|
|
79
|
+
Added `bin/cli.js` and package `bin` mapping so consumers can run `npx @wireservers-ui/react-natives init`.
|
|
80
|
+
- How:
|
|
81
|
+
The CLI writes Tailwind, Babel, Metro, and theme files and installs missing runtime dependencies.
|
|
82
|
+
- Why:
|
|
83
|
+
Consumer setup was too error-prone and required manual multi-file configuration.
|
|
84
|
+
|
|
85
|
+
### 2. Fixed Babel NativeWind wiring
|
|
86
|
+
|
|
87
|
+
- What changed:
|
|
88
|
+
`nativewind/babel` is now configured in `presets` (not `plugins`).
|
|
89
|
+
- How:
|
|
90
|
+
The generated `babel.config.js` uses:
|
|
91
|
+
`presets: [["babel-preset-expo", { jsxImportSource: "nativewind" }], "nativewind/babel"]`.
|
|
92
|
+
- Why:
|
|
93
|
+
Wrong placement caused Babel runtime errors and failed bundling.
|
|
94
|
+
|
|
95
|
+
### 3. Added missing runtime dependencies for modern Expo stack
|
|
67
96
|
|
|
68
|
-
|
|
97
|
+
- What changed:
|
|
98
|
+
Init installs `react-native-worklets`, `react-native-svg`, `tailwind-merge`, and web deps.
|
|
99
|
+
- How:
|
|
100
|
+
Dependency install list in the CLI now includes all required packages for both native and web usage.
|
|
101
|
+
- Why:
|
|
102
|
+
Missing deps caused runtime/bundling failures (`react-native-worklets/plugin`, SVG resolution, variant merge errors).
|
|
103
|
+
|
|
104
|
+
### 4. React + React DOM version lockstep
|
|
105
|
+
|
|
106
|
+
- What changed:
|
|
107
|
+
Init now reads the installed `react` version from consumer `node_modules` and installs `react-dom@<exact-react-version>`.
|
|
108
|
+
- How:
|
|
109
|
+
CLI helper resolves `node_modules/react/package.json` and builds a matching `react-dom` install target.
|
|
110
|
+
- Why:
|
|
111
|
+
React web requires exact version parity; mismatch causes immediate runtime failure.
|
|
112
|
+
|
|
113
|
+
### 5. Tailwind content scanning extended for package source
|
|
114
|
+
|
|
115
|
+
- What changed:
|
|
116
|
+
Generated `tailwind.config.js` now includes:
|
|
117
|
+
`./node_modules/@wireservers-ui/react-natives/src/**/*.{js,jsx,ts,tsx}`
|
|
118
|
+
- How:
|
|
119
|
+
The content path is emitted by init when creating Tailwind config.
|
|
120
|
+
- Why:
|
|
121
|
+
Without this, many library utility classes are not generated in consumer CSS, causing missing colors and broken visual behavior.
|
|
122
|
+
|
|
123
|
+
### 6. pnpm compatibility for Metro
|
|
124
|
+
|
|
125
|
+
- What changed:
|
|
126
|
+
Init creates/updates `.npmrc` with `node-linker=hoisted` when pnpm is detected, then reinstalls before package additions.
|
|
127
|
+
- How:
|
|
128
|
+
CLI detects lockfile, applies hoisted linker, and runs a reinstall pass.
|
|
129
|
+
- Why:
|
|
130
|
+
Default pnpm linking can break Metro module resolution in Expo projects.
|
|
131
|
+
|
|
132
|
+
### 7. Non-destructive init behavior
|
|
133
|
+
|
|
134
|
+
- What changed:
|
|
135
|
+
Init no longer overwrites existing project files.
|
|
136
|
+
- How:
|
|
137
|
+
All file writes now follow create-if-missing semantics and print a skip message for existing files.
|
|
138
|
+
- Why:
|
|
139
|
+
Consumers must keep control of their app and config files; setup tooling should be safe by default.
|
|
140
|
+
|
|
141
|
+
### 8. Published iterative release candidates
|
|
142
|
+
|
|
143
|
+
- What changed:
|
|
144
|
+
Setup fixes were shipped progressively and are now available in stable `1.0.1`.
|
|
145
|
+
- How:
|
|
146
|
+
Verified through clean consumer project runs (`create-expo-app -> install -> init -> expo start`).
|
|
147
|
+
- Why:
|
|
148
|
+
Each release isolated and validated one class of setup problems, reducing regression risk.
|
|
149
|
+
|
|
150
|
+
---
|
|
69
151
|
|
|
70
|
-
|
|
152
|
+
## Example Usage
|
|
71
153
|
|
|
72
154
|
```tsx
|
|
73
155
|
import { Button, ButtonText, Card, CardHeader, CardBody } from "@wireservers-ui/react-natives";
|
package/package.json
CHANGED