/** * Pure layout for the worktree's branch flow — the git-workflowillustration * form (fat colored curves ballooning off a main axis and merging back), * clay skin applied at render: time flows left→right (compressed, one * column per moment batch), the mainline-declared lane rides the axis, every * other research line bows out to its own amplitude and either merges back * (adopted), ends with its documented No (failed), or runs to the now-line * (open). Every work node is a bead ON its curve (terminal > create > * work > meta on the bead scale). NO TEXT lives in the SVG — status speaks * through shape and color; names and magnitudes stay in the lane list. * * Deterministic and order-independent: a pure fold over the worktree view. * NOTHING here infers structure: only user-declared parent edges shape the * curves; a dangling or cyclic declaration degrades to a root, never a * crash. Presentation constants only — no CBE-governed scalars live here. * @module dsh-client-ui-mimir/client/worktree-map */ import type { ResearchWorktreeLaneView, ResearchWorktreeTouchKind, ResearchWorktreeView } from 'dsh-mimir/types'; /** Time-column budget (moments beyond it fold into shared columns). */ export declare const WORKTREE_FLOW_MAX_COLS = 36; /** One placed research line: its whole curve, plus the straight-section * span where its beads ride. */ export interface WorktreeFlowLane { readonly lane: ResearchWorktreeLaneView; readonly color: string; readonly isMain: boolean; /** The full SVG path (M … Q … L …, merging lines curve back to parent). */ readonly path: string; /** The curve's straight-section y (where beads sit). */ readonly y: number; } /** One work node: a bead on its curve at a compressed column. */ export interface WorktreeFlowBead { readonly lineId: string; readonly x: number; readonly y: number; readonly kind: ResearchWorktreeTouchKind; readonly at: string; /** The action behind the bead's earliest touch (labels client-side). */ readonly action: string; readonly count: number; readonly color: string; } /** One mainline-declaration epoch (a dashed vertical). */ export interface WorktreeFlowEpoch { readonly x: number; readonly label: string; readonly at: string; } /** The whole flow geometry, ready for one deterministic SVG render. */ export interface WorktreeFlowLayout { readonly width: number; readonly height: number; readonly cols: number; readonly momentCount: number; readonly mainY: number; readonly lanes: readonly WorktreeFlowLane[]; readonly beads: readonly WorktreeFlowBead[]; readonly epochs: readonly WorktreeFlowEpoch[]; readonly nowX: number; } /** Bead radius on the bead scale (bumped when a column merged several). */ export declare function beadRadius(kind: ResearchWorktreeTouchKind, count: number): number; /** * @param view - the derived worktree (lanes in ANY order; sorted internally). * @returns the deterministic flow layout (empty lanes when nothing parses). */ export declare function layoutWorktreeFlow(view: ResearchWorktreeView): WorktreeFlowLayout; //# sourceMappingURL=worktree-map.d.ts.map