{
  "name": "spring-in",
  "type": "registry:ui",
  "description": "Spring-driven scale and rise, with snappy, smooth and bouncy presets",
  "dependencies": [
    "remotion"
  ],
  "registryDependencies": [
    "motion-primitive",
    "motion-wrapper",
    "layout"
  ],
  "files": [
    {
      "path": "registry/bases/default/primitives/spring-in.tsx",
      "type": "registry:ui",
      "content": "import { interpolate, useVideoConfig } from \"remotion\";\nimport { scaleFont } from \"@/remotion/lib/layout\";\nimport {\n  resolveOrigin,\n  useEnterExit,\n  type MotionPrimitiveProps,\n  type MotionSpring,\n  type TransformOrigin,\n} from \"@/remotion/lib/motion-primitive\";\nimport { MotionWrapper } from \"@/remotion/lib/motion-wrapper\";\n\nexport type SpringInProps = Omit<MotionPrimitiveProps, \"spring\"> & {\n  /** Spring preset name, or an override on the snappy config. */\n  config?: MotionSpring;\n  /** Scale at the start of the entrance. */\n  from?: number;\n  /** How far it rises as it springs. Scales with the frame by default. */\n  travel?: number;\n  origin?: TransformOrigin;\n};\n\n/**\n * The physical entrance: scale and a short rise driven by a spring, so the\n * element carries weight into its stop instead of easing to a halt.\n *\n * `config=\"bouncy\"` overshoots — both the scale and the rise pass their\n * resting value and settle back, which is the point of using a spring at all.\n */\nexport const SpringIn: React.FC<SpringInProps> = ({\n  children,\n  config = \"snappy\",\n  from = 0.88,\n  travel: travelProp,\n  origin = \"center\",\n  block,\n  style,\n  className,\n  ...motionProps\n}) => {\n  const { width } = useVideoConfig();\n  const travel = travelProp ?? scaleFont(14, width);\n  const { motion, displace, opacity, sign } = useEnterExit({\n    ...motionProps,\n    spring: config,\n  });\n\n  const scale = interpolate(motion, [0, 1], [from, 1]);\n\n  return (\n    <MotionWrapper\n      block={block}\n      className={className}\n      style={{\n        ...style,\n        opacity,\n        scale,\n        translate: `0px ${displace * travel * sign}px`,\n        transformOrigin: resolveOrigin(origin),\n      }}\n    >\n      {children}\n    </MotionWrapper>\n  );\n};\n"
    }
  ],
  "atlas": {
    "lane": "atoms",
    "drive": "time",
    "tier": "core",
    "tags": [
      "enter"
    ]
  }
}