@campxdev/react-native-blueprint 0.1.6 → 0.1.8

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
@@ -105,7 +105,9 @@ module.exports = {
105
105
  };
106
106
  ```
107
107
 
108
- ### 5. Configure Metro
108
+ ### 5. Configure Bundler (Metro or Re.Pack)
109
+
110
+ **Option A: Metro (Standard)**
109
111
 
110
112
  Update `metro.config.js`:
111
113
 
@@ -118,6 +120,36 @@ const config = getDefaultConfig(__dirname);
118
120
  module.exports = withNativeWind(config, { input: './global.css' });
119
121
  ```
120
122
 
123
+ **Option B: Re.Pack + Rspack (5x Faster - Used in Example App)**
124
+
125
+ The example app in this repository uses [Re.Pack 5](https://re-pack.dev) with Rspack for **5x faster builds**. See [MIGRATION_REPACK.md](MIGRATION_REPACK.md) for details.
126
+
127
+ If you want to use Re.Pack in your project:
128
+
129
+ 1. Install Re.Pack:
130
+ ```sh
131
+ npx @callstack/repack-init
132
+ ```
133
+
134
+ 2. Install NativeWind plugin:
135
+ ```sh
136
+ npm install @callstack/repack-plugin-nativewind
137
+ ```
138
+
139
+ 3. Update `rspack.config.js`:
140
+ ```js
141
+ import { NativeWindPlugin } from '@callstack/repack-plugin-nativewind';
142
+
143
+ export default (env) => ({
144
+ // ... other config
145
+ plugins: [
146
+ new NativeWindPlugin({
147
+ input: './global.css',
148
+ }),
149
+ ],
150
+ });
151
+ ```
152
+
121
153
  ## Usage
122
154
 
123
155
  ### Basic Example
@@ -241,15 +273,40 @@ function App() {
241
273
 
242
274
  ## Example App
243
275
 
244
- Check out the `/example` directory for a complete demo app showcasing all components:
276
+ Check out the `/example` directory for a complete demo app showcasing all components with **Storybook integration** and **Re.Pack + Rspack** for 5x faster builds.
277
+
278
+ ### Run Normal App Mode
279
+
280
+ ```sh
281
+ yarn example:app # From root (recommended)
282
+ # or
283
+ cd example
284
+ yarn app:ios # Run on iOS simulator
285
+ yarn app:android # Run on Android emulator
286
+ ```
287
+
288
+ ### Run Storybook Mode
289
+
290
+ The example app includes 16 interactive component stories using [Storybook for React Native](https://storybook.js.org/tutorials/intro-to-storybook/react-native/):
245
291
 
246
292
  ```sh
293
+ yarn example:storybook # From root (recommended)
294
+ # or
247
295
  cd example
248
- npm install
249
- npm run ios # Run on iOS simulator
250
- npm run android # Run on Android emulator
296
+ yarn storybook:ios # Run Storybook on iOS
297
+ yarn storybook:android # Run Storybook on Android
251
298
  ```
252
299
 
300
+ ### Build Performance
301
+
302
+ The example app uses **Re.Pack 5 + Rspack** instead of Metro for:
303
+ - ⚡ **5x faster cold builds**
304
+ - ⚡ **5x faster hot module reload (HMR)**
305
+ - 📦 **Zero package duplications**
306
+ - 🎨 **Full NativeWind support**
307
+
308
+ See [MIGRATION_REPACK.md](MIGRATION_REPACK.md) for complete migration details and architecture.
309
+
253
310
  ## TypeScript Support
254
311
 
255
312
  All components are fully typed with TypeScript. Import types as needed:
@@ -347,10 +404,19 @@ Contributions are welcome! Please follow these steps:
347
404
  ```
348
405
 
349
406
  2. Run the example app:
407
+
408
+ **Normal App Mode:**
350
409
  ```sh
351
- yarn example ios
352
- # or
353
- yarn example android
410
+ yarn example:app # Start dev server
411
+ cd example && yarn app:ios # Or run on iOS
412
+ cd example && yarn app:android # Or run on Android
413
+ ```
414
+
415
+ **Storybook Mode (Component Library):**
416
+ ```sh
417
+ yarn example:storybook # Start Storybook
418
+ cd example && yarn storybook:ios # Or run on iOS
419
+ cd example && yarn storybook:android # Or run on Android
354
420
  ```
355
421
 
356
422
  3. Make your changes in `/src`
@@ -366,6 +432,14 @@ Contributions are welcome! Please follow these steps:
366
432
  yarn prepare
367
433
  ```
368
434
 
435
+ ### Example App Tech Stack
436
+
437
+ The example app showcases modern React Native development with:
438
+ - **Re.Pack 5 + Rspack** - 5x faster than Metro bundler
439
+ - **Storybook React Native** - Interactive component development
440
+ - **NativeWind v4** - Tailwind CSS for React Native
441
+ - **Command-based mode switching** - Easy switching between app and Storybook modes
442
+
369
443
  ## Publishing
370
444
 
371
445
  For maintainers who need to publish new versions of the package, we provide a comprehensive automated script.
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  // Type augmentations for NativeWind className support
4
- import './types/global';
5
- import './types/rn-primitives';
4
+ // Types are automatically loaded via tsconfig.json typeRoots and include
6
5
 
7
6
  // Export components
8
7
  export * from "./components/ui/index.js";
@@ -1 +1 @@
1
- {"version":3,"names":["default","RootLayout","cn","THEME","NAV_THEME","ThemeProvider","useTheme","getRadiusForHeight","getRadiusForDimensions","getCustomRadius","RADIUS","RADIUS_PRESET","CORNER_SMOOTHING","fonts"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA,OAAO,gBAAgB;AACvB,OAAO,uBAAuB;;AAE9B;AACA,cAAc,0BAAiB;;AAE/B;AACA,SAASA,OAAO,IAAIC,UAAU,QAAQ,kBAAe;;AAErD;AACA,SAASC,EAAE,QAAQ,gBAAa;AAChC,SAASC,KAAK,EAAEC,SAAS,QAAQ,gBAAa;AAC9C,SAASC,aAAa,EAAEC,QAAQ,QAAQ,wBAAqB;;AAE7D;AACA,SACEC,kBAAkB,EAClBC,sBAAsB,EACtBC,eAAe,EACfC,MAAM,EACNC,aAAa,EACbC,gBAAgB,QACX,uBAAoB;;AAE3B;AACA,SAASC,KAAK,QAAQ,gBAAa","ignoreList":[]}
1
+ {"version":3,"names":["default","RootLayout","cn","THEME","NAV_THEME","ThemeProvider","useTheme","getRadiusForHeight","getRadiusForDimensions","getCustomRadius","RADIUS","RADIUS_PRESET","CORNER_SMOOTHING","fonts"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA;;AAEA;AACA,cAAc,0BAAiB;;AAE/B;AACA,SAASA,OAAO,IAAIC,UAAU,QAAQ,kBAAe;;AAErD;AACA,SAASC,EAAE,QAAQ,gBAAa;AAChC,SAASC,KAAK,EAAEC,SAAS,QAAQ,gBAAa;AAC9C,SAASC,aAAa,EAAEC,QAAQ,QAAQ,wBAAqB;;AAE7D;AACA,SACEC,kBAAkB,EAClBC,sBAAsB,EACtBC,eAAe,EACfC,MAAM,EACNC,aAAa,EACbC,gBAAgB,QACX,uBAAoB;;AAE3B;AACA,SAASC,KAAK,QAAQ,gBAAa","ignoreList":[]}
@@ -1,5 +1,3 @@
1
- import './types/global';
2
- import './types/rn-primitives';
3
1
  export * from './components/ui';
4
2
  export { default as RootLayout } from './app/_layout';
5
3
  export { cn } from './lib/utils';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,gBAAgB,CAAC;AACxB,OAAO,uBAAuB,CAAC;AAG/B,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG9D,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,MAAM,EACN,aAAa,EACb,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG9D,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,MAAM,EACN,aAAa,EACb,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/react-native-blueprint",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "This is a react-native package for mobile apps",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -35,15 +35,16 @@
35
35
  ],
36
36
  "scripts": {
37
37
  "example": "yarn workspace react-native-blueprint-example",
38
+ "example:app": "yarn example app",
39
+ "example:storybook": "yarn example storybook",
38
40
  "test": "jest",
39
41
  "typecheck": "tsc",
40
42
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
41
43
  "clean": "del-cli lib",
44
+ "clean:all": "rm -rf node_modules example/node_modules && yarn install",
42
45
  "prepare": "bob build",
43
46
  "release": "release-it --only-version",
44
- "publish-package": "./scripts/publish.sh",
45
- "android": "expo run:android",
46
- "ios": "expo run:ios"
47
+ "publish-package": "./scripts/publish.sh"
47
48
  },
48
49
  "keywords": [
49
50
  "react-native",
@@ -103,6 +104,16 @@
103
104
  "example"
104
105
  ],
105
106
  "packageManager": "yarn@3.6.1",
107
+ "resolutions": {
108
+ "react": "19.1.0",
109
+ "react-dom": "19.1.0",
110
+ "react-native": "0.81.4",
111
+ "nativewind": "4.2.1",
112
+ "tailwindcss": "3.4.17",
113
+ "tailwindcss-animate": "1.0.7",
114
+ "@rspack/core": "1.5.8",
115
+ "@babel/core": "^7.28.4"
116
+ },
106
117
  "jest": {
107
118
  "preset": "react-native",
108
119
  "modulePathIgnorePatterns": [
@@ -202,8 +213,6 @@
202
213
  "expo-font": "^14.0.9",
203
214
  "figma-squircle": "^1.1.0",
204
215
  "lucide-react-native": "^0.546.0",
205
- "react": "19.1.0",
206
- "react-native": "0.81.4",
207
216
  "react-native-figma-squircle": "^0.4.0",
208
217
  "react-native-floating-action": "^1.22.0",
209
218
  "react-native-gesture-handler": "^2.28.0",
package/src/index.tsx CHANGED
@@ -1,6 +1,5 @@
1
1
  // Type augmentations for NativeWind className support
2
- import './types/global';
3
- import './types/rn-primitives';
2
+ // Types are automatically loaded via tsconfig.json typeRoots and include
4
3
 
5
4
  // Export components
6
5
  export * from './components/ui';