/** * useFocusHandlers - Focus/blur for the Slate editor: focus gating when not * editing, blur deactivation with configPanel detection, fake highlight on blur. */ import { Editor, Range } from 'slate'; interface FocusHandlersArgs { editor: Editor; editableRef: React.RefObject; hasFocusRef: React.MutableRefObject; isTextEditingRef: React.MutableRefObject; wasTextEditingRef: React.MutableRefObject; /** Fallback selection ref -- continuously updated in handleChange. */ lastSelectionRef: React.MutableRefObject; /** When true, the fake highlight was explicitly dismissed and must not * reappear until the user makes a fresh expanded selection. */ highlightDismissedRef: React.MutableRefObject; saveSelection: () => void; onEnterSkipLinkFlow?: (selection: Range | null) => void; /** Save selection for Escape-from-panel without deactivating text editing. */ onSavePreEditSelection?: (selection: Range | null) => void; updateFakeHighlight: (sel: Range | null) => void; updateFakeHighlightAbs: (abs: null) => void; onFocusGained?: (editable: HTMLDivElement | null, editor: Editor | null) => void; onFocusLost?: () => void; onDeactivateTextEditing?: () => void; } interface FocusHandlersResult { handleFocus: () => void; handleBlur: (e: React.FocusEvent) => void; } export declare function useFocusHandlers({ editor, editableRef, hasFocusRef, isTextEditingRef, wasTextEditingRef, lastSelectionRef, highlightDismissedRef, saveSelection, onSavePreEditSelection, updateFakeHighlight, updateFakeHighlightAbs, onFocusGained, onFocusLost, onDeactivateTextEditing, }: FocusHandlersArgs): FocusHandlersResult; export {}; //# sourceMappingURL=useFocusHandlers.d.ts.map