import { DataGridElement } from '@toolbox-web/grid'; import { MaybeRef, Ref } from 'vue'; /** * Options for {@link useGridOverlay}. * * @public * @since 1.4.0 */ export interface UseGridOverlayOptions { /** * Whether the overlay is currently open. Accepts a plain boolean, a `ref`, * or a `computed`. * * Set to `false` to unregister the panel without unmounting it (e.g. when * the consumer toggles visibility via CSS rather than `v-if`). Defaults to * `true`. */ open?: MaybeRef; /** * Optional explicit grid element. When omitted, the hook resolves the * grid by: * * 1. Walking up the DOM from `panelRef.value` via `closest('tbw-grid, [data-tbw-grid]')` * (works for inline overlays). * 2. Falling back to the {@link GRID_ELEMENT_KEY} ref provided by * `` (works for ``-rendered overlays whose DOM is * detached from the grid subtree). */ gridElement?: MaybeRef; } /** * Register a custom overlay panel (popover, listbox, calendar, color * picker) as part of the active editor so the grid does not commit and * exit row edit when focus or pointer interaction enters the panel. * * Mirrors the Angular `BaseOverlayEditor` and React `useGridOverlay` * contracts for Vue custom editors. Wires * `registerExternalFocusContainer(panel)` while open and * `unregisterExternalFocusContainer(panel)` on close / unmount. * * Pair with `ColumnEditorContext.grid` when the panel is rendered outside * any `` provider. * * @example * ```vue * * * * ``` * * @param panelRef - Template ref to the overlay panel DOM element. The hook * is a no-op while `panelRef.value` is `null`. * @param options - {@link UseGridOverlayOptions}. * * @public * @since 1.4.0 */ export declare function useGridOverlay(panelRef: Ref, options?: UseGridOverlayOptions): void; //# sourceMappingURL=use-grid-overlay.d.ts.map