catalog.ts 957 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { defineCatalog } from "@json-render/core";
  2. import {
  3. schema,
  4. standardComponentDefinitions,
  5. standardTransitionDefinitions,
  6. standardEffectDefinitions,
  7. } from "@json-render/remotion/server";
  8. /**
  9. * Remotion video catalog
  10. *
  11. * Uses standard definitions from @json-render/remotion,
  12. * with the ability to add custom components.
  13. *
  14. * @example Adding a custom component:
  15. * ```ts
  16. * components: {
  17. * ...standardComponentDefinitions,
  18. * MyCustomComponent: {
  19. * props: z.object({ ... }),
  20. * type: "scene",
  21. * defaultDuration: 90,
  22. * description: "My custom component",
  23. * },
  24. * },
  25. * ```
  26. */
  27. export const videoCatalog = defineCatalog(schema, {
  28. // Use all standard components from the package
  29. components: standardComponentDefinitions,
  30. // Use all standard transitions from the package
  31. transitions: standardTransitionDefinitions,
  32. // Use all standard effects from the package
  33. effects: standardEffectDefinitions,
  34. });