@umituz/react-native-ai-generation-content 1.89.5 → 1.89.6
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/generation/wizard/presentation/components/GenericWizardFlow.tsx +4 -0
- package/src/domains/generation/wizard/presentation/components/WizardFlowContent.tsx +3 -0
- package/src/domains/generation/wizard/presentation/components/WizardStepRenderer.tsx +3 -0
- package/src/domains/generation/wizard/presentation/components/WizardStepRenderer.types.ts +2 -0
- package/src/domains/result-preview/presentation/components/ResultPreviewScreen.tsx +31 -2
- package/src/domains/result-preview/presentation/types/result-screen.types.ts +4 -1
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.6",
|
|
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",
|
|
@@ -49,6 +49,8 @@ export interface GenericWizardFlowProps {
|
|
|
49
49
|
readonly onBack?: () => void;
|
|
50
50
|
readonly onTryAgain?: () => void;
|
|
51
51
|
readonly onDismissGenerating?: () => void;
|
|
52
|
+
/** Called when user finishes the flow (e.g. "View All Creations") */
|
|
53
|
+
readonly onFinish?: () => void;
|
|
52
54
|
readonly t: (key: string) => string;
|
|
53
55
|
readonly translations?: Record<string, string>;
|
|
54
56
|
readonly renderPreview?: (onContinue: () => void) => React.ReactElement | null;
|
|
@@ -78,6 +80,7 @@ export const GenericWizardFlow: React.FC<GenericWizardFlowProps> = (props) => {
|
|
|
78
80
|
onBack,
|
|
79
81
|
onTryAgain,
|
|
80
82
|
onDismissGenerating,
|
|
83
|
+
onFinish,
|
|
81
84
|
t,
|
|
82
85
|
renderPreview,
|
|
83
86
|
renderGenerating,
|
|
@@ -140,6 +143,7 @@ export const GenericWizardFlow: React.FC<GenericWizardFlowProps> = (props) => {
|
|
|
140
143
|
onBack={onBack}
|
|
141
144
|
onTryAgain={onTryAgain}
|
|
142
145
|
onDismissGenerating={onDismissGenerating}
|
|
146
|
+
onViewCreations={onFinish}
|
|
143
147
|
t={t}
|
|
144
148
|
renderPreview={renderPreview}
|
|
145
149
|
renderGenerating={renderGenerating}
|
|
@@ -51,6 +51,7 @@ interface WizardFlowContentProps {
|
|
|
51
51
|
readonly onBack?: () => void;
|
|
52
52
|
readonly onTryAgain?: () => void;
|
|
53
53
|
readonly onDismissGenerating?: () => void;
|
|
54
|
+
readonly onViewCreations?: () => void;
|
|
54
55
|
readonly t: (key: string) => string;
|
|
55
56
|
readonly renderPreview?: (onContinue: () => void) => React.ReactElement | null;
|
|
56
57
|
readonly renderGenerating?: (progress: number) => React.ReactElement | null;
|
|
@@ -79,6 +80,7 @@ export const WizardFlowContent: React.FC<WizardFlowContentProps> = (props) => {
|
|
|
79
80
|
onBack,
|
|
80
81
|
onTryAgain,
|
|
81
82
|
onDismissGenerating,
|
|
83
|
+
onViewCreations,
|
|
82
84
|
t,
|
|
83
85
|
renderPreview,
|
|
84
86
|
renderGenerating,
|
|
@@ -249,6 +251,7 @@ export const WizardFlowContent: React.FC<WizardFlowContentProps> = (props) => {
|
|
|
249
251
|
onRate={() => setShowRatingPicker(true)}
|
|
250
252
|
onTryAgain={onTryAgain}
|
|
251
253
|
onDismissGenerating={handlers.handleDismissGenerating}
|
|
254
|
+
onViewCreations={onViewCreations}
|
|
252
255
|
t={t}
|
|
253
256
|
alertMessages={alertMessages}
|
|
254
257
|
renderPreview={renderPreview}
|
|
@@ -33,6 +33,7 @@ export const WizardStepRenderer: React.FC<WizardStepRendererProps> = ({
|
|
|
33
33
|
onShare,
|
|
34
34
|
onRate,
|
|
35
35
|
onTryAgain,
|
|
36
|
+
onViewCreations,
|
|
36
37
|
onDismissGenerating,
|
|
37
38
|
t,
|
|
38
39
|
alertMessages,
|
|
@@ -82,6 +83,7 @@ export const WizardStepRenderer: React.FC<WizardStepRendererProps> = ({
|
|
|
82
83
|
onRate={onRate}
|
|
83
84
|
onTryAgain={handleTryAgain}
|
|
84
85
|
onNavigateBack={handleTryAgain}
|
|
86
|
+
onViewCreations={onViewCreations}
|
|
85
87
|
hideLabel
|
|
86
88
|
iconOnly
|
|
87
89
|
showTryAgain
|
|
@@ -93,6 +95,7 @@ export const WizardStepRenderer: React.FC<WizardStepRendererProps> = ({
|
|
|
93
95
|
shareButton: t("generation.result.share"),
|
|
94
96
|
sharing: t("generation.result.sharing"),
|
|
95
97
|
tryAnother: t("generation.result.tryAnother"),
|
|
98
|
+
viewCreations: t("generation.result.viewCreations"),
|
|
96
99
|
}}
|
|
97
100
|
/>
|
|
98
101
|
);
|
|
@@ -23,6 +23,8 @@ export interface WizardStepRendererProps {
|
|
|
23
23
|
readonly onShare: () => void;
|
|
24
24
|
readonly onRate?: () => void;
|
|
25
25
|
readonly onTryAgain?: () => void;
|
|
26
|
+
/** Navigate to creations from result screen */
|
|
27
|
+
readonly onViewCreations?: () => void;
|
|
26
28
|
/** Called when user dismisses generating screen - generation continues in background */
|
|
27
29
|
readonly onDismissGenerating?: () => void;
|
|
28
30
|
readonly t: (key: string) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import { StyleSheet, View } from "react-native";
|
|
3
|
-
import { AtomicText } from "@umituz/react-native-design-system/atoms";
|
|
2
|
+
import { StyleSheet, View, TouchableOpacity } from "react-native";
|
|
3
|
+
import { AtomicText, AtomicIcon } from "@umituz/react-native-design-system/atoms";
|
|
4
4
|
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";
|
|
@@ -27,6 +27,7 @@ export const ResultPreviewScreen: React.FC<ResultPreviewScreenProps> = ({
|
|
|
27
27
|
recentCreations,
|
|
28
28
|
onViewAll,
|
|
29
29
|
onCreationPress,
|
|
30
|
+
onViewCreations,
|
|
30
31
|
translations,
|
|
31
32
|
style,
|
|
32
33
|
hideLabel = false,
|
|
@@ -52,6 +53,22 @@ export const ResultPreviewScreen: React.FC<ResultPreviewScreenProps> = ({
|
|
|
52
53
|
color: tokens.colors.textPrimary,
|
|
53
54
|
marginBottom: tokens.spacing.md,
|
|
54
55
|
},
|
|
56
|
+
galleryButton: {
|
|
57
|
+
flexDirection: "row",
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
justifyContent: "space-between",
|
|
60
|
+
backgroundColor: tokens.colors.surfaceSecondary,
|
|
61
|
+
padding: tokens.spacing.md,
|
|
62
|
+
borderRadius: tokens.radius.lg,
|
|
63
|
+
marginTop: tokens.spacing.xl,
|
|
64
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
65
|
+
borderColor: tokens.colors.borderLight,
|
|
66
|
+
},
|
|
67
|
+
galleryButtonText: {
|
|
68
|
+
fontSize: 15,
|
|
69
|
+
fontWeight: "700",
|
|
70
|
+
color: tokens.colors.textPrimary,
|
|
71
|
+
},
|
|
55
72
|
}),
|
|
56
73
|
[tokens]
|
|
57
74
|
);
|
|
@@ -84,6 +101,18 @@ export const ResultPreviewScreen: React.FC<ResultPreviewScreenProps> = ({
|
|
|
84
101
|
showTryAgain={showTryAgain}
|
|
85
102
|
showRating={showRating}
|
|
86
103
|
/>
|
|
104
|
+
{onViewCreations && (
|
|
105
|
+
<TouchableOpacity
|
|
106
|
+
style={styles.galleryButton}
|
|
107
|
+
onPress={onViewCreations}
|
|
108
|
+
activeOpacity={0.7}
|
|
109
|
+
>
|
|
110
|
+
<AtomicText style={styles.galleryButtonText}>
|
|
111
|
+
{translations.viewCreations || "View My Creations"}
|
|
112
|
+
</AtomicText>
|
|
113
|
+
<AtomicIcon name="arrow-forward" size="sm" color="primary" />
|
|
114
|
+
</TouchableOpacity>
|
|
115
|
+
)}
|
|
87
116
|
</View>
|
|
88
117
|
{showRecent && recentCreations && translations.recentCreations && translations.viewAll && (
|
|
89
118
|
<RecentCreationsSection
|
|
@@ -30,10 +30,11 @@ export interface ResultPreviewScreenProps {
|
|
|
30
30
|
onShareToFeed?: () => void;
|
|
31
31
|
/** Recent creations to display */
|
|
32
32
|
recentCreations?: readonly RecentCreation[];
|
|
33
|
-
/** Navigate to all creations */
|
|
34
33
|
onViewAll?: () => void;
|
|
35
34
|
/** View a specific creation */
|
|
36
35
|
onCreationPress?: (creation: RecentCreation) => void;
|
|
36
|
+
/** Navigate to creations gallery */
|
|
37
|
+
onViewCreations?: () => void;
|
|
37
38
|
/** Translations */
|
|
38
39
|
translations: ResultPreviewTranslations;
|
|
39
40
|
/** Optional custom style */
|
|
@@ -72,4 +73,6 @@ export interface ResultPreviewTranslations {
|
|
|
72
73
|
recentCreations?: string;
|
|
73
74
|
/** View all button */
|
|
74
75
|
viewAll?: string;
|
|
76
|
+
/** View creations button text */
|
|
77
|
+
viewCreations?: string;
|
|
75
78
|
}
|