Files
zeekay ba3f2091a4 fix: Resolve production TypeScript errors (billing, qr-code, reveal-animation, charts)
- Fixed qr-code.tsx: Use inline QRCodeImageSettings type with cast to any
- Fixed reveal-animation.tsx: Change threshold → amount for motion/react API
- Fixed chart-bar-active.tsx: Remove invalid activeIndex prop from Bar component
- Fixed payment-settings-01.tsx: Add explicit types to callback parameters
- Created billing stub module in both default and new-york variants
- Fixed billing imports: Changed @hanzo/ui/billing → @/registry/new-york/ui/billing
- All billing import errors resolved

Production errors fixed: ~20
Remaining: 27 errors (14 billing mock data, 13 recharts types - lower priority)
2025-11-05 23:52:41 -08:00

34 lines
1.1 KiB
TypeScript

import { z } from "zod"
// Define the file schema to match hanzo/ui's format
export const fileSchema = z.object({
path: z.string(),
content: z.string().optional(),
type: z.string(),
target: z.string().optional(),
})
// Registry item schema aligned with hanzo/ui format
export const registryItemSchema = z.object({
name: z.string(),
type: z.string(),
description: z.string().optional(),
author: z.string().optional(),
dependencies: z.array(z.string()).optional(),
devDependencies: z.array(z.string()).optional(),
registryDependencies: z.array(z.string()).optional(),
files: z.array(fileSchema).optional(),
meta: z.record(z.string(), z.any()).optional(),
title: z.string().optional(),
cssVars: z.record(z.string(), z.any()).optional(),
tailwind: z.record(z.string(), z.any()).optional(),
category: z.string().optional(),
subcategory: z.string().optional(),
})
export const registryItemFileSchema = fileSchema
// Type definitions for easier use in TypeScript
export type RegistryItem = z.infer<typeof registryItemSchema>
export type RegistryFile = z.infer<typeof fileSchema>