@umituz/react-native-ai-generation-content 1.31.0 → 1.32.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.
|
|
3
|
+
"version": "1.32.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",
|
package/src/domains/generation/wizard/infrastructure/strategies/video-generation.strategy.ts
CHANGED
|
@@ -9,7 +9,9 @@ import { executeVideoFeature } from "../../../../../infrastructure/services/vide
|
|
|
9
9
|
import { createCreationsRepository } from "../../../../creations/infrastructure/adapters";
|
|
10
10
|
import type { WizardScenarioData } from "../../presentation/hooks/useWizardGeneration";
|
|
11
11
|
import type { WizardStrategy } from "./wizard-strategy.types";
|
|
12
|
-
import { PHOTO_KEY_PREFIX, VIDEO_FEATURE_PATTERNS } from "./wizard-strategy.constants";
|
|
12
|
+
import { PHOTO_KEY_PREFIX, VIDEO_FEATURE_PATTERNS, VIDEO_PROCESSING_PROMPTS } from "./wizard-strategy.constants";
|
|
13
|
+
|
|
14
|
+
declare const __DEV__: boolean;
|
|
13
15
|
import { extractPrompt, extractDuration, extractAspectRatio, extractResolution } from "../utils";
|
|
14
16
|
|
|
15
17
|
// ============================================================================
|
|
@@ -92,10 +94,19 @@ export async function buildVideoInput(
|
|
|
92
94
|
const photos = await extractPhotosFromWizardData(wizardData);
|
|
93
95
|
|
|
94
96
|
// Extract prompt using type-safe extractor with fallback
|
|
95
|
-
|
|
97
|
+
let prompt = extractPrompt(wizardData, scenario.aiPrompt);
|
|
96
98
|
|
|
99
|
+
// For video processing features, use default prompt if none provided
|
|
97
100
|
if (!prompt) {
|
|
98
|
-
|
|
101
|
+
const defaultPrompt = VIDEO_PROCESSING_PROMPTS[scenario.id];
|
|
102
|
+
if (defaultPrompt) {
|
|
103
|
+
prompt = defaultPrompt;
|
|
104
|
+
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
105
|
+
console.log("[VideoStrategy] Using default prompt for", scenario.id);
|
|
106
|
+
}
|
|
107
|
+
} else {
|
|
108
|
+
throw new Error("Prompt is required for video generation");
|
|
109
|
+
}
|
|
99
110
|
}
|
|
100
111
|
|
|
101
112
|
// Extract video generation parameters
|
package/src/domains/generation/wizard/infrastructure/strategies/wizard-strategy.constants.ts
CHANGED
|
@@ -44,3 +44,10 @@ export const IMAGE_PROCESSING_PROMPTS: Record<string, string> = {
|
|
|
44
44
|
"replace-background": "Replace the background with a new seamless environment",
|
|
45
45
|
"hd-touch-up": "Apply HD touch-up to enhance skin and facial features naturally",
|
|
46
46
|
};
|
|
47
|
+
|
|
48
|
+
/** Default prompts for video generation features (no user input needed) */
|
|
49
|
+
export const VIDEO_PROCESSING_PROMPTS: Record<string, string> = {
|
|
50
|
+
"ai-kiss": "Create a romantic video where these two people share a gentle, loving kiss",
|
|
51
|
+
"ai-hug": "Create a heartwarming video where these two people share a warm, affectionate hug",
|
|
52
|
+
"image-to-video": "Animate this image with natural, smooth motion while preserving the original style",
|
|
53
|
+
};
|
|
@@ -33,8 +33,10 @@ export const FeatureType = WizardInputType;
|
|
|
33
33
|
*/
|
|
34
34
|
const INPUT_PATTERNS: Record<WizardInputType, RegExp[]> = {
|
|
35
35
|
[WizardInputType.DUAL_IMAGE]: [
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
/ai-kiss/i,
|
|
37
|
+
/ai-hug/i,
|
|
38
|
+
/couple/i,
|
|
39
|
+
/dual/i,
|
|
38
40
|
],
|
|
39
41
|
|
|
40
42
|
[WizardInputType.SINGLE_IMAGE]: [
|