import type { CalendarEvent, EventColumn } from "./types"; /** A horizontal banner placement: which day column it starts on, how many days * it spans, and which lane (row) it sits in. Used by the month grid and the * week's all-day row. */ export interface LaneBar { event: CalendarEvent; startCol: number; span: number; lane: number; } /** True for an event that occupies whole days rather than a slot in one. */ export declare function isBanner(event: CalendarEvent): boolean; /** * The order events take within a day, and the order lanes are handed out. * * Banners lead — a bar that runs Monday to Friday must sit ABOVE the meetings * inside those days, or it gets a different lane every week row and stops reading * as one continuous thing. Longest first among them, so the widest bar anchors the * top lane. Timed events then follow in clock order. */ export declare function compareEvents(a: CalendarEvent, b: CalendarEvent): number; /** * Pack day-spanning events into horizontal lanes across a `numDays` window * starting at `rangeStart`. Greedy first-fit: an event takes the topmost lane * whose last bar ends before this event starts, else a new lane. Deterministic. * * Pure over the list it is handed, which keeps a per-resource split (one call per * group) a caller-side concern. */ export declare function packEventLanes(events: CalendarEvent[], rangeStart: Date, numDays: number): { bars: LaneBar[]; lanes: number; }; /** * How many event lanes fit in a measured week row, and whether the row must give * one back to the "+N more" chip. The cap is a function of the height actually * measured — a constant drew three lanes into a 20px row, over the next week's * dates. */ export declare function fitLanes(availableHeight: number, laneHeight: number, laneGap: number, neededLanes: number, overflowChipHeight: number): { visibleLanes: number; overflows: boolean; }; /** * The minute window a time grid should open on: the earliest event in view, and * only where there is none does the clock (or the configured day start) decide. A * fixed "an hour before now" opened an empty grid on any week whose events sit * outside the current wall-clock hour. */ export declare function initialScrollMinutes(events: { start: Date; }[], daysInRange: Date[], now: Date, dayStartMinutes: number): number; /** * Position timed events for a single grid day into side-by-side columns: events * that overlap in time share the day's width rather than stack. * * Overlap CLUSTERS — a maximal run where each event overlaps an earlier one — are * first-fit into columns, and every event in a cluster takes the cluster's column * total so widths line up: width = 1/columns, left = column/columns. * * Pure and deterministic; input order does not matter. Pass only timed events — * all-day ones are the caller's concern. */ export declare function layoutDayColumns(day: Date, events: CalendarEvent[]): EventColumn[];