catalog.ts 679 B

12345678910111213141516171819202122232425
  1. import { defineCatalog } from "@json-render/core";
  2. import { schema } from "@json-render/react/schema";
  3. import { shadcnComponentDefinitions } from "@json-render/shadcn/catalog";
  4. import { z } from "zod";
  5. export const catalog = defineCatalog(schema, {
  6. components: {
  7. ...shadcnComponentDefinitions,
  8. },
  9. actions: {
  10. confetti: {
  11. params: z.object({}),
  12. description: "Fire confetti",
  13. },
  14. },
  15. functions: {
  16. formatAddress: {
  17. description:
  18. "Formats country and city into a single address string like 'City, Country'",
  19. },
  20. citiesForCountry: {
  21. description: "Returns an array of city names for the given country code",
  22. },
  23. },
  24. });