@umituz/react-native-design-system 2.6.5 → 2.6.6

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.5",
3
+ "version": "2.6.6",
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",
@@ -37,6 +37,18 @@ export const SplashScreen: React.FC<SplashScreenProps> = ({
37
37
  iconPlaceholder: `${tokens.colors.textPrimary}30`, // 30% opacity
38
38
  };
39
39
 
40
+ if (__DEV__) {
41
+ console.log('[SplashScreen] Component render:', {
42
+ visible,
43
+ appName,
44
+ tagline,
45
+ hasIcon: !!icon,
46
+ hasCustomColors: !!customColors,
47
+ resolvedColors: colors,
48
+ hasGradient: !!gradientColors,
49
+ });
50
+ }
51
+
40
52
  const handleTimeout = useCallback(() => {
41
53
  if (__DEV__) {
42
54
  console.log(`[SplashScreen] Timeout reached: ${maxDuration}ms`);
@@ -61,11 +73,15 @@ export const SplashScreen: React.FC<SplashScreenProps> = ({
61
73
 
62
74
  if (!visible) {
63
75
  if (__DEV__) {
64
- console.log("[SplashScreen] Not visible, returning null");
76
+ console.log("[SplashScreen] Not visible (visible=false), returning null");
65
77
  }
66
78
  return null;
67
79
  }
68
80
 
81
+ if (__DEV__) {
82
+ console.log("[SplashScreen] Rendering splash screen UI");
83
+ }
84
+
69
85
  const iconPlaceholderColor = colors.iconPlaceholder ?? `${colors.text}30`;
70
86
 
71
87
  const contentStyle = {
@@ -67,6 +67,15 @@ export const DesignSystemProvider: React.FC<DesignSystemProviderProps> = ({
67
67
  const initialize = useThemeStore((state) => state.initialize);
68
68
  const setCustomColors = useDesignSystemTheme((state) => state.setCustomColors);
69
69
 
70
+ if (__DEV__) {
71
+ console.log('[DesignSystemProvider] Component render:', {
72
+ isInitialized,
73
+ showLoadingIndicator,
74
+ hasSplashConfig: !!splashConfig,
75
+ splashConfigKeys: splashConfig ? Object.keys(splashConfig) : [],
76
+ });
77
+ }
78
+
70
79
  useEffect(() => {
71
80
  if (__DEV__) console.log('[DesignSystemProvider] Initializing...');
72
81
 
@@ -79,29 +88,45 @@ export const DesignSystemProvider: React.FC<DesignSystemProviderProps> = ({
79
88
  // Initialize theme store
80
89
  initialize()
81
90
  .then(() => {
82
- if (__DEV__) console.log('[DesignSystemProvider] Initialized successfully');
91
+ if (__DEV__) console.log('[DesignSystemProvider] Initialized successfully - setting isInitialized to true');
83
92
  setIsInitialized(true);
93
+ if (__DEV__) console.log('[DesignSystemProvider] State updated - calling onInitialized callback');
84
94
  onInitialized?.();
85
95
  })
86
96
  .catch((error) => {
87
97
  if (__DEV__) console.error('[DesignSystemProvider] Initialization failed:', error);
98
+ if (__DEV__) console.log('[DesignSystemProvider] Error occurred - setting isInitialized to true anyway');
88
99
  setIsInitialized(true); // Still render app even on error
89
100
  onError?.(error);
90
101
  });
91
102
  }, [initialize, customColors, setCustomColors, onInitialized, onError]);
92
103
 
93
104
  const renderContent = () => {
105
+ if (__DEV__) {
106
+ console.log('[DesignSystemProvider] renderContent:', {
107
+ showLoadingIndicator,
108
+ isInitialized,
109
+ hasSplashConfig: !!splashConfig,
110
+ hasLoadingComponent: !!loadingComponent,
111
+ });
112
+ }
113
+
94
114
  // Show loading indicator if requested and not yet initialized
95
115
  if (showLoadingIndicator && !isInitialized) {
116
+ if (__DEV__) console.log('[DesignSystemProvider] Showing loading state');
117
+
96
118
  if (loadingComponent) {
119
+ if (__DEV__) console.log('[DesignSystemProvider] Rendering custom loading component');
97
120
  return <>{loadingComponent}</>;
98
121
  }
99
-
122
+
100
123
  // Use SplashScreen if config provided, otherwise fallback to ActivityIndicator
101
124
  if (splashConfig) {
125
+ if (__DEV__) console.log('[DesignSystemProvider] Rendering SplashScreen with config:', splashConfig);
102
126
  return <SplashScreen {...splashConfig} />;
103
127
  }
104
128
 
129
+ if (__DEV__) console.log('[DesignSystemProvider] Rendering fallback ActivityIndicator');
105
130
  return (
106
131
  <View style={styles.loadingContainer}>
107
132
  <ActivityIndicator size="large" />
@@ -109,6 +134,7 @@ export const DesignSystemProvider: React.FC<DesignSystemProviderProps> = ({
109
134
  );
110
135
  }
111
136
 
137
+ if (__DEV__) console.log('[DesignSystemProvider] Rendering children (app initialized)');
112
138
  return <>{children}</>;
113
139
  };
114
140