/** * dsh-widgets — the right-rail slot body. * * Hosted in `conversation.input.overlay`; the registration in `client/index.ts` * records why that seat and not `shell.overlay`. One component draws the whole * right-rail group as ONE sliding surface: * * drawer wrapper ── RailWave ── resting deck (grid of cards + the add tile) * ├─ the magnify overlay (inside RailWave) * └─ the add panel (settings pages, portaled to ) * * Moved out of `client/index.ts` (Phase 2.9) with its body unchanged; the * indentation is kept on purpose so the move stays byte-auditable. It receives the * bridge handles instead of closing over them: `useBridge` / `setPrefs` / * `runCommand` are stable, while `prefs` and `railBudget` are LIVE bindings, so * those arrive as getters and every EVENT-HANDLER read goes through them (a * captured value would go stale between the emit and the re-render). */ import * as React from 'react'; import { type BridgeSnapshot } from '../runtime/bridge'; import { type Prefs } from '../runtime/prefs'; /** What the rail view needs from the composition root that owns the bridge. */ export interface RailViewDeps { /** Subscribe to the bridge (re-renders the rail on every emit). */ useBridge: () => BridgeSnapshot; /** The LIVE prefs binding — read it once per render, never capture it. */ getPrefs: () => Prefs; /** Merge a patch into the live prefs, persist, then emit. */ setPrefs: (patch: Partial) => void; /** * The LIVE rail budget (px): the space the product’s transcript measure leaves * for the rail. It must NOT come from the bridge snapshot — a yield can be * written straight to the DOM and outrun the snapshot, and the stale value would * write the pre-yield geometry back. */ getRailBudget: () => number; /** Run a slash command (armed action cards). */ runCommand: (line: string) => void; /** Hand the drawer wrapper element back to the measurement layer. */ setDrawerEl: (el: HTMLDivElement | null) => void; } /** Build the right-rail slot component bound to one composition root. */ export declare function createRailView(deps: RailViewDeps): () => React.ReactElement | null;