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