{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Four small post cards beside an intro with a view-all link; the first post in detail beside its picture; or cards with the text on a panel over the picture, in two or three columns.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * Posts shown off. Axes: layout (intro: four small post cards beside the intro with a view-all link, featured:\n * the first post in detail beside its picture, overlay: cards with the text over the picture), cols (2, 3:\n * overlay columns), mediaSide, tone.\n */\nimport { For, type JSX } from \"solid-js\";\nimport { Box, Link } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { MediaFrame } from \"../components/media-frame\";\nimport { PostFeature } from \"../components/post-feature\";\nimport { PostMiniCard } from \"../components/post-mini-card\";\nimport { PostOverlayCard } from \"../components/post-overlay-card\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { urlOf } from \"../utils\";\nimport type { Post, PostLabels } from \"./post-card.types\";\nimport type { HeadLink } from \"../components/section-frame.types\";\n\nexport type PostShowcaseProps = {\n  id: string;\n  title: string;\n  lead?: string;\n  badge?: string;\n  posts: Post[];\n  labels: PostLabels;\n  action: HeadLink;\n  layout?: \"intro\" | \"featured\" | \"overlay\";\n  cols?: \"2\" | \"3\";\n  mediaSide?: \"end\" | \"start\";\n  tone?: \"default\" | \"muted\";\n  empty?: string;\n  image?: string;\n  imageAlt?: string;\n  landmarkLabel?: string;\n};\n\nexport function PostShowcase({\n  id,\n  title,\n  lead = \"\",\n  badge = \"\",\n  posts,\n  labels,\n  action,\n  layout = \"intro\",\n  cols = \"3\",\n  mediaSide = \"start\",\n  tone = \"default\",\n  empty = \"\",\n  image,\n  imageAlt,\n  landmarkLabel,\n}: PostShowcaseProps) {\n  return (\n    <>\n      {((posts?.length ?? 0) === 0) ? (\n        <SectionFrame id={id} title={title} lead={lead} heading={{ badge }} tone={tone} landmarkLabel={landmarkLabel}>\n          <EmptyState icon=\"newspaper\" title={empty} />\n        </SectionFrame>\n      ) : ((layout as string) === \"intro\") ? (\n        <SectionFrame\n          id={id}\n          title={title}\n          lead={lead}\n          heading={{ badge }}\n          tone={tone}\n          layout=\"split\"\n          media={{ show: true, side: mediaSide }}\n          landmarkLabel={landmarkLabel}\n          aside={(\n            <Box class=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n              <For each={posts ?? []}>{(p, iOf) => { const i = iOf(); return (\n                <>\n                  {(i < 4) ? (\n                    <PostMiniCard p={p} labels={labels} />\n                  ) : null}\n                </>\n              ); }}</For>\n            </Box>\n          )}\n        >\n          <Link href={urlOf(action.href)} size=\"sm\" data-slot=\"section-action\">\n            {action.label}\n            <LucideIcon name=\"arrow-right\" size={16} />\n          </Link>\n        </SectionFrame>\n      ) : ((layout as string) === \"featured\") ? (\n        <SectionFrame\n          id={id}\n          title={title}\n          lead={lead}\n          heading={{ badge }}\n          tone={tone}\n          layout=\"split\"\n          media={{ show: true, side: mediaSide }}\n          landmarkLabel={landmarkLabel}\n          aside={(\n            <MediaFrame alt={(imageAlt ? imageAlt : title)} src={image} ratio=\"4/3\" />\n          )}\n        >\n          <For each={posts ?? []}>{(p, iOf) => { const i = iOf(); return (\n            <>\n              {(i < 1) ? (\n                <PostFeature p={p} labels={labels} />\n              ) : null}\n            </>\n          ); }}</For>\n        </SectionFrame>\n      ) : (\n        <SectionFrame id={id} title={title} lead={lead} heading={{ badge }} tone={tone} landmarkLabel={landmarkLabel}>\n          <Box\n            class={\n              (cols as string) === \"2\" ? \"grid grid-cols-1 gap-6 md:grid-cols-2\"\n              : \"grid grid-cols-1 gap-6 md:grid-cols-3\"\n            }\n          >\n            <For each={posts ?? []}>{(p, iOf) => { const i = iOf(); return (\n              <>\n                {(i < (((cols as string) === \"2\") ? 2 : 3)) ? (\n                  <PostOverlayCard p={p} labels={labels} ratio={(((cols as string) === \"2\") ? \"16/9\" : \"4/3\")} />\n                ) : null}\n              </>\n            ); }}</For>\n          </Box>\n        </SectionFrame>\n      )}\n    </>\n  );\n}\n",
      "path": "blocks/post-showcase.tsx",
      "target": "blocks/post-showcase.tsx"
    }
  ],
  "meta": {
    "category": "content",
    "group": "blog",
    "kind": "block",
    "tags": [
      "solid",
      "block"
    ]
  },
  "name": "post-showcase",
  "registryDependencies": [
    "compose",
    "empty-state",
    "lucide-icon",
    "media-frame",
    "post-card",
    "post-feature",
    "post-mini-card",
    "post-overlay-card",
    "section-frame",
    "utils"
  ],
  "runtime": "solid",
  "title": "Post Showcase",
  "type": "registry:block"
}
