{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "skeleton",
  "type": "registry:ui",
  "title": "Skeleton",
  "description": "Skeleton is temporary placeholder shapes that preserve layout while known content is loading.",
  "author": "Skrewww",
  "dependencies": [],
  "registryDependencies": [
    "@skrewww/foundation"
  ],
  "docs": "Host requirements (assumed already present, not installed by this command): react, react-dom.",
  "files": [
    {
      "path": "components/ui/Skeleton.tsx",
      "content": "/** @skrewww-component skeleton */\nimport { cn } from \"@/lib/cn\";\nimport styles from \"@/components/ui/skeleton.module.css\";\n\nexport type SkeletonShape = \"text\" | \"circle\" | \"rectangle\";\n\nexport type SkeletonProps = {\n  shape?: SkeletonShape;\n  width?: string | number;\n  height?: string | number;\n  className?: string;\n};\n\nfunction toCssSize(value?: string | number): string | undefined {\n  if (value === undefined) return undefined;\n  return typeof value === \"number\" ? `${value}px` : value;\n}\n\nexport function Skeleton({\n  shape = \"text\",\n  width,\n  height,\n  className,\n}: SkeletonProps) {\n  const style = {\n    width: toCssSize(width),\n    height: toCssSize(height),\n  };\n\n  return (\n    <span\n      aria-hidden=\"true\"\n      className={cn(styles.skeleton, styles[shape], className)}\n      style={style}\n    />\n  );\n}\n\nexport type SkeletonLoadingProps = {\n  loading: boolean;\n  loadingLabel?: string;\n  children: React.ReactNode;\n  skeleton: React.ReactNode;\n  className?: string;\n};\n\nexport function SkeletonLoading({\n  loading,\n  loadingLabel = \"Loading content\",\n  children,\n  skeleton,\n  className,\n}: SkeletonLoadingProps) {\n  return (\n    <div className={className} aria-busy={loading || undefined}>\n      {loading ? (\n        <>\n          <span className=\"sr-only\">{loadingLabel}</span>\n          {skeleton}\n        </>\n      ) : (\n        children\n      )}\n    </div>\n  );\n}\n",
      "type": "registry:ui",
      "target": "~/components/ui/Skeleton.tsx"
    },
    {
      "path": "components/ui/skeleton.module.css",
      "content": ".skeleton {\n  display: block;\n  position: relative;\n  overflow: hidden;\n  background: var(--skeleton-base-surface);\n  border-radius: var(--skeleton-radius);\n}\n\n.skeleton::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  transform: translateX(-100%);\n  background: linear-gradient(\n    90deg,\n    transparent 0%,\n    var(--skeleton-highlight-surface) 50%,\n    transparent 100%\n  );\n  animation: skeleton-shimmer var(--skeleton-animation-duration) ease-in-out infinite;\n}\n\n.text {\n  width: var(--skeleton-text-width);\n  height: var(--skeleton-line-height);\n}\n\n.circle {\n  width: var(--skeleton-circle-size);\n  height: var(--skeleton-circle-size);\n  border-radius: 9999px;\n}\n\n.rectangle {\n  width: 100%;\n  height: var(--skeleton-rectangle-height);\n}\n\n@keyframes skeleton-shimmer {\n  100% {\n    transform: translateX(100%);\n  }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .skeleton::after {\n    animation: none;\n    transform: none;\n    opacity: 0.35;\n  }\n}\n\n/* Figma Feedback/Skeleton 2034:25640 binds color/neutral/300 only — no\n   Surface fill/blur participation. Keep the resting skeleton base fixed. */\n\n[data-skrewww-shape=\"pill\"] .text,\n[data-skrewww-shape=\"pill\"] .rectangle {\n  border-radius: min(var(--skeleton-radius), 9999px);\n}\n",
      "type": "registry:ui",
      "target": "~/components/ui/skeleton.module.css"
    },
    {
      "path": "lib/cn.ts",
      "content": "export function cn(...classes: Array<string | false | null | undefined>): string {\n  return classes.filter(Boolean).join(\" \");\n}\n",
      "type": "registry:lib",
      "target": "~/lib/cn.ts"
    }
  ]
}
