export interface PackLaneItem { /** Left edge in px (time-scale space). */ x: number; /** Rendered width in px. */ width: number; } export interface PackLanesResult { /** Lane index per input item, in the input's original order. */ lanes: number[]; laneCount: number; } /** * Greedy interval scheduling. Items are visited in ascending `x` order and * each is dropped into the first lane whose last occupant ends at least * `gapPx` before the item starts; a new lane is opened when none fits. * Produces the dense "packed" layout of the timeline design — many * non-overlapping cards share a lane. * * Two implementations, identical output: a direct scan for small inputs, and * an O(n) sweep once the input is large enough for the scan's O(items × lanes) * to bite (10k mutually overlapping cards is ~10^7 comparisons). */ export declare function packLanes(items: PackLaneItem[], gapPx?: number): PackLanesResult; /** An item plus the sort-value lane bucket it belongs to. `null` = no value. */ export interface PackSortValueLaneItem extends PackLaneItem { laneKey: string | null; } /** * Lane per distinct `laneKey`, packed by time within each: rows sharing a value * share a lane, and a value only takes extra (sub-)lanes when two of its own * cards overlap in time. Backs `lanePacking="one-per-sort-value"`. * * Buckets come out in first-seen order, with the no-value bucket last. Lane * order is therefore the caller's row order — the timeline hands over the sorted * row model, so lanes follow the active sort and nothing else. That's * deliberately *not* `groupData`'s rule, which ranks sections by the field's * declared `groupOrder`: a field that is both grouped and sorted can order its * sections and its lanes differently, and the sort is what the mode promises. * Only the no-value-bucket-last half is shared (see `orderBucketKeys`). * * Within a bucket the greedy first-fit of `packLanes` decides sub-lanes, so a * value with no overlapping cards occupies exactly one lane. */ export declare function packLanesBySortValue(items: PackSortValueLaneItem[], gapPx?: number): PackLanesResult; //# sourceMappingURL=pack-lanes.d.ts.map