{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "UI8Kit 3 Text primitive (unstyled), from @ui8kit/registry",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n// ui.text — shared TypeScript contract (types + classes helpers)\n\nimport { cn } from \"../../utils\";\n\n/** Text renders the requested text element (default p). */\nexport type TextBaseProps = {\n  tag?: \"p\" | \"span\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"blockquote\" | \"figcaption\" | \"pre\" | \"code\" | \"small\" | \"strong\" | \"em\" | \"time\" | \"legend\" | \"del\" | \"ins\";\n};\n\nexport type TextClassesInput = {\n  className?: string;\n};\n\n/** Compose Text classes without rendering — the cross-runtime `asChild` substitute. */\nexport function textClasses(input: TextClassesInput = {}): string {\n  return cn(input.className);\n}\n",
      "path": "kit/ui/text/text.shared.ts",
      "target": "kit/ui/text/text.shared.ts"
    },
    {
      "content": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n/**\n * Text is the polymorphic text primitive. `tag` accepts HTML5 text elements\n * only (p, span, h1–h6, blockquote, code, …); anything else falls back to p.\n */\n\nimport { forwardRef, type ReactNode, type HTMLAttributes, type ElementType, type Ref } from \"react\";\nimport { textClasses } from \"./text.shared\";\nimport { safeRest } from \"../../utils/expr\";\nimport { resolveTag, TagGroup } from \"../../utils/tags\";\nimport { Slot } from \"../slot/slot\";\n\n/**\n * Text renders the requested text element (default p).\n */\nexport type TextProps = Omit<HTMLAttributes<HTMLElement>, \"className\" | \"children\" | \"tag\"> & {\n  tag?: \"p\" | \"span\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"blockquote\" | \"figcaption\" | \"pre\" | \"code\" | \"small\" | \"strong\" | \"em\" | \"time\" | \"legend\" | \"del\" | \"ins\";\n  className?: string;\n  children?: ReactNode;\n  asChild?: boolean;\n};\n\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text(\n  { tag, className, children, asChild, ...rawRest },\n  ref\n) {\n  const rest = safeRest(rawRest);\n  const cls = textClasses({ className });\n  const resolvedTagValue = resolveTag(tag, \"p\", TagGroup.Text);\n  const Tag = resolvedTagValue as ElementType;\n  if (asChild) {\n    return (\n      <Slot ref={ref} className={cls} {...rest}>\n        {children}\n      </Slot>\n    );\n  }\n  return (\n    <Tag ref={ref as Ref<HTMLElement>} className={cls || undefined} {...rest}>\n      {children}\n    </Tag>\n  );\n});\nText.displayName = \"Text\";\n",
      "path": "kit/ui/text/text.tsx",
      "target": "kit/ui/text/text.tsx"
    }
  ],
  "meta": {
    "category": "kit",
    "kind": "primitive",
    "tags": [
      "react",
      "primitive"
    ]
  },
  "name": "kit-text",
  "registryDependencies": [
    "kit-slot",
    "utils"
  ],
  "runtime": "react",
  "title": "Kit Text",
  "type": "registry:ui"
}
