{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "image-showcase",
  "title": "Image Showcase",
  "description": "An editorial image story: a lead photograph with its caption and credit, the facts and actions that give it context, and a gallery for the rest of the set.",
  "dependencies": [
    "cn",
    "lucide-react"
  ],
  "registryDependencies": [
    "litingyes/blocove/image",
    "litingyes/blocove/image-gallery",
    "litingyes/blocove/image-zoom",
    "badge",
    "separator"
  ],
  "files": [
    {
      "path": "src/registry/blocove/blocks/image-showcase.tsx",
      "content": "import type { ReactNode } from 'react'\nimport type { ImageTransform } from '@/components/blocove/image/image'\nimport { cn } from 'cn'\nimport { ExternalLinkIcon } from 'lucide-react'\nimport { ImageGallery } from '@/components/blocove/image/gallery'\nimport { ImageZoom } from '@/components/blocove/image/zoom'\nimport { Badge } from '@/components/ui/badge'\nimport { Separator } from '@/components/ui/separator'\n\nexport interface ImageShowcaseItem {\n  /** The full-size source. */\n  src: string\n  /** Alternative text. */\n  alt: string\n  /** The smaller source used by the gallery; defaults to `src`. */\n  thumbnailSrc?: string\n  /** Caption shown under the lead image or the gallery preview. */\n  caption?: ReactNode\n}\n\nexport interface ImageShowcaseProps {\n  /** The title of the story the images belong to. */\n  title: string\n  /** The images, in reading order; the first one leads the block. */\n  images: readonly ImageShowcaseItem[]\n  /** A small label above the title. */\n  eyebrow?: string\n  /** Supporting copy under the title. */\n  description?: string\n  /** Attribution shown under the lead image. */\n  credit?: ReactNode\n  /** Small facts rendered as badges, for example dates or counts. */\n  meta?: string[]\n  /** Extra actions rendered next to the facts. */\n  actions?: ReactNode\n  /** Optional link to the original source, rendered as \"View original\". */\n  href?: string\n  /** Aspect ratio reserved for the lead image and the gallery preview. */\n  aspectRatio?: number | string\n  /** Widths the lead image requests. */\n  widths?: readonly number[]\n  /** Turns a source and a width into the URL that serves it. */\n  transform?: ImageTransform\n  /** Layout sizes of the lead image. */\n  sizes?: string\n  /** Extra classes for the section. */\n  className?: string\n}\n\n/**\n * An editorial image story: a lead photograph with its caption and credit, the\n * facts and actions that give it context, and a gallery for the rest of the set.\n * The lead image keeps the zoom behaviour, so the block reads as one composed\n * surface rather than a stack of unrelated parts.\n */\nexport function ImageShowcase({\n  title,\n  images,\n  eyebrow,\n  description,\n  credit,\n  meta,\n  actions,\n  href,\n  aspectRatio = '16 / 9',\n  widths,\n  transform,\n  sizes,\n  className,\n}: ImageShowcaseProps) {\n  if (images.length === 0) {\n    return null\n  }\n\n  const [lead, ...rest] = images\n  const hasFooter = Boolean(meta?.length) || Boolean(actions) || Boolean(href)\n\n  return (\n    <section\n      data-slot=\"image-showcase\"\n      className={cn('flex w-full flex-col gap-4', className)}\n    >\n      <header className=\"flex flex-col gap-2\">\n        {eyebrow\n          ? (\n              <Badge variant=\"secondary\" className=\"w-fit\">\n                {eyebrow}\n              </Badge>\n            )\n          : null}\n        <h3 className=\"font-heading text-2xl font-semibold tracking-tight text-balance\">\n          {title}\n        </h3>\n        {description\n          ? (\n              <p className=\"max-w-2xl text-sm text-muted-foreground\">\n                {description}\n              </p>\n            )\n          : null}\n      </header>\n\n      <ImageZoom\n        alt={lead.alt}\n        aspectRatio={aspectRatio}\n        caption={lead.caption}\n        sizes={sizes}\n        src={lead.src}\n        transform={transform}\n        widths={widths}\n      />\n\n      {lead.caption || credit\n        ? (\n            <div className=\"flex flex-wrap items-baseline justify-between gap-2 text-xs text-muted-foreground\">\n              <span>{lead.caption}</span>\n              {credit\n                ? (\n                    <span className=\"text-muted-foreground/80\">\n                      {credit}\n                    </span>\n                  )\n                : null}\n            </div>\n          )\n        : null}\n\n      {hasFooter\n        ? (\n            <>\n              <Separator />\n              <div className=\"flex flex-wrap items-center justify-between gap-3\">\n                <div className=\"flex flex-wrap items-center gap-2\">\n                  {meta?.map(item => (\n                    <Badge key={item} variant=\"outline\">\n                      {item}\n                    </Badge>\n                  ))}\n                </div>\n                <div className=\"flex flex-wrap items-center gap-2\">\n                  {actions}\n                  {href\n                    ? (\n                        <a\n                          href={href}\n                          target=\"_blank\"\n                          rel=\"noreferrer\"\n                          className=\"inline-flex items-center gap-1 text-sm font-medium underline-offset-4 hover:underline\"\n                        >\n                          View original\n                          <ExternalLinkIcon className=\"size-3.5\" />\n                        </a>\n                      )\n                    : null}\n                </div>\n              </div>\n            </>\n          )\n        : null}\n\n      {rest.length > 0\n        ? (\n            <ImageGallery\n              aspectRatio={aspectRatio}\n              images={rest}\n              label={`More from ${title}`}\n              sizes={sizes}\n              transform={transform}\n              widths={widths}\n            />\n          )\n        : null}\n    </section>\n  )\n}\n",
      "type": "registry:block",
      "target": "components/blocove/image-showcase.tsx"
    }
  ],
  "categories": [
    "image",
    "block"
  ],
  "type": "registry:block"
}