shadcn-vue/apps/www/src/lib/registry/schema.ts
zernonia a03bace32c
feat: Blocks (#428)
* chore: build registry

* feat: block preview

* refactor: change to use iframe
feat: add more blocks

* chore: fix build

* feat: add all other blocks

* feat: add copy button

* chore: cleanup
2024-03-23 18:24:48 +08:00

19 lines
437 B
TypeScript

import * as z from 'zod'
export const registrySchema = z.array(
z.object({
name: z.string(),
dependencies: z.array(z.string()).optional(),
registryDependencies: z.array(z.string()).optional(),
files: z.array(z.string()),
type: z.enum([
'components:ui',
'components:component',
'components:example',
'components:block',
]),
}),
)
export type Registry = z.infer<typeof registrySchema>