@umituz/react-native-ai-generation-content 1.83.94 → 1.83.95
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 +1 -1
- package/src/domains/creations/presentation/components/GalleryResultPreview.tsx +5 -1
- package/src/domains/creations/presentation/screens/CreationsGalleryScreen.tsx +2 -0
- package/src/domains/creations/presentation/screens/creations-gallery.types.ts +2 -0
- package/src/domains/result-preview/presentation/components/ResultActionBar.tsx +10 -0
- package/src/domains/result-preview/presentation/components/ResultPreviewScreen.tsx +2 -0
- package/src/domains/result-preview/presentation/types/result-components.types.ts +2 -0
- package/src/domains/result-preview/presentation/types/result-screen.types.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.83.
|
|
3
|
+
"version": "1.83.95",
|
|
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",
|
|
@@ -23,8 +23,10 @@ interface GalleryResultPreviewProps {
|
|
|
23
23
|
readonly onRate: () => void;
|
|
24
24
|
readonly onSubmitRating: (rating: number, description: string) => void;
|
|
25
25
|
readonly onCloseRating: () => void;
|
|
26
|
-
/** Called when the user taps Edit
|
|
26
|
+
/** Called when the user taps Edit on an image creation. */
|
|
27
27
|
readonly onEdit?: (imageUrl: string) => void;
|
|
28
|
+
/** Called when the user taps Edit on a video creation. */
|
|
29
|
+
readonly onEditVideo?: (videoUrl: string) => void;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
export function GalleryResultPreview({
|
|
@@ -40,6 +42,7 @@ export function GalleryResultPreview({
|
|
|
40
42
|
onSubmitRating,
|
|
41
43
|
onCloseRating,
|
|
42
44
|
onEdit,
|
|
45
|
+
onEditVideo,
|
|
43
46
|
}: GalleryResultPreviewProps) {
|
|
44
47
|
const alert = useAlert();
|
|
45
48
|
|
|
@@ -65,6 +68,7 @@ export function GalleryResultPreview({
|
|
|
65
68
|
onNavigateBack={onBack}
|
|
66
69
|
onRate={onRate}
|
|
67
70
|
onEdit={!videoUrl && imageUrl && onEdit ? () => onEdit(imageUrl) : undefined}
|
|
71
|
+
onEditVideo={videoUrl && onEditVideo ? () => onEditVideo(videoUrl) : undefined}
|
|
68
72
|
hideLabel
|
|
69
73
|
iconOnly
|
|
70
74
|
showTryAgain
|
|
@@ -33,6 +33,7 @@ export function CreationsGalleryScreen({
|
|
|
33
33
|
getCreationTitle,
|
|
34
34
|
onCreationPress,
|
|
35
35
|
onEdit,
|
|
36
|
+
onEditVideo,
|
|
36
37
|
}: CreationsGalleryScreenProps) {
|
|
37
38
|
const tokens = useAppDesignTokens();
|
|
38
39
|
const [viewMode, setViewMode] = useState<"list" | "grid">("list");
|
|
@@ -184,6 +185,7 @@ export function CreationsGalleryScreen({
|
|
|
184
185
|
onSubmitRating={callbacks.handleSubmitRating}
|
|
185
186
|
onCloseRating={() => galleryState.setShowRatingPicker(false)}
|
|
186
187
|
onEdit={onEdit}
|
|
188
|
+
onEditVideo={onEditVideo}
|
|
187
189
|
/>
|
|
188
190
|
);
|
|
189
191
|
}
|
|
@@ -24,4 +24,6 @@ export interface CreationsGalleryScreenProps {
|
|
|
24
24
|
readonly onCreationPress?: (creation: { id: string; uri: string; type: string; originalUri?: string; output?: { imageUrl?: string; videoUrl?: string }; metadata?: Record<string, unknown> }) => void;
|
|
25
25
|
/** Called when the user taps the Edit button in the creation detail view. Receives the image URL. Only shown for image creations. */
|
|
26
26
|
readonly onEdit?: (imageUrl: string) => void;
|
|
27
|
+
/** Called when the user taps the Edit button in the creation detail view. Receives the video URL. Only shown for video creations. */
|
|
28
|
+
readonly onEditVideo?: (videoUrl: string) => void;
|
|
27
29
|
}
|
|
@@ -24,6 +24,7 @@ export const ResultActionBar: React.FC<ResultActionBarProps> = ({
|
|
|
24
24
|
showTryAgain = true,
|
|
25
25
|
showRating = false,
|
|
26
26
|
onEdit,
|
|
27
|
+
onEditVideo,
|
|
27
28
|
}) => {
|
|
28
29
|
const tokens = useAppDesignTokens();
|
|
29
30
|
const { minTouchTarget } = useResponsive();
|
|
@@ -124,6 +125,15 @@ export const ResultActionBar: React.FC<ResultActionBarProps> = ({
|
|
|
124
125
|
<AtomicIcon name="edit" customSize={20} color="onPrimary" />
|
|
125
126
|
</TouchableOpacity>
|
|
126
127
|
)}
|
|
128
|
+
{onEditVideo && (
|
|
129
|
+
<TouchableOpacity
|
|
130
|
+
style={styles.iconButton}
|
|
131
|
+
onPress={onEditVideo}
|
|
132
|
+
activeOpacity={0.7}
|
|
133
|
+
>
|
|
134
|
+
<AtomicIcon name="video" customSize={20} color="onPrimary" />
|
|
135
|
+
</TouchableOpacity>
|
|
136
|
+
)}
|
|
127
137
|
</View>
|
|
128
138
|
);
|
|
129
139
|
}
|
|
@@ -22,6 +22,7 @@ export const ResultPreviewScreen: React.FC<ResultPreviewScreenProps> = ({
|
|
|
22
22
|
onNavigateBack,
|
|
23
23
|
onRate,
|
|
24
24
|
onEdit,
|
|
25
|
+
onEditVideo,
|
|
25
26
|
recentCreations,
|
|
26
27
|
onViewAll,
|
|
27
28
|
onCreationPress,
|
|
@@ -73,6 +74,7 @@ export const ResultPreviewScreen: React.FC<ResultPreviewScreenProps> = ({
|
|
|
73
74
|
onTryAgain={onTryAgain}
|
|
74
75
|
onRate={onRate}
|
|
75
76
|
onEdit={onEdit}
|
|
77
|
+
onEditVideo={onEditVideo}
|
|
76
78
|
saveButtonText={translations.saveButton}
|
|
77
79
|
shareButtonText={translations.shareButton}
|
|
78
80
|
tryAgainButtonText={translations.tryAnother}
|
|
@@ -46,4 +46,6 @@ export interface ResultActionBarProps {
|
|
|
46
46
|
showRating?: boolean;
|
|
47
47
|
/** Edit button callback — only shown in iconOnly mode when provided */
|
|
48
48
|
onEdit?: () => void;
|
|
49
|
+
/** Edit video button callback — only shown in iconOnly mode when provided */
|
|
50
|
+
onEditVideo?: () => void;
|
|
49
51
|
}
|
|
@@ -24,6 +24,8 @@ export interface ResultPreviewScreenProps {
|
|
|
24
24
|
onRate?: () => void;
|
|
25
25
|
/** Edit callback — opens photo editor for the result image */
|
|
26
26
|
onEdit?: () => void;
|
|
27
|
+
/** Edit video callback — opens video editor for the result video */
|
|
28
|
+
onEditVideo?: () => void;
|
|
27
29
|
/** Recent creations to display */
|
|
28
30
|
recentCreations?: readonly RecentCreation[];
|
|
29
31
|
/** Navigate to all creations */
|