@umituz/react-native-ai-generation-content 1.59.2 → 1.59.4
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 +1 -1
- package/src/domains/generation/presentation/useAIGeneration.hook.ts +1 -1
- package/src/domains/generation/wizard/infrastructure/strategies/image-generation.strategy.ts +4 -4
- package/src/domains/scenarios/README.md +17 -23
- package/src/features/text-to-image/README.md +1 -1
- package/src/infrastructure/providers/generation-config.provider.tsx +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.59.
|
|
3
|
+
"version": "1.59.4",
|
|
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",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* useAIGeneration Hook
|
|
3
3
|
* Universal hook for ALL AI generation features
|
|
4
|
-
* Replaces all feature-specific hooks
|
|
4
|
+
* Replaces all feature-specific hooks with a single unified API
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { useGenerationOrchestrator } from "../../../presentation/hooks/generation/orchestrator";
|
package/src/domains/generation/wizard/infrastructure/strategies/image-generation.strategy.ts
CHANGED
|
@@ -46,7 +46,7 @@ export async function buildImageInput(
|
|
|
46
46
|
// Extract style for text-to-image
|
|
47
47
|
const styleValue = extractSelection(wizardData.style);
|
|
48
48
|
const style = typeof styleValue === "string" ? styleValue : undefined;
|
|
49
|
-
const interactionStyle = (scenario.interactionStyle as InteractionStyle) ?? "
|
|
49
|
+
const interactionStyle = (scenario.interactionStyle as InteractionStyle) ?? "natural";
|
|
50
50
|
const promptType = scenario.promptType;
|
|
51
51
|
|
|
52
52
|
return { photos, prompt: finalPrompt, style, interactionStyle, promptType };
|
|
@@ -58,9 +58,9 @@ export async function buildImageInput(
|
|
|
58
58
|
function applyStyleEnhancements(prompt: string, wizardData: Record<string, unknown>): string {
|
|
59
59
|
const enhancements: string[] = [];
|
|
60
60
|
|
|
61
|
-
const
|
|
62
|
-
if (Array.isArray(
|
|
63
|
-
enhancements.push(`Mood: ${
|
|
61
|
+
const moodSelections = extractSelection(wizardData.selection_mood);
|
|
62
|
+
if (Array.isArray(moodSelections) && moodSelections.length > 0) {
|
|
63
|
+
enhancements.push(`Mood: ${moodSelections.join(", ")}`);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
const artStyle = extractSelection(wizardData.selection_art_style);
|
|
@@ -14,7 +14,7 @@ This domain provides the **mechanism** for scenario-based AI generation. Scenari
|
|
|
14
14
|
- `WizardInputDetector` - Detect input type (single/dual image)
|
|
15
15
|
- `ScenarioCategory` enum - Category definitions
|
|
16
16
|
- `ScenarioData` interface - Type definitions
|
|
17
|
-
- Category groups (TRUE_SOLO_CATEGORIES,
|
|
17
|
+
- Category groups (TRUE_SOLO_CATEGORIES, etc.)
|
|
18
18
|
|
|
19
19
|
### ❌ NOT Provided (App Responsibility)
|
|
20
20
|
- Scenario prompts (text content)
|
|
@@ -32,13 +32,13 @@ import { ScenarioData, ScenarioCategory } from '@umituz/react-native-ai-generati
|
|
|
32
32
|
|
|
33
33
|
export const APP_SCENARIOS: ScenarioData[] = [
|
|
34
34
|
{
|
|
35
|
-
id: '
|
|
36
|
-
category: ScenarioCategory.
|
|
37
|
-
title: '
|
|
38
|
-
prompt: 'A
|
|
39
|
-
inputType: '
|
|
40
|
-
outputType: '
|
|
41
|
-
model: 'fal-ai/
|
|
35
|
+
id: 'fantasy_warrior',
|
|
36
|
+
category: ScenarioCategory.SOLO_FANTASY,
|
|
37
|
+
title: 'Fantasy Warrior',
|
|
38
|
+
prompt: 'A powerful warrior in fantasy armor, epic lighting...',
|
|
39
|
+
inputType: 'single',
|
|
40
|
+
outputType: 'image',
|
|
41
|
+
model: 'fal-ai/flux/dev',
|
|
42
42
|
},
|
|
43
43
|
// ... more scenarios
|
|
44
44
|
];
|
|
@@ -63,10 +63,10 @@ import {
|
|
|
63
63
|
} from '@umituz/react-native-ai-generation-content';
|
|
64
64
|
|
|
65
65
|
// Get all scenarios for a category
|
|
66
|
-
const scenarios = scenarioRegistry.getByCategory(ScenarioCategory.
|
|
66
|
+
const scenarios = scenarioRegistry.getByCategory(ScenarioCategory.SOLO_FANTASY);
|
|
67
67
|
|
|
68
68
|
// Get wizard config for a scenario
|
|
69
|
-
const wizardConfig = getScenarioWizardConfig('
|
|
69
|
+
const wizardConfig = getScenarioWizardConfig('fantasy_warrior');
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
## Category Groups
|
|
@@ -74,12 +74,6 @@ const wizardConfig = getScenarioWizardConfig('romantic_sunset');
|
|
|
74
74
|
### TRUE_SOLO_CATEGORIES
|
|
75
75
|
Pure single-person categories with scenarios requiring one photo only.
|
|
76
76
|
|
|
77
|
-
### COUPLE_CATEGORIES
|
|
78
|
-
Couple categories with scenarios requiring two photos (dual image input).
|
|
79
|
-
|
|
80
|
-
### SINGLE_PERSON_CATEGORIES (Deprecated)
|
|
81
|
-
Legacy mixed categories. Use `TRUE_SOLO_CATEGORIES` for single-photo apps.
|
|
82
|
-
|
|
83
77
|
### ALL_CATEGORIES
|
|
84
78
|
All available categories combined.
|
|
85
79
|
|
|
@@ -119,13 +113,13 @@ src/domains/scenarios/
|
|
|
119
113
|
|
|
120
114
|
## Examples
|
|
121
115
|
|
|
122
|
-
### Video Generation App
|
|
116
|
+
### Video Generation App
|
|
123
117
|
```typescript
|
|
124
|
-
const
|
|
118
|
+
const VIDEO_SCENARIOS: ScenarioData[] = [
|
|
125
119
|
{
|
|
126
|
-
id: '
|
|
127
|
-
category: ScenarioCategory.
|
|
128
|
-
inputType: '
|
|
120
|
+
id: 'cinematic_hero',
|
|
121
|
+
category: ScenarioCategory.SOLO_CINEMATIC,
|
|
122
|
+
inputType: 'single',
|
|
129
123
|
outputType: 'video',
|
|
130
124
|
model: 'fal-ai/kling-video/v1.5/pro/image-to-video',
|
|
131
125
|
// ... data
|
|
@@ -133,7 +127,7 @@ const COUPLE_SCENARIOS: ScenarioData[] = [
|
|
|
133
127
|
];
|
|
134
128
|
```
|
|
135
129
|
|
|
136
|
-
### Image Generation App
|
|
130
|
+
### Image Generation App
|
|
137
131
|
```typescript
|
|
138
132
|
const SOLO_SCENARIOS: ScenarioData[] = [
|
|
139
133
|
{
|
|
@@ -154,7 +148,7 @@ const SOLO_SCENARIOS: ScenarioData[] = [
|
|
|
154
148
|
**Before (Wrong):**
|
|
155
149
|
```typescript
|
|
156
150
|
// Package contained scenario data
|
|
157
|
-
import {
|
|
151
|
+
import { SCENARIOS } from '@umituz/react-native-ai-generation-content';
|
|
158
152
|
```
|
|
159
153
|
|
|
160
154
|
**After (Correct):**
|
|
@@ -288,7 +288,7 @@ Use this checklist when generating code:
|
|
|
288
288
|
|
|
289
289
|
2. **Include Style**
|
|
290
290
|
- Specify art style, mood, atmosphere
|
|
291
|
-
- Example: "in the style of oil painting,
|
|
291
|
+
- Example: "in the style of oil painting, dramatic mood"
|
|
292
292
|
|
|
293
293
|
3. **Add Technical Details**
|
|
294
294
|
- Lighting, camera angle, composition
|
|
@@ -13,8 +13,6 @@ export interface GenerationModels {
|
|
|
13
13
|
readonly imageTextToImage?: string;
|
|
14
14
|
readonly imageToVideo?: string;
|
|
15
15
|
readonly textToVideo?: string;
|
|
16
|
-
readonly aiKiss?: string;
|
|
17
|
-
readonly aiHug?: string;
|
|
18
16
|
readonly faceSwap?: string;
|
|
19
17
|
readonly memeCaption?: string;
|
|
20
18
|
readonly memeImage?: string;
|