import { DimensionalValue } from '../types'; /** * A single position-axis input: a plain UV number, a CSS-style keyword ('left'/'center'/…), * or a DimensionalValue carrying px/uv units (resolved to UV by the renderer before transform). */ export type PositionAxisInput = number | string | DimensionalValue; export declare const setColorSpaceMode: (mode: "p3-linear" | "srgb") => void; /** * Convert a true/false boolean into an integer 1/-1 representation * @param value */ export declare const transformBoolean: (value: boolean) => 1 | -1; /** * Parse a CSS color string into finite RGBA channels in the active color space. * * This is a prop `transform` marker: a shader's color prop references it, and the GPU uniform * bridge swaps it for `transformColorGpu` (which builds the packed `d.vec4f`) by function * identity — so this body is never invoked to feed the renderer. It stays a real, distinct * function (the identity the bridge matches on) that returns the parsed channels for any direct * caller. * @param value * @returns `{ r, g, b, a }` finite channels (NaN coerced to 0) */ export declare const transformColor: (value: string) => { r: number; g: number; b: number; a: number; }; /** * Converts a position value into both a GPU node and raw data. * Accepts either an object {x: number, y: number} or a CSS-style string * like "top left", "center", "bottom right", etc. * Normalizes coordinates to a 0-1 range and inverts the y-axis * (so y=0 is top, y=1 is bottom, aligning with typical screen coordinates). * * Like `transformColor`, this is a prop `transform` marker matched by identity in the GPU * uniform bridge (which swaps in `transformPositionGpu`), so it is not called to feed the * renderer; it returns the parsed `{ x, y }` (Y-flipped) for any direct caller. * * @param value - The position value, either {x, y} or a string. * @returns `{ x, y }` in UV space (y inverted so 0 = top, 1 = bottom) */ export declare const transformPosition: (value: { x: PositionAxisInput; y: PositionAxisInput; } | string) => { x: number; y: number; }; /** * Transform angle values into normalized degrees (0-360). * Supports numerical angles with automatic wrapping and CSS-style gradient directions. * * @param value - Angle value (number or CSS gradient direction string) * @returns Normalized angle in degrees (0-360) */ export declare const transformAngle: (value: number | string) => number; /** * Transform edge handling mode strings into numeric values for shader use. * Controls how content behaves when distorted UVs fall outside the 0-1 range. * * @param value - Edge mode string ('stretch', 'transparent', 'mirror', or 'wrap') * @returns Numeric mode value (0 = stretch, 1 = transparent, 2 = mirror, 3 = wrap) */ export declare const transformEdges: (value: string) => number; /** * Transform stroke-position mode strings into numeric values for shader use. Shared by every * analytic shape shader (Circle/Ellipse/Cross/Heart/…), which previously each defined an * identical local copy — a single shared reference lets the GPU bridge's `gpuTransformFor` * recognise it (it is a pure `string → number`, so the GPU-side transform IS this * function). Invalid input defaults to 'center' (1); the value always comes from a fixed select. * * @param value - Stroke position string ('outside', 'center', or 'inside') * @returns Numeric mode value (0 = outside, 1 = center, 2 = inside) */ export declare const transformStrokePosition: (value: string) => number; /** * Color space options for UI select dropdowns * Centralized configuration for color interpolation modes */ export declare const colorSpaceOptions: { label: string; value: string; }[]; /** * Transform color space interpolation mode strings into numeric values for shader use. * Controls how colors are mixed/interpolated in gradient effects. * * @param value - Color space string ('linear', 'oklch', 'oklab', 'hsl', 'hsv', or 'lch') * @returns Numeric mode value (0 = linear RGB, 1 = OKLCh, 2 = OKLAB, 3 = HSL, 4 = HSV, 5 = LCH) */ export declare const transformColorSpace: (value: string) => number; //# sourceMappingURL=transformations.d.ts.map