import { PropConfig } from '../types'; /** * Multi-stop color gradient primitive — the declarative half. * * A single prop (`stops`) holds an arbitrary, user-editable list of `{ color, position }` pairs. * This module owns the declarative, CPU-side pieces shared across the library: the `ColorStop` shape, the * `colorStopsTransform` identity marker, stop sorting/resolution, and the standard `stops` * PropConfig. The GPU-side packing + unroll live in `gpu/kit/colorStops.ts`; the uniform bridge * expands a `stops` prop (identified by the `colorStopsTransform` marker) into the packed struct * array fields. */ export declare const MAX_COLOR_STOPS = 8; export interface ColorStop { /** CSS color string (hex, rgb, named, etc.) */ color: string; /** Position along the gradient axis, 0–1 */ position: number; } /** * Sentinel marker used as the `stops` prop's `transform`. It is never invoked to produce a * value — the uniform bridge intercepts the prop by this identity and expands it into the * packed color-stops array fields. */ export declare const colorStopsTransform: (value: any) => any; /** * Stable sort stops by position (CPU-side). Keeps `{ color, position }` pairs together — * sorting positions independently of colors would silently scramble the gradient. */ export declare function sortStops(stops: ColorStop[]): ColorStop[]; /** * The effective sorted stop list for a LinearGradient's props: explicit `stops` (sorted) * when present and non-empty, otherwise the legacy two-color [colorA@0, colorB@1] pair. * Shared by core and the editor so they always agree. */ export declare function resolveStops(props: { stops?: ColorStop[] | null; colorA?: string; colorB?: string; }): ColorStop[]; /** * The standard `stops` PropConfig shared by every multi-stop gradient. Default `null` → the shader * runs its literal original two-colour (colorA/colorB) path, so legacy presets and npm consumers * stay byte-identical. Recompiles only when the unrolled structure changes: presence toggling * (null ↔ multi) or the active stop count changing; same-count colour/position edits update the * uniform arrays in place. `effective` collapses the legacy regime (≤1 stop) to 0. */ export declare function colorStopsPropConfig(): PropConfig; //# sourceMappingURL=colorStops.d.ts.map