@umituz/react-native-ai-generation-content 1.17.45 → 1.17.47

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.45",
3
+ "version": "1.17.47",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -7,8 +7,8 @@
7
7
  export { TextToImagePromptInput } from "./TextToImagePromptInput";
8
8
  export type { TextToImagePromptInputProps } from "./TextToImagePromptInput";
9
9
 
10
- export { ExamplePrompts as TextToImageExamplePrompts } from "./ExamplePrompts";
11
- export type { ExamplePromptsProps as TextToImageExamplePromptsProps } from "./ExamplePrompts";
10
+ export { ExamplePrompts as TextToImageExamplePrompts } from "../../../presentation/components/prompts/ExamplePrompts";
11
+ export type { ExamplePromptsProps as TextToImageExamplePromptsProps } from "../../../presentation/components/prompts/ExamplePrompts";
12
12
 
13
13
  // Selector Components
14
14
  export { NumImagesSelector as TextToImageNumImagesSelector } from "./NumImagesSelector";
@@ -1,6 +1,6 @@
1
1
  export { TextToVoiceTextInput } from "./TextToVoiceTextInput";
2
2
  export { TextToVoiceOptionalInput } from "./TextToVoiceOptionalInput";
3
- export { TextToVoiceExamplePrompts } from "./TextToVoiceExamplePrompts";
3
+ export { ExamplePrompts as TextToVoiceExamplePrompts } from "../../../presentation/components/prompts/ExamplePrompts";
4
4
  export { TextToVoiceGenerateButton } from "./TextToVoiceGenerateButton";
5
5
  export { TextToVoiceAudioPlayer } from "./TextToVoiceAudioPlayer";
6
6
  export { TextToVoiceErrorMessage } from "./TextToVoiceErrorMessage";
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
@@ -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
+ });
@@ -1,6 +1,7 @@
1
1
  /**
2
- * Example Prompts Component
2
+ * ExamplePrompts Component
3
3
  * Horizontal scrollable list of example prompts
4
+ * Props-driven for 100+ apps compatibility
4
5
  */
5
6
 
6
7
  import React from "react";
@@ -11,17 +12,19 @@ import {
11
12
  } from "@umituz/react-native-design-system";
12
13
 
13
14
  export interface ExamplePromptsProps {
14
- prompts: string[];
15
- onSelectPrompt: (prompt: string) => void;
16
- label: string;
17
- cardWidth?: number;
15
+ readonly prompts: readonly string[];
16
+ readonly onSelectPrompt: (prompt: string) => void;
17
+ readonly title?: string;
18
+ readonly cardWidth?: number;
19
+ readonly style?: any;
18
20
  }
19
21
 
20
22
  export const ExamplePrompts: React.FC<ExamplePromptsProps> = ({
21
23
  prompts,
22
24
  onSelectPrompt,
23
- label,
25
+ title = "✨ Example Prompts",
24
26
  cardWidth = 180,
27
+ style,
25
28
  }) => {
26
29
  const tokens = useAppDesignTokens();
27
30
 
@@ -30,17 +33,20 @@ export const ExamplePrompts: React.FC<ExamplePromptsProps> = ({
30
33
  }
31
34
 
32
35
  return (
33
- <View style={styles.container}>
34
- <AtomicText
35
- type="bodyMedium"
36
- style={[styles.label, { color: tokens.colors.textPrimary }]}
37
- >
38
- {label}
39
- </AtomicText>
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
+ )}
40
45
  <ScrollView
41
46
  horizontal
42
47
  showsHorizontalScrollIndicator={false}
43
48
  contentContainerStyle={styles.scrollContent}
49
+ style={styles.scrollView}
44
50
  >
45
51
  {prompts.map((prompt, index) => (
46
52
  <TouchableOpacity
@@ -57,7 +63,7 @@ export const ExamplePrompts: React.FC<ExamplePromptsProps> = ({
57
63
  >
58
64
  <AtomicText
59
65
  type="bodySmall"
60
- style={{ color: tokens.colors.textPrimary }}
66
+ style={[styles.promptText, { color: tokens.colors.textPrimary }]}
61
67
  numberOfLines={2}
62
68
  >
63
69
  {prompt}
@@ -71,18 +77,29 @@ export const ExamplePrompts: React.FC<ExamplePromptsProps> = ({
71
77
 
72
78
  const styles = StyleSheet.create({
73
79
  container: {
74
- marginBottom: 24,
80
+ paddingVertical: 16,
81
+ width: "100%",
75
82
  },
76
83
  label: {
77
84
  fontWeight: "600",
78
85
  marginBottom: 12,
86
+ marginHorizontal: 16,
87
+ },
88
+ scrollView: {
89
+ marginHorizontal: 0,
79
90
  },
80
91
  scrollContent: {
81
- paddingRight: 16,
92
+ paddingHorizontal: 16,
93
+ paddingRight: 32,
82
94
  },
83
95
  card: {
84
- padding: 12,
85
- borderRadius: 8,
96
+ padding: 16,
97
+ borderRadius: 12,
86
98
  marginRight: 12,
99
+ minHeight: 60,
100
+ justifyContent: "center",
101
+ },
102
+ promptText: {
103
+ lineHeight: 18,
87
104
  },
88
105
  });
@@ -1,77 +0,0 @@
1
- /**
2
- * TextToVoiceExamplePrompts Component
3
- * Horizontal scrolling example prompts
4
- */
5
-
6
- import React from "react";
7
- import { View, ScrollView, TouchableOpacity, StyleSheet } from "react-native";
8
- import { useLocalization } from "@umituz/react-native-localization";
9
- import {
10
- AtomicText,
11
- useAppDesignTokens,
12
- } from "@umituz/react-native-design-system";
13
- import type { TextToVoiceExamplePromptsProps } from "../../domain/types";
14
-
15
- export const TextToVoiceExamplePrompts: React.FC<
16
- TextToVoiceExamplePromptsProps
17
- > = ({ prompts, onSelectPrompt, labelKey, style }) => {
18
- const { t } = useLocalization();
19
- const tokens = useAppDesignTokens();
20
-
21
- if (prompts.length === 0) {
22
- return null;
23
- }
24
-
25
- return (
26
- <View style={[styles.section, style]}>
27
- <AtomicText
28
- type="bodyMedium"
29
- style={[styles.label, { color: tokens.colors.textPrimary }]}
30
- >
31
- {t(labelKey)}
32
- </AtomicText>
33
- <ScrollView
34
- horizontal
35
- showsHorizontalScrollIndicator={false}
36
- style={styles.scrollView}
37
- >
38
- {prompts.map((prompt, index) => (
39
- <TouchableOpacity
40
- key={index}
41
- style={[styles.promptCard, { backgroundColor: tokens.colors.surface }]}
42
- onPress={() => onSelectPrompt(prompt)}
43
- >
44
- <AtomicText
45
- type="bodySmall"
46
- style={{ color: tokens.colors.textPrimary }}
47
- numberOfLines={2}
48
- >
49
- {prompt}
50
- </AtomicText>
51
- </TouchableOpacity>
52
- ))}
53
- </ScrollView>
54
- </View>
55
- );
56
- };
57
-
58
- const styles = StyleSheet.create({
59
- section: {
60
- marginBottom: 24,
61
- },
62
- label: {
63
- fontWeight: "600",
64
- marginBottom: 12,
65
- },
66
- scrollView: {
67
- marginHorizontal: -16,
68
- paddingHorizontal: 16,
69
- },
70
- promptCard: {
71
- padding: 12,
72
- borderRadius: 8,
73
- marginRight: 12,
74
- minWidth: 150,
75
- maxWidth: 200,
76
- },
77
- });