@umituz/react-native-design-system 2.4.8 → 2.4.10

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.4.8",
3
+ "version": "2.4.10",
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",
@@ -53,9 +53,9 @@
53
53
  "@gorhom/bottom-sheet": ">=5.0.0",
54
54
  "@react-native-async-storage/async-storage": ">=2.0.0",
55
55
  "@react-native-community/datetimepicker": ">=8.0.0",
56
- "@react-navigation/bottom-tabs": ">=6.0.0",
57
- "@react-navigation/native": ">=6.0.0",
58
- "@react-navigation/stack": ">=6.0.0",
56
+ "@react-navigation/bottom-tabs": ">=7.0.0",
57
+ "@react-navigation/native": ">=7.0.0",
58
+ "@react-navigation/stack": ">=7.0.0",
59
59
  "@umituz/react-native-filesystem": "*",
60
60
  "@umituz/react-native-haptics": "*",
61
61
  "@umituz/react-native-localization": "*",
@@ -99,9 +99,9 @@
99
99
  "@gorhom/bottom-sheet": "^5.0.0",
100
100
  "@react-native-async-storage/async-storage": "^2.2.0",
101
101
  "@react-native-community/datetimepicker": "^8.5.1",
102
- "@react-navigation/bottom-tabs": "^6.6.1",
103
- "@react-navigation/native": "^6.0.0",
104
- "@react-navigation/stack": "^6.4.1",
102
+ "@react-navigation/bottom-tabs": "^7.9.0",
103
+ "@react-navigation/native": "^7.1.26",
104
+ "@react-navigation/stack": "^7.6.13",
105
105
  "@testing-library/react": "^16.3.1",
106
106
  "@testing-library/react-native": "^13.3.3",
107
107
  "@types/jest": "^30.0.0",
@@ -24,7 +24,7 @@
24
24
 
25
25
  import React, { useEffect } from 'react';
26
26
  import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
27
- import {
27
+ import Animated, {
28
28
  useSharedValue,
29
29
  useAnimatedStyle,
30
30
  withRepeat,
@@ -32,11 +32,12 @@ import {
32
32
  withTiming,
33
33
  Easing,
34
34
  } from 'react-native-reanimated';
35
- import Animated from 'react-native-reanimated';
36
35
  import { useAppDesignTokens } from '../../theme';
37
36
  import type { SkeletonPattern, SkeletonConfig } from './AtomicSkeleton.types';
38
37
  import { SKELETON_PATTERNS } from './AtomicSkeleton.types';
39
38
 
39
+ const AnimatedView = (Animated as any).createAnimatedComponent(View);
40
+
40
41
  const SHIMMER_DURATION = 1200;
41
42
 
42
43
  export interface AtomicSkeletonProps {
@@ -90,7 +91,7 @@ const SkeletonItem: React.FC<{
90
91
  }));
91
92
 
92
93
  return (
93
- <Animated.View
94
+ <AnimatedView
94
95
  style={[
95
96
  styles.skeleton,
96
97
  {
@@ -2,18 +2,22 @@
2
2
  * Device Domain - Core Entities
3
3
  *
4
4
  * This file defines core types and interfaces for device information.
5
- * Handles device details, app info using expo-device and expo-application.
5
+ * All types are self-contained - no external dependencies for types.
6
6
  *
7
7
  * @domain device
8
8
  * @layer domain/entities
9
9
  */
10
10
 
11
- import type * as DeviceModule from 'expo-device';
12
-
13
11
  /**
14
- * Re-export Device types from expo-device
12
+ * Device type enumeration (matches expo-device values)
15
13
  */
16
- export type DeviceType = DeviceModule.DeviceType;
14
+ export enum DeviceType {
15
+ UNKNOWN = 0,
16
+ PHONE = 1,
17
+ TABLET = 2,
18
+ DESKTOP = 3,
19
+ TV = 4,
20
+ }
17
21
 
18
22
  /**
19
23
  * Device information interface
@@ -20,11 +20,14 @@ export class ApplicationInfoService {
20
20
  */
21
21
  static async getApplicationInfo(): Promise<ApplicationInfo> {
22
22
  try {
23
- const [installTime, lastUpdateTime] = await Promise.all([
24
- withTimeout(() => Application.getInstallationTimeAsync(), 1000),
25
- withTimeout(() => Application.getLastUpdateTimeAsync(), 1000),
23
+ const [installTimeResult, lastUpdateTimeResult] = await Promise.all([
24
+ withTimeout<Date>(() => Application.getInstallationTimeAsync(), 1000),
25
+ withTimeout<Date>(() => Application.getLastUpdateTimeAsync(), 1000),
26
26
  ]);
27
27
 
28
+ const installTime: Date | null = installTimeResult ?? null;
29
+ const lastUpdateTime: Date | null = lastUpdateTimeResult ?? null;
30
+
28
31
  const applicationName = safeAccess(() => Application.applicationName, 'Unknown');
29
32
  const applicationId = safeAccess(() => Application.applicationId, 'Unknown');
30
33
  const nativeApplicationVersion = safeAccess(
@@ -5,10 +5,9 @@
5
5
  * Follows SOLID principles - only handles capability checks
6
6
  */
7
7
 
8
- import * as Device from 'expo-device';
9
8
  import { Platform } from 'react-native';
9
+ import { DeviceType } from '../../domain/entities/Device';
10
10
  import { DeviceInfoService } from './DeviceInfoService';
11
- import { safeAccess } from '../utils/nativeModuleUtils';
12
11
 
13
12
  /**
14
13
  * Service for checking device capabilities
@@ -27,7 +26,7 @@ export class DeviceCapabilityService {
27
26
 
28
27
  return {
29
28
  isDevice: info.isDevice,
30
- isTablet: info.deviceType === Device.DeviceType.TABLET,
29
+ isTablet: info.deviceType === DeviceType.TABLET,
31
30
  hasNotch: await this.hasNotch(),
32
31
  totalMemoryGB: info.totalMemory
33
32
  ? info.totalMemory / (1024 * 1024 * 1024)
@@ -44,7 +43,8 @@ export class DeviceCapabilityService {
44
43
  return false;
45
44
  }
46
45
 
47
- const modelName = safeAccess(() => Device.modelName?.toLowerCase() || '', '');
46
+ const info = await DeviceInfoService.getDeviceInfo();
47
+ const modelName = info.modelName?.toLowerCase() ?? '';
48
48
 
49
49
  // iPhone X and newer (with notch or dynamic island)
50
50
  return (
@@ -21,10 +21,11 @@ export class DeviceInfoService {
21
21
  */
22
22
  static async getDeviceInfo(): Promise<DeviceInfo> {
23
23
  try {
24
- const totalMemory = await withTimeout(
24
+ const totalMemoryResult = await withTimeout<number>(
25
25
  () => Device.getMaxMemoryAsync(),
26
26
  1000,
27
27
  );
28
+ const totalMemory: number | null = totalMemoryResult ?? null;
28
29
 
29
30
  const brand = safeAccess(() => Device.brand, null);
30
31
  const manufacturer = safeAccess(() => Device.manufacturer, null);
@@ -11,6 +11,8 @@ import Animated, { useAnimatedStyle, withTiming } from 'react-native-reanimated'
11
11
  import { useFireworks } from '../hooks/useFireworks';
12
12
  import type { FireworksConfig } from '../../domain/entities/Fireworks';
13
13
 
14
+ const AnimatedView = (Animated as any).createAnimatedComponent(View);
15
+
14
16
  export interface FireworksProps extends FireworksConfig {
15
17
  /**
16
18
  * X position to trigger fireworks (0-1, relative to container width)
@@ -55,7 +57,7 @@ const Particle: React.FC<{
55
57
  opacity: withTiming(opacity, { duration: 100 }),
56
58
  }));
57
59
 
58
- return <Animated.View style={animatedStyle} />;
60
+ return <AnimatedView style={animatedStyle} />;
59
61
  };
60
62
 
61
63
  /**
@@ -79,9 +79,7 @@ export const BottomSheetModal = forwardRef<BottomSheetModalRef, BottomSheetModal
79
79
  useImperativeHandle(ref, () => ({
80
80
  present: () => {
81
81
  if (__DEV__) {
82
- // eslint-disable-next-line no-console
83
82
  console.log('[BottomSheetModal] present() called');
84
- // eslint-disable-next-line no-console
85
83
  console.log('[BottomSheetModal] modalRef.current:', modalRef.current);
86
84
  }
87
85
  modalRef.current?.present();
@@ -61,6 +61,7 @@ export function StackNavigator<T extends ParamListBase>({ config }: StackNavigat
61
61
 
62
62
  return (
63
63
  <Stack.Navigator
64
+ id={config.id}
64
65
  initialRouteName={config.initialRouteName as string}
65
66
  screenOptions={{
66
67
  ...defaultScreenOptions,
@@ -80,6 +80,7 @@ export function TabsNavigator<T extends ParamListBase>({
80
80
 
81
81
  return (
82
82
  <Tab.Navigator
83
+ id={config.id}
83
84
  initialRouteName={config.initialRouteName as string}
84
85
  screenOptions={{
85
86
  ...defaultScreenOptions,
@@ -66,6 +66,8 @@ export interface StackScreen<T extends ParamListBase = ParamListBase>
66
66
  }
67
67
 
68
68
  export interface BaseNavigatorConfig<T extends ParamListBase = ParamListBase> {
69
+ /** Unique identifier for the navigator (required for React Navigation v7+) */
70
+ id?: string;
69
71
  screens: TabScreen[] | StackScreen[];
70
72
  initialRouteName?: Extract<keyof T, string>;
71
73
  getLabel?: (label: string) => string;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * React 19 JSX Compatibility for React Native
3
+ * Fixes JSX namespace issues between React 19 and react-native
4
+ */
5
+
6
+ import type { JSX as ReactJSX } from 'react';
7
+
8
+ declare global {
9
+ namespace JSX {
10
+ interface Element extends ReactJSX.Element {}
11
+ interface ElementClass extends ReactJSX.ElementClass {}
12
+ interface ElementAttributesProperty extends ReactJSX.ElementAttributesProperty {}
13
+ interface ElementChildrenAttribute extends ReactJSX.ElementChildrenAttribute {}
14
+ interface IntrinsicAttributes extends ReactJSX.IntrinsicAttributes {}
15
+ interface IntrinsicClassAttributes<T> extends ReactJSX.IntrinsicClassAttributes<T> {}
16
+ }
17
+ }
18
+
19
+ export {};