/** * DAG graph lane computation for SCM commit history visualization. * * Each row in the graph has: * - `lane`: the column index where the commit circle is drawn * - `color`: a lane index (0-7) used to pick a CSS color variable * - `edges`: segments to draw on this row — each segment connects two lane * positions and carries a color and type * * Edge types determine how each segment is rendered in the SVG: * - `'pass-through'`: straight vertical line through the full row height * - `'branch-out'`: bezier curve starting at the commit's Y (mid-row), * sweeping down to the new lane at the bottom of the row * - `'merge-in'`: bezier curve starting at the source lane at the top of * the row, sweeping into the commit's Y (mid-row) */ export type GraphEdgeType = 'pass-through' | 'branch-out' | 'merge-in'; export interface GraphEdge { /** Source lane position (top of the row for pass-through/merge-in; commit lane for branch-out). */ readonly fromLane: number; /** Target lane position (bottom of the row for pass-through/branch-out; commit lane for merge-in). */ readonly toLane: number; /** Color index (0–7) for this edge. */ readonly color: number; /** How this edge should be rendered in the SVG. */ readonly type: GraphEdgeType; } export interface GraphRow { /** Lane index where the commit node is rendered. */ readonly lane: number; /** Color index for the commit node dot. */ readonly color: number; /** Edges crossing or originating on this row. */ readonly edges: readonly GraphEdge[]; /** * Whether the commit's lane continues downward (i.e. first parent stays in * the same lane). When false, no bottom line segment is drawn below the * commit circle (root commit or merge convergence where the lane is freed). */ readonly hasContinuation: boolean; /** * Whether there is an incoming line from above on the commit's lane (i.e. * the commit was referenced as a parent by an earlier row). When false, * no top line segment is drawn above the commit circle. */ readonly hasTopLine: boolean; } /** * Compute graph rows for an ordered list of commits (topological order, * newest first). Each commit must supply its own `id` and `parentIds`. * * @param commits Topologically sorted commits (newest → oldest). * @returns One `GraphRow` per commit in the same order. */ export declare function computeGraphRows(commits: ReadonlyArray<{ id: string; parentIds?: readonly string[]; }>): GraphRow[]; //# sourceMappingURL=scm-history-graph-lanes.d.ts.map