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

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.28",
3
+ "version": "1.27.30",
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",
@@ -77,7 +77,7 @@ export const buildStepsFromScenario = (
77
77
  type: StepType.FEATURE_SELECTION,
78
78
  config: {
79
79
  id: "DURATION_SELECTION",
80
- durations: config.durationSelection.durations ?? [5, 10, 15],
80
+ durations: config.durationSelection.durations ?? [4, 8, 12],
81
81
  required: config.durationSelection.required ?? false,
82
82
  },
83
83
  required: config.durationSelection.required ?? false,
@@ -32,11 +32,12 @@ export const IMAGE_TO_VIDEO_WIZARD_CONFIG: WizardFeatureConfig = {
32
32
  titleKey: "generation.duration.title",
33
33
  selectionType: "duration",
34
34
  options: [
35
- { id: "5s", label: "5 seconds", value: 5 },
36
- { id: "10s", label: "10 seconds", value: 10 },
35
+ { id: "4s", label: "4 seconds", value: 4 },
36
+ { id: "8s", label: "8 seconds", value: 8 },
37
+ { id: "12s", label: "12 seconds", value: 12 },
37
38
  ],
38
39
  required: true,
39
- defaultValue: "5s",
40
+ defaultValue: "4s",
40
41
  },
41
42
  ],
42
43
  };
@@ -20,17 +20,42 @@ export const TEXT_TO_VIDEO_WIZARD_CONFIG: WizardFeatureConfig = {
20
20
  maxLength: 500,
21
21
  multiline: true,
22
22
  },
23
+ {
24
+ id: "resolution",
25
+ type: "selection",
26
+ titleKey: "generation.resolution.title",
27
+ selectionType: "resolution",
28
+ options: [
29
+ { id: "720p", label: "720p", value: "720p" },
30
+ { id: "default", label: "Default", value: "default" },
31
+ ],
32
+ required: true,
33
+ defaultValue: "720p",
34
+ },
35
+ {
36
+ id: "aspect_ratio",
37
+ type: "selection",
38
+ titleKey: "generation.aspectRatio.title",
39
+ selectionType: "aspect_ratio",
40
+ options: [
41
+ { id: "16:9", label: "16:9", value: "16:9" },
42
+ { id: "9:16", label: "9:16", value: "9:16" },
43
+ ],
44
+ required: true,
45
+ defaultValue: "16:9",
46
+ },
23
47
  {
24
48
  id: "duration",
25
49
  type: "selection",
26
50
  titleKey: "generation.duration.title",
27
51
  selectionType: "duration",
28
52
  options: [
29
- { id: "5s", label: "5 seconds", value: 5 },
30
- { id: "10s", label: "10 seconds", value: 10 },
53
+ { id: "4s", label: "4 seconds", value: 4 },
54
+ { id: "8s", label: "8 seconds", value: 8 },
55
+ { id: "12s", label: "12 seconds", value: 12 },
31
56
  ],
32
57
  required: true,
33
- defaultValue: "5s",
58
+ defaultValue: "4s",
34
59
  },
35
60
  ],
36
61
  };
@@ -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: 5 seconds)
98
- const duration = extractDuration(wizardData, 5);
97
+ // Extract duration using type-safe extractor (default: 4 seconds for Sora 2)
98
+ const duration = extractDuration(wizardData, 4);
99
99
 
100
100
  return {
101
101
  sourceImageBase64: photos[0],
@@ -185,7 +185,7 @@ export function extractPrompt(
185
185
  */
186
186
  export function extractDuration(
187
187
  wizardData: Record<string, unknown>,
188
- defaultValue = 5,
188
+ defaultValue = 4,
189
189
  ): number {
190
190
  const durationData = wizardData.duration;
191
191
 
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Duration Constants
3
- * Default duration options for image-to-video
3
+ * Default duration options for Sora 2 video generation
4
+ * Sora 2 supports: 4, 8, 12 seconds ($0.10/second)
4
5
  */
5
6
 
6
7
  import type { VideoDuration, DurationOption } from "../types";
@@ -8,6 +9,7 @@ import type { VideoDuration, DurationOption } from "../types";
8
9
  export const DEFAULT_DURATION_OPTIONS: DurationOption[] = [
9
10
  { value: 4, label: "4s" },
10
11
  { value: 8, label: "8s" },
12
+ { value: 12, label: "12s" },
11
13
  ];
12
14
 
13
15
  export const DEFAULT_VIDEO_DURATION: VideoDuration = 4;