{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The author of a post: the portrait, the name and role, and the date or the share and save buttons; as a line, a card, or a card with the bio.",
  "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 */\nimport { type JSX } from \"solid-js\";\nimport { Box, Button, Group, Stack, Text } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { MediaFrame } from \"../components/media-frame\";\nimport { cn } from \"../utils\";\nimport type { Post } from \"../blocks/post-card.types\";\nimport type { PostExtras, PostSplitLabels } from \"../blocks/post-split.types\";\n\nexport type PostAuthorProps = {\n  post: Post;\n  extras: PostExtras;\n  labels: PostSplitLabels;\n  mode?: \"line\" | \"card\" | \"bio\";\n  share?: boolean;\n  class?: string;\n};\n\nexport function PostAuthor({\n  post,\n  extras,\n  labels,\n  mode = \"line\",\n  share = false,\n  class: className,\n}: PostAuthorProps) {\n  return (\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        {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        ) : (\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        )}\n      </Group>\n      {((mode as string) === \"bio\") ? (\n        <Text size=\"sm\" class=\"text-muted-foreground\">\n          {extras.bio}\n        </Text>\n      ) : null}\n    </Stack>\n  );\n}\n",
      "path": "components/post-author.tsx",
      "target": "components/post-author.tsx"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "solid",
      "component"
    ]
  },
  "name": "post-author",
  "registryDependencies": [
    "compose",
    "lucide-icon",
    "media-frame",
    "post-card",
    "post-split",
    "utils"
  ],
  "runtime": "solid",
  "title": "Post Author",
  "type": "registry:component"
}
