import { GpuShaderDefinition } from '../../gpu/porters'; import { transformColor, transformPosition } from '../../utilities/transformations'; import { ColorStop } from '../../utilities/colorStops'; export type { ColorStop }; type Style = 'bars' | 'wave' | 'line' | 'dots'; /** Which side of the start→end baseline the waveform grows on. */ type Align = 'mirrored' | 'top' | 'bottom'; export interface ComponentProps { /** * Visualizer style: equalizer bars, a filled wave envelope, an oscilloscope line, or a dot matrix * * Accepts one of: `"bars"`, `"wave"`, `"line"`, `"dots"`. * @default "bars" */ style: Style; /** * Color at the start * * Accepts hex strings (`#ff0000`), RGB objects (`{ r, g, b }`), or CSS color names (`limegreen`). * @default "#3b5bff" */ colorA: Parameters[0]; /** * Color at the end * * Accepts hex strings (`#ff0000`), RGB objects (`{ r, g, b }`), or CSS color names (`limegreen`). * @default "#ff3bd4" */ colorB: Parameters[0]; stops: ColorStop[] | null; /** * Color space for the start→end gradient * * Accepts one of the predefined option values. * @default "oklab" */ colorSpace: string; /** * Where the waveform starts (Color A end) * * Accepts `{ x, y }` objects with values from 0 to 1, or CSS positions like `top center`. * @default {"x":0,"y":0.5} */ from: Parameters[0]; /** * Where the waveform ends (Color B end) * * Accepts `{ x, y }` objects with values from 0 to 1, or CSS positions like `top center`. * @default {"x":1,"y":0.5} */ to: Parameters[0]; /** * Overall signal level (0 = silence). Map this to your own audio level to make the waveform react to real sound. * * @default 1 */ amplitude: number; /** * How busy the signal is across the width (higher = more peaks) * * @default 1 */ frequency: number; /** * Maximum vertical extent of the waveform as a fraction of the canvas height * * @default 0.6 */ height: number; /** * Which side of the start→end baseline the waveform grows on: mirrored around it, above it (top), or below it (bottom) * * Accepts one of: `"mirrored"`, `"top"`, `"bottom"`. * @default "mirrored" */ align: Align; /** * Number of bars (or dot columns) across the width * * @default 32 */ count: number; /** * Bar thickness as a fraction of its column (1 = bars touch) * * @default 0.6 */ barWidth: number; /** * Rounds the bar ends (0 = square, 1 = fully rounded caps) * * @default 1 */ rounding: number; /** * Dot diameter as a fraction of its cell * * @default 0.7 */ dotSize: number; /** * Stroke thickness of the line. A value of one (1) matches the canvas height. * * @default 0.006 */ lineWidth: number; /** * Feathers the wave * * @default 0 */ softness: number; /** * Animation speed of the simulated signal * * Accepts a number between 0 and 3. * @default 1 */ speed: number; /** * Adjusts the starting state, useful for variation * * Accepts a number between 0 and 100. * @default 1 */ seed: number; } export declare const componentDefinition: GpuShaderDefinition; export default componentDefinition; //# sourceMappingURL=index.d.ts.map