@umituz/react-native-settings 5.4.1 → 5.4.3
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/.agents/workflows/setup-settings.md +48 -0
- package/package.json +2 -1
- package/src/index.ts +6 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Sets up or updates the @umituz/react-native-settings package in a React Native app with its localization, appearance, and generic settings stack.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Settings Hub Setup Skill
|
|
6
|
+
|
|
7
|
+
When this workflow/skill is invoked, follow these precise steps to set up or update the `@umituz/react-native-settings` package in the target project.
|
|
8
|
+
|
|
9
|
+
## Step 1: Check and Update `package.json`
|
|
10
|
+
- Read the target project's `package.json` file.
|
|
11
|
+
- Check if `@umituz/react-native-settings` is present in `dependencies`.
|
|
12
|
+
- If missing: Install it via `npm install @umituz/react-native-settings`.
|
|
13
|
+
- If outdated: Update it to the latest version.
|
|
14
|
+
|
|
15
|
+
## Step 2: Ensure Peer Dependencies
|
|
16
|
+
This package requires several core navigation, localization, and Expo dependencies. Check `package.json` and install the missing ones using the appropriate package manager (e.g. `npx expo install` for Expo packages):
|
|
17
|
+
- `@react-navigation/native` & `@react-navigation/stack`
|
|
18
|
+
- `@tanstack/react-query` & `zustand`
|
|
19
|
+
- `@umituz/react-native-design-system`
|
|
20
|
+
- `i18next` & `react-i18next`
|
|
21
|
+
- `firebase`
|
|
22
|
+
- `expo-constants`, `expo-device`, `expo-haptics`, `expo-localization`, `expo-notifications`, `expo-store-review`
|
|
23
|
+
- `react-native-safe-area-context`
|
|
24
|
+
|
|
25
|
+
// turbo
|
|
26
|
+
## Step 3: Run Pod Install (If bare React Native)
|
|
27
|
+
If the project has an `ios/` folder and a `Podfile`, run:
|
|
28
|
+
```bash
|
|
29
|
+
cd ios && pod install
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Step 4: Setup Settings Stack / Boilerplate
|
|
33
|
+
- Locate the main navigation or settings screen file (e.g. `src/navigation/MainTabNavigator` or `app/settings.tsx`).
|
|
34
|
+
- Introduce `SettingsStackNavigator` to the navigation flow.
|
|
35
|
+
- Example boilerplate to inject:
|
|
36
|
+
```typescript
|
|
37
|
+
import { SettingsStackNavigator } from '@umituz/react-native-settings';
|
|
38
|
+
|
|
39
|
+
// Basic usage:
|
|
40
|
+
<SettingsStackNavigator
|
|
41
|
+
appInfo={{ name: 'My App', version: '1.0.0' }}
|
|
42
|
+
legalUrls={{ privacy: 'https://...', terms: 'https://...' }}
|
|
43
|
+
/>
|
|
44
|
+
```
|
|
45
|
+
- Make sure `i18next` configurations are correctly mapped if they need to be injected into the root.
|
|
46
|
+
|
|
47
|
+
## Step 5: Summary
|
|
48
|
+
State clearly what is updated and initialized. List the files that have been modified for the Settings Hub and which peer dependencies were installed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-settings",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.3",
|
|
4
4
|
"description": "Complete settings hub for React Native apps - consolidated package with settings, localization, about, legal, appearance, feedback, FAQs, rating, and gamification - expo-store-review and expo-device now lazy loaded",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -208,6 +208,7 @@
|
|
|
208
208
|
"files": [
|
|
209
209
|
"dist",
|
|
210
210
|
"src",
|
|
211
|
+
".agents",
|
|
211
212
|
"README.md"
|
|
212
213
|
]
|
|
213
214
|
}
|
package/src/index.ts
CHANGED
|
@@ -36,6 +36,12 @@ export {
|
|
|
36
36
|
useUpdateSettingsMutation,
|
|
37
37
|
useResetSettingsMutation
|
|
38
38
|
} from './presentation/hooks/mutations/useSettingsMutations';
|
|
39
|
+
export {
|
|
40
|
+
useSettingsScreenConfig,
|
|
41
|
+
type SettingsFeatures,
|
|
42
|
+
type UseSettingsScreenConfigParams,
|
|
43
|
+
type SettingsScreenConfigResult
|
|
44
|
+
} from './presentation/hooks/useSettingsScreenConfig';
|
|
39
45
|
|
|
40
46
|
// =============================================================================
|
|
41
47
|
// PRESENTATION LAYER - Screens
|