UNPKG

@norbiros/nuxt-auto-form

Version:

Auto-generate Nuxt UI forms from Zod 4 schemas

38 lines (37 loc) 1.55 kB
import type { InferInput, InferOutput } from '@nuxt/ui'; import type { AutoFormConfig } from '../types/index.js'; import * as z from 'zod'; declare const _default: <T extends z.ZodObject<any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{ readonly onSubmit?: ((data: InferOutput<T>) => any) | undefined; } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onSubmit"> & { schema: T; initialState?: Partial<InferInput<T>>; ui?: AutoFormConfig; } & Partial<{}>> & import("vue").PublicProps; expose(exposed: import("vue").ShallowUnwrapRef<{ submit: () => void; }>): void; attrs: any; slots: { [x: string]: ((props: { field: string; state: Record<string, any>; }) => any) | undefined; } & { 'before-fields'?: (props: {}) => any; } & { 'after-fields'?: (props: {}) => any; } & { submit?: (props: { disabled: boolean; }) => any; }; emit: (e: "submit", data: InferOutput<T>) => void; }>) => import("vue").VNode & { __ctx?: Awaited<typeof __VLS_setup>; }; export default _default; type __VLS_PrettifyLocal<T> = { [K in keyof T as K]: T[K]; } & {};