import { type DependencyList } from 'react'; import { CoreEditor } from '@kerebron/editor'; import type { AssetLoad, Content, EditorKit } from '@kerebron/editor'; export interface UseEditorOptions { /** Array of extensions to use */ editorKits?: EditorKit[]; /** Initial HTML content */ content?: string; /** Initial JSON content */ initialContent?: Content; /** CDN URL for WASM files */ assetLoad?: AssetLoad; /** Document URI */ uri?: string; /** Called when editor is ready */ onReady?: (editor: CoreEditor) => void; /** Called on every transaction */ onTransaction?: (editor: CoreEditor) => void; /** Called when content changes */ onChange?: (editor: CoreEditor) => void; /** Prevent immediate render (useful for SSR) */ immediatelyRender?: boolean; } /** * React hook for creating and managing a Kerebron editor instance. * * @example * ```tsx * const editor = useEditor({ * editorKits: [StarterKit], * content: '

Hello World!

', * }) * * return * ``` */ export declare function useEditor(options?: UseEditorOptions, deps?: DependencyList): CoreEditor | null;