@umituz/react-native-ai-generation-content 1.17.45 → 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.45",
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",
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
+ });
@@ -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
+ });