@umituz/react-native-design-system 2.9.22 → 2.9.24

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.9.22",
3
+ "version": "2.9.24",
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",
@@ -23,47 +23,47 @@ import { PersistentDeviceIdService } from './PersistentDeviceIdService';
23
23
  export interface DeviceExtras {
24
24
  [key: string]: string | number | boolean | undefined;
25
25
  /** The stable ID stored in Keychain/SecureStore */
26
- deviceId?: string;
26
+ deviceId: string;
27
27
  /** Alias for deviceId for clarity in Firestore */
28
- persistentDeviceId?: string;
28
+ persistentDeviceId: string;
29
29
  /** The raw native platform ID (IDFV on iOS, Android ID on Android) */
30
- nativeDeviceId?: string;
31
- platform?: string;
32
- deviceModel?: string;
33
- deviceBrand?: string;
34
- deviceName?: string;
35
- deviceType?: number;
36
- deviceYearClass?: number;
37
- isDevice?: boolean;
38
- osName?: string;
39
- osVersion?: string;
40
- osBuildId?: string;
41
- totalMemory?: number;
42
- appVersion?: string;
43
- buildNumber?: string;
44
- locale?: string;
45
- region?: string;
46
- timezone?: string;
47
- screenWidth?: number;
48
- screenHeight?: number;
49
- screenScale?: number;
50
- fontScale?: number;
51
- isLandscape?: boolean;
30
+ nativeDeviceId: string;
31
+ platform: string;
32
+ deviceModel: string;
33
+ deviceBrand: string;
34
+ deviceName: string;
35
+ deviceType: number | string;
36
+ deviceYearClass: number | string;
37
+ isDevice: boolean;
38
+ osName: string;
39
+ osVersion: string;
40
+ osBuildId: string;
41
+ totalMemory: number | string;
42
+ appVersion: string;
43
+ buildNumber: string;
44
+ locale: string;
45
+ region: string;
46
+ timezone: string;
47
+ screenWidth: number;
48
+ screenHeight: number;
49
+ screenScale: number;
50
+ fontScale: number;
51
+ isLandscape: boolean;
52
52
  }
53
53
 
54
54
  /**
55
55
  * Get device locale code
56
56
  */
57
- function getDeviceLocale(): string | undefined {
57
+ function getDeviceLocale(): string {
58
58
  try {
59
59
  const locales = Localization.getLocales();
60
60
  if (locales && locales.length > 0) {
61
61
  const locale = locales[0];
62
- return locale?.languageTag || undefined;
62
+ return locale?.languageTag || '-';
63
63
  }
64
- return undefined;
64
+ return '-';
65
65
  } catch {
66
- return undefined;
66
+ return '-';
67
67
  }
68
68
  }
69
69
 
@@ -94,32 +94,57 @@ export async function collectDeviceExtras(): Promise<DeviceExtras> {
94
94
  const { width, height, scale, fontScale } = Dimensions.get('screen');
95
95
 
96
96
  return {
97
- deviceId,
98
- persistentDeviceId: deviceId, // Explicitly named for Firestore clarity
99
- nativeDeviceId: nativeDeviceId || undefined,
100
- platform: deviceInfo.platform,
101
- deviceModel: deviceInfo.modelName || undefined,
102
- deviceBrand: deviceInfo.brand || undefined,
103
- deviceName: deviceInfo.deviceName || undefined,
104
- deviceType: deviceInfo.deviceType ?? undefined,
105
- deviceYearClass: deviceInfo.deviceYearClass ?? undefined,
106
- isDevice: deviceInfo.isDevice,
107
- osName: deviceInfo.osName || undefined,
108
- osVersion: deviceInfo.osVersion || undefined,
109
- osBuildId: deviceInfo.osBuildId || undefined,
110
- totalMemory: deviceInfo.totalMemory ?? undefined,
111
- appVersion: appInfo.nativeApplicationVersion || undefined,
112
- buildNumber: appInfo.nativeBuildVersion || undefined,
97
+ deviceId: deviceId || '-',
98
+ persistentDeviceId: deviceId || '-',
99
+ nativeDeviceId: nativeDeviceId || '-',
100
+ platform: deviceInfo.platform || '-',
101
+ deviceModel: deviceInfo.modelName || '-',
102
+ deviceBrand: deviceInfo.brand || '-',
103
+ deviceName: deviceInfo.deviceName || '-',
104
+ deviceType: deviceInfo.deviceType ?? '-',
105
+ deviceYearClass: deviceInfo.deviceYearClass ?? '-',
106
+ isDevice: deviceInfo.isDevice ?? false,
107
+ osName: deviceInfo.osName || '-',
108
+ osVersion: deviceInfo.osVersion || '-',
109
+ osBuildId: deviceInfo.osBuildId || '-',
110
+ totalMemory: deviceInfo.totalMemory ?? '-',
111
+ appVersion: appInfo.nativeApplicationVersion || '-',
112
+ buildNumber: appInfo.nativeBuildVersion || '-',
113
113
  locale,
114
- region: deviceInfo.region || undefined,
115
- timezone: deviceInfo.timezone || undefined,
116
- screenWidth: Math.round(width),
117
- screenHeight: Math.round(height),
118
- screenScale: scale,
119
- fontScale,
114
+ region: deviceInfo.region || '-',
115
+ timezone: deviceInfo.timezone || '-',
116
+ screenWidth: Math.round(width) || 0,
117
+ screenHeight: Math.round(height) || 0,
118
+ screenScale: scale || 1,
119
+ fontScale: fontScale || 1,
120
120
  isLandscape: width > height,
121
121
  };
122
122
  } catch {
123
- return {};
123
+ return {
124
+ deviceId: '-',
125
+ persistentDeviceId: '-',
126
+ nativeDeviceId: '-',
127
+ platform: '-',
128
+ deviceModel: '-',
129
+ deviceBrand: '-',
130
+ deviceName: '-',
131
+ deviceType: '-',
132
+ deviceYearClass: '-',
133
+ isDevice: false,
134
+ osName: '-',
135
+ osVersion: '-',
136
+ osBuildId: '-',
137
+ totalMemory: '-',
138
+ appVersion: '-',
139
+ buildNumber: '-',
140
+ locale: '-',
141
+ region: '-',
142
+ timezone: '-',
143
+ screenWidth: 0,
144
+ screenHeight: 0,
145
+ screenScale: 1,
146
+ fontScale: 1,
147
+ isLandscape: false,
148
+ };
124
149
  }
125
150
  }
@@ -5,11 +5,10 @@
5
5
 
6
6
  import React from "react";
7
7
  import { View, StyleSheet } from "react-native";
8
-
9
- import { Image } from "expo-image";
10
8
  import type { OnboardingSlide } from "../../domain/entities/OnboardingSlide";
11
9
  import { BackgroundVideo } from "./BackgroundVideo";
12
10
  import { BackgroundImageCollage } from "./BackgroundImageCollage";
11
+ import { AtomicImage } from "../../../atoms/image/AtomicImage";
13
12
 
14
13
  interface OnboardingBackgroundProps {
15
14
  currentSlide: OnboardingSlide | undefined;
@@ -50,11 +49,13 @@ export const OnboardingBackground: React.FC<OnboardingBackgroundProps> = ({
50
49
 
51
50
  if (currentSlide.backgroundImage) {
52
51
  return (
53
- <Image
52
+ <AtomicImage
54
53
  source={currentSlide.backgroundImage}
55
54
  style={StyleSheet.absoluteFill}
56
55
  contentFit="cover"
57
56
  transition={500}
57
+ cachePolicy="memory-disk"
58
+ priority="high"
58
59
  />
59
60
  );
60
61
  }