@umituz/react-native-settings 5.3.80 → 5.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-settings",
3
- "version": "5.3.80",
3
+ "version": "5.4.0",
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",
@@ -118,8 +118,8 @@
118
118
  "url": "https://github.com/umituz/react-native-settings"
119
119
  },
120
120
  "optionalDependencies": {
121
- "expo-store-review": "~6.0.0",
122
- "expo-device": "~8.0.0"
121
+ "expo-device": "~8.0.0",
122
+ "expo-store-review": "~6.0.0"
123
123
  },
124
124
  "peerDependencies": {
125
125
  "@expo/vector-icons": ">=14.0.0",
@@ -165,7 +165,7 @@
165
165
  "@typescript-eslint/eslint-plugin": "^7.18.0",
166
166
  "@typescript-eslint/parser": "^7.18.0",
167
167
  "@umituz/react-native-auth": "^4.3.39",
168
- "@umituz/react-native-design-system": "latest",
168
+ "@umituz/react-native-design-system": "^4.27.0",
169
169
  "@umituz/react-native-firebase": "^2.4.55",
170
170
  "@umituz/react-native-sentry": "latest",
171
171
  "eslint": "^8.57.0",
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import React from "react";
9
- import { useNavigation } from "@react-navigation/native";
9
+ import { useAppNavigation } from "@umituz/react-native-design-system/molecules";
10
10
  import { StackNavigator, type StackNavigatorConfig } from "@umituz/react-native-design-system/molecules";
11
11
  import { useNavigationHandlers, useSettingsScreens } from "./hooks";
12
12
  import {
@@ -43,7 +43,7 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = (pr
43
43
  );
44
44
 
45
45
  // Get navigation for custom sections
46
- const navigation = useNavigation();
46
+ const navigation = useAppNavigation();
47
47
 
48
48
  const screens = useSettingsScreens({
49
49
  ...props,
@@ -51,7 +51,7 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = (pr
51
51
  legalProps: legalScreenProps,
52
52
  notificationTranslations,
53
53
  quietHoursTranslations,
54
- navigation,
54
+ navigation: navigation as unknown as Record<string, unknown>,
55
55
  });
56
56
 
57
57
  const navigatorConfig: StackNavigatorConfig<SettingsStackParamList> = {
@@ -1,28 +1,32 @@
1
1
  /**
2
- * Typed Settings Navigation Hook
2
+ * Settings Navigation Hook
3
3
  *
4
- * Provides type-safe navigation for Settings stack screens.
5
- * Replaces unsafe `as never` casts throughout the codebase.
4
+ * Provides standardized navigation for Settings stack screens.
5
+ * Uses useAppNavigation from design system for consistency.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { useSettingsNavigation } from '@umituz/react-native-settings/presentation/navigation';
10
+ *
11
+ * function LanguageSelectionScreen() {
12
+ * const navigation = useSettingsNavigation();
13
+ * navigation.navigate('Appearance');
14
+ * navigation.goBack();
15
+ * }
16
+ * ```
6
17
  */
7
18
 
8
- import { useNavigation } from '@react-navigation/native';
9
- import type { StackNavigationProp } from '@react-navigation/stack';
10
- import type { SettingsStackParamList } from '../types';
19
+ import { useAppNavigation } from '@umituz/react-native-design-system/molecules';
11
20
 
12
21
  /**
13
- * Type for Settings navigation prop
22
+ * Navigation result type inferred from useAppNavigation
14
23
  */
15
- export type SettingsNavigationProp = StackNavigationProp<SettingsStackParamList>;
24
+ type SettingsNavigation = ReturnType<typeof useAppNavigation>;
16
25
 
17
26
  /**
18
- * Hook to get typed navigation for Settings screens
19
- *
20
- * @example
21
- * ```typescript
22
- * const navigation = useSettingsNavigation();
23
- * navigation.navigate('LanguageSelection'); // Fully typed!
24
- * ```
27
+ * Hook to get navigation for Settings screens
28
+ * Delegates to useAppNavigation for consistent API
25
29
  */
26
- export const useSettingsNavigation = () => {
27
- return useNavigation<SettingsNavigationProp>();
30
+ export const useSettingsNavigation = (): SettingsNavigation => {
31
+ return useAppNavigation();
28
32
  };