@umituz/react-native-ai-generation-content 1.27.30 → 1.28.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.
|
|
3
|
+
"version": "1.28.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",
|
package/src/domains/generation/wizard/infrastructure/strategies/video-generation.strategy.ts
CHANGED
|
@@ -94,8 +94,8 @@ export async function buildVideoInput(
|
|
|
94
94
|
throw new Error("Prompt is required for video generation");
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
// Extract duration using type-safe extractor (
|
|
98
|
-
const duration = extractDuration(wizardData
|
|
97
|
+
// Extract duration using type-safe extractor (required from wizard step)
|
|
98
|
+
const duration = extractDuration(wizardData);
|
|
99
99
|
|
|
100
100
|
return {
|
|
101
101
|
sourceImageBase64: photos[0],
|
|
@@ -132,6 +132,9 @@ export function createVideoStrategy(options: CreateVideoStrategyOptions): Wizard
|
|
|
132
132
|
sourceImageBase64: videoInput.sourceImageBase64 || "",
|
|
133
133
|
targetImageBase64: videoInput.targetImageBase64 || videoInput.sourceImageBase64 || "",
|
|
134
134
|
prompt: videoInput.prompt,
|
|
135
|
+
options: {
|
|
136
|
+
duration: videoInput.duration,
|
|
137
|
+
},
|
|
135
138
|
},
|
|
136
139
|
{ onProgress },
|
|
137
140
|
);
|
|
@@ -180,13 +180,11 @@ export function extractPrompt(
|
|
|
180
180
|
* Handles both direct number and object with value field
|
|
181
181
|
*
|
|
182
182
|
* @param wizardData - The wizard data object
|
|
183
|
-
* @
|
|
184
|
-
* @returns The extracted duration in seconds
|
|
183
|
+
* @returns The extracted duration in seconds or undefined
|
|
185
184
|
*/
|
|
186
185
|
export function extractDuration(
|
|
187
186
|
wizardData: Record<string, unknown>,
|
|
188
|
-
|
|
189
|
-
): number {
|
|
187
|
+
): number | undefined {
|
|
190
188
|
const durationData = wizardData.duration;
|
|
191
189
|
|
|
192
190
|
const extracted = extractNumber(durationData);
|
|
@@ -194,5 +192,5 @@ export function extractDuration(
|
|
|
194
192
|
return extracted;
|
|
195
193
|
}
|
|
196
194
|
|
|
197
|
-
return
|
|
195
|
+
return undefined;
|
|
198
196
|
}
|