import { type ReactNode } from "react"; import { type RightSectionId } from "./workspace-state.js"; /** * The right column's furniture: a collapsible section, and the handle between * two of them (#249). * * The column used to be one panel with the subject form and the changeset tray * stacked inside it and no way to give any of the three more room than the * others happened to leave. It is a stack of named sections now, because more * are coming and because a reviewer reading a long changeset should not have to * scroll past a subject form to reach the commit button. * * A section says what it holds even while it is shut - the header carries a * label and a line of meta - which is the whole reason the column no longer has * an open/closed toggle of its own. A closed strip button said nothing; three * closed headers say what is behind each of them. */ export interface SectionProps { readonly id: RightSectionId; readonly label: string; /** A word about what is inside, read while the section is shut: the selected * subject's id, how many rows are staged, whether the agent is idle. */ readonly meta?: ReactNode; readonly open: boolean; readonly onToggle: () => void; readonly children: ReactNode; } export declare function Section({ id, label, meta, open, onToggle, children, }: SectionProps): import("react").JSX.Element; /** * The handle between two sections. * * Drags the section BELOW it, which is the one with a height: the sections * above take what is left, so a handle that grew the upper one would have to * decide which of them gave the room up. Keyboard-reachable with the arrow * keys, for the same reason the conversation's own separator is: a control * only a pointer can reach is a control some reviewers do not have. */ export declare function SectionSplitter({ label, height, viewportHeight, onResize, }: { readonly label: string; readonly height: number; readonly viewportHeight: number; readonly onResize: (height: number) => void; }): import("react").JSX.Element; /** * The stack's rows: the sections a host asked for, in the stack's own order, * with a handle between each adjacent pair (#252). * * The order is `RIGHT_SECTIONS`, never the order the host happened to write: * the sections mean something as a sequence - properties above changes above * chat, which is pinned at the foot - and a host should not reorder the shell * by writing its array differently. * * A handle sits BETWEEN two sections, so the first present section never gets * one. That is the whole rule, and it is why this is a function rather than * three conditionals in the markup: with `chat` alone there is nothing to * resize against, and a stray handle at the top of the column is the kind of * thing that only shows up in the one configuration nobody rendered. */ export declare const stackRows: (sections: readonly RightSectionId[], bodies: Readonly>, splitters: Readonly>>) => readonly ReactNode[];