import { type RefObject } from 'react'; /** * Dismisses a non-modal floating surface (tip panel, popover-like hint) on * an outside pointer-down or the Escape key. * * This is intentionally NOT a focus trap / modal primitive — the surfaces it * targets in this package (e.g. the Schema Builder quick-start tip) sit * beside interactive canvas content rather than blocking it, so trapping * focus would be wrong. For a true modal, use the package's native * `` pattern (see RelationshipConfigDialog / FieldCreateDialog), * which gets Escape-to-close and a backdrop element from the browser — and * `useLightDismissDialog` beside this file for the backdrop CLICK, which the * browser does NOT give you. An earlier version of this sentence said a * `` gets "a backdrop for free", which was read as light dismiss being * free too, and all five modals in this package shipped unable to close on a * click away. * * Self-contained on purpose: `EntityPropertiesPanel`'s docblock records the * package's "zero design-system dependency" rule (plain HTML + Tailwind, no * `@bsuite/ui`/shadcn import), so this hook stays pure React rather than * pulling in a Radix primitive. It is small enough to duplicate the * one BSuite already has in `packages/nav-core/src/AppSwitcher.tsx` without * meaningfully growing the bundle either app depends on. */ export declare function useDismissOnOutsideOrEscape(ref: RefObject, active: boolean, onDismiss: () => void): void; //# sourceMappingURL=useDismissOnOutsideOrEscape.d.ts.map