import { ReactElement } from 'react'; import { ReactNode } from 'react'; export declare let __SPOILER_STYLES_CSS: StylesCSS; declare type AsChildProps = { children: ReactElement; asChild: true; } | { children: ReactNode; asChild?: false; }; declare type CtorOptions = InitOptions & SpoilerPainterOptions; declare interface InitOptions { readonly onlyInViewport?: boolean; } export declare const Spoiler: React.FC; export declare class SpoilerPainter { #private; readonly el: HTMLElement; maxFPS: number; constructor(el: HTMLElement, options?: CtorOptions); /** * Stops everything and reverts the styles */ destroy(): void; /** * `fps` - the maximum frames per second * `mimicWords` - if true, the spoiler will try to mimic the shape of words (cssvar) * `density` - overrides the density of the noise (cssvar) * `gap` - in px a gap that particles won't spawn within (ignored for elements that exceed * the size limit) */ update({ fps, gap, mimicWords, density, fallback, forceFallback, accentColor, }?: SpoilerPainterOptions): void; useBackgroundStyle(ws: string | number, hs: string | number, options?: { tile: boolean; }): void; get isHidden(): boolean; parseFadeDuration(value: number | boolean | undefined): number; hide({ animate }?: TransitionOptions): void; reveal({ animate }?: TransitionOptions): void; get t(): number; set t(value: number); startAnimation(): void; stopAnimation(): void; get isAnimating(): boolean; showFallback(): void; hideFallback(): void; } declare interface SpoilerPainterOptions { readonly fps?: number; readonly gap?: number | boolean; readonly density?: number; readonly mimicWords?: boolean; readonly accentColor?: string; readonly fallback?: string | false; readonly forceFallback?: boolean; } export declare type SpoilerProps = { hidden?: boolean; defaultHidden?: boolean; revealOn?: "click" | "hover" | false; onHiddenChange?: (hidden: boolean) => void; tagName?: keyof React.JSX.IntrinsicElements; transition?: false | "none" | "fade" | "iris"; accentColor?: string | [string, string]; theme?: "system" | "light" | "dark"; noiseFadeDuration?: number; } & Omit & AsChildProps & Omit; declare type StylesCSS = { css: string | null; }; declare interface TransitionOptions { readonly animate?: boolean | number; } export { }