{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "device-pullback",
  "type": "registry:component",
  "title": "devicePullback",
  "description": "The outgoing scene starts as full-bleed UI scaled up, then pulls back to 1x while a minimal device bezel (laptop or phone) draws in around it — so the cut lands on the content framed inside a device mockup. A pull-back-to-reveal-the-product beat for launch and feature reels. Onda-original.",
  "dependencies": [
    "remotion",
    "@remotion/transitions",
    "zod"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/transitions/device-pullback/devicePullback.tsx",
      "type": "registry:component",
      "target": "components/onda/transitions/device-pullback/devicePullback.tsx",
      "content": "import React from 'react';\nimport type { TransitionPresentation, TransitionPresentationComponentProps } from '@remotion/transitions';\nimport { AbsoluteFill, interpolate, Easing } from 'remotion';\nimport { devicePullbackSchema, type DevicePullbackOptions } from './schema';\n\nexport { devicePullbackSchema, type DevicePullbackOptions };\n\ntype DevicePullbackProps = {\n  device: 'laptop' | 'phone';\n  frameColor: string;\n  startScale: number;\n  background: string;\n};\n\n// House easing — no overshoot, settles smoothly.\nconst EASE = Easing.bezier(0.16, 1, 0.3, 1);\n\n/**\n * Per-device geometry, expressed as fractions of the framed content box so the\n * bezel scales with any canvas. `bezel` is the chrome thickness around the\n * content; `radius`/`screenRadius` keep the corners on the house ~20px scale.\n */\nconst DEVICE = {\n  laptop: {\n    bezel: 0.035,\n    radius: 22,\n    screenRadius: 8,\n    // The laptop base/hinge that draws in beneath the screen.\n    baseHeight: 0.05,\n    baseInset: 0.06,\n    notch: false,\n  },\n  phone: {\n    bezel: 0.06,\n    radius: 44,\n    screenRadius: 30,\n    baseHeight: 0,\n    baseInset: 0,\n    notch: true,\n  },\n} as const;\n\nconst DevicePullbackPresentation: React.FC<\n  TransitionPresentationComponentProps<DevicePullbackProps>\n> = ({ presentationProgress, presentationDirection, children, passedProps }) => {\n  const { device, frameColor, startScale, background } = passedProps;\n  const isEntering = presentationDirection === 'entering';\n\n  // The incoming scene simply fades up underneath — the pull-back belongs to\n  // the outgoing scene, which is the one being framed into the device.\n  if (isEntering) {\n    return (\n      <AbsoluteFill style={{ opacity: presentationProgress }}>\n        {children}\n      </AbsoluteFill>\n    );\n  }\n\n  const p = interpolate(presentationProgress, [0, 1], [0, 1], {\n    easing: EASE,\n    extrapolateLeft: 'clamp',\n    extrapolateRight: 'clamp',\n  });\n\n  const geo = DEVICE[device];\n\n  // Content pulls back from startScale -> 1x.\n  const scale = interpolate(p, [0, 1], [startScale, 1], {\n    extrapolateLeft: 'clamp',\n    extrapolateRight: 'clamp',\n  });\n\n  // The framed content occupies less than the full canvas at rest so the bezel\n  // has room to sit around it. It opens up from full-bleed (1) to framed.\n  const framedWidth = interpolate(p, [0, 1], [1, 1 - geo.bezel * 2], {\n    extrapolateLeft: 'clamp',\n    extrapolateRight: 'clamp',\n  });\n  const framedHeight = interpolate(\n    p,\n    [0, 1],\n    [1, 1 - (geo.bezel * 2 + geo.baseHeight)],\n    { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' },\n  );\n\n  // Bezel chrome fades/draws in over the first ~70% so the device is fully\n  // present before the cut, but the content read isn't interrupted up front.\n  const chrome = interpolate(p, [0, 0.7], [0, 1], {\n    extrapolateLeft: 'clamp',\n    extrapolateRight: 'clamp',\n  });\n\n  const screenRadius = interpolate(p, [0, 1], [0, geo.screenRadius], {\n    extrapolateLeft: 'clamp',\n    extrapolateRight: 'clamp',\n  });\n\n  return (\n    <AbsoluteFill style={{ backgroundColor: background }}>\n      {/* Device shell — sits behind the content, drawn in as chrome rises. */}\n      <AbsoluteFill\n        style={{\n          width: `${framedWidth * 100}%`,\n          height: `${(framedHeight + geo.bezel * 2 + geo.baseHeight) * 100}%`,\n          left: '50%',\n          top: '50%',\n          transform: 'translate(-50%, -50%)',\n          backgroundColor: frameColor,\n          borderRadius: geo.radius,\n          opacity: chrome,\n          boxShadow: '0 30px 60px -34px rgba(0,0,0,0.9)',\n        }}\n      >\n        {/* Subtle top sheen on the bezel. */}\n        <AbsoluteFill\n          style={{\n            borderRadius: geo.radius,\n            background:\n              'linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0) 18%)',\n            pointerEvents: 'none',\n          }}\n        />\n        {geo.notch ? (\n          <div\n            style={{\n              position: 'absolute',\n              top: '2.2%',\n              left: '50%',\n              transform: 'translateX(-50%)',\n              width: '34%',\n              height: '2.6%',\n              backgroundColor: frameColor,\n              borderRadius: 999,\n              filter: 'brightness(0.7)',\n            }}\n          />\n        ) : null}\n        {geo.baseHeight > 0 ? (\n          <div\n            style={{\n              position: 'absolute',\n              bottom: 0,\n              left: `${geo.baseInset * 100}%`,\n              right: `${geo.baseInset * 100}%`,\n              height: `${(geo.baseHeight / (framedHeight + geo.bezel * 2 + geo.baseHeight)) * 100}%`,\n              backgroundColor: frameColor,\n              borderBottomLeftRadius: geo.radius,\n              borderBottomRightRadius: geo.radius,\n              filter: 'brightness(0.85)',\n            }}\n          />\n        ) : null}\n      </AbsoluteFill>\n\n      {/* The content — scales back from full-bleed into the device screen. */}\n      <AbsoluteFill\n        style={{\n          width: `${framedWidth * 100}%`,\n          height: `${framedHeight * 100}%`,\n          left: '50%',\n          top: '50%',\n          transform: `translate(-50%, -50%) scale(${scale})`,\n          transformOrigin: 'center center',\n          borderRadius: screenRadius,\n          overflow: 'hidden',\n        }}\n      >\n        {children}\n      </AbsoluteFill>\n    </AbsoluteFill>\n  );\n};\n\n/**\n * The outgoing scene starts as full-bleed UI scaled up, then pulls back to 1x\n * while a minimal device bezel (laptop or phone) draws in around it — so the\n * cut lands on the content framed inside a device mockup. A \"pull back to\n * reveal the product\" beat, common in launch and feature reels.\n *\n * Pair with the recommended Onda timing for the house feel:\n * `linearTiming({ durationInFrames: 24, easing: Easing.bezier(0.16, 1, 0.3, 1) })`\n *\n * Onda-original.\n */\nexport function devicePullback(\n  options?: DevicePullbackOptions,\n): TransitionPresentation<DevicePullbackProps> {\n  const opts = devicePullbackSchema.parse(options ?? {});\n  return {\n    component: DevicePullbackPresentation,\n    props: {\n      device: opts.device,\n      frameColor: opts.frameColor,\n      startScale: opts.startScale,\n      background: opts.background,\n    },\n  };\n}\n\nexport default devicePullback;\n"
    },
    {
      "path": "registry/transitions/device-pullback/schema.ts",
      "type": "registry:component",
      "target": "components/onda/transitions/device-pullback/schema.ts",
      "content": "import { z } from 'zod';\n\n/** Zod schema for {@link devicePullback} options. */\nexport const devicePullbackSchema = z.object({\n  /** Discriminator literal — matches this entry's registry slug. Auto-populated when omitted. */\n  kind: z.literal('device-pullback').default('device-pullback'),\n  /** Which device bezel draws in around the content as it settles. */\n  device: z.enum(['laptop', 'phone']).default('laptop'),\n  /** Bezel / frame color — defaults to the Onda border tone. */\n  frameColor: z.string().default('var(--onda-border, #1C1C22)'),\n  /** How far the content is scaled up before it pulls back to 1x. */\n  startScale: z.number().min(1).max(4).default(2),\n  /** Fill behind the device once it has pulled back into frame. */\n  background: z.string().default('var(--onda-bg, #08080A)'),\n});\n\nexport type DevicePullbackOptions = z.input<typeof devicePullbackSchema>;\n"
    },
    {
      "path": "registry/transitions/device-pullback/device-pullback.meta.json",
      "type": "registry:file",
      "target": "components/onda/transitions/device-pullback/device-pullback.meta.json",
      "content": "{\n  \"name\": \"device-pullback\",\n  \"title\": \"devicePullback\",\n  \"description\": \"The outgoing scene starts as full-bleed UI scaled up, then pulls back to 1x while a minimal device bezel (laptop or phone) draws in around it — so the cut lands on the content framed inside a device mockup. A pull-back-to-reveal-the-product beat for launch and feature reels. Onda-original.\",\n  \"pickWhen\": \"the product is the reveal — feature launch, app demo finale. Lands the outgoing UI inside a `device-frame`; not a generic transition.\",\n  \"category\": \"transitions\",\n  \"tags\": [\n    \"transition\",\n    \"device\",\n    \"mockup\",\n    \"pullback\",\n    \"reveal\",\n    \"scene\"\n  ],\n  \"dependencies\": [\n    \"remotion\",\n    \"@remotion/transitions\",\n    \"zod\"\n  ]\n}\n"
    },
    {
      "path": "registry/transitions/device-pullback/README.md",
      "type": "registry:file",
      "target": "components/onda/transitions/device-pullback/README.md",
      "content": "# devicePullback\n\nThe outgoing scene starts as full-bleed UI content scaled up, then pulls back to 1x while a minimal device bezel — laptop or phone, built from plain divs and token borders — draws in around it. The cut lands on the content framed inside a clean device mockup. A \"pull back to reveal the product\" beat, common in launch and feature reels.\n\nOnda-original. Use inside Remotion's `<TransitionSeries>`.\n\n## Options\n\n| Option | Type | Default | Notes |\n| --- | --- | --- | --- |\n| `device` | `'laptop' \\| 'phone'` | `'laptop'` | Which bezel draws in around the content. |\n| `frameColor` | `string` | `'#1C1C22'` | Bezel / frame color (Onda border tone). |\n| `startScale` | `number` | `2` | How far content is scaled up before pulling back to 1x. |\n| `background` | `string` | `'#08080A'` | Fill behind the device once framed. |\n\n## Usage\n\n```tsx\nimport { Easing } from 'remotion';\nimport { TransitionSeries, linearTiming } from '@remotion/transitions';\nimport { devicePullback } from './components/onda/transitions/device-pullback/devicePullback';\n\n<TransitionSeries>\n  <TransitionSeries.Sequence durationInFrames={150}><AppScreen /></TransitionSeries.Sequence>\n  <TransitionSeries.Transition\n    presentation={devicePullback({ device: 'laptop' })}\n    timing={linearTiming({ durationInFrames: 24, easing: Easing.bezier(0.16, 1, 0.3, 1) })}\n  />\n  <TransitionSeries.Sequence durationInFrames={150}><NextScene /></TransitionSeries.Sequence>\n</TransitionSeries>\n```\n"
    }
  ]
}
