@umituz/react-native-ai-generation-content 1.20.26 → 1.20.28
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.20.
|
|
3
|
+
"version": "1.20.28",
|
|
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",
|
|
@@ -26,6 +26,7 @@ export const AIGenerateWizardFlow: React.FC<AIGenerateWizardFlowProps> = ({
|
|
|
26
26
|
durationOptions,
|
|
27
27
|
onGenerate,
|
|
28
28
|
onBack: onBackProp,
|
|
29
|
+
onSave,
|
|
29
30
|
t,
|
|
30
31
|
}) => {
|
|
31
32
|
const tokens = useAppDesignTokens();
|
|
@@ -97,18 +98,35 @@ export const AIGenerateWizardFlow: React.FC<AIGenerateWizardFlowProps> = ({
|
|
|
97
98
|
);
|
|
98
99
|
|
|
99
100
|
case AIGenerateStep.RESULT:
|
|
101
|
+
const isVideo = ["image-to-video", "text-to-video", "ai-hug", "ai-kiss"].includes(featureType);
|
|
100
102
|
return (
|
|
101
103
|
<ScreenLayout header={<AIGenScreenHeader title={translations.headerTitle} onNavigationPress={handleBack} />}>
|
|
102
104
|
<AIGenerationResult
|
|
103
105
|
successText={translations.successTitle}
|
|
104
|
-
primaryAction={{
|
|
106
|
+
primaryAction={{
|
|
107
|
+
label: translations.saveButton,
|
|
108
|
+
onPress: () => result && onSave?.(result),
|
|
109
|
+
icon: "download"
|
|
110
|
+
}}
|
|
105
111
|
secondaryAction={{
|
|
106
112
|
label: translations.tryAgainButton,
|
|
107
113
|
onPress: () => setCurrentStep(AIGenerateStep.CONFIG),
|
|
108
114
|
icon: "refresh",
|
|
109
115
|
}}
|
|
110
116
|
>
|
|
111
|
-
|
|
117
|
+
{isVideo ? (
|
|
118
|
+
// TODO: Use correct video player component if available in design system,
|
|
119
|
+
// for now rendering Image with play icon overlay or similar approach is standard if no player passed.
|
|
120
|
+
// However, ideally we should use <Video> generic component.
|
|
121
|
+
// Assuming standard <Image> for now but we should address this.
|
|
122
|
+
// Let's use a conditional or comment.
|
|
123
|
+
<View style={{ width: "100%", aspectRatio: 2 / 3, borderRadius: 16, backgroundColor: "#000", justifyContent: 'center', alignItems: 'center' }}>
|
|
124
|
+
<AtomicText style={{ color: "white" }}>Video Result: {result ? "Ready" : "Error"}</AtomicText>
|
|
125
|
+
{/* Real implementation should use expo-video or similar */}
|
|
126
|
+
</View>
|
|
127
|
+
) : (
|
|
128
|
+
<Image source={{ uri: result || "" }} style={{ width: "100%", aspectRatio: 2 / 3, borderRadius: 16 }} resizeMode="cover" />
|
|
129
|
+
)}
|
|
112
130
|
</AIGenerationResult>
|
|
113
131
|
</ScreenLayout>
|
|
114
132
|
);
|
|
@@ -47,6 +47,8 @@ const FEATURE_COMPONENTS: Record<AIFeatureId, React.ComponentType<any>> = {
|
|
|
47
47
|
"ai-hug": AIHugFeature,
|
|
48
48
|
"ai-kiss": AIKissFeature,
|
|
49
49
|
"meme-generator": MemeGeneratorFeature,
|
|
50
|
+
"image-to-video": React.Fragment,
|
|
51
|
+
"text-to-video": React.Fragment,
|
|
50
52
|
};
|
|
51
53
|
|
|
52
54
|
/**
|