import type { CSSProperties, ReactNode } from "react"; // WHAT A STREAMED SECTION SHOWS UNTIL ITS READ IS DONE. // // A page that streams sends its heading and controls at once and each slow // section when it is ready. Until then the section's place is held by one of // these: a box the size of what is coming, so nothing below it moves when the // content arrives. The size comes from what is known without the slow read — // a fixed height for a panel, a row count for a table. // // Every skeleton carries `data-stream-skeleton=""` and the section that // replaces it `data-stream-filled=""` (StreamFilled below), which is how // e2e/streaming.spec.ts compares the two boxes. Hidden from assistive // technology: `aria-busy` on a live region would announce on every refresh, // and there is nothing here to read. // // No "use client": plain markup, usable from a server page and from a client // component's Suspense fallback alike. const PULSE = "animate-pulse rounded bg-muted"; // One panel-shaped block of a fixed height (in px). export function SkeletonPanel({ name, height, className = "", }: { name: string; height: number; className?: string; }) { return (