@umituz/react-native-ai-generation-content 1.84.2 → 1.84.3

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.84.2",
3
+ "version": "1.84.3",
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
  onCreationPress,
35
35
  onEdit,
36
36
  onEditVideo,
37
+ onShareToFeed,
37
38
  }: CreationsGalleryScreenProps) {
38
39
  const tokens = useAppDesignTokens();
39
40
  const [viewMode, setViewMode] = useState<"list" | "grid">("list");
@@ -97,15 +98,17 @@ export function CreationsGalleryScreen({
97
98
  onShare: async () => callbacks.handleShareCard(item),
98
99
  onDelete: () => callbacks.handleDelete(item),
99
100
  onFavorite: () => callbacks.handleFavorite(item),
100
- }), [callbacks, onCreationPress]);
101
+ onPostToFeed: onShareToFeed ? () => onShareToFeed(item) : undefined,
102
+ }), [callbacks, onCreationPress, onShareToFeed]);
101
103
 
102
104
  const renderItem = useCallback(({ item }: { item: Creation }) => (
103
105
  <CreationCard
104
106
  creation={item}
105
107
  titleText={getItemTitle(item)}
106
108
  callbacks={getItemCallbacks(item)}
109
+ canPostToFeed={!!onShareToFeed && item.status === "completed"}
107
110
  />
108
- ), [getItemTitle, getItemCallbacks]);
111
+ ), [getItemTitle, getItemCallbacks, onShareToFeed]);
109
112
 
110
113
  const renderGridItems = useCallback((items: Creation[]) => {
111
114
  const rows: Array<{ left: Creation; right: Creation | null }> = [];
@@ -2,6 +2,7 @@
2
2
  * Creations Gallery Screen Types
3
3
  */
4
4
 
5
+ import type { Creation } from "../../domain/entities/Creation";
5
6
  import type { CreationsConfig } from "../../domain/value-objects/CreationsConfig";
6
7
  import type { ICreationsRepository } from "../../domain/repositories/ICreationsRepository";
7
8
 
@@ -26,4 +27,6 @@ export interface CreationsGalleryScreenProps {
26
27
  readonly onEdit?: (imageUrl: string) => void;
27
28
  /** Called when the user taps the Edit button in the creation detail view. Receives the video URL. Only shown for video creations. */
28
29
  readonly onEditVideo?: (videoUrl: string) => void;
30
+ /** Called when the user taps the "Post to Feed" button on a creation card. Shows a filled send icon. */
31
+ readonly onShareToFeed?: (creation: Creation) => void;
29
32
  }