{
  "$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\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"
    },
    {
      "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\">\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};\n</script>\n\n<script setup lang=\"ts\">\nimport Block from \"../compose/Block.vue\";\nimport Button from \"../compose/Button.vue\";\nimport Container from \"../compose/Container.vue\";\nimport Group from \"../compose/Group.vue\";\nimport LinkPlain from \"../compose/LinkPlain.vue\";\nimport MenuEntry from \"../components/menu-entry.vue\";\nimport NavBlock from \"../components/nav-block.vue\";\nimport { cn, tpl, uniqLabel, urlOf } from \"../utils\";\n\nconst {\n  labels,\n  routes,\n  current,\n  layout = \"inline\",\n  position = \"static\",\n  actions = \"none\",\n  cta,\n  ctaHref,\n  landmarkLabel,\n} = defineProps<SiteHeaderProps>();\nconst emit = defineEmits<{ theme: [] }>();\n</script>\n\n<template>\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\" @click=\"() => emit('theme')\">\n          {{ labels.theme }}\n        </Button>\n        <Button v-if=\"(((actions as string) === 'cta') && cta)\" variant=\"default\" size=\"sm\" :href=\"urlOf(ctaHref)\">\n          {{ cta }}\n        </Button>\n      </Group>\n    </Container>\n  </Block>\n</template>\n",
      "path": "blocks/site-header.vue",
      "target": "blocks/site-header.vue"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "navigation",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "site-header",
  "registryDependencies": [
    "block",
    "button",
    "container",
    "group",
    "link-plain",
    "menu-entry",
    "nav-block",
    "utils"
  ],
  "runtime": "vue",
  "title": "Site Header",
  "type": "registry:block"
}
