constants.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. export type TemplateType = "news" | "knowledge" | "opinion" | "marketing" | "github-trending" | "github-weekly";
  2. export type PlatformPreset =
  3. | "bilibili"
  4. | "douyin-long"
  5. | "douyin-short"
  6. | "universal-16x9"
  7. | "universal-9x16";
  8. export type AspectRatio = "16:9" | "9:16";
  9. export type Tone = "formal" | "casual" | "energetic" | "calm";
  10. export type Pace = "slow" | "normal" | "fast";
  11. export type JobStatus = "pending" | "running" | "completed" | "failed";
  12. export const PLATFORM_PRESETS: Record<
  13. PlatformPreset,
  14. { width: number; height: number; fps: number; aspect: AspectRatio }
  15. > = {
  16. bilibili: { width: 1920, height: 1080, fps: 30, aspect: "16:9" },
  17. "douyin-long": { width: 1080, height: 1920, fps: 30, aspect: "9:16" },
  18. "douyin-short": { width: 1080, height: 1920, fps: 30, aspect: "9:16" },
  19. "universal-16x9": { width: 1920, height: 1080, fps: 30, aspect: "16:9" },
  20. "universal-9x16": { width: 1080, height: 1920, fps: 30, aspect: "9:16" },
  21. };
  22. export const TEMPLATE_TYPES: TemplateType[] = [
  23. "news",
  24. "knowledge",
  25. "opinion",
  26. "marketing",
  27. "github-trending",
  28. "github-weekly",
  29. ];
  30. export const PLATFORM_PRESET_KEYS: PlatformPreset[] = [
  31. "bilibili",
  32. "douyin-long",
  33. "douyin-short",
  34. "universal-16x9",
  35. "universal-9x16",
  36. ];