{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Post Author component",
  "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  The author of a post: the portrait, the name and role, and the date or the share and save buttons; as a line,\n  a card, or a card with the bio.\n-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { Post } from \"../blocks/post-card.types\";\n  import type { PostExtras, PostSplitLabels } from \"../blocks/post-split.types\";\n\n  export type PostAuthorProps = {\n    post: Post;\n    extras: PostExtras;\n    labels: PostSplitLabels;\n    mode?: \"line\" | \"card\" | \"bio\";\n    share?: boolean;\n    class?: string;\n  };\n</script>\n\n<script lang=\"ts\">\n  import Box from \"../compose/Box.svelte\";\n  import Button from \"../compose/Button.svelte\";\n  import Group from \"../compose/Group.svelte\";\n  import LucideIcon from \"../icons/LucideIcon.svelte\";\n  import Stack from \"../compose/Stack.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import MediaFrame from \"../components/media-frame.svelte\";\n  import { cn } from \"../utils\";\n\n  let { post, extras, labels, mode = \"line\", share = false, class: className }: PostAuthorProps = $props();\n</script>\n\n<Stack\n  gap=\"4\"\n  align=\"stretch\"\n  class={cn(\n    (((mode as string) === \"line\") ? \"\" : \"rounded bg-card inset-ring inset-ring-border p-4\"),\n    className\n  )}\n  data-slot=\"post-author\"\n>\n  <Group gap=\"4\" align=\"center\">\n    <MediaFrame alt={post.author} ratio=\"1/1\" class=\"size-10 shrink-0 rounded-full\" />\n    <Stack gap=\"0\" align=\"start\" class=\"min-w-0 flex-1 text-start\">\n      <Text size=\"sm\" weight=\"semibold\">\n        {post.author}\n      </Text>\n      <Text size=\"xs\" class=\"text-muted-foreground\">\n        {extras.role}\n      </Text>\n    </Stack>\n    {#if share}\n      <Group gap=\"2\">\n        <Button variant=\"ghost\" size=\"default\" class=\"gap-2\">\n          <LucideIcon name=\"share-2\" size={16} />\n          {labels.share}\n        </Button>\n        <Button variant=\"ghost\" size=\"default\" class=\"gap-2\">\n          <LucideIcon name=\"bookmark\" size={16} />\n          {labels.save}\n        </Button>\n      </Group>\n    {:else}\n      <Box class=\"text-muted-foreground\">\n        <Group gap=\"2\" align=\"center\">\n          <LucideIcon name=\"calendar\" size={16} />\n          <Text size=\"sm\">\n            {post.date}\n          </Text>\n        </Group>\n      </Box>\n    {/if}\n  </Group>\n  {#if ((mode as string) === \"bio\")}\n    <Text size=\"sm\" class=\"text-muted-foreground\">\n      {extras.bio}\n    </Text>\n  {/if}\n</Stack>\n",
      "path": "components/post-author.svelte",
      "target": "components/post-author.svelte"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "svelte",
      "component"
    ]
  },
  "name": "post-author",
  "registryDependencies": [
    "box",
    "button",
    "group",
    "lucide-icon",
    "media-frame",
    "post-card",
    "post-split",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Post Author",
  "type": "registry:component"
}
