@umituz/react-native-ai-generation-content 1.17.44 → 1.17.45
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/features/image-to-video/presentation/components/index.ts +3 -3
- package/src/features/text-to-voice/presentation/components/index.ts +1 -1
- package/src/presentation/components/AIGenerationHero.tsx +9 -2
- package/src/features/image-to-video/presentation/components/HeroSection.tsx +0 -89
- package/src/features/text-to-voice/presentation/components/TextToVoiceHeader.tsx +0 -73
package/package.json
CHANGED
|
@@ -21,9 +21,9 @@ export type {
|
|
|
21
21
|
ImageSelectionGridTranslations as ImageToVideoSelectionGridTranslations,
|
|
22
22
|
} from "./ImageSelectionGrid";
|
|
23
23
|
|
|
24
|
-
// Hero Section
|
|
25
|
-
export { HeroSection as ImageToVideoHeroSection } from "./HeroSection";
|
|
26
|
-
export type { HeroSectionProps as ImageToVideoHeroSectionProps } from "./HeroSection";
|
|
24
|
+
// Hero Section - Using AIGenerationHero from common components
|
|
25
|
+
// export { HeroSection as ImageToVideoHeroSection } from "./HeroSection";
|
|
26
|
+
// export type { HeroSectionProps as ImageToVideoHeroSectionProps } from "./HeroSection";
|
|
27
27
|
|
|
28
28
|
// Generate Button
|
|
29
29
|
export { GenerateButton as ImageToVideoGenerateButton } from "./GenerateButton";
|
|
@@ -4,4 +4,4 @@ export { TextToVoiceExamplePrompts } from "./TextToVoiceExamplePrompts";
|
|
|
4
4
|
export { TextToVoiceGenerateButton } from "./TextToVoiceGenerateButton";
|
|
5
5
|
export { TextToVoiceAudioPlayer } from "./TextToVoiceAudioPlayer";
|
|
6
6
|
export { TextToVoiceErrorMessage } from "./TextToVoiceErrorMessage";
|
|
7
|
-
|
|
7
|
+
// TextToVoiceHeader removed in favor of common AIGenerationHero
|
|
@@ -18,6 +18,7 @@ export interface AIGenerationHeroProps {
|
|
|
18
18
|
readonly subtitle?: string;
|
|
19
19
|
readonly iconName?: string;
|
|
20
20
|
readonly gradientColors?: readonly [string, string, ...string[]];
|
|
21
|
+
readonly style?: any;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export const AIGenerationHero: React.FC<AIGenerationHeroProps> = ({
|
|
@@ -25,13 +26,19 @@ export const AIGenerationHero: React.FC<AIGenerationHeroProps> = ({
|
|
|
25
26
|
subtitle,
|
|
26
27
|
iconName,
|
|
27
28
|
gradientColors = ["#00FF88", "#10B981"],
|
|
29
|
+
style,
|
|
28
30
|
}) => {
|
|
29
31
|
const tokens = useAppDesignTokens();
|
|
30
32
|
|
|
33
|
+
const finalColors = gradientColors || [
|
|
34
|
+
tokens.colors.secondary ?? tokens.colors.info,
|
|
35
|
+
tokens.colors.primary,
|
|
36
|
+
];
|
|
37
|
+
|
|
31
38
|
return (
|
|
32
|
-
<View style={styles.container}>
|
|
39
|
+
<View style={[styles.container, style]}>
|
|
33
40
|
<LinearGradient
|
|
34
|
-
colors={
|
|
41
|
+
colors={finalColors as any}
|
|
35
42
|
start={{ x: 0, y: 0 }}
|
|
36
43
|
end={{ x: 1, y: 1 }}
|
|
37
44
|
style={styles.gradient}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hero Section Component
|
|
3
|
-
* Generic hero section with gradient background
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { View, StyleSheet } from "react-native";
|
|
8
|
-
import { LinearGradient } from "expo-linear-gradient";
|
|
9
|
-
import {
|
|
10
|
-
AtomicText,
|
|
11
|
-
AtomicIcon,
|
|
12
|
-
useAppDesignTokens,
|
|
13
|
-
} from "@umituz/react-native-design-system";
|
|
14
|
-
|
|
15
|
-
export interface HeroSectionProps {
|
|
16
|
-
title: string;
|
|
17
|
-
subtitle: string;
|
|
18
|
-
iconName?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const HeroSection: React.FC<HeroSectionProps> = ({
|
|
22
|
-
title,
|
|
23
|
-
subtitle,
|
|
24
|
-
iconName = "image-outline",
|
|
25
|
-
}) => {
|
|
26
|
-
const tokens = useAppDesignTokens();
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<View style={componentStyles.container}>
|
|
30
|
-
<LinearGradient
|
|
31
|
-
colors={[
|
|
32
|
-
tokens.colors.secondary ?? tokens.colors.info,
|
|
33
|
-
tokens.colors.primary,
|
|
34
|
-
]}
|
|
35
|
-
start={{ x: 0, y: 0 }}
|
|
36
|
-
end={{ x: 1, y: 1 }}
|
|
37
|
-
style={componentStyles.gradient}
|
|
38
|
-
>
|
|
39
|
-
<View style={componentStyles.iconContainer}>
|
|
40
|
-
<AtomicIcon name={iconName as never} size="xl" color="onSurface" />
|
|
41
|
-
</View>
|
|
42
|
-
<AtomicText
|
|
43
|
-
type="headlineSmall"
|
|
44
|
-
style={[componentStyles.title, { color: tokens.colors.textInverse }]}
|
|
45
|
-
>
|
|
46
|
-
{title}
|
|
47
|
-
</AtomicText>
|
|
48
|
-
<AtomicText
|
|
49
|
-
type="bodyMedium"
|
|
50
|
-
style={[componentStyles.subtitle, { color: tokens.colors.textInverse }]}
|
|
51
|
-
>
|
|
52
|
-
{subtitle}
|
|
53
|
-
</AtomicText>
|
|
54
|
-
</LinearGradient>
|
|
55
|
-
</View>
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const componentStyles = StyleSheet.create({
|
|
60
|
-
container: {
|
|
61
|
-
marginHorizontal: 16,
|
|
62
|
-
marginBottom: 24,
|
|
63
|
-
borderRadius: 20,
|
|
64
|
-
overflow: "hidden",
|
|
65
|
-
},
|
|
66
|
-
gradient: {
|
|
67
|
-
padding: 32,
|
|
68
|
-
alignItems: "center",
|
|
69
|
-
justifyContent: "center",
|
|
70
|
-
},
|
|
71
|
-
iconContainer: {
|
|
72
|
-
width: 80,
|
|
73
|
-
height: 80,
|
|
74
|
-
borderRadius: 40,
|
|
75
|
-
backgroundColor: "rgba(255, 255, 255, 0.2)",
|
|
76
|
-
alignItems: "center",
|
|
77
|
-
justifyContent: "center",
|
|
78
|
-
},
|
|
79
|
-
title: {
|
|
80
|
-
textAlign: "center",
|
|
81
|
-
marginTop: 16,
|
|
82
|
-
fontWeight: "700",
|
|
83
|
-
},
|
|
84
|
-
subtitle: {
|
|
85
|
-
textAlign: "center",
|
|
86
|
-
marginTop: 8,
|
|
87
|
-
opacity: 0.9,
|
|
88
|
-
},
|
|
89
|
-
});
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TextToVoiceHeader Component
|
|
3
|
-
* Header with icon and description
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { View, StyleSheet } from "react-native";
|
|
8
|
-
import {
|
|
9
|
-
AtomicText,
|
|
10
|
-
AtomicIcon,
|
|
11
|
-
useAppDesignTokens,
|
|
12
|
-
} from "@umituz/react-native-design-system";
|
|
13
|
-
import { useLocalization } from "@umituz/react-native-localization";
|
|
14
|
-
import type { TextToVoiceHeaderProps } from "../../domain/types";
|
|
15
|
-
|
|
16
|
-
export const TextToVoiceHeader: React.FC<TextToVoiceHeaderProps> = ({
|
|
17
|
-
descriptionKey,
|
|
18
|
-
iconName,
|
|
19
|
-
headerContent,
|
|
20
|
-
style,
|
|
21
|
-
}) => {
|
|
22
|
-
const { t } = useLocalization();
|
|
23
|
-
const tokens = useAppDesignTokens();
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<View style={[styles.container, style]}>
|
|
27
|
-
{headerContent || (
|
|
28
|
-
<View style={styles.content}>
|
|
29
|
-
<View
|
|
30
|
-
style={[
|
|
31
|
-
styles.iconContainer,
|
|
32
|
-
{ backgroundColor: `${tokens.colors.primary}20` },
|
|
33
|
-
]}
|
|
34
|
-
>
|
|
35
|
-
<AtomicIcon
|
|
36
|
-
name={iconName as "Mic"}
|
|
37
|
-
size="lg"
|
|
38
|
-
color="primary"
|
|
39
|
-
/>
|
|
40
|
-
</View>
|
|
41
|
-
<AtomicText
|
|
42
|
-
type="bodySmall"
|
|
43
|
-
style={[styles.description, { color: tokens.colors.textSecondary }]}
|
|
44
|
-
>
|
|
45
|
-
{t(descriptionKey)}
|
|
46
|
-
</AtomicText>
|
|
47
|
-
</View>
|
|
48
|
-
)}
|
|
49
|
-
</View>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const styles = StyleSheet.create({
|
|
54
|
-
container: {
|
|
55
|
-
alignItems: "center",
|
|
56
|
-
marginBottom: 16,
|
|
57
|
-
},
|
|
58
|
-
content: {
|
|
59
|
-
alignItems: "center",
|
|
60
|
-
},
|
|
61
|
-
iconContainer: {
|
|
62
|
-
width: 56,
|
|
63
|
-
height: 56,
|
|
64
|
-
borderRadius: 28,
|
|
65
|
-
alignItems: "center",
|
|
66
|
-
justifyContent: "center",
|
|
67
|
-
marginBottom: 12,
|
|
68
|
-
},
|
|
69
|
-
description: {
|
|
70
|
-
marginTop: 8,
|
|
71
|
-
textAlign: "center",
|
|
72
|
-
},
|
|
73
|
-
});
|