import { SchedulerEventOccurrence, SchedulerEventOccurrencePlaceholder } from "../models/index.js"; import { Adapter } from "../use-adapter/index.js"; /** * Places event occurrences for a timeline UI. */ export declare function useEventOccurrencesWithTimelinePosition(parameters: useEventOccurrencesWithTimelinePosition.Parameters): useEventOccurrencesWithTimelinePosition.ReturnValue; /** * Pure helper that returns the lane count (`maxIndex`) for a set of * occurrences. Equivalent to `useEventOccurrencesWithTimelinePosition().maxIndex` * but callable outside React (e.g. inside a `useMemo`). */ export declare function computeOccurrencesMaxIndex(adapter: Adapter, occurrences: readonly SchedulerEventOccurrence[]): number; export declare namespace useEventOccurrencesWithTimelinePosition { interface Parameters { /** * The occurrences without the position information */ occurrences: readonly SchedulerEventOccurrence[]; /** * Maximum amount of columns an event can span across. */ maxSpan: number; } interface EventOccurrencePosition { /** * The first (1-based) index of the row / column the event should be rendered in. */ firstIndex: number; /** * The last (1-based) index of the row / column the event should be rendered in. */ lastIndex: number; } interface EventOccurrenceWithPosition extends SchedulerEventOccurrence { position: EventOccurrencePosition; } interface EventOccurrencePlaceholderWithPosition extends SchedulerEventOccurrencePlaceholder { position: EventOccurrencePosition; } type EventRenderableOccurrenceWithPosition = EventOccurrenceWithPosition | EventOccurrencePlaceholderWithPosition; interface ReturnValue { /** * The occurrences augmented with position information */ occurrences: EventOccurrenceWithPosition[]; /** * The biggest index an event with position has on this time frame. */ maxIndex: number; } }