@umituz/react-native-ai-generation-content 1.25.18 → 1.25.20

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.25.18",
3
+ "version": "1.25.20",
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,6 +14,8 @@ import { executeVideoFeature } from "../../../../infrastructure/services/video-f
14
14
  import { createCreationsRepository } from "../../../../domains/creations/infrastructure/adapters";
15
15
  import type { VideoFeatureType } from "../../../../domain/interfaces";
16
16
  import type { AlertMessages } from "../../../../presentation/hooks/generation/orchestrator.types";
17
+ import { enhanceCouplePrompt } from "../../../../features/couple-future/infrastructure/couplePromptEnhancer";
18
+ import type { CoupleFeatureSelection } from "../../../../features/couple-future/domain/types";
17
19
 
18
20
  declare const __DEV__: boolean;
19
21
 
@@ -192,11 +194,37 @@ async function buildGenerationInput(
192
194
  return null;
193
195
  }
194
196
 
195
- const prompt = scenario.aiPrompt || `Generate ${scenario.id} scene`;
197
+ let prompt = scenario.aiPrompt || `Generate ${scenario.id} scene`;
196
198
  const outputType = scenario.outputType || "video"; // Default to video for backward compatibility
197
199
 
198
- // Build input based on output type
200
+ // For image generation, enhance prompt with style selections
199
201
  if (outputType === "image") {
202
+ // Extract style selections from wizard data
203
+ const selections: CoupleFeatureSelection = {};
204
+
205
+ // Romantic mood (multi-select array)
206
+ const romanticMoods = wizardData.selection_romantic_mood as string[] | undefined;
207
+ if (romanticMoods && romanticMoods.length > 0) {
208
+ selections.romanticMoods = romanticMoods;
209
+ }
210
+
211
+ // Art style (single select)
212
+ const artStyle = wizardData.selection_art_style as string | undefined;
213
+ if (artStyle && artStyle !== "original") {
214
+ selections.artStyle = artStyle;
215
+ }
216
+
217
+ // Artist style (single select)
218
+ const artist = wizardData.selection_artist_style as string | undefined;
219
+ if (artist && artist !== "original") {
220
+ selections.artist = artist;
221
+ }
222
+
223
+ // Enhance prompt with selected styles (only if not "original")
224
+ if (Object.keys(selections).length > 0) {
225
+ prompt = enhanceCouplePrompt(prompt, selections);
226
+ }
227
+
200
228
  return {
201
229
  partnerABase64: photo1Base64,
202
230
  partnerBBase64: photo2Base64,
@@ -280,21 +308,26 @@ export const useWizardGeneration = (
280
308
  const input = lastInputRef.current;
281
309
  if (!input) return;
282
310
 
283
- const videoResult = result as { videoUrl?: string };
284
- const imageResult = result as { imageUrl?: string };
285
-
286
311
  // Both input types have prompt field
287
312
  const prompt = 'prompt' in input ? input.prompt : '';
288
313
 
289
- const creation = {
290
- videoUrl: videoResult.videoUrl,
291
- imageUrl: imageResult.imageUrl,
314
+ // Build creation object with only the relevant URL field
315
+ const creation: any = {
292
316
  scenarioId: scenario.id,
293
317
  scenarioTitle: scenario.title || scenario.id,
294
318
  prompt,
295
319
  createdAt: Date.now(),
296
320
  };
297
321
 
322
+ // Add only the relevant URL based on output type
323
+ if (outputType === "image") {
324
+ const imageResult = result as { imageUrl?: string };
325
+ creation.imageUrl = imageResult.imageUrl;
326
+ } else {
327
+ const videoResult = result as { videoUrl?: string };
328
+ creation.videoUrl = videoResult.videoUrl;
329
+ }
330
+
298
331
  await repository.create(uid, creation);
299
332
 
300
333
  if (typeof __DEV__ !== "undefined" && __DEV__) {