import { ColorStop } from '@acrodata/gradient-parser'; /** * Reorder an element at a specified index by condition * * @param array The original array * @param index The element at this index will be checked and moved to its correct sorted location. * @param compareWith1 The comparison function used to determine if the element needs to move left. * @param compareWith2 The comparison function used to determine if the element needs to move right. * @param callback The callback function after the elements have been swapped. * @returns */ export declare function reorderElementByCondition(array?: T[], index?: number, compareWith1?: (a: T, b: T) => boolean, compareWith2?: (a: T, b: T) => boolean, callback?: (newIndex: number) => void): T[]; /** * Linearly interpolate between two colors. * * @param fromColor The starting color in any format supported by TinyColor. * @param toColor The ending color in any format supported by TinyColor. * @param percentage The interpolation percentage between 0 (`fromColor`) and 1 (`toColor`) * @returns */ export declare function interpolateColor(fromColor: string, toColor: string, percentage?: number): string; /** * Fill undefined offset in stops. * * @param stops * @returns */ export declare function fillUndefinedOffsets(stops: ColorStop[]): ColorStop[]; /** * Reverse the color stops array. * * @param stops * @returns */ export declare function reverseColorStops(stops: ColorStop[]): ColorStop[]; /** * Convert angle to percentage (e.g. `45deg`, `0.25turn`, `3.14rad`, `100grad`). * * @param value * @param unit * @returns */ export declare function angleToPercentage(value: number, unit: string): number; /** * Convert angle values in the gradient stops array to percentages. * * @param stops * @returns */ export declare function convertAngleToPercentage(stops: ColorStop[]): ColorStop[]; export declare const angleUnits: string[]; export declare const lengthUnits: string[]; export declare const positionXKeywords: string[]; export declare const positionYKeywords: string[]; export declare const rectangularColorSpaces: string[]; export declare const polarColorSpaces: string[]; export declare const hueInterpolationMethods: string[];