/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** What a lane's track takes beyond its weight: 1px of casing and 2px clear, either side (px). */ export declare const LANE_TRACK_PAD = 6; /** A caption's track: its knockout and 1px clear either side (px). */ export declare const CAPTION_TRACK: number; /** A link as its bands are planned: its rows, by their place top to bottom, and its ends across the page. */ export interface PlannedLink { /** The source's row. */ readonly from: number; /** The destination's row. */ readonly to: number; /** The source's end, across the page. */ readonly sourceEnd: number; /** The destination's start, across the page. */ readonly destinationStart: number; /** Its weight: its stroke's width. */ readonly weight: number; /** Whether it has a caption: a link with no quantity takes no caption track. */ readonly captioned: boolean; } /** A track a band holds: the rule it opens, and its centre's place down the band, from the band's top. */ export interface LaneTrack { readonly rule: number; readonly centre: number; } /** The bands a host opens its rules into, and what each link takes of them. */ export interface LanePlan { /** Each opened rule's band, its height, by the rule. A rule left out stays a plain rule. */ readonly bands: ReadonlyMap; /** Each link's lane, for a loopback: its track. In the order given. */ readonly lanes: readonly (LaneTrack | undefined)[]; /** Each one-row link's caption track, for one with a caption. In the order given. */ readonly captions: readonly (LaneTrack | undefined)[]; } /** * Plans the bands a host's rules open into for its links. * * @param rows - How many rows there are, top to bottom * @param links - The links whose two ends are on the rows, in drawing order * @returns The bands, by the rule each opens, and what each link takes of them */ export declare function planLanes(rows: number, links: readonly PlannedLink[]): LanePlan; /** A band as laid out: its top and its bottom, down the page. */ export interface LaidBand { readonly top: number; readonly bottom: number; } /** * Where an S's caption is centred, down the page: the middle of the band its * riser crosses nearest its mid-height — `undefined` where it crosses none, * and the caption stays on the riser at its mid-height. * * @param crossed - The bands between the S's two rows, as laid out * @param mid - The riser's mid-height * @returns The caption's centre */ export declare function sCaptionAt(crossed: readonly LaidBand[], mid: number): number | undefined; //# sourceMappingURL=lanes.d.ts.map