"use client" /** * WhatsNewLeoHero — media slot for the compact What's new sheet. * * Leo `invited` gesture (one-shot on `playKey`) plus a single DotPattern * spotlight burst from the centre. No product screenshot. */ import * as React from "react" import { cn } from "../../lib/utils" import { DotPattern } from "./dot-pattern" import { LeoIcon } from "./leo-icon" function brandMediaWash(color: string): string { return `linear-gradient( 145deg, color-mix(in oklch, ${color} 36%, var(--background)) 0%, color-mix(in oklch, ${color} 16%, var(--background)) 55%, var(--background) 100% )` } export function WhatsNewLeoHero({ brandColor, playKey, className, }: { brandColor: string /** Bump when the sheet opens to replay the one-shot icon + dot burst. */ playKey: string | number className?: string }) { const [burstKey, setBurstKey] = React.useState(0) React.useEffect(() => { setBurstKey(0) const frame = requestAnimationFrame(() => setBurstKey(1)) return () => cancelAnimationFrame(frame) }, [playKey]) return (
) }