{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "photo-fill-type",
  "title": "Photo Fill Type",
  "description": "A word cut out of the stage reveals a generated mountain landscape and a caption.",
  "dependencies": ["remotion", "@remotion/google-fonts"],
  "files": [
    {
      "path": "registry/remocn/photo-fill-type/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont as loadDisplay } from \"@remotion/google-fonts/BarlowCondensed\";\nimport { useId } from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  Img,\n  interpolate,\n  useCurrentFrame,\n  useVideoConfig,\n} from \"remotion\";\n\nconst { fontFamily: display } = loadDisplay(\"normal\", {\n  weights: [\"400\", \"500\"],\n  subsets: [\"latin\"],\n});\n\nexport interface PhotoFillTypeProps {\n  /** The word cut out of the stage. Short and wide reads best (3–5 letters). */\n  title?: string;\n  /** Small line that lands once the image fills the frame. */\n  caption?: string;\n  /** Image seen through the letters. Defaults to a generated dusk landscape. */\n  src?: string;\n  accent?: string;\n  theme?: \"dark\" | \"light\";\n  speed?: number;\n}\n\n// Beat sheet (30fps):\n//  0–22    letters open onto the image (fade + settle from 1.035)\n//  0–end   the image trucks slowly sideways; its layers move with parallax\n//  22–72   hold on the masked word (hero)\n//  72–92   tracking opens and each letter fills with image from the\n//          baseline up, center letters first: the word becomes tall windows\n//  90–102  the gutters between the windows close into one cap-height band\n//  98–124  the band opens like a letterbox to a full-bleed image\n//  118–136 caption lands bottom-left\n//  136–165 hold on the full-bleed frame\nexport const PHOTO_FILL_TYPE_DURATION = 165;\nconst EXPAND = 72;\nconst CAPTION = 118;\n\n/** Barlow Condensed 500 advances (em) for caps, figures and a few marks. */\nconst ADVANCE: Record<string, number> = {\n  A: 0.436,\n  B: 0.456,\n  C: 0.452,\n  D: 0.469,\n  E: 0.432,\n  F: 0.41,\n  G: 0.457,\n  H: 0.475,\n  I: 0.22,\n  J: 0.435,\n  K: 0.466,\n  L: 0.407,\n  M: 0.53,\n  N: 0.501,\n  O: 0.462,\n  P: 0.451,\n  Q: 0.45,\n  R: 0.453,\n  S: 0.426,\n  T: 0.439,\n  U: 0.477,\n  V: 0.457,\n  W: 0.646,\n  X: 0.449,\n  Y: 0.442,\n  Z: 0.401,\n  \"0\": 0.447,\n  \"1\": 0.266,\n  \"2\": 0.415,\n  \"3\": 0.418,\n  \"4\": 0.44,\n  \"5\": 0.42,\n  \"6\": 0.42,\n  \"7\": 0.381,\n  \"8\": 0.429,\n  \"9\": 0.414,\n  \" \": 0.2,\n  \"&\": 0.564,\n  \"-\": 0.32,\n  \".\": 0.202,\n};\nconst CAP = 0.7;\n/** Side bearing the fill cell keeps inside each advance, in em. */\nconst CELL_INSET = 0.012;\n\n/**\n * gradients.sh \"horizon\": the dusk band. Plum night at the top, steel blue,\n * dusty rose, a rust line at the horizon and a pale glint for the sun.\n */\nconst HORIZON = {\n  bg: \"#000000\",\n  colors: [\"#b4553a\", \"#c98f8a\", \"#6f8fb0\", \"#3a1f33\", \"#dfe8ff\"],\n} as const;\n\nconst SETTLE = Easing.bezier(0.22, 1, 0.36, 1);\nconst CAMERA = Easing.bezier(0.65, 0, 0.35, 1);\nconst OPEN = Easing.bezier(0.72, 0, 0.12, 1);\nconst CLAMP = {\n  extrapolateLeft: \"clamp\",\n  extrapolateRight: \"clamp\",\n} as const;\n\nconst THEMES = {\n  dark: { bg: \"#0A0A0B\", grain: 0.05 },\n  light: { bg: \"#F5F4F0\", grain: 0.035 },\n} as const;\n\n// ── Deterministic noise ───────────────────────────────────────────────────\n\nfunction hash(i: number, seed: number) {\n  const s = Math.sin(i * 127.1 + seed * 311.7) * 43758.5453;\n  return s - Math.floor(s);\n}\n\nfunction valueNoise(x: number, seed: number) {\n  const i = Math.floor(x);\n  const f = x - i;\n  const t = f * f * (3 - 2 * f);\n  return hash(i, seed) * (1 - t) + hash(i + 1, seed) * t;\n}\n\n/** Ridged fractal noise in [0, 1]: sharp crests like real ridgelines. */\nfunction ridge(x: number, seed: number, octaves: number) {\n  let sum = 0;\n  let amp = 0.5;\n  let freq = 1;\n  let norm = 0;\n  for (let o = 0; o < octaves; o++) {\n    const n = valueNoise(x * freq, seed + o * 17);\n    const r = o < 2 ? 1 - Math.abs(2 * n - 1) : n;\n    sum += r * amp;\n    norm += amp;\n    amp *= 0.5;\n    freq *= 2.07;\n  }\n  return sum / norm;\n}\n\nfunction ridgePath(\n  seed: number,\n  baseY: number,\n  amp: number,\n  scale: number,\n  octaves: number,\n) {\n  let d = \"\";\n  for (let x = -500; x <= 2100; x += 5) {\n    const y = baseY - amp * ridge(x / scale, seed, octaves);\n    d += `${d ? \"L\" : \"M\"}${x} ${y.toFixed(1)}`;\n  }\n  return `${d}L2100 1000L-500 1000Z`;\n}\n\n// ── Default image: a dusk landscape built from light and haze ─────────────\n\ninterface Range {\n  seed: number;\n  base: number;\n  amp: number;\n  scale: number;\n  octaves: number;\n  top: string;\n  bottom: string;\n  depth: number;\n  blur: number;\n  rough?: number;\n  haze: number;\n}\n\nconst RANGES: Range[] = [\n  {\n    seed: 3,\n    base: 590,\n    amp: 120,\n    scale: 340,\n    octaves: 6,\n    top: \"#A88A9C\",\n    bottom: \"#D29C8E\",\n    depth: 0.3,\n    blur: 1.6,\n    haze: 0.5,\n  },\n  {\n    seed: 11,\n    base: 628,\n    amp: 120,\n    scale: 260,\n    octaves: 6,\n    top: \"#6E6F8E\",\n    bottom: \"#9C8190\",\n    depth: 0.45,\n    blur: 1,\n    haze: 0.4,\n  },\n  {\n    seed: 23,\n    base: 690,\n    amp: 110,\n    scale: 220,\n    octaves: 7,\n    top: \"#46304A\",\n    bottom: \"#5A3E55\",\n    depth: 0.65,\n    blur: 0.5,\n    rough: 3,\n    haze: 0.28,\n  },\n  {\n    seed: 37,\n    base: 790,\n    amp: 120,\n    scale: 300,\n    octaves: 7,\n    top: \"#24131F\",\n    bottom: \"#1B0F18\",\n    depth: 0.9,\n    blur: 0,\n    rough: 6,\n    haze: 0.16,\n  },\n  {\n    seed: 51,\n    base: 905,\n    amp: 70,\n    scale: 420,\n    octaves: 7,\n    top: \"#0C070A\",\n    bottom: \"#080507\",\n    depth: 1.25,\n    blur: 0.7,\n    rough: 9,\n    haze: 0,\n  },\n];\n\nfunction DuskScene({ pan, uid }: { pan: number; uid: string }) {\n  const id = (s: string) => `pft-${s}-${uid}`;\n  const SUN_X = 1060;\n  const SUN_Y = 548;\n  const TRUCK = 150;\n  return (\n    <svg\n      viewBox=\"0 0 1600 900\"\n      preserveAspectRatio=\"xMidYMid slice\"\n      width=\"100%\"\n      height=\"100%\"\n      style={{ position: \"absolute\", inset: 0 }}\n      aria-hidden\n    >\n      <defs>\n        <linearGradient id={id(\"sky\")} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n          <stop offset=\"0\" stopColor={HORIZON.bg} />\n          <stop offset=\"0.1\" stopColor={HORIZON.colors[3]} />\n          <stop offset=\"0.3\" stopColor={HORIZON.colors[2]} />\n          <stop offset=\"0.47\" stopColor={HORIZON.colors[1]} />\n          <stop offset=\"0.58\" stopColor={HORIZON.colors[0]} />\n          <stop offset=\"0.68\" stopColor={HORIZON.colors[1]} />\n          <stop offset=\"1\" stopColor={HORIZON.colors[4]} />\n        </linearGradient>\n        <radialGradient\n          id={id(\"sun\")}\n          cx={SUN_X}\n          cy={SUN_Y}\n          r=\"620\"\n          gradientUnits=\"userSpaceOnUse\"\n        >\n          <stop offset=\"0\" stopColor=\"#FFF6EE\" stopOpacity=\"0.95\" />\n          <stop offset=\"0.06\" stopColor={HORIZON.colors[4]} stopOpacity=\"0.7\" />\n          <stop\n            offset=\"0.25\"\n            stopColor={HORIZON.colors[1]}\n            stopOpacity=\"0.34\"\n          />\n          <stop offset=\"0.6\" stopColor={HORIZON.colors[0]} stopOpacity=\"0.1\" />\n          <stop offset=\"1\" stopColor={HORIZON.colors[0]} stopOpacity=\"0\" />\n        </radialGradient>\n        <linearGradient id={id(\"cloudband\")} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n          <stop offset=\"0\" stopColor=\"#fff\" stopOpacity=\"0\" />\n          <stop offset=\"0.2\" stopColor=\"#fff\" stopOpacity=\"0.55\" />\n          <stop offset=\"0.42\" stopColor=\"#fff\" stopOpacity=\"0.9\" />\n          <stop offset=\"0.6\" stopColor=\"#fff\" stopOpacity=\"0.35\" />\n          <stop offset=\"0.7\" stopColor=\"#fff\" stopOpacity=\"0\" />\n        </linearGradient>\n        <mask\n          id={id(\"cloudmask\")}\n          maskUnits=\"userSpaceOnUse\"\n          x=\"-500\"\n          y=\"0\"\n          width=\"2600\"\n          height=\"900\"\n        >\n          <rect\n            x=\"-500\"\n            y=\"0\"\n            width=\"2600\"\n            height=\"900\"\n            fill={`url(#${id(\"cloudband\")})`}\n          />\n        </mask>\n        <filter\n          id={id(\"clouds\")}\n          x=\"-500\"\n          y=\"0\"\n          width=\"2600\"\n          height=\"900\"\n          filterUnits=\"userSpaceOnUse\"\n        >\n          <feTurbulence\n            type=\"fractalNoise\"\n            baseFrequency=\"0.0014 0.0068\"\n            numOctaves={5}\n            seed={9}\n          />\n          <feColorMatrix\n            type=\"matrix\"\n            values=\"0 0 0 0 0.97  0 0 0 0 0.9  0 0 0 0 0.9  3.4 0 0 0 -1.55\"\n          />\n        </filter>\n        <filter\n          id={id(\"cloudshade\")}\n          x=\"-500\"\n          y=\"0\"\n          width=\"2600\"\n          height=\"900\"\n          filterUnits=\"userSpaceOnUse\"\n        >\n          <feTurbulence\n            type=\"fractalNoise\"\n            baseFrequency=\"0.0014 0.0068\"\n            numOctaves={5}\n            seed={9}\n          />\n          <feColorMatrix\n            type=\"matrix\"\n            values=\"0 0 0 0 0.22  0 0 0 0 0.2  0 0 0 0 0.32  4 0 0 0 -2.1\"\n          />\n          <feOffset dy=\"-6\" />\n        </filter>\n        {RANGES.map((r, i) => (\n          <linearGradient\n            key={r.seed}\n            id={id(`range${i}`)}\n            x1=\"0\"\n            y1={r.base - r.amp}\n            x2=\"0\"\n            y2={r.base + 60}\n            gradientUnits=\"userSpaceOnUse\"\n          >\n            <stop offset=\"0\" stopColor={r.top} />\n            <stop offset=\"1\" stopColor={r.bottom} />\n          </linearGradient>\n        ))}\n        {RANGES.map((r, i) => (\n          <filter\n            key={r.seed}\n            id={id(`rf${i}`)}\n            x=\"-600\"\n            y=\"0\"\n            width=\"2800\"\n            height=\"1000\"\n            filterUnits=\"userSpaceOnUse\"\n          >\n            {r.rough ? (\n              <>\n                <feTurbulence\n                  type=\"fractalNoise\"\n                  baseFrequency=\"0.09 0.05\"\n                  numOctaves={2}\n                  seed={r.seed}\n                  result=\"n\"\n                />\n                <feDisplacementMap\n                  in=\"SourceGraphic\"\n                  in2=\"n\"\n                  scale={r.rough}\n                  xChannelSelector=\"R\"\n                  yChannelSelector=\"G\"\n                  result=\"d\"\n                />\n                <feGaussianBlur in=\"d\" stdDeviation={r.blur} />\n              </>\n            ) : (\n              <feGaussianBlur stdDeviation={r.blur} />\n            )}\n          </filter>\n        ))}\n        <linearGradient id={id(\"haze\")} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n          <stop offset=\"0\" stopColor=\"#D9958A\" stopOpacity=\"0\" />\n          <stop offset=\"0.55\" stopColor=\"#D9958A\" stopOpacity=\"1\" />\n          <stop offset=\"1\" stopColor=\"#D9958A\" stopOpacity=\"0\" />\n        </linearGradient>\n        <radialGradient id={id(\"vignette\")} cx=\"0.5\" cy=\"0.48\" r=\"0.75\">\n          <stop offset=\"0.55\" stopColor=\"#000\" stopOpacity=\"0\" />\n          <stop offset=\"1\" stopColor=\"#000\" stopOpacity=\"0.36\" />\n        </radialGradient>\n      </defs>\n\n      <g transform={`translate(${-pan * TRUCK * 0.12} 0)`}>\n        <rect\n          x=\"-500\"\n          y=\"0\"\n          width=\"2600\"\n          height=\"900\"\n          fill={`url(#${id(\"sky\")})`}\n        />\n        <rect\n          x=\"-500\"\n          y=\"0\"\n          width=\"2600\"\n          height=\"900\"\n          fill={`url(#${id(\"sun\")})`}\n        />\n      </g>\n      <g\n        transform={`translate(${-pan * TRUCK * 0.2} 0)`}\n        mask={`url(#${id(\"cloudmask\")})`}\n      >\n        <rect\n          x=\"-500\"\n          y=\"0\"\n          width=\"2600\"\n          height=\"900\"\n          filter={`url(#${id(\"cloudshade\")})`}\n          opacity={0.22}\n        />\n        <rect\n          x=\"-500\"\n          y=\"0\"\n          width=\"2600\"\n          height=\"900\"\n          filter={`url(#${id(\"clouds\")})`}\n          opacity={0.7}\n        />\n      </g>\n      {/* the sun disc, low and soft, already touching the far haze */}\n      <g transform={`translate(${-pan * TRUCK * 0.12} 0)`}>\n        <circle cx={SUN_X} cy={SUN_Y} r=\"17\" fill=\"#FFF8E6\" />\n        <circle cx={SUN_X} cy={SUN_Y} r=\"34\" fill=\"#FFF1D2\" opacity={0.35} />\n      </g>\n\n      {RANGES.map((r, i) => (\n        <g key={r.seed} transform={`translate(${-pan * TRUCK * r.depth} 0)`}>\n          {r.haze > 0 && (\n            <rect\n              x=\"-500\"\n              y={r.base - r.amp * 0.55}\n              width=\"2600\"\n              height={r.amp * 0.9}\n              fill={`url(#${id(\"haze\")})`}\n              opacity={r.haze * 0.6}\n            />\n          )}\n          <path\n            d={ridgePath(r.seed, r.base, r.amp, r.scale, r.octaves)}\n            fill={`url(#${id(`range${i}`)})`}\n            filter={`url(#${id(`rf${i}`)})`}\n          />\n        </g>\n      ))}\n\n      {/* warm light scattering across the whole frame from the sun */}\n      <rect\n        x=\"0\"\n        y=\"0\"\n        width=\"1600\"\n        height=\"900\"\n        fill={`url(#${id(\"sun\")})`}\n        opacity={0.28}\n        style={{ mixBlendMode: \"screen\" }}\n      />\n      <rect\n        x=\"0\"\n        y=\"0\"\n        width=\"1600\"\n        height=\"900\"\n        fill={`url(#${id(\"vignette\")})`}\n      />\n    </svg>\n  );\n}\n\nfunction Grain({ opacity, uid }: { opacity: number; uid: string }) {\n  const id = `pft-grain-${uid}`;\n  return (\n    <svg\n      width=\"100%\"\n      height=\"100%\"\n      style={{\n        position: \"absolute\",\n        inset: 0,\n        opacity,\n        pointerEvents: \"none\",\n        mixBlendMode: \"overlay\",\n      }}\n      aria-hidden\n    >\n      <filter id={id}>\n        <feTurbulence\n          type=\"fractalNoise\"\n          baseFrequency=\"0.9\"\n          numOctaves={2}\n          seed={4}\n          stitchTiles=\"stitch\"\n        />\n        <feColorMatrix type=\"saturate\" values=\"0\" />\n      </filter>\n      <rect width=\"100%\" height=\"100%\" filter={`url(#${id})`} />\n    </svg>\n  );\n}\n\nexport function PhotoFillType({\n  title = \"Dusk\",\n  caption = \"Not a photograph. Every pixel is code.\",\n  src,\n  accent = \"#3B5BFD\",\n  theme = \"dark\",\n  speed = 1,\n}: PhotoFillTypeProps) {\n  const frame = useCurrentFrame() * speed;\n  const { width: W, height: H, durationInFrames } = useVideoConfig();\n  const u = H / 720;\n  const c = THEMES[theme];\n  const uid = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n  const maskId = `pft-mask-${uid}`;\n\n  const letters = title.toUpperCase().split(\"\");\n  const n = Math.max(letters.length, 1);\n  const adv = letters.map((ch) => ADVANCE[ch] ?? 0.45);\n  const sumAdv = adv.reduce((a, b) => a + b, 0) || 0.45;\n  // Condensed caps at 500: size, not weight, carries the word. Tracking opens\n  // from 0 to TRACK1 while the letters fill, so fit both widths.\n  const TRACK1 = 0.065;\n  const fs = Math.min(\n    (W * 0.84) / sumAdv,\n    (W * 0.94) / (sumAdv + (n - 1) * TRACK1),\n    (H * 0.58) / CAP,\n  );\n  const capH = fs * CAP;\n\n  // Open.\n  const open = interpolate(frame, [0, 22], [0.18, 1], {\n    ...CLAMP,\n    easing: SETTLE,\n  });\n  const wordScaleIn = interpolate(open, [0, 1], [1.035, 1]);\n\n  // Expand: tracking opens while each letter fills with image from the\n  // baseline up (center letters first), the gutters between the filled\n  // windows close into one band, and the band opens like a letterbox.\n  const track = interpolate(frame, [EXPAND, EXPAND + 20], [0, 1], {\n    ...CLAMP,\n    easing: CAMERA,\n  });\n  const closeP = interpolate(frame, [EXPAND + 18, EXPAND + 30], [0, 1], {\n    ...CLAMP,\n    easing: CAMERA,\n  });\n  const openP = interpolate(frame, [EXPAND + 26, EXPAND + 52], [0, 1], {\n    ...CLAMP,\n    easing: OPEN,\n  });\n  const trackEm = TRACK1 * track * (1 - closeP * 0.35);\n  const wordScale = wordScaleIn * (1 + 0.02 * track);\n  const baseline = H / 2 + capH / 2;\n\n  const totalW = (sumAdv + (n - 1) * trackEm) * fs;\n  const xs: number[] = [];\n  let cursor = W / 2 - totalW / 2;\n  for (let i = 0; i < n; i++) {\n    xs.push(cursor);\n    cursor += (adv[i] + trackEm) * fs;\n  }\n  const mid = (n - 1) / 2;\n  const cellTop = baseline - capH - fs * 0.014;\n  const cellBottom = baseline + fs * 0.012;\n  const cells = xs.map((x, i) => {\n    const order = Math.floor(Math.abs(i - mid) + 0.01);\n    const fill = interpolate(\n      frame,\n      [EXPAND + 3 + order * 3, EXPAND + 17 + order * 3],\n      [0, 1],\n      { ...CLAMP, easing: CAMERA },\n    );\n    const l0 = x + CELL_INSET * fs;\n    const r0 = x + (adv[i] - CELL_INSET) * fs;\n    // Closing: each window grows to meet its neighbours halfway.\n    const l1 =\n      i === 0 ? l0 : (xs[i - 1] + (adv[i - 1] - CELL_INSET) * fs + l0) / 2;\n    const r1 = i === n - 1 ? r0 : (r0 + xs[i + 1] + CELL_INSET * fs) / 2;\n    const left = l0 + (l1 - l0) * closeP;\n    const right = r0 + (r1 - r0) * closeP;\n    const top = cellBottom - (cellBottom - cellTop) * fill;\n    return { left, right, top, fill };\n  });\n\n  const bandL = cells[0]?.left ?? W / 2;\n  const bandR = cells[n - 1]?.right ?? W / 2;\n  const bx = interpolate(openP, [0, 1], [bandL, -W * 0.1]);\n  const bw = interpolate(openP, [0, 1], [bandR - bandL, W * 1.2]);\n  const by = interpolate(openP, [0, 1], [cellTop, -H * 0.1]);\n  const bh = interpolate(openP, [0, 1], [cellBottom - cellTop, H * 1.2]);\n\n  // Camera truck inside the letters; eases out of a slight push as it opens.\n  const pan = interpolate(frame, [0, Math.max(durationInFrames, 60)], [-1, 1]);\n  const photoScale = interpolate(\n    frame,\n    [EXPAND + 22, EXPAND + 64],\n    [1.1, 1.02],\n    { ...CLAMP, easing: CAMERA },\n  );\n\n  // Caption.\n  const cap = interpolate(frame, [CAPTION, CAPTION + 18], [0, 1], {\n    ...CLAMP,\n    easing: SETTLE,\n  });\n\n  const photo = src ? (\n    <Img\n      src={src}\n      style={{\n        position: \"absolute\",\n        inset: 0,\n        width: \"100%\",\n        height: \"100%\",\n        objectFit: \"cover\",\n        transform: `translateX(${-pan * 2.5}%)`,\n      }}\n    />\n  ) : (\n    <DuskScene pan={pan} uid={uid} />\n  );\n\n  return (\n    <AbsoluteFill style={{ background: c.bg, overflow: \"hidden\" }}>\n      <svg\n        width={W}\n        height={H}\n        style={{ position: \"absolute\", inset: 0 }}\n        aria-hidden\n      >\n        <defs>\n          <mask\n            id={maskId}\n            maskUnits=\"userSpaceOnUse\"\n            maskContentUnits=\"userSpaceOnUse\"\n            x={0}\n            y={0}\n            width={W}\n            height={H}\n          >\n            <rect x={0} y={0} width={W} height={H} fill=\"black\" />\n            <g\n              transform={`translate(${W / 2} ${H / 2}) scale(${wordScale}) translate(${-W / 2} ${-H / 2})`}\n              opacity={open}\n            >\n              {letters.map((ch, i) => (\n                <text\n                  key={i}\n                  x={xs[i]}\n                  y={baseline}\n                  fill=\"white\"\n                  style={{\n                    fontFamily: display,\n                    fontWeight: 500,\n                    fontSize: fs,\n                  }}\n                >\n                  {ch}\n                </text>\n              ))}\n              {openP <= 0 &&\n                cells.map((cell, i) =>\n                  cell.fill > 0 ? (\n                    <rect\n                      key={i}\n                      x={cell.left}\n                      y={cell.top}\n                      width={Math.max(0, cell.right - cell.left)}\n                      height={cellBottom - cell.top}\n                      fill=\"white\"\n                    />\n                  ) : null,\n                )}\n              {openP > 0 && (\n                <rect x={bx} y={by} width={bw} height={bh} fill=\"white\" />\n              )}\n            </g>\n          </mask>\n        </defs>\n      </svg>\n\n      <AbsoluteFill\n        style={{\n          maskImage: `url(#${maskId})`,\n          WebkitMaskImage: `url(#${maskId})`,\n        }}\n      >\n        <AbsoluteFill style={{ transform: `scale(${photoScale})` }}>\n          {photo}\n        </AbsoluteFill>\n        {/* a low scrim so the caption sits on the image without a box */}\n        <AbsoluteFill\n          style={{\n            background:\n              \"linear-gradient(180deg, rgba(0,0,0,0) 58%, rgba(0,0,0,0.45) 100%)\",\n            opacity: cap,\n          }}\n        />\n      </AbsoluteFill>\n\n      {caption && cap > 0 && (\n        <div\n          style={{\n            position: \"absolute\",\n            left: 56 * u,\n            bottom: 50 * u,\n            display: \"flex\",\n            flexDirection: \"column\",\n            gap: 14 * u,\n            opacity: cap,\n            transform: `translateY(${(1 - cap) * 12 * u}px)`,\n          }}\n        >\n          <div\n            style={{\n              width: 36 * u * interpolate(cap, [0, 1], [0.4, 1]),\n              height: 2 * u,\n              background: accent,\n            }}\n          />\n          <div\n            style={{\n              fontFamily: display,\n              fontWeight: 400,\n              fontSize: 38 * u,\n              letterSpacing: \"0.005em\",\n              lineHeight: 1.15,\n              color: \"rgba(255,255,255,0.94)\",\n              maxWidth: W * 0.62,\n              textWrap: \"balance\",\n            }}\n          >\n            {caption}\n          </div>\n        </div>\n      )}\n\n      <Grain opacity={c.grain + 0.03 * openP} uid={uid} />\n    </AbsoluteFill>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/remocn/photo-fill-type.tsx"
    }
  ],
  "type": "registry:component"
}
