@umituz/react-native-ai-generation-content 1.17.44 → 1.17.46

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.44",
3
+ "version": "1.17.46",
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
package/src/index.ts CHANGED
@@ -282,6 +282,8 @@ export {
282
282
  AIGenerationProgressInline,
283
283
  PromptInput,
284
284
  AIGenerationHero,
285
+ ExamplePrompts,
286
+ ModerationSummary,
285
287
  // Buttons
286
288
  GenerateButton,
287
289
  // Display
@@ -331,6 +333,8 @@ export type {
331
333
  AIGenerationProgressInlineProps,
332
334
  PromptInputProps,
333
335
  AIGenerationHeroProps,
336
+ ExamplePromptsProps,
337
+ ModerationSummaryProps,
334
338
  StylePresetsGridProps,
335
339
  StylePreset,
336
340
  // Buttons
@@ -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}
@@ -36,3 +36,5 @@ export * from "./display";
36
36
  export * from "./headers";
37
37
  export * from "./PhotoUploadCard";
38
38
  export * from "./selectors";
39
+ export * from "./prompts/ExamplePrompts";
40
+ export * from "./moderation/ModerationSummary";
@@ -0,0 +1,104 @@
1
+ /**
2
+ * ModerationSummary Component
3
+ * Displays content moderation results including age rating and warnings
4
+ */
5
+
6
+ import React from "react";
7
+ import { View, StyleSheet } from "react-native";
8
+ import {
9
+ AtomicText,
10
+ useAppDesignTokens,
11
+ } from "@umituz/react-native-design-system";
12
+
13
+ export interface ModerationSummaryProps {
14
+ readonly ageRating?: string;
15
+ readonly contentWarnings: readonly string[];
16
+ readonly title?: string;
17
+ readonly style?: any;
18
+ }
19
+
20
+ export const ModerationSummary: React.FC<ModerationSummaryProps> = ({
21
+ ageRating,
22
+ contentWarnings,
23
+ title = "Safety Check",
24
+ style,
25
+ }) => {
26
+ const tokens = useAppDesignTokens();
27
+
28
+ if (!ageRating && (!contentWarnings || contentWarnings.length === 0)) {
29
+ return null;
30
+ }
31
+
32
+ return (
33
+ <View style={[styles.container, style]}>
34
+ {title && (
35
+ <AtomicText
36
+ type="bodyMedium"
37
+ style={[styles.label, { color: tokens.colors.textPrimary }]}
38
+ >
39
+ {title}
40
+ </AtomicText>
41
+ )}
42
+ {ageRating && (
43
+ <View
44
+ style={[
45
+ styles.badge,
46
+ {
47
+ backgroundColor: tokens.colors.surface,
48
+ borderColor: tokens.colors.borderLight,
49
+ },
50
+ ]}
51
+ >
52
+ <AtomicText
53
+ type="bodySmall"
54
+ style={[styles.badgeText, { color: tokens.colors.textPrimary }]}
55
+ >
56
+ Age Rating: {ageRating}
57
+ </AtomicText>
58
+ </View>
59
+ )}
60
+ {contentWarnings && contentWarnings.length > 0 && (
61
+ <View style={styles.warningsContainer}>
62
+ {contentWarnings.map((warning, index) => (
63
+ <AtomicText
64
+ key={`${warning}-${index}`}
65
+ type="labelSmall"
66
+ style={[styles.warningText, { color: tokens.colors.textSecondary }]}
67
+ >
68
+ • {warning}
69
+ </AtomicText>
70
+ ))}
71
+ </View>
72
+ )}
73
+ </View>
74
+ );
75
+ };
76
+
77
+ const styles = StyleSheet.create({
78
+ container: {
79
+ padding: 16,
80
+ width: "100%",
81
+ },
82
+ label: {
83
+ fontWeight: "600",
84
+ marginBottom: 12,
85
+ },
86
+ badge: {
87
+ paddingVertical: 8,
88
+ paddingHorizontal: 12,
89
+ borderRadius: 12,
90
+ borderWidth: 1,
91
+ alignSelf: "flex-start",
92
+ marginBottom: 8,
93
+ },
94
+ badgeText: {
95
+ fontWeight: "600",
96
+ },
97
+ warningsContainer: {
98
+ marginTop: 4,
99
+ },
100
+ warningText: {
101
+ marginBottom: 4,
102
+ lineHeight: 16,
103
+ },
104
+ });
@@ -0,0 +1,105 @@
1
+ /**
2
+ * ExamplePrompts Component
3
+ * Horizontal scrollable list of example prompts
4
+ * Props-driven for 100+ apps compatibility
5
+ */
6
+
7
+ import React from "react";
8
+ import { View, ScrollView, TouchableOpacity, StyleSheet } from "react-native";
9
+ import {
10
+ AtomicText,
11
+ useAppDesignTokens,
12
+ } from "@umituz/react-native-design-system";
13
+
14
+ export interface ExamplePromptsProps {
15
+ readonly prompts: readonly string[];
16
+ readonly onSelectPrompt: (prompt: string) => void;
17
+ readonly title?: string;
18
+ readonly cardWidth?: number;
19
+ readonly style?: any;
20
+ }
21
+
22
+ export const ExamplePrompts: React.FC<ExamplePromptsProps> = ({
23
+ prompts,
24
+ onSelectPrompt,
25
+ title = "✨ Example Prompts",
26
+ cardWidth = 180,
27
+ style,
28
+ }) => {
29
+ const tokens = useAppDesignTokens();
30
+
31
+ if (prompts.length === 0) {
32
+ return null;
33
+ }
34
+
35
+ return (
36
+ <View style={[styles.container, style]}>
37
+ {title && (
38
+ <AtomicText
39
+ type="bodyMedium"
40
+ style={[styles.label, { color: tokens.colors.textPrimary }]}
41
+ >
42
+ {title}
43
+ </AtomicText>
44
+ )}
45
+ <ScrollView
46
+ horizontal
47
+ showsHorizontalScrollIndicator={false}
48
+ contentContainerStyle={styles.scrollContent}
49
+ style={styles.scrollView}
50
+ >
51
+ {prompts.map((prompt, index) => (
52
+ <TouchableOpacity
53
+ key={`prompt-${index}`}
54
+ style={[
55
+ styles.card,
56
+ {
57
+ backgroundColor: tokens.colors.surface,
58
+ width: cardWidth,
59
+ },
60
+ ]}
61
+ onPress={() => onSelectPrompt(prompt)}
62
+ activeOpacity={0.7}
63
+ >
64
+ <AtomicText
65
+ type="bodySmall"
66
+ style={[styles.promptText, { color: tokens.colors.textPrimary }]}
67
+ numberOfLines={2}
68
+ >
69
+ {prompt}
70
+ </AtomicText>
71
+ </TouchableOpacity>
72
+ ))}
73
+ </ScrollView>
74
+ </View>
75
+ );
76
+ };
77
+
78
+ const styles = StyleSheet.create({
79
+ container: {
80
+ paddingVertical: 16,
81
+ width: "100%",
82
+ },
83
+ label: {
84
+ fontWeight: "600",
85
+ marginBottom: 12,
86
+ marginHorizontal: 16,
87
+ },
88
+ scrollView: {
89
+ marginHorizontal: 0,
90
+ },
91
+ scrollContent: {
92
+ paddingHorizontal: 16,
93
+ paddingRight: 32,
94
+ },
95
+ card: {
96
+ padding: 16,
97
+ borderRadius: 12,
98
+ marginRight: 12,
99
+ minHeight: 60,
100
+ justifyContent: "center",
101
+ },
102
+ promptText: {
103
+ lineHeight: 18,
104
+ },
105
+ });
@@ -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
- });