@umituz/react-native-ai-generation-content 1.12.17 → 1.12.19

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-ai-generation-content",
3
- "version": "1.12.17",
3
+ "version": "1.12.19",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -44,6 +44,7 @@ export class CreationsService extends BaseRepository {
44
44
  metadata: dto.metadata,
45
45
  createdAt: new Date(),
46
46
  isShared: false,
47
+ isFavorite: false,
47
48
  });
48
49
 
49
50
  return creationId;
@@ -154,7 +154,7 @@ export function CreationCard({
154
154
  <Image source={{ uri: creation.uri }} style={styles.thumbnail} />
155
155
  {isSelectionMode && (
156
156
  <View style={styles.selectionOverlay}>
157
- {isSelected && <AtomicIcon name="checkmark-circle" size="xs" color="white" />}
157
+ {isSelected && <AtomicIcon name="checkmark-circle" size="xs" color="onPrimary" />}
158
158
  </View>
159
159
  )}
160
160
  </View>
@@ -48,7 +48,7 @@ export const CreationImageViewer: React.FC<CreationImageViewerProps> = ({
48
48
  activeOpacity={0.7}
49
49
  hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
50
50
  >
51
- <AtomicIcon name="close" size="lg" color="white" />
51
+ <AtomicIcon name="close" size="lg" color="onPrimary" />
52
52
  </TouchableOpacity>
53
53
  </View>
54
54
  );
@@ -68,7 +68,7 @@ export const CreationImageViewer: React.FC<CreationImageViewerProps> = ({
68
68
  backgroundColor: 'rgba(0,0,0,0.5)',
69
69
  paddingHorizontal: tokens.spacing.md,
70
70
  paddingVertical: tokens.spacing.xs,
71
- borderRadius: tokens.spacing.pill || 20,
71
+ borderRadius: 999,
72
72
  justifyContent: 'center',
73
73
  },
74
74
  counterText: {
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo, useCallback, useState } from "react";
2
- import { View, StyleSheet } from "react-native";
2
+ import { View, TouchableOpacity } from "react-native";
3
3
  import {
4
4
  useAppDesignTokens,
5
5
  useSharing,
@@ -7,9 +7,9 @@ import {
7
7
  ScreenHeader,
8
8
  useAlert,
9
9
  AlertMode,
10
+ AtomicIcon,
10
11
  type BottomSheetModalRef
11
12
  } from "@umituz/react-native-design-system";
12
- import { useFocusEffect } from "@react-navigation/native";
13
13
  import { useCreations } from "../hooks/useCreations";
14
14
  import { useDeleteCreation } from "../hooks/useDeleteCreation";
15
15
  import { useCreationsFilter } from "../hooks/useCreationsFilter";
@@ -92,15 +92,6 @@ export function CreationsGalleryScreen({
92
92
  const [selectedItemIds, setSelectedItemIds] = useState<string[]>([]);
93
93
  const [isSelectionMode, setIsSelectionMode] = useState(false);
94
94
 
95
-
96
-
97
- // Refetch creations when screen comes into focus
98
- useFocusEffect(
99
- useCallback(() => {
100
- refetch();
101
- }, [refetch])
102
- );
103
-
104
95
  // Prepare data for UI using utils
105
96
  const translatedTypes = useMemo(() => getTranslatedTypes(config, t), [config, t]);
106
97
  const allCategories = useMemo(() => getFilterCategoriesFromConfig(config, t), [config, t]);
@@ -186,10 +177,11 @@ export function CreationsGalleryScreen({
186
177
  <ScreenHeader
187
178
  title={isSelectionMode ? `${selectedItemIds.length} Selected` : screenTitle}
188
179
  onBackPress={isSelectionMode ? () => { setIsSelectionMode(false); setSelectedItemIds([]); } : onBackPress}
189
- rightAction={isSelectionMode ? {
190
- icon: 'trash',
191
- onPress: handleDeleteSelected,
192
- } : undefined}
180
+ rightAction={isSelectionMode ? (
181
+ <TouchableOpacity onPress={handleDeleteSelected}>
182
+ <AtomicIcon name="trash" color="error" size="md" />
183
+ </TouchableOpacity>
184
+ ) : undefined}
193
185
  />
194
186
  )}
195
187
  {!isSelectionMode && enableSearch && (
@@ -205,22 +197,20 @@ export function CreationsGalleryScreen({
205
197
  }
206
198
  contentContainerStyle={{ paddingHorizontal: 0 }}
207
199
  >
208
- {(!creations || creations?.length === 0) && !isLoading ? null : (
209
- showGalleryHeader ? (
210
- <GalleryHeader
211
- title={showScreenHeader || isSelectionMode ? '' : screenTitle}
212
- count={filtered.length}
213
- countLabel=''
214
- subtitle={showCount ? t(config.translations.photoCount, { count: filtered.length }) : undefined}
215
- isFiltered={isFiltered}
216
- filterLabel={t(config.translations.filterLabel) || 'Filter'}
217
- onFilterPress={() => filterSheetRef.current?.present()}
218
- onFavoritesPress={() => setShowOnlyFavorites(!showOnlyFavorites)}
219
- showOnlyFavorites={showOnlyFavorites}
220
- isFilterEnabled={enableFilter}
221
- showCount={showCount}
222
- />
223
- ) : null
200
+ {creations && creations.length > 0 && showGalleryHeader && (
201
+ <GalleryHeader
202
+ title={showScreenHeader || isSelectionMode ? '' : screenTitle}
203
+ count={filtered.length}
204
+ countLabel=''
205
+ subtitle={showCount ? t(config.translations.photoCount, { count: filtered.length }) : undefined}
206
+ isFiltered={isFiltered}
207
+ filterLabel={t(config.translations.filterLabel) || 'Filter'}
208
+ onFilterPress={() => filterSheetRef.current?.present()}
209
+ onFavoritesPress={() => setShowOnlyFavorites(!showOnlyFavorites)}
210
+ showOnlyFavorites={showOnlyFavorites}
211
+ isFilterEnabled={enableFilter}
212
+ showCount={showCount}
213
+ />
224
214
  )}
225
215
 
226
216
  {/* Main Content Grid - handles empty/loading via ListEmptyComponent */}