import { CSSProperties } from 'react'; import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js'; /** Which animation plays across the text. */ export declare enum AnimatedTextVariant { /** Each unit rises up from below its baseline, staggered left to right. */ RiseUp = "rise-up", /** Each unit fades in from a blur, staggered left to right. */ BlurIn = "blur-in", /** Each unit drops in from above with a spring overshoot, staggered left to right. */ Bounce = "bounce", /** Each unit pops in in order, like it's being typed, with a blinking cursor at the end. */ Typewriter = "typewriter", /** Each unit resolves from random characters to its real value, staggered left to right. */ Scramble = "scramble", /** Each unit briefly RGB-splits and jitters before settling, staggered left to right. */ Glitch = "glitch", /** Every unit continuously bobs up and down in a travelling wave, on a loop. */ Wave = "wave", /** A highlight sweeps across the text, left to right, on a loop. */ Shine = "shine", /** A marker-style highlight block wipes in behind the whole string, once, left to right. */ Highlight = "highlight" } /** * What gets staggered and animated as one entrance unit. Applies to every variant except * `Shine` and `Highlight`, which always animate the whole string as a single run. */ export declare enum AnimatedTextUnit { /** Every letter animates on its own. */ Letter = "letter", /** Every word animates as a whole block. */ Word = "word" } export type AnimatedTextSlots = 'letter' | 'cursor'; export interface AnimatedTextProps extends HtmlProps { /** The text to animate. Split and animated one unit at a time for every variant but `Shine`/`Highlight`. */ text: string; /** Which animation plays (default `RiseUp`). */ variant?: AnimatedTextVariant; /** Whether entrance/loop variants stagger by letter or by word (default `Letter`). Ignored by `Shine`/`Highlight`. */ unit?: AnimatedTextUnit; /** * Delay in ms between each unit's animation start. Applies to every variant except `Shine` * and `Highlight`, which animate as a single run (default `40`). */ staggerDelay?: number; /** * Duration in ms of one animation cycle: a single unit's entrance for `RiseUp`/`BlurIn`/ * `Bounce`/`Glitch` (default `500`), one bob cycle for `Wave` (default `1200`), one sweep of * the highlight for `Shine` (default `2000`), or the one-shot wipe-in for `Highlight` (default * `600`). Ignored by `Typewriter` and `Scramble`, since each unit resolves instantly; use * `staggerDelay` to control their pacing. */ duration?: number; /** * When `true` (default), the animation doesn't start until the component first scrolls into * the viewport. Set to `false` to play immediately on mount, e.g. for text already in view * above the fold. */ triggerOnView?: boolean; className?: string; style?: CSSProperties; classNames?: SlotClassNames; styles?: SlotStyles; }