@umituz/react-native-ai-generation-content 1.27.30 → 1.28.0

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.27.30",
3
+ "version": "1.28.0",
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",
@@ -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 (default: 4 seconds for Sora 2)
98
- const duration = extractDuration(wizardData, 4);
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],
@@ -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
- * @param defaultValue - Default duration if not found
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
- defaultValue = 4,
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 defaultValue;
195
+ return undefined;
198
196
  }