{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "UI8Kit 3 Link primitive (unstyled), from @ui8kit/registry",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "<!-- Code generated by @ui8kit/codegen. DO NOT EDIT. -->\n<!--\n  Link renders an anchor; External opens a new tab with rel=noopener noreferrer.\n-->\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from \"vue\";\nimport { linkClasses } from \"./link.shared\";\nimport { eqStr, isSetStr, orUndef, safeRest } from \"../../utils/expr\";\n\ndefineOptions({ name: \"Link\", inheritAttrs: false });\n\nconst props = defineProps<{\n  target?: string;\n  rel?: string;\n  external?: boolean;\n}>();\n\nconst attrs = useAttrs();\nconst callerClass = computed(() => attrs.class as string | undefined);\nconst restAttrs = computed(() => {\n  const { class: _class, ...restEntries } = attrs;\n  return safeRest(restEntries, { blank: [\"href\", \"download\", \"aria-current\", \"aria-label\"] });\n});\nconst cls = computed(() => linkClasses({ className: callerClass.value }));\nconst targetValue = computed(() => (isSetStr(props.target) ? props.target : (props.external ? \"_blank\" : \"\")));\nconst relValue = computed(() => (isSetStr(props.rel) ? props.rel : ((props.external || eqStr(targetValue.value, \"_blank\")) ? \"noopener noreferrer\" : \"\")));\n</script>\n\n<template>\n  <a :class=\"cls || undefined\" :target=\"orUndef(targetValue)\" :rel=\"orUndef(relValue)\" v-bind=\"restAttrs\">\n    <slot />\n  </a>\n</template>\n",
      "path": "kit/ui/link/Link.vue",
      "target": "kit/ui/link/Link.vue"
    },
    {
      "content": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n// ui.link — shared TypeScript contract (types + classes helpers)\n\nimport { cn } from \"../../utils\";\n\n/** Link renders an anchor; External opens a new tab with rel=noopener noreferrer. */\nexport type LinkBaseProps = {\n  target?: string;\n  rel?: string;\n  external?: boolean;\n};\n\nexport type LinkClassesInput = {\n  className?: string;\n};\n\n/** Compose Link classes without rendering — the cross-runtime `asChild` substitute. */\nexport function linkClasses(input: LinkClassesInput = {}): string {\n  return cn(input.className);\n}\n",
      "path": "kit/ui/link/link.shared.ts",
      "target": "kit/ui/link/link.shared.ts"
    }
  ],
  "meta": {
    "category": "kit",
    "kind": "primitive",
    "tags": [
      "vue",
      "primitive"
    ]
  },
  "name": "kit-link",
  "registryDependencies": [
    "utils"
  ],
  "runtime": "vue",
  "title": "Kit Link",
  "type": "registry:ui"
}
