{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "peel-reveal-card",
  "type": "registry:ui",
  "title": "Peel Reveal Card",
  "author": "Rishabh Bose <https://theb0se.vercel.app/>",
  "description": "Dual-layer vault card with a spring-hinged top cover that peels upward on hover or keyboard activation to reveal sensitive credentials.",
  "dependencies": [
    "framer-motion",
    "lucide-react",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "components/ui/peel-reveal-card.tsx",
      "content": "\"use client\";\n\nimport React, { useState } from \"react\";\nimport { motion, useReducedMotion } from \"framer-motion\";\nimport { Eye, KeyRound, Copy, Check } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface PeelRevealCardProps {\n  /** Cover layer title. Default: \"Production Secret Key\" */\n  title?: string;\n  /** Secret payload revealed underneath the peel cover. Default: \"bose_live_98f72a41c09e3b1d\" */\n  secretValue?: string;\n  /** Hooke's Law spring stiffness coefficient for curtain peel. Default: 300 */\n  stiffness?: number;\n  /** Spring damping coefficient for curtain peel. Default: 24 */\n  damping?: number;\n  className?: string;\n}\n\nexport function PeelRevealCard({\n  title = \"Production Secret Key\",\n  secretValue = \"bose_live_98f72a41c09e3b1d\",\n  stiffness = 300,\n  damping = 24,\n  className,\n}: PeelRevealCardProps) {\n  const shouldReduceMotion = useReducedMotion() ?? false;\n  const [isPeeled, setIsPeeled] = useState(false);\n  const [copied, setCopied] = useState(false);\n\n  const handleCopy = (e: React.MouseEvent<HTMLButtonElement>) => {\n    e.stopPropagation();\n    if (typeof navigator !== \"undefined\" && navigator.clipboard) {\n      navigator.clipboard.writeText(secretValue).catch(() => {});\n    }\n    setCopied(true);\n    setTimeout(() => setCopied(false), 1500);\n  };\n\n  return (\n    <div\n      onMouseEnter={() => setIsPeeled(true)}\n      onMouseLeave={() => setIsPeeled(false)}\n      className={cn(\n        \"relative h-[168px] w-full max-w-sm select-none overflow-hidden rounded-3xl border border-neutral-200 bg-neutral-950 p-6 text-white shadow-sm dark:border-[#262626] dark:bg-white dark:text-black\",\n        className\n      )}\n    >\n      {/* Underlying Vault Layer */}\n      <div className=\"flex h-full flex-col justify-between\">\n        <div className=\"flex items-center justify-between text-xs\">\n          <span className=\"inline-flex items-center gap-1.5 font-mono text-[10px] uppercase tracking-wider text-neutral-400 dark:text-neutral-500\">\n            <KeyRound className=\"h-3.5 w-3.5\" />\n            VAULT_DECRYPTED\n          </span>\n          <button\n            type=\"button\"\n            onClick={handleCopy}\n            className=\"inline-flex items-center gap-1 rounded-lg bg-white/15 px-2.5 py-1 font-mono text-[10px] font-semibold text-white transition-colors hover:bg-white/25 dark:bg-black/10 dark:text-black dark:hover:bg-black/20\"\n          >\n            {copied ? (\n              <>\n                <Check className=\"h-3 w-3\" />\n                Copied\n              </>\n            ) : (\n              <>\n                <Copy className=\"h-3 w-3\" />\n                Copy Key\n              </>\n            )}\n          </button>\n        </div>\n\n        <div>\n          <div className=\"font-mono text-sm font-bold tracking-tight\">\n            {secretValue}\n          </div>\n          <p className=\"mt-1 text-[11px] text-neutral-400 dark:text-neutral-500\">\n            Move cursor away or press button to re-seal cover\n          </p>\n        </div>\n      </div>\n\n      {/* Spring-Hinged Frosted Peel Cover */}\n      <motion.div\n        role=\"button\"\n        tabIndex={0}\n        aria-expanded={isPeeled}\n        aria-label={`${title}. Activate or hover to peel back cover and reveal secret key.`}\n        onClick={() => setIsPeeled((prev) => !prev)}\n        onKeyDown={(e) => {\n          if (e.key === \"Enter\" || e.key === \" \") {\n            e.preventDefault();\n            setIsPeeled((prev) => !prev);\n          }\n        }}\n        animate={{\n          y: isPeeled ? \"-76%\" : \"0%\",\n          rotateX: isPeeled && !shouldReduceMotion ? 14 : 0,\n        }}\n        transition={\n          shouldReduceMotion\n            ? { duration: 0.01 }\n            : { type: \"spring\", stiffness, damping }\n        }\n        className=\"absolute inset-0 z-10 flex cursor-pointer flex-col justify-between rounded-3xl border border-neutral-200 bg-white p-6 text-black shadow-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black dark:border-[#262626] dark:bg-[#0D0D0D] dark:text-white dark:focus-visible:ring-white\"\n      >\n        <div className=\"flex items-center justify-between\">\n          <span className=\"inline-flex items-center gap-1.5 rounded-full border border-neutral-200 bg-neutral-50 px-2.5 py-1 font-mono text-[10px] font-semibold text-black dark:border-[#262626] dark:bg-[#141414] dark:text-white\">\n            <Eye className=\"h-3 w-3\" />\n            Hover or Click to Peel\n          </span>\n          <span className=\"font-mono text-[10px] text-neutral-400\">\n            SHA-256\n          </span>\n        </div>\n\n        <div>\n          <h3 className=\"text-base font-semibold\">{title}</h3>\n          <p className=\"mt-0.5 font-mono text-xs tracking-widest text-neutral-400\">\n            ••••••••••••••••••••••••\n          </p>\n        </div>\n      </motion.div>\n    </div>\n  );\n}\n\nexport default PeelRevealCard;\n",
      "type": "registry:ui",
      "target": "components/ui/peel-reveal-card.tsx"
    },
    {
      "path": "lib/utils.ts",
      "content": "import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\nexport async function copyToClipboard(text: string): Promise<boolean> {\n  if (typeof window === \"undefined\") return false;\n\n  try {\n    if (navigator.clipboard && window.isSecureContext) {\n      await navigator.clipboard.writeText(text);\n      return true;\n    }\n\n    const textArea = document.createElement(\"textarea\");\n    textArea.value = text;\n    textArea.style.position = \"fixed\";\n    textArea.style.left = \"-999999px\";\n    textArea.style.top = \"-999999px\";\n    document.body.appendChild(textArea);\n    textArea.focus();\n    textArea.select();\n    const succeeded = document.execCommand(\"copy\");\n    textArea.remove();\n    return succeeded;\n  } catch {\n    return false;\n  }\n}\n",
      "type": "registry:lib",
      "target": "lib/utils.ts"
    }
  ]
}
