import React from 'react'; import { type ColorValue } from '../utils/voronoi.js'; /** Props for {@link VoronoiBackground}. */ export interface VoronoiBackgroundProps { /** * Primary color for the gradient (RGB object or hex string, e.g. `'#ff0000'`). * When `secondaryColor` is omitted, the hue and saturation of this color are * used to derive a monochromatic gradient via HSV interpolation. */ primaryColor: ColorValue; /** * Secondary/end color for the gradient (RGB object or hex string). * When omitted, the secondary color is derived from `primaryColor` via HSV: * hue and saturation are preserved, value is set to 90 (bright end), while * `primaryColor`'s value is replaced with 10 (dark end). */ secondaryColor?: ColorValue; /** * Seed for deterministic random generation. * If not provided, uses current timestamp. * * @remarks This value is only read on initial mount. Changes to this prop * after the component has mounted are ignored. */ seed?: number; /** * Z-index for layering the background. * Default: -1 (behind everything) */ zIndex?: number; /** * Opacity of the entire background. * Default: 1 (fully opaque) */ opacity?: number; /** * Optional overlay color with opacity to darken/lighten the background. * Useful for improving contrast with modal content. * Example: 'rgba(0, 0, 0, 0.3)' for 30% black overlay * * @remarks * This value must not take untrusted input. Only pass values from trusted * sources (e.g. predefined constants, validated user selections). * Invalid CSS color values will be silently ignored by the browser. */ overlay?: string; /** * Blur amount in pixels applied to the triangles. * Default: 0 (no blur beyond anti-aliasing) */ blur?: number; /** * CSS class name to apply to the container div. */ className?: string; /** * Additional inline styles for the container div. */ style?: React.CSSProperties; /** * When true, disables pointer events on both the SVG canvas and the overlay div, * allowing clicks to pass through to elements beneath. Defaults to true. */ pointerEventsNone?: boolean; /** * Number of internal seed points used for the Delaunay triangulation. * Higher values produce more polygons. Default: 98 */ pointCount?: number; /** * Number of points placed along each viewport edge to ensure full coverage. * Default: 20 */ edgePointCount?: number; /** * Divisor applied to the viewport area to compute the minimum triangle area threshold. * A higher value allows smaller triangles to survive pruning (more polygons). * A lower value prunes more aggressively (fewer, larger polygons). Default: 750 */ minAreaDivisor?: number; /** * Maximum number of small-triangle pruning iterations. * Default: 10 */ maxPruningIterations?: number; } /** * Renders a full-viewport animated Voronoi triangle mesh as a fixed-position background. * Uses a seeded PRNG (Mulberry32) for deterministic point generation and D3-Delaunay * for triangulation. Memoized to prevent unnecessary re-renders. * * @throws {ReactSharedError} If `primaryColor` or `secondaryColor` is an invalid hex color string * * @example * * // with secondary color and overlay: * */ export declare const VoronoiBackground: React.NamedExoticComponent>; //# sourceMappingURL=VoronoiBackground.d.ts.map