{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "feature8",
  "title": "Capability Carousel",
  "description": "Looping carousel of capability cards with a centered media slot per card. Each slot accepts an image, video, or live registry-component asset.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react"
  ],
  "registryDependencies": [
    "badge",
    "button",
    "carousel"
  ],
  "files": [
    {
      "path": "registry/feature8/feature8.tsx",
      "content": "\"use client\";\nimport Link from \"next/link\";\nimport { useEffect, useState } from \"react\";\nimport { Ai8 } from \"@/components/beste/piece/ai8\";\nimport { Ai22 } from \"@/components/beste/piece/ai22\";\nimport { Code1 } from \"@/components/beste/piece/code1\";\nimport { Keyboard1 } from \"@/components/beste/piece/keyboard1\";\nimport { Search1 } from \"@/components/beste/piece/search1\";\nimport { Weather2 } from \"@/components/beste/piece/weather2\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n  Carousel,\n  type CarouselApi,\n  CarouselContent,\n  CarouselItem,\n} from \"@/components/ui/carousel\";\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 ItemMedia =\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 CarouselItemData {\n  title: string;\n  description: string;\n  media: ItemMedia;\n}\n\ninterface ButtonItem {\n  label: string;\n  href?: string;\n  variant?: \"default\" | \"secondary\" | \"outline\" | \"ghost\" | \"link\" | \"destructive\";\n}\n\ninterface Feature8Props {\n  badge?: {\n    label: string;\n    variant?: \"default\" | \"secondary\" | \"outline\";\n  };\n  heading?: string;\n  description?: string;\n  buttons?: ButtonItem[];\n  items?: CarouselItemData[];\n  className?: string;\n}\n\nexport const feature8Demo: Feature8Props = {\n  badge: { label: \"Capabilities\", variant: \"outline\" },\n  heading: \"A toolkit for every surface you ship\",\n  description:\n    \"Swipe through the assets that come prebuilt. Each card is a real component you can drop into any block media slot.\",\n  buttons: [\n    { label: \"Browse all assets\", href: \"https://beste.co/components\" },\n    {\n      label: \"Read the docs\",\n      href: \"https://beste.co/docs\",\n      variant: \"outline\",\n    },\n  ],\n  items: [\n    {\n      title: \"Lightning-fast search\",\n      description: \"A type-aware search field with a keyboard hint, ready for any command palette.\",\n      media: {\n        type: \"component\",\n        background: {\n          type: \"image\",\n          src: \"https://images.unsplash.com/photo-1772289935253-ffb028765564?w=350&q=80&auto=format&fit=crop\",\n          alt: \"Card background\",\n        },\n        component: <Search1 placeholder=\"Search anything...\" shortcut={[\"⌘\", \"K\"]} />,\n      },\n    },\n    {\n      title: \"Forecasts that read at a glance\",\n      description: \"Compact weekly weather widget with semantic icons and tabular numbers.\",\n      media: {\n        type: \"component\",\n        background: {\n          type: \"image\",\n          src: \"https://images.unsplash.com/photo-1581966510842-3e8f05f51aa9?w=350&q=80&auto=format&fit=crop\",\n          alt: \"Card background\",\n        },\n        component: (\n          <Weather2\n            days={[\n              { label: \"Mon\", condition: \"sunny\", high: 24, low: 15 },\n              { label: \"Tue\", condition: \"cloudy\", high: 22, low: 14 },\n              { label: \"Wed\", condition: \"rainy\", high: 18, low: 12 },\n              { label: \"Thu\", condition: \"cloudy\", high: 19, low: 13 },\n              { label: \"Fri\", condition: \"sunny\", high: 25, low: 16 },\n            ]}\n          />\n        ),\n      },\n    },\n    {\n      title: \"Code in the marketing copy\",\n      description: \"Inline snippet for tutorials, release notes, and developer onboarding.\",\n      media: {\n        type: \"component\",\n        background: {\n          type: \"image\",\n          src: \"https://images.unsplash.com/photo-1696815115289-3ac23f81e7e3?w=350&q=80&auto=format&fit=crop\",\n          alt: \"Card background\",\n        },\n        component: <Code1 code='const greeting = \"Hello, Beste!\";' language=\"ts\" />,\n      },\n    },\n    {\n      title: \"Shortcuts that travel\",\n      description:\n        \"Keyboard hints styled to match the rest of your interface, no extra spacing fiddling.\",\n      media: {\n        type: \"component\",\n        background: {\n          type: \"image\",\n          src: \"https://images.unsplash.com/photo-1581966512658-9081e422f811?w=350&q=80&auto=format&fit=crop\",\n          alt: \"Card background\",\n        },\n        component: <Keyboard1 keys={[\"⌘\", \"K\"]} label=\"Quick search\" />,\n      },\n    },\n    {\n      title: \"Conversation that ships in-product\",\n      description:\n        \"User and assistant bubbles styled to match your interface. Drop them into help docs, onboarding, or marketing demos without rebuilding chat chrome.\",\n      media: {\n        type: \"component\",\n        background: {\n          type: \"image\",\n          src: \"https://images.unsplash.com/photo-1581966510884-9f1f08ddfbde?w=350&q=80&auto=format&fit=crop\",\n          alt: \"Card background\",\n        },\n        component: (\n          <Ai8\n            user=\"What's the capital of Japan?\"\n            assistant=\"Tokyo. It's been the capital since 1868, after Kyoto held the title for over a thousand years.\"\n          />\n        ),\n      },\n    },\n    {\n      title: \"Show the model at work\",\n      description:\n        \"Tool-call cards reveal what the agent is actually doing — function name, arguments, status — without leaking the full transcript.\",\n      media: {\n        type: \"component\",\n        background: {\n          type: \"image\",\n          src: \"https://images.unsplash.com/photo-1772289935488-c9197bdcf42c?w=350&q=80&auto=format&fit=crop\",\n          alt: \"Card background\",\n        },\n        component: (\n          <Ai22\n            fn=\"search_docs\"\n            args={[\n              { key: \"query\", value: '\"rate limiting\"' },\n              { key: \"limit\", value: \"5\" },\n            ]}\n            status=\"done\"\n            tone=\"violet\"\n          />\n        ),\n      },\n    },\n  ],\n};\n\nexport function Feature8({\n  badge,\n  heading,\n  description,\n  buttons = [],\n  items = [],\n  className,\n}: Feature8Props) {\n  const [api, setApi] = useState<CarouselApi | null>(null);\n  const [activeIndex, setActiveIndex] = useState(0);\n\n  useEffect(() => {\n    if (!api) return;\n    setActiveIndex(api.selectedScrollSnap());\n    const onSelect = () => setActiveIndex(api.selectedScrollSnap());\n    api.on(\"select\", onSelect);\n    return () => {\n      api.off(\"select\", onSelect);\n    };\n  }, [api]);\n\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 || buttons.length > 0) && (\n          <div className=\"mx-auto mb-12 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 && (\n              <h2 className=\"text-2xl font-semibold tracking-tight md:text-4xl\">{heading}</h2>\n            )}\n            {description && (\n              <p className=\"mt-4 text-base md:text-lg text-muted-foreground\">{description}</p>\n            )}\n            {buttons.length > 0 && (\n              <div className=\"mt-6 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        )}\n      </div>\n\n      <Carousel\n        setApi={setApi}\n        opts={{ loop: true, align: \"center\" }}\n        className=\"mx-auto max-w-6xl\"\n      >\n        <CarouselContent className=\"-ml-4 md:-ml-6\">\n          {items.map((item, index) => (\n            <CarouselItem key={index} className=\"basis-4/5 pl-4 md:basis-1/2 md:pl-6 lg:basis-1/3\">\n              <article className=\"flex h-full flex-col overflow-hidden rounded-md border bg-card\">\n                <ItemMediaSurface media={item.media} />\n                <div className=\"flex flex-1 flex-col gap-2 p-6\">\n                  <h3 className=\"text-lg font-semibold\">{item.title}</h3>\n                  <p className=\"text-sm text-muted-foreground\">{item.description}</p>\n                </div>\n              </article>\n            </CarouselItem>\n          ))}\n        </CarouselContent>\n      </Carousel>\n\n      {items.length > 0 && (\n        <div className=\"mx-auto mt-8 flex max-w-6xl items-center justify-center gap-2 px-4 md:px-6\">\n          {items.map((_, index) => (\n            <button\n              key={index}\n              type=\"button\"\n              aria-label={`Go to slide ${index + 1}`}\n              onClick={() => api?.scrollTo(index)}\n              className={cn(\n                \"size-2 rounded-full bg-muted transition-colors hover:bg-muted-foreground/40\",\n                activeIndex === index && \"bg-primary hover:bg-primary\"\n              )}\n            />\n          ))}\n        </div>\n      )}\n    </section>\n  );\n}\n\nfunction ItemMediaSurface({ media }: { media: ItemMedia }) {\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/feature8.tsx"
    },
    {
      "path": "registry-pieces/ai8/ai8.tsx",
      "content": "\"use client\";\n\nimport { Sparkles } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\ninterface Ai8Props {\n  user?: string;\n  assistant?: string;\n  bordered?: boolean;\n  className?: string;\n}\n\nexport const ai8Demo: Ai8Props = {\n  user: \"What's the capital of Japan?\",\n  assistant:\n    \"Tokyo. It's been the capital since 1868, after Kyoto held the title for over a thousand years.\",\n  bordered: false,\n};\n\nexport function Ai8({\n  user,\n  assistant,\n  bordered = false,\n  className,\n}: Ai8Props) {\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=\"flex w-full max-w-80 flex-col gap-2\">\n        {user && (\n          <div className=\"ml-auto max-w-64 rounded-2xl rounded-br-md bg-primary px-3 py-2 text-sm leading-snug text-primary-foreground shadow-sm\">\n            {user}\n          </div>\n        )}\n        {assistant && (\n          <div className=\"flex items-start gap-2\">\n            <Sparkles className=\"mt-2 size-4 shrink-0 text-primary\" aria-hidden=\"true\" />\n            <div className={cn(\"max-w-64 rounded-2xl rounded-bl-md bg-card px-3 py-2 text-sm leading-snug text-card-foreground shadow-sm\", bordered && \"border border-border\")}>\n              {assistant}\n            </div>\n          </div>\n        )}\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/piece/ai8.tsx"
    },
    {
      "path": "registry-pieces/ai22/ai22.tsx",
      "content": "\"use client\";\n\nimport { Check, Wrench } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\ntype Tone =\n  | \"primary\"\n  | \"foreground\"\n  | \"violet\"\n  | \"emerald\"\n  | \"sky\"\n  | \"amber\";\n\ninterface Ai22Arg {\n  key: string;\n  value: string;\n}\n\ninterface Ai22Props {\n  fn?: string;\n  args?: Ai22Arg[];\n  status?: \"running\" | \"done\";\n  tone?: Tone;\n  bordered?: boolean;\n  className?: string;\n}\n\nconst iconClasses: Record<Tone, string> = {\n  primary: \"text-primary\",\n  foreground: \"text-foreground\",\n  violet: \"text-violet-500\",\n  emerald: \"text-emerald-500\",\n  sky: \"text-sky-500\",\n  amber: \"text-amber-500\",\n};\n\nconst dotClasses: Record<Tone, string> = {\n  primary: \"bg-primary\",\n  foreground: \"bg-foreground\",\n  violet: \"bg-violet-500\",\n  emerald: \"bg-emerald-500\",\n  sky: \"bg-sky-500\",\n  amber: \"bg-amber-500\",\n};\n\nexport const ai22Demo: Ai22Props = {\n  fn: \"search_docs\",\n  args: [\n    { key: \"query\", value: '\"rate limiting\"' },\n    { key: \"limit\", value: \"5\" },\n  ],\n  status: \"done\",\n  tone: \"primary\",\n  bordered: false,\n};\n\nexport function Ai22({\n  fn = \"function\",\n  args = [],\n  status = \"running\",\n  tone = \"primary\",\n  bordered = false,\n  className,\n}: Ai22Props) {\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-80 flex-col gap-1 rounded-md bg-card px-3 py-2.5 shadow-sm\", bordered && \"border border-border\")}>\n        <div className=\"flex items-center justify-between gap-2\">\n          <div className=\"flex items-center gap-1.5\">\n            <Wrench\n              className={cn(\"size-3.5\", iconClasses[tone])}\n              aria-hidden=\"true\"\n            />\n            <span className=\"text-xs font-semibold text-card-foreground\">\n              {fn}\n            </span>\n          </div>\n          {status === \"done\" ? (\n            <span className=\"flex items-center gap-1 text-xs font-medium text-emerald-600 dark:text-emerald-400\">\n              <Check className=\"size-3\" />\n              done\n            </span>\n          ) : (\n            <span className=\"flex items-center gap-1 text-xs font-medium text-muted-foreground\">\n              <span\n                className={cn(\n                  \"size-1.5 animate-pulse rounded-full\",\n                  dotClasses[tone]\n                )}\n                aria-hidden=\"true\"\n              />\n              running\n            </span>\n          )}\n        </div>\n        <div className=\"flex flex-col gap-0.5 border-t border-border pt-1.5 text-xs\">\n          {args.map((a) => (\n            <div key={a.key} className=\"flex gap-1.5\">\n              <span className=\"text-muted-foreground\">{a.key}:</span>\n              <span className=\"truncate text-sky-600 dark:text-sky-400\">\n                {a.value}\n              </span>\n            </div>\n          ))}\n        </div>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/piece/ai22.tsx"
    },
    {
      "path": "registry-pieces/code1/code1.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype Surface = \"card\" | \"glass\";\n\ninterface Code1Props {\n  code?: string;\n  language?: string;\n  surface?: Surface;\n  bordered?: boolean;\n  inverted?: boolean;\n  className?: string;\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 code1Demo: Code1Props = {\n  surface: \"card\",\n  bordered: false,\n  inverted: false,\n  code: \"const greeting = \\\"Hello, Beste!\\\";\",\n  language: \"ts\",\n};\n\nexport function Code1({\n  code,\n  language,\n  surface = \"card\",\n  bordered = false,\n  inverted = false,\n  className,\n}: Code1Props) {\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-80 items-center gap-2 rounded-lg bg-current/10 px-3 py-2 shadow-sm\", bordered && \"border border-current/15\")}>\n        <code className=\"flex-1 truncate font-mono text-sm\">\n          {code}\n        </code>\n        {language && (\n          <span className={cn(\"shrink-0 rounded-md px-1.5 py-0.5 font-mono text-xs font-semibold text-current/60\", surfaceTone, bordered && \"border border-current/15\")}>\n            {language}\n          </span>\n        )}\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/piece/code1.tsx"
    },
    {
      "path": "registry-pieces/keyboard1/keyboard1.tsx",
      "content": "\"use client\";\n\nimport { Fragment } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\ntype Surface = \"card\" | \"glass\";\n\ninterface Keyboard1Props {\n  keys?: string[];\n  label?: string;\n  surface?: Surface;\n  bordered?: boolean;\n  inverted?: boolean;\n  className?: string;\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 keyboard1Demo: Keyboard1Props = {\n  surface: \"card\",\n  bordered: false,\n  inverted: false,\n  keys: [\"⌘\", \"K\"],\n  label: \"Quick search\",\n};\n\nexport function Keyboard1({\n  keys = [\"⌘\", \"K\"],\n  label,\n  surface = \"card\",\n  bordered = false,\n  inverted = false,\n  className,\n}: Keyboard1Props) {\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(\"inline-flex items-center gap-2.5 rounded-lg px-3 py-2 shadow-sm\", surfaceTone, bordered && \"border border-current/15\")}>\n        {label && (\n          <span className=\"text-xs font-medium text-current/60\">\n            {label}\n          </span>\n        )}\n        <div className=\"flex items-center gap-1\">\n          {keys.map((key, index) => (\n            <Fragment key={index}>\n              {index > 0 && (\n                <span\n                  className=\"text-xs text-current/35\"\n                  aria-hidden=\"true\"\n                >\n                  +\n                </span>\n              )}\n              <kbd className=\"inline-flex h-5 min-w-5 items-center justify-center rounded-md border border-current/15 border-b-2 bg-current/10 px-1.5 text-xs font-medium\">\n                {key}\n              </kbd>\n            </Fragment>\n          ))}\n        </div>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/piece/keyboard1.tsx"
    },
    {
      "path": "registry-pieces/search1/search1.tsx",
      "content": "\"use client\";\n\nimport { Search } from \"lucide-react\";\nimport { Fragment } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\ntype Surface = \"card\" | \"glass\";\n\ninterface Search1Props {\n  placeholder?: string;\n  shortcut?: string[];\n  surface?: Surface;\n  bordered?: boolean;\n  inverted?: boolean;\n  className?: string;\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 search1Demo: Search1Props = {\n  surface: \"card\",\n  bordered: false,\n  inverted: false,\n  placeholder: \"Search anything...\",\n};\n\nexport function Search1({\n  placeholder = \"Search...\",\n  shortcut,\n  surface = \"card\",\n  bordered = false,\n  inverted = false,\n  className,\n}: Search1Props) {\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-72 items-center gap-2 rounded-lg px-3 py-2 shadow-sm\", surfaceTone, bordered && \"border border-current/15\")}>\n        <Search\n          className=\"size-3.5 shrink-0 text-current/60\"\n          aria-hidden=\"true\"\n        />\n        <span className=\"flex-1 truncate text-sm text-current/60\">\n          {placeholder}\n        </span>\n        {shortcut && shortcut.length > 0 && (\n          <div className=\"flex items-center gap-0.5\" aria-hidden=\"true\">\n            {shortcut.map((key, i) => (\n              <Fragment key={i}>\n                {i > 0 && (\n                  <span className=\"text-xs text-current/35\">+</span>\n                )}\n                <kbd className=\"inline-flex h-5 min-w-5 items-center justify-center rounded-md border border-current/15 border-b-2 bg-current/10 px-1 text-xs font-medium text-current/60\">\n                  {key}\n                </kbd>\n              </Fragment>\n            ))}\n          </div>\n        )}\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/piece/search1.tsx"
    },
    {
      "path": "registry-pieces/weather2/weather2.tsx",
      "content": "\"use client\";\n\nimport {\n  Cloud,\n  CloudRain,\n  CloudSnow,\n  Moon,\n  Sun,\n} from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype Surface = \"card\" | \"glass\";\n\ntype Condition = \"sunny\" | \"cloudy\" | \"rainy\" | \"snowy\" | \"night\";\n\ninterface Day {\n  label: string;\n  condition: Condition;\n  high: number;\n  low: number;\n}\n\ninterface Weather2Props {\n  days?: Day[];\n  surface?: Surface;\n  bordered?: boolean;\n  inverted?: boolean;\n  className?: string;\n}\n\nconst iconMap: Record<Condition, typeof Sun> = {\n  sunny: Sun,\n  cloudy: Cloud,\n  rainy: CloudRain,\n  snowy: CloudSnow,\n  night: Moon,\n};\n\nconst iconColorMap: Record<Condition, string> = {\n  sunny: \"text-amber-500\",\n  cloudy: \"text-slate-500\",\n  rainy: \"text-sky-500\",\n  snowy: \"text-cyan-500\",\n  night: \"text-indigo-400\",\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 weather2Demo: Weather2Props = {\n  surface: \"card\",\n  bordered: false,\n  inverted: false,\n  days: [\n    { label: \"Mon\", condition: \"sunny\", high: 24, low: 15 },\n    { label: \"Tue\", condition: \"cloudy\", high: 22, low: 14 },\n    { label: \"Wed\", condition: \"rainy\", high: 18, low: 12 },\n    { label: \"Thu\", condition: \"cloudy\", high: 19, low: 13 },\n  ],\n};\n\nexport function Weather2({ days = [], surface = \"card\", bordered = false, inverted = false, className }: Weather2Props) {\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-64 items-center justify-between gap-1 rounded-xl px-3 py-3 shadow-sm\", surfaceTone, bordered && \"border border-current/15\")}>\n        {days.map((day) => {\n          const Icon = iconMap[day.condition];\n          return (\n            <div\n              key={day.label}\n              className=\"flex flex-col items-center gap-1\"\n            >\n              <span className=\"text-xs font-medium text-current/60\">\n                {day.label}\n              </span>\n              <Icon\n                className={cn(\"size-5\", iconColorMap[day.condition])}\n                aria-hidden=\"true\"\n              />\n              <div className=\"flex flex-col items-center\">\n                <span className=\"text-sm font-semibold tabular-nums\">\n                  {day.high}°\n                </span>\n                <span className=\"text-xs tabular-nums text-current/60\">\n                  {day.low}°\n                </span>\n              </div>\n            </div>\n          );\n        })}\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/piece/weather2.tsx"
    }
  ],
  "type": "registry:block"
}