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

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.3",
3
+ "version": "1.84.4",
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",
@@ -27,6 +27,8 @@ interface GalleryResultPreviewProps {
27
27
  readonly onEdit?: (imageUrl: string) => void;
28
28
  /** Called when the user taps Edit on a video creation. */
29
29
  readonly onEditVideo?: (videoUrl: string) => void;
30
+ /** Called when the user taps Post to Feed. Omit to hide (apps without a feed). */
31
+ readonly onShareToFeed?: (creation: Creation) => void;
30
32
  }
31
33
 
32
34
  export function GalleryResultPreview({
@@ -43,6 +45,7 @@ export function GalleryResultPreview({
43
45
  onCloseRating,
44
46
  onEdit,
45
47
  onEditVideo,
48
+ onShareToFeed,
46
49
  }: GalleryResultPreviewProps) {
47
50
  const alert = useAlert();
48
51
 
@@ -69,6 +72,7 @@ export function GalleryResultPreview({
69
72
  onRate={onRate}
70
73
  onEdit={!videoUrl && imageUrl && onEdit ? () => onEdit(imageUrl) : undefined}
71
74
  onEditVideo={videoUrl && onEditVideo ? () => onEditVideo(videoUrl) : undefined}
75
+ onShareToFeed={onShareToFeed ? () => onShareToFeed(selectedCreation) : undefined}
72
76
  hideLabel
73
77
  iconOnly
74
78
  showTryAgain
@@ -189,6 +189,7 @@ export function CreationsGalleryScreen({
189
189
  onCloseRating={() => galleryState.setShowRatingPicker(false)}
190
190
  onEdit={onEdit}
191
191
  onEditVideo={onEditVideo}
192
+ onShareToFeed={onShareToFeed}
192
193
  />
193
194
  );
194
195
  }
@@ -25,6 +25,7 @@ export const ResultActionBar: React.FC<ResultActionBarProps> = ({
25
25
  showRating = false,
26
26
  onEdit,
27
27
  onEditVideo,
28
+ onShareToFeed,
28
29
  }) => {
29
30
  const tokens = useAppDesignTokens();
30
31
  const { minTouchTarget } = useResponsive();
@@ -134,6 +135,15 @@ export const ResultActionBar: React.FC<ResultActionBarProps> = ({
134
135
  <AtomicIcon name="video" customSize={20} color="onPrimary" />
135
136
  </TouchableOpacity>
136
137
  )}
138
+ {onShareToFeed && (
139
+ <TouchableOpacity
140
+ style={styles.iconButton}
141
+ onPress={onShareToFeed}
142
+ activeOpacity={0.7}
143
+ >
144
+ <AtomicIcon name="send" customSize={20} color="onPrimary" />
145
+ </TouchableOpacity>
146
+ )}
137
147
  </View>
138
148
  );
139
149
  }
@@ -23,6 +23,7 @@ export const ResultPreviewScreen: React.FC<ResultPreviewScreenProps> = ({
23
23
  onRate,
24
24
  onEdit,
25
25
  onEditVideo,
26
+ onShareToFeed,
26
27
  recentCreations,
27
28
  onViewAll,
28
29
  onCreationPress,
@@ -75,6 +76,7 @@ export const ResultPreviewScreen: React.FC<ResultPreviewScreenProps> = ({
75
76
  onRate={onRate}
76
77
  onEdit={onEdit}
77
78
  onEditVideo={onEditVideo}
79
+ onShareToFeed={onShareToFeed}
78
80
  saveButtonText={translations.saveButton}
79
81
  shareButtonText={translations.shareButton}
80
82
  tryAgainButtonText={translations.tryAnother}
@@ -48,4 +48,6 @@ export interface ResultActionBarProps {
48
48
  onEdit?: () => void;
49
49
  /** Edit video button callback — only shown in iconOnly mode when provided */
50
50
  onEditVideo?: () => void;
51
+ /** Post to feed callback — when provided, shows a "send" button. Omit to hide (apps without a feed). */
52
+ onShareToFeed?: () => void;
51
53
  }
@@ -26,6 +26,8 @@ export interface ResultPreviewScreenProps {
26
26
  onEdit?: () => void;
27
27
  /** Edit video callback — opens video editor for the result video */
28
28
  onEditVideo?: () => void;
29
+ /** Post to feed callback — when provided, shows a send button. Omit to hide (apps without a feed). */
30
+ onShareToFeed?: () => void;
29
31
  /** Recent creations to display */
30
32
  recentCreations?: readonly RecentCreation[];
31
33
  /** Navigate to all creations */