export interface LaneEvent { start: number; end: number; _time: string; duration: number; category: string | null; color: string; } export type LaneSeries = LaneEvent[][]; export type Lanes = (string | number)[]; /** * Converts a CSS color (including OKLCH, hex, and RGBA) to RGBA with the supplied opacity. * Replaces any existing alpha and clamps opacity to the range [0, 1]. */ export declare function addOpacityToColor(color: string, opacity?: number): string; /** * Computes the relative luminance of a hex color (0 = black, 1 = white). * Values below 0.5 are considered dark mode. */ export declare function computeLuminance(hex: string): number; export declare function getAlternateColor(hex: string, percent: number): string; export type Timezone = { utcOffset: number; } | { ianaTimezone: string; } | { serializedTimezone: string; } | object; export declare const toTimestamp: (dateStr: string, timezone?: Timezone) => number; export type MapDataToTimelineType = { resultLimit: number; x: (string | number)[]; y: (string | number)[]; duration: number[]; category?: (string | number | null)[]; dataColors?: string | string[]; seriesColors?: string | string[]; additionalTooltipValues?: object[] | object; timezone?: Timezone; defaultColor?: string; }; export declare function mapDataToTimeline(mapDataToTimelineType: MapDataToTimelineType): { laneSeries: any[]; lanes: (string | number)[]; categoricalColors: Map; tickInterval: string; hasInvalidData?: boolean; }; export declare const drawRoundedRect: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number) => void; type TruncationType = 'ellipsisEnd' | 'ellipsisMiddle' | 'ellipsisStart'; export declare const truncateText: (text: string, maxWidth: number, truncationType: TruncationType, font?: string) => string; export declare const getTickInterval: (averageDiff: any) => "1mo" | "1s" | "1m" | "30m" | "1h" | "12h" | "1d" | "7d"; export declare function convertTickIntervalToMs(tickInterval: any): 1000 | 60000 | 1800000 | 3600000 | 43200000 | 86400000 | 604800000 | 2750000000; export declare function calculateMaxNumberOfTicks(availableWidth: any, pixelPerLabel: any, extraSpacing: any): number; export declare const isSafari: () => boolean; export declare const tooltipLocaleTimeFormat: (displaySeconds: any) => Intl.DateTimeFormatOptions; type TooltipAnchorPoint = { x: number; y: number; }; export declare const isNearbyTooltipAnchor: ({ anchorPoint, previousAnchorPoint, }: { anchorPoint: TooltipAnchorPoint; previousAnchorPoint: TooltipAnchorPoint | null; }) => boolean; /** * Creates uPlot hooks for Timeline canvas scaling. * This handles canvas resolution for Timeline's custom drawing approach. * @param scaleFactor - Dashboard zoom factor * @param onReady - Optional callback invoked after canvas setup */ export declare const createTimelineCanvasScaleHooks: (scaleFactor: number, onReady?: (u: any) => void) => { init: (u: any) => void; setSize: (u: any) => void; }; export {}; //# sourceMappingURL=timelineUtils.d.ts.map