@umituz/web-ai 0.0.0-stage → 1.0.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/LICENSE +21 -0
- package/README.md +98 -2
- package/dist/ABTesting-DDqNhHtP.d.ts +184 -0
- package/dist/ABTesting-DWBtKTMQ.d.cts +184 -0
- package/dist/ContentGeneration-B6iK2B33.d.cts +93 -0
- package/dist/ContentGeneration-B6iK2B33.d.ts +93 -0
- package/dist/ProviderConfig-a55tLhWT.d.cts +99 -0
- package/dist/ProviderConfig-a55tLhWT.d.ts +99 -0
- package/dist/cache-manager-Df9LLYGA.d.cts +31 -0
- package/dist/cache-manager-Df9LLYGA.d.ts +31 -0
- package/dist/chat/index.cjs +534 -0
- package/dist/chat/index.cjs.map +1 -0
- package/dist/chat/index.d.cts +25 -0
- package/dist/chat/index.d.ts +25 -0
- package/dist/chat/index.js +527 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chat.service-DBKq9I2c.d.cts +124 -0
- package/dist/chat.service-RQn8UTXD.d.ts +124 -0
- package/dist/content/index.cjs +3769 -0
- package/dist/content/index.cjs.map +1 -0
- package/dist/content/index.d.cts +225 -0
- package/dist/content/index.d.ts +225 -0
- package/dist/content/index.js +3738 -0
- package/dist/content/index.js.map +1 -0
- package/dist/core/index.cjs +1040 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +232 -0
- package/dist/core/index.d.ts +232 -0
- package/dist/core/index.js +969 -0
- package/dist/core/index.js.map +1 -0
- package/dist/create-ai-BhNaz86i.d.ts +268 -0
- package/dist/create-ai-DGZFBOA1.d.cts +268 -0
- package/dist/hooks/index.cjs +5056 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.cts +210 -0
- package/dist/hooks/index.d.ts +210 -0
- package/dist/hooks/index.js +5045 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index-DjX9ZKuM.d.cts +14 -0
- package/dist/index-DxLvE588.d.ts +14 -0
- package/dist/index-fXjxTR5W.d.cts +66 -0
- package/dist/index-fXjxTR5W.d.ts +66 -0
- package/dist/index.cjs +3158 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +3048 -0
- package/dist/index.js.map +1 -0
- package/dist/provider.factory-COsnprLH.d.cts +110 -0
- package/dist/provider.factory-CpWFyjbw.d.ts +110 -0
- package/dist/providers/index.cjs +2410 -0
- package/dist/providers/index.cjs.map +1 -0
- package/dist/providers/index.d.cts +333 -0
- package/dist/providers/index.d.ts +333 -0
- package/dist/providers/index.js +2376 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/request-deduplicator.util-NDo0_n1y.d.cts +50 -0
- package/dist/request-deduplicator.util-NDo0_n1y.d.ts +50 -0
- package/dist/wizard/index.cjs +230 -0
- package/dist/wizard/index.cjs.map +1 -0
- package/dist/wizard/index.d.cts +86 -0
- package/dist/wizard/index.d.ts +86 -0
- package/dist/wizard/index.js +223 -0
- package/dist/wizard/index.js.map +1 -0
- package/package.json +111 -4
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/wizard/content.wizard.ts
|
|
4
|
+
var CONTENT_WIZARD_STEPS = [
|
|
5
|
+
{
|
|
6
|
+
id: "select-type",
|
|
7
|
+
label: "Select Type",
|
|
8
|
+
icon: "Layers",
|
|
9
|
+
description: "Choose the type of content you want to generate",
|
|
10
|
+
validate: (data) => Boolean(data.contentType)
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "input-topic",
|
|
14
|
+
label: "Topic",
|
|
15
|
+
icon: "Lightbulb",
|
|
16
|
+
description: "Enter your topic or idea",
|
|
17
|
+
validate: (data) => {
|
|
18
|
+
const topic = data.topic;
|
|
19
|
+
return typeof topic === "string" && topic.length > 0;
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "configure",
|
|
24
|
+
label: "Configure",
|
|
25
|
+
icon: "Settings",
|
|
26
|
+
description: "Set tone, audience, and platform",
|
|
27
|
+
validate: (data) => {
|
|
28
|
+
const d = data;
|
|
29
|
+
return Boolean(d.tone && d.targetAudience);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "advanced",
|
|
34
|
+
label: "Advanced",
|
|
35
|
+
icon: "Sliders",
|
|
36
|
+
description: "Additional options and optimizations",
|
|
37
|
+
optional: true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "preview",
|
|
41
|
+
label: "Preview",
|
|
42
|
+
icon: "Eye",
|
|
43
|
+
description: "Review your settings before generation"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "generating",
|
|
47
|
+
label: "Generating",
|
|
48
|
+
icon: "Sparkles",
|
|
49
|
+
description: "AI is generating your content"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "results",
|
|
53
|
+
label: "Results",
|
|
54
|
+
icon: "CheckCircle",
|
|
55
|
+
description: "Your generated content is ready"
|
|
56
|
+
}
|
|
57
|
+
];
|
|
58
|
+
function buildContentRequest(data) {
|
|
59
|
+
switch (data.contentType) {
|
|
60
|
+
case "blog":
|
|
61
|
+
return {
|
|
62
|
+
topic: data.topic ?? "",
|
|
63
|
+
blogType: "tutorial",
|
|
64
|
+
targetKeywords: data.keywords ?? [],
|
|
65
|
+
tone: data.tone ?? "professional",
|
|
66
|
+
wordCount: data.wordCount ?? 1e3,
|
|
67
|
+
targetAudience: data.targetAudience ?? "",
|
|
68
|
+
seoOptimization: data.seoOptimization ?? false,
|
|
69
|
+
includeImages: data.includeImages ?? false,
|
|
70
|
+
includeSchema: false
|
|
71
|
+
};
|
|
72
|
+
case "social":
|
|
73
|
+
return {
|
|
74
|
+
topic: data.topic ?? "",
|
|
75
|
+
platform: data.platform ?? "twitter",
|
|
76
|
+
tone: data.tone ?? "casual",
|
|
77
|
+
hashtags: true,
|
|
78
|
+
targetAudience: data.targetAudience,
|
|
79
|
+
includeCallToAction: data.includeCallToAction
|
|
80
|
+
};
|
|
81
|
+
case "script":
|
|
82
|
+
return {
|
|
83
|
+
topic: data.topic ?? "",
|
|
84
|
+
tone: data.tone ?? "professional",
|
|
85
|
+
duration: data.duration ?? 60,
|
|
86
|
+
targetAudience: data.targetAudience ?? "",
|
|
87
|
+
includeVisuals: true,
|
|
88
|
+
includeCallToAction: data.includeCallToAction ?? false
|
|
89
|
+
};
|
|
90
|
+
default:
|
|
91
|
+
throw new Error(`Unsupported content type: ${data.contentType}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// src/wizard/image.wizard.ts
|
|
96
|
+
var IMAGE_WIZARD_STEPS = [
|
|
97
|
+
{
|
|
98
|
+
id: "input-prompt",
|
|
99
|
+
label: "Describe Image",
|
|
100
|
+
icon: "Image",
|
|
101
|
+
description: "Describe the image you want to create",
|
|
102
|
+
validate: (data) => {
|
|
103
|
+
const prompt = data.prompt;
|
|
104
|
+
return typeof prompt === "string" && prompt.length > 0;
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "select-style",
|
|
109
|
+
label: "Style",
|
|
110
|
+
icon: "Palette",
|
|
111
|
+
description: "Choose the artistic style",
|
|
112
|
+
validate: (data) => Boolean(data.style)
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "configure",
|
|
116
|
+
label: "Configure",
|
|
117
|
+
icon: "Settings",
|
|
118
|
+
description: "Set format, quality, and quantity",
|
|
119
|
+
validate: (data) => {
|
|
120
|
+
const d = data;
|
|
121
|
+
return Boolean(d.format && d.quality);
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: "advanced",
|
|
126
|
+
label: "Advanced",
|
|
127
|
+
icon: "Sliders",
|
|
128
|
+
description: "Color palette and platform optimization",
|
|
129
|
+
optional: true
|
|
130
|
+
},
|
|
131
|
+
{ id: "preview", label: "Preview", icon: "Eye", description: "Review your settings" },
|
|
132
|
+
{ id: "generating", label: "Generating", icon: "Sparkles", description: "AI is creating your image" },
|
|
133
|
+
{ id: "results", label: "Results", icon: "Image", description: "Your generated image is ready" }
|
|
134
|
+
];
|
|
135
|
+
function buildImageRequest(data) {
|
|
136
|
+
return {
|
|
137
|
+
type: "image",
|
|
138
|
+
prompt: data.prompt ?? "",
|
|
139
|
+
style: data.style,
|
|
140
|
+
format: data.format,
|
|
141
|
+
quality: data.quality,
|
|
142
|
+
quantity: data.quantity ?? 1
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// src/wizard/video.wizard.ts
|
|
147
|
+
var validateSource = (data) => {
|
|
148
|
+
const d = data;
|
|
149
|
+
if (d.generationType === "text-to-video") {
|
|
150
|
+
return typeof d.prompt === "string" && d.prompt.length > 0;
|
|
151
|
+
}
|
|
152
|
+
if (d.generationType === "image-to-video") {
|
|
153
|
+
return typeof d.imageUrl === "string" && d.imageUrl.length > 0;
|
|
154
|
+
}
|
|
155
|
+
if (d.generationType === "video-to-video") {
|
|
156
|
+
return typeof d.sourceVideoUrl === "string" && d.sourceVideoUrl.length > 0 && typeof d.prompt === "string" && d.prompt.length > 0;
|
|
157
|
+
}
|
|
158
|
+
return false;
|
|
159
|
+
};
|
|
160
|
+
var VIDEO_WIZARD_STEPS = [
|
|
161
|
+
{
|
|
162
|
+
id: "select-type",
|
|
163
|
+
label: "Select Type",
|
|
164
|
+
icon: "Video",
|
|
165
|
+
description: "Choose video generation type",
|
|
166
|
+
validate: (data) => Boolean(data.generationType)
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: "input-source",
|
|
170
|
+
label: "Source",
|
|
171
|
+
icon: "FileInput",
|
|
172
|
+
description: "Provide your source (prompt, image, or video)",
|
|
173
|
+
validate: validateSource
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
id: "configure",
|
|
177
|
+
label: "Configure",
|
|
178
|
+
icon: "Settings",
|
|
179
|
+
description: "Set duration, aspect ratio, and style",
|
|
180
|
+
validate: (data) => {
|
|
181
|
+
const d = data;
|
|
182
|
+
return Boolean(d.duration && d.aspectRatio);
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{ id: "advanced", label: "Advanced", icon: "Sliders", description: "Additional video options", optional: true },
|
|
186
|
+
{ id: "preview", label: "Preview", icon: "Eye", description: "Review your settings" },
|
|
187
|
+
{ id: "generating", label: "Generating", icon: "Sparkles", description: "AI is creating your video" },
|
|
188
|
+
{ id: "results", label: "Results", icon: "Video", description: "Your generated video is ready" }
|
|
189
|
+
];
|
|
190
|
+
function buildVideoRequest(data) {
|
|
191
|
+
switch (data.generationType) {
|
|
192
|
+
case "text-to-video":
|
|
193
|
+
return {
|
|
194
|
+
type: "video",
|
|
195
|
+
prompt: data.prompt ?? "",
|
|
196
|
+
duration: data.duration ?? 5,
|
|
197
|
+
aspectRatio: data.aspectRatio ?? "16:9",
|
|
198
|
+
style: data.style,
|
|
199
|
+
quality: data.quality
|
|
200
|
+
};
|
|
201
|
+
case "image-to-video":
|
|
202
|
+
return {
|
|
203
|
+
type: "video",
|
|
204
|
+
imageUrl: data.imageUrl ?? "",
|
|
205
|
+
prompt: data.prompt,
|
|
206
|
+
duration: data.duration ?? 5,
|
|
207
|
+
motion: data.motion ?? "medium",
|
|
208
|
+
camera: data.camera ?? "static"
|
|
209
|
+
};
|
|
210
|
+
case "video-to-video":
|
|
211
|
+
return {
|
|
212
|
+
type: "video",
|
|
213
|
+
sourceVideoUrl: data.sourceVideoUrl ?? "",
|
|
214
|
+
prompt: data.prompt ?? "",
|
|
215
|
+
styleTransfer: data.styleTransfer,
|
|
216
|
+
enhanceQuality: data.enhanceQuality
|
|
217
|
+
};
|
|
218
|
+
default:
|
|
219
|
+
throw new Error(`Unsupported generation type: ${data.generationType}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
exports.CONTENT_WIZARD_STEPS = CONTENT_WIZARD_STEPS;
|
|
224
|
+
exports.IMAGE_WIZARD_STEPS = IMAGE_WIZARD_STEPS;
|
|
225
|
+
exports.VIDEO_WIZARD_STEPS = VIDEO_WIZARD_STEPS;
|
|
226
|
+
exports.buildContentRequest = buildContentRequest;
|
|
227
|
+
exports.buildImageRequest = buildImageRequest;
|
|
228
|
+
exports.buildVideoRequest = buildVideoRequest;
|
|
229
|
+
//# sourceMappingURL=index.cjs.map
|
|
230
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/wizard/content.wizard.ts","../../src/wizard/image.wizard.ts","../../src/wizard/video.wizard.ts"],"names":[],"mappings":";;;AAqCO,IAAM,oBAAA,GAAqE;AAAA,EAChF;AAAA,IACE,EAAA,EAAI,aAAA;AAAA,IACJ,KAAA,EAAO,aAAA;AAAA,IACP,IAAA,EAAM,QAAA;AAAA,IACN,WAAA,EAAa,iDAAA;AAAA,IACb,QAAA,EAAU,CAAC,IAAA,KAAS,OAAA,CAAS,KAA2B,WAAW;AAAA,GACrE;AAAA,EACA;AAAA,IACE,EAAA,EAAI,aAAA;AAAA,IACJ,KAAA,EAAO,OAAA;AAAA,IACP,IAAA,EAAM,WAAA;AAAA,IACN,WAAA,EAAa,0BAAA;AAAA,IACb,QAAA,EAAU,CAAC,IAAA,KAAS;AAClB,MAAA,MAAM,QAAS,IAAA,CAA2B,KAAA;AAC1C,MAAA,OAAO,OAAO,KAAA,KAAU,QAAA,IAAY,KAAA,CAAM,MAAA,GAAS,CAAA;AAAA,IACrD;AAAA,GACF;AAAA,EACA;AAAA,IACE,EAAA,EAAI,WAAA;AAAA,IACJ,KAAA,EAAO,WAAA;AAAA,IACP,IAAA,EAAM,UAAA;AAAA,IACN,WAAA,EAAa,kCAAA;AAAA,IACb,QAAA,EAAU,CAAC,IAAA,KAAS;AAClB,MAAA,MAAM,CAAA,GAAI,IAAA;AACV,MAAA,OAAO,OAAA,CAAQ,C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AAA;AAAA,QACvB,eAAe,IAAA,CAAK,aAAA;AAAA,QACpB,gBAAgB,IAAA,CAAK;AAAA,OACvB;AAAA,IACF;AACE,MAAA,MAAM,IAAI,KAAA,CAAM,CAAA,6BAAA,EAAgC,IAAA,CAAK,cAAc,CAAA,CAAE,CAAA;AAAA;AAE3E","file":"index.cjs","sourcesContent":["\nimport type { WizardStep } from './base.wizard';\nimport type { BlogGenerationRequest, SocialContentRequest, VideoScriptRequest } from '../content/domain/entities/ContentGeneration';\n\nexport type ContentType = 'blog' | 'social' | 'script' | 'news' | 'ebook' | 'podcast';\n\nexport type ContentWizardStep =\n | 'select-type'\n | 'input-topic'\n | 'configure'\n | 'advanced'\n | 'preview'\n | 'generating'\n | 'results';\n\nexport interface ContentWizardData {\n contentType?: ContentType;\n\n topic?: string;\n description?: string;\n\n tone?: 'professional' | 'casual' | 'enthusiastic' | 'humorous' | 'dramatic' | 'educational';\n platform?: 'twitter' | 'linkedin' | 'instagram' | 'threads' | 'tiktok' | 'facebook';\n targetAudience?: string;\n wordCount?: number;\n duration?: number;\n\n keywords?: string[];\n includeImages?: boolean;\n includeCallToAction?: boolean;\n seoOptimization?: boolean;\n language?: string;\n\n generatedContent?: string;\n generatedId?: string;\n}\n\nexport const CONTENT_WIZARD_STEPS: ReadonlyArray<WizardStep<ContentWizardStep>> = [\n {\n id: 'select-type',\n label: 'Select Type',\n icon: 'Layers',\n description: 'Choose the type of content you want to generate',\n validate: (data) => Boolean((data as ContentWizardData).contentType),\n },\n {\n id: 'input-topic',\n label: 'Topic',\n icon: 'Lightbulb',\n description: 'Enter your topic or idea',\n validate: (data) => {\n const topic = (data as ContentWizardData).topic;\n return typeof topic === 'string' && topic.length > 0;\n },\n },\n {\n id: 'configure',\n label: 'Configure',\n icon: 'Settings',\n description: 'Set tone, audience, and platform',\n validate: (data) => {\n const d = data as ContentWizardData;\n return Boolean(d.tone && d.targetAudience);\n },\n },\n {\n id: 'advanced',\n label: 'Advanced',\n icon: 'Sliders',\n description: 'Additional options and optimizations',\n optional: true,\n },\n {\n id: 'preview',\n label: 'Preview',\n icon: 'Eye',\n description: 'Review your settings before generation',\n },\n {\n id: 'generating',\n label: 'Generating',\n icon: 'Sparkles',\n description: 'AI is generating your content',\n },\n {\n id: 'results',\n label: 'Results',\n icon: 'CheckCircle',\n description: 'Your generated content is ready',\n },\n];\n\nexport function buildContentRequest(\n data: ContentWizardData,\n): BlogGenerationRequest | SocialContentRequest | VideoScriptRequest {\n switch (data.contentType) {\n case 'blog':\n return {\n topic: data.topic ?? '',\n blogType: 'tutorial',\n targetKeywords: data.keywords ?? [],\n tone: data.tone ?? 'professional',\n wordCount: data.wordCount ?? 1000,\n targetAudience: data.targetAudience ?? '',\n seoOptimization: data.seoOptimization ?? false,\n includeImages: data.includeImages ?? false,\n includeSchema: false,\n };\n case 'social':\n return {\n topic: data.topic ?? '',\n platform: data.platform ?? 'twitter',\n tone: data.tone ?? 'casual',\n hashtags: true,\n targetAudience: data.targetAudience,\n includeCallToAction: data.includeCallToAction,\n };\n case 'script':\n return {\n topic: data.topic ?? '',\n tone: data.tone ?? 'professional',\n duration: data.duration ?? 60,\n targetAudience: data.targetAudience ?? '',\n includeVisuals: true,\n includeCallToAction: data.includeCallToAction ?? false,\n };\n default:\n throw new Error(`Unsupported content type: ${data.contentType}`);\n }\n}\n","\nimport type { WizardStep } from './base.wizard';\nimport type { ImageGenerationRequest } from '../content/domain/config/ProviderConfig';\n\nexport type ImageWizardStep =\n | 'input-prompt'\n | 'select-style'\n | 'configure'\n | 'advanced'\n | 'preview'\n | 'generating'\n | 'results';\n\nexport interface ImageWizardData {\n prompt?: string;\n\n style?: 'realistic' | 'cartoon' | 'abstract' | 'minimalist' | 'vintage';\n\n format?: 'square' | 'landscape' | 'portrait' | 'story' | 'banner';\n quality?: 'standard' | 'high' | 'ultra';\n quantity?: number;\n\n colorPalette?: string[];\n platform?: 'instagram' | 'youtube' | 'facebook' | 'twitter' | 'general';\n\n generatedImageUrl?: string;\n generatedId?: string;\n}\n\nexport const IMAGE_WIZARD_STEPS: ReadonlyArray<WizardStep<ImageWizardStep>> = [\n {\n id: 'input-prompt',\n label: 'Describe Image',\n icon: 'Image',\n description: 'Describe the image you want to create',\n validate: (data) => {\n const prompt = (data as ImageWizardData).prompt;\n return typeof prompt === 'string' && prompt.length > 0;\n },\n },\n {\n id: 'select-style',\n label: 'Style',\n icon: 'Palette',\n description: 'Choose the artistic style',\n validate: (data) => Boolean((data as ImageWizardData).style),\n },\n {\n id: 'configure',\n label: 'Configure',\n icon: 'Settings',\n description: 'Set format, quality, and quantity',\n validate: (data) => {\n const d = data as ImageWizardData;\n return Boolean(d.format && d.quality);\n },\n },\n {\n id: 'advanced',\n label: 'Advanced',\n icon: 'Sliders',\n description: 'Color palette and platform optimization',\n optional: true,\n },\n { id: 'preview', label: 'Preview', icon: 'Eye', description: 'Review your settings' },\n { id: 'generating', label: 'Generating', icon: 'Sparkles', description: 'AI is creating your image' },\n { id: 'results', label: 'Results', icon: 'Image', description: 'Your generated image is ready' },\n];\n\nexport function buildImageRequest(data: ImageWizardData): ImageGenerationRequest {\n return {\n type: 'image',\n prompt: data.prompt ?? '',\n style: data.style,\n format: data.format,\n quality: data.quality,\n quantity: data.quantity ?? 1,\n };\n}\n","\nimport type { WizardStep } from './base.wizard';\nimport type { VideoGenerationRequest, ImageToVideoRequest, VideoToVideoRequest } from '../content/domain/config/ProviderConfig';\n\nexport type VideoGenerationType = 'text-to-video' | 'image-to-video' | 'video-to-video';\n\nexport type VideoWizardStep =\n | 'select-type'\n | 'input-source'\n | 'configure'\n | 'advanced'\n | 'preview'\n | 'generating'\n | 'results';\n\nexport interface VideoWizardData {\n generationType?: VideoGenerationType;\n\n prompt?: string;\n imageUrl?: string;\n sourceVideoUrl?: string;\n\n duration?: number;\n aspectRatio?: '16:9' | '9:16' | '1:1';\n style?: 'realistic' | 'animated' | 'cinematic' | 'documentary';\n quality?: 'standard' | 'high' | 'ultra';\n\n motion?: 'slow' | 'medium' | 'fast';\n camera?: 'static' | 'pan' | 'zoom' | 'tracking';\n styleTransfer?: 'cinematic' | 'anime' | 'cartoon' | 'vintage';\n enhanceQuality?: boolean;\n\n generatedVideoUrl?: string;\n generatedId?: string;\n}\n\nconst validateSource = (data: Record<string, unknown>): boolean => {\n const d = data as VideoWizardData;\n if (d.generationType === 'text-to-video') {\n return typeof d.prompt === 'string' && d.prompt.length > 0;\n }\n if (d.generationType === 'image-to-video') {\n return typeof d.imageUrl === 'string' && d.imageUrl.length > 0;\n }\n if (d.generationType === 'video-to-video') {\n return typeof d.sourceVideoUrl === 'string' && d.sourceVideoUrl.length > 0\n && typeof d.prompt === 'string' && d.prompt.length > 0;\n }\n return false;\n};\n\nexport const VIDEO_WIZARD_STEPS: ReadonlyArray<WizardStep<VideoWizardStep>> = [\n {\n id: 'select-type',\n label: 'Select Type',\n icon: 'Video',\n description: 'Choose video generation type',\n validate: (data) => Boolean((data as VideoWizardData).generationType),\n },\n {\n id: 'input-source',\n label: 'Source',\n icon: 'FileInput',\n description: 'Provide your source (prompt, image, or video)',\n validate: validateSource,\n },\n {\n id: 'configure',\n label: 'Configure',\n icon: 'Settings',\n description: 'Set duration, aspect ratio, and style',\n validate: (data) => {\n const d = data as VideoWizardData;\n return Boolean(d.duration && d.aspectRatio);\n },\n },\n { id: 'advanced', label: 'Advanced', icon: 'Sliders', description: 'Additional video options', optional: true },\n { id: 'preview', label: 'Preview', icon: 'Eye', description: 'Review your settings' },\n { id: 'generating', label: 'Generating', icon: 'Sparkles', description: 'AI is creating your video' },\n { id: 'results', label: 'Results', icon: 'Video', description: 'Your generated video is ready' },\n];\n\nexport function buildVideoRequest(\n data: VideoWizardData,\n): VideoGenerationRequest | ImageToVideoRequest | VideoToVideoRequest {\n switch (data.generationType) {\n case 'text-to-video':\n return {\n type: 'video',\n prompt: data.prompt ?? '',\n duration: data.duration ?? 5,\n aspectRatio: data.aspectRatio ?? '16:9',\n style: data.style,\n quality: data.quality,\n } as VideoGenerationRequest;\n case 'image-to-video':\n return {\n type: 'video',\n imageUrl: data.imageUrl ?? '',\n prompt: data.prompt,\n duration: data.duration ?? 5,\n motion: data.motion ?? 'medium',\n camera: data.camera ?? 'static',\n } as ImageToVideoRequest;\n case 'video-to-video':\n return {\n type: 'video',\n sourceVideoUrl: data.sourceVideoUrl ?? '',\n prompt: data.prompt ?? '',\n styleTransfer: data.styleTransfer,\n enhanceQuality: data.enhanceQuality,\n } as VideoToVideoRequest;\n default:\n throw new Error(`Unsupported generation type: ${data.generationType}`);\n }\n}\n"]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { B as BlogGenerationRequest, b as SocialContentRequest, V as VideoScriptRequest } from '../ContentGeneration-B6iK2B33.cjs';
|
|
2
|
+
import { I as ImageGenerationRequest, V as VideoGenerationRequest, a as ImageToVideoRequest, b as VideoToVideoRequest } from '../ProviderConfig-a55tLhWT.cjs';
|
|
3
|
+
|
|
4
|
+
interface WizardStep<T extends string = string> {
|
|
5
|
+
id: T;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
optional?: boolean;
|
|
10
|
+
validate?: (data: Record<string, unknown>) => boolean | {
|
|
11
|
+
valid: boolean;
|
|
12
|
+
errors: Record<string, string>;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
interface ValidationResult {
|
|
16
|
+
valid: boolean;
|
|
17
|
+
errors: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
type WizardData = Record<string, unknown>;
|
|
20
|
+
interface WizardConfig<T extends string = string> {
|
|
21
|
+
steps: WizardStep<T>[];
|
|
22
|
+
initialStep?: T;
|
|
23
|
+
data?: WizardData;
|
|
24
|
+
onStepChange?: (from: T, to: T) => void;
|
|
25
|
+
onComplete?: (data: WizardData) => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type ContentType = 'blog' | 'social' | 'script' | 'news' | 'ebook' | 'podcast';
|
|
29
|
+
type ContentWizardStep = 'select-type' | 'input-topic' | 'configure' | 'advanced' | 'preview' | 'generating' | 'results';
|
|
30
|
+
interface ContentWizardData {
|
|
31
|
+
contentType?: ContentType;
|
|
32
|
+
topic?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
tone?: 'professional' | 'casual' | 'enthusiastic' | 'humorous' | 'dramatic' | 'educational';
|
|
35
|
+
platform?: 'twitter' | 'linkedin' | 'instagram' | 'threads' | 'tiktok' | 'facebook';
|
|
36
|
+
targetAudience?: string;
|
|
37
|
+
wordCount?: number;
|
|
38
|
+
duration?: number;
|
|
39
|
+
keywords?: string[];
|
|
40
|
+
includeImages?: boolean;
|
|
41
|
+
includeCallToAction?: boolean;
|
|
42
|
+
seoOptimization?: boolean;
|
|
43
|
+
language?: string;
|
|
44
|
+
generatedContent?: string;
|
|
45
|
+
generatedId?: string;
|
|
46
|
+
}
|
|
47
|
+
declare const CONTENT_WIZARD_STEPS: ReadonlyArray<WizardStep<ContentWizardStep>>;
|
|
48
|
+
declare function buildContentRequest(data: ContentWizardData): BlogGenerationRequest | SocialContentRequest | VideoScriptRequest;
|
|
49
|
+
|
|
50
|
+
type ImageWizardStep = 'input-prompt' | 'select-style' | 'configure' | 'advanced' | 'preview' | 'generating' | 'results';
|
|
51
|
+
interface ImageWizardData {
|
|
52
|
+
prompt?: string;
|
|
53
|
+
style?: 'realistic' | 'cartoon' | 'abstract' | 'minimalist' | 'vintage';
|
|
54
|
+
format?: 'square' | 'landscape' | 'portrait' | 'story' | 'banner';
|
|
55
|
+
quality?: 'standard' | 'high' | 'ultra';
|
|
56
|
+
quantity?: number;
|
|
57
|
+
colorPalette?: string[];
|
|
58
|
+
platform?: 'instagram' | 'youtube' | 'facebook' | 'twitter' | 'general';
|
|
59
|
+
generatedImageUrl?: string;
|
|
60
|
+
generatedId?: string;
|
|
61
|
+
}
|
|
62
|
+
declare const IMAGE_WIZARD_STEPS: ReadonlyArray<WizardStep<ImageWizardStep>>;
|
|
63
|
+
declare function buildImageRequest(data: ImageWizardData): ImageGenerationRequest;
|
|
64
|
+
|
|
65
|
+
type VideoGenerationType = 'text-to-video' | 'image-to-video' | 'video-to-video';
|
|
66
|
+
type VideoWizardStep = 'select-type' | 'input-source' | 'configure' | 'advanced' | 'preview' | 'generating' | 'results';
|
|
67
|
+
interface VideoWizardData {
|
|
68
|
+
generationType?: VideoGenerationType;
|
|
69
|
+
prompt?: string;
|
|
70
|
+
imageUrl?: string;
|
|
71
|
+
sourceVideoUrl?: string;
|
|
72
|
+
duration?: number;
|
|
73
|
+
aspectRatio?: '16:9' | '9:16' | '1:1';
|
|
74
|
+
style?: 'realistic' | 'animated' | 'cinematic' | 'documentary';
|
|
75
|
+
quality?: 'standard' | 'high' | 'ultra';
|
|
76
|
+
motion?: 'slow' | 'medium' | 'fast';
|
|
77
|
+
camera?: 'static' | 'pan' | 'zoom' | 'tracking';
|
|
78
|
+
styleTransfer?: 'cinematic' | 'anime' | 'cartoon' | 'vintage';
|
|
79
|
+
enhanceQuality?: boolean;
|
|
80
|
+
generatedVideoUrl?: string;
|
|
81
|
+
generatedId?: string;
|
|
82
|
+
}
|
|
83
|
+
declare const VIDEO_WIZARD_STEPS: ReadonlyArray<WizardStep<VideoWizardStep>>;
|
|
84
|
+
declare function buildVideoRequest(data: VideoWizardData): VideoGenerationRequest | ImageToVideoRequest | VideoToVideoRequest;
|
|
85
|
+
|
|
86
|
+
export { CONTENT_WIZARD_STEPS, type ContentType, type ContentWizardData, type ContentWizardStep, IMAGE_WIZARD_STEPS, type ImageWizardData, type ImageWizardStep, VIDEO_WIZARD_STEPS, type ValidationResult, type VideoGenerationType, type VideoWizardData, type VideoWizardStep, type WizardConfig, type WizardData, type WizardStep, buildContentRequest, buildImageRequest, buildVideoRequest };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { B as BlogGenerationRequest, b as SocialContentRequest, V as VideoScriptRequest } from '../ContentGeneration-B6iK2B33.js';
|
|
2
|
+
import { I as ImageGenerationRequest, V as VideoGenerationRequest, a as ImageToVideoRequest, b as VideoToVideoRequest } from '../ProviderConfig-a55tLhWT.js';
|
|
3
|
+
|
|
4
|
+
interface WizardStep<T extends string = string> {
|
|
5
|
+
id: T;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
optional?: boolean;
|
|
10
|
+
validate?: (data: Record<string, unknown>) => boolean | {
|
|
11
|
+
valid: boolean;
|
|
12
|
+
errors: Record<string, string>;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
interface ValidationResult {
|
|
16
|
+
valid: boolean;
|
|
17
|
+
errors: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
type WizardData = Record<string, unknown>;
|
|
20
|
+
interface WizardConfig<T extends string = string> {
|
|
21
|
+
steps: WizardStep<T>[];
|
|
22
|
+
initialStep?: T;
|
|
23
|
+
data?: WizardData;
|
|
24
|
+
onStepChange?: (from: T, to: T) => void;
|
|
25
|
+
onComplete?: (data: WizardData) => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type ContentType = 'blog' | 'social' | 'script' | 'news' | 'ebook' | 'podcast';
|
|
29
|
+
type ContentWizardStep = 'select-type' | 'input-topic' | 'configure' | 'advanced' | 'preview' | 'generating' | 'results';
|
|
30
|
+
interface ContentWizardData {
|
|
31
|
+
contentType?: ContentType;
|
|
32
|
+
topic?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
tone?: 'professional' | 'casual' | 'enthusiastic' | 'humorous' | 'dramatic' | 'educational';
|
|
35
|
+
platform?: 'twitter' | 'linkedin' | 'instagram' | 'threads' | 'tiktok' | 'facebook';
|
|
36
|
+
targetAudience?: string;
|
|
37
|
+
wordCount?: number;
|
|
38
|
+
duration?: number;
|
|
39
|
+
keywords?: string[];
|
|
40
|
+
includeImages?: boolean;
|
|
41
|
+
includeCallToAction?: boolean;
|
|
42
|
+
seoOptimization?: boolean;
|
|
43
|
+
language?: string;
|
|
44
|
+
generatedContent?: string;
|
|
45
|
+
generatedId?: string;
|
|
46
|
+
}
|
|
47
|
+
declare const CONTENT_WIZARD_STEPS: ReadonlyArray<WizardStep<ContentWizardStep>>;
|
|
48
|
+
declare function buildContentRequest(data: ContentWizardData): BlogGenerationRequest | SocialContentRequest | VideoScriptRequest;
|
|
49
|
+
|
|
50
|
+
type ImageWizardStep = 'input-prompt' | 'select-style' | 'configure' | 'advanced' | 'preview' | 'generating' | 'results';
|
|
51
|
+
interface ImageWizardData {
|
|
52
|
+
prompt?: string;
|
|
53
|
+
style?: 'realistic' | 'cartoon' | 'abstract' | 'minimalist' | 'vintage';
|
|
54
|
+
format?: 'square' | 'landscape' | 'portrait' | 'story' | 'banner';
|
|
55
|
+
quality?: 'standard' | 'high' | 'ultra';
|
|
56
|
+
quantity?: number;
|
|
57
|
+
colorPalette?: string[];
|
|
58
|
+
platform?: 'instagram' | 'youtube' | 'facebook' | 'twitter' | 'general';
|
|
59
|
+
generatedImageUrl?: string;
|
|
60
|
+
generatedId?: string;
|
|
61
|
+
}
|
|
62
|
+
declare const IMAGE_WIZARD_STEPS: ReadonlyArray<WizardStep<ImageWizardStep>>;
|
|
63
|
+
declare function buildImageRequest(data: ImageWizardData): ImageGenerationRequest;
|
|
64
|
+
|
|
65
|
+
type VideoGenerationType = 'text-to-video' | 'image-to-video' | 'video-to-video';
|
|
66
|
+
type VideoWizardStep = 'select-type' | 'input-source' | 'configure' | 'advanced' | 'preview' | 'generating' | 'results';
|
|
67
|
+
interface VideoWizardData {
|
|
68
|
+
generationType?: VideoGenerationType;
|
|
69
|
+
prompt?: string;
|
|
70
|
+
imageUrl?: string;
|
|
71
|
+
sourceVideoUrl?: string;
|
|
72
|
+
duration?: number;
|
|
73
|
+
aspectRatio?: '16:9' | '9:16' | '1:1';
|
|
74
|
+
style?: 'realistic' | 'animated' | 'cinematic' | 'documentary';
|
|
75
|
+
quality?: 'standard' | 'high' | 'ultra';
|
|
76
|
+
motion?: 'slow' | 'medium' | 'fast';
|
|
77
|
+
camera?: 'static' | 'pan' | 'zoom' | 'tracking';
|
|
78
|
+
styleTransfer?: 'cinematic' | 'anime' | 'cartoon' | 'vintage';
|
|
79
|
+
enhanceQuality?: boolean;
|
|
80
|
+
generatedVideoUrl?: string;
|
|
81
|
+
generatedId?: string;
|
|
82
|
+
}
|
|
83
|
+
declare const VIDEO_WIZARD_STEPS: ReadonlyArray<WizardStep<VideoWizardStep>>;
|
|
84
|
+
declare function buildVideoRequest(data: VideoWizardData): VideoGenerationRequest | ImageToVideoRequest | VideoToVideoRequest;
|
|
85
|
+
|
|
86
|
+
export { CONTENT_WIZARD_STEPS, type ContentType, type ContentWizardData, type ContentWizardStep, IMAGE_WIZARD_STEPS, type ImageWizardData, type ImageWizardStep, VIDEO_WIZARD_STEPS, type ValidationResult, type VideoGenerationType, type VideoWizardData, type VideoWizardStep, type WizardConfig, type WizardData, type WizardStep, buildContentRequest, buildImageRequest, buildVideoRequest };
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
// src/wizard/content.wizard.ts
|
|
2
|
+
var CONTENT_WIZARD_STEPS = [
|
|
3
|
+
{
|
|
4
|
+
id: "select-type",
|
|
5
|
+
label: "Select Type",
|
|
6
|
+
icon: "Layers",
|
|
7
|
+
description: "Choose the type of content you want to generate",
|
|
8
|
+
validate: (data) => Boolean(data.contentType)
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: "input-topic",
|
|
12
|
+
label: "Topic",
|
|
13
|
+
icon: "Lightbulb",
|
|
14
|
+
description: "Enter your topic or idea",
|
|
15
|
+
validate: (data) => {
|
|
16
|
+
const topic = data.topic;
|
|
17
|
+
return typeof topic === "string" && topic.length > 0;
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "configure",
|
|
22
|
+
label: "Configure",
|
|
23
|
+
icon: "Settings",
|
|
24
|
+
description: "Set tone, audience, and platform",
|
|
25
|
+
validate: (data) => {
|
|
26
|
+
const d = data;
|
|
27
|
+
return Boolean(d.tone && d.targetAudience);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "advanced",
|
|
32
|
+
label: "Advanced",
|
|
33
|
+
icon: "Sliders",
|
|
34
|
+
description: "Additional options and optimizations",
|
|
35
|
+
optional: true
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "preview",
|
|
39
|
+
label: "Preview",
|
|
40
|
+
icon: "Eye",
|
|
41
|
+
description: "Review your settings before generation"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "generating",
|
|
45
|
+
label: "Generating",
|
|
46
|
+
icon: "Sparkles",
|
|
47
|
+
description: "AI is generating your content"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "results",
|
|
51
|
+
label: "Results",
|
|
52
|
+
icon: "CheckCircle",
|
|
53
|
+
description: "Your generated content is ready"
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
function buildContentRequest(data) {
|
|
57
|
+
switch (data.contentType) {
|
|
58
|
+
case "blog":
|
|
59
|
+
return {
|
|
60
|
+
topic: data.topic ?? "",
|
|
61
|
+
blogType: "tutorial",
|
|
62
|
+
targetKeywords: data.keywords ?? [],
|
|
63
|
+
tone: data.tone ?? "professional",
|
|
64
|
+
wordCount: data.wordCount ?? 1e3,
|
|
65
|
+
targetAudience: data.targetAudience ?? "",
|
|
66
|
+
seoOptimization: data.seoOptimization ?? false,
|
|
67
|
+
includeImages: data.includeImages ?? false,
|
|
68
|
+
includeSchema: false
|
|
69
|
+
};
|
|
70
|
+
case "social":
|
|
71
|
+
return {
|
|
72
|
+
topic: data.topic ?? "",
|
|
73
|
+
platform: data.platform ?? "twitter",
|
|
74
|
+
tone: data.tone ?? "casual",
|
|
75
|
+
hashtags: true,
|
|
76
|
+
targetAudience: data.targetAudience,
|
|
77
|
+
includeCallToAction: data.includeCallToAction
|
|
78
|
+
};
|
|
79
|
+
case "script":
|
|
80
|
+
return {
|
|
81
|
+
topic: data.topic ?? "",
|
|
82
|
+
tone: data.tone ?? "professional",
|
|
83
|
+
duration: data.duration ?? 60,
|
|
84
|
+
targetAudience: data.targetAudience ?? "",
|
|
85
|
+
includeVisuals: true,
|
|
86
|
+
includeCallToAction: data.includeCallToAction ?? false
|
|
87
|
+
};
|
|
88
|
+
default:
|
|
89
|
+
throw new Error(`Unsupported content type: ${data.contentType}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// src/wizard/image.wizard.ts
|
|
94
|
+
var IMAGE_WIZARD_STEPS = [
|
|
95
|
+
{
|
|
96
|
+
id: "input-prompt",
|
|
97
|
+
label: "Describe Image",
|
|
98
|
+
icon: "Image",
|
|
99
|
+
description: "Describe the image you want to create",
|
|
100
|
+
validate: (data) => {
|
|
101
|
+
const prompt = data.prompt;
|
|
102
|
+
return typeof prompt === "string" && prompt.length > 0;
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "select-style",
|
|
107
|
+
label: "Style",
|
|
108
|
+
icon: "Palette",
|
|
109
|
+
description: "Choose the artistic style",
|
|
110
|
+
validate: (data) => Boolean(data.style)
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "configure",
|
|
114
|
+
label: "Configure",
|
|
115
|
+
icon: "Settings",
|
|
116
|
+
description: "Set format, quality, and quantity",
|
|
117
|
+
validate: (data) => {
|
|
118
|
+
const d = data;
|
|
119
|
+
return Boolean(d.format && d.quality);
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "advanced",
|
|
124
|
+
label: "Advanced",
|
|
125
|
+
icon: "Sliders",
|
|
126
|
+
description: "Color palette and platform optimization",
|
|
127
|
+
optional: true
|
|
128
|
+
},
|
|
129
|
+
{ id: "preview", label: "Preview", icon: "Eye", description: "Review your settings" },
|
|
130
|
+
{ id: "generating", label: "Generating", icon: "Sparkles", description: "AI is creating your image" },
|
|
131
|
+
{ id: "results", label: "Results", icon: "Image", description: "Your generated image is ready" }
|
|
132
|
+
];
|
|
133
|
+
function buildImageRequest(data) {
|
|
134
|
+
return {
|
|
135
|
+
type: "image",
|
|
136
|
+
prompt: data.prompt ?? "",
|
|
137
|
+
style: data.style,
|
|
138
|
+
format: data.format,
|
|
139
|
+
quality: data.quality,
|
|
140
|
+
quantity: data.quantity ?? 1
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// src/wizard/video.wizard.ts
|
|
145
|
+
var validateSource = (data) => {
|
|
146
|
+
const d = data;
|
|
147
|
+
if (d.generationType === "text-to-video") {
|
|
148
|
+
return typeof d.prompt === "string" && d.prompt.length > 0;
|
|
149
|
+
}
|
|
150
|
+
if (d.generationType === "image-to-video") {
|
|
151
|
+
return typeof d.imageUrl === "string" && d.imageUrl.length > 0;
|
|
152
|
+
}
|
|
153
|
+
if (d.generationType === "video-to-video") {
|
|
154
|
+
return typeof d.sourceVideoUrl === "string" && d.sourceVideoUrl.length > 0 && typeof d.prompt === "string" && d.prompt.length > 0;
|
|
155
|
+
}
|
|
156
|
+
return false;
|
|
157
|
+
};
|
|
158
|
+
var VIDEO_WIZARD_STEPS = [
|
|
159
|
+
{
|
|
160
|
+
id: "select-type",
|
|
161
|
+
label: "Select Type",
|
|
162
|
+
icon: "Video",
|
|
163
|
+
description: "Choose video generation type",
|
|
164
|
+
validate: (data) => Boolean(data.generationType)
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: "input-source",
|
|
168
|
+
label: "Source",
|
|
169
|
+
icon: "FileInput",
|
|
170
|
+
description: "Provide your source (prompt, image, or video)",
|
|
171
|
+
validate: validateSource
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
id: "configure",
|
|
175
|
+
label: "Configure",
|
|
176
|
+
icon: "Settings",
|
|
177
|
+
description: "Set duration, aspect ratio, and style",
|
|
178
|
+
validate: (data) => {
|
|
179
|
+
const d = data;
|
|
180
|
+
return Boolean(d.duration && d.aspectRatio);
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{ id: "advanced", label: "Advanced", icon: "Sliders", description: "Additional video options", optional: true },
|
|
184
|
+
{ id: "preview", label: "Preview", icon: "Eye", description: "Review your settings" },
|
|
185
|
+
{ id: "generating", label: "Generating", icon: "Sparkles", description: "AI is creating your video" },
|
|
186
|
+
{ id: "results", label: "Results", icon: "Video", description: "Your generated video is ready" }
|
|
187
|
+
];
|
|
188
|
+
function buildVideoRequest(data) {
|
|
189
|
+
switch (data.generationType) {
|
|
190
|
+
case "text-to-video":
|
|
191
|
+
return {
|
|
192
|
+
type: "video",
|
|
193
|
+
prompt: data.prompt ?? "",
|
|
194
|
+
duration: data.duration ?? 5,
|
|
195
|
+
aspectRatio: data.aspectRatio ?? "16:9",
|
|
196
|
+
style: data.style,
|
|
197
|
+
quality: data.quality
|
|
198
|
+
};
|
|
199
|
+
case "image-to-video":
|
|
200
|
+
return {
|
|
201
|
+
type: "video",
|
|
202
|
+
imageUrl: data.imageUrl ?? "",
|
|
203
|
+
prompt: data.prompt,
|
|
204
|
+
duration: data.duration ?? 5,
|
|
205
|
+
motion: data.motion ?? "medium",
|
|
206
|
+
camera: data.camera ?? "static"
|
|
207
|
+
};
|
|
208
|
+
case "video-to-video":
|
|
209
|
+
return {
|
|
210
|
+
type: "video",
|
|
211
|
+
sourceVideoUrl: data.sourceVideoUrl ?? "",
|
|
212
|
+
prompt: data.prompt ?? "",
|
|
213
|
+
styleTransfer: data.styleTransfer,
|
|
214
|
+
enhanceQuality: data.enhanceQuality
|
|
215
|
+
};
|
|
216
|
+
default:
|
|
217
|
+
throw new Error(`Unsupported generation type: ${data.generationType}`);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export { CONTENT_WIZARD_STEPS, IMAGE_WIZARD_STEPS, VIDEO_WIZARD_STEPS, buildContentRequest, buildImageRequest, buildVideoRequest };
|
|
222
|
+
//# sourceMappingURL=index.js.map
|
|
223
|
+
//# sourceMappingURL=index.js.map
|