@plasius/video 0.1.2 → 0.1.4

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/dist/index.cjs CHANGED
@@ -20,15 +20,1177 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ AIVideoGenerationScreen: () => AIVideoGenerationScreen,
24
+ AIVideoGenerationStudioDemo: () => AIVideoGenerationStudioDemo,
25
+ AI_VIDEO_GENERATION_SCREEN_STYLES: () => AI_VIDEO_GENERATION_SCREEN_STYLES,
26
+ aiVideoGenerationTokens: () => aiVideoGenerationTokens,
27
+ aiVideoStageFlow: () => aiVideoStageFlow,
28
+ createAIVideoGenerationDemoModel: () => createAIVideoGenerationDemoModel,
23
29
  videoPackageInfo: () => videoPackageInfo
24
30
  });
25
31
  module.exports = __toCommonJS(index_exports);
32
+
33
+ // src/ai-video-generation/tokens.ts
34
+ var aiVideoGenerationTokens = {
35
+ color: {
36
+ background: "#0F1117",
37
+ surface: "#161A23",
38
+ accentPrimary: "#6C5CE7",
39
+ accentSecondary: "#00D4FF",
40
+ success: "#00C896",
41
+ warning: "#FFB020",
42
+ error: "#FF4D4F",
43
+ textPrimary: "#E6EAF2",
44
+ textSecondary: "#A0A8B8",
45
+ borderSubtle: "rgba(255,255,255,0.05)",
46
+ placeholderText: "rgba(255,255,255,0.35)"
47
+ },
48
+ typography: {
49
+ headingFontFamily: "Inter, 'SF Pro Display', sans-serif",
50
+ bodyFontFamily: "Inter, sans-serif",
51
+ h1Px: 28,
52
+ h2Px: 20,
53
+ bodyPx: 16,
54
+ smallPx: 13,
55
+ promptPxMin: 16,
56
+ promptPxMax: 18
57
+ },
58
+ layout: {
59
+ headerHeightPx: 64,
60
+ promptBarMinHeightPx: 140,
61
+ gridGapPx: 16,
62
+ cardAspectRatio: "16 / 9"
63
+ },
64
+ radius: {
65
+ promptPx: 12,
66
+ cardPx: 14,
67
+ panelPx: 14
68
+ },
69
+ spacing: {
70
+ xxsPx: 4,
71
+ xsPx: 8,
72
+ smPx: 12,
73
+ mdPx: 16,
74
+ lgPx: 20,
75
+ xlPx: 24
76
+ },
77
+ animation: {
78
+ fastMs: 200,
79
+ standardMs: 280,
80
+ slowMs: 300,
81
+ easing: "cubic-bezier(0.4, 0.0, 0.2, 1)"
82
+ }
83
+ };
84
+
85
+ // src/ai-video-generation/stages.ts
86
+ var aiVideoStageFlow = [
87
+ {
88
+ stage: "idle",
89
+ label: "Idle",
90
+ mainUI: "Prompt input",
91
+ description: "Base prompt entry with optional image upload and advanced settings."
92
+ },
93
+ {
94
+ stage: "generatingImages",
95
+ label: "Generating Images",
96
+ mainUI: "Skeleton grid",
97
+ description: "Asynchronous generation feedback with shimmer placeholders."
98
+ },
99
+ {
100
+ stage: "imageSelection",
101
+ label: "Image Selection",
102
+ mainUI: "Image grid",
103
+ description: "Select, refine, save, and mark an image as the video source."
104
+ },
105
+ {
106
+ stage: "generatingVideo",
107
+ label: "Generating Video",
108
+ mainUI: "Image + progress",
109
+ description: "Motion extraction and generation progress with live feedback."
110
+ },
111
+ {
112
+ stage: "playback",
113
+ label: "Playback",
114
+ mainUI: "Video player",
115
+ description: "Playback controls, download, regenerate, and voiceover entry point."
116
+ },
117
+ {
118
+ stage: "voiceover",
119
+ label: "Voiceover",
120
+ mainUI: "Bottom voice panel",
121
+ description: "Editable script, voice presets, speed/emotion controls, waveform preview."
122
+ },
123
+ {
124
+ stage: "export",
125
+ label: "Export",
126
+ mainUI: "Export modal",
127
+ description: "Final artifact export options with quality and format metadata."
128
+ }
129
+ ];
130
+
131
+ // src/ai-video-generation/demo-model.ts
132
+ var basePrompt = "Mountain village at sunset";
133
+ var refinement = "Add fog rolling through the valley";
134
+ var baseVariants = [
135
+ { id: "img-1", label: "Variant 1", alt: "Village view with warm skyline" },
136
+ { id: "img-2", label: "Variant 2", alt: "Village rooftops and distant mountains" },
137
+ { id: "img-3", label: "Variant 3", alt: "Bridge over misted valley" },
138
+ { id: "img-4", label: "Variant 4", alt: "Forest edge overlooking village lights" },
139
+ { id: "img-5", label: "Variant 5", alt: "Cloud bank drifting above the town" },
140
+ { id: "img-6", label: "Variant 6", alt: "Cinematic wide frame across the valley" }
141
+ ];
142
+ var stageStatusText = {
143
+ idle: "Ready to generate image directions.",
144
+ generatingImages: "Generating course-setting image variants...",
145
+ imageSelection: "Choose a visual anchor for motion extraction.",
146
+ generatingVideo: "Generating video from selected course image...",
147
+ playback: "Video ready for review.",
148
+ voiceover: "Voiceover tools ready.",
149
+ export: "Review export profile and metadata."
150
+ };
151
+ function withSelectedVariant(variants, selectedId) {
152
+ return variants.map((variant) => ({
153
+ ...variant,
154
+ isSelected: variant.id === selectedId
155
+ }));
156
+ }
157
+ function createAIVideoGenerationDemoModel(stage = "idle") {
158
+ const selectedId = "img-3";
159
+ const selectedVariants = withSelectedVariant(baseVariants, selectedId);
160
+ const model = {
161
+ stage,
162
+ projectName: "Mountain Valley Storyboard",
163
+ prompt: basePrompt,
164
+ promptPlaceholder: "Describe your scene, camera movement, mood, and intended spoken narration...",
165
+ canGenerate: stage !== "generatingImages" && stage !== "generatingVideo",
166
+ statusText: stageStatusText[stage],
167
+ generationProgress: stage === "generatingVideo" ? 62 : 100,
168
+ imageVariants: stage === "idle" ? [] : stage === "generatingImages" ? baseVariants.slice(0, 8) : selectedVariants,
169
+ selectedImageId: stage === "imageSelection" || stage === "generatingVideo" || stage === "playback" || stage === "voiceover" || stage === "export" ? selectedId : void 0,
170
+ promptVersions: [
171
+ {
172
+ id: "v1",
173
+ label: "Version 1",
174
+ basePrompt
175
+ },
176
+ {
177
+ id: "v2",
178
+ label: "Version 2",
179
+ basePrompt,
180
+ refinement
181
+ },
182
+ {
183
+ id: "v3",
184
+ label: "Version 3",
185
+ basePrompt,
186
+ refinement: `${refinement}; camera starts low and pans left.`,
187
+ isActive: true
188
+ }
189
+ ],
190
+ motionDraft: {
191
+ cameraMotion: "Camera slowly pans left, then settles into a medium-wide frame.",
192
+ environmentalMotion: "Fog layers move through the valley while lantern light flickers.",
193
+ subjectMotion: "Foreground flags sway and distant birds cross near the skyline."
194
+ },
195
+ motionPrompt: "Camera slowly pans left with drifting fog and gentle ambient motion.",
196
+ voiceSettings: {
197
+ script: "Welcome to the ancient valley. Each light tells a story waiting to be explored.",
198
+ voiceId: "narrator-documentary",
199
+ speed: 1,
200
+ emotion: "Neutral"
201
+ },
202
+ voicePresets: [
203
+ { id: "male-warm", label: "Male Warm" },
204
+ { id: "female-calm", label: "Female Calm" },
205
+ { id: "narrator-documentary", label: "Narrator Documentary" }
206
+ ],
207
+ videoSource: stage === "playback" || stage === "voiceover" || stage === "export" ? "https://example.invalid/plasius/video/demo.mp4" : void 0
208
+ };
209
+ if (stage === "idle") {
210
+ model.uploadedImageName = "uploaded-village-frame.png";
211
+ model.motionPrompt = "";
212
+ model.canGenerate = false;
213
+ model.statusText = "Upload Image: complete. Add motion instructions (required).";
214
+ }
215
+ return model;
216
+ }
217
+
218
+ // src/ai-video-generation/screen.tsx
219
+ var import_jsx_runtime = require("react/jsx-runtime");
220
+ var stageLabel = {
221
+ idle: "Prompt",
222
+ generatingImages: "Images",
223
+ imageSelection: "Selection",
224
+ generatingVideo: "Video",
225
+ playback: "Playback",
226
+ voiceover: "Voiceover",
227
+ export: "Export"
228
+ };
229
+ function clampProgress(value) {
230
+ if (typeof value !== "number" || Number.isNaN(value)) {
231
+ return 0;
232
+ }
233
+ if (value < 0) {
234
+ return 0;
235
+ }
236
+ if (value > 100) {
237
+ return 100;
238
+ }
239
+ return Math.round(value);
240
+ }
241
+ function gradientForCard(index) {
242
+ const gradients = [
243
+ "linear-gradient(140deg, #20305a 0%, #6c5ce7 45%, #00d4ff 100%)",
244
+ "linear-gradient(140deg, #2b1f3f 0%, #6c5ce7 48%, #3dd9f5 100%)",
245
+ "linear-gradient(140deg, #283645 0%, #4f89c2 46%, #9be3ff 100%)",
246
+ "linear-gradient(140deg, #2f2921 0%, #8a5f3a 48%, #ffd39f 100%)"
247
+ ];
248
+ return gradients[index % gradients.length];
249
+ }
250
+ function renderImageCard(variant, index, callbacks) {
251
+ const isSelected = Boolean(variant.isSelected);
252
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
253
+ "article",
254
+ {
255
+ className: `plv-image-card${isSelected ? " is-selected" : ""}`,
256
+ "aria-label": variant.alt ?? variant.label,
257
+ children: [
258
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
259
+ "button",
260
+ {
261
+ type: "button",
262
+ className: "plv-image-select-hitbox",
263
+ "aria-pressed": isSelected,
264
+ onClick: () => callbacks.onSelectImage?.(variant),
265
+ children: [
266
+ variant.src ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: variant.src, alt: variant.alt ?? variant.label, className: "plv-image-media" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-image-media", style: { background: gradientForCard(index) } }),
267
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-image-caption", children: [
268
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: variant.label }),
269
+ isSelected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "plv-chip", children: "Selected" }) : null
270
+ ] })
271
+ ]
272
+ }
273
+ ),
274
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-image-overlay-controls", role: "group", "aria-label": `${variant.label} controls`, children: [
275
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: () => callbacks.onRefineImage?.(variant), children: "Refine" }),
276
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: () => callbacks.onSaveImage?.(variant), children: "Save" }),
277
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: () => callbacks.onUseForVideo?.(variant), children: "Use for Video" })
278
+ ] }),
279
+ isSelected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "plv-selected-checkmark", "aria-hidden": "true", children: "\u2713" }) : null
280
+ ]
281
+ },
282
+ variant.id
283
+ );
284
+ }
285
+ function renderSkeletonGrid(count) {
286
+ const items = Array.from({ length: count }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-skeleton-card" }, `skeleton-${index}`));
287
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-image-grid", children: items });
288
+ }
289
+ function renderStageCanvas(model, callbacks) {
290
+ const progress = clampProgress(model.generationProgress);
291
+ if (model.stage === "generatingImages") {
292
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
293
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Generating Image Variants" }),
294
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "plv-muted", children: model.statusText }),
295
+ renderSkeletonGrid(model.imageVariants.length > 0 ? model.imageVariants.length : 8)
296
+ ] });
297
+ }
298
+ if (model.stage === "imageSelection") {
299
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
300
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Course Setting Image Grid" }),
301
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "plv-muted", children: "Select a visual anchor before video generation." }),
302
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-image-grid", children: model.imageVariants.map((variant, index) => renderImageCard(variant, index, callbacks)) })
303
+ ] });
304
+ }
305
+ if (model.stage === "generatingVideo") {
306
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
307
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Video Generation Phase" }),
308
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-split-panel", children: [
309
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-preview-box", children: [
310
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-preview-title", children: "Image Preview" }),
311
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-preview-media" })
312
+ ] }),
313
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-motion-panel", children: [
314
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-preview-title", children: "Motion Summary" }),
315
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { children: [
316
+ "Camera motion",
317
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", { readOnly: true, value: model.motionDraft.cameraMotion })
318
+ ] }),
319
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { children: [
320
+ "Environmental motion",
321
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", { readOnly: true, value: model.motionDraft.environmentalMotion })
322
+ ] }),
323
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { children: [
324
+ "Subject motion",
325
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", { readOnly: true, value: model.motionDraft.subjectMotion })
326
+ ] })
327
+ ] })
328
+ ] }),
329
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-progress-panel", children: [
330
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-progress-topline", children: [
331
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Generating Video..." }),
332
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
333
+ progress,
334
+ "%"
335
+ ] })
336
+ ] }),
337
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": progress, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-progress-fill", style: { width: `${progress}%` } }) }),
338
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-waveform", "aria-hidden": "true" })
339
+ ] })
340
+ ] });
341
+ }
342
+ if (model.stage === "playback" || model.stage === "voiceover" || model.stage === "export") {
343
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
344
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Video Playback" }),
345
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-player-shell", children: [
346
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-player-frame", children: [
347
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-player-glow" }),
348
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-player-screen", children: "16:9 Preview Frame" })
349
+ ] }),
350
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-player-controls", children: [
351
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "Play / Pause" }),
352
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "Timeline" }),
353
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", children: "Volume" }),
354
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: callbacks.onDownloadVideo, children: "Download" }),
355
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: callbacks.onRegenerateVideo, children: "Regenerate" }),
356
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: callbacks.onAddVoiceover, children: "Add Voiceover" })
357
+ ] })
358
+ ] }),
359
+ model.stage === "voiceover" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "plv-voiceover-panel", "aria-label": "Voiceover panel", children: [
360
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-preview-title", children: "Extracted Speech" }),
361
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", { readOnly: true, value: model.voiceSettings.script }),
362
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-voice-grid", children: [
363
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
364
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-field-label", children: "Voice" }),
365
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-pill-group", children: model.voicePresets.map((voice) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
366
+ "button",
367
+ {
368
+ type: "button",
369
+ className: voice.id === model.voiceSettings.voiceId ? "is-active" : void 0,
370
+ children: voice.label
371
+ },
372
+ voice.id
373
+ )) })
374
+ ] }),
375
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
376
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-field-label", children: [
377
+ "Speed: ",
378
+ model.voiceSettings.speed.toFixed(1),
379
+ "x"
380
+ ] }),
381
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-slider-track" })
382
+ ] }),
383
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
384
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-field-label", children: [
385
+ "Emotion: ",
386
+ model.voiceSettings.emotion
387
+ ] }),
388
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-slider-track" })
389
+ ] })
390
+ ] }),
391
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-waveform is-voiceover", "aria-hidden": "true" })
392
+ ] }) : null,
393
+ model.stage === "export" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-export-modal", role: "dialog", "aria-label": "Export modal", children: [
394
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: "Export" }),
395
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Finalize codec, quality, and voice mixdown profile." }),
396
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: callbacks.onExport, children: "Confirm Export" })
397
+ ] }) : null
398
+ ] });
399
+ }
400
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
401
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Prompt Entry" }),
402
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "plv-muted", children: "Start with a cinematic prompt, then generate course-setting images." }),
403
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-idle-canvas", children: model.uploadedImageName ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
404
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-upload-chip", children: [
405
+ "Upload Image: ",
406
+ model.uploadedImageName
407
+ ] }),
408
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-required-chip", children: "Add Motion Instructions (Required)" })
409
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-upload-chip", children: "Upload an image or write a prompt to begin." }) })
410
+ ] });
411
+ }
412
+ function AIVideoGenerationScreen({
413
+ model,
414
+ className,
415
+ style,
416
+ showContextPanel = true,
417
+ reduceMotion = false,
418
+ ...callbacks
419
+ }) {
420
+ const rootClassName = [
421
+ "plv-video-screen",
422
+ reduceMotion ? "plv-reduce-motion" : "",
423
+ className ?? ""
424
+ ].filter(Boolean).join(" ");
425
+ const requiresMotionPrompt = Boolean(model.uploadedImageName) && !model.motionPrompt?.trim();
426
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: rootClassName, style, children: [
427
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: AI_VIDEO_GENERATION_SCREEN_STYLES }),
428
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { className: "plv-header", children: [
429
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-logo", children: "PLASIUS" }),
430
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-project-title", children: model.projectName }),
431
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-header-actions", children: [
432
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: callbacks.onHistory, children: "History" }),
433
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: callbacks.onSettings, children: "Settings" }),
434
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: callbacks.onExport, children: "Export" }),
435
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: callbacks.onAccount, children: "Account" })
436
+ ] })
437
+ ] }),
438
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("main", { className: "plv-main-canvas", children: renderStageCanvas(model, callbacks) }),
439
+ showContextPanel ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("aside", { className: "plv-context-panel", children: [
440
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-context-title", children: "Context Panel" }),
441
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-chip-row", role: "list", "aria-label": "Prompt versions", children: model.promptVersions.map((version) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
442
+ "button",
443
+ {
444
+ type: "button",
445
+ role: "listitem",
446
+ className: version.isActive ? "is-active" : void 0,
447
+ children: version.label
448
+ },
449
+ version.id
450
+ )) }),
451
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-metadata-grid", children: [
452
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
453
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Stage" }),
454
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: stageLabel[model.stage] })
455
+ ] }),
456
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
457
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Status" }),
458
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: model.statusText })
459
+ ] }),
460
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
461
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Prompt" }),
462
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: model.prompt })
463
+ ] })
464
+ ] }),
465
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-stage-row", children: aiVideoStageFlow.map((stage) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: stage.stage === model.stage ? "is-active" : void 0, children: stage.label }, stage.stage)) })
466
+ ] }) : null,
467
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("footer", { className: "plv-prompt-area", children: [
468
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: "plv-sr-only", htmlFor: "plv-prompt-textarea", children: "Prompt input" }),
469
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
470
+ "textarea",
471
+ {
472
+ id: "plv-prompt-textarea",
473
+ value: model.prompt,
474
+ readOnly: true,
475
+ placeholder: model.promptPlaceholder,
476
+ "aria-label": "Prompt input"
477
+ }
478
+ ),
479
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "plv-prompt-actions", children: [
480
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: callbacks.onUploadImage, children: "Upload Image" }),
481
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: callbacks.onAdvanced, children: "Advanced" }),
482
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "is-generate", disabled: !model.canGenerate, onClick: callbacks.onGenerate, children: "Generate" })
483
+ ] }),
484
+ requiresMotionPrompt ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "plv-required-chip", children: "Upload Image complete. Motion prompt is required before generating." }) : null
485
+ ] })
486
+ ] });
487
+ }
488
+ var AI_VIDEO_GENERATION_SCREEN_STYLES = `
489
+ .plv-video-screen {
490
+ --plv-background: ${aiVideoGenerationTokens.color.background};
491
+ --plv-surface: ${aiVideoGenerationTokens.color.surface};
492
+ --plv-border: ${aiVideoGenerationTokens.color.borderSubtle};
493
+ --plv-text: ${aiVideoGenerationTokens.color.textPrimary};
494
+ --plv-text-muted: ${aiVideoGenerationTokens.color.textSecondary};
495
+ --plv-accent-primary: ${aiVideoGenerationTokens.color.accentPrimary};
496
+ --plv-accent-secondary: ${aiVideoGenerationTokens.color.accentSecondary};
497
+ --plv-success: ${aiVideoGenerationTokens.color.success};
498
+ --plv-warning: ${aiVideoGenerationTokens.color.warning};
499
+ --plv-error: ${aiVideoGenerationTokens.color.error};
500
+ --plv-prompt-placeholder: ${aiVideoGenerationTokens.color.placeholderText};
501
+ --plv-header-height: ${aiVideoGenerationTokens.layout.headerHeightPx}px;
502
+ --plv-transition: ${aiVideoGenerationTokens.animation.standardMs}ms ${aiVideoGenerationTokens.animation.easing};
503
+ font-family: ${aiVideoGenerationTokens.typography.bodyFontFamily};
504
+ color: var(--plv-text);
505
+ background:
506
+ radial-gradient(1200px 520px at 20% -10%, rgba(108, 92, 231, 0.22), transparent 62%),
507
+ radial-gradient(1000px 540px at 80% -20%, rgba(0, 212, 255, 0.16), transparent 60%),
508
+ var(--plv-background);
509
+ border-radius: ${aiVideoGenerationTokens.radius.panelPx}px;
510
+ border: 1px solid var(--plv-border);
511
+ overflow: hidden;
512
+ display: grid;
513
+ grid-template-rows: var(--plv-header-height) minmax(360px, 1fr) auto auto;
514
+ min-height: 820px;
515
+ }
516
+
517
+ .plv-header {
518
+ display: flex;
519
+ align-items: center;
520
+ gap: 14px;
521
+ padding: 0 16px;
522
+ border-bottom: 1px solid var(--plv-border);
523
+ background: #0f1117;
524
+ }
525
+
526
+ .plv-logo {
527
+ font-weight: 800;
528
+ letter-spacing: 0.08em;
529
+ }
530
+
531
+ .plv-project-title {
532
+ font-size: 15px;
533
+ color: var(--plv-text-muted);
534
+ }
535
+
536
+ .plv-header-actions {
537
+ margin-left: auto;
538
+ display: flex;
539
+ gap: 8px;
540
+ }
541
+
542
+ .plv-header-actions button,
543
+ .plv-player-controls button,
544
+ .plv-prompt-actions button,
545
+ .plv-chip-row button,
546
+ .plv-pill-group button,
547
+ .plv-image-overlay-controls button {
548
+ border: 1px solid var(--plv-border);
549
+ background: rgba(255, 255, 255, 0.02);
550
+ color: var(--plv-text);
551
+ border-radius: 10px;
552
+ padding: 8px 12px;
553
+ font-size: 13px;
554
+ transition: all var(--plv-transition);
555
+ }
556
+
557
+ .plv-header-actions button:hover,
558
+ .plv-player-controls button:hover,
559
+ .plv-prompt-actions button:hover,
560
+ .plv-chip-row button:hover,
561
+ .plv-pill-group button:hover,
562
+ .plv-image-overlay-controls button:hover {
563
+ border-color: rgba(0, 212, 255, 0.45);
564
+ box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.22);
565
+ }
566
+
567
+ .plv-main-canvas {
568
+ padding: 18px;
569
+ }
570
+
571
+ .plv-main-canvas h2 {
572
+ margin: 0 0 8px;
573
+ font-family: ${aiVideoGenerationTokens.typography.headingFontFamily};
574
+ font-size: ${aiVideoGenerationTokens.typography.h2Px}px;
575
+ }
576
+
577
+ .plv-muted {
578
+ margin: 0 0 14px;
579
+ color: var(--plv-text-muted);
580
+ font-size: ${aiVideoGenerationTokens.typography.smallPx}px;
581
+ }
582
+
583
+ .plv-image-grid {
584
+ display: grid;
585
+ gap: ${aiVideoGenerationTokens.layout.gridGapPx}px;
586
+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
587
+ }
588
+
589
+ .plv-image-card,
590
+ .plv-skeleton-card {
591
+ aspect-ratio: ${aiVideoGenerationTokens.layout.cardAspectRatio};
592
+ border-radius: ${aiVideoGenerationTokens.radius.cardPx}px;
593
+ position: relative;
594
+ overflow: hidden;
595
+ }
596
+
597
+ .plv-image-card {
598
+ border: 1px solid var(--plv-border);
599
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
600
+ transition: transform var(--plv-transition), box-shadow var(--plv-transition), border-color var(--plv-transition);
601
+ }
602
+
603
+ .plv-image-card:hover {
604
+ transform: scale(1.02);
605
+ border-color: rgba(0, 212, 255, 0.55);
606
+ box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48);
607
+ }
608
+
609
+ .plv-image-card.is-selected {
610
+ border: 2px solid var(--plv-accent-secondary);
611
+ box-shadow: 0 0 0 1px rgba(108, 92, 231, 0.35), 0 16px 32px rgba(0, 0, 0, 0.55);
612
+ }
613
+
614
+ .plv-image-select-hitbox {
615
+ border: 0;
616
+ margin: 0;
617
+ width: 100%;
618
+ height: 100%;
619
+ padding: 0;
620
+ background: none;
621
+ display: flex;
622
+ flex-direction: column;
623
+ justify-content: flex-end;
624
+ cursor: pointer;
625
+ }
626
+
627
+ .plv-image-media {
628
+ position: absolute;
629
+ inset: 0;
630
+ }
631
+
632
+ .plv-image-caption {
633
+ z-index: 1;
634
+ display: flex;
635
+ justify-content: space-between;
636
+ align-items: center;
637
+ gap: 8px;
638
+ padding: 10px;
639
+ background: linear-gradient(180deg, transparent 0%, rgba(15, 17, 23, 0.84) 60%);
640
+ }
641
+
642
+ .plv-chip {
643
+ font-size: 11px;
644
+ border-radius: 999px;
645
+ padding: 2px 8px;
646
+ background: rgba(0, 212, 255, 0.14);
647
+ border: 1px solid rgba(0, 212, 255, 0.36);
648
+ }
649
+
650
+ .plv-selected-checkmark {
651
+ position: absolute;
652
+ top: 10px;
653
+ right: 10px;
654
+ width: 24px;
655
+ height: 24px;
656
+ display: grid;
657
+ place-items: center;
658
+ border-radius: 999px;
659
+ color: #00121a;
660
+ background: #7ff3ff;
661
+ font-weight: 900;
662
+ }
663
+
664
+ .plv-image-overlay-controls {
665
+ position: absolute;
666
+ top: 10px;
667
+ left: 10px;
668
+ display: flex;
669
+ gap: 8px;
670
+ opacity: 0;
671
+ transform: translateY(-6px);
672
+ transition: opacity var(--plv-transition), transform var(--plv-transition);
673
+ }
674
+
675
+ .plv-image-card:hover .plv-image-overlay-controls {
676
+ opacity: 1;
677
+ transform: translateY(0);
678
+ }
679
+
680
+ .plv-skeleton-card {
681
+ background: linear-gradient(
682
+ 100deg,
683
+ rgba(255, 255, 255, 0.03) 20%,
684
+ rgba(255, 255, 255, 0.14) 40%,
685
+ rgba(255, 255, 255, 0.03) 60%
686
+ );
687
+ background-size: 200% 100%;
688
+ animation: plv-shimmer 1.25s linear infinite;
689
+ }
690
+
691
+ .plv-split-panel {
692
+ display: grid;
693
+ grid-template-columns: 1.1fr 0.9fr;
694
+ gap: 16px;
695
+ }
696
+
697
+ .plv-preview-box,
698
+ .plv-motion-panel,
699
+ .plv-progress-panel,
700
+ .plv-player-shell,
701
+ .plv-voiceover-panel,
702
+ .plv-idle-canvas,
703
+ .plv-context-panel,
704
+ .plv-prompt-area {
705
+ background: var(--plv-surface);
706
+ border: 1px solid var(--plv-border);
707
+ border-radius: ${aiVideoGenerationTokens.radius.panelPx}px;
708
+ }
709
+
710
+ .plv-preview-box,
711
+ .plv-motion-panel {
712
+ padding: 14px;
713
+ }
714
+
715
+ .plv-preview-title {
716
+ font-size: ${aiVideoGenerationTokens.typography.smallPx}px;
717
+ text-transform: uppercase;
718
+ letter-spacing: 0.08em;
719
+ color: var(--plv-text-muted);
720
+ margin-bottom: 10px;
721
+ }
722
+
723
+ .plv-preview-media {
724
+ width: 100%;
725
+ aspect-ratio: ${aiVideoGenerationTokens.layout.cardAspectRatio};
726
+ border-radius: ${aiVideoGenerationTokens.radius.cardPx}px;
727
+ background: linear-gradient(135deg, #2d3e67 0%, #6c5ce7 45%, #00d4ff 100%);
728
+ }
729
+
730
+ .plv-motion-panel label {
731
+ display: block;
732
+ font-size: ${aiVideoGenerationTokens.typography.smallPx}px;
733
+ color: var(--plv-text-muted);
734
+ margin-bottom: 10px;
735
+ }
736
+
737
+ .plv-motion-panel textarea,
738
+ .plv-voiceover-panel textarea {
739
+ width: 100%;
740
+ margin-top: 6px;
741
+ border: 1px solid var(--plv-border);
742
+ border-radius: 10px;
743
+ min-height: 62px;
744
+ resize: none;
745
+ background: rgba(255, 255, 255, 0.02);
746
+ color: var(--plv-text);
747
+ padding: 10px;
748
+ font-family: ${aiVideoGenerationTokens.typography.bodyFontFamily};
749
+ }
750
+
751
+ .plv-progress-panel {
752
+ margin-top: 16px;
753
+ padding: 12px 14px;
754
+ }
755
+
756
+ .plv-progress-topline {
757
+ display: flex;
758
+ justify-content: space-between;
759
+ font-size: ${aiVideoGenerationTokens.typography.smallPx}px;
760
+ margin-bottom: 8px;
761
+ }
762
+
763
+ .plv-progress-track {
764
+ height: 8px;
765
+ border-radius: 999px;
766
+ background: rgba(255, 255, 255, 0.08);
767
+ overflow: hidden;
768
+ }
769
+
770
+ .plv-progress-fill {
771
+ height: 100%;
772
+ background: linear-gradient(135deg, var(--plv-accent-primary), var(--plv-accent-secondary));
773
+ transition: width var(--plv-transition);
774
+ }
775
+
776
+ .plv-waveform {
777
+ margin-top: 10px;
778
+ height: 32px;
779
+ border-radius: 10px;
780
+ background:
781
+ repeating-linear-gradient(
782
+ 90deg,
783
+ rgba(108, 92, 231, 0.24) 0,
784
+ rgba(108, 92, 231, 0.24) 4px,
785
+ rgba(0, 212, 255, 0.28) 4px,
786
+ rgba(0, 212, 255, 0.28) 8px
787
+ );
788
+ animation: plv-wave 1.2s linear infinite;
789
+ }
790
+
791
+ .plv-waveform.is-voiceover {
792
+ height: 46px;
793
+ }
794
+
795
+ .plv-player-shell {
796
+ padding: 14px;
797
+ }
798
+
799
+ .plv-player-frame {
800
+ position: relative;
801
+ aspect-ratio: ${aiVideoGenerationTokens.layout.cardAspectRatio};
802
+ background: #020202;
803
+ border-radius: ${aiVideoGenerationTokens.radius.cardPx}px;
804
+ overflow: hidden;
805
+ }
806
+
807
+ .plv-player-glow {
808
+ position: absolute;
809
+ inset: -20%;
810
+ background: radial-gradient(circle at center, rgba(0, 212, 255, 0.26), transparent 60%);
811
+ }
812
+
813
+ .plv-player-screen {
814
+ position: absolute;
815
+ inset: 0;
816
+ display: grid;
817
+ place-items: center;
818
+ color: rgba(230, 234, 242, 0.74);
819
+ font-size: 15px;
820
+ }
821
+
822
+ .plv-player-controls {
823
+ margin-top: 12px;
824
+ display: grid;
825
+ grid-template-columns: repeat(6, minmax(0, 1fr));
826
+ gap: 8px;
827
+ }
828
+
829
+ .plv-voiceover-panel {
830
+ margin-top: 14px;
831
+ padding: 14px;
832
+ animation: plv-slide-up var(--plv-transition);
833
+ }
834
+
835
+ .plv-voice-grid {
836
+ margin-top: 10px;
837
+ display: grid;
838
+ gap: 10px;
839
+ }
840
+
841
+ .plv-pill-group {
842
+ display: flex;
843
+ flex-wrap: wrap;
844
+ gap: 8px;
845
+ }
846
+
847
+ .plv-pill-group .is-active,
848
+ .plv-chip-row .is-active {
849
+ border-color: rgba(0, 212, 255, 0.6);
850
+ box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.24);
851
+ }
852
+
853
+ .plv-field-label {
854
+ font-size: ${aiVideoGenerationTokens.typography.smallPx}px;
855
+ color: var(--plv-text-muted);
856
+ margin-bottom: 6px;
857
+ }
858
+
859
+ .plv-slider-track {
860
+ height: 8px;
861
+ border-radius: 999px;
862
+ background: linear-gradient(135deg, rgba(108, 92, 231, 0.7), rgba(0, 212, 255, 0.7));
863
+ }
864
+
865
+ .plv-export-modal {
866
+ margin-top: 14px;
867
+ padding: 14px;
868
+ border-radius: ${aiVideoGenerationTokens.radius.panelPx}px;
869
+ border: 1px solid rgba(255, 176, 32, 0.4);
870
+ background: rgba(255, 176, 32, 0.08);
871
+ }
872
+
873
+ .plv-export-modal h3 {
874
+ margin: 0 0 6px;
875
+ font-size: 18px;
876
+ }
877
+
878
+ .plv-export-modal p {
879
+ margin: 0 0 10px;
880
+ color: var(--plv-text-muted);
881
+ font-size: ${aiVideoGenerationTokens.typography.smallPx}px;
882
+ }
883
+
884
+ .plv-export-modal button {
885
+ border: 0;
886
+ border-radius: 10px;
887
+ background: linear-gradient(135deg, #ffb020, #ffd386);
888
+ color: #161a23;
889
+ font-weight: 700;
890
+ padding: 8px 12px;
891
+ }
892
+
893
+ .plv-idle-canvas {
894
+ min-height: 180px;
895
+ display: grid;
896
+ place-items: center;
897
+ gap: 10px;
898
+ padding: 16px;
899
+ }
900
+
901
+ .plv-upload-chip,
902
+ .plv-required-chip {
903
+ border-radius: 999px;
904
+ padding: 8px 12px;
905
+ font-size: ${aiVideoGenerationTokens.typography.smallPx}px;
906
+ }
907
+
908
+ .plv-upload-chip {
909
+ background: rgba(255, 255, 255, 0.04);
910
+ border: 1px solid var(--plv-border);
911
+ }
912
+
913
+ .plv-required-chip {
914
+ background: rgba(255, 176, 32, 0.12);
915
+ border: 1px solid rgba(255, 176, 32, 0.4);
916
+ color: #ffd18a;
917
+ }
918
+
919
+ .plv-context-panel {
920
+ margin: 0 18px 16px;
921
+ padding: 14px;
922
+ }
923
+
924
+ .plv-context-title {
925
+ margin-bottom: 10px;
926
+ font-size: ${aiVideoGenerationTokens.typography.smallPx}px;
927
+ text-transform: uppercase;
928
+ letter-spacing: 0.08em;
929
+ color: var(--plv-text-muted);
930
+ }
931
+
932
+ .plv-chip-row {
933
+ display: flex;
934
+ gap: 8px;
935
+ flex-wrap: wrap;
936
+ }
937
+
938
+ .plv-metadata-grid {
939
+ margin-top: 12px;
940
+ display: grid;
941
+ gap: 8px;
942
+ grid-template-columns: repeat(3, minmax(0, 1fr));
943
+ }
944
+
945
+ .plv-metadata-grid div {
946
+ display: grid;
947
+ gap: 4px;
948
+ }
949
+
950
+ .plv-metadata-grid span {
951
+ font-size: ${aiVideoGenerationTokens.typography.smallPx}px;
952
+ color: var(--plv-text-muted);
953
+ }
954
+
955
+ .plv-metadata-grid strong {
956
+ font-size: 14px;
957
+ line-height: 1.35;
958
+ }
959
+
960
+ .plv-stage-row {
961
+ margin-top: 10px;
962
+ display: flex;
963
+ gap: 8px;
964
+ flex-wrap: wrap;
965
+ }
966
+
967
+ .plv-stage-row span {
968
+ border-radius: 999px;
969
+ padding: 5px 10px;
970
+ border: 1px solid var(--plv-border);
971
+ color: var(--plv-text-muted);
972
+ font-size: 12px;
973
+ }
974
+
975
+ .plv-stage-row .is-active {
976
+ color: var(--plv-text);
977
+ border-color: rgba(0, 212, 255, 0.55);
978
+ }
979
+
980
+ .plv-prompt-area {
981
+ margin: 0 18px 18px;
982
+ padding: 14px;
983
+ }
984
+
985
+ .plv-prompt-area textarea {
986
+ width: 100%;
987
+ min-height: ${aiVideoGenerationTokens.layout.promptBarMinHeightPx}px;
988
+ border: 1px solid var(--plv-border);
989
+ border-radius: ${aiVideoGenerationTokens.radius.promptPx}px;
990
+ background: rgba(255, 255, 255, 0.02);
991
+ color: var(--plv-text);
992
+ font-family: ${aiVideoGenerationTokens.typography.bodyFontFamily};
993
+ font-size: 17px;
994
+ line-height: 1.45;
995
+ padding: 12px;
996
+ resize: vertical;
997
+ }
998
+
999
+ .plv-prompt-area textarea::placeholder {
1000
+ color: var(--plv-prompt-placeholder);
1001
+ }
1002
+
1003
+ .plv-prompt-actions {
1004
+ margin-top: 10px;
1005
+ display: flex;
1006
+ gap: 8px;
1007
+ align-items: center;
1008
+ }
1009
+
1010
+ .plv-prompt-actions .is-generate {
1011
+ margin-left: auto;
1012
+ border: 0;
1013
+ background: linear-gradient(135deg, #6c5ce7, #00d4ff);
1014
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 212, 255, 0.22);
1015
+ }
1016
+
1017
+ .plv-prompt-actions .is-generate:hover {
1018
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 14px 34px rgba(0, 212, 255, 0.34);
1019
+ }
1020
+
1021
+ .plv-prompt-actions .is-generate:disabled {
1022
+ opacity: 0.4;
1023
+ cursor: not-allowed;
1024
+ }
1025
+
1026
+ .plv-sr-only {
1027
+ position: absolute;
1028
+ width: 1px;
1029
+ height: 1px;
1030
+ margin: -1px;
1031
+ padding: 0;
1032
+ overflow: hidden;
1033
+ clip: rect(0, 0, 0, 0);
1034
+ border: 0;
1035
+ }
1036
+
1037
+ .plv-reduce-motion * {
1038
+ animation: none !important;
1039
+ transition: none !important;
1040
+ }
1041
+
1042
+ @media (max-width: 1024px) {
1043
+ .plv-video-screen {
1044
+ min-height: 920px;
1045
+ }
1046
+
1047
+ .plv-split-panel {
1048
+ grid-template-columns: 1fr;
1049
+ }
1050
+
1051
+ .plv-player-controls {
1052
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1053
+ }
1054
+
1055
+ .plv-metadata-grid {
1056
+ grid-template-columns: 1fr;
1057
+ }
1058
+ }
1059
+
1060
+ @media (max-width: 720px) {
1061
+ .plv-header {
1062
+ flex-wrap: wrap;
1063
+ height: auto;
1064
+ min-height: var(--plv-header-height);
1065
+ padding-top: 10px;
1066
+ padding-bottom: 10px;
1067
+ }
1068
+
1069
+ .plv-header-actions {
1070
+ width: 100%;
1071
+ justify-content: space-between;
1072
+ }
1073
+
1074
+ .plv-image-grid {
1075
+ grid-template-columns: 1fr;
1076
+ }
1077
+
1078
+ .plv-prompt-actions {
1079
+ flex-wrap: wrap;
1080
+ }
1081
+
1082
+ .plv-prompt-actions .is-generate {
1083
+ margin-left: 0;
1084
+ width: 100%;
1085
+ }
1086
+ }
1087
+
1088
+ @keyframes plv-shimmer {
1089
+ from {
1090
+ background-position: 120% 0;
1091
+ }
1092
+ to {
1093
+ background-position: -120% 0;
1094
+ }
1095
+ }
1096
+
1097
+ @keyframes plv-wave {
1098
+ from {
1099
+ background-position: 0 0;
1100
+ }
1101
+ to {
1102
+ background-position: 64px 0;
1103
+ }
1104
+ }
1105
+
1106
+ @keyframes plv-slide-up {
1107
+ from {
1108
+ opacity: 0;
1109
+ transform: translateY(10px);
1110
+ }
1111
+ to {
1112
+ opacity: 1;
1113
+ transform: translateY(0);
1114
+ }
1115
+ }
1116
+ `;
1117
+
1118
+ // src/ai-video-generation/demo.tsx
1119
+ var import_react = require("react");
1120
+ var import_jsx_runtime2 = require("react/jsx-runtime");
1121
+ function AIVideoGenerationStudioDemo({
1122
+ initialStage = "idle"
1123
+ }) {
1124
+ const [stage, setStage] = (0, import_react.useState)(initialStage);
1125
+ const model = (0, import_react.useMemo)(() => createAIVideoGenerationDemoModel(stage), [stage]);
1126
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "grid", gap: "12px" }, children: [
1127
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1128
+ "div",
1129
+ {
1130
+ role: "group",
1131
+ "aria-label": "Stage selector",
1132
+ style: {
1133
+ display: "flex",
1134
+ flexWrap: "wrap",
1135
+ gap: "8px"
1136
+ },
1137
+ children: aiVideoStageFlow.map((item) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1138
+ "button",
1139
+ {
1140
+ type: "button",
1141
+ onClick: () => setStage(item.stage),
1142
+ style: {
1143
+ borderRadius: "999px",
1144
+ border: "1px solid rgba(255,255,255,0.14)",
1145
+ color: stage === item.stage ? "#0F1117" : "#E6EAF2",
1146
+ background: stage === item.stage ? "#00D4FF" : "rgba(255,255,255,0.04)",
1147
+ padding: "6px 10px",
1148
+ fontSize: "12px",
1149
+ cursor: "pointer"
1150
+ },
1151
+ children: item.label
1152
+ },
1153
+ item.stage
1154
+ ))
1155
+ }
1156
+ ),
1157
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1158
+ AIVideoGenerationScreen,
1159
+ {
1160
+ model,
1161
+ onGenerate: () => {
1162
+ setStage("generatingImages");
1163
+ },
1164
+ onUseForVideo: () => {
1165
+ setStage("generatingVideo");
1166
+ },
1167
+ onAddVoiceover: () => {
1168
+ setStage("voiceover");
1169
+ },
1170
+ onRegenerateVideo: () => {
1171
+ setStage("generatingVideo");
1172
+ },
1173
+ onExport: () => {
1174
+ setStage("export");
1175
+ }
1176
+ }
1177
+ )
1178
+ ] });
1179
+ }
1180
+
1181
+ // src/index.ts
26
1182
  var videoPackageInfo = {
27
1183
  name: "@plasius/video",
28
- version: "0.1.1"
1184
+ version: "0.1.2"
29
1185
  };
30
1186
  // Annotate the CommonJS export names for ESM import in node:
31
1187
  0 && (module.exports = {
1188
+ AIVideoGenerationScreen,
1189
+ AIVideoGenerationStudioDemo,
1190
+ AI_VIDEO_GENERATION_SCREEN_STYLES,
1191
+ aiVideoGenerationTokens,
1192
+ aiVideoStageFlow,
1193
+ createAIVideoGenerationDemoModel,
32
1194
  videoPackageInfo
33
1195
  });
34
1196
  //# sourceMappingURL=index.cjs.map