@umituz/react-native-ai-generation-content 1.17.43 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.17.43",
3
+ "version": "1.17.45",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -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
- export { TextToVoiceHeader } from "./TextToVoiceHeader";
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={gradientColors}
41
+ colors={finalColors as any}
35
42
  start={{ x: 0, y: 0 }}
36
43
  end={{ x: 1, y: 1 }}
37
44
  style={styles.gradient}
@@ -26,7 +26,7 @@ export const AIGenScreenHeader: React.FC<AIGenScreenHeaderProps> = ({
26
26
  onNavigationPress,
27
27
  headerContent,
28
28
  rightContent,
29
- titleType = "titleLarge",
29
+ titleType = "headlineLarge",
30
30
  showDescription = !!description,
31
31
  }) => {
32
32
  const tokens = useAppDesignTokens();
@@ -49,33 +49,34 @@ export const AIGenScreenHeader: React.FC<AIGenScreenHeaderProps> = ({
49
49
  return (
50
50
  <View style={styles.header}>
51
51
  <View style={styles.headerTop}>
52
- <View style={styles.leftContainer}>
53
- <TouchableOpacity
54
- onPress={onNavigationPress}
55
- style={buttonStyle}
56
- hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
57
- >
58
- <AtomicIcon name={iconName} size="md" color={iconColor} />
59
- </TouchableOpacity>
52
+ <View style={styles.titleContainer}>
60
53
  <AtomicText
61
54
  type={titleType}
62
55
  style={{
63
56
  color: tokens.colors.textPrimary,
64
57
  fontWeight: "700",
65
- marginLeft: navigationType === "back" ? 8 : 0,
66
58
  }}
67
59
  >
68
60
  {title}
69
61
  </AtomicText>
70
62
  </View>
71
- <View style={styles.headerActions}>{rightContent}</View>
63
+ <View style={styles.headerActions}>
64
+ {rightContent}
65
+ <TouchableOpacity
66
+ onPress={onNavigationPress}
67
+ style={buttonStyle}
68
+ hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
69
+ >
70
+ <AtomicIcon name={iconName} size="md" color={iconColor} />
71
+ </TouchableOpacity>
72
+ </View>
72
73
  </View>
73
74
  {showDescription && description && (
74
75
  <AtomicText
75
76
  type="bodyMedium"
76
77
  style={[
77
78
  styles.description,
78
- { color: tokens.colors.textSecondary, marginTop: 8 },
79
+ { color: tokens.colors.textSecondary, marginTop: 4 },
79
80
  ]}
80
81
  >
81
82
  {description}
@@ -88,34 +89,37 @@ export const AIGenScreenHeader: React.FC<AIGenScreenHeaderProps> = ({
88
89
 
89
90
  const styles = StyleSheet.create({
90
91
  header: {
91
- padding: 16,
92
+ paddingHorizontal: 16,
92
93
  paddingTop: 60,
93
94
  width: "100%",
95
+ marginBottom: 24,
94
96
  },
95
97
  headerTop: {
96
98
  flexDirection: "row",
97
- alignItems: "center",
99
+ alignItems: "flex-start",
98
100
  justifyContent: "space-between",
99
101
  },
100
- leftContainer: {
101
- flexDirection: "row",
102
- alignItems: "center",
102
+ titleContainer: {
103
103
  flex: 1,
104
+ marginRight: 12,
104
105
  },
105
106
  headerActions: {
106
107
  flexDirection: "row",
107
108
  alignItems: "center",
108
- gap: 12,
109
+ gap: 8,
109
110
  },
110
111
  navigationButton: {
111
- width: 40,
112
- height: 40,
112
+ width: 36,
113
+ height: 36,
114
+ borderRadius: 18,
113
115
  alignItems: "center",
114
116
  justifyContent: "center",
115
117
  },
116
- backButton: {},
118
+ backButton: {
119
+ width: 40,
120
+ height: 40,
121
+ },
117
122
  closeButton: {
118
- borderRadius: 20,
119
123
  borderWidth: 1,
120
124
  },
121
125
  description: {
@@ -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
- });