{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "skeleton-card",
  "type": "registry:component",
  "title": "SkeletonCard",
  "description": "A loading-placeholder card — a glass Surface with an optional thumbnail block and a stack of text bars, swept by a frame-driven shimmer band. The 'still generating / not loaded yet' state before content populates. Rises in on the house spring; the shimmer loops so the placeholder feels live.",
  "dependencies": [
    "remotion",
    "zod",
    "react"
  ],
  "registryDependencies": [
    "lib-canvas",
    "lib-hooks",
    "lib-primitives"
  ],
  "files": [
    {
      "path": "registry/components/skeleton-card/SkeletonCard.tsx",
      "type": "registry:component",
      "target": "components/onda/skeleton-card/SkeletonCard.tsx",
      "content": "import React from 'react';\nimport { useCurrentFrame, useVideoConfig, interpolate } from 'remotion';\nimport { PlacementBox, resolveSize } from '../../../lib/canvas';\nimport { Surface } from '../../../lib/primitives';\nimport { useEntrance } from '../../../lib/hooks';\nimport { skeletonCardSchema, type SkeletonCardProps } from './schema';\n\nexport { skeletonCardSchema, type SkeletonCardProps };\n\n// Deterministic bar widths — a fixed repeating pattern keyed off the bar\n// index (CLAUDE.md §1: no Math.random). Reads as \"real\" placeholder copy:\n// a full line, then progressively shorter ones, then back. Pure function of i.\nconst BAR_WIDTHS = ['100%', '92%', '74%', '85%', '60%'];\nconst barWidth = (i: number): string => BAR_WIDTHS[i % BAR_WIDTHS.length];\n\n/**\n * A loading-placeholder card — the \"still generating / not loaded yet\" state\n * shown before content populates. A glass `Surface` holds an optional\n * thumbnail block plus a stack of text bars, with a single highlight band\n * sweeping across them on a frame-driven loop (like `ShimmerSweep`, but a\n * moving sheen over the bars rather than a text clip). The card rises in on\n * the house spring; the shimmer keeps moving so the placeholder feels live.\n *\n * @example\n * <SkeletonCard placement=\"center\" />\n */\nexport const SkeletonCard: React.FC<SkeletonCardProps> = ({\n  lines,\n  thumbnail,\n  shimmerSpeed,\n  shimmerColor,\n  barColor,\n  delay,\n  width,\n  height,\n  size,\n  placement,\n}) => {\n  const frame = useCurrentFrame();\n  const { width: cw, height: ch } = useVideoConfig();\n  const entrance = useEntrance({ type: 'rise', delay });\n  const local = frame - delay;\n\n  // Base bar height — semantic role wins, else a token-paced default.\n  const barHeight = size ? resolveSize(size, { width: cw, height: ch }) : 18;\n  const gap = Math.round(barHeight * 0.9);\n\n  // The highlight band travels left → right on a continuous loop. A pure\n  // function of the frame (CLAUDE.md §1) — no state, identical every render.\n  const t = (((local % shimmerSpeed) + shimmerSpeed) % shimmerSpeed) / shimmerSpeed;\n  const posX = interpolate(t, [0, 1], [-50, 150]);\n  const shimmer = `linear-gradient(100deg, transparent 30%, ${shimmerColor} 50%, transparent 70%)`;\n\n  return (\n    <PlacementBox placement={placement}>\n      <div style={{ opacity: entrance.opacity, transform: entrance.transform }}>\n        <Surface variant=\"glass\" width={width} height={height} padding={32}>\n          {/* The travelling sheen — clipped by Surface's overflow:hidden. */}\n          <div\n            aria-hidden\n            style={{\n              position: 'absolute',\n              inset: 0,\n              backgroundImage: shimmer,\n              backgroundSize: '250% 100%',\n              backgroundPositionX: `${posX}%`,\n              opacity: 0.5,\n              pointerEvents: 'none',\n            }}\n          />\n\n          <div style={{ position: 'relative', display: 'flex', flexDirection: 'column', gap }}>\n            {thumbnail && (\n              <div\n                style={{\n                  width: '100%',\n                  height: barHeight * 6,\n                  borderRadius: 12,\n                  background: barColor,\n                  marginBottom: gap,\n                }}\n              />\n            )}\n\n            {Array.from({ length: lines }, (_, i) => (\n              <div\n                key={i}\n                style={{\n                  width: barWidth(i),\n                  height: barHeight,\n                  borderRadius: barHeight / 2,\n                  background: barColor,\n                }}\n              />\n            ))}\n          </div>\n        </Surface>\n      </div>\n    </PlacementBox>\n  );\n};\n\nexport default SkeletonCard;\n"
    },
    {
      "path": "registry/components/skeleton-card/schema.ts",
      "type": "registry:component",
      "target": "components/onda/skeleton-card/schema.ts",
      "content": "import { z } from 'zod';\nimport { placementSchema, sizeRoleSchema } from '../../../lib/canvas-schemas';\n\n/** Zod schema for {@link SkeletonCard} props. */\nexport const skeletonCardSchema = z.object({\n  /** Discriminator literal — matches this entry's registry slug. Auto-populated when omitted (`schema.parse({})` works as before). Lets consumers build `z.discriminatedUnion('kind', [...])` directly over onda schemas. */\n  kind: z.literal('skeleton-card').default('skeleton-card'),\n  /** Number of text bars below the (optional) thumbnail. */\n  lines: z.number().int().min(1).default(3),\n  /** Show the leading avatar / thumbnail block above the bars. */\n  thumbnail: z.boolean().default(true),\n  /** Frames for one shimmer pass across the card. Lower = faster sweep. */\n  shimmerSpeed: z.number().int().min(1).default(48),\n  /** The travelling highlight color — a soft sheen over the bars. Defaults to `--onda-border-lit`. */\n  shimmerColor: z.string().default('var(--onda-border-lit, #26262E)'),\n  /** Resting fill of the placeholder bars / thumbnail. Defaults to `--onda-surface-2`. */\n  barColor: z.string().default('var(--onda-surface-2, #121217)'),\n  /** Frames before the card enters. */\n  delay: z.number().int().min(0).default(0),\n  /** Card width in px. */\n  width: z.number().default(480),\n  /** Card height in px. `undefined` lets the card size to its content. */\n  height: z.number().optional(),\n  /** Semantic role for the bar scale — resolves to canvas-aware pixels for the base bar height. Overrides the default bar height when set. */\n  size: sizeRoleSchema.optional(),\n  /** Where on the canvas this sits. Region (`'center'`, `'upper-third'`, ...) or `{ x, y, anchor }` in 0..1 canvas fractions. Coordinates may be negative or >1 for off-canvas. */\n  placement: placementSchema.optional(),\n});\n\n/** Inferred props for {@link SkeletonCard}. */\nexport type SkeletonCardProps = z.infer<typeof skeletonCardSchema>;\n"
    },
    {
      "path": "registry/components/skeleton-card/skeleton-card.meta.json",
      "type": "registry:file",
      "target": "components/onda/skeleton-card/skeleton-card.meta.json",
      "content": "{\n  \"name\": \"skeleton-card\",\n  \"title\": \"SkeletonCard\",\n  \"description\": \"A loading-placeholder card — a glass Surface with an optional thumbnail block and a stack of text bars, swept by a frame-driven shimmer band. The 'still generating / not loaded yet' state before content populates. Rises in on the house spring; the shimmer loops so the placeholder feels live.\",\n  \"pickWhen\": \"the \\\"still generating\\\" beat before content lands — AI loading, dashboard pre-load. Cut to real content with `cross-fade` or `morph`.\",\n  \"category\": \"interface\",\n  \"tags\": [\n    \"skeleton\",\n    \"loading\",\n    \"placeholder\",\n    \"shimmer\",\n    \"glass\"\n  ],\n  \"dependencies\": [\n    \"remotion\",\n    \"zod\",\n    \"react\"\n  ]\n}\n"
    },
    {
      "path": "registry/components/skeleton-card/README.md",
      "type": "registry:file",
      "target": "components/onda/skeleton-card/README.md",
      "content": "# SkeletonCard\n\nA loading-placeholder card — the \"still generating / not loaded yet\" state shown before real content populates. A glass `Surface` holds an optional thumbnail block plus a stack of text bars (deterministic, varying widths), with a single highlight band sweeping across them on a frame-driven loop — the same moving-gradient idea as `ShimmerSweep`, but a soft sheen over the bars rather than a text clip. The card rises in on the house spring; the shimmer keeps moving so the placeholder feels live. Token defaults look great with zero props.\n\n## Props\n\n| Prop | Type | Default | Notes |\n| --- | --- | --- | --- |\n| `lines` | `number` | `3` | Number of text bars below the thumbnail. |\n| `thumbnail` | `boolean` | `true` | Show the leading avatar / thumbnail block. |\n| `shimmerSpeed` | `number` | `48` | Frames per shimmer pass; lower is faster. |\n| `shimmerColor` | `string` | `#26262E` | Travelling sheen color (`--onda-border-lit`). |\n| `barColor` | `string` | `#121217` | Resting fill of bars / thumbnail (`--onda-surface-2`). |\n| `delay` | `number` | `0` | Frames before entrance. |\n| `width` | `number` | `480` | Card width. |\n| `height` | `number` | — | Card height; omit to size to content. |\n| `size` | `'hero' \\| 'heading' \\| 'subheading' \\| 'body' \\| 'caption'` | — | Semantic role for base bar height (canvas-aware). |\n| `placement` | region or `{x,y,anchor}` | — | Canvas placement. |\n\n## Usage\n\n```tsx\nimport { SkeletonCard } from './components/onda/skeleton-card/SkeletonCard';\n\nexport const LoadingScene = () => (\n  <SkeletonCard lines={3} thumbnail placement=\"center\" />\n);\n```\n"
    }
  ]
}
