@vibeframe/cli 0.115.6 → 0.115.8
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/commands/_shared/edit/jump-cut.d.ts +2 -2
- package/dist/commands/_shared/image-jobs.d.ts +21 -0
- package/dist/commands/_shared/openai-image.d.ts +3 -36
- package/dist/commands/_shared/scene-inspect.d.ts +0 -1
- package/dist/commands/_shared/scene-render.d.ts +3 -9
- package/dist/commands/_shared/transcription.d.ts +16 -0
- package/dist/commands/_shared/translate-texts.d.ts +30 -0
- package/dist/commands/_shared/tts-resolve.d.ts +7 -1
- package/dist/commands/ai-analyze.d.ts +1 -3
- package/dist/commands/ai-audio.d.ts +24 -0
- package/dist/commands/ai-helpers.d.ts +0 -8
- package/dist/commands/ai-image.d.ts +19 -7
- package/dist/commands/edit/lottie-overlay.d.ts +76 -0
- package/dist/commands/edit/lottie-overlay.test.d.ts +1 -0
- package/dist/commands/edit/motion-overlay.d.ts +6 -1
- package/dist/commands/generate/image.d.ts +4 -3
- package/dist/commands/generate/music.d.ts +5 -0
- package/dist/commands/generate/sound-effect.d.ts +7 -1
- package/dist/commands/generate/speech.d.ts +12 -3
- package/dist/commands/generate.d.ts +0 -2
- package/dist/commands/output.d.ts +0 -3
- package/dist/commands/sanitize.d.ts +0 -5
- package/dist/commands/validate.d.ts +0 -11
- package/dist/config/index.d.ts +0 -9
- package/dist/index.js +5487 -6932
- package/dist/pipeline/executor.d.ts +0 -1
- package/dist/pipeline/renderers/chrome.d.ts +3 -4
- package/dist/tools/manifest/audio.d.ts +4 -1
- package/dist/tools/manifest/edit.d.ts +20 -17
- package/dist/tools/manifest/generate.d.ts +15 -6
- package/dist/tools/manifest/index.js +6969 -8211
- package/dist/tools/manifest/inspect.d.ts +4 -4
- package/dist/tools/manifest/remix.d.ts +4 -4
- package/dist/tools/manifest/scene.d.ts +8 -8
- package/dist/tools/manifest/timeline.d.ts +2 -2
- package/dist/utils/audio-file.d.ts +7 -0
- package/dist/utils/audio.d.ts +0 -10
- package/dist/utils/input-validation.d.ts +0 -5
- package/dist/utils/remotion.d.ts +0 -14
- package/dist/utils/tty.d.ts +0 -8
- package/package.json +4 -6
- package/dist/pipeline/renderers/html-clips.d.ts +0 -19
- package/dist/pipeline/renderers/html-runtime.d.ts +0 -6
- package/dist/pipeline/renderers/html-template.d.ts +0 -2
- package/dist/pipeline/renderers/hyperframes.d.ts +0 -7
- package/dist/pipeline/renderers/project-builder.d.ts +0 -7
- package/dist/pipeline/renderers/types.d.ts +0 -39
- /package/dist/{pipeline/renderers/__tests__/html-template.test.d.ts → commands/_shared/translate-texts.test.d.ts} +0 -0
- /package/dist/{pipeline/renderers/__tests__/integration.test.d.ts → commands/edit/lottie-overlay.integration.test.d.ts} +0 -0
|
@@ -35,18 +35,18 @@ export declare const inspectRenderTool: import("../define-tool.js").ToolDefiniti
|
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
36
|
dryRun?: boolean | undefined;
|
|
37
37
|
outputPath?: string | undefined;
|
|
38
|
+
model?: "flash" | "pro" | "latest" | "flash-3" | "flash-2.5" | "pro-3.1" | undefined;
|
|
38
39
|
beat?: string | undefined;
|
|
39
40
|
projectDir?: string | undefined;
|
|
40
|
-
model?: "latest" | "flash" | "pro" | "flash-3" | "flash-2.5" | "pro-3.1" | undefined;
|
|
41
41
|
videoPath?: string | undefined;
|
|
42
42
|
report?: boolean | undefined;
|
|
43
43
|
ai?: boolean | undefined;
|
|
44
44
|
}, {
|
|
45
45
|
dryRun?: boolean | undefined;
|
|
46
46
|
outputPath?: string | undefined;
|
|
47
|
+
model?: "flash" | "pro" | "latest" | "flash-3" | "flash-2.5" | "pro-3.1" | undefined;
|
|
47
48
|
beat?: string | undefined;
|
|
48
49
|
projectDir?: string | undefined;
|
|
49
|
-
model?: "latest" | "flash" | "pro" | "flash-3" | "flash-2.5" | "pro-3.1" | undefined;
|
|
50
50
|
videoPath?: string | undefined;
|
|
51
51
|
report?: boolean | undefined;
|
|
52
52
|
ai?: boolean | undefined;
|
|
@@ -64,16 +64,16 @@ export declare const analyzeMediaTool: import("../define-tool.js").ToolDefinitio
|
|
|
64
64
|
prompt: string;
|
|
65
65
|
fps?: number | undefined;
|
|
66
66
|
end?: number | undefined;
|
|
67
|
+
model?: "flash" | "pro" | "latest" | "flash-3" | "flash-2.5" | "pro-3.1" | undefined;
|
|
67
68
|
start?: number | undefined;
|
|
68
|
-
model?: "latest" | "flash" | "pro" | "flash-3" | "flash-2.5" | "pro-3.1" | undefined;
|
|
69
69
|
lowRes?: boolean | undefined;
|
|
70
70
|
}, {
|
|
71
71
|
source: string;
|
|
72
72
|
prompt: string;
|
|
73
73
|
fps?: number | undefined;
|
|
74
74
|
end?: number | undefined;
|
|
75
|
+
model?: "flash" | "pro" | "latest" | "flash-3" | "flash-2.5" | "pro-3.1" | undefined;
|
|
75
76
|
start?: number | undefined;
|
|
76
|
-
model?: "latest" | "flash" | "pro" | "flash-3" | "flash-2.5" | "pro-3.1" | undefined;
|
|
77
77
|
lowRes?: boolean | undefined;
|
|
78
78
|
}>>;
|
|
79
79
|
export declare const analyzeSuggestTool: import("../define-tool.js").ToolDefinition<z.ZodObject<{
|
|
@@ -29,8 +29,8 @@ export declare const pipelineHighlightsTool: import("../define-tool.js").ToolDef
|
|
|
29
29
|
duration?: number | undefined;
|
|
30
30
|
output?: string | undefined;
|
|
31
31
|
count?: number | undefined;
|
|
32
|
-
language?: string | undefined;
|
|
33
32
|
useGemini?: boolean | undefined;
|
|
33
|
+
language?: string | undefined;
|
|
34
34
|
threshold?: number | undefined;
|
|
35
35
|
criteria?: "all" | "emotional" | "informative" | "funny" | undefined;
|
|
36
36
|
lowRes?: boolean | undefined;
|
|
@@ -40,8 +40,8 @@ export declare const pipelineHighlightsTool: import("../define-tool.js").ToolDef
|
|
|
40
40
|
duration?: number | undefined;
|
|
41
41
|
output?: string | undefined;
|
|
42
42
|
count?: number | undefined;
|
|
43
|
-
language?: string | undefined;
|
|
44
43
|
useGemini?: boolean | undefined;
|
|
44
|
+
language?: string | undefined;
|
|
45
45
|
threshold?: number | undefined;
|
|
46
46
|
criteria?: "all" | "emotional" | "informative" | "funny" | undefined;
|
|
47
47
|
lowRes?: boolean | undefined;
|
|
@@ -63,9 +63,9 @@ export declare const pipelineAutoShortsTool: import("../define-tool.js").ToolDef
|
|
|
63
63
|
duration?: number | undefined;
|
|
64
64
|
count?: number | undefined;
|
|
65
65
|
aspect?: "9:16" | "1:1" | undefined;
|
|
66
|
-
language?: string | undefined;
|
|
67
66
|
analyzeOnly?: boolean | undefined;
|
|
68
67
|
useGemini?: boolean | undefined;
|
|
68
|
+
language?: string | undefined;
|
|
69
69
|
outputDir?: string | undefined;
|
|
70
70
|
lowRes?: boolean | undefined;
|
|
71
71
|
addCaptions?: boolean | undefined;
|
|
@@ -75,9 +75,9 @@ export declare const pipelineAutoShortsTool: import("../define-tool.js").ToolDef
|
|
|
75
75
|
duration?: number | undefined;
|
|
76
76
|
count?: number | undefined;
|
|
77
77
|
aspect?: "9:16" | "1:1" | undefined;
|
|
78
|
-
language?: string | undefined;
|
|
79
78
|
analyzeOnly?: boolean | undefined;
|
|
80
79
|
useGemini?: boolean | undefined;
|
|
80
|
+
language?: string | undefined;
|
|
81
81
|
outputDir?: string | undefined;
|
|
82
82
|
lowRes?: boolean | undefined;
|
|
83
83
|
addCaptions?: boolean | undefined;
|
|
@@ -38,7 +38,7 @@ export declare const sceneAddTool: import("../define-tool.js").ToolDefinition<z.
|
|
|
38
38
|
projectDir: z.ZodOptional<z.ZodString>;
|
|
39
39
|
insertInto: z.ZodOptional<z.ZodString>;
|
|
40
40
|
syncStoryboard: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
-
imageProvider: z.ZodOptional<z.ZodEnum<["gemini", "openai"]>>;
|
|
41
|
+
imageProvider: z.ZodOptional<z.ZodEnum<["gemini", "openai", "grok"]>>;
|
|
42
42
|
voice: z.ZodOptional<z.ZodString>;
|
|
43
43
|
skipAudio: z.ZodOptional<z.ZodBoolean>;
|
|
44
44
|
skipImage: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -53,7 +53,7 @@ export declare const sceneAddTool: import("../define-tool.js").ToolDefinition<z.
|
|
|
53
53
|
headline?: string | undefined;
|
|
54
54
|
projectDir?: string | undefined;
|
|
55
55
|
force?: boolean | undefined;
|
|
56
|
-
imageProvider?: "openai" | "gemini" | undefined;
|
|
56
|
+
imageProvider?: "openai" | "gemini" | "grok" | undefined;
|
|
57
57
|
visuals?: string | undefined;
|
|
58
58
|
insertInto?: string | undefined;
|
|
59
59
|
syncStoryboard?: boolean | undefined;
|
|
@@ -69,7 +69,7 @@ export declare const sceneAddTool: import("../define-tool.js").ToolDefinition<z.
|
|
|
69
69
|
headline?: string | undefined;
|
|
70
70
|
projectDir?: string | undefined;
|
|
71
71
|
force?: boolean | undefined;
|
|
72
|
-
imageProvider?: "openai" | "gemini" | undefined;
|
|
72
|
+
imageProvider?: "openai" | "gemini" | "grok" | undefined;
|
|
73
73
|
visuals?: string | undefined;
|
|
74
74
|
insertInto?: string | undefined;
|
|
75
75
|
syncStoryboard?: boolean | undefined;
|
|
@@ -149,7 +149,7 @@ export declare const sceneBuildTool: import("../define-tool.js").ToolDefinition<
|
|
|
149
149
|
skipRender: z.ZodOptional<z.ZodBoolean>;
|
|
150
150
|
ttsProvider: z.ZodOptional<z.ZodEnum<["auto", "elevenlabs", "openai", "kokoro"]>>;
|
|
151
151
|
voice: z.ZodOptional<z.ZodString>;
|
|
152
|
-
imageProvider: z.ZodOptional<z.ZodEnum<["openai"]>>;
|
|
152
|
+
imageProvider: z.ZodOptional<z.ZodEnum<["openai", "gemini", "grok"]>>;
|
|
153
153
|
videoProvider: z.ZodOptional<z.ZodEnum<["seedance", "grok", "kling", "runway", "omni", "veo"]>>;
|
|
154
154
|
musicProvider: z.ZodOptional<z.ZodEnum<["elevenlabs", "replicate"]>>;
|
|
155
155
|
imageQuality: z.ZodOptional<z.ZodEnum<["standard", "hd"]>>;
|
|
@@ -168,7 +168,7 @@ export declare const sceneBuildTool: import("../define-tool.js").ToolDefinition<
|
|
|
168
168
|
skipNarration?: boolean | undefined;
|
|
169
169
|
skipBackdrop?: boolean | undefined;
|
|
170
170
|
skipRender?: boolean | undefined;
|
|
171
|
-
imageProvider?: "openai" | undefined;
|
|
171
|
+
imageProvider?: "openai" | "gemini" | "grok" | undefined;
|
|
172
172
|
imageModel?: string | undefined;
|
|
173
173
|
ttsProvider?: "openai" | "elevenlabs" | "auto" | "kokoro" | undefined;
|
|
174
174
|
skipVideo?: boolean | undefined;
|
|
@@ -189,7 +189,7 @@ export declare const sceneBuildTool: import("../define-tool.js").ToolDefinition<
|
|
|
189
189
|
skipNarration?: boolean | undefined;
|
|
190
190
|
skipBackdrop?: boolean | undefined;
|
|
191
191
|
skipRender?: boolean | undefined;
|
|
192
|
-
imageProvider?: "openai" | undefined;
|
|
192
|
+
imageProvider?: "openai" | "gemini" | "grok" | undefined;
|
|
193
193
|
imageModel?: string | undefined;
|
|
194
194
|
ttsProvider?: "openai" | "elevenlabs" | "auto" | "kokoro" | undefined;
|
|
195
195
|
skipVideo?: boolean | undefined;
|
|
@@ -208,13 +208,13 @@ export declare const sceneInstallSkillTool: import("../define-tool.js").ToolDefi
|
|
|
208
208
|
}, "strip", z.ZodTypeAny, {
|
|
209
209
|
projectDir: string;
|
|
210
210
|
dryRun?: boolean | undefined;
|
|
211
|
-
global?: boolean | undefined;
|
|
212
211
|
force?: boolean | undefined;
|
|
212
|
+
global?: boolean | undefined;
|
|
213
213
|
}, {
|
|
214
214
|
projectDir: string;
|
|
215
215
|
dryRun?: boolean | undefined;
|
|
216
|
-
global?: boolean | undefined;
|
|
217
216
|
force?: boolean | undefined;
|
|
217
|
+
global?: boolean | undefined;
|
|
218
218
|
}>>;
|
|
219
219
|
export declare const sceneComposePromptsTool: import("../define-tool.js").ToolDefinition<z.ZodObject<{
|
|
220
220
|
projectDir: z.ZodString;
|
|
@@ -31,13 +31,13 @@ export declare const timelineAddSourceTool: import("../define-tool.js").ToolDefi
|
|
|
31
31
|
name: z.ZodOptional<z.ZodString>;
|
|
32
32
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
33
33
|
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
projectPath: string;
|
|
35
34
|
mediaPath: string;
|
|
35
|
+
projectPath: string;
|
|
36
36
|
name?: string | undefined;
|
|
37
37
|
duration?: number | undefined;
|
|
38
38
|
}, {
|
|
39
|
-
projectPath: string;
|
|
40
39
|
mediaPath: string;
|
|
40
|
+
projectPath: string;
|
|
41
41
|
name?: string | undefined;
|
|
42
42
|
duration?: number | undefined;
|
|
43
43
|
}>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Write audio to the path a caller asked for, converting when the path's
|
|
3
|
+
* extension does not match the bytes' container (Kokoro speaks WAV; a user
|
|
4
|
+
* may ask for `narration.mp3`).
|
|
5
|
+
*/
|
|
6
|
+
/** Save `bytes` (in `container`, e.g. "mp3") to `path`, transcoding with ffmpeg if the extension differs. */
|
|
7
|
+
export declare function writeAudioFile(path: string, bytes: Uint8Array, container: string): Promise<void>;
|
package/dist/utils/audio.d.ts
CHANGED
|
@@ -10,13 +10,3 @@ export declare function getAudioDuration(filePath: string): Promise<number>;
|
|
|
10
10
|
* @returns Duration in seconds
|
|
11
11
|
*/
|
|
12
12
|
export declare function getVideoDuration(filePath: string): Promise<number>;
|
|
13
|
-
/**
|
|
14
|
-
* Extend a video naturally to match target duration using progressive techniques.
|
|
15
|
-
* Uses slowdown, frame interpolation, and freeze frames based on extension ratio.
|
|
16
|
-
*
|
|
17
|
-
* @param videoPath - Path to the source video
|
|
18
|
-
* @param targetDuration - Target duration in seconds
|
|
19
|
-
* @param outputPath - Path for the extended video output
|
|
20
|
-
* @returns Promise that resolves when extension is complete
|
|
21
|
-
*/
|
|
22
|
-
export declare function extendVideoNaturally(videoPath: string, targetDuration: number, outputPath: string): Promise<void>;
|
|
@@ -19,8 +19,3 @@ export declare function validateSafePath(inputPath: string, sandbox?: string): s
|
|
|
19
19
|
* Allows absolute paths (user-specified like /tmp/output.mp4).
|
|
20
20
|
*/
|
|
21
21
|
export declare function validateOutputPath(outputPath: string): string;
|
|
22
|
-
/**
|
|
23
|
-
* Validate a user-provided string (prompt text, etc.) for sanity.
|
|
24
|
-
* Rejects control chars and caps length to prevent context abuse.
|
|
25
|
-
*/
|
|
26
|
-
export declare function validateTextInput(value: string, fieldName?: string, maxLength?: number): string;
|
package/dist/utils/remotion.d.ts
CHANGED
|
@@ -58,20 +58,6 @@ export declare function scaffoldRemotionProject(componentCode: string, component
|
|
|
58
58
|
* When opaque: renders H264 MP4.
|
|
59
59
|
*/
|
|
60
60
|
export declare function renderMotion(options: RenderMotionOptions): Promise<RenderResult>;
|
|
61
|
-
/**
|
|
62
|
-
* Validates and auto-fixes common LLM-generated Remotion code bugs before
|
|
63
|
-
* attempting to render. Returns fixed code and a list of applied fixes.
|
|
64
|
-
*
|
|
65
|
-
* Known patterns fixed:
|
|
66
|
-
* 1. interpolate(x, [a,b], scalar, num) → interpolate(x, [a,b], [scalar, num])
|
|
67
|
-
* Cause: outputRange must be an array, not a bare scalar.
|
|
68
|
-
* 2. interpolate(x, [a,b], scalar) where scalar is a variable name
|
|
69
|
-
* Cause: same — LLM passes a single number variable instead of [from, to].
|
|
70
|
-
*/
|
|
71
|
-
export declare function validateAndFixMotionCode(code: string): {
|
|
72
|
-
code: string;
|
|
73
|
-
fixes: string[];
|
|
74
|
-
};
|
|
75
61
|
/**
|
|
76
62
|
* Wrap an overlay component to embed a static image as background.
|
|
77
63
|
* Uses Remotion's <Img> component (required per Remotion docs — ensures
|
package/dist/utils/tty.d.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* TTY Input Utilities
|
|
3
3
|
* Handles stdin fallback to /dev/tty for piped environments
|
|
4
4
|
*/
|
|
5
|
-
import { Interface } from "node:readline";
|
|
6
5
|
import { ReadStream } from "node:tty";
|
|
7
6
|
export declare function fitOptionToLine(value: string, prefixColumns: number): string;
|
|
8
7
|
/**
|
|
@@ -18,13 +17,6 @@ export declare function hasTTY(): boolean;
|
|
|
18
17
|
* Close the TTY stream if we opened one
|
|
19
18
|
*/
|
|
20
19
|
export declare function closeTTYStream(): void;
|
|
21
|
-
/**
|
|
22
|
-
* Create a readline interface with TTY support
|
|
23
|
-
*/
|
|
24
|
-
export declare function createTTYInterface(options?: {
|
|
25
|
-
prompt?: string;
|
|
26
|
-
historySize?: number;
|
|
27
|
-
}): Interface;
|
|
28
20
|
/**
|
|
29
21
|
* Prompt for input (single line)
|
|
30
22
|
* Throws in non-TTY environments to prevent hanging.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibeframe/cli",
|
|
3
|
-
"version": "0.115.
|
|
3
|
+
"version": "0.115.8",
|
|
4
4
|
"description": "Frontier AI video generation for coding agents - Seedance, Runway, Veo, and Kling on your own keys, behind a hard cost cap",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@anthropic-ai/sdk": "^0.39.0",
|
|
70
70
|
"@google/generative-ai": "^0.21.0",
|
|
71
71
|
"@hyperframes/producer": "^0.7.71",
|
|
72
|
-
"@lottiefiles/dotlottie-
|
|
72
|
+
"@lottiefiles/dotlottie-web": "0.71.0",
|
|
73
73
|
"chalk": "^5.3.0",
|
|
74
74
|
"commander": "^12.0.0",
|
|
75
75
|
"dotenv": "^17.2.3",
|
|
@@ -85,14 +85,12 @@
|
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@types/node": "^20.11.0",
|
|
88
|
-
"@vitest/coverage-v8": "1",
|
|
89
|
-
"@webgpu/types": "^0.1.69",
|
|
90
88
|
"esbuild": "^0.24.0",
|
|
91
89
|
"tsx": "^4.21.0",
|
|
92
90
|
"typescript": "^5.3.3",
|
|
93
91
|
"vitest": "^1.2.2",
|
|
94
|
-
"@vibeframe/ai-providers": "0.115.
|
|
95
|
-
"@vibeframe/core": "0.115.
|
|
92
|
+
"@vibeframe/ai-providers": "0.115.8",
|
|
93
|
+
"@vibeframe/core": "0.115.8"
|
|
96
94
|
},
|
|
97
95
|
"engines": {
|
|
98
96
|
"node": ">=20"
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { TimelineState } from "@vibeframe/core";
|
|
2
|
-
export declare function relAsset(url: string): string;
|
|
3
|
-
export declare function buildClipElements(state: TimelineState): string;
|
|
4
|
-
export interface HfMediaElement {
|
|
5
|
-
elementId: string;
|
|
6
|
-
src: string;
|
|
7
|
-
startTime: number;
|
|
8
|
-
endTime: number;
|
|
9
|
-
mediaOffset: number;
|
|
10
|
-
volume: number;
|
|
11
|
-
hasAudio: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare function buildMediaDeclarations(state: TimelineState): HfMediaElement[];
|
|
14
|
-
export declare function buildClipRuntimeData(state: TimelineState): {
|
|
15
|
-
id: string;
|
|
16
|
-
startTime: number;
|
|
17
|
-
duration: number;
|
|
18
|
-
effects: import("@vibeframe/core").Effect[];
|
|
19
|
-
}[];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser-side runtime script embedded into the generated HTML.
|
|
3
|
-
* Implements window.__hf.seek(t) and effect application.
|
|
4
|
-
* Kept as a string template so it can be embedded inline without a bundler.
|
|
5
|
-
*/
|
|
6
|
-
export declare const RUNTIME_SCRIPT = "\n(function () {\n var CLIPS = /*CLIPS_JSON*/[];\n\n function interpolate(kfs, t) {\n if (!kfs || kfs.length === 0) return null;\n if (kfs.length === 1) return kfs[0].values;\n var prev = kfs[0], next = kfs[kfs.length - 1];\n for (var i = 0; i < kfs.length - 1; i++) {\n if (t >= kfs[i].time && t <= kfs[i + 1].time) { prev = kfs[i]; next = kfs[i + 1]; break; }\n }\n if (t <= prev.time) return prev.values;\n if (t >= next.time) return next.values;\n var raw = (t - prev.time) / (next.time - prev.time);\n var e = prev.easing || 'linear';\n var p = e === 'easeIn' ? raw * raw\n : e === 'easeOut' ? raw * (2 - raw)\n : e === 'easeInOut' ? (raw < 0.5 ? 2 * raw * raw : -1 + (4 - 2 * raw) * raw)\n : raw;\n var out = {};\n for (var k in prev.values) {\n var a = +prev.values[k], b = +next.values[k];\n out[k] = isNaN(a) || isNaN(b) ? prev.values[k] : a + (b - a) * p;\n }\n return out;\n }\n\n function applyEffects(el, effects, clipTime) {\n var opacity = 1;\n var filters = [];\n for (var i = 0; i < effects.length; i++) {\n var fx = effects[i];\n var t = clipTime - fx.startTime;\n if (t < 0 || t > fx.duration) continue;\n var vals = (fx.keyframes && fx.keyframes.length > 0)\n ? interpolate(fx.keyframes, t)\n : fx.params;\n if (!vals) continue;\n switch (fx.type) {\n case 'fadeIn':\n opacity = Math.min(opacity, t / fx.duration * (+(vals.intensity || 1))); break;\n case 'fadeOut':\n opacity = Math.min(opacity, (1 - t / fx.duration) * (+(vals.intensity || 1))); break;\n case 'blur':\n filters.push('blur(' + (+vals.radius || 0) + 'px)'); break;\n case 'brightness':\n filters.push('brightness(' + (+vals.value || 1) + ')'); break;\n case 'contrast':\n filters.push('contrast(' + (+vals.value || 1) + ')'); break;\n case 'saturation':\n filters.push('saturate(' + (+vals.value || 1) + ')'); break;\n }\n }\n el.style.opacity = String(opacity);\n if (filters.length > 0) el.style.filter = filters.join(' ');\n else el.style.filter = '';\n }\n\n window.__hf = {\n duration: /*DURATION*/0,\n media: /*MEDIA_JSON*/[],\n seek: function (t) {\n for (var i = 0; i < CLIPS.length; i++) {\n var c = CLIPS[i];\n var el = document.getElementById(c.id);\n if (!el) continue;\n var active = t >= c.startTime && t < c.startTime + c.duration;\n el.style.display = active ? 'block' : 'none';\n if (active) applyEffects(el, c.effects, t - c.startTime);\n }\n }\n };\n})();\n";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { RenderBackend } from "./types.js";
|
|
2
|
-
export declare function createHyperframesBackend(): RenderBackend;
|
|
3
|
-
export declare function aspectToResolution(ratio: string): {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
};
|
|
7
|
-
export declare function qualityToCrf(quality?: "draft" | "standard" | "high"): number;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { TimelineState } from "@vibeframe/core";
|
|
2
|
-
export interface TempProject {
|
|
3
|
-
dir: string;
|
|
4
|
-
cleanup: () => Promise<void>;
|
|
5
|
-
}
|
|
6
|
-
export declare function buildTempProject(state: TimelineState, projectFileDir?: string): Promise<TempProject>;
|
|
7
|
-
export declare function resolveSourceUrl(url: string, baseDir?: string): string;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Render backend abstraction for VibeFrame rendering.
|
|
3
|
-
*
|
|
4
|
-
* Backends implement RenderBackend so `vibe render` and YAML render steps can
|
|
5
|
-
* target FFmpeg, Hyperframes, or future renderers through one contract.
|
|
6
|
-
*
|
|
7
|
-
* Renderer details live with each backend implementation.
|
|
8
|
-
*/
|
|
9
|
-
import type { TimelineState } from "@vibeframe/core";
|
|
10
|
-
export type BackendName = "ffmpeg" | "hyperframes";
|
|
11
|
-
export interface RenderOptions {
|
|
12
|
-
projectState: TimelineState;
|
|
13
|
-
outputPath: string;
|
|
14
|
-
fps?: 24 | 30 | 60;
|
|
15
|
-
quality?: "draft" | "standard" | "high";
|
|
16
|
-
format?: "mp4" | "webm" | "mov";
|
|
17
|
-
/** Hyperframes capture worker count. Defaults to 1 (sequential) — auto-worker mode times out on small comps. */
|
|
18
|
-
workers?: number;
|
|
19
|
-
onProgress?: (pct: number, stage: string) => void;
|
|
20
|
-
signal?: AbortSignal;
|
|
21
|
-
}
|
|
22
|
-
export interface RenderResult {
|
|
23
|
-
success: boolean;
|
|
24
|
-
outputPath?: string;
|
|
25
|
-
durationMs?: number;
|
|
26
|
-
framesRendered?: number;
|
|
27
|
-
error?: string;
|
|
28
|
-
}
|
|
29
|
-
export interface RenderBackend {
|
|
30
|
-
name: BackendName;
|
|
31
|
-
/** Human-readable check before invocation (e.g. Chrome present, FFmpeg version). */
|
|
32
|
-
preflight?(): Promise<{
|
|
33
|
-
ok: true;
|
|
34
|
-
} | {
|
|
35
|
-
ok: false;
|
|
36
|
-
reason: string;
|
|
37
|
-
}>;
|
|
38
|
-
render(options: RenderOptions): Promise<RenderResult>;
|
|
39
|
-
}
|
|
File without changes
|