{"version":3,"file":"VoiceGlowCss.mjs","names":[],"sources":["../../../../../src/plugins/AIComponents/VoiceVisualization/VoiceGlowCss.tsx"],"sourcesContent":["import {\n  type CSSProperties,\n  type PointerEvent,\n  type ReactNode,\n  useEffect,\n  useRef,\n  useState,\n} from 'react';\nimport clsx from 'clsx';\n\nimport { useReducedMotionPreference } from '../../../components/MessageList/hooks/useReducedMotionPreference';\nimport {\n  CSS_GLOW_RATES,\n  cssGlowPalette,\n  cssGlowRateKind,\n  massBackground,\n  MASSES,\n  orbitDistance,\n  orbitMask,\n  ORBITS,\n  RIDING_BODY,\n} from './cssGlow';\nimport { ease, MIC, REDUCED, scales } from './driver';\nimport { glowContains, toLocalPoint } from './hitArea';\nimport { audioLevelInput, expressivityInput } from './math';\nimport { FALLBACK_COLOR, readVoiceTheme, toHsvPalette } from './palette';\nimport type { VoiceVisualizationProps } from './types';\nimport { useVoiceStateLabel } from './useVoiceStateLabel';\nimport { ThemeScopeProvider, useAIThemeScopeClassName } from '../themeScope';\n\n/** How often the theme is read again, so a switch to dark mode is followed. */\nconst THEME_INTERVAL = 1000;\nconst RIPPLE_DURATION = 900;\n\nconst block = 'str-chat__ai-voice-glow';\n\nconst Layer = ({\n  children,\n  className,\n  style,\n}: {\n  children?: ReactNode;\n  className: string;\n  style?: CSSProperties;\n}) => (\n  <div className={`${block}__${className}`} style={style}>\n    {children}\n  </div>\n);\n\nconst orbitStyle = (orbit: number) =>\n  ({\n    '--str-ai-glow-direction': ORBITS[orbit].direction,\n    '--str-ai-glow-period': `${ORBITS[orbit].period}s`,\n    '--str-ai-glow-start': `${ORBITS[orbit].start}deg`,\n  }) as CSSProperties;\n\nconst swayStyle = (orbit: number) =>\n  ({ '--str-ai-glow-sway-period': `${ORBITS[orbit].sway}s` }) as CSSProperties;\n\n/** The masses the palette fills: the fourth and fifth only with that many colors. */\nconst massesFor = (colorCount: number) =>\n  MASSES.filter((_, index) => index < 3 || index < colorCount);\n\n/** The opaque color field: a base and the masses mixed over it in order. */\nconst ColorField = ({ colorCount }: { colorCount: number }) => (\n  <Layer className='field'>\n    <Layer className='base' />\n    <Layer className='flow'>\n      {massesFor(colorCount).map((mass, index) => (\n        <Layer className='orbit' key={index} style={orbitStyle(mass.orbit)}>\n          <Layer className='sway' style={swayStyle(mass.orbit)}>\n            <div\n              className={`${block}__mass`}\n              style={\n                {\n                  '--str-ai-glow-dist': orbitDistance(mass.orbit),\n                  '--str-ai-glow-reach': mass.reach,\n                  background: massBackground(mass),\n                } as CSSProperties\n              }\n            />\n          </Layer>\n        </Layer>\n      ))}\n    </Layer>\n  </Layer>\n);\n\n/**\n * The color field seen through opacity that rides the first orbit: the mask turns with the\n * orbit, and the inverse turns inside it keep the colors where they are.\n */\nconst RidingBody = ({ colorCount }: { colorCount: number }) => {\n  const { alpha, orbit, reach } = RIDING_BODY;\n  return (\n    <Layer className='body'>\n      <Layer className='flow'>\n        <Layer className='orbit' style={orbitStyle(orbit)}>\n          <div\n            className={`${block}__sway ${block}__sway--mask`}\n            style={\n              {\n                ...swayStyle(orbit),\n                '--str-ai-glow-mask': orbitMask(orbit, reach, alpha),\n              } as CSSProperties\n            }\n          >\n            <Layer className='unsway' style={swayStyle(orbit)}>\n              <Layer className='unorbit' style={orbitStyle(orbit)}>\n                <Layer className='unflow'>\n                  <ColorField colorCount={colorCount} />\n                </Layer>\n              </Layer>\n            </Layer>\n          </div>\n        </Layer>\n      </Layer>\n    </Layer>\n  );\n};\n\ntype Ripple = { id: number; x: number; y: number };\n\n/**\n * VoiceGlow drawn with CSS: the shader's composition, with every gradient painted once and only\n * `transform` and `opacity` animated, so the browser's compositor runs the motion. It keeps\n * moving while the page is busy, needs no canvas or WebGL, and costs no JavaScript per frame\n * unless `audioLevel` is given. Off screen, its animations pause and its script rests.\n *\n * Script sets what the stylesheet cannot know: the palette (read from the theme when `colors`\n * is not given), the playback rate of each animation for the state, and the live audio level.\n */\nexport const VoiceGlowCss = ({\n  audioLevel,\n  className,\n  colors,\n  expressivity,\n  onPointerUp,\n  state,\n  style,\n  ...restProps\n}: VoiceVisualizationProps) => {\n  const themeScopeClassName = useAIThemeScopeClassName();\n  const label = useVoiceStateLabel(state);\n  const reduceMotion = useReducedMotionPreference();\n  const rootRef = useRef<HTMLDivElement>(null);\n  const bounceRef = useRef<HTMLDivElement>(null);\n  const audioLevelRef = useRef(audioLevel);\n  const rippleTimers = useRef(new Set<ReturnType<typeof setTimeout>>());\n  const [ripples, setRipples] = useState<Ripple[]>([]);\n  const [onScreen, setOnScreen] = useState(true);\n  const { amplitude, speed } = scales(expressivityInput(expressivity));\n  const colorsKey = (colors ?? []).join('|');\n  const colorCount = Math.min(colors?.length || 1, 5);\n  const hasAudioLevel = !!audioLevel;\n\n  useEffect(() => {\n    audioLevelRef.current = audioLevel;\n  });\n\n  // Off screen, the animations pause (see the stylesheet) and the script below rests.\n  useEffect(() => {\n    const root = rootRef.current;\n    if (!root || typeof IntersectionObserver !== 'function') return;\n    const observer = new IntersectionObserver((entries) =>\n      setOnScreen(entries.some((entry) => entry.isIntersecting)),\n    );\n    observer.observe(root);\n    return () => observer.disconnect();\n  }, []);\n\n  // The palette, from `colors` or the theme, and whether the glow sits on a dark backdrop. Read\n  // again about once a second while on screen, so a theme switch is followed without a prop.\n  useEffect(() => {\n    const root = rootRef.current;\n    if (!onScreen || !root || typeof getComputedStyle !== 'function') return;\n    const own = toHsvPalette(colorsKey ? colorsKey.split('|') : []);\n    let applied = '';\n    const apply = () => {\n      const theme = readVoiceTheme(root);\n      const palette = own.length\n        ? own\n        : theme.palette.length\n          ? theme.palette\n          : toHsvPalette([FALLBACK_COLOR]);\n      const properties = cssGlowPalette(palette, theme.dark);\n      const next = JSON.stringify(properties) + theme.dark;\n      if (next === applied) return;\n      applied = next;\n      for (const [name, value] of Object.entries(properties)) {\n        root.style.setProperty(name, value);\n      }\n      root.setAttribute('data-dark', String(!!theme.dark));\n      // Fades in once the palette is in, so the theme color it starts from never shows.\n      root.setAttribute('data-ready', 'true');\n    };\n    apply();\n    const interval = setInterval(apply, THEME_INTERVAL);\n    const scheme =\n      typeof window.matchMedia === 'function'\n        ? window.matchMedia('(prefers-color-scheme: dark)')\n        : null;\n    scheme?.addEventListener?.('change', apply);\n    return () => {\n      clearInterval(interval);\n      scheme?.removeEventListener?.('change', apply);\n    };\n  }, [colorsKey, onScreen]);\n\n  // Each state plays the animations at its own rates. Changing a playback rate keeps an\n  // animation where it is, where changing its duration would make it jump; a turn and its\n  // inverse always get the same rate, so they stay in step.\n  useEffect(() => {\n    const root = rootRef.current;\n    if (!root || typeof root.getAnimations !== 'function') return;\n    const rates = CSS_GLOW_RATES[state];\n    const slow = reduceMotion ? REDUCED : 1;\n    for (const animation of root.getAnimations({ subtree: true })) {\n      const kind = cssGlowRateKind((animation as CSSAnimation).animationName ?? '');\n      if (kind) animation.updatePlaybackRate(rates[kind] * speed * slow);\n    }\n    // Masses come and go with the palette, so their animations need rates too.\n  }, [colorsKey, reduceMotion, speed, state]);\n\n  // A live audio level, eased like the driver eases it, is the only value written per frame,\n  // and only while the glow is on screen.\n  useEffect(() => {\n    const root = rootRef.current;\n    if (\n      !hasAudioLevel ||\n      !onScreen ||\n      !root ||\n      typeof requestAnimationFrame !== 'function'\n    )\n      return;\n    let frame = 0;\n    let last = 0;\n    let level = 0;\n    let written = -1;\n    let live: boolean | null = null;\n    const tick = (now: number) => {\n      const target = audioLevelInput(audioLevelRef.current?.());\n      const dt = last ? Math.min((now - last) / 1000, 0.05) : 0;\n      last = now;\n      level += ((target ?? 0) - level) * ease(MIC, dt);\n      if (Math.abs(level - written) > 0.002) {\n        written = level;\n        root.style.setProperty('--str-ai-glow-level', level.toFixed(3));\n      }\n      if (live !== (target !== null)) {\n        live = target !== null;\n        root.setAttribute('data-live', String(live));\n      }\n      frame = requestAnimationFrame(tick);\n    };\n    frame = requestAnimationFrame(tick);\n    return () => {\n      cancelAnimationFrame(frame);\n      root.style.removeProperty('--str-ai-glow-level');\n      root.removeAttribute('data-live');\n    };\n  }, [hasAudioLevel, onScreen]);\n\n  useEffect(() => {\n    const timers = rippleTimers.current;\n    return () => timers.forEach(clearTimeout);\n  }, []);\n\n  // A tap inside the globe bounces it and sends a ring out from the touch. Nothing is\n  // prevented or stopped, so a click handler on the glow or a parent still gets it.\n  const handlePointerUp = (event: PointerEvent<HTMLDivElement>) => {\n    onPointerUp?.(event);\n    if (reduceMotion) return;\n    const { x, y } = toLocalPoint(event);\n    if (!glowContains(x, y)) return;\n    const bounce = bounceRef.current;\n    if (bounce) {\n      bounce.classList.remove(`${block}__bounce--active`);\n      // Restarts the bounce when taps come faster than it lasts.\n      void bounce.offsetWidth;\n      bounce.classList.add(`${block}__bounce--active`);\n    }\n    const rect = event.currentTarget.getBoundingClientRect();\n    const ripple = {\n      id: Date.now() + Math.random(),\n      x: event.clientX - rect.left,\n      y: event.clientY - rect.top,\n    };\n    setRipples((current) => [...current, ripple]);\n    const timer = setTimeout(() => {\n      rippleTimers.current.delete(timer);\n      setRipples((current) => current.filter(({ id }) => id !== ripple.id));\n    }, RIPPLE_DURATION);\n    rippleTimers.current.add(timer);\n  };\n\n  return (\n    <ThemeScopeProvider>\n      <div\n        aria-label={label}\n        className={clsx(\n          themeScopeClassName,\n          'str-chat__ai-voice-visualization',\n          block,\n          `${block}--css`,\n          className,\n        )}\n        data-offscreen={onScreen ? undefined : 'true'}\n        data-rendering='css'\n        data-state={state}\n        role='img'\n        style={{ '--str-ai-glow-amp': amplitude.toFixed(3), ...style } as CSSProperties}\n        {...restProps}\n        onPointerUp={handlePointerUp}\n        ref={rootRef}\n      >\n        <Layer className='halo' />\n        <Layer className='level'>\n          <div className={`${block}__bounce`} ref={bounceRef}>\n            <Layer className='breath'>\n              <Layer className='gate'>\n                <Layer className='speech'>\n                  <Layer className='pulse'>\n                    <Layer className='globe'>\n                      <div className={`${block}__body ${block}__body--still`}>\n                        <ColorField colorCount={colorCount} />\n                      </div>\n                      <RidingBody colorCount={colorCount} />\n                    </Layer>\n                  </Layer>\n                </Layer>\n              </Layer>\n            </Layer>\n          </div>\n        </Layer>\n        {/* Only the globe takes the pointer; around it, events reach what is behind. */}\n        <div aria-hidden='true' className='str-chat__ai-voice-visualization__hit' />\n        {ripples.map((ripple) => (\n          <span\n            aria-hidden='true'\n            className={`${block}__ripple`}\n            key={ripple.id}\n            style={{ left: ripple.x, top: ripple.y }}\n          />\n        ))}\n      </div>\n    </ThemeScopeProvider>\n  );\n};\n"],"mappings":";;;;;;;;;;;;;;AA+BA,IAAM,iBAAiB;AACvB,IAAM,kBAAkB;AAExB,IAAM,QAAQ;AAEd,IAAM,SAAS,EACb,UACA,WACA,YAMA,oBAAC,OAAD;CAAK,WAAW,GAAG,MAAM,IAAI;CAAoB;CAC9C;AACE,CAAA;AAGP,IAAM,cAAc,WACjB;CACC,2BAA2B,OAAO,MAAM,CAAC;CACzC,wBAAwB,GAAG,OAAO,MAAM,CAAC,OAAO;CAChD,uBAAuB,GAAG,OAAO,MAAM,CAAC,MAAM;AAChD;AAEF,IAAM,aAAa,WAChB,EAAE,6BAA6B,GAAG,OAAO,MAAM,CAAC,KAAK,GAAG;;AAG3D,IAAM,aAAa,eACjB,OAAO,QAAQ,GAAG,UAAU,QAAQ,KAAK,QAAQ,UAAU;;AAG7D,IAAM,cAAc,EAAE,iBACpB,qBAAC,OAAD;CAAO,WAAU;WAAjB,CACE,oBAAC,OAAD,EAAO,WAAU,OAAQ,CAAA,GACzB,oBAAC,OAAD;EAAO,WAAU;YACd,UAAU,UAAU,CAAC,CAAC,KAAK,MAAM,UAChC,oBAAC,OAAD;GAAO,WAAU;GAAoB,OAAO,WAAW,KAAK,KAAK;aAC/D,oBAAC,OAAD;IAAO,WAAU;IAAO,OAAO,UAAU,KAAK,KAAK;cACjD,oBAAC,OAAD;KACE,WAAW,GAAG,MAAM;KACpB,OACE;MACE,sBAAsB,cAAc,KAAK,KAAK;MAC9C,uBAAuB,KAAK;MAC5B,YAAY,eAAe,IAAI;KACjC;IAEH,CAAA;GACI,CAAA;EACF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