import type { VisualViewOperation, VisualViewSummary } from "../adapters/visual/protocol-contract.js"; import type { CanvasNode } from "../graph-projection.js"; /** * A right-click on a row, in viewport coordinates. The rail reports which row * was hit and nothing about what the menu should say — `contextMenuFor` owns * that, and a rail that also decided it would be a second place to change. */ export type TreeRowMenu = (row: { readonly kind: "view" | "subject"; readonly id: string; }, position: { readonly x: number; readonly y: number; }) => void; export interface ViewTreeProps { readonly views: readonly VisualViewSummary[]; /** * The pending changeset's view operations, merged over `views` by * `buildViewTree` so staged intent is visible beside landed truth * (ADR 0114). Derived from the changeset at the call site, never stored: * discarding the operation is the revert. */ readonly stagedViewOperations: readonly VisualViewOperation[]; readonly activeViewId: string; /** Every subject the workspace declares, filtered or not. */ readonly nodes: readonly CanvasNode[]; /** What the canvas is drawing, or `null` when it is drawing everything. */ readonly inViewIds: ReadonlySet | null; /** What the active view draws folded, and what each box holds (#473). */ readonly folded?: ReadonlySet; readonly insideCounts?: ReadonlyMap; readonly filterText: string; readonly collapsed: ReadonlySet; readonly onFilterChange: (text: string) => void; readonly onToggle: (key: string) => void; readonly onSelectView: (id: string) => void; readonly onClearView: () => void; readonly onNewView: () => void; readonly onSelectSubject: (id: string) => void; readonly onRowMenu: TreeRowMenu; /** A viewer, not an author (#298): the new-view affordance is absent. */ readonly readOnly?: boolean; /** * Put the whole rail away (#294's shape, other side). Optional: a host that * gives no way back should not be able to draw the control that takes it. */ readonly onHide?: () => void; } export declare function ViewTree({ views, stagedViewOperations, activeViewId, nodes, inViewIds, folded, insideCounts, filterText, collapsed, onFilterChange, onToggle, onSelectView, onClearView, onNewView, onSelectSubject, onRowMenu, readOnly, onHide, }: ViewTreeProps): import("react").JSX.Element;