import type { HotInstance } from '../core/types'; type FocusScopeType = 'modal' | 'inline'; type FocusScopeActivationSource = 'unknown' | 'click' | 'tab_from_above' | 'tab_from_below'; export type FocusScopeOptions = { shortcutsContextName?: string; type?: FocusScopeType; contains?: (target: HTMLElement) => boolean; runOnlyIf?: () => boolean; enableFocusCatchers?: boolean; onActivate?: (focusSource: FocusScopeActivationSource) => void; onDeactivate?: () => void; }; export interface FocusScopeManager { getActiveScopeId(): string | null; registerScope(scopeId: string, container: HTMLElement, options?: FocusScopeOptions): void; unregisterScope(scopeId: string): void; activateScope(scopeId: string, focusSource?: string): void; deactivateScope(scopeId: string): void; destroy(): void; } /** * @typedef {object} FocusScopeManager * @property {function(): string | null} getActiveScopeId Returns the ID of the active scope. * @property {function(string, HTMLElement, object): void} registerScope Registers a new focus scope. * @property {function(string): void} unregisterScope Unregisters a scope by its ID. * @property {function(string, ('unknown' | 'click' | 'tab_from_above' | 'tab_from_below')?): void} activateScope Activates a focus scope by its ID. * @property {function(string): void} deactivateScope Deactivates a scope by its ID. * @property {function(): void} destroy Destroys the focus scope manager. */ /** * Creates a focus scope manager for a Handsontable instance. The manager handles focus * scopes by listening to keydown, focusin, and click events on the document. Based on * the currently focused element, it activates or deactivates the appropriate scope. * Focus scope contains its own boundaries and logic that once activated allows to focus * specific focusable element within the scope container element and/or switch to specific * shortcuts context. * * The manager also automatically updates the {@link Core#isListening} state of the Handsontable * instance based on the current state of the scopes. * * @alias FocusScopeManager * @class FocusScopeManager * @param {Core} hotInstance The Handsontable instance. */ export declare function createFocusScopeManager(hotInstance: HotInstance): FocusScopeManager; export {};