/** * Options for showing the backdrop */ export interface BackdropShowOptions { /** Whether the backdrop should capture pointer events instead of letting them through */ blockInteraction?: boolean; /** Called when the backdrop itself is clicked (only reachable when blockInteraction is set) */ onClick?: () => void; } /** * BackdropManager handles the creation and cleanup of the tour backdrop * and focus target elements. It's designed as a class to encapsulate * the mutable DOM references. * * Elevation is applied as both a class and a data attribute. The stylesheet keys off * the attribute: React rewrites the whole `class` attribute when a component * re-renders, which would otherwise drop the elevation and leave the target masked by * the backdrop while the tour keeps running. */ export declare class BackdropManager { private backdropElement; private focusTargetElement; private alwaysVisibleElements; private clickHandler; /** * Check if backdrop is currently visible */ get isVisible(): boolean; /** * Get the current focus target element */ get currentFocusTarget(): HTMLElement | null; /** * Show the backdrop overlay and elevate the target element * * @param targetElement - The element to elevate above the backdrop * @param options - Pointer interaction options */ show(targetElement: HTMLElement, options?: BackdropShowOptions): void; /** * Hide the backdrop overlay and clean up focus target */ hide(): void; /** * Clean up only the focus target (remove class and attribute) */ cleanupFocusTarget(): void; /** * Re-apply elevation to the focus target * * Called when the host app rewrites the target's `class` attribute, which drops the * library's class alongside its own. Deliberately does not touch the always-visible * set: those elements are unrelated to the target's class changes, whose frequency the * host app controls. */ reapplyFocusTarget(): void; /** * Re-apply elevation to every tracked always-visible element */ reapplyAlwaysVisible(): void; /** * Handle a click on the backdrop itself */ private handleBackdropClick; /** * Find and elevate all elements with data-tip-always-visible attribute */ private elevateAlwaysVisibleElements; /** * Remove the always-visible class and attribute from all tracked elements */ private cleanupAlwaysVisibleElements; /** * Full cleanup - call on unmount */ destroy(): void; } /** * Create a new BackdropManager instance */ export declare function createBackdropManager(): BackdropManager; //# sourceMappingURL=backdropManager.d.ts.map