{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "gradient-shift",
  "type": "registry:component",
  "title": "GradientShift",
  "description": "A quiet, drifting two-color linear gradient background. The angle rotates at a constant degrees-per-frame — linear-by-design, no spring. Low-saturation defaults (--onda-surface to --onda-border) keep it atmospheric, never focal.",
  "dependencies": [
    "remotion",
    "zod",
    "react"
  ],
  "files": [
    {
      "path": "registry/components/gradient-shift/GradientShift.tsx",
      "type": "registry:component",
      "target": "components/onda/gradient-shift/GradientShift.tsx",
      "content": "import React from 'react';\nimport { AbsoluteFill, useCurrentFrame } from 'remotion';\nimport { gradientShiftSchema, type GradientShiftProps } from './schema';\n\nexport { gradientShiftSchema, type GradientShiftProps };\n\n/**\n * A quiet, drifting two-color linear gradient background. The angle rotates\n * at a constant degrees-per-frame — linear-by-design (a spring would settle\n * and kill the drift). Low-saturation defaults keep it atmospheric, never focal.\n *\n * @example\n * <GradientShift from=\"#0E0E12\" to=\"#1C1C22\" speed={0.5} />\n */\nexport const GradientShift: React.FC<GradientShiftProps> = ({\n  from, to, angle, speed, delay,\n}) => {\n  const frame = useCurrentFrame();\n\n  // Linear-by-design: the angle is a pure function of (frame - delay), with no\n  // spring driver. This component joins Typewriter / Marquee / KenBurns / Parallax\n  // as the documented linear-by-design members of the catalog — a quiet, constant\n  // drift is the whole point. Springs would settle and stop, killing the feel.\n  const local = Math.max(0, frame - delay);\n  const currentAngle = angle + speed * local;\n\n  return (\n    <AbsoluteFill\n      style={{\n        background: `linear-gradient(${currentAngle}deg, ${from} 0%, ${to} 100%)`,\n        pointerEvents: 'none',\n      }}\n    />\n  );\n};\n"
    },
    {
      "path": "registry/components/gradient-shift/schema.ts",
      "type": "registry:component",
      "target": "components/onda/gradient-shift/schema.ts",
      "content": "import { z } from 'zod';\n\n/** Zod schema for {@link GradientShift} props. */\nexport const gradientShiftSchema = z.object({\n  /** Discriminator literal — matches this entry's registry slug. Auto-populated when omitted (`schema.parse({})` works as before). Lets consumers build `z.discriminatedUnion('kind', [...])` directly over onda schemas. */\n  kind: z.literal('gradient-shift').default('gradient-shift'),\n  /** Starting gradient color. Defaults to `--onda-surface`. */\n  from: z.string().default('var(--onda-surface, #0E0E12)'),\n  /** Ending gradient color. Defaults to `--onda-border`. */\n  to: z.string().default('var(--onda-border, #1C1C22)'),\n  /** Starting angle in degrees. */\n  angle: z.number().default(135),\n  /** Rotation rate in degrees per frame. Keep low — atmospheric, not focal. */\n  speed: z.number().default(0.5),\n  /** Frames before the drift starts. */\n  delay: z.number().int().min(0).default(0),\n});\n\n/** Inferred props for {@link GradientShift}. */\nexport type GradientShiftProps = z.infer<typeof gradientShiftSchema>;\n"
    },
    {
      "path": "registry/components/gradient-shift/gradient-shift.meta.json",
      "type": "registry:file",
      "target": "components/onda/gradient-shift/gradient-shift.meta.json",
      "content": "{\n  \"name\": \"gradient-shift\",\n  \"title\": \"GradientShift\",\n  \"description\": \"A quiet, drifting two-color linear gradient background. The angle rotates at a constant degrees-per-frame — linear-by-design, no spring. Low-saturation defaults (--onda-surface to --onda-border) keep it atmospheric, never focal.\",\n  \"pickWhen\": \"the simplest moving backdrop — flat or near-flat scenes that need life. Use `mesh-gradient` for organic; `dynamic-grid` for technical.\",\n  \"category\": \"atmosphere\",\n  \"tags\": [\n    \"background\",\n    \"gradient\",\n    \"atmospheric\",\n    \"linear\",\n    \"drift\"\n  ],\n  \"dependencies\": [\n    \"remotion\",\n    \"zod\",\n    \"react\"\n  ]\n}\n"
    },
    {
      "path": "registry/components/gradient-shift/README.md",
      "type": "registry:file",
      "target": "components/onda/gradient-shift/README.md",
      "content": "# GradientShift\n\nA quiet, drifting linear gradient for the canvas background. Two colors interpolated edge-to-edge, with the gradient angle rotating at a constant `speed` degrees per frame — atmospheric set dressing, never the focal element. Defaults to a near-identical `--onda-surface` → `--onda-border` pair so the shift reads as a subtle dark-on-dark breath rather than a colored wash. Self-contained, deterministic, no external assets.\n\n## Props\n\n| Name | Type | Default | Notes |\n| --- | --- | --- | --- |\n| `from` | `string` | `\"#0E0E12\"` | Gradient start color. Default is `--onda-surface` — the canvas tone. |\n| `to` | `string` | `\"#1C1C22\"` | Gradient end color. Default is `--onda-border` — one step warmer/lighter than `from`, intentionally near-identical so the drift is a whisper. |\n| `angle` | `number` | `135` | Starting gradient angle in degrees. CSS convention: `0deg` is bottom-to-top. |\n| `speed` | `number` | `0.5` | Degrees per frame. At 30fps the default produces a 24-second full rotation — slow enough to never call attention to itself. |\n| `delay` | `integer ≥ 0` | `0` | Frames before the angle starts drifting. While `frame < delay`, the gradient sits at `angle`. |\n\n## Usage\n\nSits behind other components inside a `<Composition>` as the atmospheric base layer:\n\n```tsx\nimport { AbsoluteFill, Composition } from 'remotion';\nimport { BlurReveal } from './components/onda/blur-reveal/BlurReveal';\nimport { GradientShift, gradientShiftSchema } from './components/onda/gradient-shift/GradientShift';\n\nconst Scene: React.FC = () => (\n  <AbsoluteFill style={{ alignItems: 'center', justifyContent: 'center' }}>\n    <GradientShift from=\"#0E0E12\" to=\"#1C1C22\" angle={135} speed={0.5} delay={0} />\n    <BlurReveal text=\"Onda\" delay={0} duration={18} color=\"#F2F2F4\" fontSize={96} fontFamily='\"Clash Display\", sans-serif' />\n  </AbsoluteFill>\n);\n\nexport const Root: React.FC = () => (\n  <Composition\n    id=\"DriftingBackground\"\n    component={Scene}\n    durationInFrames={180}\n    fps={30}\n    width={1080}\n    height={1920}\n  />\n);\n```\n\n## Motion notes\n\n- **Linear-by-design.** `currentAngle = angle + speed * (frame - delay)` — a pure function of frame, no spring. GradientShift joins **Typewriter / Marquee / KenBurns / Parallax** as the documented linear-by-design members of the catalog. A spring driver would settle and stop, which kills the *constant drift* that is the entire point of this primitive. Restraint here is in the `speed`, not in the easing curve.\n- **Low saturation is the brand.** Defaults are `#0E0E12` → `#1C1C22` — a single step on the Onda dark ramp, deliberately near-identical. Atmosphere, not focal. **No rainbow, no neon, no saturated stops**: if you can read the colors as \"colors\" rather than as canvas tone, the defaults have been broken. Color is earned elsewhere in the catalog — not here.\n- **Deterministic without `interpolate`.** Because the only frame-dependent value is the angle (and it's a plain arithmetic expression of `frame - delay` with `Math.max(0, …)` as the only clamp), there is no `interpolate` call to clamp. The math is intentionally simple — every frame produces exactly the same pixels every render.\n- **`pointerEvents: 'none'`.** Like `GrainOverlay`, the layer never intercepts clicks — it composes safely beneath or above interactive content in the Studio / Player.\n"
    }
  ],
  "registryDependencies": []
}
