{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "wax-seal",
  "type": "registry:ui",
  "title": "Wax Seal",
  "description": "A hand-poured wax seal with your initials.",
  "files": [
    {
      "path": "ui/wax-seal.tsx",
      "type": "registry:ui",
      "content": "import * as React from \"react\";\n\nexport interface WaxSealProps extends React.SVGAttributes<SVGSVGElement> {\n  /** Initials or a short mark, 1–3 characters looks best. */\n  children?: React.ReactNode;\n  color?: string;\n  size?: number;\n  /** Changes the shape of the wax drip. */\n  seed?: number;\n}\n\nfunction blob(seed: number, cx: number, cy: number, r: number) {\n  const n = 14;\n  const pts: [number, number][] = [];\n  for (let i = 0; i < n; i++) {\n    const a = (i / n) * Math.PI * 2;\n    const k = 1 + 0.07 * Math.sin(i * 2.3 + seed) + 0.05 * Math.cos(i * 5.1 + seed * 1.7);\n    pts.push([cx + Math.cos(a) * r * k, cy + Math.sin(a) * r * k]);\n  }\n  const mid = (p: [number, number], q: [number, number]) => [(p[0] + q[0]) / 2, (p[1] + q[1]) / 2];\n  const m0 = mid(pts[n - 1], pts[0]);\n  let d = `M ${m0[0].toFixed(2)} ${m0[1].toFixed(2)}`;\n  for (let i = 0; i < n; i++) {\n    const p = pts[i];\n    const m = mid(p, pts[(i + 1) % n]);\n    d += ` Q ${p[0].toFixed(2)} ${p[1].toFixed(2)} ${m[0].toFixed(2)} ${m[1].toFixed(2)}`;\n  }\n  return d + \" Z\";\n}\n\nexport function WaxSeal({ children = \"E\", color = \"#8e1b1f\", size = 72, seed = 3, ...props }: WaxSealProps) {\n  const id = React.useId().replace(/:/g, \"\");\n  return (\n    <svg width={size} height={size} viewBox=\"0 0 100 100\" role=\"img\" aria-label=\"Wax seal\" {...props}>\n      <defs>\n        <radialGradient id={`${id}-g`} cx=\"38%\" cy=\"32%\" r=\"75%\">\n          <stop offset=\"0\" stopColor=\"#fff\" stopOpacity=\".35\" />\n          <stop offset=\".35\" stopColor=\"#fff\" stopOpacity=\"0\" />\n          <stop offset=\"1\" stopColor=\"#000\" stopOpacity=\".35\" />\n        </radialGradient>\n        <filter id={`${id}-s`} x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\">\n          <feDropShadow dx=\"0\" dy=\"2\" stdDeviation=\"2\" floodOpacity=\".35\" />\n        </filter>\n      </defs>\n      <g filter={`url(#${id}-s)`}>\n        <path d={blob(seed, 50, 50, 44)} fill={color} />\n        <path d={blob(seed, 50, 50, 44)} fill={`url(#${id}-g)`} />\n      </g>\n      <circle cx=\"50\" cy=\"50\" r=\"30\" fill={color} />\n      <circle cx=\"50\" cy=\"50\" r=\"30\" fill=\"none\" stroke=\"#000\" strokeOpacity=\".3\" strokeWidth=\"2.5\" />\n      <circle cx=\"50\" cy=\"51\" r=\"30\" fill=\"none\" stroke=\"#fff\" strokeOpacity=\".22\" strokeWidth=\"1.2\" />\n      <circle cx=\"50\" cy=\"50\" r=\"24\" fill=\"none\" stroke=\"#000\" strokeOpacity=\".22\" strokeWidth=\"1\" strokeDasharray=\"1.5 2.5\" />\n      <text\n        x=\"50\"\n        y=\"51\"\n        textAnchor=\"middle\"\n        dominantBaseline=\"central\"\n        fontSize=\"24\"\n        fontStyle=\"italic\"\n        fontWeight=\"700\"\n        fill=\"#000\"\n        fillOpacity=\".38\"\n        style={{ fontFamily: \"var(--font-display, Georgia, serif)\" }}\n      >\n        {children}\n      </text>\n      <text\n        x=\"50\"\n        y=\"50\"\n        textAnchor=\"middle\"\n        dominantBaseline=\"central\"\n        fontSize=\"24\"\n        fontStyle=\"italic\"\n        fontWeight=\"700\"\n        fill=\"#fff\"\n        fillOpacity=\".18\"\n        style={{ fontFamily: \"var(--font-display, Georgia, serif)\" }}\n      >\n        {children}\n      </text>\n    </svg>\n  );\n}\n"
    }
  ],
  "categories": [
    "extras"
  ]
}