import { type Component, type TUI } from '@earendil-works/pi-tui'; import { type BindingResolution, type BindingId } from '../../../core/keybindings/index.js'; import type { CanvasSource } from '../../../core/canvas/source.js'; import type { AttachPalette } from '../config.js'; export declare class GraphOverlay implements Component { private readonly tui; private readonly self; private readonly getAsks; private readonly palette; private bindings; private readonly source; private readonly onRefreshFailure; private handle; /** Manual fold OVERRIDES (h collapses → userCollapsed, l expands → userExpanded); * both override the default activity-driven policy and survive open/close. */ private readonly userExpanded; private readonly userCollapsed; private readonly folds; /** Cursor as a node id (indices shift as topology changes). */ private cursorId; /** Viewport scroll offset (row index of the top visible tree row). */ private scrollTop; /** Transient close confirmation gate. */ private pendingConfirm; private snapshot; private snapshotSeq; /** True when `source` is a `RemoteCanvasSource` — gates every local disk/ * SQLite adornment (tokens, activity, fault, attach, focus) to a safe * default and makes Enter/r/m/x no-op instead of shelling local lifecycle * commands against a remote graph row. See the file header. */ private readonly remote; constructor(tui: TUI, self: string, getAsks: () => Record, palette: AttachPalette, bindings: BindingResolution, source: CanvasSource, onRefreshFailure?: (cause?: unknown) => void); /** The tmux-focus set for `isAttached`, fetched via crtrd (was nav-model's * focusedNodeIds → listFocuses db read). Empty for a remote source (a remote * node id may collide with a local focus row); a failed API call degrades to * empty rather than throwing the whole snapshot. */ private fetchFocused; setBindings(bindings: BindingResolution): void; private matches; private hint; /** Compose footer hints in priority order, dropping WHOLE entries that would * overflow `budget` visible columns rather than letting the border mid-clip * the tail — so the prioritized head (dismiss + remapped local actions) stays * discoverable even in a narrow overlay. */ private fitHints; isOpen(): boolean; open(): void; close(): void; toggle(): void; /** Repaint if shown (the low-rate ask poll calls this). */ refresh(): void; invalidate(): void; private buildSnapshot; private renderSnapshotRow; render(width: number): string[]; /** A top/bottom border row: `