{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ken-burns",
  "type": "registry:component",
  "title": "KenBurns",
  "description": "Slow zoom-and-pan over a photo — the iconic documentary motion (named after Ken Burns, the filmmaker). Restrained 1.0 → 1.1 scale over 5 seconds by default; intentionally linear for a constant cinematic drift. The first Onda cinematic primitive.",
  "dependencies": [
    "remotion",
    "zod",
    "react"
  ],
  "files": [
    {
      "path": "registry/components/ken-burns/KenBurns.tsx",
      "type": "registry:component",
      "target": "components/onda/ken-burns/KenBurns.tsx",
      "content": "import React from 'react';\nimport { AbsoluteFill, Img, useCurrentFrame, interpolate } from 'remotion';\nimport { PlacementBox } from '../../../lib/canvas';\nimport { kenBurnsSchema, type KenBurnsProps } from './schema';\n\nexport { kenBurnsSchema, type KenBurnsProps };\n\n/**\n * Slow zoom + pan over a photo — the iconic documentary motion. Restrained\n * scale (1.0 → 1.1 default) over ~5 seconds.\n *\n * Intentionally **linear** for the constant slow-cinematic feel. Springs at\n * this scale read as \"the camera is accelerating\" — wrong for Ken Burns.\n *\n * @example\n * <KenBurns src=\"/my-photo.jpg\" toScale={1.1} />\n */\nexport const KenBurns: React.FC<KenBurnsProps> = ({\n  src, delay, duration, fromScale, toScale, fromX, fromY, toX, toY, placement,\n}) => {\n  const frame = useCurrentFrame();\n\n  // Intentionally linear (no spring, no easing) for a constant slow-cinematic\n  // drift. Springs/eases at this 5-second scale read as \"the camera is\n  // accelerating\" — wrong for Ken Burns, which is steady throughout.\n  const progress = interpolate(frame - delay, [0, duration], [0, 1], {\n    extrapolateLeft: 'clamp', extrapolateRight: 'clamp',\n  });\n\n  const scale = interpolate(progress, [0, 1], [fromScale, toScale], {\n    extrapolateLeft: 'clamp', extrapolateRight: 'clamp',\n  });\n  const originX = interpolate(progress, [0, 1], [fromX, toX], {\n    extrapolateLeft: 'clamp', extrapolateRight: 'clamp',\n  });\n  const originY = interpolate(progress, [0, 1], [fromY, toY], {\n    extrapolateLeft: 'clamp', extrapolateRight: 'clamp',\n  });\n\n  const fillCanvas = placement === undefined;\n\n  const img = (\n    <Img\n      src={src}\n      style={{\n        width: '100%',\n        height: '100%',\n        objectFit: 'cover',\n        transform: `scale(${scale})`,\n        transformOrigin: `${originX * 100}% ${originY * 100}%`,\n      }}\n    />\n  );\n\n  // overflow: hidden is critical so the zoomed image doesn't bleed beyond\n  // the canvas — without it, scale > 1 paints outside the composition.\n  if (fillCanvas) {\n    return <AbsoluteFill style={{ overflow: 'hidden' }}>{img}</AbsoluteFill>;\n  }\n\n  return <PlacementBox placement={placement}>{img}</PlacementBox>;\n};\n"
    },
    {
      "path": "registry/components/ken-burns/schema.ts",
      "type": "registry:component",
      "target": "components/onda/ken-burns/schema.ts",
      "content": "import { z } from 'zod';\nimport { placementSchema } from '../../../lib/canvas-schemas';\n\n/** Zod schema for {@link KenBurns} props. */\nexport const kenBurnsSchema = 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('ken-burns').default('ken-burns'),\n  /**\n   * Image URL. The default is a stable Picsum seed so the playground render\n   * is reproducible — supply your own `src` in real compositions.\n   */\n  src: z.string().default('https://picsum.photos/seed/onda/1920/1080'),\n  /** Frames before the drift starts. */\n  delay: z.number().int().min(0).default(0),\n  /** Frames over which the zoom + pan completes. 150f ≈ 5s @ 30fps. */\n  duration: z.number().int().min(1).default(150),\n  /** Starting scale. */\n  fromScale: z.number().default(1.0),\n  /** Ending scale. Keep the delta restrained (1.0 → 1.1). */\n  toScale: z.number().default(1.1),\n  /** Starting transform-origin X. `0` = left, `1` = right. */\n  fromX: z.number().min(0).max(1).default(0.5),\n  /** Starting transform-origin Y. `0` = top, `1` = bottom. */\n  fromY: z.number().min(0).max(1).default(0.5),\n  /** Ending transform-origin X. */\n  toX: z.number().min(0).max(1).default(0.5),\n  /** Ending transform-origin Y. */\n  toY: z.number().min(0).max(1).default(0.5),\n  /** Where on the canvas this sits. Region (`'center'`, `'upper-third'`, ...) or `{ x, y, anchor }` in 0..1 canvas fractions. When omitted, the component fills the entire canvas (default behavior). Coordinates may be negative or >1 for off-canvas. */\n  placement: placementSchema.optional(),\n});\n\n/** Inferred props for {@link KenBurns}. */\nexport type KenBurnsProps = z.infer<typeof kenBurnsSchema>;\n"
    },
    {
      "path": "registry/components/ken-burns/ken-burns.meta.json",
      "type": "registry:file",
      "target": "components/onda/ken-burns/ken-burns.meta.json",
      "content": "{\n  \"name\": \"ken-burns\",\n  \"title\": \"KenBurns\",\n  \"description\": \"Slow zoom-and-pan over a photo — the iconic documentary motion (named after Ken Burns, the filmmaker). Restrained 1.0 → 1.1 scale over 5 seconds by default; intentionally linear for a constant cinematic drift. The first Onda cinematic primitive.\",\n  \"pickWhen\": \"a held photo needs to feel alive — documentary, archive, portrait. Use `parallax` for drift only; `image-reveal` for one-shot.\",\n  \"category\": \"cinematic\",\n  \"tags\": [\n    \"image\",\n    \"zoom\",\n    \"pan\",\n    \"cinematic\",\n    \"ken-burns\"\n  ],\n  \"dependencies\": [\n    \"remotion\",\n    \"zod\",\n    \"react\"\n  ]\n}\n"
    },
    {
      "path": "registry/components/ken-burns/README.md",
      "type": "registry:file",
      "target": "components/onda/ken-burns/README.md",
      "content": "# KenBurns\n\nSlow zoom-and-pan over a photo — the iconic documentary motion named after filmmaker Ken Burns. A still image gains life through a restrained scale ramp (1.0 → 1.1 over 5 seconds by default) while the transform-origin glides from `(fromX, fromY)` to `(toX, toY)`. The first Onda **cinematic** primitive, and the catalog's first image primitive.\n\n## Props\n\n| Name | Type | Default | Notes |\n| --- | --- | --- | --- |\n| `src` | `string` | `\"https://picsum.photos/seed/onda/1920/1080\"` | Image URL. The Picsum seed is for the playground only — supply your own `src` in real compositions. |\n| `delay` | `integer ≥ 0` | `0` | Frames before the motion starts. |\n| `duration` | `integer ≥ 1` | `150` | Frames the pan-and-zoom takes (5s @ 30fps). Ken Burns wants time; don't shorten this without reason. |\n| `fromScale` | `number` | `1.0` | Starting scale. |\n| `toScale` | `number` | `1.1` | Ending scale. Subtle zoom-in by default; keep restrained — large scale jumps read as a push-in, not a Ken Burns. |\n| `fromX` | `number ∈ [0, 1]` | `0.5` | Transform-origin X at frame 0. `0` = left edge, `1` = right edge. |\n| `fromY` | `number ∈ [0, 1]` | `0.5` | Transform-origin Y at frame 0. `0` = top edge, `1` = bottom edge. |\n| `toX` | `number ∈ [0, 1]` | `0.5` | Transform-origin X at frame `duration`. |\n| `toY` | `number ∈ [0, 1]` | `0.5` | Transform-origin Y at frame `duration`. |\n| `placement` | `Placement?` | – | Where on the canvas this sits. Region (`\"center\"`, `\"upper-third\"`, …) or `{ x, y, anchor }` in 0..1 canvas fractions. Coordinates may be negative or >1 for off-canvas. |\n\n## Usage\n\n```tsx\nimport { Composition } from 'remotion';\nimport { KenBurns, kenBurnsSchema } from './components/onda/ken-burns/KenBurns';\n\nexport const Root: React.FC = () => (\n  <Composition\n    id=\"KenBurnsHero\"\n    component={KenBurns}\n    durationInFrames={150}\n    fps={30}\n    width={1920}\n    height={1080}\n    schema={kenBurnsSchema}\n    defaultProps={{\n      src: 'https://picsum.photos/seed/onda/1920/1080',\n      delay: 0,\n      duration: 150,\n      fromScale: 1.0,\n      toScale: 1.1,\n      // Pan from top-left toward bottom-right while zooming in.\n      fromX: 0.3,\n      fromY: 0.3,\n      toX: 0.7,\n      toY: 0.7,\n    }}\n  />\n);\n```\n\n## Motion notes\n\n- **Linear by design.** Unlike most Onda primitives (which use `SPRING_SMOOTH` or `HOUSE_EASE`), KenBurns uses raw linear `interpolate`. A spring or ease at a 5-second scale would feel like the camera is accelerating or decelerating — wrong for Ken Burns, which is steady throughout. Restraint here means *constant* motion, not *eased* motion.\n- **Pan convention.** `fromX/fromY` is the transform-origin at frame 0; `toX/toY` is the origin at frame `duration`. `(0, 0)` is the top-left of the image, `(1, 1)` is the bottom-right. To pan diagonally down-right while zooming in, set `fromX: 0.3, fromY: 0.3, toX: 0.7, toY: 0.7`. Set both pairs equal (e.g. all `0.5`) for a pure centered zoom.\n- **Restrained scale by default.** `1.0 → 1.1` is a 10% zoom over 5 seconds — the eye registers movement without feeling pushed. Going past `1.25` for a 5s shot starts to read as gimmicky.\n- **`<Img>` (not raw `<img>`).** The component uses Remotion's `<Img>`, which `delayRender`s until the image loads and auto-retries on failure. This is what makes a network-sourced photo safe to render headlessly.\n- **`overflow: hidden` on the `AbsoluteFill`** is critical — without it, the scaled image bleeds beyond the canvas bounds.\n- All `interpolate` calls clamp on both sides — the component is correct on frame 0 and on any frame past `delay + duration` (the image rests at `toScale` / `toX, toY`).\n"
    }
  ],
  "registryDependencies": []
}
