@umituz/react-native-ai-generation-content 1.17.41 → 1.17.42

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.41",
3
+ "version": "1.17.42",
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
@@ -295,6 +295,7 @@ export {
295
295
  StyleSelector,
296
296
  AspectRatioSelector,
297
297
  DurationSelector,
298
+ StylePresetsGrid,
298
299
  } from "./presentation/components";
299
300
 
300
301
  export type {
@@ -326,6 +327,8 @@ export type {
326
327
  AIGenerationProgressInlineProps,
327
328
  PromptInputProps,
328
329
  AIGenerationHeroProps,
330
+ StylePresetsGridProps,
331
+ StylePreset,
329
332
  // Buttons
330
333
  GenerateButtonProps,
331
334
  // Display
@@ -0,0 +1,131 @@
1
+ /**
2
+ * StylePresetsGrid Component
3
+ * Generic grid of preset styles with emojis, names, and optional duration badges.
4
+ */
5
+
6
+ import React from "react";
7
+ import { View, TouchableOpacity, Text, StyleSheet } from "react-native";
8
+ import {
9
+ AtomicText,
10
+ useAppDesignTokens,
11
+ } from "@umituz/react-native-design-system";
12
+
13
+ export interface StylePreset {
14
+ readonly id: string;
15
+ readonly name: string;
16
+ readonly emoji: string;
17
+ readonly description: string;
18
+ readonly duration?: number;
19
+ }
20
+
21
+ export interface StylePresetsGridProps {
22
+ readonly presets: readonly StylePreset[];
23
+ readonly onPresetPress: (preset: StylePreset) => void;
24
+ readonly disabled?: boolean;
25
+ readonly title?: string;
26
+ }
27
+
28
+ export const StylePresetsGrid: React.FC<StylePresetsGridProps> = ({
29
+ presets,
30
+ onPresetPress,
31
+ disabled = false,
32
+ title = "Quick Start - Choose a Style",
33
+ }) => {
34
+ const tokens = useAppDesignTokens();
35
+
36
+ return (
37
+ <View style={styles.section}>
38
+ <AtomicText
39
+ type="bodyMedium"
40
+ style={[styles.title, { color: tokens.colors.textPrimary }]}
41
+ >
42
+ ⚡ {title}
43
+ </AtomicText>
44
+ <View style={styles.grid}>
45
+ {presets.map((preset) => (
46
+ <TouchableOpacity
47
+ key={preset.id}
48
+ style={[
49
+ styles.card,
50
+ { backgroundColor: tokens.colors.surface },
51
+ ]}
52
+ onPress={() => onPresetPress(preset)}
53
+ disabled={disabled}
54
+ >
55
+ <View style={styles.cardHeader}>
56
+ <Text style={styles.emoji}>{preset.emoji}</Text>
57
+ {preset.duration !== undefined && (
58
+ <View
59
+ style={[
60
+ styles.badge,
61
+ { backgroundColor: tokens.colors.primary + "20" },
62
+ ]}
63
+ >
64
+ <AtomicText
65
+ type="labelSmall"
66
+ style={{ color: tokens.colors.primary, fontSize: 10 }}
67
+ >
68
+ {preset.duration}s
69
+ </AtomicText>
70
+ </View>
71
+ )}
72
+ </View>
73
+ <AtomicText
74
+ type="bodyMedium"
75
+ style={[styles.cardTitle, { color: tokens.colors.textPrimary }]}
76
+ >
77
+ {preset.name}
78
+ </AtomicText>
79
+ <AtomicText
80
+ type="labelSmall"
81
+ style={{ color: tokens.colors.textSecondary, marginTop: 4 }}
82
+ >
83
+ {preset.description}
84
+ </AtomicText>
85
+ </TouchableOpacity>
86
+ ))}
87
+ </View>
88
+ </View>
89
+ );
90
+ };
91
+
92
+ const styles = StyleSheet.create({
93
+ section: {
94
+ padding: 16,
95
+ width: "100%",
96
+ },
97
+ title: {
98
+ fontWeight: "600",
99
+ marginBottom: 16,
100
+ },
101
+ grid: {
102
+ flexDirection: "row",
103
+ flexWrap: "wrap",
104
+ gap: 12,
105
+ },
106
+ card: {
107
+ flex: 1,
108
+ minWidth: "47%",
109
+ padding: 16,
110
+ borderRadius: 16,
111
+ borderWidth: 1,
112
+ borderColor: "rgba(0,0,0,0.05)",
113
+ },
114
+ cardHeader: {
115
+ flexDirection: "row",
116
+ alignItems: "center",
117
+ justifyContent: "space-between",
118
+ },
119
+ emoji: {
120
+ fontSize: 40,
121
+ },
122
+ badge: {
123
+ paddingHorizontal: 8,
124
+ paddingVertical: 4,
125
+ borderRadius: 12,
126
+ },
127
+ cardTitle: {
128
+ fontWeight: "600",
129
+ marginTop: 8,
130
+ },
131
+ });
@@ -7,6 +7,7 @@ export { PendingJobCardActions } from "./PendingJobCardActions";
7
7
  export { AIGenerationProgressInline } from "./AIGenerationProgressInline";
8
8
  export { PromptInput } from "./PromptInput";
9
9
  export { AIGenerationHero } from "./AIGenerationHero";
10
+ export * from "./StylePresetsGrid";
10
11
 
11
12
  export type {
12
13
  GenerationProgressModalProps,