@umituz/react-native-design-system 2.3.2 → 2.3.4

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.3.2",
3
+ "version": "2.3.4",
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",
@@ -117,4 +117,4 @@
117
117
  "README.md",
118
118
  "LICENSE"
119
119
  ]
120
- }
120
+ }
@@ -6,8 +6,8 @@
6
6
  */
7
7
 
8
8
  import { Dimensions } from 'react-native';
9
- import { DEVICE_BREAKPOINTS, LAYOUT_CONSTANTS } from './config';
10
- import { validateScreenDimensions } from './validation';
9
+ import { DEVICE_BREAKPOINTS, LAYOUT_CONSTANTS } from '../../responsive/config';
10
+ import { validateScreenDimensions } from '../../responsive/validation';
11
11
 
12
12
  /**
13
13
  * Helper function for device detection with fallback
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { Dimensions, Platform } from 'react-native';
6
- import { DEVICE_BREAKPOINTS } from './config';
6
+ import { DEVICE_BREAKPOINTS } from '../../responsive/config';
7
7
  import { IPAD_BREAKPOINTS } from './iPadBreakpoints';
8
8
 
9
9
  /**
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { Dimensions } from 'react-native';
6
- import { DEVICE_BREAKPOINTS } from './config';
6
+ import { DEVICE_BREAKPOINTS } from '../../responsive/config';
7
7
  import {
8
8
  IPAD_BREAKPOINTS,
9
9
  TOUCH_TARGETS,
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Device Detection Module - Public API
3
+ *
4
+ * Centralized device detection utilities including:
5
+ * - Device type detection (phone, tablet, iPad variants)
6
+ * - Screen dimension utilities
7
+ * - Layout utilities for different device types
8
+ */
9
+
10
+ // Breakpoints and constants
11
+ export {
12
+ IPAD_BREAKPOINTS,
13
+ TOUCH_TARGETS,
14
+ CONTENT_WIDTH_CONSTRAINTS,
15
+ IPAD_LAYOUT_CONFIG,
16
+ } from './iPadBreakpoints';
17
+
18
+ // Device type detection
19
+ export {
20
+ DeviceType,
21
+ getScreenDimensions,
22
+ isSmallPhone,
23
+ isTablet,
24
+ isLandscape,
25
+ getDeviceType,
26
+ getSpacingMultiplier,
27
+ } from './deviceDetection';
28
+
29
+ // iPad-specific detection
30
+ export {
31
+ isIPad,
32
+ isIPadMini,
33
+ isIPadPro,
34
+ isIPadLandscape,
35
+ } from './iPadDetection';
36
+
37
+ // iPad layout utilities
38
+ export {
39
+ getContentMaxWidth,
40
+ getIPadGridColumns,
41
+ getTouchTargetSize,
42
+ getIPadScreenPadding,
43
+ getIPadFontScale,
44
+ getIPadLayoutInfo,
45
+ type IPadLayoutInfo,
46
+ } from './iPadLayoutUtils';
47
+
48
+ // iPad modal utilities
49
+ export {
50
+ getIPadModalDimensions,
51
+ getPaywallDimensions,
52
+ type ModalDimensions,
53
+ type PaywallDimensions,
54
+ } from './iPadModalUtils';
@@ -1,16 +1,59 @@
1
1
  /**
2
2
  * Device Module - Public API
3
3
  *
4
- * Device and application information utilities.
5
- * Provides device detection, capabilities, and system info.
4
+ * Complete device utilities including:
5
+ * - Device detection (phone, tablet, iPad variants)
6
+ * - Device info and capabilities
7
+ * - Anonymous user management
6
8
  */
7
9
 
8
- // Domain entities
10
+ // ============================================================================
11
+ // DETECTION - Device type and screen detection
12
+ // ============================================================================
13
+
14
+ export {
15
+ // Breakpoints
16
+ IPAD_BREAKPOINTS,
17
+ TOUCH_TARGETS,
18
+ CONTENT_WIDTH_CONSTRAINTS,
19
+ IPAD_LAYOUT_CONFIG,
20
+ // Device type detection
21
+ DeviceType,
22
+ getScreenDimensions,
23
+ isSmallPhone,
24
+ isTablet,
25
+ isLandscape,
26
+ getDeviceType,
27
+ getSpacingMultiplier,
28
+ // iPad-specific detection
29
+ isIPad,
30
+ isIPadMini,
31
+ isIPadPro,
32
+ isIPadLandscape,
33
+ // iPad layout utilities
34
+ getContentMaxWidth,
35
+ getIPadGridColumns,
36
+ getTouchTargetSize,
37
+ getIPadScreenPadding,
38
+ getIPadFontScale,
39
+ getIPadLayoutInfo,
40
+ type IPadLayoutInfo,
41
+ // iPad modal utilities
42
+ getIPadModalDimensions,
43
+ getPaywallDimensions,
44
+ type ModalDimensions,
45
+ type PaywallDimensions,
46
+ } from './detection';
47
+
48
+ // ============================================================================
49
+ // DOMAIN - Device entities and utilities
50
+ // ============================================================================
51
+
9
52
  export type {
10
53
  DeviceInfo,
11
54
  ApplicationInfo,
12
55
  SystemInfo,
13
- DeviceType,
56
+ DeviceType as DeviceInfoType,
14
57
  } from './domain/entities/Device';
15
58
 
16
59
  export {
@@ -21,13 +64,19 @@ export {
21
64
  export { DeviceTypeUtils } from './domain/entities/DeviceTypeUtils';
22
65
  export { DeviceMemoryUtils } from './domain/entities/DeviceMemoryUtils';
23
66
 
24
- // Infrastructure services
67
+ // ============================================================================
68
+ // INFRASTRUCTURE - Device services
69
+ // ============================================================================
70
+
25
71
  export { DeviceService } from './infrastructure/services/DeviceService';
26
72
  export { UserFriendlyIdService } from './infrastructure/services/UserFriendlyIdService';
27
73
  import { PersistentDeviceIdService } from './infrastructure/services/PersistentDeviceIdService';
28
74
  export { PersistentDeviceIdService };
29
75
 
30
- // Presentation hooks
76
+ // ============================================================================
77
+ // PRESENTATION - Device hooks
78
+ // ============================================================================
79
+
31
80
  export {
32
81
  useDeviceInfo,
33
82
  useDeviceCapabilities,
@@ -43,6 +92,10 @@ export type {
43
92
  UseAnonymousUserOptions,
44
93
  } from './presentation/hooks/useAnonymousUser';
45
94
 
95
+ // ============================================================================
96
+ // UTILITIES
97
+ // ============================================================================
98
+
46
99
  /**
47
100
  * Get anonymous user ID for services
48
101
  */
package/src/index.ts CHANGED
@@ -90,9 +90,6 @@ export {
90
90
 
91
91
  export {
92
92
  useResponsive,
93
- getScreenDimensions,
94
- isSmallPhone,
95
- isTablet,
96
93
  getResponsiveLogoSize,
97
94
  getResponsiveInputHeight,
98
95
  getResponsiveHorizontalPadding,
@@ -112,20 +109,71 @@ export {
112
109
  getResponsiveGridColumns,
113
110
  getResponsiveMaxWidth,
114
111
  getResponsiveFontSize,
115
- isLandscape,
116
- getDeviceType,
117
112
  getMinTouchTarget,
118
- getSpacingMultiplier,
119
113
  IOS_HIG,
120
114
  PLATFORM_CONSTANTS,
121
115
  isValidTouchTarget,
122
- DeviceType,
116
+ DEVICE_BREAKPOINTS,
123
117
  type ResponsiveModalLayout,
124
118
  type ResponsiveBottomSheetLayout,
125
119
  type ResponsiveDialogLayout,
126
120
  type UseResponsiveReturn,
127
121
  } from './responsive';
128
122
 
123
+ // =============================================================================
124
+ // DEVICE EXPORTS
125
+ // =============================================================================
126
+
127
+ export {
128
+ // Device detection
129
+ DeviceType,
130
+ getScreenDimensions,
131
+ isSmallPhone,
132
+ isTablet,
133
+ isLandscape,
134
+ getDeviceType,
135
+ getSpacingMultiplier,
136
+ // iPad detection
137
+ isIPad,
138
+ isIPadMini,
139
+ isIPadPro,
140
+ isIPadLandscape,
141
+ IPAD_BREAKPOINTS,
142
+ TOUCH_TARGETS,
143
+ CONTENT_WIDTH_CONSTRAINTS,
144
+ IPAD_LAYOUT_CONFIG,
145
+ // iPad utilities
146
+ getContentMaxWidth,
147
+ getIPadGridColumns,
148
+ getTouchTargetSize,
149
+ getIPadScreenPadding,
150
+ getIPadFontScale,
151
+ getIPadLayoutInfo,
152
+ getIPadModalDimensions,
153
+ getPaywallDimensions,
154
+ type IPadLayoutInfo,
155
+ type ModalDimensions,
156
+ type PaywallDimensions,
157
+ // Device info
158
+ DEVICE_CONSTANTS,
159
+ DeviceUtils,
160
+ DeviceTypeUtils,
161
+ DeviceMemoryUtils,
162
+ DeviceService,
163
+ UserFriendlyIdService,
164
+ PersistentDeviceIdService,
165
+ useDeviceInfo,
166
+ useDeviceCapabilities,
167
+ useDeviceId,
168
+ useAnonymousUser,
169
+ getAnonymousUserId,
170
+ type DeviceInfo,
171
+ type ApplicationInfo,
172
+ type SystemInfo,
173
+ type AnonymousUser,
174
+ type UseAnonymousUserOptions,
175
+ } from './device';
176
+
129
177
  // =============================================================================
130
178
  // ATOMS EXPORTS
131
179
  // =============================================================================
@@ -3,7 +3,7 @@
3
3
  * Responsive grid sizing and column calculations
4
4
  */
5
5
 
6
- import { getScreenDimensions } from './deviceDetection';
6
+ import { getScreenDimensions } from '../device/detection';
7
7
  import { DEVICE_BREAKPOINTS, GRID_CONFIG } from './config';
8
8
  import { validateNumber } from './validation';
9
9
 
@@ -1,24 +1,16 @@
1
1
  /**
2
- * @umituz/react-native-design-system-responsive - Public API
2
+ * @umituz/react-native-design-system/responsive - Public API
3
3
  *
4
- * Responsive design utilities for React Native - Screen dimensions, device detection,
5
- * and responsive sizing utilities following Material Design 3 and iOS HIG principles.
6
- *
7
- * Usage:
8
- * ```typescript
9
- * import { useResponsive, isTablet, getResponsiveLogoSize } from '@umituz/react-native-design-system-responsive';
10
- * ```
4
+ * Responsive sizing and layout utilities for React Native.
5
+ * For device detection, use '@umituz/react-native-design-system/device'.
11
6
  */
12
7
 
13
8
  // Hook exports
14
9
  export { useResponsive } from './useResponsive';
15
10
  export type { UseResponsiveReturn } from './useResponsive';
16
11
 
17
- // Utility function exports
12
+ // Responsive sizing utilities
18
13
  export {
19
- getScreenDimensions,
20
- isSmallPhone,
21
- isTablet,
22
14
  getResponsiveLogoSize,
23
15
  getResponsiveInputHeight,
24
16
  getResponsiveHorizontalPadding,
@@ -43,18 +35,10 @@ export {
43
35
  type GridCellSizeConfig,
44
36
  getResponsiveMaxWidth,
45
37
  getResponsiveFontSize,
46
- isLandscape,
47
- getDeviceType,
48
- DeviceType,
49
38
  MODAL_CONFIG,
50
39
  } from './responsive';
51
40
 
52
- // Device detection exports
53
- export { getSpacingMultiplier } from './deviceDetection';
54
-
55
-
56
-
57
- // Platform constants exports
41
+ // Platform constants
58
42
  export {
59
43
  IOS_HIG,
60
44
  PLATFORM_CONSTANTS,
@@ -62,34 +46,5 @@ export {
62
46
  getMinTouchTarget,
63
47
  } from './platformConstants';
64
48
 
65
- // iPad-specific exports
66
- export {
67
- IPAD_BREAKPOINTS,
68
- TOUCH_TARGETS,
69
- CONTENT_WIDTH_CONSTRAINTS,
70
- IPAD_LAYOUT_CONFIG,
71
- } from './iPadBreakpoints';
72
-
73
- export {
74
- isIPad,
75
- isIPadMini,
76
- isIPadPro,
77
- isIPadLandscape,
78
- } from './iPadDetection';
79
-
80
- export {
81
- getContentMaxWidth,
82
- getIPadGridColumns,
83
- getTouchTargetSize,
84
- getIPadScreenPadding,
85
- getIPadFontScale,
86
- getIPadLayoutInfo,
87
- type IPadLayoutInfo,
88
- } from './iPadLayoutUtils';
89
-
90
- export {
91
- getIPadModalDimensions,
92
- getPaywallDimensions,
93
- type ModalDimensions,
94
- type PaywallDimensions,
95
- } from './iPadModalUtils';
49
+ // Config exports
50
+ export { DEVICE_BREAKPOINTS } from './config';
@@ -1,22 +1,9 @@
1
1
  /**
2
2
  * Responsive Design Utilities
3
3
  *
4
- * Centralized responsive sizing and spacing utilities to prevent
5
- * Apple App Store rejection due to layout issues on different devices.
6
- *
7
- * This is the main export file that imports from specialized modules.
4
+ * Centralized responsive sizing and spacing utilities.
8
5
  */
9
6
 
10
- // Device detection
11
- export {
12
- getScreenDimensions,
13
- isSmallPhone,
14
- isTablet,
15
- isLandscape,
16
- getDeviceType,
17
- DeviceType,
18
- } from './deviceDetection';
19
-
20
7
  // Responsive sizing
21
8
  export {
22
9
  getResponsiveLogoSize,
@@ -53,14 +40,6 @@ export {
53
40
  type ResponsiveDialogLayout,
54
41
  } from './responsiveModal';
55
42
 
56
- // Platform constants
57
- export {
58
- IOS_HIG,
59
- PLATFORM_CONSTANTS,
60
- isValidTouchTarget,
61
- getMinTouchTarget,
62
- } from './platformConstants';
63
-
64
43
  // Configuration
65
44
  export {
66
45
  DEVICE_BREAKPOINTS,
@@ -72,6 +51,3 @@ export {
72
51
  VALIDATION_CONSTRAINTS,
73
52
  MODAL_CONFIG,
74
53
  } from './config';
75
-
76
-
77
-
@@ -3,7 +3,7 @@
3
3
  * Layout utilities for positioning and spacing.
4
4
  */
5
5
 
6
- import { getScreenDimensions } from './deviceDetection';
6
+ import { getScreenDimensions } from '../device/detection';
7
7
  import { DEVICE_BREAKPOINTS, LAYOUT_CONSTANTS } from './config';
8
8
  import { validateNumber, validateSafeAreaInsets } from './validation';
9
9
 
@@ -3,7 +3,7 @@
3
3
  * Modal, bottom sheet, and dialog layout utilities.
4
4
  */
5
5
 
6
- import { getScreenDimensions } from './deviceDetection';
6
+ import { getScreenDimensions } from '../device/detection';
7
7
  import {
8
8
  DEVICE_BREAKPOINTS,
9
9
  LAYOUT_CONSTANTS,
@@ -3,7 +3,7 @@
3
3
  * Responsive sizing utilities for UI components.
4
4
  */
5
5
 
6
- import { getScreenDimensions } from './deviceDetection';
6
+ import { getScreenDimensions } from '../device/detection';
7
7
  import {
8
8
  DEVICE_BREAKPOINTS,
9
9
  RESPONSIVE_PERCENTAGES,
@@ -28,17 +28,19 @@ import {
28
28
  getResponsiveGridColumns,
29
29
  getResponsiveMaxWidth,
30
30
  getResponsiveFontSize,
31
+ type ResponsiveModalLayout,
32
+ type ResponsiveBottomSheetLayout,
33
+ type ResponsiveDialogLayout,
34
+ } from './responsive';
35
+ import {
31
36
  isSmallPhone,
32
37
  isTablet,
33
38
  isLandscape,
34
39
  getDeviceType,
35
- getMinTouchTarget,
36
40
  DeviceType,
37
- type ResponsiveModalLayout,
38
- type ResponsiveBottomSheetLayout,
39
- type ResponsiveDialogLayout,
40
- } from './responsive';
41
- import { getSpacingMultiplier } from './deviceDetection';
41
+ getSpacingMultiplier,
42
+ } from '../device/detection';
43
+ import { getMinTouchTarget } from './platformConstants';
42
44
 
43
45
  export interface UseResponsiveReturn {
44
46
  // Device info