@umituz/react-native-design-system 4.27.23 → 4.27.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": "4.27.23",
3
+ "version": "4.27.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 - TanStack persistence and expo-image-manipulator now lazy loaded",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./dist/index.d.ts",
@@ -127,8 +127,10 @@ export const AtomicIcon: React.FC<AtomicIconProps> = React.memo(
127
127
  // No icon renderer provided - warn in dev and render nothing
128
128
  if (!iconRenderer) {
129
129
  if (__DEV__) {
130
- console.warn(
131
- '[DesignSystem] AtomicIcon requires an iconRenderer in DesignSystemProvider.\n' +
130
+ console.error(
131
+ '[DesignSystem] AtomicIcon: No iconRenderer configured!\n' +
132
+ `Attempted to render icon: "${name}"\n` +
133
+ 'Fix: Provide iconRenderer to DesignSystemProvider.\n' +
132
134
  'Example:\n' +
133
135
  '<DesignSystemProvider\n' +
134
136
  ' iconRenderer={({ name, size, color }) => (\n' +
@@ -78,6 +78,12 @@ function InfiniteScrollListComponent<T>({
78
78
  [config],
79
79
  );
80
80
 
81
+ // Memoize renderItem wrapper to prevent unnecessary re-renders
82
+ const memoizedRenderItem = useCallback(
83
+ ({ item, index }: { item: T; index: number }) => renderItem(item, index),
84
+ [renderItem]
85
+ );
86
+
81
87
  // Loading state
82
88
  if (state.isLoading) {
83
89
  return loadingComponent || <Loading />;
@@ -93,12 +99,6 @@ function InfiniteScrollListComponent<T>({
93
99
  return emptyComponent || <Empty />;
94
100
  }
95
101
 
96
- // Memoize renderItem wrapper to prevent unnecessary re-renders
97
- const memoizedRenderItem = useCallback(
98
- ({ item, index }: { item: T; index: number }) => renderItem(item, index),
99
- [renderItem]
100
- );
101
-
102
102
  // Render list
103
103
  return (
104
104
  <FlatList
@@ -7,6 +7,7 @@ import { create } from 'zustand';
7
7
  import { persist, createJSONStorage } from 'zustand/middleware';
8
8
  import type { StoreApi } from 'zustand';
9
9
  import type { StoreConfig } from '../types/Store';
10
+ import AsyncStorage from '@react-native-async-storage/async-storage';
10
11
 
11
12
  /**
12
13
  * Create a Zustand store with optional persistence and actions
@@ -36,7 +37,7 @@ export function createStore<
36
37
  name: config.name,
37
38
  storage: config.storage
38
39
  ? createJSONStorage(() => config.storage!)
39
- : createJSONStorage(() => require('@react-native-async-storage/async-storage').default),
40
+ : createJSONStorage(() => AsyncStorage),
40
41
  version: config.version || 1,
41
42
  partialize: (config.partialize
42
43
  ? (state: Store) => config.partialize!(state)
@@ -61,8 +61,18 @@ export const DesignSystemProvider: React.FC<DesignSystemProviderProps> = ({
61
61
  if (iconRenderer && iconNames) {
62
62
  const store = useIconStore.getState();
63
63
  if (!store.isConfigured) {
64
+ if (__DEV__) {
65
+ console.log('[DesignSystemProvider] ✅ Registering iconRenderer and iconNames');
66
+ }
64
67
  useIconStore.getState().setConfig(iconNames, iconRenderer);
68
+ } else if (__DEV__) {
69
+ console.log('[DesignSystemProvider] ℹ️ Icon config already configured, skipping');
65
70
  }
71
+ } else if (__DEV__) {
72
+ console.warn('[DesignSystemProvider] ❌ iconRenderer or iconNames missing!', {
73
+ hasIconRenderer: !!iconRenderer,
74
+ hasIconNames: !!iconNames,
75
+ });
66
76
  }
67
77
 
68
78
  useEffect(() => {