import { BlockConfig, BlockConfigOrCreator, BlockNoDefaults, BlockNoteEditor, BlockSpec, CustomBlockImplementation, Extension, ExtensionFactoryInstance, ExtractBlockConfigFromConfigOrCreator, Props, PropSchema } from "@blocknote/core"; import { FC, ReactNode } from "react"; export type ReactCustomBlockRenderProps = ExtractBlockConfigFromConfigOrCreator> = { block: BlockNoDefaults, any, any>; editor: BlockNoteEditor, any, any>; } & (Config["content"] extends "inline" ? { contentRef: (node: HTMLElement | null) => void; } : object); export type ReactCustomBlockImplementation = ExtractBlockConfigFromConfigOrCreator> = Omit, "render" | "toExternalHTML"> & { render: FC>; toExternalHTML?: FC & { context: { nestingLevel: number; }; }>; }; export type ReactCustomBlockSpec = BlockConfig> = { config: B; implementation: ReactCustomBlockImplementation; extensions?: Extension[]; }; export declare function BlockContentWrapper(props: { blockType: BType; blockProps: Props; propSchema: PSchema; isFileBlock?: boolean; domAttributes?: Record; children: ReactNode; }): import("react/jsx-runtime").JSX.Element; /** * Helper function to create a React block definition. * Can accept either functions that return the required objects, or the objects directly. */ export declare function createReactBlockSpec | undefined = undefined>(blockConfigOrCreator: BlockConfig, blockImplementationOrCreator: ReactCustomBlockImplementation> | (TOptions extends undefined ? () => ReactCustomBlockImplementation> : (options: Partial) => ReactCustomBlockImplementation>), extensionsOrCreator?: (ExtensionFactoryInstance | Extension)[] | (TOptions extends undefined ? () => (ExtensionFactoryInstance | Extension)[] : (options: Partial) => (ExtensionFactoryInstance | Extension)[])): (options?: Partial) => BlockSpec; export declare function createReactBlockSpec, const TOptions extends Partial>>(blockCreator: (options: Partial) => BlockConf, blockImplementationOrCreator: ReactCustomBlockImplementation | (TOptions extends undefined ? () => ReactCustomBlockImplementation : (options: Partial) => ReactCustomBlockImplementation), extensionsOrCreator?: (ExtensionFactoryInstance | Extension)[] | (TOptions extends undefined ? () => (ExtensionFactoryInstance | Extension)[] : (options: Partial) => (ExtensionFactoryInstance | Extension)[])): (options?: Partial) => BlockSpec;