Files
MelodyMuse/src/lib/types.ts
T

80 lines
1.8 KiB
TypeScript

// Domain types shared across the app. The server returns the same shapes
// described here, so the client can trust the wire format at the type level.
export type Language =
| "English"
| "Deutsch"
| "Español"
| "Français"
| "Italiano"
| "Português"
| "Polski"
| "Czech"
| "Other";
export type Vocals = "vocals" | "instrumental";
export type GenerationSection =
| "all"
| "lyrics"
| "style"
| "titles"
| "video_prompts"
| "youtube_description";
export type VideoPromptType = "Abstract" | "Cinematic" | "Hybrid";
export interface VideoPrompt {
type: VideoPromptType;
prompt: string;
tool_recommendation: string;
}
export interface SongAssets {
titles: string[];
lyrics: string;
style: string;
negative_style: string;
youtube_description: string;
video_prompts: VideoPrompt[];
}
export interface GenerateRequest {
input: string;
language: string;
mood?: string;
style_hint?: string;
vocals: Vocals;
section: GenerationSection;
context?: Partial<SongAssets>;
}
export interface InputValues {
idea: string;
language: Language | string;
customLanguage: string;
style_hint: string; // new — fed by the "Surprise me" / "Go crazy" buttons
mood: string; // optional secondary field
vocals: Vocals;
}
export const NEGATIVE_VIDEO_PROMPT =
"text, watermark, logo, flash, abrupt cuts, camera shake, faces, hands, distortion, blur";
// Human-readable labels for each regenerable section — used by toasts and the
// history panel. Keep in sync with `GenerationSection`.
export const SECTION_LABELS: Record<GenerationSection, string> = {
all: "everything",
titles: "titles",
lyrics: "lyrics",
style: "style",
video_prompts: "video prompts",
youtube_description: "description",
};
export interface VideoAiLink {
name: string;
url: string;
}