@umituz/react-native-ai-generation-content 1.35.8 → 1.35.9
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 +1 -1
- package/src/domains/creations/presentation/components/CreationCard.tsx +1 -1
- package/src/domains/generation/wizard/infrastructure/strategies/image-generation.strategy.ts +2 -1
- package/src/domains/generation/wizard/infrastructure/strategies/video-generation.strategy.ts +2 -1
- package/src/domains/generation/wizard/infrastructure/strategies/wizard-strategy.factory.ts +4 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.35.
|
|
3
|
+
"version": "1.35.9",
|
|
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",
|
|
@@ -119,7 +119,7 @@ export function CreationCard({
|
|
|
119
119
|
<View style={styles.previewContainer} pointerEvents="box-none">
|
|
120
120
|
<CreationPreview
|
|
121
121
|
uri={previewUrl}
|
|
122
|
-
status={creation.status
|
|
122
|
+
status={creation.status}
|
|
123
123
|
type={creation.type as CreationTypeId}
|
|
124
124
|
/>
|
|
125
125
|
{showBadges && creation.status && (
|
package/src/domains/generation/wizard/infrastructure/strategies/image-generation.strategy.ts
CHANGED
|
@@ -264,12 +264,13 @@ export function createImageStrategy(options: CreateImageStrategyOptions): Wizard
|
|
|
264
264
|
uri: imageResult.imageUrl,
|
|
265
265
|
type: scenario.id,
|
|
266
266
|
prompt: input.prompt,
|
|
267
|
+
status: "completed" as const,
|
|
267
268
|
createdAt: new Date(),
|
|
268
269
|
isShared: false,
|
|
269
270
|
isFavorite: false,
|
|
270
271
|
metadata: {
|
|
271
272
|
scenarioId: scenario.id,
|
|
272
|
-
scenarioTitle: scenario.title
|
|
273
|
+
scenarioTitle: scenario.title,
|
|
273
274
|
},
|
|
274
275
|
output: { imageUrl: imageResult.imageUrl },
|
|
275
276
|
};
|
package/src/domains/generation/wizard/infrastructure/strategies/video-generation.strategy.ts
CHANGED
|
@@ -297,12 +297,13 @@ export function createVideoStrategy(options: CreateVideoStrategyOptions): Wizard
|
|
|
297
297
|
uri: videoResult.videoUrl,
|
|
298
298
|
type: scenario.id,
|
|
299
299
|
prompt: input.prompt,
|
|
300
|
+
status: "completed" as const,
|
|
300
301
|
createdAt: new Date(),
|
|
301
302
|
isShared: false,
|
|
302
303
|
isFavorite: false,
|
|
303
304
|
metadata: {
|
|
304
305
|
scenarioId: scenario.id,
|
|
305
|
-
scenarioTitle: scenario.title
|
|
306
|
+
scenarioTitle: scenario.title,
|
|
306
307
|
},
|
|
307
308
|
output: { videoUrl: videoResult.videoUrl },
|
|
308
309
|
};
|
|
@@ -27,12 +27,12 @@ export interface CreateWizardStrategyOptions {
|
|
|
27
27
|
|
|
28
28
|
export function createWizardStrategy(options: CreateWizardStrategyOptions): WizardStrategy {
|
|
29
29
|
const { scenario, collectionName } = options;
|
|
30
|
-
const outputType = scenario.outputType || "video";
|
|
31
30
|
|
|
32
|
-
if (outputType === "image") {
|
|
31
|
+
if (scenario.outputType === "image") {
|
|
33
32
|
return createImageStrategy({ scenario, collectionName });
|
|
34
33
|
}
|
|
35
34
|
|
|
35
|
+
// Default to video strategy for video outputType or undefined
|
|
36
36
|
return createVideoStrategy({ scenario, collectionName });
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -44,11 +44,10 @@ export async function buildWizardInput(
|
|
|
44
44
|
wizardData: Record<string, unknown>,
|
|
45
45
|
scenario: WizardScenarioData,
|
|
46
46
|
): Promise<unknown> {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (outputType === "image") {
|
|
47
|
+
if (scenario.outputType === "image") {
|
|
50
48
|
return buildImageInput(wizardData, scenario);
|
|
51
49
|
}
|
|
52
50
|
|
|
51
|
+
// Default to video input for video outputType or undefined
|
|
53
52
|
return buildVideoInput(wizardData, scenario);
|
|
54
53
|
}
|