{
  "name": "transition-clock-wipe",
  "type": "registry:ui",
  "description": "Clock sweep that reads the composition size itself",
  "dependencies": [
    "remotion",
    "@remotion/transitions"
  ],
  "registryDependencies": [
    "transition-timing"
  ],
  "files": [
    {
      "path": "registry/bases/default/primitives/transition-clock-wipe.tsx",
      "type": "registry:ui",
      "content": "import type { TransitionPresentation } from \"@remotion/transitions\";\nimport { clockWipe } from \"@remotion/transitions/clock-wipe\";\nimport { useVideoConfig } from \"remotion\";\nimport {\n  resolveTransitionTiming,\n  type TransitionVariant,\n} from \"@/remotion/lib/transition-timing\";\n\nexport type ClockWipeProps = {\n  /** Defaults to the composition width. */\n  width?: number;\n  /** Defaults to the composition height. */\n  height?: number;\n};\n\n/**\n * `clockWipe()` needs the frame size to build its sweep, which forced every\n * caller to reach for `useVideoConfig()` first and pass it down — including in\n * the config helpers, where hooks are not available. Resolving it inside the\n * presentation instead makes the size optional everywhere.\n */\nconst AutoSizedClockWipe: React.FC<\n  React.ComponentProps<\n    NonNullable<TransitionPresentation<ClockWipeProps>[\"component\"]>\n  >\n> = ({ passedProps, ...rest }) => {\n  const config = useVideoConfig();\n  const presentation = clockWipe({\n    width: passedProps.width ?? config.width,\n    height: passedProps.height ?? config.height,\n  });\n  const Presentation = presentation.component;\n\n  return <Presentation {...rest} passedProps={presentation.props} />;\n};\n\nexport function autoClockWipe(\n  props: ClockWipeProps = {},\n): TransitionPresentation<ClockWipeProps> {\n  return { component: AutoSizedClockWipe, props };\n}\n\nexport type TransitionClockWipeConfig = {\n  durationInFrames?: number;\n  width?: number;\n  height?: number;\n  variant?: TransitionVariant;\n};\n\n/** Clock wipe transition config for use with TransitionSeries.Transition */\nexport function transitionClockWipe({\n  durationInFrames = 26,\n  width,\n  height,\n  variant = \"editorial\",\n}: TransitionClockWipeConfig = {}) {\n  return {\n    presentation: autoClockWipe({ width, height }),\n    timing: resolveTransitionTiming({ durationInFrames, variant }),\n  };\n}\n\nexport function getTransitionClockWipeDuration(\n  config: TransitionClockWipeConfig = {},\n  fps: number,\n): number {\n  return transitionClockWipe(config).timing.getDurationInFrames({ fps });\n}\n"
    }
  ],
  "atlas": {
    "lane": "cuts",
    "drive": "time",
    "tier": "advanced"
  }
}