@umituz/react-native-design-system 4.26.4 → 4.26.5

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": "4.26.4",
3
+ "version": "4.26.5",
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 - TanStack persistence and expo-image-manipulator now lazy loaded",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./dist/index.d.ts",
@@ -3,7 +3,7 @@
3
3
  * Refactored: Extracted configs, styles, and types
4
4
  */
5
5
 
6
- import React from 'react';
6
+ import React, { useCallback } from 'react';
7
7
  import { StyleProp, ViewStyle, TextStyle, TouchableOpacity } from 'react-native';
8
8
  import { AtomicText } from '../AtomicText';
9
9
  import { AtomicIcon } from '../icon';
@@ -35,11 +35,11 @@ export const AtomicButton: React.FC<AtomicButtonProps> = React.memo(({
35
35
  }) => {
36
36
  const tokens = useAppDesignTokens();
37
37
 
38
- const handlePress = () => {
38
+ const handlePress = useCallback(() => {
39
39
  if (!disabled && !loading) {
40
40
  onPress();
41
41
  }
42
- };
42
+ }, [disabled, loading, onPress]);
43
43
 
44
44
  const isDisabled = disabled || loading;
45
45
  const config = getButtonSizeConfig(size, tokens);
@@ -101,7 +101,11 @@ export class PersistentDeviceIdService {
101
101
  try {
102
102
  // Wait for pending initialization to prevent race condition
103
103
  if (initializationPromise) {
104
- await initializationPromise.catch(() => {});
104
+ await initializationPromise.catch((error) => {
105
+ if (__DEV__) {
106
+ console.warn('[DesignSystem] Device ID: Initialization failed while clearing ID', error);
107
+ }
108
+ });
105
109
  }
106
110
  await this.secureRepo.remove();
107
111
  cachedDeviceId = null;
@@ -79,7 +79,10 @@ export const useTheme = createStore<ThemeState, ThemeActions>({
79
79
  const dsTheme = useDesignSystemTheme.getState();
80
80
  dsTheme.setThemeMode(mode);
81
81
  dsTheme.setCustomColors(colors);
82
- } catch {
82
+ } catch (error) {
83
+ if (__DEV__) {
84
+ console.error('[ThemeStore] Failed to initialize theme:', error);
85
+ }
83
86
  set({ isInitialized: true, _initInProgress: false });
84
87
  useDesignSystemTheme.getState().setThemeMode(defaultThemeMode);
85
88
  } finally {