"use client"; import { cn } from "@openstatus/ui/lib/utils"; import type { ComponentProps, ElementType, ReactNode } from "react"; /** * CSS-only animated text shimmer — a gradient slides under a `bg-clip:text` * mask. Pure CSS keeps the runtime cost trivial (no motion / framer-motion * payload) and avoids hydration of a client-only animation library. * * `spread` controls the width of the highlight band (clamped to 5–45%); * `duration` controls how long one sweep takes. The `shimmer` keyframe is * defined in `globals.css`. */ export type TextShimmerProps = { as?: E; duration?: number; spread?: number; children: ReactNode; } & Omit, "as" | "children">; export function TextShimmer({ as, className, duration = 3, spread = 20, children, ...props }: TextShimmerProps) { const Component = (as ?? "span") as ElementType; const dynamicSpread = Math.min(Math.max(spread, 5), 45); return ( {children} ); }