@umituz/react-native-ai-generation-content 1.17.0 → 1.17.2

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.
Files changed (156) hide show
  1. package/package.json +13 -14
  2. package/src/domains/creations/domain/entities/Creation.ts +33 -2
  3. package/src/domains/creations/domain/entities/index.ts +1 -1
  4. package/src/domains/creations/domain/types/creation-categories.ts +133 -0
  5. package/src/domains/creations/domain/types/creation-filter.ts +131 -0
  6. package/src/domains/creations/domain/types/creation-types.ts +63 -0
  7. package/src/domains/creations/domain/types/index.ts +44 -0
  8. package/src/domains/creations/domain/utils/creation-helpers.ts +134 -0
  9. package/src/domains/creations/domain/utils/index.ts +8 -0
  10. package/src/domains/creations/domain/utils/preview-helpers.ts +84 -0
  11. package/src/domains/creations/domain/utils/status-helpers.ts +90 -0
  12. package/src/domains/creations/index.ts +95 -21
  13. package/src/domains/creations/infrastructure/repositories/CreationsRepository.ts +14 -1
  14. package/src/domains/creations/presentation/components/CreationActions.tsx +120 -0
  15. package/src/domains/creations/presentation/components/CreationBadges.tsx +111 -0
  16. package/src/domains/creations/presentation/components/CreationCard.tsx +201 -102
  17. package/src/domains/creations/presentation/components/CreationPreview.tsx +117 -0
  18. package/src/domains/creations/presentation/components/CreationsFilterBar.tsx +254 -0
  19. package/src/domains/creations/presentation/components/CreationsGrid.tsx +121 -68
  20. package/src/domains/creations/presentation/components/CreationsHomeCard.tsx +1 -1
  21. package/src/domains/creations/presentation/components/index.ts +23 -3
  22. package/src/domains/creations/presentation/hooks/index.ts +1 -0
  23. package/src/domains/creations/presentation/hooks/useAdvancedFilter.ts +261 -0
  24. package/src/domains/creations/presentation/screens/CreationsGalleryScreen.tsx +8 -6
  25. package/src/domains/face-detection/infrastructure/validators/faceValidator.ts +1 -1
  26. package/src/domains/prompts/infrastructure/services/PromptGenerationService.ts +1 -1
  27. package/src/domains/prompts/presentation/hooks/useFaceSwap.ts +2 -2
  28. package/src/domains/prompts/presentation/hooks/usePromptGeneration.ts +4 -4
  29. package/src/features/ai-hug/domain/index.ts +5 -0
  30. package/src/features/ai-hug/domain/types/ai-hug.types.ts +72 -0
  31. package/src/features/ai-hug/domain/types/index.ts +14 -0
  32. package/src/features/ai-hug/index.ts +27 -0
  33. package/src/features/ai-hug/infrastructure/index.ts +5 -0
  34. package/src/features/ai-hug/infrastructure/services/ai-hug-executor.ts +96 -0
  35. package/src/features/ai-hug/infrastructure/services/index.ts +6 -0
  36. package/src/features/ai-hug/presentation/hooks/index.ts +9 -0
  37. package/src/features/ai-hug/presentation/hooks/useAIHugFeature.ts +157 -0
  38. package/src/features/ai-hug/presentation/index.ts +5 -0
  39. package/src/features/ai-kiss/domain/index.ts +5 -0
  40. package/src/features/ai-kiss/domain/types/ai-kiss.types.ts +72 -0
  41. package/src/features/ai-kiss/domain/types/index.ts +14 -0
  42. package/src/features/ai-kiss/index.ts +27 -0
  43. package/src/features/ai-kiss/infrastructure/index.ts +5 -0
  44. package/src/features/ai-kiss/infrastructure/services/ai-kiss-executor.ts +96 -0
  45. package/src/features/ai-kiss/infrastructure/services/index.ts +6 -0
  46. package/src/features/ai-kiss/presentation/hooks/index.ts +9 -0
  47. package/src/features/ai-kiss/presentation/hooks/useAIKissFeature.ts +157 -0
  48. package/src/features/ai-kiss/presentation/index.ts +5 -0
  49. package/src/features/anime-selfie/domain/index.ts +5 -0
  50. package/src/features/anime-selfie/domain/types/anime-selfie.types.ts +72 -0
  51. package/src/features/anime-selfie/domain/types/index.ts +15 -0
  52. package/src/features/anime-selfie/index.ts +28 -0
  53. package/src/features/anime-selfie/infrastructure/index.ts +5 -0
  54. package/src/features/anime-selfie/infrastructure/services/anime-selfie-executor.ts +95 -0
  55. package/src/features/anime-selfie/infrastructure/services/index.ts +6 -0
  56. package/src/features/anime-selfie/presentation/hooks/index.ts +9 -0
  57. package/src/features/anime-selfie/presentation/hooks/useAnimeSelfieFeature.ts +138 -0
  58. package/src/features/anime-selfie/presentation/index.ts +5 -0
  59. package/src/features/background/domain/types/index.ts +15 -0
  60. package/src/features/background/domain/types/replace-background.types.ts +82 -0
  61. package/src/features/background/index.ts +31 -3
  62. package/src/features/background/infrastructure/index.ts +5 -0
  63. package/src/features/background/infrastructure/services/index.ts +6 -0
  64. package/src/features/background/infrastructure/services/replace-background-executor.ts +95 -0
  65. package/src/features/background/presentation/hooks/index.ts +6 -1
  66. package/src/features/background/presentation/hooks/useReplaceBackgroundFeature.ts +160 -0
  67. package/src/features/face-swap/domain/index.ts +5 -0
  68. package/src/features/face-swap/domain/types/face-swap.types.ts +72 -0
  69. package/src/features/face-swap/domain/types/index.ts +14 -0
  70. package/src/features/face-swap/index.ts +27 -1
  71. package/src/features/face-swap/infrastructure/index.ts +5 -0
  72. package/src/features/face-swap/infrastructure/services/face-swap-executor.ts +96 -0
  73. package/src/features/face-swap/infrastructure/services/index.ts +6 -0
  74. package/src/features/face-swap/presentation/hooks/index.ts +9 -0
  75. package/src/features/face-swap/presentation/hooks/useFaceSwapFeature.ts +157 -0
  76. package/src/features/face-swap/presentation/index.ts +5 -0
  77. package/src/features/image-to-video/domain/index.ts +1 -0
  78. package/src/features/image-to-video/domain/types/image-to-video.types.ts +71 -0
  79. package/src/features/image-to-video/domain/types/index.ts +10 -0
  80. package/src/features/image-to-video/index.ts +27 -0
  81. package/src/features/image-to-video/infrastructure/index.ts +1 -0
  82. package/src/features/image-to-video/infrastructure/services/image-to-video-executor.ts +112 -0
  83. package/src/features/image-to-video/infrastructure/services/index.ts +5 -0
  84. package/src/features/image-to-video/presentation/hooks/index.ts +5 -0
  85. package/src/features/image-to-video/presentation/hooks/useImageToVideoFeature.ts +121 -0
  86. package/src/features/image-to-video/presentation/index.ts +1 -0
  87. package/src/features/photo-restoration/domain/types/index.ts +2 -5
  88. package/src/features/photo-restoration/domain/types/photo-restore.types.ts +14 -0
  89. package/src/features/photo-restoration/index.ts +3 -8
  90. package/src/features/photo-restoration/infrastructure/services/index.ts +1 -6
  91. package/src/features/photo-restoration/infrastructure/services/photo-restore-executor.ts +64 -30
  92. package/src/features/photo-restoration/presentation/hooks/usePhotoRestoreFeature.ts +11 -6
  93. package/src/features/remove-background/domain/index.ts +5 -0
  94. package/src/features/remove-background/domain/types/index.ts +14 -0
  95. package/src/features/remove-background/domain/types/remove-background.types.ts +69 -0
  96. package/src/features/remove-background/index.ts +27 -0
  97. package/src/features/remove-background/infrastructure/index.ts +5 -0
  98. package/src/features/remove-background/infrastructure/services/index.ts +6 -0
  99. package/src/features/remove-background/infrastructure/services/remove-background-executor.ts +95 -0
  100. package/src/features/remove-background/presentation/hooks/index.ts +9 -0
  101. package/src/features/remove-background/presentation/hooks/useRemoveBackgroundFeature.ts +137 -0
  102. package/src/features/remove-background/presentation/index.ts +5 -0
  103. package/src/features/remove-object/domain/index.ts +5 -0
  104. package/src/features/remove-object/domain/types/index.ts +14 -0
  105. package/src/features/remove-object/domain/types/remove-object.types.ts +77 -0
  106. package/src/features/remove-object/index.ts +27 -0
  107. package/src/features/remove-object/infrastructure/index.ts +5 -0
  108. package/src/features/remove-object/infrastructure/services/index.ts +6 -0
  109. package/src/features/remove-object/infrastructure/services/remove-object-executor.ts +99 -0
  110. package/src/features/remove-object/presentation/hooks/index.ts +9 -0
  111. package/src/features/remove-object/presentation/hooks/useRemoveObjectFeature.ts +168 -0
  112. package/src/features/remove-object/presentation/index.ts +5 -0
  113. package/src/features/text-to-image/domain/index.ts +1 -0
  114. package/src/features/text-to-image/domain/types/index.ts +10 -0
  115. package/src/features/text-to-image/domain/types/text-to-image.types.ts +66 -0
  116. package/src/features/text-to-image/index.ts +27 -1
  117. package/src/features/text-to-image/infrastructure/index.ts +1 -0
  118. package/src/features/text-to-image/infrastructure/services/index.ts +5 -0
  119. package/src/features/text-to-image/infrastructure/services/text-to-image-executor.ts +113 -0
  120. package/src/features/text-to-image/presentation/hooks/index.ts +5 -0
  121. package/src/features/text-to-image/presentation/hooks/useTextToImageFeature.ts +111 -0
  122. package/src/features/text-to-image/presentation/index.ts +1 -0
  123. package/src/features/text-to-video/domain/index.ts +1 -0
  124. package/src/features/text-to-video/domain/types/index.ts +10 -0
  125. package/src/features/text-to-video/domain/types/text-to-video.types.ts +65 -0
  126. package/src/features/text-to-video/index.ts +27 -1
  127. package/src/features/text-to-video/infrastructure/index.ts +1 -0
  128. package/src/features/text-to-video/infrastructure/services/index.ts +5 -0
  129. package/src/features/text-to-video/infrastructure/services/text-to-video-executor.ts +108 -0
  130. package/src/features/text-to-video/presentation/hooks/index.ts +5 -0
  131. package/src/features/text-to-video/presentation/hooks/useTextToVideoFeature.ts +111 -0
  132. package/src/features/text-to-video/presentation/index.ts +1 -0
  133. package/src/features/text-to-voice/domain/index.ts +1 -0
  134. package/src/features/text-to-voice/domain/types/index.ts +10 -0
  135. package/src/features/text-to-voice/domain/types/text-to-voice.types.ts +65 -0
  136. package/src/features/text-to-voice/index.ts +27 -0
  137. package/src/features/text-to-voice/infrastructure/index.ts +1 -0
  138. package/src/features/text-to-voice/infrastructure/services/index.ts +5 -0
  139. package/src/features/text-to-voice/infrastructure/services/text-to-voice-executor.ts +111 -0
  140. package/src/features/text-to-voice/presentation/hooks/index.ts +5 -0
  141. package/src/features/text-to-voice/presentation/hooks/useTextToVoiceFeature.ts +105 -0
  142. package/src/features/text-to-voice/presentation/index.ts +1 -0
  143. package/src/features/upscaling/domain/types/index.ts +0 -1
  144. package/src/features/upscaling/domain/types/upscale.types.ts +14 -0
  145. package/src/features/upscaling/index.ts +3 -11
  146. package/src/features/upscaling/infrastructure/services/index.ts +1 -6
  147. package/src/features/upscaling/infrastructure/services/upscale-executor.ts +64 -30
  148. package/src/features/upscaling/presentation/hooks/useUpscaleFeature.ts +12 -7
  149. package/src/index.ts +63 -0
  150. package/src/features/face-swap/domain/entities.ts +0 -48
  151. package/src/features/photo-restoration/domain/types/provider.types.ts +0 -23
  152. package/src/features/photo-restoration/infrastructure/services/photo-restore-provider-registry.ts +0 -77
  153. package/src/features/text-to-image/domain/entities.ts +0 -58
  154. package/src/features/text-to-video/domain/entities.ts +0 -52
  155. package/src/features/upscaling/domain/types/provider.types.ts +0 -23
  156. package/src/features/upscaling/infrastructure/services/upscale-provider-registry.ts +0 -77
@@ -0,0 +1,254 @@
1
+ /**
2
+ * CreationsFilterBar Component
3
+ * Filter buttons with dropdown-style appearance
4
+ */
5
+
6
+ import React, { useMemo } from "react";
7
+ import { View, StyleSheet, ScrollView, TouchableOpacity } from "react-native";
8
+ import {
9
+ useAppDesignTokens,
10
+ AtomicText,
11
+ AtomicIcon,
12
+ } from "@umituz/react-native-design-system";
13
+
14
+ /**
15
+ * Filter button configuration
16
+ */
17
+ export interface FilterButton {
18
+ /** Unique filter identifier */
19
+ id: string;
20
+ /** Display label */
21
+ label: string;
22
+ /** Icon name */
23
+ icon?: string;
24
+ /** Is this filter active */
25
+ active: boolean;
26
+ /** Handler when pressed */
27
+ onPress: () => void;
28
+ }
29
+
30
+ interface CreationsFilterBarProps {
31
+ /** Array of filter buttons */
32
+ readonly filters: FilterButton[];
33
+ /** Show clear button when any filter is active */
34
+ readonly showClearButton?: boolean;
35
+ /** Clear button label */
36
+ readonly clearLabel?: string;
37
+ /** Clear all filters handler */
38
+ readonly onClear?: () => void;
39
+ /** Has any active filters (for showing clear button) */
40
+ readonly hasActiveFilters?: boolean;
41
+ }
42
+
43
+ export function CreationsFilterBar({
44
+ filters,
45
+ showClearButton = true,
46
+ clearLabel = "Clear",
47
+ onClear,
48
+ hasActiveFilters = false,
49
+ }: CreationsFilterBarProps) {
50
+ const tokens = useAppDesignTokens();
51
+
52
+ const styles = useMemo(
53
+ () =>
54
+ StyleSheet.create({
55
+ container: {
56
+ marginTop: 8,
57
+ },
58
+ scrollContent: {
59
+ paddingHorizontal: 16,
60
+ gap: 8,
61
+ flexDirection: "row",
62
+ },
63
+ filterButton: {
64
+ flexDirection: "row",
65
+ alignItems: "center",
66
+ paddingHorizontal: 12,
67
+ paddingVertical: 8,
68
+ borderRadius: 20,
69
+ minHeight: 36,
70
+ gap: 6,
71
+ },
72
+ filterButtonActive: {
73
+ backgroundColor: tokens.colors.primary + "15",
74
+ borderWidth: 1,
75
+ borderColor: tokens.colors.primary,
76
+ },
77
+ filterButtonInactive: {
78
+ backgroundColor: tokens.colors.backgroundSecondary,
79
+ },
80
+ filterText: {
81
+ fontSize: 14,
82
+ },
83
+ clearButton: {
84
+ flexDirection: "row",
85
+ alignItems: "center",
86
+ paddingHorizontal: 12,
87
+ paddingVertical: 8,
88
+ borderRadius: 20,
89
+ borderWidth: 1,
90
+ borderColor: tokens.colors.primary,
91
+ minHeight: 36,
92
+ },
93
+ clearText: {
94
+ marginLeft: 4,
95
+ },
96
+ }),
97
+ [tokens]
98
+ );
99
+
100
+ return (
101
+ <View style={styles.container}>
102
+ <ScrollView
103
+ horizontal
104
+ showsHorizontalScrollIndicator={false}
105
+ contentContainerStyle={styles.scrollContent}
106
+ >
107
+ {filters.map((filter) => (
108
+ <TouchableOpacity
109
+ key={filter.id}
110
+ style={[
111
+ styles.filterButton,
112
+ filter.active
113
+ ? styles.filterButtonActive
114
+ : styles.filterButtonInactive,
115
+ ]}
116
+ onPress={filter.onPress}
117
+ >
118
+ {filter.icon && (
119
+ <AtomicIcon
120
+ name={filter.icon}
121
+ size="sm"
122
+ color={filter.active ? "primary" : "secondary"}
123
+ />
124
+ )}
125
+ <AtomicText
126
+ type="bodyMedium"
127
+ style={[
128
+ styles.filterText,
129
+ {
130
+ color: filter.active
131
+ ? tokens.colors.primary
132
+ : tokens.colors.textPrimary,
133
+ fontWeight: filter.active ? "600" : "400",
134
+ },
135
+ ]}
136
+ >
137
+ {filter.label}
138
+ </AtomicText>
139
+ <AtomicIcon
140
+ name="chevron-down"
141
+ size="xs"
142
+ color={filter.active ? "primary" : "secondary"}
143
+ />
144
+ </TouchableOpacity>
145
+ ))}
146
+
147
+ {showClearButton && hasActiveFilters && onClear && (
148
+ <TouchableOpacity style={styles.clearButton} onPress={onClear}>
149
+ <AtomicIcon name="close" size="sm" color="primary" />
150
+ <AtomicText
151
+ type="bodySmall"
152
+ style={[styles.clearText, { color: tokens.colors.primary }]}
153
+ >
154
+ {clearLabel}
155
+ </AtomicText>
156
+ </TouchableOpacity>
157
+ )}
158
+ </ScrollView>
159
+ </View>
160
+ );
161
+ }
162
+
163
+ /**
164
+ * Helper to create filter buttons from filter state
165
+ */
166
+ export function createMediaFilterButtons(
167
+ activeFilter: string,
168
+ onSelect: (filter: string) => void,
169
+ labels: { all: string; images: string; videos: string; voice: string }
170
+ ): FilterButton[] {
171
+ return [
172
+ {
173
+ id: "all",
174
+ label: labels.all,
175
+ icon: "grid",
176
+ active: activeFilter === "all",
177
+ onPress: () => onSelect("all"),
178
+ },
179
+ {
180
+ id: "image",
181
+ label: labels.images,
182
+ icon: "image",
183
+ active: activeFilter === "image",
184
+ onPress: () => onSelect("image"),
185
+ },
186
+ {
187
+ id: "video",
188
+ label: labels.videos,
189
+ icon: "film",
190
+ active: activeFilter === "video",
191
+ onPress: () => onSelect("video"),
192
+ },
193
+ {
194
+ id: "voice",
195
+ label: labels.voice,
196
+ icon: "mic",
197
+ active: activeFilter === "voice",
198
+ onPress: () => onSelect("voice"),
199
+ },
200
+ ];
201
+ }
202
+
203
+ /**
204
+ * Helper to create status filter buttons
205
+ */
206
+ export function createStatusFilterButtons(
207
+ activeFilter: string,
208
+ onSelect: (filter: string) => void,
209
+ labels: {
210
+ all: string;
211
+ completed: string;
212
+ pending: string;
213
+ processing: string;
214
+ failed: string;
215
+ }
216
+ ): FilterButton[] {
217
+ return [
218
+ {
219
+ id: "all",
220
+ label: labels.all,
221
+ icon: "options",
222
+ active: activeFilter === "all",
223
+ onPress: () => onSelect("all"),
224
+ },
225
+ {
226
+ id: "completed",
227
+ label: labels.completed,
228
+ icon: "checkmark-circle",
229
+ active: activeFilter === "completed",
230
+ onPress: () => onSelect("completed"),
231
+ },
232
+ {
233
+ id: "processing",
234
+ label: labels.processing,
235
+ icon: "refresh",
236
+ active: activeFilter === "processing",
237
+ onPress: () => onSelect("processing"),
238
+ },
239
+ {
240
+ id: "pending",
241
+ label: labels.pending,
242
+ icon: "time",
243
+ active: activeFilter === "pending",
244
+ onPress: () => onSelect("pending"),
245
+ },
246
+ {
247
+ id: "failed",
248
+ label: labels.failed,
249
+ icon: "close-circle",
250
+ active: activeFilter === "failed",
251
+ onPress: () => onSelect("failed"),
252
+ },
253
+ ];
254
+ }
@@ -1,77 +1,130 @@
1
- import React from 'react';
2
- import { FlatList, RefreshControl, StyleSheet, type ViewStyle } from 'react-native';
3
- import { useAppDesignTokens, type DesignTokens } from "@umituz/react-native-design-system";
4
- import type { Creation } from "../../domain/entities/Creation";
5
- import { CreationCard } from "./CreationCard";
1
+ /**
2
+ * CreationsGrid Component
3
+ * Grid/list of creation cards with refresh support
4
+ */
6
5
 
7
- interface CreationsGridProps {
8
- readonly creations: Creation[];
9
- readonly isLoading: boolean;
10
- readonly onRefresh: () => void;
11
- readonly onView: (creation: Creation) => void;
12
- readonly onShare: (creation: Creation) => void;
13
- readonly onDelete: (creation: Creation) => void;
14
- readonly onFavorite?: (creation: Creation, isFavorite: boolean) => void;
15
- readonly locale?: string;
16
- readonly contentContainerStyle?: ViewStyle;
17
- readonly ListEmptyComponent?: React.ReactElement | null;
18
- readonly ListHeaderComponent?: React.ComponentType<unknown> | React.ReactElement | null;
6
+ import React, { useCallback } from "react";
7
+ import {
8
+ FlatList,
9
+ RefreshControl,
10
+ StyleSheet,
11
+ type ViewStyle,
12
+ } from "react-native";
13
+ import {
14
+ useAppDesignTokens,
15
+ type DesignTokens,
16
+ } from "@umituz/react-native-design-system";
17
+ import { CreationCard, type CreationCardData } from "./CreationCard";
18
+
19
+ interface CreationsGridProps<T extends CreationCardData> {
20
+ /** Array of creations to display */
21
+ readonly creations: T[];
22
+ /** Loading state for refresh indicator */
23
+ readonly isLoading: boolean;
24
+ /** Pull to refresh handler */
25
+ readonly onRefresh: () => void;
26
+ /** Press handler */
27
+ readonly onPress?: (creation: T) => void;
28
+ /** Download handler */
29
+ readonly onDownload?: (creation: T) => Promise<void>;
30
+ /** Share handler */
31
+ readonly onShare?: (creation: T) => Promise<void>;
32
+ /** Delete handler */
33
+ readonly onDelete?: (creation: T) => void;
34
+ /** Favorite handler */
35
+ readonly onFavorite?: (creation: T) => void;
36
+ /** Post to feed handler */
37
+ readonly onPostToFeed?: (creation: T) => void;
38
+ /** Date formatter */
39
+ readonly formatDate?: (date: Date) => string;
40
+ /** Can post to feed */
41
+ readonly canPostToFeed?: boolean;
42
+ /** Content container style */
43
+ readonly contentContainerStyle?: ViewStyle;
44
+ /** Empty state component */
45
+ readonly ListEmptyComponent?: React.ReactElement | null;
46
+ /** Header component */
47
+ readonly ListHeaderComponent?:
48
+ | React.ComponentType<unknown>
49
+ | React.ReactElement
50
+ | null;
19
51
  }
20
52
 
21
- export const CreationsGrid: React.FC<CreationsGridProps> = ({
22
- creations,
23
- isLoading,
24
- onRefresh,
25
- onView,
26
- onShare,
27
- onDelete,
28
- onFavorite,
29
- locale,
30
- contentContainerStyle,
31
- ListEmptyComponent,
32
- ListHeaderComponent,
33
- }) => {
34
- const tokens = useAppDesignTokens();
35
- const styles = useStyles(tokens);
53
+ export function CreationsGrid<T extends CreationCardData>({
54
+ creations,
55
+ isLoading,
56
+ onRefresh,
57
+ onPress,
58
+ onDownload,
59
+ onShare,
60
+ onDelete,
61
+ onFavorite,
62
+ onPostToFeed,
63
+ formatDate,
64
+ canPostToFeed = false,
65
+ contentContainerStyle,
66
+ ListEmptyComponent,
67
+ ListHeaderComponent,
68
+ }: CreationsGridProps<T>) {
69
+ const tokens = useAppDesignTokens();
70
+ const styles = useStyles(tokens);
36
71
 
37
- const renderItem = ({ item }: { item: Creation }) => (
38
- <CreationCard
39
- creation={item}
40
- onView={() => onView(item)}
41
- onShare={() => onShare(item)}
42
- onDelete={() => onDelete(item)}
43
- onFavorite={onFavorite ? (creation, isFavorite) => onFavorite(creation, isFavorite) : undefined}
44
- locale={locale}
45
- />
46
- );
72
+ const renderItem = useCallback(
73
+ ({ item }: { item: T }) => (
74
+ <CreationCard
75
+ creation={item}
76
+ callbacks={{
77
+ onPress: onPress ? () => onPress(item) : undefined,
78
+ onDownload: onDownload ? () => onDownload(item) : undefined,
79
+ onShare: onShare ? () => onShare(item) : undefined,
80
+ onDelete: onDelete ? () => onDelete(item) : undefined,
81
+ onFavorite: onFavorite ? () => onFavorite(item) : undefined,
82
+ onPostToFeed: onPostToFeed ? () => onPostToFeed(item) : undefined,
83
+ }}
84
+ formatDate={formatDate}
85
+ canPostToFeed={canPostToFeed}
86
+ />
87
+ ),
88
+ [
89
+ onPress,
90
+ onDownload,
91
+ onShare,
92
+ onDelete,
93
+ onFavorite,
94
+ onPostToFeed,
95
+ formatDate,
96
+ canPostToFeed,
97
+ ]
98
+ );
47
99
 
48
- return (
49
- <FlatList
50
- data={creations}
51
- renderItem={renderItem}
52
- keyExtractor={(item) => item.id}
53
- ListHeaderComponent={ListHeaderComponent}
54
- ListEmptyComponent={ListEmptyComponent}
55
- contentContainerStyle={[
56
- styles.list,
57
- contentContainerStyle,
58
- (!creations || creations.length === 0) && { flexGrow: 1 }
59
- ]}
60
- showsVerticalScrollIndicator={false}
61
- refreshControl={
62
- <RefreshControl
63
- refreshing={isLoading}
64
- onRefresh={onRefresh}
65
- tintColor={tokens.colors.primary}
66
- />
67
- }
100
+ return (
101
+ <FlatList
102
+ data={creations}
103
+ renderItem={renderItem}
104
+ keyExtractor={(item) => item.id}
105
+ ListHeaderComponent={ListHeaderComponent}
106
+ ListEmptyComponent={ListEmptyComponent}
107
+ contentContainerStyle={[
108
+ styles.list,
109
+ contentContainerStyle,
110
+ (!creations || creations.length === 0) && { flexGrow: 1 },
111
+ ]}
112
+ showsVerticalScrollIndicator={false}
113
+ refreshControl={
114
+ <RefreshControl
115
+ refreshing={isLoading}
116
+ onRefresh={onRefresh}
117
+ tintColor={tokens.colors.primary}
68
118
  />
69
- );
70
- };
119
+ }
120
+ />
121
+ );
122
+ }
71
123
 
72
- const useStyles = (tokens: DesignTokens) => StyleSheet.create({
124
+ const useStyles = (tokens: DesignTokens) =>
125
+ StyleSheet.create({
73
126
  list: {
74
- padding: tokens.spacing.md,
75
- paddingBottom: 100, // Space for fab or bottom tab
127
+ padding: tokens.spacing.md,
128
+ paddingBottom: 100,
76
129
  },
77
- });
130
+ });
@@ -34,7 +34,7 @@ export function CreationsHomeCard({
34
34
  }: CreationsHomeCardProps) {
35
35
  const tokens = useAppDesignTokens();
36
36
 
37
- // eslint-disable-next-line no-console
37
+
38
38
  if (__DEV__) {
39
39
  // eslint-disable-next-line no-console
40
40
  console.log("[CreationsHomeCard] Render:", {
@@ -2,15 +2,35 @@
2
2
  * Presentation Components
3
3
  */
4
4
 
5
+ // Core Components
6
+ export { CreationPreview } from "./CreationPreview";
7
+ export { CreationBadges } from "./CreationBadges";
8
+ export { CreationActions, type CreationAction } from "./CreationActions";
9
+ export {
10
+ CreationCard,
11
+ type CreationCardData,
12
+ type CreationCardCallbacks,
13
+ } from "./CreationCard";
14
+ export { CreationThumbnail } from "./CreationThumbnail";
15
+
16
+ // Filter Components
17
+ export { FilterChips } from "./FilterChips";
18
+ export {
19
+ CreationsFilterBar,
20
+ createMediaFilterButtons,
21
+ createStatusFilterButtons,
22
+ type FilterButton,
23
+ } from "./CreationsFilterBar";
24
+
25
+ // Gallery Components
5
26
  export { GalleryHeader } from "./GalleryHeader";
6
27
  export { EmptyState } from "./EmptyState";
7
28
  export { GalleryEmptyStates } from "./GalleryEmptyStates";
8
- export { FilterChips } from "./FilterChips";
9
29
  export { CreationsHomeCard } from "./CreationsHomeCard";
10
- export { CreationCard } from "./CreationCard";
11
- export { CreationThumbnail } from "./CreationThumbnail";
12
30
  export { CreationImageViewer } from "./CreationImageViewer";
13
31
  export { CreationsGrid } from "./CreationsGrid";
32
+
33
+ // Provider
14
34
  export { CreationsProvider, useCreationsProvider } from "./CreationsProvider";
15
35
 
16
36
  // Detail Components
@@ -5,3 +5,4 @@
5
5
  export { useCreations } from "./useCreations";
6
6
  export { useDeleteCreation } from "./useDeleteCreation";
7
7
  export { useCreationsFilter } from "./useCreationsFilter";
8
+ export { useAdvancedFilter } from "./useAdvancedFilter";