import { Map } from "maplibre-gl"; /** * Configuration options for feature transitions. * @interface TransitionOptions * @property {number} [duration=1000] - Duration of the transition in milliseconds * @property {string} [ease="linear"] - Easing function to use for the transition * @property {number} [delay=0] - Delay before starting the transition in milliseconds * @property {Record} [paint] - Paint properties to transition, mapping property names to arrays of values * @property {() => void} [onComplete] - Callback function to execute when transition completes * @property {() => void} [onStart] - Callback function to execute when transition starts */ export interface TransitionOptions { duration?: number; ease?: "linear" | "quad" | "cubic" | "elastic" | "bounce" | "circle" | "exp" | "poly" | "sin"; delay?: number; paint?: Record; onComplete?: () => void; onStart?: () => void; } /** * Represents the current state of a feature's transition properties. * @interface TransitionState * @property {string | number} [key: string] - Maps style property names to their current values */ export interface TransitionState { [key: string]: string | number; } /** * Collection of d3 scales used for transitioning different properties. * @interface TransitionScales * @property {any} [key: string] - Maps transition keys to their corresponding d3 scales */ export interface TransitionScales { [key: string]: any; } declare module "maplibre-gl" { interface Map { T: { (feature: any, options?: TransitionOptions): void; transitions: Set; listLayerTransitions: (layerId: string) => any[]; reverseScale: (scale: any, currentTime: number, easeFn: any) => any; }; transition: { (feature: any, options?: TransitionOptions): void; transitions: Set; listLayerTransitions: (layerId: string) => any[]; reverseScale: (scale: any, currentTime: number, easeFn: any) => any; }; } } /** * Converts a camelCase string to kebab-case. * @param {string} str - The string to convert * @returns {string} The converted kebab-case string */ declare function camelToKebab(str: string): string; /** * Detects if values are colors and returns the appropriate interpolator * @param {Array} values - Array of values to interpolate between * @returns {Function|null} The appropriate interpolator function or null if not colors */ declare function getColorInterpolator(values: (string | number)[]): ((t: number) => string) | null; /** * Initializes the transition plugin on a MapLibre map instance. * This function adds the transition functionality to the map object and sets up * the necessary methods and properties. * * @param {Map} map - The MapLibre map instance to initialize */ export declare function init(map: Map): void; /** * Default export object that can be used as a plugin. * This allows the library to be used as a MapLibre GL plugin. */ declare const _default: { init: typeof init; }; export default _default; export { camelToKebab, getColorInterpolator };