import { ParsedSchema } from "../../schema/index.js"; import { SchemaUIProps } from "./client.js"; import { ReactNode } from "react"; //#region src/components/schema/index.d.ts interface InfoTag { node: ReactNode; } export interface FieldBase { description?: ReactNode; infoTags?: InfoTag[]; typeName: string; aliasName: string; deprecated?: boolean; } export interface SchemaDataObjectProperty { name: string; $type: string; required: boolean; } export type SchemaData = FieldBase & ({ type: 'primitive'; } | { type: 'object'; props: SchemaDataObjectProperty[]; } | { type: 'array'; item: { $type: string; }; } | { type: 'or'; items: { name: string; $type: string; }[]; } | { type: 'and'; items: { name: string; $type: string; }[]; }); export interface SchemaUIOptions { root: ParsedSchema; client: Omit; renderMarkdown: (md: string) => ReactNode; renderCodeblock: (opts: { lang: string; code: string; }) => ReactNode; /** * include read only props */ readOnly?: boolean; /** * include write only props */ writeOnly?: boolean; /** * Show example values as tags * * @default false */ showExample?: boolean; } export interface SchemaUIGeneratedData { $root: string; refs: Record; } export declare function Schema({ client, root, readOnly, writeOnly, showExample, renderMarkdown, renderCodeblock }: SchemaUIOptions): import("react").JSX.Element; export declare function generateSchemaUI({ root, renderMarkdown, renderCodeblock, readOnly, writeOnly, showExample, translations }: Omit & { translations?: Partial>; }): SchemaUIGeneratedData; //#endregion