mermaid
Version:
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
41 lines (40 loc) • 1.25 kB
TypeScript
/**
* Configuration constants for the Swimlanes layout algorithm.
* Centralizes all magic numbers and default values for maintainability.
*/
/**
* Edge routing and spacing constants
*/
export declare const EDGE_ROUTING: {
/** Spacing between parallel edges in the same corridor (px) */
readonly EDGE_GAP: 12;
/** Horizontal offset from lane boundary to corridor center (px) */
readonly LANE_MARGIN: 20;
};
/**
* Numerical precision constants
*/
export declare const PRECISION: {
/** Epsilon for floating-point comparisons */
readonly EPSILON: 0.000001;
};
/**
* Layer assignment constants
*/
export declare const LAYERING: {
/** Default number of iterations for gravity-based layering */
readonly GRAVITY_ITERATIONS: 8;
/** Maximum number of passes for crossing-based rank optimization */
readonly MAX_CROSSING_OPTIMIZATION_PASSES: 4;
/** Whether to compact single-input nodes by default */
readonly DEFAULT_COMPACT_SINGLE_INPUT: true;
};
/**
* Coordinate assignment constants
*/
export declare const COORDINATES: {
/** Default vertical gap between layers (px) */
readonly DEFAULT_LAYER_GAP: 100;
/** Default horizontal gap between nodes (px) */
readonly DEFAULT_NODE_GAP: 40;
};