@umituz/react-native-design-system 4.23.95 → 4.23.97

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-design-system",
3
- "version": "4.23.95",
3
+ "version": "4.23.97",
4
4
  "description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive, safe area, exception, infinite scroll, UUID, image, timezone, offline, onboarding, and loading utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -34,12 +34,30 @@ export const canGoBack = (): boolean => navigationRef?.canGoBack() ?? false;
34
34
 
35
35
  /**
36
36
  * Navigate to a specific route.
37
+ * Supports both simple and nested navigation.
37
38
  */
38
39
  export const navigate = (name: string, params?: object): void => {
39
40
  if (__DEV__) {
40
41
  }
41
42
  if (navigationRef?.isReady()) {
42
- navigationRef.navigate(name, params);
43
+ navigationRef.navigate(name as never, params as never);
44
+ }
45
+ };
46
+
47
+ /**
48
+ * Navigate to a nested screen in a specific navigator.
49
+ * @param navigatorName - The name of the parent navigator
50
+ * @param screenName - The name of the screen within that navigator
51
+ * @param params - Optional parameters to pass to the screen
52
+ */
53
+ export const navigateNested = (navigatorName: string, screenName: string, params?: object): void => {
54
+ if (__DEV__) {
55
+ }
56
+ if (navigationRef?.isReady()) {
57
+ navigationRef.navigate(navigatorName as never, {
58
+ screen: screenName,
59
+ params,
60
+ } as never);
43
61
  }
44
62
  };
45
63
 
@@ -130,6 +148,7 @@ export const AppNavigation = {
130
148
  isReady,
131
149
  canGoBack,
132
150
  navigate,
151
+ navigateNested,
133
152
  push,
134
153
  goBack,
135
154
  reset,