{
  "$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-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { Post, PostLabels } from \"./post-card.types\";\n  import type { HeadLink } from \"../components/section-frame.types\";\n\n  export 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</script>\n\n<script lang=\"ts\">\n  import Box from \"../compose/Box.svelte\";\n  import Link from \"../compose/Link.svelte\";\n  import LucideIcon from \"../icons/LucideIcon.svelte\";\n  import EmptyState from \"../components/empty-state.svelte\";\n  import MediaFrame from \"../components/media-frame.svelte\";\n  import PostFeature from \"../components/post-feature.svelte\";\n  import PostMiniCard from \"../components/post-mini-card.svelte\";\n  import PostOverlayCard from \"../components/post-overlay-card.svelte\";\n  import SectionFrame from \"../components/section-frame.svelte\";\n  import { urlOf } from \"../utils\";\n\n  let {\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 = $props();\n</script>\n\n{#if ((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{:else if ((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  >\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    {#snippet aside()}\n      <Box class=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n        {#each posts as p, i (p.id)}\n          {#if (i < 4)}\n            <PostMiniCard p={p} labels={labels} />\n          {/if}\n        {/each}\n      </Box>\n    {/snippet}\n  </SectionFrame>\n{:else if ((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  >\n    {#each posts as p, i (p.id)}\n      {#if (i < 1)}\n        <PostFeature p={p} labels={labels} />\n      {/if}\n    {/each}\n    {#snippet aside()}\n      <MediaFrame alt={(imageAlt ? imageAlt : title)} src={image} ratio=\"4/3\" />\n    {/snippet}\n  </SectionFrame>\n{:else}\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      {#each posts as p, i (p.id)}\n        {#if (i < (((cols as string) === \"2\") ? 2 : 3))}\n          <PostOverlayCard p={p} labels={labels} ratio={(((cols as string) === \"2\") ? \"16/9\" : \"4/3\")} />\n        {/if}\n      {/each}\n    </Box>\n  </SectionFrame>\n{/if}\n",
      "path": "blocks/post-showcase.svelte",
      "target": "blocks/post-showcase.svelte"
    }
  ],
  "meta": {
    "category": "content",
    "group": "blog",
    "kind": "block",
    "tags": [
      "svelte",
      "block"
    ]
  },
  "name": "post-showcase",
  "registryDependencies": [
    "box",
    "empty-state",
    "link",
    "lucide-icon",
    "media-frame",
    "post-card",
    "post-feature",
    "post-mini-card",
    "post-overlay-card",
    "section-frame",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Post Showcase",
  "type": "registry:block"
}
