/** * Clamps a value between a minimum and maximum. * * @param value - The value to clamp * @param min - Minimum value * @param max - Maximum value * @returns The clamped value */ export declare function clamp(value: number, min: number, max: number): number; /** * Formats a number for display with appropriate precision. * * @param value - The value to format * @param decimals - Number of decimal places (default: 2) * @returns Formatted string */ export declare function formatNumber(value: number, decimals?: number): string; /** * Formats a point count for display. * * @param count - The point count * @returns Formatted string like "11.4M pts" or "500K pts" */ export declare function formatPointCount(count: number | undefined): string; /** * Formats a bounding box for display. * * @param bbox - Bounding box [west, south, east, north] * @returns Formatted string */ export declare function formatBbox(bbox: [number, number, number, number]): string; /** * Generates a unique ID with optional prefix. * * @param prefix - Optional prefix * @returns Unique ID 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 - Minimum time between calls in milliseconds * @returns Throttled function */ export declare function throttle void>(fn: T, limit: number): (...args: Parameters) => void; /** * Creates a CSS class name string from multiple class names. * * @param classNames - Class names (strings or falsy values) * @returns Combined class name string */ export declare function classNames(...classNames: (string | undefined | null | false)[]): string; /** * Truncates a string to a maximum length with ellipsis. * * @param str - String to truncate * @param maxLength - Maximum length * @returns Truncated string */ export declare function truncate(str: string, maxLength: number): string; /** * Extracts a short name from a STAC item ID. * * @param itemId - The full item ID * @param maxLength - Maximum length (default: 30) * @returns Shortened name */ export declare function getItemShortName(itemId: string, maxLength?: number): string; /** * Extracts metadata string from a STAC item for display. * * @param item - STAC item * @returns Metadata string (point count and/or date) */ export declare function getItemMetadata(item: { properties: { datetime?: string | null; start_datetime?: string; end_datetime?: string; 'pointcloud:count'?: number; 'pc:count'?: number; [key: string]: unknown; }; bbox?: number[]; }): string; /** * Extracts bounding box from a GeoJSON geometry. * * @param geometry - GeoJSON geometry * @returns Bounding box [west, south, east, north] */ export declare function getBboxFromGeometry(geometry: GeoJSON.Geometry): [number, number, number, number]; //# sourceMappingURL=helpers.d.ts.map