/** * Generates a unique ID with optional prefix. * * @param prefix - Optional prefix for the ID. * @returns Unique identifier string. */ export declare function generateId(prefix?: string): string; /** * Debounces a function call. * * @param fn - Function to debounce. * @param delay - Delay in milliseconds. * @returns Debounced function. */ export declare function debounce void>(fn: T, delay: number): (...args: Parameters) => void; /** * Throttles a function call. * * @param fn - Function to throttle. * @param limit - Time limit in milliseconds. * @returns Throttled function. */ export declare function throttle void>(fn: T, limit: number): (...args: Parameters) => void; /** * Clamps a value between min and max. * * @param value - Value to clamp. * @param min - Minimum value. * @param max - Maximum value. * @returns Clamped value. */ export declare function clamp(value: number, min: number, max: number): number; /** * Formats a date string for display. * * @param dateStr - ISO date string. * @returns Formatted date string. */ export declare function formatDate(dateStr: string | null | undefined): string; /** * Gets the best available date from STAC item properties. * Checks datetime, start_datetime, and end_datetime in order. * * @param properties - STAC item properties. * @returns Date string or null. */ export declare function getItemDate(properties: Record): string | null; /** * Formats a datetime string for display. * * @param dateStr - ISO datetime string. * @returns Formatted datetime string. */ export declare function formatDateTime(dateStr: string | null | undefined): string; /** * Truncates a string to a maximum length. * * @param text - String to truncate. * @param maxLength - Maximum length. * @returns Truncated string. */ export declare function truncate(text: string, maxLength: number): string; /** * Formats a bounding box for display. * * @param bbox - Bounding box [west, south, east, north]. * @returns Formatted bbox string. */ export declare function formatBbox(bbox: [number, number, number, number]): string; /** * Builds CSS class string from conditions. * * @param classes - Object mapping class names to boolean conditions. * @returns Space-separated class string. */ export declare function classNames(classes: Record): string; /** * Checks if a value is a valid bbox. * * @param bbox - Value to check. * @returns True if valid bbox. */ export declare function isValidBbox(bbox: unknown): bbox is [number, number, number, number]; /** * Formats file size for display. * * @param bytes - Size in bytes. * @returns Formatted size string. */ export declare function formatFileSize(bytes: number): string; //# sourceMappingURL=helpers.d.ts.map