{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "loader-fill-text",
  "type": "registry:component",
  "title": "Loader Fill Text",
  "description": "An outlined word that fills with color from the bottom up behind a rolling wave surface. Drive it with a value or let it loop.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "loaders",
    "loader",
    "text",
    "fill",
    "wave",
    "progress",
    "splash"
  ],
  "docs": "https://hyperblur.dev/effects/loader-fill-text",
  "files": [
    {
      "path": "registry/hyperblur/loader-fill-text.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/loader-fill-text.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface LoaderFillTextProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n  text?: string;\n  value?: number;\n  size?: number;\n  color?: string;\n  duration?: number;\n}\n\nconst css = `\n@property --hb-zz6-p {\n  syntax: \"<number>\";\n  inherits: true;\n  initial-value: 0;\n}\n@keyframes hb-zz6-loop {\n  0% { --hb-zz6-p: 0; animation-timing-function: cubic-bezier(0.45, 0.05, 0.35, 1); }\n  80% { --hb-zz6-p: 1; animation-timing-function: linear; }\n  90% { --hb-zz6-p: 1; animation-timing-function: cubic-bezier(0.6, 0, 0.9, 0.5); }\n  100% { --hb-zz6-p: 0; }\n}\n@keyframes hb-zz6-front {\n  from { -webkit-mask-position-x: 0, 0; mask-position-x: 0, 0; }\n  to { -webkit-mask-position-x: -2.2em, 0; mask-position-x: -2.2em, 0; }\n}\n@keyframes hb-zz6-back {\n  from { -webkit-mask-position-x: 0, 0; mask-position-x: 0, 0; }\n  to { -webkit-mask-position-x: 2.2em, 0; mask-position-x: 2.2em, 0; }\n}\n.hb-zz6 {\n  --hb-zz6-wave: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M0 20V10Q25 0 50 10T100 10V20Z'/%3E%3C/svg%3E\");\n  position: relative;\n  box-sizing: border-box;\n  display: inline-grid;\n  max-width: 100%;\n  font-family: inherit;\n  font-size: var(--hb-zz6-size, 56px);\n  font-weight: 800;\n  line-height: 1;\n  letter-spacing: -0.02em;\n  transition: --hb-zz6-p 0.7s cubic-bezier(0.3, 0.7, 0.2, 1);\n}\n.hb-zz6 *, .hb-zz6 *::before, .hb-zz6 *::after { box-sizing: border-box; }\n.hb-zz6[data-loop] {\n  animation: hb-zz6-loop var(--hb-zz6-dur, 3.6s) infinite;\n}\n.hb-zz6 > span {\n  grid-area: 1 / 1;\n  padding: 0.12em 0;\n  white-space: nowrap;\n}\n.hb-zz6-t {\n  color: transparent;\n  -webkit-text-stroke: 0.028em #3d3d3d;\n}\n.hb-zz6-f {\n  color: transparent;\n  background: linear-gradient(180deg, color-mix(in srgb, var(--hb-zz6-c) 55%, #ffffff) 0%, var(--hb-zz6-c) 100%);\n  -webkit-background-clip: text;\n  background-clip: text;\n  -webkit-mask-image: var(--hb-zz6-wave), linear-gradient(#000, #000);\n  mask-image: var(--hb-zz6-wave), linear-gradient(#000, #000);\n  -webkit-mask-repeat: repeat-x, no-repeat;\n  mask-repeat: repeat-x, no-repeat;\n  -webkit-mask-size: 2.2em 0.2em, 100% 100%;\n  mask-size: 2.2em 0.2em, 100% 100%;\n  -webkit-mask-position-y: calc(1.1em - 1.25em * var(--hb-zz6-p) + var(--hb-zz6-lift, 0em)), calc(1.3em - 1.25em * var(--hb-zz6-p) + var(--hb-zz6-lift, 0em));\n  mask-position-y: calc(1.1em - 1.25em * var(--hb-zz6-p) + var(--hb-zz6-lift, 0em)), calc(1.3em - 1.25em * var(--hb-zz6-p) + var(--hb-zz6-lift, 0em));\n  animation: hb-zz6-front 1.5s linear infinite;\n}\n.hb-zz6-f[data-back] {\n  --hb-zz6-lift: -0.08em;\n  opacity: 0.42;\n  animation: hb-zz6-back 2.3s linear infinite;\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-zz6 { transition: none; }\n  .hb-zz6[data-loop] { animation: none; --hb-zz6-p: 0.62; }\n  .hb-zz6-f, .hb-zz6-f[data-back] { animation: none; }\n}\n`;\n\nexport function LoaderFillText({\n  text = \"Loading\",\n  value,\n  size = 56,\n  color = \"#2f7bff\",\n  duration = 3.6,\n  className = \"\",\n  style,\n  ...rest\n}: LoaderFillTextProps) {\n  const controlled = typeof value === \"number\";\n  const clamped = controlled ? Math.min(100, Math.max(0, value)) : 0;\n  const vars = {\n    [\"--hb-zz6-size\" as string]: `${size}px`,\n    [\"--hb-zz6-c\" as string]: color,\n    [\"--hb-zz6-dur\" as string]: `${Math.max(1, duration).toFixed(2)}s`,\n    ...(controlled ? { [\"--hb-zz6-p\" as string]: (clamped / 100).toFixed(3) } : null),\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <div\n      role={controlled ? \"progressbar\" : \"status\"}\n      aria-label={text}\n      aria-valuemin={controlled ? 0 : undefined}\n      aria-valuemax={controlled ? 100 : undefined}\n      aria-valuenow={controlled ? Math.round(clamped) : undefined}\n      {...rest}\n      className={`hb-zz6${className ? ` ${className}` : \"\"}`}\n      style={vars}\n      data-loop={controlled ? undefined : \"\"}\n    >\n      <style href=\"hb-loader-fill-text\" precedence=\"default\">{css}</style>\n      <span className=\"hb-zz6-t\" aria-hidden=\"true\">{text}</span>\n      <span className=\"hb-zz6-f\" data-back=\"\" aria-hidden=\"true\">{text}</span>\n      <span className=\"hb-zz6-f\" aria-hidden=\"true\">{text}</span>\n    </div>\n  );\n}\n"
    }
  ]
}