import type { LexicalEditor } from 'lexical'; import { TextNode } from 'lexical'; import type { SlashCommandPluginOptions } from '../types'; export interface SlashCommandState { isActive: boolean; filterText: string; anchorNode: TextNode | null; anchorOffset: number; } export interface SlashCommandCallbacks { onTrigger?: (state: SlashCommandState, removeText: () => void) => void; onUpdate?: (state: SlashCommandState, removeText: () => void) => void; onClose?: () => void; onExecute?: (commandId: string, removeText: () => void) => void; } /** * Register slash commands plugin. * Detects "/" input and manages the command palette lifecycle. */ export declare function registerSlashCommandsPlugin(editor: LexicalEditor, options?: SlashCommandPluginOptions, callbacks?: SlashCommandCallbacks): Promise<() => void>; /** * Execute a slash command by removing the trigger text and running the handler. */ export declare function executeSlashCommand(editor: LexicalEditor, command: { handler: (editor: LexicalEditor) => void; }, removeText: () => void): void;