@votax572002/fluxfx 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.d.cts CHANGED
@@ -1,6 +1,12 @@
1
1
  import React from 'react';
2
2
 
3
3
  type QualityLevel = 'low' | 'medium' | 'high';
4
+ type ThemeMode = 'auto' | 'light' | 'dark';
5
+ type LayerMode = 'background' | 'overlay';
6
+ type PrismShape = 'prism' | 'torus' | 'orb';
7
+ type DeviceTarget = 'all' | 'desktop' | 'mobile' | 'tablet';
8
+ type ImageFitMode = 'cover' | 'contain';
9
+ type ImagePosition = 'center' | 'top' | 'bottom';
4
10
  interface PerformanceOptions {
5
11
  /** Enable adaptive DPR scaling when FPS drops (default: true) */
6
12
  dynamicResolution?: boolean;
@@ -16,11 +22,32 @@ interface PerformanceOptions {
16
22
  respectReducedMotion?: boolean;
17
23
  /** Track container scroll progress (uScroll) and velocity (uScrollVel) (default: false) */
18
24
  trackScroll?: boolean;
25
+ /** Target specific device class: 'all' | 'desktop' | 'mobile' | 'tablet' (default: 'all') */
26
+ device?: DeviceTarget;
27
+ /** Minimum viewport width in px required to mount/run the effect */
28
+ minWidth?: number;
29
+ /** Maximum viewport width in px allowed to mount/run the effect */
30
+ maxWidth?: number;
31
+ /** Shortcut: disable effect cleanly on mobile viewports (< mobileBreakpoint) */
32
+ disableOnMobile?: boolean;
33
+ /** Shortcut: disable effect cleanly on desktop viewports (>= mobileBreakpoint) */
34
+ disableOnDesktop?: boolean;
35
+ /** Viewport breakpoint in px separating mobile vs desktop (default: 768) */
36
+ mobileBreakpoint?: number;
19
37
  }
20
38
  interface FXOptions extends PerformanceOptions {
21
39
  speed?: number;
22
40
  quality?: QualityLevel;
41
+ bgColor?: string;
23
42
  colors?: string | [string, string, string] | string[];
43
+ theme?: ThemeMode;
44
+ lightColors?: string | [string, string, string] | string[];
45
+ darkColors?: string | [string, string, string] | string[];
46
+ scrollColors?: string[] | Array<[string, string]>;
47
+ layer?: LayerMode;
48
+ preserveBg?: boolean;
49
+ adaptToSurface?: boolean;
50
+ overlayOpacity?: number;
24
51
  color1?: string;
25
52
  color2?: string;
26
53
  color3?: string;
@@ -30,85 +57,127 @@ interface FXOptions extends PerformanceOptions {
30
57
  perspective?: number;
31
58
  glare?: boolean;
32
59
  strength?: number;
60
+ shape?: PrismShape;
61
+ depth?: number;
62
+ gloss?: number;
63
+ distortion?: number;
64
+ baseImage?: string;
65
+ revealImage?: string;
66
+ image?: string;
67
+ fit?: ImageFitMode;
68
+ position?: ImagePosition;
69
+ softness?: number;
70
+ edgeNoise?: number;
71
+ edgeGlow?: number;
72
+ ambient?: boolean;
73
+ clickReveal?: boolean;
74
+ activeIndex?: number;
75
+ focused?: boolean;
76
+ wrap?: boolean;
77
+ spread?: number;
78
+ depthScale?: number;
79
+ curve?: number;
80
+ parallax?: boolean | number;
81
+ focusOffsetX?: number;
82
+ focusScale?: number;
83
+ spotRadius?: number;
84
+ spotIntensity?: number;
85
+ spotPosition?: [number, number] | 'center' | 'left' | 'right';
86
+ onChange?: (detail: {
87
+ index: number;
88
+ focused: boolean;
89
+ element: HTMLElement | null;
90
+ }) => void;
33
91
  [key: string]: unknown;
34
92
  }
35
93
 
36
94
  declare function useFX<T extends HTMLElement = HTMLDivElement>(effect: string | string[], options?: FXOptions, disabled?: boolean): React.RefObject<T | null>;
37
- interface AuroraProps extends React.HTMLAttributes<HTMLElement> {
38
- as?: React.ElementType;
39
- speed?: number;
40
- quality?: 'low' | 'medium' | 'high';
41
- colors?: [string, string, string];
42
- interactive?: boolean;
43
- respectReducedMotion?: boolean;
44
- disabled?: boolean;
95
+ interface DeviceTargetingProps {
96
+ /** Target device class: 'all' | 'desktop' | 'mobile' | 'tablet' (default: 'all') */
97
+ device?: DeviceTarget;
98
+ /** Minimum viewport width in px required to run effect */
99
+ minWidth?: number;
100
+ /** Maximum viewport width in px allowed to run effect */
101
+ maxWidth?: number;
102
+ /** Disable effect cleanly on mobile viewports (< mobileBreakpoint) */
103
+ disableOnMobile?: boolean;
104
+ /** Disable effect cleanly on desktop viewports (>= mobileBreakpoint) */
105
+ disableOnDesktop?: boolean;
106
+ /** Viewport breakpoint in px (default: 768) */
107
+ mobileBreakpoint?: number;
45
108
  }
46
- declare function Aurora({ as, speed, quality, colors, interactive, respectReducedMotion, disabled, children, ...rest }: AuroraProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
47
- interface LiquidMetalProps extends React.HTMLAttributes<HTMLElement> {
109
+ interface WebGLCommonProps extends React.HTMLAttributes<HTMLElement>, DeviceTargetingProps {
48
110
  as?: React.ElementType;
49
111
  speed?: number;
50
- quality?: 'low' | 'medium' | 'high';
51
- colors?: [string, string, string];
112
+ quality?: QualityLevel;
113
+ colors?: string | string[];
114
+ /** Backdrop color (hex/rgb), 'transparent', or omit for automatic light/dark theme surface */
115
+ bgColor?: string;
116
+ /** Theme adaptation mode: 'auto' | 'light' | 'dark' */
117
+ theme?: ThemeMode;
118
+ /** Optional explicit palette for light surfaces */
119
+ lightColors?: string | string[];
120
+ /** Optional explicit palette for dark surfaces */
121
+ darkColors?: string | string[];
122
+ /** Optional scroll-reactive color stops */
123
+ scrollColors?: string[] | Array<[string, string]>;
124
+ /** Track page scroll progress */
125
+ trackScroll?: boolean;
126
+ /** Render behind content ('background') or above cards with pointer-events: none ('overlay') */
127
+ layer?: LayerMode;
128
+ /** Keep underlying website/card background colors untouched */
129
+ preserveBg?: boolean;
130
+ /** Dynamically shift effect palette to contrast with hovered/touched card surfaces */
131
+ adaptToSurface?: boolean;
132
+ /** Opacity when layer='overlay' (default: 0.78) */
133
+ overlayOpacity?: number;
52
134
  interactive?: boolean;
53
135
  respectReducedMotion?: boolean;
54
136
  disabled?: boolean;
55
137
  }
56
- declare function LiquidMetal({ as, speed, quality, colors, interactive, respectReducedMotion, disabled, children, ...rest }: LiquidMetalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
57
- interface FluidProps extends React.HTMLAttributes<HTMLElement> {
58
- as?: React.ElementType;
59
- speed?: number;
60
- quality?: 'low' | 'medium' | 'high';
61
- colors?: [string, string, string];
138
+ interface AuroraProps extends WebGLCommonProps {
139
+ }
140
+ declare function Aurora({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, interactive, respectReducedMotion, disabled, children, ...rest }: AuroraProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
141
+ interface LiquidMetalProps extends WebGLCommonProps {
142
+ }
143
+ declare function LiquidMetal({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, interactive, respectReducedMotion, disabled, children, ...rest }: LiquidMetalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
144
+ interface FluidProps extends WebGLCommonProps {
62
145
  /** How long trails stay visible: 0.90 (fast fade) to 0.995 (long ink trails) */
63
146
  dissipation?: number;
64
147
  /** Brush size of cursor splash (default: 0.0045) */
65
148
  radius?: number;
66
149
  /** Vorticity / swirl strength (default: 1.4) */
67
150
  swirl?: number;
68
- interactive?: boolean;
69
- respectReducedMotion?: boolean;
70
- disabled?: boolean;
71
151
  }
72
- declare function Fluid({ as, speed, quality, colors, dissipation, radius, swirl, interactive, respectReducedMotion, disabled, children, ...rest }: FluidProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
73
- interface TiltCardProps extends React.HTMLAttributes<HTMLElement> {
152
+ declare function Fluid({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, dissipation, radius, swirl, interactive, respectReducedMotion, disabled, children, ...rest }: FluidProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
153
+ interface TiltCardProps extends React.HTMLAttributes<HTMLElement>, DeviceTargetingProps {
74
154
  as?: React.ElementType;
75
155
  maxTilt?: number;
76
156
  scale?: number;
77
157
  perspective?: number;
78
158
  glare?: boolean;
159
+ respectReducedMotion?: boolean;
79
160
  disabled?: boolean;
80
161
  }
81
- declare function TiltCard({ as, maxTilt, scale, perspective, glare, disabled, children, ...rest }: TiltCardProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
82
- interface MagneticProps extends React.HTMLAttributes<HTMLElement> {
162
+ declare function TiltCard({ as, maxTilt, scale, perspective, glare, respectReducedMotion, disabled, children, ...rest }: TiltCardProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
163
+ interface MagneticProps extends React.HTMLAttributes<HTMLElement>, DeviceTargetingProps {
83
164
  as?: React.ElementType;
84
165
  strength?: number;
166
+ respectReducedMotion?: boolean;
85
167
  disabled?: boolean;
86
168
  }
87
- declare function Magnetic({ as, strength, disabled, style, children, ...rest }: MagneticProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
88
- interface InkProps extends React.HTMLAttributes<HTMLElement> {
89
- as?: React.ElementType;
90
- speed?: number;
91
- quality?: 'low' | 'medium' | 'high';
92
- colors?: [string, string, string];
169
+ declare function Magnetic({ as, strength, respectReducedMotion, disabled, style, children, ...rest }: MagneticProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
170
+ interface InkProps extends WebGLCommonProps {
93
171
  /** Ink dispersion / fade retention: 0.92 to 0.996 (default: 0.982) */
94
172
  dissipation?: number;
95
173
  /** Brush radius for cursor ink strokes (default: 0.004) */
96
174
  radius?: number;
97
175
  /** Curl / tendril swirl intensity (default: 1.75) */
98
176
  curl?: number;
99
- interactive?: boolean;
100
- respectReducedMotion?: boolean;
101
- disabled?: boolean;
102
177
  }
103
- declare function Ink({ as, speed, quality, colors, dissipation, radius, curl, interactive, respectReducedMotion, disabled, children, ...rest }: InkProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
104
- interface AetheriaProps extends React.HTMLAttributes<HTMLElement> {
105
- as?: React.ElementType;
106
- speed?: number;
107
- quality?: 'low' | 'medium' | 'high';
108
- colors?: [string, string, string];
109
- /** Water backdrop hex (e.g., '#F5F3EE' for Sumi-e, '#060913' for Abyss) */
110
- bgColor?: string;
111
- /** Auto-detected from bgColor luminance, or pass explicitly (0 = dark abyss, 1 = light water) */
178
+ declare function Ink({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, dissipation, radius, curl, interactive, respectReducedMotion, disabled, children, ...rest }: InkProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
179
+ interface AetheriaProps extends WebGLCommonProps {
180
+ /** Auto-detected from theme/bgColor luminance, or pass explicitly (0 = dark abyss, 1 = light water) */
112
181
  lightMode?: boolean | number;
113
182
  /** Pigment absorption/luminance strength (default: 1.45) */
114
183
  absorptionGain?: number;
@@ -118,10 +187,86 @@ interface AetheriaProps extends React.HTMLAttributes<HTMLElement> {
118
187
  radius?: number;
119
188
  /** Curl swirl intensity (default: 1.85) */
120
189
  curl?: number;
121
- interactive?: boolean;
190
+ }
191
+ declare function Aetheria({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, lightMode, absorptionGain, dissipation, radius, curl, interactive, respectReducedMotion, disabled, children, ...rest }: AetheriaProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
192
+ interface Prism3DProps extends WebGLCommonProps {
193
+ /** 3D SDF sculpture geometry: 'prism' | 'torus' | 'orb' (default: 'prism') */
194
+ shape?: PrismShape;
195
+ /** Camera zoom/depth scale (default: 1.0) */
196
+ depth?: number;
197
+ /** Specular & iridescent gloss intensity (default: 1.0) */
198
+ gloss?: number;
199
+ /** 3D surface twist/displacement strength (default: 0.35) */
200
+ distortion?: number;
201
+ }
202
+ declare function Prism3D({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, shape, depth, gloss, distortion, interactive, respectReducedMotion, disabled, children, ...rest }: Prism3DProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
203
+ interface BrushRevealProps extends WebGLCommonProps {
204
+ /** Default / front image URL (e.g. human portrait) */
205
+ baseImage: string;
206
+ /** Hidden / revealed image URL underneath (e.g. aligned robot portrait) */
207
+ revealImage: string;
208
+ /** Brush radius relative to container height (default: 0.13) */
209
+ radius?: number;
210
+ /** Edge feather softness of the dissolve transition (default: 0.22) */
211
+ softness?: number;
212
+ /** Organic noise dissolve amount along the brush boundary (default: 0.38) */
213
+ edgeNoise?: number;
214
+ /** Luminous accent intensity along the dissolving edge (default: 0.24) */
215
+ edgeGlow?: number;
216
+ /** Trail retention before closing back up: 0.90 (fast) to 0.999 (persistent) (default: 0.985) */
217
+ dissipation?: number;
218
+ /** Image aspect fitting mode: 'cover' | 'contain' (default: 'cover') */
219
+ fit?: ImageFitMode;
220
+ /** Image alignment inside container: 'center' | 'top' | 'bottom' (default: 'center') */
221
+ position?: ImagePosition;
222
+ /** Enable slow ambient idle brush sweep when pointer is inactive (default: false) */
223
+ ambient?: boolean;
224
+ /** Expand brush radius while holding click/touch (default: true) */
225
+ clickReveal?: boolean;
226
+ }
227
+ declare function BrushReveal({ as, baseImage, revealImage, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, radius, softness, edgeNoise, edgeGlow, dissipation, fit, position, ambient, clickReveal, interactive, respectReducedMotion, disabled, children, ...rest }: BrushRevealProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
228
+ interface SpotlightProps extends WebGLCommonProps {
229
+ /** Spotlight halo radius in normalized height units (default: 0.62) */
230
+ spotRadius?: number;
231
+ /** Spotlight brightness intensity (default: 1.0) */
232
+ spotIntensity?: number;
233
+ /** Spotlight origin: 'center' | 'left' | 'right' | [x, y] (default: 'center') */
234
+ spotPosition?: [number, number] | 'center' | 'left' | 'right';
235
+ }
236
+ declare function Spotlight({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, spotRadius, spotIntensity, spotPosition, interactive, respectReducedMotion, disabled, children, ...rest }: SpotlightProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
237
+ interface DepthCarouselProps extends React.HTMLAttributes<HTMLElement>, DeviceTargetingProps {
238
+ as?: React.ElementType;
239
+ /** Index of the centered foreground item (default: 0) */
240
+ activeIndex?: number;
241
+ /** Focus mode: zooms active item to left-center & fades others for detail panels */
242
+ focused?: boolean;
243
+ /** Wrap around seamlessly from last slide to first (default: true) */
244
+ wrap?: boolean;
245
+ /** Toggle focus mode when clicking the centered active slide (default: true) */
246
+ clickToFocus?: boolean;
247
+ /** Horizontal spread percentage per step from center (default: 25) */
248
+ spread?: number;
249
+ /** Scale reduction per depth step (default: 0.22) */
250
+ depthScale?: number;
251
+ /** Y-axis rotation curve angle in degrees per step (default: 10) */
252
+ curve?: number;
253
+ /** Pointer parallax shift in px, or false to disable (default: 18) */
254
+ parallax?: boolean | number;
255
+ /** Horizontal shift % of active slide in focused mode (default: -15) */
256
+ focusOffsetX?: number;
257
+ /** Scale multiplier of active slide in focused mode (default: 1.07) */
258
+ focusScale?: number;
259
+ /** CSS 3D perspective in px (default: 1100) */
260
+ perspective?: number;
122
261
  respectReducedMotion?: boolean;
123
262
  disabled?: boolean;
263
+ /** Fired when active slide index or focus state changes */
264
+ onSlideChange?: (detail: {
265
+ index: number;
266
+ focused: boolean;
267
+ element: HTMLElement | null;
268
+ }) => void;
124
269
  }
125
- declare function Aetheria({ as, speed, quality, colors, bgColor, lightMode, absorptionGain, dissipation, radius, curl, interactive, respectReducedMotion, disabled, children, ...rest }: AetheriaProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
270
+ declare function DepthCarousel({ as, activeIndex, focused, wrap, clickToFocus, spread, depthScale, curve, parallax, focusOffsetX, focusScale, perspective, respectReducedMotion, disabled, onSlideChange, children, ...rest }: DepthCarouselProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
126
271
 
127
- export { Aetheria, type AetheriaProps, Aurora, type AuroraProps, Fluid, type FluidProps, Ink, type InkProps, LiquidMetal, type LiquidMetalProps, Magnetic, type MagneticProps, TiltCard, type TiltCardProps, useFX };
272
+ export { Aetheria, type AetheriaProps, Aurora, type AuroraProps, BrushReveal, type BrushRevealProps, DepthCarousel, type DepthCarouselProps, type DeviceTargetingProps, Fluid, type FluidProps, Ink, type InkProps, LiquidMetal, type LiquidMetalProps, Magnetic, type MagneticProps, Prism3D, type Prism3DProps, Spotlight, type SpotlightProps, TiltCard, type TiltCardProps, type WebGLCommonProps, useFX };
package/dist/react.d.ts CHANGED
@@ -1,6 +1,12 @@
1
1
  import React from 'react';
2
2
 
3
3
  type QualityLevel = 'low' | 'medium' | 'high';
4
+ type ThemeMode = 'auto' | 'light' | 'dark';
5
+ type LayerMode = 'background' | 'overlay';
6
+ type PrismShape = 'prism' | 'torus' | 'orb';
7
+ type DeviceTarget = 'all' | 'desktop' | 'mobile' | 'tablet';
8
+ type ImageFitMode = 'cover' | 'contain';
9
+ type ImagePosition = 'center' | 'top' | 'bottom';
4
10
  interface PerformanceOptions {
5
11
  /** Enable adaptive DPR scaling when FPS drops (default: true) */
6
12
  dynamicResolution?: boolean;
@@ -16,11 +22,32 @@ interface PerformanceOptions {
16
22
  respectReducedMotion?: boolean;
17
23
  /** Track container scroll progress (uScroll) and velocity (uScrollVel) (default: false) */
18
24
  trackScroll?: boolean;
25
+ /** Target specific device class: 'all' | 'desktop' | 'mobile' | 'tablet' (default: 'all') */
26
+ device?: DeviceTarget;
27
+ /** Minimum viewport width in px required to mount/run the effect */
28
+ minWidth?: number;
29
+ /** Maximum viewport width in px allowed to mount/run the effect */
30
+ maxWidth?: number;
31
+ /** Shortcut: disable effect cleanly on mobile viewports (< mobileBreakpoint) */
32
+ disableOnMobile?: boolean;
33
+ /** Shortcut: disable effect cleanly on desktop viewports (>= mobileBreakpoint) */
34
+ disableOnDesktop?: boolean;
35
+ /** Viewport breakpoint in px separating mobile vs desktop (default: 768) */
36
+ mobileBreakpoint?: number;
19
37
  }
20
38
  interface FXOptions extends PerformanceOptions {
21
39
  speed?: number;
22
40
  quality?: QualityLevel;
41
+ bgColor?: string;
23
42
  colors?: string | [string, string, string] | string[];
43
+ theme?: ThemeMode;
44
+ lightColors?: string | [string, string, string] | string[];
45
+ darkColors?: string | [string, string, string] | string[];
46
+ scrollColors?: string[] | Array<[string, string]>;
47
+ layer?: LayerMode;
48
+ preserveBg?: boolean;
49
+ adaptToSurface?: boolean;
50
+ overlayOpacity?: number;
24
51
  color1?: string;
25
52
  color2?: string;
26
53
  color3?: string;
@@ -30,85 +57,127 @@ interface FXOptions extends PerformanceOptions {
30
57
  perspective?: number;
31
58
  glare?: boolean;
32
59
  strength?: number;
60
+ shape?: PrismShape;
61
+ depth?: number;
62
+ gloss?: number;
63
+ distortion?: number;
64
+ baseImage?: string;
65
+ revealImage?: string;
66
+ image?: string;
67
+ fit?: ImageFitMode;
68
+ position?: ImagePosition;
69
+ softness?: number;
70
+ edgeNoise?: number;
71
+ edgeGlow?: number;
72
+ ambient?: boolean;
73
+ clickReveal?: boolean;
74
+ activeIndex?: number;
75
+ focused?: boolean;
76
+ wrap?: boolean;
77
+ spread?: number;
78
+ depthScale?: number;
79
+ curve?: number;
80
+ parallax?: boolean | number;
81
+ focusOffsetX?: number;
82
+ focusScale?: number;
83
+ spotRadius?: number;
84
+ spotIntensity?: number;
85
+ spotPosition?: [number, number] | 'center' | 'left' | 'right';
86
+ onChange?: (detail: {
87
+ index: number;
88
+ focused: boolean;
89
+ element: HTMLElement | null;
90
+ }) => void;
33
91
  [key: string]: unknown;
34
92
  }
35
93
 
36
94
  declare function useFX<T extends HTMLElement = HTMLDivElement>(effect: string | string[], options?: FXOptions, disabled?: boolean): React.RefObject<T | null>;
37
- interface AuroraProps extends React.HTMLAttributes<HTMLElement> {
38
- as?: React.ElementType;
39
- speed?: number;
40
- quality?: 'low' | 'medium' | 'high';
41
- colors?: [string, string, string];
42
- interactive?: boolean;
43
- respectReducedMotion?: boolean;
44
- disabled?: boolean;
95
+ interface DeviceTargetingProps {
96
+ /** Target device class: 'all' | 'desktop' | 'mobile' | 'tablet' (default: 'all') */
97
+ device?: DeviceTarget;
98
+ /** Minimum viewport width in px required to run effect */
99
+ minWidth?: number;
100
+ /** Maximum viewport width in px allowed to run effect */
101
+ maxWidth?: number;
102
+ /** Disable effect cleanly on mobile viewports (< mobileBreakpoint) */
103
+ disableOnMobile?: boolean;
104
+ /** Disable effect cleanly on desktop viewports (>= mobileBreakpoint) */
105
+ disableOnDesktop?: boolean;
106
+ /** Viewport breakpoint in px (default: 768) */
107
+ mobileBreakpoint?: number;
45
108
  }
46
- declare function Aurora({ as, speed, quality, colors, interactive, respectReducedMotion, disabled, children, ...rest }: AuroraProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
47
- interface LiquidMetalProps extends React.HTMLAttributes<HTMLElement> {
109
+ interface WebGLCommonProps extends React.HTMLAttributes<HTMLElement>, DeviceTargetingProps {
48
110
  as?: React.ElementType;
49
111
  speed?: number;
50
- quality?: 'low' | 'medium' | 'high';
51
- colors?: [string, string, string];
112
+ quality?: QualityLevel;
113
+ colors?: string | string[];
114
+ /** Backdrop color (hex/rgb), 'transparent', or omit for automatic light/dark theme surface */
115
+ bgColor?: string;
116
+ /** Theme adaptation mode: 'auto' | 'light' | 'dark' */
117
+ theme?: ThemeMode;
118
+ /** Optional explicit palette for light surfaces */
119
+ lightColors?: string | string[];
120
+ /** Optional explicit palette for dark surfaces */
121
+ darkColors?: string | string[];
122
+ /** Optional scroll-reactive color stops */
123
+ scrollColors?: string[] | Array<[string, string]>;
124
+ /** Track page scroll progress */
125
+ trackScroll?: boolean;
126
+ /** Render behind content ('background') or above cards with pointer-events: none ('overlay') */
127
+ layer?: LayerMode;
128
+ /** Keep underlying website/card background colors untouched */
129
+ preserveBg?: boolean;
130
+ /** Dynamically shift effect palette to contrast with hovered/touched card surfaces */
131
+ adaptToSurface?: boolean;
132
+ /** Opacity when layer='overlay' (default: 0.78) */
133
+ overlayOpacity?: number;
52
134
  interactive?: boolean;
53
135
  respectReducedMotion?: boolean;
54
136
  disabled?: boolean;
55
137
  }
56
- declare function LiquidMetal({ as, speed, quality, colors, interactive, respectReducedMotion, disabled, children, ...rest }: LiquidMetalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
57
- interface FluidProps extends React.HTMLAttributes<HTMLElement> {
58
- as?: React.ElementType;
59
- speed?: number;
60
- quality?: 'low' | 'medium' | 'high';
61
- colors?: [string, string, string];
138
+ interface AuroraProps extends WebGLCommonProps {
139
+ }
140
+ declare function Aurora({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, interactive, respectReducedMotion, disabled, children, ...rest }: AuroraProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
141
+ interface LiquidMetalProps extends WebGLCommonProps {
142
+ }
143
+ declare function LiquidMetal({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, interactive, respectReducedMotion, disabled, children, ...rest }: LiquidMetalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
144
+ interface FluidProps extends WebGLCommonProps {
62
145
  /** How long trails stay visible: 0.90 (fast fade) to 0.995 (long ink trails) */
63
146
  dissipation?: number;
64
147
  /** Brush size of cursor splash (default: 0.0045) */
65
148
  radius?: number;
66
149
  /** Vorticity / swirl strength (default: 1.4) */
67
150
  swirl?: number;
68
- interactive?: boolean;
69
- respectReducedMotion?: boolean;
70
- disabled?: boolean;
71
151
  }
72
- declare function Fluid({ as, speed, quality, colors, dissipation, radius, swirl, interactive, respectReducedMotion, disabled, children, ...rest }: FluidProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
73
- interface TiltCardProps extends React.HTMLAttributes<HTMLElement> {
152
+ declare function Fluid({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, dissipation, radius, swirl, interactive, respectReducedMotion, disabled, children, ...rest }: FluidProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
153
+ interface TiltCardProps extends React.HTMLAttributes<HTMLElement>, DeviceTargetingProps {
74
154
  as?: React.ElementType;
75
155
  maxTilt?: number;
76
156
  scale?: number;
77
157
  perspective?: number;
78
158
  glare?: boolean;
159
+ respectReducedMotion?: boolean;
79
160
  disabled?: boolean;
80
161
  }
81
- declare function TiltCard({ as, maxTilt, scale, perspective, glare, disabled, children, ...rest }: TiltCardProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
82
- interface MagneticProps extends React.HTMLAttributes<HTMLElement> {
162
+ declare function TiltCard({ as, maxTilt, scale, perspective, glare, respectReducedMotion, disabled, children, ...rest }: TiltCardProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
163
+ interface MagneticProps extends React.HTMLAttributes<HTMLElement>, DeviceTargetingProps {
83
164
  as?: React.ElementType;
84
165
  strength?: number;
166
+ respectReducedMotion?: boolean;
85
167
  disabled?: boolean;
86
168
  }
87
- declare function Magnetic({ as, strength, disabled, style, children, ...rest }: MagneticProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
88
- interface InkProps extends React.HTMLAttributes<HTMLElement> {
89
- as?: React.ElementType;
90
- speed?: number;
91
- quality?: 'low' | 'medium' | 'high';
92
- colors?: [string, string, string];
169
+ declare function Magnetic({ as, strength, respectReducedMotion, disabled, style, children, ...rest }: MagneticProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
170
+ interface InkProps extends WebGLCommonProps {
93
171
  /** Ink dispersion / fade retention: 0.92 to 0.996 (default: 0.982) */
94
172
  dissipation?: number;
95
173
  /** Brush radius for cursor ink strokes (default: 0.004) */
96
174
  radius?: number;
97
175
  /** Curl / tendril swirl intensity (default: 1.75) */
98
176
  curl?: number;
99
- interactive?: boolean;
100
- respectReducedMotion?: boolean;
101
- disabled?: boolean;
102
177
  }
103
- declare function Ink({ as, speed, quality, colors, dissipation, radius, curl, interactive, respectReducedMotion, disabled, children, ...rest }: InkProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
104
- interface AetheriaProps extends React.HTMLAttributes<HTMLElement> {
105
- as?: React.ElementType;
106
- speed?: number;
107
- quality?: 'low' | 'medium' | 'high';
108
- colors?: [string, string, string];
109
- /** Water backdrop hex (e.g., '#F5F3EE' for Sumi-e, '#060913' for Abyss) */
110
- bgColor?: string;
111
- /** Auto-detected from bgColor luminance, or pass explicitly (0 = dark abyss, 1 = light water) */
178
+ declare function Ink({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, dissipation, radius, curl, interactive, respectReducedMotion, disabled, children, ...rest }: InkProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
179
+ interface AetheriaProps extends WebGLCommonProps {
180
+ /** Auto-detected from theme/bgColor luminance, or pass explicitly (0 = dark abyss, 1 = light water) */
112
181
  lightMode?: boolean | number;
113
182
  /** Pigment absorption/luminance strength (default: 1.45) */
114
183
  absorptionGain?: number;
@@ -118,10 +187,86 @@ interface AetheriaProps extends React.HTMLAttributes<HTMLElement> {
118
187
  radius?: number;
119
188
  /** Curl swirl intensity (default: 1.85) */
120
189
  curl?: number;
121
- interactive?: boolean;
190
+ }
191
+ declare function Aetheria({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, lightMode, absorptionGain, dissipation, radius, curl, interactive, respectReducedMotion, disabled, children, ...rest }: AetheriaProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
192
+ interface Prism3DProps extends WebGLCommonProps {
193
+ /** 3D SDF sculpture geometry: 'prism' | 'torus' | 'orb' (default: 'prism') */
194
+ shape?: PrismShape;
195
+ /** Camera zoom/depth scale (default: 1.0) */
196
+ depth?: number;
197
+ /** Specular & iridescent gloss intensity (default: 1.0) */
198
+ gloss?: number;
199
+ /** 3D surface twist/displacement strength (default: 0.35) */
200
+ distortion?: number;
201
+ }
202
+ declare function Prism3D({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, shape, depth, gloss, distortion, interactive, respectReducedMotion, disabled, children, ...rest }: Prism3DProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
203
+ interface BrushRevealProps extends WebGLCommonProps {
204
+ /** Default / front image URL (e.g. human portrait) */
205
+ baseImage: string;
206
+ /** Hidden / revealed image URL underneath (e.g. aligned robot portrait) */
207
+ revealImage: string;
208
+ /** Brush radius relative to container height (default: 0.13) */
209
+ radius?: number;
210
+ /** Edge feather softness of the dissolve transition (default: 0.22) */
211
+ softness?: number;
212
+ /** Organic noise dissolve amount along the brush boundary (default: 0.38) */
213
+ edgeNoise?: number;
214
+ /** Luminous accent intensity along the dissolving edge (default: 0.24) */
215
+ edgeGlow?: number;
216
+ /** Trail retention before closing back up: 0.90 (fast) to 0.999 (persistent) (default: 0.985) */
217
+ dissipation?: number;
218
+ /** Image aspect fitting mode: 'cover' | 'contain' (default: 'cover') */
219
+ fit?: ImageFitMode;
220
+ /** Image alignment inside container: 'center' | 'top' | 'bottom' (default: 'center') */
221
+ position?: ImagePosition;
222
+ /** Enable slow ambient idle brush sweep when pointer is inactive (default: false) */
223
+ ambient?: boolean;
224
+ /** Expand brush radius while holding click/touch (default: true) */
225
+ clickReveal?: boolean;
226
+ }
227
+ declare function BrushReveal({ as, baseImage, revealImage, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, radius, softness, edgeNoise, edgeGlow, dissipation, fit, position, ambient, clickReveal, interactive, respectReducedMotion, disabled, children, ...rest }: BrushRevealProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
228
+ interface SpotlightProps extends WebGLCommonProps {
229
+ /** Spotlight halo radius in normalized height units (default: 0.62) */
230
+ spotRadius?: number;
231
+ /** Spotlight brightness intensity (default: 1.0) */
232
+ spotIntensity?: number;
233
+ /** Spotlight origin: 'center' | 'left' | 'right' | [x, y] (default: 'center') */
234
+ spotPosition?: [number, number] | 'center' | 'left' | 'right';
235
+ }
236
+ declare function Spotlight({ as, speed, quality, colors, bgColor, theme, lightColors, darkColors, scrollColors, trackScroll, layer, preserveBg, adaptToSurface, overlayOpacity, spotRadius, spotIntensity, spotPosition, interactive, respectReducedMotion, disabled, children, ...rest }: SpotlightProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
237
+ interface DepthCarouselProps extends React.HTMLAttributes<HTMLElement>, DeviceTargetingProps {
238
+ as?: React.ElementType;
239
+ /** Index of the centered foreground item (default: 0) */
240
+ activeIndex?: number;
241
+ /** Focus mode: zooms active item to left-center & fades others for detail panels */
242
+ focused?: boolean;
243
+ /** Wrap around seamlessly from last slide to first (default: true) */
244
+ wrap?: boolean;
245
+ /** Toggle focus mode when clicking the centered active slide (default: true) */
246
+ clickToFocus?: boolean;
247
+ /** Horizontal spread percentage per step from center (default: 25) */
248
+ spread?: number;
249
+ /** Scale reduction per depth step (default: 0.22) */
250
+ depthScale?: number;
251
+ /** Y-axis rotation curve angle in degrees per step (default: 10) */
252
+ curve?: number;
253
+ /** Pointer parallax shift in px, or false to disable (default: 18) */
254
+ parallax?: boolean | number;
255
+ /** Horizontal shift % of active slide in focused mode (default: -15) */
256
+ focusOffsetX?: number;
257
+ /** Scale multiplier of active slide in focused mode (default: 1.07) */
258
+ focusScale?: number;
259
+ /** CSS 3D perspective in px (default: 1100) */
260
+ perspective?: number;
122
261
  respectReducedMotion?: boolean;
123
262
  disabled?: boolean;
263
+ /** Fired when active slide index or focus state changes */
264
+ onSlideChange?: (detail: {
265
+ index: number;
266
+ focused: boolean;
267
+ element: HTMLElement | null;
268
+ }) => void;
124
269
  }
125
- declare function Aetheria({ as, speed, quality, colors, bgColor, lightMode, absorptionGain, dissipation, radius, curl, interactive, respectReducedMotion, disabled, children, ...rest }: AetheriaProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
270
+ declare function DepthCarousel({ as, activeIndex, focused, wrap, clickToFocus, spread, depthScale, curve, parallax, focusOffsetX, focusScale, perspective, respectReducedMotion, disabled, onSlideChange, children, ...rest }: DepthCarouselProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
126
271
 
127
- export { Aetheria, type AetheriaProps, Aurora, type AuroraProps, Fluid, type FluidProps, Ink, type InkProps, LiquidMetal, type LiquidMetalProps, Magnetic, type MagneticProps, TiltCard, type TiltCardProps, useFX };
272
+ export { Aetheria, type AetheriaProps, Aurora, type AuroraProps, BrushReveal, type BrushRevealProps, DepthCarousel, type DepthCarouselProps, type DeviceTargetingProps, Fluid, type FluidProps, Ink, type InkProps, LiquidMetal, type LiquidMetalProps, Magnetic, type MagneticProps, Prism3D, type Prism3DProps, Spotlight, type SpotlightProps, TiltCard, type TiltCardProps, type WebGLCommonProps, useFX };