import type { GraphLayout } from '../editing.js'; import type { MatrixGroup, WorkflowEngine } from '../engine.js'; import { type WorkflowJob } from './types.js'; /** The jobs a level shows: those an `if` doesn't rule out, with each matrix collapsed into one job. */ export declare function displayJobsOf(engine: WorkflowEngine, jobs: Record, matrixGroups: Record): Record; export interface ComputedGraphLayout { /** Columns of boxes, each box the jobs drawn as one node. */ dependencyCols: string[][][]; /** Each box's row; above a box, rows the layout leaves empty stay as space. */ rowSlots: number[][]; /** Each column's number; between two drawn columns, numbers skipped stay as space. */ colSlots: number[]; /** Each job's needs that draw a connector, sorted. */ directDeps: Record; /** The jobs that need each job directly, sorted. */ dependents: Record; displayJobs: Record; } /** Levels `jobs` into columns of boxes, by their needs or by a stored layout. */ export declare function computeGraphLayout(engine: WorkflowEngine, jobs: Record, matrixGroups: Record, layout?: GraphLayout): ComputedGraphLayout; /** Hops from `job` to each job it leads to or follows from, by breadth-first walks both ways. */ export declare function hopDistances(job: string, directDeps: Record, dependents: Record): Map; /** Each job's place on the graph from its `position`; none when no job has one. */ export declare function positionsOf(jobs: Record): GraphLayout | undefined;