@umituz/react-native-design-system 2.6.28 → 2.6.29

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.28",
3
+ "version": "2.6.29",
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",
@@ -11,11 +11,23 @@
11
11
  */
12
12
 
13
13
  import { Dimensions } from 'react-native';
14
- import * as Device from 'expo-device';
15
- import { DeviceType as ExpoDeviceType } from 'expo-device';
16
14
  import { DEVICE_BREAKPOINTS, LAYOUT_CONSTANTS } from '../../responsive/config';
17
15
  import { validateScreenDimensions } from '../../responsive/validation';
18
16
 
17
+ // Safely try to import expo-device
18
+ let Device: any = null;
19
+ let ExpoDeviceType: any = null;
20
+
21
+ try {
22
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
23
+ const ExpoDevice = require('expo-device');
24
+ Device = ExpoDevice;
25
+ ExpoDeviceType = ExpoDevice.DeviceType;
26
+ } catch {
27
+ // Fallback if expo-device is not available
28
+ console.warn('[Design System] expo-device not found, using screen dimensions for device detection');
29
+ }
30
+
19
31
  /**
20
32
  * Helper function for device detection with fallback
21
33
  */