/** * Gooey morphing utilities — pure functions for SVG filter and path generation. * * @module @mks2508/mks-ui/react/primitives/waapi/Gooey */ /** Gooey animation timing constants. */ export declare const GOOEY_TIMING: { /** Expand duration in ms — spring-like with room for overshoot */ readonly EXPAND_DURATION: 550; /** Collapse duration in ms — snappier settle, no overshoot */ readonly COLLAPSE_DURATION: 400; }; /** Default gooey filter parameters. */ export declare const GOOEY_DEFAULTS: { /** Blur = height * BLUR_RATIO */ readonly BLUR_RATIO: 0.15; /** feColorMatrix alpha channel multiplier */ readonly ALPHA_GAIN: 20; /** feColorMatrix alpha channel offset */ readonly ALPHA_OFFSET: -10; /** Default pill height (px) */ readonly PILL_HEIGHT: 34; /** Quadratic bezier curve factor at full expansion */ readonly CURVE_FACTOR: 14; /** Max body corner radius (px) */ readonly MAX_CORNER_RADIUS: 16; /** Corner radius to body-height ratio */ readonly CORNER_RATIO: 0.45; /** Minimum body height delta to show rounded corners */ readonly MIN_BODY_DELTA: 8; }; /** * Compute the optimal Gaussian blur for a gooey filter based on element height. * * @param height - Element height in pixels * @returns Blur stdDeviation value */ export declare function computeBlur(height: number): number; /** * Build the feColorMatrix `values` string. * * @param gain - Alpha multiplier (default: 20) * @param offset - Alpha offset (default: -10) * @returns Matrix values string for feColorMatrix */ export declare function buildColorMatrixValues(gain?: number, offset?: number): string; /** * Build the CSS filter string with gooey + optional drop-shadow outline. * * @param filterId - SVG filter ID to reference * @param outlineBlur - Drop-shadow blur (px) * @param outlineColor - Drop-shadow color * @param outlineLayers - Number of stacked drop-shadows for thickness * @returns CSS filter property value */ export declare function buildFilterString(filterId: string, outlineBlur?: number, outlineColor?: string, outlineLayers?: number): string; type PathFn = (pw: number, bw: number, th: number, t: number, ph: number) => string; /** * Memoize a path generation function — caches last result to avoid * recomputing identical paths on consecutive animation frames. * * @param fn - Path generation function * @returns Memoized function */ export declare function memoizePath(fn: PathFn): PathFn; /** * Generate an SVG path for a pill that morphs downward into a body blob. * Adapted from goey-toast's morphPathRaw. * * @param pw - Pill width * @param bw - Body width (expanded) * @param th - Total height (pill + body) * @param t - Transition progress 0 (pill only) → 1 (full blob) * @param ph - Pill height (default: PILL_HEIGHT) * @returns SVG path d-string */ export declare function morphPathDown(pw: number, bw: number, th: number, t: number, ph?: number): string; /** * Generate an SVG path for a pill that morphs UPWARD into a body blob. * Used for DynamicToggle's bubble-above-pill layout. * * @param pw - Pill width * @param bw - Body (bubble) width * @param th - Total height (bubble + pill) * @param t - Transition progress 0 (pill only) → 1 (full blob with bubble) * @param ph - Pill height * @returns SVG path d-string */ export declare function morphPathUp(pw: number, bw: number, th: number, t: number, ph?: number): string; /** Memoized versions for animation performance. */ export declare const morphPathDownMemo: PathFn; export declare const morphPathUpMemo: PathFn; export {}; //# sourceMappingURL=gooey-utils.d.ts.map