import type { ReactElement, ReactNode } from 'react'; import type { EditorHandle } from './use-editor.js'; /** Props for {@link EditorProvider}. */ export interface EditorProviderProps { /** The handle from {@link useEditor} to share with the subtree. */ readonly editor: EditorHandle; readonly children?: ReactNode; } /** * Share an {@link EditorHandle} with a subtree so toolbar/menu components can * read it via {@link useEditorContext} instead of prop drilling. The handle's * identity is stable, so the provider never causes context-driven re-renders. */ export declare function EditorProvider({ editor, children }: EditorProviderProps): ReactElement; /** * Read the nearest {@link EditorProvider}'s handle. * * @returns The shared editor handle. * @throws {Error} `[NO_PROVIDER]` when no `` is above this component. */ export declare function useEditorContext(): EditorHandle; //# sourceMappingURL=context.d.ts.map