@umituz/react-native-ai-generation-content 1.84.6 → 1.84.7

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.84.6",
3
+ "version": "1.84.7",
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",
@@ -23,6 +23,24 @@ export async function buildVideoInput(
23
23
  console.log("[VideoStrategy] Building input", { scenarioId: scenario.id });
24
24
  }
25
25
 
26
+ // If a pre-generated image URL exists (e.g., two-step solo video),
27
+ // use it directly instead of extracting photos from wizard data
28
+ if (scenario.preGeneratedImageUrl) {
29
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
30
+ console.log("[VideoStrategy] Using pre-generated image URL", {
31
+ url: scenario.preGeneratedImageUrl.slice(0, 80),
32
+ });
33
+ }
34
+ const finalPrompt = extractPrompt(wizardData, scenario.aiPrompt) || scenario.aiPrompt || "";
35
+ return {
36
+ sourceImageBase64: scenario.preGeneratedImageUrl,
37
+ prompt: finalPrompt,
38
+ duration: extractDuration(wizardData),
39
+ aspectRatio: extractAspectRatio(wizardData),
40
+ resolution: extractResolution(wizardData),
41
+ };
42
+ }
43
+
26
44
  const photos = await extractPhotosAsBase64(wizardData, true);
27
45
 
28
46
  const validation = validatePhotoCount(photos.length, scenario.inputType);
@@ -22,6 +22,8 @@ export interface WizardScenarioData {
22
22
  readonly description?: string;
23
23
  /** Video feature type - set by main app to control generation mode */
24
24
  readonly featureType?: "text-to-video" | "image-to-video";
25
+ /** Pre-generated image URL — when set, video generation uses this as source image instead of extracting from wizard data */
26
+ readonly preGeneratedImageUrl?: string;
25
27
  [key: string]: unknown;
26
28
  }
27
29