import type { LongTextRendererOptions } from '../../types/built-in-renderer.types'; /** * The panel a long-text cell's expand control opens. * * ### Why a module singleton * At most one panel is open at a time — opening a second implicitly closes the * first — so one is created lazily, reused, and kept out of the DOM until * something asks for it. A panel per cell would mean thousands of detached * subtrees in a scrolled grid. `avatar-group-overlay.ts` and `SparklineTooltip` * use the same shape for the same reason. * * ### Why `position: fixed` * The panel lives on `document.body`, not inside the cell. A panel positioned * within the grid would be clipped by the scroll container it sits in, and * would scroll away from its own trigger. * * @packageDocumentation */ export interface LongTextOverlayRequest { /** The expand button. Toggles the panel and receives focus back on close. */ readonly trigger: HTMLElement; /** * Element the panel sizes and aligns itself against. Defaults to * {@link trigger}. * * The cell, in practice — a panel aligned to the 16px button would sit in the * middle of a wide column with no visible relationship to the text it came * from. */ readonly anchor?: HTMLElement; /** The untruncated text to show. */ readonly text: string; readonly options: LongTextRendererOptions; } /** Opens the panel for one cell, replacing any panel already showing. */ export declare function openLongTextOverlay(request: LongTextOverlayRequest): void; /** Closes the panel, if one is open. */ export declare function closeLongTextOverlay(opts?: { restoreFocus?: boolean; }): void; /** `true` when this trigger's panel is the one currently showing. */ export declare function isLongTextOverlayOpenFor(trigger: HTMLElement): boolean; /** Tears the panel out of the document entirely. */ export declare function destroyLongTextOverlay(): void; //# sourceMappingURL=long-text-overlay.d.ts.map