@umituz/react-native-ai-generation-content 1.21.2 → 1.22.1

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.21.2",
3
+ "version": "1.22.1",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -14,18 +14,54 @@ export enum ScenarioCategory {
14
14
  CULTURAL = "cultural",
15
15
  }
16
16
 
17
+ /**
18
+ * Output type for AI generation
19
+ */
20
+ export type ScenarioOutputType = 'image' | 'video' | 'both';
21
+
22
+ /**
23
+ * Scenario media configuration
24
+ */
25
+ export interface ScenarioMedia {
26
+ readonly imageUrl?: string; // Preview/thumbnail image
27
+ readonly videoUrl?: string; // Preview video URL
28
+ readonly previewImageUrl?: string; // Smaller thumbnail
29
+ }
30
+
17
31
  export interface ScenarioData {
18
32
  readonly id: string;
19
33
  readonly category?: ScenarioCategory | string;
34
+
35
+ // Content (app provides in target language)
20
36
  readonly title: string;
21
37
  readonly description: string;
38
+
39
+ // AI Configuration
40
+ readonly outputType: ScenarioOutputType; // What this scenario generates
41
+ readonly aiPrompt: string; // AI generation prompt
42
+ readonly storyTemplate?: string; // Story template with placeholders (optional)
43
+
44
+ // Media
22
45
  readonly icon: string;
23
- readonly imageUrl?: string;
24
- readonly previewImageUrl?: string;
25
- readonly aiPrompt: string;
26
- readonly storyTemplate: string;
27
- readonly requiresPhoto?: boolean;
28
- readonly hidden?: boolean;
46
+ readonly imageUrl?: string; // Preview image
47
+ readonly videoUrl?: string; // Preview video
48
+ readonly previewImageUrl?: string; // Thumbnail
49
+
50
+ // Requirements
51
+ readonly requiresPhoto?: boolean; // Requires user photo upload
52
+ readonly requiresMultiplePhotos?: boolean; // Requires multiple photos (e.g., couples)
53
+ readonly minPhotos?: number; // Minimum photos required
54
+ readonly maxPhotos?: number; // Maximum photos allowed
55
+
56
+ // Display
57
+ readonly hidden?: boolean; // Hide from UI
58
+ readonly featured?: boolean; // Featured/promoted scenario
59
+ readonly order?: number; // Display order
60
+
61
+ // Metadata
62
+ readonly tags?: readonly string[]; // Search/filter tags
63
+ readonly duration?: number; // Video duration (for video scenarios)
64
+ readonly aspectRatio?: string; // Output aspect ratio (e.g., "16:9", "9:16")
29
65
  }
30
66
 
31
67
  /**
@@ -33,8 +69,8 @@ export interface ScenarioData {
33
69
  */
34
70
  export interface ScenarioMainCategory {
35
71
  readonly id: string;
36
- readonly titleKey: string;
37
- readonly descriptionKey?: string;
72
+ readonly title: string;
73
+ readonly description?: string;
38
74
  readonly icon?: string;
39
75
  readonly emoji?: string;
40
76
  readonly order: number;
@@ -46,8 +82,8 @@ export interface ScenarioMainCategory {
46
82
  */
47
83
  export interface ScenarioSubCategory {
48
84
  readonly id: string;
49
- readonly titleKey: string;
50
- readonly descriptionKey?: string;
85
+ readonly title: string;
86
+ readonly description?: string;
51
87
  readonly icon?: string;
52
88
  readonly emoji?: string;
53
89
  readonly mainCategoryId: string;
@@ -122,15 +122,13 @@ export const HierarchicalScenarioListScreen: React.FC<HierarchicalScenarioListSc
122
122
 
123
123
  const renderItem = useCallback(
124
124
  ({ item }: ListRenderItemInfo<ScenarioData>) => {
125
- const title = t(`scenario.${item.id}.title`);
126
- const description = t(`scenario.${item.id}.description`);
127
125
  const isSelected = selectedId === item.id;
128
126
 
129
127
  return (
130
128
  <AtomicCard
131
129
  image={item.previewImageUrl || item.imageUrl || ""}
132
- title={title}
133
- subtitle={description}
130
+ title={item.title}
131
+ subtitle={item.description}
134
132
  imageAspectRatio={1.25}
135
133
  selected={isSelected}
136
134
  style={{ width: cardWidth }}
@@ -139,7 +137,7 @@ export const HierarchicalScenarioListScreen: React.FC<HierarchicalScenarioListSc
139
137
  />
140
138
  );
141
139
  },
142
- [cardWidth, selectedId, t, handleCardPress]
140
+ [cardWidth, selectedId, handleCardPress]
143
141
  );
144
142
 
145
143
  const ListEmptyComponent = useMemo(
@@ -65,8 +65,8 @@ export const MainCategoryScreen: React.FC<MainCategoryScreenProps> = ({
65
65
 
66
66
  const renderItem = useCallback(
67
67
  ({ item }: ListRenderItemInfo<ScenarioMainCategory>) => {
68
- const title = t(item.titleKey);
69
- const description = item.descriptionKey ? t(item.descriptionKey) : "";
68
+ const title = item.title;
69
+ const description = item.description || "";
70
70
 
71
71
  return (
72
72
  <TouchableOpacity
@@ -121,7 +121,7 @@ export const MainCategoryScreen: React.FC<MainCategoryScreenProps> = ({
121
121
  </TouchableOpacity>
122
122
  );
123
123
  },
124
- [t, tokens, styles, handleCategoryPress]
124
+ [tokens, styles, handleCategoryPress]
125
125
  );
126
126
 
127
127
  return (
@@ -83,8 +83,8 @@ export const SubCategoryScreen: React.FC<SubCategoryScreenProps> = ({
83
83
 
84
84
  const renderItem = useCallback(
85
85
  ({ item }: ListRenderItemInfo<ScenarioSubCategory>) => {
86
- const title = t(item.titleKey);
87
- const description = item.descriptionKey ? t(item.descriptionKey) : "";
86
+ const title = item.title;
87
+ const description = item.description || "";
88
88
 
89
89
  return (
90
90
  <TouchableOpacity
@@ -139,7 +139,7 @@ export const SubCategoryScreen: React.FC<SubCategoryScreenProps> = ({
139
139
  </TouchableOpacity>
140
140
  );
141
141
  },
142
- [t, tokens, styles, handleSubCategoryPress]
142
+ [tokens, styles, handleSubCategoryPress]
143
143
  );
144
144
 
145
145
  return (