import { BBox, DiagramNode, DynamicViewFlow, NonEmptyArray, StepPath } from '@likec4/core/types'; import { Compound, Step } from './_types'; import * as kiwi from '@lume/kiwi'; export interface BBoxVars { x1: kiwi.Expression | kiwi.Variable; y1: kiwi.Expression | kiwi.Variable; x2: kiwi.Expression | kiwi.Variable; y2: kiwi.Expression | kiwi.Variable; } export declare const Strength: { required: number; strong: number; medium: number; soft: number; weak: number; }; export declare class SequenceViewLayouter { #private; constructor({ actors, steps, compounds, flow, collapsedFlows, }: { actors: NonEmptyArray; steps: Array; compounds: Array; flow: DynamicViewFlow; collapsedFlows: StepPath[]; }); getSubflowAreas(): Array<{ id: StepPath; } & BBox>; getActorBox(actor: DiagramNode): BBox; getCompoundBoxes(): Array; getPortCenter(step: Step, type: 'source' | 'target'): { cx: number; cy: number; height: number; }; isStepCollapsed(step: Step): boolean; getViewBounds(): { x: number; y: number; width: number; height: number; }; private actorBox; private addActors; private addStep; /** * Recursively adds a compound and its nested compounds to the layout. * Also updates offsets of the actor boxes to accommodate the compound. */ private addCompound; private ensureRow; private collapseRect; private getRectBounds; private wrapAroundRect; private createSubflowAreas; private newVar; /** * Adds a required constraint: * Also adds a weak constraint == if the operator is <= or >= */ private require; /** * Adds a constraint with medium strength by default */ private constraint; private put; }