{
  "$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-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { SiteHeaderLabels, SiteRoutes } from \"./site-header.types\";\n\n  export 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</script>\n\n<script lang=\"ts\">\n  import Block from \"../compose/Block.svelte\";\n  import Button from \"../compose/Button.svelte\";\n  import Container from \"../compose/Container.svelte\";\n  import Group from \"../compose/Group.svelte\";\n  import LinkPlain from \"../compose/LinkPlain.svelte\";\n  import MenuEntry from \"../components/menu-entry.svelte\";\n  import NavBlock from \"../components/nav-block.svelte\";\n  import { cn, tpl, uniqLabel, urlOf } from \"../utils\";\n\n  let {\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 = $props();\n</script>\n\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      {#if (((actions as string) === \"cta\") && cta)}\n        <Button variant=\"default\" size=\"sm\" href={urlOf(ctaHref)}>\n          {cta}\n        </Button>\n      {/if}\n    </Group>\n  </Container>\n</Block>\n",
      "path": "blocks/site-header.svelte",
      "target": "blocks/site-header.svelte"
    },
    {
      "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": [
      "svelte",
      "block"
    ]
  },
  "name": "site-header",
  "registryDependencies": [
    "block",
    "button",
    "container",
    "group",
    "link-plain",
    "menu-entry",
    "nav-block",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Site Header",
  "type": "registry:block"
}
