@umituz/react-native-design-system 2.6.32 → 2.6.34

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.32",
3
+ "version": "2.6.34",
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",
@@ -8,6 +8,7 @@
8
8
  * @layer infrastructure/services
9
9
  */
10
10
 
11
+ import { Dimensions } from 'react-native';
11
12
  import * as Localization from 'expo-localization';
12
13
  import { DeviceInfoService } from './DeviceInfoService';
13
14
  import { ApplicationInfoService } from './ApplicationInfoService';
@@ -19,16 +20,29 @@ import { PersistentDeviceIdService } from './PersistentDeviceIdService';
19
20
  * Index signature added for Record<string, unknown> compatibility
20
21
  */
21
22
  export interface DeviceExtras {
22
- [key: string]: string | undefined;
23
+ [key: string]: string | number | boolean | undefined;
23
24
  deviceId?: string;
24
25
  platform?: string;
25
26
  deviceModel?: string;
26
27
  deviceBrand?: string;
28
+ deviceName?: string;
29
+ deviceType?: number;
30
+ deviceYearClass?: number;
31
+ isDevice?: boolean;
32
+ osName?: string;
27
33
  osVersion?: string;
34
+ osBuildId?: string;
35
+ totalMemory?: number;
28
36
  appVersion?: string;
29
37
  buildNumber?: string;
30
38
  locale?: string;
39
+ region?: string;
31
40
  timezone?: string;
41
+ screenWidth?: number;
42
+ screenHeight?: number;
43
+ screenScale?: number;
44
+ fontScale?: number;
45
+ isLandscape?: boolean;
32
46
  }
33
47
 
34
48
  /**
@@ -70,17 +84,31 @@ export async function collectDeviceExtras(): Promise<DeviceExtras> {
70
84
  ]);
71
85
 
72
86
  const locale = getDeviceLocale();
87
+ const { width, height, scale, fontScale } = Dimensions.get('screen');
73
88
 
74
89
  return {
75
90
  deviceId,
76
91
  platform: deviceInfo.platform,
77
92
  deviceModel: deviceInfo.modelName || undefined,
78
93
  deviceBrand: deviceInfo.brand || undefined,
94
+ deviceName: deviceInfo.deviceName || undefined,
95
+ deviceType: deviceInfo.deviceType ?? undefined,
96
+ deviceYearClass: deviceInfo.deviceYearClass ?? undefined,
97
+ isDevice: deviceInfo.isDevice,
98
+ osName: deviceInfo.osName || undefined,
79
99
  osVersion: deviceInfo.osVersion || undefined,
100
+ osBuildId: deviceInfo.osBuildId || undefined,
101
+ totalMemory: deviceInfo.totalMemory ?? undefined,
80
102
  appVersion: appInfo.nativeApplicationVersion || undefined,
81
103
  buildNumber: appInfo.nativeBuildVersion || undefined,
82
104
  locale,
105
+ region: deviceInfo.region || undefined,
83
106
  timezone: deviceInfo.timezone || undefined,
107
+ screenWidth: Math.round(width),
108
+ screenHeight: Math.round(height),
109
+ screenScale: scale,
110
+ fontScale,
111
+ isLandscape: width > height,
84
112
  };
85
113
  } catch {
86
114
  return {};