import type { HistoryEntry } from './index.js'; /** * A clickable copy-icon target resolved in viewport coordinates during the * post-render measurement pass. `entryId` identifies a single card or the first * member of a compact tool group; `entryIds` contains every group member when * present. `startRow`/`endRow` bound the box's visible rows (0-based from the * viewport top, `endRow` exclusive); `iconCol` is the 0-based terminal column * the icon renders at on the box's first visible row. */ export interface CopyHit { entryId: number; entryIds?: readonly number[] | undefined; startRow: number; endRow: number; iconCol: number; } /** Sentinel returned after copying the active, non-retained tool-stream box. */ export declare const LIVE_TOOL_STREAM_COPY_ID = -1; /** Sentinel returned after copying a drag-select-then-right-click selection. * Distinct from any retained entry id so the host can render a different * status-line notice ("Selected range copied") without flashing a specific * card's copy icon (which only makes sense when a single entry was copied). */ export declare const SELECTION_COPY_ID = -2; /** * Resolve the copy target under a viewport cell, or null. A cell matches when * its `row` is within the card's visible rows and its `col` is within the * icon's cell span. Iterates newest-first so overlapping row estimates favor * the most recently rendered card. Exported-shape pure helper for unit tests. */ export declare function findCopyHit(hits: readonly CopyHit[], row: number, col: number): CopyHit | null; /** Resolve a hit to the complete current clipboard payload without performing I/O. */ export declare function resolveCopyPayload(hit: CopyHit, entriesById: ReadonlyMap, liveToolText?: string | undefined): { entryId: number; text: string; } | null; /** * Rows clipped from the top of the mounted history stack before it appears in * the viewport. Scrolled frames clip by the anchor's row offset; pinned frames * rely on Ink flex-end clipping, which hides top overflow from mounted groups * plus the live tool tail. */ export declare function copyRegistryVisibleClip(opts: { scrolled: boolean; clip: number; mountedRows: number; tailRows: number; viewportRows: number; }): number; /** Build the live tool-stream header hit, accounting for ToolStreamBox's top margin. * The `pinnedSlack` offset must match {@link buildCopyRegistry}'s card-hit math so * the live-stream icon stays visually aligned with its header row in underfilled * pinned frames (flex-end parks the mounted stack at the bottom of the viewport). */ export declare function liveToolStreamCopyHit(opts: { visible: boolean; mountedRows: number; visibleClip: number; viewportRows: number; iconCol: number; pinnedSlack?: number; }): CopyHit | null; //# sourceMappingURL=copy-geometry.d.ts.map