{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "feature194",
  "title": "Three Cards With Asset Media",
  "description": "Three feature cards that swap an icon for a real micro-asset: a bar chart, a before/after stat, and a terminal prompt. Demonstrates how registry-pieces drop into block media slots.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react"
  ],
  "registryDependencies": [
    "badge",
    "button"
  ],
  "files": [
    {
      "path": "registry/feature194/feature194.tsx",
      "content": "\"use client\";\n\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Chart1 } from \"@/components/beste/piece/chart1\";\nimport Link from \"next/link\";\nimport { Stats5 } from \"@/components/beste/piece/stats5\";\nimport { Terminal1 } from \"@/components/beste/piece/terminal1\";\nimport { cn } from \"@/lib/utils\";\n\ntype ComponentBackground =\n  | { type: \"dots\" }\n  | { type: \"none\" }\n  | { type: \"image\"; src: string; alt?: string }\n  | { type: \"video\"; src: string; alt?: string };\n\ntype CardMedia =\n  | { type: \"image\"; src: string; alt?: string }\n  | { type: \"video\"; src: string; alt?: string }\n  | {\n      type: \"component\";\n      component: React.ReactNode;\n      background?: ComponentBackground;\n    };\n\ninterface FeatureCard {\n  eyebrow: string;\n  title: string;\n  description: string;\n  media: CardMedia;\n}\n\ninterface ButtonItem {\n  label: string;\n  href?: string;\n  variant?: \"default\" | \"secondary\" | \"outline\" | \"ghost\" | \"link\" | \"destructive\";\n}\n\ninterface Feature194Props {\n  badge?: {\n    label: string;\n    variant?: \"default\" | \"secondary\" | \"outline\";\n  };\n  heading?: string;\n  description?: string;\n  cards?: FeatureCard[];\n  buttons?: ButtonItem[];\n  className?: string;\n}\n\nexport const feature194Demo: Feature194Props = {\n  badge: { label: \"Built for builders\", variant: \"secondary\" },\n  heading: \"Ship faster, measure everything\",\n  description:\n    \"A toolkit that meets your team where it works — analytics in the dashboard, wins in the changelog, install in the terminal.\",\n  cards: [\n    {\n      eyebrow: \"Analytics\",\n      title: \"Insights you trust\",\n      description:\n        \"Live dashboards with the metrics that matter. No SQL required, no waiting for a data team.\",\n      media: {\n        type: \"component\",\n        component: (\n          <Chart1\n            label=\"Sessions · this week\"\n            value=\"8,214\"\n            data={[42, 68, 54, 81, 36, 72, 90]}\n            tone=\"primary\"\n          />\n        ),\n      },\n    },\n    {\n      eyebrow: \"Performance\",\n      title: \"Wins worth shipping\",\n      description:\n        \"Every release ships with measurable improvements. Track regressions before they reach customers.\",\n      media: {\n        type: \"component\",\n        component: (\n          <Stats5\n            label=\"Page load time\"\n            before=\"3.4s\"\n            after=\"0.8s\"\n            beforeCaption=\"Before\"\n            afterCaption=\"After\"\n          />\n        ),\n      },\n    },\n    {\n      eyebrow: \"Developer experience\",\n      title: \"One command away\",\n      description:\n        \"Install in seconds with our CLI. Type-safe, framework-aware, no lock-in to anyone's stack.\",\n      media: {\n        type: \"component\",\n        background: {\n          type: \"image\",\n          src: \"https://images.unsplash.com/photo-1517694712202-14dd9538aa97?w=1200&h=900&fit=crop\",\n          alt: \"Developer workspace with code on screen\",\n        },\n        component: <Terminal1 prompt=\"$\" command=\"npx beste-ui@latest add feature194\" />,\n      },\n    },\n  ],\n  buttons: [\n    { label: \"Read the docs\", href: \"https://beste.co/docs\" },\n    {\n      label: \"View on GitHub\",\n      href: \"https://github.com/beste-co\",\n      variant: \"outline\",\n    },\n  ],\n};\n\nexport function Feature194({\n  badge,\n  heading,\n  description,\n  cards = [],\n  buttons = [],\n  className,\n}: Feature194Props) {\n  return (\n    <section className={cn(\"py-16 md:py-24 w-full\", className)}>\n      <div className=\"mx-auto max-w-6xl px-4 md:px-6\">\n        {(badge || heading || description) && (\n          <div className=\"mx-auto mb-10 md:mb-14 max-w-3xl text-center\">\n            {badge && (\n              <div className=\"mb-4 flex justify-center\">\n                <Badge variant={badge.variant ?? \"default\"}>{badge.label}</Badge>\n              </div>\n            )}\n            {heading && <h2 className=\"text-3xl font-semibold md:text-5xl\">{heading}</h2>}\n            {description && (\n              <p className=\"mt-4 text-base md:text-lg text-muted-foreground\">{description}</p>\n            )}\n          </div>\n        )}\n\n        <div className=\"grid gap-4 md:gap-6 md:grid-cols-3\">\n          {cards.map((card, index) => (\n            <div key={index} className=\"flex flex-col overflow-hidden rounded-xl border bg-card\">\n              <CardMediaSurface media={card.media} />\n              <div className=\"flex flex-1 flex-col p-6\">\n                <span className=\"text-xs font-medium uppercase tracking-wide text-muted-foreground\">\n                  {card.eyebrow}\n                </span>\n                <h3 className=\"mt-2 text-lg font-semibold\">{card.title}</h3>\n                <p className=\"mt-2 text-sm text-muted-foreground\">{card.description}</p>\n              </div>\n            </div>\n          ))}\n        </div>\n\n        {buttons.length > 0 && (\n          <div className=\"mt-12 flex flex-wrap justify-center gap-3\">\n            {buttons.map((button, index) => (\n              <Button key={index} variant={button.variant ?? \"default\"} asChild>\n                <Link href={button.href ?? \"#\"}>{button.label}</Link>\n              </Button>\n            ))}\n          </div>\n        )}\n      </div>\n    </section>\n  );\n}\n\nfunction CardMediaSurface({ media }: { media: CardMedia }) {\n  const componentBackground =\n    media.type === \"component\" ? (media.background ?? { type: \"dots\" }) : null;\n  const showDots = componentBackground?.type === \"dots\";\n\n  return (\n    <div\n      className=\"relative flex aspect-[4/3] items-center justify-center overflow-hidden border-b bg-muted/30\"\n      style={\n        showDots\n          ? {\n              backgroundImage: \"radial-gradient(circle, var(--border) 1px, transparent 1px)\",\n              backgroundSize: \"16px 16px\",\n            }\n          : undefined\n      }\n    >\n      {componentBackground?.type === \"image\" && (\n        <img\n          className=\"absolute inset-0 size-full object-cover\"\n          src={componentBackground.src}\n          alt={componentBackground.alt ?? \"\"}\n          aria-hidden=\"true\"\n        />\n      )}\n      {componentBackground?.type === \"video\" && (\n        <video\n          src={componentBackground.src}\n          autoPlay\n          loop\n          muted\n          playsInline\n          className=\"absolute inset-0 size-full object-cover\"\n        />\n      )}\n\n      {media.type === \"video\" ? (\n        <video\n          src={media.src}\n          autoPlay\n          loop\n          muted\n          playsInline\n          aria-label={media.alt}\n          className=\"size-full object-cover\"\n        />\n      ) : media.type === \"image\" ? (\n        <img\n          className=\"absolute inset-0 size-full object-cover\"\n          src={media.src}\n          alt={media.alt ?? \"\"}\n        />\n      ) : (\n        <div className=\"relative flex size-full items-center justify-center\">{media.component}</div>\n      )}\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/feature194.tsx"
    },
    {
      "path": "registry-pieces/chart1/chart1.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype Surface = \"card\" | \"glass\";\n\ntype Tone = \"primary\" | \"foreground\" | \"success\" | \"muted\";\n\ninterface Chart1Props {\n  label?: string;\n  value?: string;\n  data?: number[];\n  tone?: Tone;\n  surface?: Surface;\n  bordered?: boolean;\n  inverted?: boolean;\n  className?: string;\n}\n\nconst toneClasses: Record<Tone, string> = {\n  primary: \"bg-primary\",\n  foreground: \"bg-foreground\",\n  success: \"bg-emerald-500\",\n  muted: \"bg-current/40\",\n};\n\n\n/* The card sets the colour and everything inside it is drawn in `current`, so\n   inverting is two classes rather than a condition on every element.\n   `glass` is a deliberate exception to the solid-surface rule: these pieces sit\n   over section background images, and a frosted panel is the point of it. */\nconst surfaceClasses: Record<Surface, { plain: string; inverted: string }> = {\n  card: {\n    plain: \"bg-card text-card-foreground\",\n    inverted: \"bg-foreground text-background\",\n  },\n  glass: {\n    plain: \"bg-card/60 text-card-foreground backdrop-blur-md\",\n    inverted: \"bg-foreground/60 text-background backdrop-blur-md\",\n  },\n};\n\nexport const chart1Demo: Chart1Props = {\n  surface: \"card\",\n  bordered: false,\n  inverted: false,\n  label: \"Sessions · this week\",\n  value: \"8,214\",\n  data: [42, 68, 54, 81, 36, 72, 90],\n  tone: \"primary\",\n};\n\nexport function Chart1({\n  label,\n  value,\n  data = [],\n  tone = \"primary\",\n  surface = \"card\",\n  bordered = false,\n  inverted = false,\n  className,\n}: Chart1Props) {\n  const max = data.length > 0 ? Math.max(...data, 1) : 1;\n\n  const surfaceTone = surfaceClasses[surface][inverted ? \"inverted\" : \"plain\"];\n\n  return (\n    <div\n      className={cn(\n        \"relative flex size-full items-center justify-center p-4\",\n        className\n      )}\n    >\n      <div className={cn(\"flex w-full max-w-52 flex-col gap-2 rounded-lg px-3 py-2.5 shadow-sm\", surfaceTone, bordered && \"border border-current/15\")}>\n        <div className=\"flex items-baseline justify-between\">\n          <span className=\"text-xs font-medium text-current/60\">\n            {label}\n          </span>\n          <span className=\"text-sm font-semibold tabular-nums\">\n            {value}\n          </span>\n        </div>\n        <div\n          className=\"flex h-10 items-end gap-1\"\n          aria-hidden=\"true\"\n        >\n          {data.map((d, i) => (\n            <span\n              key={i}\n              className={cn(\n                \"flex-1 rounded-sm transition-all\",\n                toneClasses[tone]\n              )}\n              style={{ height: `${Math.max(6, (d / max) * 100)}%` }}\n            />\n          ))}\n        </div>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/piece/chart1.tsx"
    },
    {
      "path": "registry-pieces/stats5/stats5.tsx",
      "content": "\"use client\";\n\nimport { ArrowRight } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\ninterface Stats5Props {\n  label?: string;\n  before?: string;\n  after?: string;\n  beforeCaption?: string;\n  afterCaption?: string;\n  bordered?: boolean;\n  className?: string;\n}\n\nexport const stats5Demo: Stats5Props = {\n  label: \"Page load time\",\n  before: \"3.4s\",\n  after: \"0.8s\",\n  beforeCaption: \"Before\",\n  afterCaption: \"After\",\n  bordered: false,\n};\n\nexport function Stats5({\n  label,\n  before = \"0\",\n  after = \"0\",\n  beforeCaption = \"Before\",\n  afterCaption = \"After\",\n  bordered = false,\n  className,\n}: Stats5Props) {\n  return (\n    <div\n      className={cn(\n        \"relative flex size-full items-center justify-center p-4\",\n        className\n      )}\n    >\n      <div className={cn(\"flex w-fit max-w-64 flex-col gap-2 rounded-lg bg-card px-3 py-3 shadow-sm\", bordered && \"border border-border\")}>\n        {label && (\n          <span className=\"text-xs font-medium text-muted-foreground\">\n            {label}\n          </span>\n        )}\n        <div className=\"flex items-center gap-3\">\n          <div className=\"flex flex-col\">\n            <span className=\"text-xs text-muted-foreground\">\n              {beforeCaption}\n            </span>\n            <span className=\"text-xl font-semibold tabular-nums text-muted-foreground line-through\">\n              {before}\n            </span>\n          </div>\n          <ArrowRight\n            className=\"size-4 shrink-0 text-muted-foreground\"\n            aria-hidden=\"true\"\n          />\n          <div className=\"flex flex-col items-end\">\n            <span className=\"text-xs font-semibold text-emerald-600 dark:text-emerald-400\">\n              {afterCaption}\n            </span>\n            <span className=\"text-xl font-bold tabular-nums text-emerald-600 dark:text-emerald-400\">\n              {after}\n            </span>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/piece/stats5.tsx"
    },
    {
      "path": "registry-pieces/terminal1/terminal1.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface Terminal1Props {\n  prompt?: string;\n  command?: string;\n  bordered?: boolean;\n  className?: string;\n}\n\nexport const terminal1Demo: Terminal1Props = {\n  prompt: \"$\",\n  command: \"npx beste-ui@latest init\",\n  bordered: false,\n};\n\nexport function Terminal1({\n  prompt = \"$\",\n  command,\n  bordered = false,\n  className,\n}: Terminal1Props) {\n  return (\n    <div\n      className={cn(\n        \"relative flex size-full items-center justify-center p-4\",\n        className\n      )}\n    >\n      <div className={cn(\"flex w-full max-w-64 items-center gap-2 rounded-lg bg-zinc-950 px-3 py-2.5 font-mono text-xs text-zinc-50 shadow-sm\", bordered && \"border border-zinc-800\")}>\n        <span className=\"shrink-0 text-emerald-400\">{prompt}</span>\n        <span className=\"flex-1 truncate\">{command}</span>\n        <span\n          className=\"h-3.5 w-1.5 shrink-0 animate-pulse bg-emerald-400\"\n          aria-hidden=\"true\"\n        />\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/piece/terminal1.tsx"
    }
  ],
  "type": "registry:block"
}