@umituz/react-native-ai-generation-content 1.83.22 → 1.83.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-ai-generation-content",
3
- "version": "1.83.22",
3
+ "version": "1.83.24",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -34,6 +34,7 @@ export function CreationsGalleryScreen({
34
34
  onBack,
35
35
  onTryAgain,
36
36
  getCreationTitle,
37
+ onCreationPress,
37
38
  }: CreationsGalleryScreenProps) {
38
39
  const tokens = useAppDesignTokens();
39
40
 
@@ -96,13 +97,13 @@ export function CreationsGalleryScreen({
96
97
  creation={item}
97
98
  titleText={getItemTitle(item)}
98
99
  callbacks={{
99
- onPress: () => callbacks.handleCardPress(item),
100
+ onPress: () => onCreationPress ? onCreationPress(item) : callbacks.handleCardPress(item),
100
101
  onShare: async () => callbacks.handleShareCard(item),
101
102
  onDelete: () => callbacks.handleDelete(item),
102
103
  onFavorite: () => callbacks.handleFavorite(item),
103
104
  }}
104
105
  />
105
- ), [callbacks, getItemTitle]);
106
+ ), [callbacks, getItemTitle, onCreationPress]);
106
107
 
107
108
  const hasScreenHeader = Boolean(onBack);
108
109
 
@@ -114,7 +115,7 @@ export function CreationsGalleryScreen({
114
115
  <GalleryHeader
115
116
  title={hasScreenHeader ? "" : t(config.translations.title)}
116
117
  count={filters.filtered.length}
117
- countLabel={t(config.translations.photoCount, { count: filters.filtered.length })}
118
+ countLabel={`${filters.filtered.length} ${t(config.translations.photoCount)}`}
118
119
  showFilter={showFilter}
119
120
  filterButtons={filterButtons}
120
121
  />
@@ -20,4 +20,6 @@ export interface CreationsGalleryScreenProps {
20
20
  readonly onTryAgain?: () => void;
21
21
  /** Function to get dynamic title from creation metadata */
22
22
  readonly getCreationTitle?: (creation: { type: string; metadata?: Record<string, unknown> }) => string;
23
+ /** Custom handler when a creation card is pressed. When provided, overrides the built-in preview. */
24
+ readonly onCreationPress?: (creation: { id: string; uri: string; type: string; originalUri?: string; output?: { imageUrl?: string; videoUrl?: string }; metadata?: Record<string, unknown> }) => void;
23
25
  }