{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "glow-born-card",
  "title": "Glow Born Card",
  "description": "A glow condenses into an \"Import from repository\" dialog beside split headline text.",
  "dependencies": ["remotion", "@remotion/google-fonts"],
  "registryDependencies": ["@remocn/gsh"],
  "files": [
    {
      "path": "registry/remocn/glow-born-card/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont as loadGeist } from \"@remotion/google-fonts/Geist\";\nimport { loadFont as loadGeistMono } from \"@remotion/google-fonts/GeistMono\";\nimport {\n  AbsoluteFill,\n  Easing,\n  interpolate,\n  spring,\n  useCurrentFrame,\n  useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/remocn/gsh/gradient-engine\";\nimport { GshGround } from \"@/lib/remocn/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/remocn/gsh/presets\";\n\nconst geist = loadGeist(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\nconst mono = loadGeistMono(\"normal\", {\n  weights: [\"400\"],\n  subsets: [\"latin\"],\n});\n\nconst ENTER = Easing.bezier(0.32, 0.72, 0, 1);\nconst LIGHT = Easing.bezier(0.22, 1, 0.36, 1);\nconst MOVE = Easing.bezier(0.65, 0, 0.35, 1);\nconst EXIT = Easing.bezier(0.55, 0, 1, 0.45);\nconst SWAY = Easing.bezier(0.45, 0, 0.55, 1);\nconst MORPH = { damping: 200 };\nconst CHIP = { mass: 0.5, damping: 12, stiffness: 200 };\n\nconst B = {\n  words: -8,\n  part: 18,\n  ignite: 20,\n  fill: 26,\n  card: 32,\n  recede: 34,\n  recedeLen: 16,\n  type: 60,\n  press: 90,\n  done: 96,\n  end: 136,\n};\n\nexport const GLOW_BORN_CARD_DURATION = B.end;\n\nconst ramp = (f: number, start: number, dur: number, easing = ENTER) =>\n  interpolate(f, [start, start + dur], [0, 1], {\n    extrapolateLeft: \"clamp\",\n    extrapolateRight: \"clamp\",\n    easing,\n  });\n\nconst mix = (a: number, b: number, t: number) => a + (b - a) * t;\n\nexport interface GlowBornCardProps {\n  theme?: \"dark\" | \"light\";\n  accent?: string;\n  primary?: string;\n  before?: string;\n  after?: string;\n  title?: string;\n  label?: string;\n  value?: string;\n  hint?: string;\n  branch?: string;\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\nconst LIGHT_GROUND: Partial<GradientParams> = {\n  colors: [\"#9fd8ff\", \"#3f7dff\", \"#1c3bb0\", \"#8ff0e0\"],\n  background: \"#eef1f6\",\n};\n\nfunction Words({\n  text,\n  frame,\n  start,\n  size,\n  color,\n}: {\n  text: string;\n  frame: number;\n  start: number;\n  size: number;\n  color: string;\n}) {\n  const words = text.split(\" \");\n  return (\n    <div style={{ display: \"flex\", whiteSpace: \"nowrap\" }}>\n      {words.map((w, i) => {\n        const p = ramp(frame, start + i * 2, 14);\n        return (\n          <span\n            key={`${w}-${i.toString()}`}\n            style={{\n              display: \"inline-block\",\n              overflow: \"hidden\",\n              paddingBottom: size * 0.12,\n              marginBottom: -size * 0.12,\n              marginRight: i < words.length - 1 ? size * 0.26 : 0,\n            }}\n          >\n            <span\n              style={{\n                display: \"inline-block\",\n                transform: `translateY(${mix(105, 0, p)}%)`,\n                filter: p < 1 ? `blur(${(1 - p) * 6}px)` : undefined,\n                color,\n              }}\n            >\n              {w}\n            </span>\n          </span>\n        );\n      })}\n    </div>\n  );\n}\n\nfunction RepoIcon({ size, color }: { size: number; color: string }) {\n  return (\n    <svg viewBox=\"0 0 24 24\" width={size} height={size} aria-hidden>\n      <g\n        fill=\"none\"\n        stroke={color}\n        strokeWidth={1.5}\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n      >\n        <circle cx={6.5} cy={5.5} r={2} />\n        <circle cx={6.5} cy={18.5} r={2} />\n        <circle cx={17.5} cy={8.5} r={2} />\n        <path d=\"M6.5 7.5v9M17.5 10.5c0 3.5-4 3-8.6 6.2\" />\n      </g>\n    </svg>\n  );\n}\n\nexport function GlowBornCard({\n  theme = \"dark\",\n  accent = \"#45f0d6\",\n  primary = \"#3B5BFD\",\n  before = \"Or import a scene from\",\n  after = \"your repo\",\n  title = \"Import from repository\",\n  label = \"Repository\",\n  value = \"lumen-labs/launch\",\n  hint = \"Public or private, any branch\",\n  branch = \"main · 214 commits · 3h ago\",\n  ground,\n  groundParams,\n}: GlowBornCardProps) {\n  const frame = useCurrentFrame();\n  const { width, height, fps } = useVideoConfig();\n  const dark = theme === \"dark\";\n  const portrait = height > width * 1.2;\n  const stageW = portrait ? 1080 : 1280;\n  const stageH = portrait ? 1920 : 720;\n  const sc = width / stageW;\n  const u = portrait ? 2.1 : 1.12;\n\n  const ink = dark ? \"#f3f6ff\" : \"#10131c\";\n  const cardInk = dark ? \"#eef1f8\" : \"#141822\";\n  const muted = dark ? \"rgba(226,232,248,0.52)\" : \"rgba(20,24,34,0.5)\";\n  const hair = dark ? \"rgba(255,255,255,0.1)\" : \"rgba(20,24,48,0.1)\";\n  const fieldBg = dark ? \"rgba(255,255,255,0.035)\" : \"#f7f8fa\";\n  const surface = dark ? \"#12151c\" : \"#ffffff\";\n  const footerBg = dark ? \"rgba(255,255,255,0.025)\" : \"#f9fafb\";\n\n  const cardW = (portrait ? 420 : 380) * u;\n  const cardH = 236 * u;\n  const pad = 20 * u;\n  const fontSize = portrait ? 80 : 42;\n  const margin = portrait ? 34 : 22;\n\n  const part = spring({\n    frame: frame - B.part,\n    fps,\n    config: MORPH,\n    durationInFrames: 18,\n  });\n  const gap = mix(\n    portrait ? 0 : fontSize * 0.26,\n    (portrait ? cardH : cardW) + margin * 2,\n    part,\n  );\n\n  const ignite = ramp(frame, B.ignite, 10, LIGHT);\n  const fill = ramp(frame, B.fill, 12, LIGHT);\n  const recede = ramp(frame, B.recede, B.recedeLen, MOVE);\n  const glowFade = 1 - ramp(frame, B.recede + 8, 16, EXIT);\n  const cardOn = ramp(frame, B.card, 4);\n  const halo =\n    ramp(frame, B.recede + 4, 12, LIGHT) *\n    (1 - ramp(frame, B.recede + 16, 20, EXIT));\n\n  const blobW =\n    mix(36 * u, mix(cardW * 0.4, cardW * 1.04, fill), ignite) *\n    (1 - 0.55 * recede);\n  const blobX = cardW * 0.3 * recede;\n  const blobH = mix(36 * u, mix(cardH * 0.6, cardH * 1.04, fill), ignite);\n  const blobR = mix(blobW / 2, 18 * u, fill);\n  const blobBlur = mix(26, 10, fill) * u;\n  const edge = mix(4, 120, recede);\n\n  const typed = Math.round(\n    interpolate(\n      frame,\n      [B.type, B.type + value.length * 1.5],\n      [0, value.length],\n      {\n        extrapolateLeft: \"clamp\",\n        extrapolateRight: \"clamp\",\n      },\n    ),\n  );\n  const shown = value.slice(0, typed);\n  const caret =\n    frame >= B.recede + 10 &&\n    frame < B.press &&\n    (typed < value.length || Math.floor(frame / 8) % 2 === 0);\n  const focus =\n    ramp(frame, B.type - 6, 8) * (1 - ramp(frame, B.press + 4, 10, EXIT));\n  const press = Math.max(\n    0,\n    spring({ frame: frame - B.press, fps, config: CHIP }) -\n      spring({ frame: frame - B.press - 3, fps, config: CHIP }),\n  );\n  const done = spring({ frame: frame - B.done, fps, config: CHIP });\n  const doneIn = ramp(frame, B.done, 5);\n  const metaIn = ramp(frame, B.type + value.length * 1.5 + 2, 10, LIGHT);\n\n  const push =\n    1 +\n    (portrait ? 0.05 : 0.03) * ramp(frame, B.part, B.done - B.part, SWAY) +\n    0.02 * ramp(frame, B.done, B.end - B.done, SWAY);\n  const settle = ramp(frame, -6, 30, MOVE);\n  const tilt = mix(8, 0, settle);\n\n  const resolvedGround: GshPresetId =\n    ground ?? (dark ? \"film-blue\" : \"glasswork\");\n  const resolvedParams = groundParams ?? (dark ? undefined : LIGHT_GROUND);\n\n  const glowCore = dark ? \"rgba(255,255,255,0.96)\" : \"rgba(255,255,255,1)\";\n\n  const card = (\n    <div\n      style={{\n        position: \"absolute\",\n        left: \"50%\",\n        top: \"50%\",\n        width: cardW,\n        height: cardH,\n        marginLeft: -cardW / 2,\n        marginTop: -cardH / 2,\n      }}\n    >\n      <div\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          borderRadius: 18 * u,\n          opacity: halo * 0.8,\n          boxShadow: `0 0 ${26 * u}px ${4 * u}px color-mix(in oklab, ${accent} ${dark ? 60 : 45}%, transparent), 0 0 ${80 * u}px ${22 * u}px color-mix(in oklab, ${accent} ${dark ? 26 : 20}%, transparent)`,\n        }}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          borderRadius: 16 * u,\n          background: surface,\n          boxShadow: dark\n            ? \"0 0 0 1px rgba(255,255,255,0.09), inset 0 1px 0 rgba(255,255,255,0.05), 0 24px 56px rgba(2,6,24,0.55)\"\n            : \"0 0 0 1px rgba(20,24,48,0.07), 0 1px 2px rgba(20,30,90,0.06), 0 22px 50px rgba(20,30,90,0.14)\",\n          opacity: cardOn,\n          overflow: \"hidden\",\n          display: \"flex\",\n          flexDirection: \"column\",\n          fontFamily: geist.fontFamily,\n          letterSpacing: \"-0.005em\",\n          lineHeight: 1.3,\n        }}\n      >\n        <div style={{ padding: `${pad}px ${pad}px 0` }}>\n          <div style={{ fontSize: 20 * u, color: cardInk }}>{title}</div>\n          <div style={{ fontSize: 15 * u, color: muted, marginTop: 16 * u }}>\n            {label}\n          </div>\n          <div\n            style={{\n              marginTop: 8 * u,\n              height: 42 * u,\n              borderRadius: 8 * u,\n              border: `1px solid ${focus > 0 ? `color-mix(in oklab, ${primary} ${Math.round(focus * 75)}%, ${hair})` : hair}`,\n              boxShadow: `0 0 0 ${3 * u * focus}px color-mix(in oklab, ${primary} ${Math.round(focus * 22)}%, transparent)`,\n              background: fieldBg,\n              display: \"flex\",\n              alignItems: \"center\",\n              gap: 10 * u,\n              padding: `0 ${12 * u}px`,\n              fontFamily: mono.fontFamily,\n              fontSize: 15 * u,\n              letterSpacing: 0,\n              color: typed > 0 ? cardInk : muted,\n            }}\n          >\n            <div style={{ order: -2, display: \"flex\" }}>\n              <RepoIcon size={18 * u} color={muted} />\n            </div>\n            {typed > 0 ? shown : \"owner/name\"}\n            <span\n              style={{\n                display: \"inline-block\",\n                width: 2 * u,\n                height: 20 * u,\n                margin: typed > 0 ? `0 0 0 ${-8 * u}px` : `0 ${-8 * u}px 0 0`,\n                order: typed > 0 ? 1 : -1,\n                background: primary,\n                opacity: caret ? 1 : 0,\n              }}\n            />\n          </div>\n          <div\n            style={{\n              position: \"relative\",\n              marginTop: 8 * u,\n              height: 18 * u,\n              fontSize: 14 * u,\n              color: muted,\n              fontVariantNumeric: \"tabular-nums\",\n            }}\n          >\n            <div\n              style={{ position: \"absolute\", inset: 0, opacity: 1 - metaIn }}\n            >\n              {hint}\n            </div>\n            <div\n              style={{\n                position: \"absolute\",\n                inset: 0,\n                opacity: metaIn,\n                transform: `translateY(${(1 - metaIn) * 4 * u}px)`,\n              }}\n            >\n              {branch}\n            </div>\n          </div>\n        </div>\n        <div\n          style={{\n            marginTop: \"auto\",\n            display: \"flex\",\n            justifyContent: \"flex-end\",\n            alignItems: \"center\",\n            gap: 10 * u,\n            fontSize: 16 * u,\n            padding: `${11 * u}px ${pad}px`,\n            borderTop: `1px solid ${hair}`,\n            background: footerBg,\n          }}\n        >\n          <div\n            style={{\n              padding: `${7 * u}px ${14 * u}px`,\n              borderRadius: 9 * u,\n              border: `1px solid ${hair}`,\n              color: cardInk,\n            }}\n          >\n            Cancel\n          </div>\n          <div\n            style={{\n              position: \"relative\",\n              padding: `${7 * u}px ${16 * u}px`,\n              borderRadius: 9 * u,\n              background: primary,\n              color: \"#fff\",\n              transform: `scale(${1 - 0.06 * press})`,\n              boxShadow: `inset 0 1px 0 rgba(255,255,255,0.22), 0 1px 2px rgba(4,8,30,${dark ? 0.4 : 0.18})`,\n              display: \"flex\",\n              alignItems: \"center\",\n              gap: 7 * u,\n            }}\n          >\n            <div\n              style={{\n                width: 16 * u * doneIn,\n                height: 16 * u,\n                overflow: \"hidden\",\n                display: \"flex\",\n                alignItems: \"center\",\n                transform: `scale(${done})`,\n              }}\n            >\n              <svg\n                viewBox=\"0 0 24 24\"\n                width={16 * u}\n                height={16 * u}\n                aria-hidden\n              >\n                <path\n                  d=\"m5 12.5 4.5 4.5L19 7.5\"\n                  fill=\"none\"\n                  stroke=\"#fff\"\n                  strokeWidth={2.4}\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  strokeDasharray={22}\n                  strokeDashoffset={22 * (1 - ramp(frame, B.done + 1, 8))}\n                />\n              </svg>\n            </div>\n            {doneIn > 0.5 ? \"Imported\" : \"Import\"}\n          </div>\n        </div>\n      </div>\n      <div\n        style={{\n          position: \"absolute\",\n          left: \"50%\",\n          top: \"50%\",\n          width: 0,\n          height: 0,\n          opacity: ignite * glowFade,\n        }}\n      >\n        <div\n          style={{\n            position: \"absolute\",\n            left: -cardW * 0.7,\n            top: -cardH * 0.9,\n            width: cardW * 1.4,\n            height: cardH * 1.8,\n            maskImage: `linear-gradient(90deg, transparent ${edge - 10}%, black ${edge + 34}%)`,\n            WebkitMaskImage: `linear-gradient(90deg, transparent ${edge - 10}%, black ${edge + 34}%)`,\n          }}\n        >\n          <div\n            style={{\n              position: \"absolute\",\n              left: \"50%\",\n              top: \"50%\",\n              width: blobW * 1.25,\n              height: blobH * 1.35,\n              marginLeft: (-blobW * 1.25) / 2 + blobX,\n              marginTop: (-blobH * 1.35) / 2,\n              borderRadius: blobR * 1.4,\n              background: accent,\n              filter: `blur(${blobBlur * 1.8}px)`,\n              opacity: 0.85,\n            }}\n          />\n          <div\n            style={{\n              position: \"absolute\",\n              left: \"50%\",\n              top: \"50%\",\n              width: blobW,\n              height: blobH,\n              marginLeft: -blobW / 2 + blobX,\n              marginTop: -blobH / 2,\n              borderRadius: blobR,\n              background: `radial-gradient(70% 70% at 50% 50%, ${glowCore} 0%, color-mix(in oklab, ${accent} 55%, white) 55%, ${accent} 100%)`,\n              filter: `blur(${blobBlur}px)`,\n            }}\n          />\n        </div>\n      </div>\n    </div>\n  );\n\n  return (\n    <AbsoluteFill style={{ fontFamily: geist.fontFamily, overflow: \"hidden\" }}>\n      <GshGround\n        preset={resolvedGround}\n        params={resolvedParams}\n        timeOffset={4}\n        timeScale={0.5}\n      />\n      <AbsoluteFill\n        style={{\n          background: dark\n            ? \"radial-gradient(60% 50% at 50% 50%, rgba(3,7,18,0.35) 0%, rgba(3,7,18,0) 100%)\"\n            : \"radial-gradient(60% 50% at 50% 50%, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%)\",\n        }}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          left: 0,\n          top: 0,\n          width: stageW,\n          height: stageH,\n          transform: `scale(${sc})`,\n          transformOrigin: \"0 0\",\n          perspective: 1800,\n        }}\n      >\n        <div\n          style={{\n            position: \"absolute\",\n            inset: 0,\n            display: \"flex\",\n            flexDirection: portrait ? \"column\" : \"row\",\n            alignItems: \"center\",\n            justifyContent: \"center\",\n            fontSize,\n            fontWeight: 400,\n            letterSpacing: \"-0.03em\",\n            lineHeight: 1.1,\n            transform: `scale(${push}) rotateX(${portrait ? tilt : 0}deg) rotateY(${portrait ? 0 : -tilt}deg)`,\n            transformOrigin: \"50% 50%\",\n          }}\n        >\n          <Words\n            text={before}\n            frame={frame}\n            start={B.words}\n            size={fontSize}\n            color={ink}\n          />\n          <div\n            style={{\n              position: \"relative\",\n              width: portrait ? 0 : gap,\n              height: portrait ? gap : 0,\n              flexShrink: 0,\n            }}\n          >\n            {frame >= B.ignite ? card : null}\n          </div>\n          <Words\n            text={after}\n            frame={frame}\n            start={B.words + 10}\n            size={fontSize}\n            color={ink}\n          />\n        </div>\n      </div>\n    </AbsoluteFill>\n  );\n}\n\nexport default GlowBornCard;\n",
      "type": "registry:component",
      "target": "components/remocn/glow-born-card.tsx"
    }
  ],
  "type": "registry:component"
}
