{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A display title, one span per word; word i takes weights[i] (from the preset). The words wrap like text.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/weighted-title.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// WeightedTitleProps are the props of WeightedTitle; the values are the JSON shapes of the TypeScript props.\ntype WeightedTitleProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tWeights any `json:\"weights\"`\n\tLevel any `json:\"level\"`\n}\n\n// A display title, one span per word; word i takes weights[i] (from the preset). The words wrap like text.\ntempl WeightedTitle(p WeightedTitleProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vWeights := p.Weights }}\n\t{{ vLevel := uiutils.Def(p.Level, float64(1)) }}\n\t@compose.Title(compose.TitleProps{As: uiutils.S(vLevel), Size: \"5xl\", Weight: \"semibold\", TextProps: text.TextProps{Class: uiutils.S(uiutils.Cnv(\"text-center tracking-tight text-background\", uiutils.Get(presetDefaults, \"hero\", \"title\"))), Attrs: uiutils.Attrs(\"id\", vId, \"data-slot\", \"weighted-title\")}}) {\n\t\tfor vI, vWord := range uiutils.L(uiutils.Words(vTitle)) {\n\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: uiutils.S(uiutils.Nth(vWeights, float64(vI))), Attrs: uiutils.Attrs(\"data-slot\", \"items-row\")}}) {\n\t\t\t\t{ uiutils.Text(vWord) }\n\t\t\t}\n\t\t\t{ uiutils.Text(\" \") }\n\t\t}\n\t}\n}\n",
      "path": "blocks/weighted-title.templ",
      "target": "blocks/weighted-title.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "weighted-title",
  "registryDependencies": [
    "inline",
    "kit-text",
    "presets",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Weighted Title",
  "type": "registry:component"
}
