{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "loader-skeleton-feed",
  "type": "registry:component",
  "title": "Loader Skeleton Feed",
  "description": "Content-shaped placeholders for a post feed, an inbox or a card grid, with one diagonal shimmer that travels across every bone in order. When loading ends, the real children fade in from a soft blur.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "loaders",
    "skeleton",
    "shimmer",
    "placeholder",
    "feed",
    "inbox",
    "loading"
  ],
  "docs": "https://hyperblur.dev/effects/loader-skeleton-feed",
  "files": [
    {
      "path": "registry/hyperblur/loader-skeleton-feed.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/loader-skeleton-feed.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface LoaderSkeletonFeedProps extends React.HTMLAttributes<HTMLDivElement> {\n  loading?: boolean;\n  variant?: \"post\" | \"inbox\" | \"card\";\n  rows?: number;\n  base?: string;\n  highlight?: string;\n  accent?: string;\n  speed?: number;\n  label?: string;\n  children?: React.ReactNode;\n}\n\nfunction hash(n: number) {\n  let x = (n + 0x9e3779b9) >>> 0;\n  x = Math.imul(x ^ (x >>> 16), 0x85ebca6b) >>> 0;\n  x = Math.imul(x ^ (x >>> 13), 0xc2b2ae35) >>> 0;\n  return ((x ^ (x >>> 16)) >>> 0) / 4294967295;\n}\n\nconst css = `\n.hb-vk3 {\n  position: relative;\n  width: 100%;\n  box-sizing: border-box;\n  font-family: inherit;\n  color: #ededed;\n}\n.hb-vk3 *, .hb-vk3 *::before, .hb-vk3 *::after { box-sizing: border-box; }\n.hb-vk3-sk { display: flex; flex-direction: column; gap: 14px; }\n.hb-vk3-b {\n  display: block;\n  flex: none;\n  border-radius: 6px;\n  background-color: var(--hb-vk3-base);\n  background-image: linear-gradient(100deg, transparent 30%, var(--hb-vk3-hi) 50%, transparent 70%);\n  background-size: 300% 100%;\n  background-repeat: no-repeat;\n  background-position: 150% 0;\n  animation: hb-vk3-sweep var(--hb-vk3-d) cubic-bezier(0.45, 0, 0.25, 1) infinite;\n  animation-delay: var(--hb-vk3-delay, 0s);\n}\n.hb-vk3-round { border-radius: 999px; }\n.hb-vk3-row { display: flex; align-items: center; gap: 10px; min-width: 0; }\n.hb-vk3-col { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }\n.hb-vk3-post { display: flex; flex-direction: column; gap: 11px; }\n.hb-vk3-media {\n  position: relative;\n  width: 100%;\n  aspect-ratio: 16 / 7;\n  border-radius: 10px;\n  overflow: hidden;\n}\n.hb-vk3-media::after {\n  content: \"\";\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  width: 22px;\n  height: 22px;\n  transform: translate(-50%, -50%);\n  border-radius: 6px;\n  border: 1.5px solid color-mix(in srgb, var(--hb-vk3-a) 55%, var(--hb-vk3-hi));\n  opacity: 0.5;\n}\n.hb-vk3-acts { display: flex; gap: 8px; }\n.hb-vk3-inbox { display: flex; flex-direction: column; }\n.hb-vk3-irow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #1c1c1c; }\n.hb-vk3-irow:last-child { border-bottom: 0; }\n.hb-vk3-card { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }\n.hb-vk3-tile { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid #1c1c1c; border-radius: 12px; background: #0e0e0e; }\n.hb-vk3-tile .hb-vk3-media { aspect-ratio: 4 / 3; border-radius: 8px; }\n.hb-vk3-in { animation: hb-vk3-reveal 520ms cubic-bezier(0.22, 1, 0.36, 1) both; }\n.hb-vk3-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  overflow: hidden;\n  clip-path: inset(50%);\n  white-space: nowrap;\n}\n@keyframes hb-vk3-sweep {\n  0% { background-position: 150% 0; }\n  70%, 100% { background-position: -50% 0; }\n}\n@keyframes hb-vk3-reveal {\n  from { opacity: 0; transform: translateY(6px); filter: blur(4px); }\n  to { opacity: 1; transform: none; filter: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-vk3-b, .hb-vk3-in { animation: none; }\n}\n`;\n\nexport function LoaderSkeletonFeed({\n  loading = true,\n  variant = \"post\",\n  rows = 3,\n  base = \"#1a1a1a\",\n  highlight = \"#2c2c2c\",\n  accent = \"#2f7bff\",\n  speed = 1.8,\n  label = \"Loading content\",\n  children,\n  className = \"\",\n  style,\n  ...rest\n}: LoaderSkeletonFeedProps) {\n  const count = Math.max(1, Math.min(8, Math.round(rows)));\n  const d = Math.max(0.6, speed);\n  const vars = {\n    \"--hb-vk3-base\": base,\n    \"--hb-vk3-hi\": highlight,\n    \"--hb-vk3-a\": accent,\n    \"--hb-vk3-d\": `${d}s`,\n    ...style,\n  } as React.CSSProperties;\n\n  const bone = (key: string, w: string, h: number, x: number, y: number, round = false, extra?: string) => (\n    <span\n      key={key}\n      className={`hb-vk3-b${round ? \" hb-vk3-round\" : \"\"}${extra ? ` ${extra}` : \"\"}`}\n      style={\n        {\n          width: w,\n          height: h ? `${h}px` : undefined,\n          \"--hb-vk3-delay\": `${((x * 0.35 + y * 0.12) * d).toFixed(3)}s`,\n        } as React.CSSProperties\n      }\n    />\n  );\n\n  const width = (seed: number, min: number, max: number) => `${(min + hash(seed) * (max - min)).toFixed(1)}%`;\n\n  let skeleton: React.ReactNode;\n  if (variant === \"inbox\") {\n    skeleton = (\n      <div className=\"hb-vk3-inbox\">\n        {Array.from({ length: count }, (_, i) => (\n          <div className=\"hb-vk3-irow\" key={i}>\n            {bone(`a${i}`, \"32px\", 32, 0, i, true)}\n            <div className=\"hb-vk3-col\">\n              {bone(`n${i}`, width(i * 7 + 1, 32, 48), 9, 0.15, i)}\n              {bone(`s${i}`, width(i * 7 + 2, 62, 92), 8, 0.2, i + 0.3)}\n            </div>\n            {bone(`t${i}`, \"34px\", 16, 0.9, i, true)}\n          </div>\n        ))}\n      </div>\n    );\n  } else if (variant === \"card\") {\n    skeleton = (\n      <div className=\"hb-vk3-card\">\n        {Array.from({ length: count }, (_, i) => (\n          <div className=\"hb-vk3-tile\" key={i}>\n            {bone(`m${i}`, \"100%\", 0, i * 0.3, 0, false, \"hb-vk3-media\")}\n            {bone(`h${i}`, width(i * 5 + 3, 60, 85), 10, i * 0.3, 1)}\n            {bone(`p${i}`, width(i * 5 + 4, 30, 45), 8, i * 0.3, 1.4)}\n          </div>\n        ))}\n      </div>\n    );\n  } else {\n    skeleton = (\n      <div className=\"hb-vk3-sk\">\n        {Array.from({ length: count }, (_, i) => (\n          <div className=\"hb-vk3-post\" key={i}>\n            <div className=\"hb-vk3-row\">\n              {bone(`a${i}`, \"34px\", 34, 0, i * 3, true)}\n              <div className=\"hb-vk3-col\">\n                {bone(`n${i}`, width(i * 9 + 1, 28, 40), 9, 0.12, i * 3)}\n                {bone(`h${i}`, width(i * 9 + 2, 16, 24), 7, 0.12, i * 3 + 0.3)}\n              </div>\n            </div>\n            {bone(`l1${i}`, \"100%\", 8, 0, i * 3 + 0.8)}\n            {bone(`l2${i}`, width(i * 9 + 3, 64, 88), 8, 0, i * 3 + 1)}\n            {i === 0 ? bone(`m${i}`, \"100%\", 0, 0, 1.4, false, \"hb-vk3-media\") : null}\n            <div className=\"hb-vk3-acts\">\n              {bone(`x1${i}`, \"38px\", 14, 0, i * 3 + 2, true)}\n              {bone(`x2${i}`, \"38px\", 14, 0.1, i * 3 + 2, true)}\n              {bone(`x3${i}`, \"38px\", 14, 0.2, i * 3 + 2, true)}\n            </div>\n          </div>\n        ))}\n      </div>\n    );\n  }\n\n  return (\n    <>\n      <style href=\"hb-loader-skeleton-feed\" precedence=\"default\">{css}</style>\n      <div className={`hb-vk3 ${className}`} style={vars} aria-busy={loading} {...rest}>\n        {loading ? (\n          <div role=\"status\">\n            <span className=\"hb-vk3-sr\">{label}</span>\n            <div aria-hidden=\"true\">{skeleton}</div>\n          </div>\n        ) : (\n          <div className=\"hb-vk3-in\">{children}</div>\n        )}\n      </div>\n    </>\n  );\n}\n"
    }
  ]
}