import { useEditor } from "@tiptap/react";
import type { CommandItem } from "@/core/extensions/SlashCommands";
import type { Node } from "@tiptap/pm/model";
import type { AnyExtension } from "@tiptap/core";
import type { EditorLocale } from "@/shared/locales";
import type { EditorErrorEvent } from "@/react/editor/types";
type MathClickHandler = (node: Node, pos: number) => void;
interface UseTiptapEditorOptions {
    value: string | undefined;
    onChangeDebounceMs: number;
    placeholder: string;
    disabled: boolean;
    editorRef: React.MutableRefObject<ReturnType<typeof useEditor> | null>;
    onChange: ((html: string) => void) | undefined;
    onError?: (event: EditorErrorEvent) => void;
    onImageDelete?: (params: {
        src: string;
        alt?: string;
        title?: string;
    }) => void;
    onFileDelete?: (params: {
        url: string;
        name: string;
    }) => void;
    onStart: () => void;
    onUpdate: (query: string, items?: CommandItem[]) => void;
    onIndexChange: (index: number) => void;
    onClientRect: (rect: DOMRect | null) => void;
    onExit: () => void;
    onCommand: (item: CommandItem) => void;
    onFileUpload?: (callback: (url: string, name: string) => void) => void;
    getCommands?: () => CommandItem[];
    onFileAttachmentClick?: (params: {
        url: string;
        name: string;
    }) => void;
    locale: EditorLocale;
    defaultCodeBlockLanguage?: string;
    onInlineMathClick: MathClickHandler;
    onBlockMathClick: MathClickHandler;
    /** 是否启用斜杠命令扩展。 */
    enableSlashCommands: boolean;
    /** 控制 editor 何时重建的依赖集合（例如模式切换时重建以刷新扩展回调） */
    recreateDeps?: ReadonlyArray<unknown>;
    /** 额外扩展：按顺序追加在内置扩展后。 */
    extensions?: AnyExtension[];
}
export declare function useTiptapEditor({ value, onChangeDebounceMs, placeholder, disabled, editorRef, onChange, onError, onImageDelete, onFileDelete, onStart, onUpdate, onIndexChange, onClientRect, onExit, onCommand, onFileUpload, getCommands, onFileAttachmentClick, locale, defaultCodeBlockLanguage, onInlineMathClick, onBlockMathClick, enableSlashCommands, recreateDeps, extensions, }: UseTiptapEditorOptions): {
    editor: import("@tiptap/core").Editor;
    runAfterOnChange: (callback: () => void) => void;
};
export {};
