import React from 'react'; import { z } from 'zod'; type BaseZodDictionary = { [name: string]: z.AnyZodObject; }; type DocumentBlocksDictionary = { [K in keyof T]: { schema: T[K]; Component: (props: z.infer) => JSX.Element; }; }; type BlockConfiguration = { [TType in keyof T]: { type: TType; data: z.infer; }; }[keyof T]; /** * @param blocks Main DocumentBlocksDictionary * @returns React component that can render a BlockConfiguration that is compatible with blocks */ declare function buildBlockComponent(blocks: DocumentBlocksDictionary): ({ type, data }: BlockConfiguration) => React.JSX.Element; /** * * @param blocks Main DocumentBlocksDictionary * @returns zod schema that can parse arbitary objects into a single BlockConfiguration */ declare function buildBlockConfigurationSchema(blocks: DocumentBlocksDictionary): z.ZodEffects, BlockConfiguration, any>; /** * Identity function to type a DocumentBlocksDictionary * @param blocks Main DocumentBlocksDictionary * @returns typed DocumentBlocksDictionary */ declare function buildBlockConfigurationDictionary(blocks: DocumentBlocksDictionary): DocumentBlocksDictionary; export { type BlockConfiguration, type DocumentBlocksDictionary, buildBlockComponent, buildBlockConfigurationDictionary, buildBlockConfigurationSchema };