@umituz/react-native-design-system 2.6.45 → 2.6.47

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": "2.6.45",
3
+ "version": "2.6.47",
4
4
  "description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive and safe area utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -102,6 +102,14 @@ export const BottomSheetModal = forwardRef<BottomSheetModalRef, BottomSheetModal
102
102
  if (__DEV__) console.log('[BottomSheetModal] Calling modalRef.current.present()...');
103
103
  modalRef.current.present();
104
104
  if (__DEV__) console.log('[BottomSheetModal] modalRef.current.present() executed');
105
+
106
+ // Fallback: Also try snapToIndex as a workaround
107
+ setTimeout(() => {
108
+ if (modalRef.current && typeof modalRef.current.snapToIndex === 'function') {
109
+ if (__DEV__) console.log('[BottomSheetModal] Fallback: calling snapToIndex(0)');
110
+ modalRef.current.snapToIndex(0);
111
+ }
112
+ }, 50);
105
113
  } catch (error) {
106
114
  if (__DEV__) console.error('[BottomSheetModal] Error calling present():', error);
107
115
  }
@@ -1,11 +1,13 @@
1
1
  import React, { useEffect, useState, ReactNode } from 'react';
2
2
  import { ActivityIndicator, View, StyleSheet } from 'react-native';
3
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
3
4
  import { SafeAreaProvider, initialWindowMetrics } from '../../../safe-area';
4
5
  import { useThemeStore } from '../stores/themeStore';
5
6
  import { useDesignSystemTheme } from '../globalThemeStore';
6
7
  import type { CustomThemeColors } from '../../core/CustomColors';
7
8
  import { SplashScreen } from '../../../molecules/splash';
8
9
  import type { SplashScreenProps } from '../../../molecules/splash/types';
10
+ import { SafeBottomSheetModalProvider } from '../../../molecules/bottom-sheet';
9
11
 
10
12
  declare const __DEV__: boolean;
11
13
 
@@ -37,6 +39,8 @@ interface DesignSystemProviderProps {
37
39
  * - Supports custom color overrides
38
40
  * - Optional loading state
39
41
  * - Error handling
42
+ * - GestureHandlerRootView integration
43
+ * - BottomSheetModalProvider integration
40
44
  *
41
45
  * Usage:
42
46
  * ```tsx
@@ -157,9 +161,13 @@ export const DesignSystemProvider: React.FC<DesignSystemProviderProps> = ({
157
161
  };
158
162
 
159
163
  return (
160
- <SafeAreaProvider initialMetrics={initialWindowMetrics}>
161
- {renderContent()}
162
- </SafeAreaProvider>
164
+ <GestureHandlerRootView style={{ flex: 1 }}>
165
+ <SafeAreaProvider initialMetrics={initialWindowMetrics}>
166
+ <SafeBottomSheetModalProvider>
167
+ {renderContent()}
168
+ </SafeBottomSheetModalProvider>
169
+ </SafeAreaProvider>
170
+ </GestureHandlerRootView>
163
171
  );
164
172
  };
165
173