{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Skip link, brand, navigation, theme button and an optional call to action.",
  "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 page header: a skip link to the main content, the brand, the two navigation links (the current one carries\n * aria-current) and the theme button. `current` is the route area. Axes: layout (inline, stacked), position\n * (static, sticky), actions (none, cta).\n */\nimport { type JSX } from \"solid-js\";\nimport { Block, Button, Container, Group, LinkPlain } from \"../compose\";\nimport { MenuEntry } from \"../components/menu-entry\";\nimport { NavBlock } from \"../components/nav-block\";\nimport { cn, tpl, uniqLabel, urlOf } from \"../utils\";\nimport type { SiteHeaderLabels, SiteRoutes } from \"./site-header.types\";\n\nexport type SiteHeaderProps = {\n  labels: SiteHeaderLabels;\n  routes?: SiteRoutes;\n  current: string;\n  layout?: \"inline\" | \"stacked\";\n  position?: \"static\" | \"sticky\";\n  actions?: \"none\" | \"cta\";\n  cta?: string;\n  ctaHref?: string;\n  landmarkLabel?: string;\n  onTheme?: () => void;\n};\n\nexport function SiteHeader({\n  labels,\n  routes,\n  current,\n  layout = \"inline\",\n  position = \"static\",\n  actions = \"none\",\n  cta,\n  ctaHref,\n  landmarkLabel,\n  onTheme,\n}: SiteHeaderProps) {\n  return (\n    <Block\n      tag=\"header\"\n      class={cn(\n        \"border-b border-border bg-background\",\n        (((position as string) === \"sticky\") ? \"sticky top-0 z-40\" : \"\")\n      )}\n      data-layout={layout}\n      aria-label={landmarkLabel}\n      data-slot=\"site-header\"\n    >\n      <LinkPlain\n        href=\"#main-content\"\n        class={\"sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded focus:bg-background \" +\n          \"focus:px-4 focus:py-2 focus:text-sm focus:inset-ring focus:inset-ring-border\"}\n        data-slot=\"skip-link\"\n      >\n        {labels.skip}\n      </LinkPlain>\n      <Container\n        class={cn(\n          \"mx-auto w-full max-w-6xl px-4\",\n          \"flex flex-wrap gap-4 py-4\",\n          (((layout as string) === \"stacked\") ? \"flex-col items-center\" : \"items-center justify-between\")\n        )}\n        data-slot=\"container\"\n      >\n        <MenuEntry href={routes?.home} class=\"text-lg font-medium\" testid=\"brand\">\n          {labels.brand}\n        </MenuEntry>\n        <NavBlock\n          label={(landmarkLabel ? uniqLabel(tpl(\"{0}, {1}\", labels.nav, landmarkLabel)) : labels.nav)}\n          testid=\"site-nav\"\n        >\n          <Group gap=\"4\" align=\"center\">\n            <MenuEntry\n              href={routes?.home}\n              class=\"font-semibold\"\n              current={((current as string) === \"home\")}\n              testid=\"nav-link\"\n            >\n              {labels.home}\n            </MenuEntry>\n            <MenuEntry\n              href={routes?.pricing}\n              class=\"font-semibold\"\n              current={((current as string) === \"pricing\")}\n              testid=\"nav-link\"\n            >\n              {labels.pricing}\n            </MenuEntry>\n          </Group>\n        </NavBlock>\n        <Group gap=\"4\" align=\"center\">\n          <Button variant=\"outline\" size=\"sm\" onClick={() => onTheme?.()}>\n            {labels.theme}\n          </Button>\n          {(((actions as string) === \"cta\") && cta) ? (\n            <Button variant=\"default\" size=\"sm\" href={urlOf(ctaHref)}>\n              {cta}\n            </Button>\n          ) : null}\n        </Group>\n      </Container>\n    </Block>\n  );\n}\n",
      "path": "blocks/site-header.tsx",
      "target": "blocks/site-header.tsx"
    },
    {
      "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\nexport type SiteHeaderLabels = {\n  skip: string;\n  brand: string;\n  nav: string;\n  home: string;\n  pricing: string;\n  theme: string;\n};\n\nexport type SiteRoutes = {\n  home?: string;\n  pricing?: string;\n};\n",
      "path": "blocks/site-header.types.ts",
      "target": "blocks/site-header.types.ts"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "navigation",
    "kind": "block",
    "tags": [
      "solid",
      "block"
    ]
  },
  "name": "site-header",
  "registryDependencies": [
    "compose",
    "menu-entry",
    "nav-block",
    "utils"
  ],
  "runtime": "solid",
  "title": "Site Header",
  "type": "registry:block"
}
