@umituz/react-native-ai-generation-content 1.89.22 → 1.89.23
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 +1 -0
- package/src/domains/creations/presentation/components/GalleryScreenHeader.tsx +4 -2
- package/src/domains/prompts/domain/base/constants.ts +32 -94
- package/src/domains/result-preview/presentation/components/ResultPreviewScreen.tsx +67 -23
- package/src/domains/result-preview/presentation/types/result-screen.types.ts +6 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.89.
|
|
3
|
+
"version": "1.89.23",
|
|
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",
|
|
@@ -7,6 +7,7 @@ import React, { useMemo } from "react";
|
|
|
7
7
|
import { View, TouchableOpacity, StyleSheet } from "react-native";
|
|
8
8
|
import { AtomicIcon, AtomicText } from "@umituz/react-native-design-system/atoms";
|
|
9
9
|
import { useAppDesignTokens, type DesignTokens } from "@umituz/react-native-design-system/theme";
|
|
10
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
10
11
|
|
|
11
12
|
interface GalleryScreenHeaderProps {
|
|
12
13
|
readonly title: string;
|
|
@@ -15,10 +16,11 @@ interface GalleryScreenHeaderProps {
|
|
|
15
16
|
|
|
16
17
|
export const GalleryScreenHeader: React.FC<GalleryScreenHeaderProps> = ({ title, onBack }) => {
|
|
17
18
|
const tokens = useAppDesignTokens();
|
|
19
|
+
const insets = useSafeAreaInsets();
|
|
18
20
|
const styles = useMemo(() => createStyles(tokens), [tokens]);
|
|
19
21
|
|
|
20
22
|
return (
|
|
21
|
-
<View style={styles.screenHeader}>
|
|
23
|
+
<View style={[styles.screenHeader, { paddingTop: insets.top }]}>
|
|
22
24
|
<TouchableOpacity
|
|
23
25
|
onPress={onBack}
|
|
24
26
|
style={styles.backButton}
|
|
@@ -48,7 +50,7 @@ const createStyles = (tokens: DesignTokens) =>
|
|
|
48
50
|
flexDirection: "row",
|
|
49
51
|
alignItems: "center",
|
|
50
52
|
paddingHorizontal: tokens.spacing.md,
|
|
51
|
-
|
|
53
|
+
paddingBottom: tokens.spacing.sm,
|
|
52
54
|
gap: tokens.spacing.md,
|
|
53
55
|
},
|
|
54
56
|
backButton: {
|
|
@@ -5,107 +5,45 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
export const IDENTITY_PRESERVATION_CORE = `IDENTITY PRESERVATION (CRITICAL):
|
|
8
|
-
Preserve EXACT facial
|
|
8
|
+
Preserve the EXACT facial appearance, structure, and unique characteristics from the uploaded photo.
|
|
9
|
+
- Keep bone structure, eye shape/color, nose, and lip proportions 100% identical.
|
|
10
|
+
- Maintain natural skin texture, pores, markings (freckles/moles), and authentic undertones.
|
|
11
|
+
- DO NOT use beauty filters, skin smoothing, or alter facial geometry.
|
|
12
|
+
- Person must be instantly recognizable as the original individual.`;
|
|
9
13
|
|
|
10
14
|
export const IDENTITY_PRESERVATION_COUPLE = `IDENTITY PRESERVATION (CRITICAL):
|
|
11
|
-
Preserve EXACT facial
|
|
15
|
+
Preserve the EXACT facial appearance of BOTH people from the uploaded photos with 100% accuracy.
|
|
16
|
+
- Maintain bone structure, facial proportions, and unique features for both individuals.
|
|
17
|
+
- Keep natural skin texture and authentic expressions for both.
|
|
18
|
+
- Both people must be instantly recognizable as themselves.
|
|
19
|
+
- Ensure natural relative heights and chemistry between the two people.
|
|
20
|
+
- DO NOT alter ethnicity, age, or apply artificial skin smoothing.`;
|
|
12
21
|
|
|
13
22
|
export const PHOTOREALISTIC_RENDERING = `STYLE - PHOTOREALISTIC QUALITY (CRITICAL):
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- Real textures: visible skin pores, hair strands
|
|
21
|
-
- Subtle camera grain
|
|
22
|
-
|
|
23
|
-
STRICTLY PROHIBITED:
|
|
24
|
-
- NO digital art, 3D render, CGI
|
|
25
|
-
- NO plastic, wax, doll-like skin
|
|
26
|
-
- NO anime, cartoon, illustration
|
|
27
|
-
- NO artificial glow or perfection
|
|
28
|
-
|
|
29
|
-
RESULT: Must look like real photograph.`;
|
|
23
|
+
Create an authentic photograph with professional camera characteristics.
|
|
24
|
+
- Professional DSLR quality, natural depth of field, and realistic bokeh.
|
|
25
|
+
- Natural lighting, realistic shadows, and authentic color grading.
|
|
26
|
+
- Visible skin pores, hair strands, and fabric textures.
|
|
27
|
+
- NO digital art, 3D render, CGI, or plastic/wax-like skin.
|
|
28
|
+
- Must be indistinguishable from a real photograph taken with a camera.`;
|
|
30
29
|
|
|
31
30
|
export const NATURAL_POSE_GUIDELINES = `POSE - NATURAL BODY LANGUAGE (CRITICAL):
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
- Natural hand positioning
|
|
38
|
-
- Authentic weight distribution
|
|
39
|
-
|
|
40
|
-
FACIAL EXPRESSION:
|
|
41
|
-
- Relaxed expression - not forced
|
|
42
|
-
- Natural eye contact
|
|
43
|
-
- Realistic smile intensity
|
|
44
|
-
|
|
45
|
-
STRICTLY PROHIBITED:
|
|
46
|
-
- NO contorted or impossible poses
|
|
47
|
-
- NO stiff or mannequin-like posture
|
|
48
|
-
- NO exaggerated expressions
|
|
49
|
-
- NO unnatural body angles
|
|
50
|
-
|
|
51
|
-
RESULT: Real human in candid photo.`;
|
|
31
|
+
Create authentic, relaxed, and candid poses.
|
|
32
|
+
- Realistic posture and spontaneous-looking body language.
|
|
33
|
+
- Natural head tilt, hand placement, and weight distribution.
|
|
34
|
+
- Authentic micro-expressions and relaxed facial muscles.
|
|
35
|
+
- NO stiff, rigid, or physically impossible positions.`;
|
|
52
36
|
|
|
53
37
|
export const NATURAL_POSE_GUIDELINES_COUPLE = `POSE - NATURAL COUPLE INTERACTION (CRITICAL):
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
- Realistic positioning relative to each other
|
|
60
|
-
- Natural arm/hand placement
|
|
61
|
-
- Authentic physical proximity
|
|
62
|
-
|
|
63
|
-
FACIAL EXPRESSIONS:
|
|
64
|
-
- Natural expressions for both
|
|
65
|
-
- Authentic eye contact
|
|
66
|
-
- Realistic chemistry
|
|
67
|
-
|
|
68
|
-
STRICTLY PROHIBITED:
|
|
69
|
-
- NO contorted poses
|
|
70
|
-
- NO stiff posture
|
|
71
|
-
- NO exaggerated expressions
|
|
72
|
-
- NO fake interactions
|
|
73
|
-
|
|
74
|
-
RESULT: Real couple naturally interacting.`;
|
|
38
|
+
Create authentic, relaxed couple poses with genuine chemistry.
|
|
39
|
+
- Natural physical proximity and authentic touch.
|
|
40
|
+
- Spontaneous interaction appropriate to the scenario.
|
|
41
|
+
- Realistic relative positioning and comfortable body language for both.
|
|
42
|
+
- NO staged, stiff, or theatrical posing.`;
|
|
75
43
|
|
|
76
44
|
export const ANTI_PLASTIC_DIRECTIVES = `ANTI-PLASTIC DIRECTIVES (CRITICAL):
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
- NO poreless or porcelain skin
|
|
83
|
-
- NO plastic smoothness
|
|
84
|
-
|
|
85
|
-
FACIAL NATURALNESS:
|
|
86
|
-
- Slight asymmetry required
|
|
87
|
-
- Natural skin lines and variations
|
|
88
|
-
- Realistic features
|
|
89
|
-
|
|
90
|
-
LIGHTING & COLOR:
|
|
91
|
-
- Natural lighting variation
|
|
92
|
-
- Realistic shadows
|
|
93
|
-
- Authentic skin tones
|
|
94
|
-
|
|
95
|
-
MATERIAL REALISM:
|
|
96
|
-
- Realistic fabric textures
|
|
97
|
-
- Authentic hair texture
|
|
98
|
-
- Real material properties
|
|
99
|
-
|
|
100
|
-
TECHNICAL QUALITY:
|
|
101
|
-
- Natural depth of field
|
|
102
|
-
- Subtle camera grain
|
|
103
|
-
|
|
104
|
-
STRICTLY PROHIBITED:
|
|
105
|
-
- NO digital art or CGI
|
|
106
|
-
- NO symmetry or perfection
|
|
107
|
-
- NO over-smoothed look
|
|
108
|
-
- NO plastic or doll appearance
|
|
109
|
-
|
|
110
|
-
RESULT: Real photograph with natural imperfections.`;
|
|
111
|
-
|
|
45
|
+
Ensure a real photographic look, NOT digital art or AI-generated appearance.
|
|
46
|
+
- Preserve micro-textures, slight asymmetry, and natural skin variations.
|
|
47
|
+
- Natural highlights and soft shadow falloff across faces.
|
|
48
|
+
- Realistic fabric folds and individual hair movement.
|
|
49
|
+
- NO poreless skin, artificial glow, or over-processed effects.`;
|
|
@@ -5,6 +5,7 @@ import { NavigationHeader } from "@umituz/react-native-design-system/molecules";
|
|
|
5
5
|
import { ScreenLayout } from "@umituz/react-native-design-system/layouts";
|
|
6
6
|
import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
|
|
7
7
|
import { ResultImageCard } from "./ResultImageCard";
|
|
8
|
+
import { ResultActionBar } from "./ResultActionBar";
|
|
8
9
|
import { SuccessRedirectionCard } from "../../../../presentation/components/result/SuccessRedirectionCard";
|
|
9
10
|
import { RecentCreationsSection } from "./RecentCreationsSection";
|
|
10
11
|
import { VideoResultPlayer } from "../../../../presentation/components/display/VideoResultPlayer";
|
|
@@ -14,7 +15,16 @@ import { formatMediaUrl, shouldShowRecentCreations } from "./ResultPreviewScreen
|
|
|
14
15
|
export const ResultPreviewScreen: React.FC<ResultPreviewScreenProps> = ({
|
|
15
16
|
imageUrl,
|
|
16
17
|
videoUrl,
|
|
18
|
+
isSaving = false,
|
|
19
|
+
isSharing = false,
|
|
20
|
+
onDownload,
|
|
21
|
+
onShare,
|
|
22
|
+
onTryAgain,
|
|
17
23
|
onNavigateBack,
|
|
24
|
+
onRate,
|
|
25
|
+
onEdit,
|
|
26
|
+
onEditVideo,
|
|
27
|
+
onShareToFeed,
|
|
18
28
|
recentCreations,
|
|
19
29
|
onViewAll,
|
|
20
30
|
onCreationPress,
|
|
@@ -22,6 +32,10 @@ export const ResultPreviewScreen: React.FC<ResultPreviewScreenProps> = ({
|
|
|
22
32
|
translations,
|
|
23
33
|
style,
|
|
24
34
|
hideLabel = false,
|
|
35
|
+
iconOnly = false,
|
|
36
|
+
showTryAgain = true,
|
|
37
|
+
showRating = false,
|
|
38
|
+
showActions = false,
|
|
25
39
|
}) => {
|
|
26
40
|
const tokens = useAppDesignTokens();
|
|
27
41
|
const isVideo = Boolean(videoUrl);
|
|
@@ -50,32 +64,62 @@ export const ResultPreviewScreen: React.FC<ResultPreviewScreenProps> = ({
|
|
|
50
64
|
const showRecent = shouldShowRecentCreations(recentCreations, translations);
|
|
51
65
|
|
|
52
66
|
return (
|
|
53
|
-
<
|
|
67
|
+
<View style={{ flex: 1, backgroundColor: tokens.colors.backgroundPrimary }}>
|
|
54
68
|
<NavigationHeader title={translations.title} onBackPress={onNavigateBack} />
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
<ScreenLayout
|
|
70
|
+
scrollable
|
|
71
|
+
edges={["left", "right", "bottom"]}
|
|
72
|
+
backgroundColor={tokens.colors.backgroundPrimary}
|
|
73
|
+
>
|
|
74
|
+
<View style={[styles.container, style]}>
|
|
75
|
+
<View style={styles.resultContainer}>
|
|
76
|
+
{!hideLabel && <AtomicText style={styles.title}>{translations.yourResult}</AtomicText>}
|
|
77
|
+
{isVideo ? <VideoResultPlayer uri={displayMediaUrl} /> : <ResultImageCard imageUrl={displayMediaUrl} />}
|
|
78
|
+
|
|
79
|
+
{showActions && (
|
|
80
|
+
<ResultActionBar
|
|
81
|
+
isSaving={isSaving}
|
|
82
|
+
isSharing={isSharing}
|
|
83
|
+
onDownload={onDownload}
|
|
84
|
+
onShare={onShare}
|
|
85
|
+
onTryAgain={onTryAgain}
|
|
86
|
+
onRate={onRate}
|
|
87
|
+
onEdit={onEdit}
|
|
88
|
+
onEditVideo={onEditVideo}
|
|
89
|
+
onShareToFeed={onShareToFeed}
|
|
90
|
+
saveButtonText={translations.saveButton}
|
|
91
|
+
shareButtonText={translations.shareButton}
|
|
92
|
+
tryAgainButtonText={translations.tryAnother}
|
|
93
|
+
iconOnly={iconOnly}
|
|
94
|
+
showTryAgain={showTryAgain}
|
|
95
|
+
showRating={showRating}
|
|
96
|
+
/>
|
|
97
|
+
)}
|
|
98
|
+
|
|
99
|
+
{onViewCreations && (
|
|
100
|
+
<SuccessRedirectionCard
|
|
101
|
+
onPress={onViewCreations}
|
|
102
|
+
title={translations.redirectTitle || "Your Creation is Ready!"}
|
|
103
|
+
description={
|
|
104
|
+
translations.redirectDescription ||
|
|
105
|
+
"Head over to the My Creations screen to view full details."
|
|
106
|
+
}
|
|
107
|
+
buttonText={translations.viewCreations || "View My Creations"}
|
|
108
|
+
style={{ marginTop: tokens.spacing.xl }}
|
|
109
|
+
/>
|
|
110
|
+
)}
|
|
111
|
+
</View>
|
|
112
|
+
{showRecent && recentCreations && translations.recentCreations && translations.viewAll && (
|
|
113
|
+
<RecentCreationsSection
|
|
114
|
+
recentCreations={recentCreations}
|
|
115
|
+
onViewAll={onViewAll}
|
|
116
|
+
onCreationPress={onCreationPress}
|
|
117
|
+
title={translations.recentCreations}
|
|
118
|
+
viewAllLabel={translations.viewAll}
|
|
66
119
|
/>
|
|
67
120
|
)}
|
|
68
121
|
</View>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
recentCreations={recentCreations}
|
|
72
|
-
onViewAll={onViewAll}
|
|
73
|
-
onCreationPress={onCreationPress}
|
|
74
|
-
title={translations.recentCreations}
|
|
75
|
-
viewAllLabel={translations.viewAll}
|
|
76
|
-
/>
|
|
77
|
-
)}
|
|
78
|
-
</View>
|
|
79
|
-
</ScreenLayout>
|
|
122
|
+
</ScreenLayout>
|
|
123
|
+
</View>
|
|
80
124
|
);
|
|
81
125
|
};
|
|
@@ -14,11 +14,11 @@ export interface ResultPreviewScreenProps {
|
|
|
14
14
|
/** Video URL to display */
|
|
15
15
|
videoUrl?: string;
|
|
16
16
|
/** Result display state */
|
|
17
|
-
isSaving
|
|
18
|
-
isSharing
|
|
17
|
+
isSaving?: boolean;
|
|
18
|
+
isSharing?: boolean;
|
|
19
19
|
/** Action callbacks */
|
|
20
|
-
onDownload
|
|
21
|
-
onShare
|
|
20
|
+
onDownload?: () => void;
|
|
21
|
+
onShare?: () => void;
|
|
22
22
|
onTryAgain?: () => void;
|
|
23
23
|
onNavigateBack?: () => void;
|
|
24
24
|
onRate?: () => void;
|
|
@@ -47,6 +47,8 @@ export interface ResultPreviewScreenProps {
|
|
|
47
47
|
showTryAgain?: boolean;
|
|
48
48
|
/** Show rating button */
|
|
49
49
|
showRating?: boolean;
|
|
50
|
+
/** Show action buttons (save, share, etc) */
|
|
51
|
+
showActions?: boolean;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
/**
|