@sudobility/building_blocks_rn 0.0.11 → 0.0.13

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.
Files changed (2) hide show
  1. package/README.md +73 -0
  2. package/package.json +2 -5
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # @sudobility/building_blocks_rn
2
+
3
+ Higher-level shared UI building blocks for Sudobility React Native apps. Provides pre-built screens (login, settings, subscriptions), theming, i18n, and app shell components.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ bun add @sudobility/building_blocks_rn
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import {
15
+ SudobilityAppRN,
16
+ ThemeProvider,
17
+ useTheme,
18
+ LoginScreen,
19
+ AppScreenLayout,
20
+ ToastProvider,
21
+ useToast,
22
+ createThemedStyles,
23
+ initializeI18nRN,
24
+ } from '@sudobility/building_blocks_rn';
25
+
26
+ // Firebase-dependent imports (separate entry point)
27
+ import {
28
+ SudobilityAppRNWithFirebaseAuth,
29
+ ApiProvider,
30
+ useApi,
31
+ } from '@sudobility/building_blocks_rn/firebase';
32
+ ```
33
+
34
+ ## API
35
+
36
+ ### Main Entry (`@sudobility/building_blocks_rn`)
37
+
38
+ | Export | Description |
39
+ |--------|-------------|
40
+ | `SudobilityAppRN` | Base app wrapper composing providers (SafeArea, Theme, Toast, i18n, Query) |
41
+ | `LoginScreen` | Email/password + OAuth login screen |
42
+ | `AppScreenLayout` | SafeAreaView wrapper with optional header/footer |
43
+ | `AppSubscriptionPage` | Subscription management with status and packages |
44
+ | `SettingsListScreen` | Settings menu with icon rows |
45
+ | `AppearanceSettings` | Theme and font size segmented controls |
46
+ | `LanguagePicker` | Modal language selector (16 languages) |
47
+ | `ThemeProvider` / `useTheme` | Light/dark theme with AsyncStorage persistence |
48
+ | `ToastProvider` / `useToast` | Animated toast notifications |
49
+ | `createThemedStyles` | Memoized StyleSheet factory from theme colors |
50
+ | `initializeI18nRN` | i18next setup with RN locale detection |
51
+ | `useResponsive` | Window dimension breakpoints (isSmall, isMedium, isLarge) |
52
+
53
+ ### Firebase Entry (`@sudobility/building_blocks_rn/firebase`)
54
+
55
+ | Export | Description |
56
+ |--------|-------------|
57
+ | `SudobilityAppRNWithFirebaseAuth` | App wrapper with Firebase auth + API layers |
58
+ | `ApiProvider` / `useApi` | Network client context with auth token management |
59
+
60
+ ## Development
61
+
62
+ ```bash
63
+ bun run build # Build TypeScript to dist/
64
+ bun run dev # Watch mode build
65
+ bun run typecheck # Type-check (no emit)
66
+ bun run lint # ESLint check
67
+ bun run lint:fix # Auto-fix ESLint issues
68
+ bun run format # Prettier format
69
+ ```
70
+
71
+ ## License
72
+
73
+ BUSL-1.1
package/package.json CHANGED
@@ -1,20 +1,17 @@
1
1
  {
2
2
  "name": "@sudobility/building_blocks_rn",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "Higher-level shared UI building blocks for Sudobility React Native apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
- "module": "./dist/index.js",
8
7
  "types": "./dist/index.d.ts",
9
8
  "exports": {
10
9
  ".": {
11
10
  "import": "./dist/index.js",
12
- "require": "./dist/index.js",
13
11
  "types": "./dist/index.d.ts"
14
12
  },
15
13
  "./firebase": {
16
14
  "import": "./dist/firebase.js",
17
- "require": "./dist/firebase.js",
18
15
  "types": "./dist/firebase.d.ts"
19
16
  }
20
17
  },
@@ -73,7 +70,7 @@
73
70
  "@react-native-async-storage/async-storage": "2.2.0",
74
71
  "@react-navigation/native": "^7.1.28",
75
72
  "@react-navigation/native-stack": "^7.10.1",
76
- "@sudobility/types": "^1.9.54",
73
+ "@sudobility/types": "^1.9.57",
77
74
  "@tanstack/react-query": "^5.90.19",
78
75
  "@types/react": "~19.1.0",
79
76
  "@types/react-dom": "^19.2.3",