{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"gather-lockup","type":"registry:component","title":"Gather Lockup","description":"Logo reveal in two and a half seconds. A wall of your work sits under a line of type.","dependencies":["remotion","@remotion/google-fonts"],"docs":"Needs a Remotion project. If a frame renders black, the component is drawing on a transparent layer: put a background behind it, e.g. <AbsoluteFill style={{ background: \"#faf9f6\" }}><Component /></AbsoluteFill>. Pass mode=\"dark\" for dark frames.","registryDependencies":["https://kuchi.kalarislabs.com/r/kuchi-ui.json"],"files":[{"path":"components/kuchi/gather-lockup/index.tsx","type":"registry:component","target":"components/kuchi/gather-lockup/index.tsx","content":"/*! Portions Copyright (c) 2026 Sri Nath (snap-cn). MIT License. See THIRD_PARTY_LICENSES. */\n\"use client\";\r\n\r\nimport { loadFont as loadInterTight } from \"@remotion/google-fonts/InterTight\";\r\nimport { AbsoluteFill, Img, useCurrentFrame, useVideoConfig } from \"remotion\";\r\nimport {\r\n  resolveFont,\r\n  type KuchiTheme,\r\n  useKuchiTheme,\r\n} from \"@/lib/kuchi-ui\";\r\nimport {\r\n  CAPTIONS,\r\n  FRAMES,\r\n  IMAGES,\r\n  LOGO,\r\n  RATE,\r\n  KUCHI_MARK,\r\n  TILES,\r\n  WORDS,\r\n} from \"./data\";\r\n\r\nconst { fontFamily: INTER_TIGHT } = loadInterTight(\"normal\", {\r\n  weights: [\"500\", \"600\"],\r\n  subsets: [\"latin\"],\r\n});\r\n\r\nconst STAGE_W = 1920;\r\nconst STAGE_H = 1080;\r\n/** Layout size of a tile before its transform; big, so percentages snap to nothing. */\r\nconst UNIT = 2000;\r\n\r\nexport interface GatherLockupProps {\r\n  /** The title: lines of words. Five words read best, the wall leaves on them. */\r\n  lines?: readonly (readonly string[])[];\r\n  /** Fifteen pictures: seven on the wall, four in the row, four they swap to. */\r\n  images?: readonly string[];\r\n  /** A caption under each of the seven tiles on the wall. */\r\n  captions?: readonly string[];\r\n  /** The wordmark the row turns into. */\r\n  wordmark?: string;\r\n  /** Your mark as SVG paths, like Cut Lockup's `logo`. Defaults to the kuchi mark. */\r\n  logo?: {\r\n    width: number;\r\n    height: number;\r\n    shapes: readonly string[];\r\n  };\r\n  font?: string;\r\n  /** Wordmark colour. Defaults to the theme's foreground. */\r\n  wordmarkColor?: string;\r\n  /** Letter spacing of the wordmark, in em. */\r\n  wordmarkTracking?: number;\r\n  /** CSS background under everything. Defaults to the theme's page colour. */\r\n  backdrop?: string;\r\n  speed?: number;\r\n  theme?: Partial<KuchiTheme>;\r\n  mode?: \"light\" | \"dark\";\r\n}\r\n\r\n/** The pose in force at `frame`: the last key that has started. */\r\nexport const pose = <K extends readonly number[]>(\r\n  keys: readonly K[],\r\n  frame: number,\r\n) => {\r\n  let hit: K | undefined;\r\n  for (const k of keys) if ((k[0] ?? 0) <= frame) hit = k;\r\n  return hit;\r\n};\r\n\r\n/**\r\n * Letters of the wordmark at a key: the first `n` scaled from the six-letter\r\n * source, split before the last one shown when `split` is set.\r\n */\r\nexport const reveal = (word: string, n: number, split: number) => {\r\n  const shown =\r\n    n >= 6\r\n      ? word.length\r\n      : n >= 4\r\n        ? word.length - 1\r\n        : Math.ceil(word.length / 3);\r\n  return split\r\n    ? [word.slice(0, shown - 1), word.slice(shown - 1, shown)]\r\n    : [word.slice(0, shown), \"\"];\r\n};\r\n\r\nconst Title: React.FC<{\r\n  frame: number;\r\n  words: readonly string[];\r\n  fill: string;\r\n  font: string;\r\n}> = ({ frame, words, fill, font }) => (\r\n  <>\r\n    {WORDS.map((w, i) => {\r\n      const k = pose(w.keys, frame);\r\n      const word = words[i];\r\n      if (!k || !word || frame > w.until) return null;\r\n      return (\r\n        <text\r\n          key={`${i}-${word}`}\r\n          x={k[1]}\r\n          y={k[2]}\r\n          textAnchor={w.anchor}\r\n          fill={fill}\r\n          style={{\r\n            fontFamily: font,\r\n            fontWeight: 600,\r\n            fontSize: k[3],\r\n            letterSpacing: \"-0.02em\",\r\n            textRendering: \"geometricPrecision\",\r\n          }}\r\n        >\r\n          {word}\r\n        </text>\r\n      );\r\n    })}\r\n  </>\r\n);\r\n\r\n/**\r\n * Gather Lockup: a wall of your work under a line of type. The line falls apart\r\n * word by word, the wall cuts in to a row of four, then each slot swaps its\r\n * picture and hands over to your mark and wordmark. `t` is seconds into the clip.\r\n */\r\nexport const GatherLockupScene: React.FC<GatherLockupProps & { t: number }> = ({\r\n  t,\r\n  lines = [[\"Ship\"], [\"your\", \"demo\"], [\"in\", \"code\"]],\r\n  images = IMAGES,\r\n  captions = CAPTIONS,\r\n  wordmark = \"kuchi\",\r\n  logo = KUCHI_MARK,\r\n  font,\r\n  wordmarkColor,\r\n  wordmarkTracking = -0.03,\r\n  backdrop,\r\n  theme,\r\n  mode,\r\n}) => {\r\n  const c = useKuchiTheme(theme, mode);\r\n  const { width, height } = useVideoConfig();\r\n  const frame = Math.min(FRAMES - 1, Math.floor(t * RATE + 1e-6));\r\n  const family = resolveFont(font) ?? INTER_TIGHT;\r\n  const px = Math.max(width / STAGE_W, height / STAGE_H);\r\n  const words = lines.flat();\r\n  // ponytail: width by letter count, not measured; the source wordmark has six letters\r\n  const lockupShift = -0.28 * LOGO.wordSize * (wordmark.length - 6);\r\n  const mark = pose(LOGO.mark, frame);\r\n  const word = pose(LOGO.word, frame);\r\n  const [head, tail] = word\r\n    ? reveal(wordmark, word[1] ?? 0, word[2] ?? 0)\r\n    : [\"\", \"\"];\r\n  const scale = LOGO.size / Math.max(logo.width, logo.height);\r\n\r\n  return (\r\n    <AbsoluteFill\r\n      style={{ background: backdrop ?? c.background, overflow: \"hidden\" }}\r\n    >\r\n      <div\r\n        style={{\r\n          position: \"absolute\",\r\n          left: (width - STAGE_W * px) / 2,\r\n          top: (height - STAGE_H * px) / 2,\r\n          width: STAGE_W,\r\n          height: STAGE_H,\r\n          transform: `scale(${px})`,\r\n          transformOrigin: \"0 0\",\r\n        }}\r\n      >\r\n        {TILES.map((tile) => {\r\n          const k = pose(tile.keys, frame);\r\n          if (!k || frame > tile.until) return null;\r\n          const [, pic = 0, x = 0, y = 0, w = 0, h = 0] = k;\r\n          const [bx = 0, by = 0, bw = 0, bh = 0] = k.slice(6);\r\n          return (\r\n            // Unit box scaled up: left/top/width/height would snap to device pixels.\r\n            <div\r\n              key={tile.keys[0]?.[1]}\r\n              style={{\r\n                position: \"absolute\",\r\n                left: 0,\r\n                top: 0,\r\n                width: UNIT,\r\n                height: (UNIT * h) / w,\r\n                overflow: \"hidden\",\r\n                opacity: tile.opacity,\r\n                transformOrigin: \"0 0\",\r\n                transform: `translate(${x}px, ${y}px) scale(${w / UNIT})`,\r\n              }}\r\n            >\r\n              <Img\r\n                src={images[pic % Math.max(1, images.length)] ?? \"\"}\r\n                style={{\r\n                  position: \"absolute\",\r\n                  left: `${((bx - x) / w) * 100}%`,\r\n                  top: `${((by - y) / h) * 100}%`,\r\n                  width: `${(bw / w) * 100}%`,\r\n                  height: `${(bh / h) * 100}%`,\r\n                  maxWidth: \"none\",\r\n                  objectFit: \"cover\",\r\n                }}\r\n              />\r\n            </div>\r\n          );\r\n        })}\r\n\r\n        <svg\r\n          viewBox={`0 0 ${STAGE_W} ${STAGE_H}`}\r\n          width={STAGE_W}\r\n          height={STAGE_H}\r\n          style={{ position: \"absolute\", inset: 0 }}\r\n          aria-hidden\r\n        >\r\n          {TILES.map((tile, i) => {\r\n            const k = pose(tile.keys, frame);\r\n            if (!k || frame > tile.until || (k[1] ?? 0) > 6) return null;\r\n            const [, , x = 0, y = 0, , h = 0] = k;\r\n            return (\r\n              <g key={tile.keys[0]?.[1]} opacity={tile.opacity}>\r\n                <circle\r\n                  cx={x + 6}\r\n                  cy={y + h + 18}\r\n                  r={4.5}\r\n                  fill={c.foreground}\r\n                  opacity={0.5}\r\n                />\r\n                <text\r\n                  x={x + 19}\r\n                  y={y + h + 23}\r\n                  fill={c.foreground}\r\n                  opacity={0.45}\r\n                  style={{\r\n                    fontFamily: family,\r\n                    fontSize: 15,\r\n                    fontWeight: 500,\r\n                    textRendering: \"geometricPrecision\",\r\n                  }}\r\n                >\r\n                  {captions[i]}\r\n                </text>\r\n              </g>\r\n            );\r\n          })}\r\n          <Title\r\n            frame={frame}\r\n            words={words}\r\n            fill={c.foreground}\r\n            font={family}\r\n          />\r\n          {mark ? (\r\n            <g\r\n              transform={`translate(${(mark[1] ?? 0) + lockupShift} ${mark[2] ?? 0}) scale(${scale})`}\r\n            >\r\n              <title>{wordmark}</title>\r\n              {logo.shapes.map((d) => (\r\n                <path key={d} d={d} fill={c.primary} fillRule=\"evenodd\" />\r\n              ))}\r\n            </g>\r\n          ) : null}\r\n          {word ? (\r\n            <text\r\n              x={(word[3] ?? 0) + lockupShift}\r\n              y={word[4]}\r\n              fill={wordmarkColor ?? c.foreground}\r\n              style={{\r\n                fontFamily: family,\r\n                fontWeight: 600,\r\n                fontSize: LOGO.wordSize,\r\n                letterSpacing: `${wordmarkTracking}em`,\r\n                textRendering: \"geometricPrecision\",\r\n              }}\r\n            >\r\n              {head}\r\n              {tail ? <tspan dx={LOGO.gap}>{tail}</tspan> : null}\r\n            </text>\r\n          ) : null}\r\n        </svg>\r\n      </div>\r\n    </AbsoluteFill>\r\n  );\r\n};\r\n\r\nexport const GatherLockup: React.FC<GatherLockupProps> = ({\r\n  speed = 1,\r\n  ...props\r\n}) => {\r\n  const frame = useCurrentFrame();\r\n  const { fps } = useVideoConfig();\r\n  return <GatherLockupScene {...props} t={(frame * speed) / fps} />;\r\n};\r\n\r\nexport default GatherLockup;\r\n"},{"path":"components/kuchi/gather-lockup/data.ts","type":"registry:component","target":"components/kuchi/gather-lockup/data.ts","content":"/*! Portions Copyright (c) 2026 Sri Nath (snap-cn). MIT License. See THIRD_PARTY_LICENSES. */\n/**\r\n * Measured frame by frame off a 45-frame, 24fps screen recording, on a 1920x1080\r\n * stage. Nothing here eases: the source cuts between held poses, so every table is\r\n * a list of poses keyed by the frame each one starts on.\r\n */\r\n\r\n/** The source's clock. Poses are frames of it. */\r\nexport const RATE = 24;\r\n/** Frames in the clip; the last pose is the lockup and it holds. */\r\nexport const FRAMES = 45;\r\n\r\nexport interface TileTrack {\r\n  /** from, picture, x, y, w, h, then the box the picture is laid into: x, y, w, h. */\r\n  keys: readonly (readonly number[])[];\r\n  /** Last frame on screen. */\r\n  until: number;\r\n  opacity: number;\r\n}\r\n\r\n/** Seven tiles. Pictures 0-6 are the wall, 7-10 the row, 11-14 the swaps. */\r\nexport const TILES: readonly TileTrack[] = [\r\n  {\r\n    keys: [\r\n      [0, 0, 620.0, 50.0, 221.1, 228.7, 582.25, 12.25, 296.6, 304.21],\r\n      [13, 0, 612.04, 50.11, 221.1, 228.7, 574.29, 12.36, 296.6, 304.21],\r\n      [17, 0, 1132.37, 3.37, 221.1, 228.7, 1094.62, -34.38, 296.6, 304.21],\r\n    ],\r\n    until: 17,\r\n    opacity: 0.4,\r\n  },\r\n  {\r\n    keys: [\r\n      [0, 1, 1180.0, 50.0, 211.5, 261.63, 1141.83, 11.68, 288.03, 338.3],\r\n      [10, 1, 1169.91, 50.0, 211.2, 261.6, 1131.54, 11.68, 288.0, 338.26],\r\n      [14, 1, 1098.4, 50.32, 211.58, 261.68, 1060.64, 12.57, 287.08, 337.19],\r\n      [15, 1, 977.07, 254.0, 198.96, 245.93, 940.71, 216.94, 272.19, 319.69],\r\n      [18, 9, 980.68, 378.42, 194.59, 195.24, 942.93, 340.67, 270.09, 270.74],\r\n      [21, 9, 980.68, 441.2, 194.64, 194.83, 942.81, 403.94, 270.07, 270.71],\r\n      [24, 9, 979.71, 447.99, 181.94, 181.46, 944.61, 413.16, 252.04, 252.65],\r\n      [26, 13, 979.5, 447.78, 182.62, 181.32, 941.74, 410.02, 258.12, 256.83],\r\n      [27, 13, 977.47, 470.4, 136.37, 135.91, 949.24, 442.55, 192.66, 191.69],\r\n    ],\r\n    until: 28,\r\n    opacity: 1,\r\n  },\r\n  {\r\n    keys: [\r\n      [0, 2, 120.0, 110.0, 179.43, 237.28, 82.82, 73.05, 256.38, 333.63],\r\n      [14, 2, 228.19, 110.02, 179.38, 237.22, 190.86, 73.07, 256.42, 333.68],\r\n      [15, 2, 414.74, 243.29, 182.27, 259.93, 376.99, 205.54, 257.77, 335.43],\r\n      [18, 7, 520.99, 425.53, 195.69, 193.59, 483.24, 387.78, 271.2, 269.1],\r\n      [20, 7, 520.88, 439.79, 195.72, 193.4, 483.46, 402.39, 270.67, 268.57],\r\n      [22, 11, 522.04, 438.98, 195.07, 194.27, 484.29, 401.23, 270.58, 269.77],\r\n      [24, 11, 552.3, 445.51, 182.02, 181.75, 517.65, 410.94, 251.38, 250.63],\r\n    ],\r\n    until: 24,\r\n    opacity: 1,\r\n  },\r\n  {\r\n    keys: [\r\n      [0, 3, 90.0, 560.0, 214.95, 234.82, 52.25, 522.25, 290.45, 310.33],\r\n      [14, 3, 102.35, 560.02, 214.95, 234.82, 64.6, 522.27, 290.45, 310.33],\r\n      [16, 3, 12.13, 479.16, 214.95, 234.82, -25.62, 441.41, 290.45, 310.33],\r\n    ],\r\n    until: 18,\r\n    opacity: 0.42,\r\n  },\r\n  {\r\n    keys: [\r\n      [0, 4, 1600.0, 190.0, 259.74, 223.69, 1562.24, 152.25, 335.24, 299.19],\r\n      [\r\n        10, 4, 1571.61, 172.42000000000002, 259.74, 223.69, 1533.85, 134.67,\r\n        335.24, 299.19,\r\n      ],\r\n      [13, 4, 1563.54, 172.34, 259.74, 223.69, 1525.78, 134.59, 335.24, 299.19],\r\n      [16, 4, 1639.07, 564.4, 259.74, 223.69, 1601.31, 526.65, 335.24, 299.19],\r\n    ],\r\n    until: 17,\r\n    opacity: 0.42,\r\n  },\r\n  {\r\n    keys: [\r\n      [0, 5, 520.0, 800.0, 163.01, 182.72, 486.4, 766.22, 229.61, 249.59],\r\n      [5, 5, 525.99, 800.0, 162.61, 182.72, 492.35, 766.22, 229.58, 249.56],\r\n      [6, 5, 526.47, 800.05, 162.09, 182.7, 492.35, 766.2, 229.64, 249.62],\r\n      [7, 5, 614.11, 799.97, 161.8, 182.75, 579.53, 766.16, 229.76, 249.75],\r\n      [10, 5, 622.31, 799.97, 160.72, 182.72, 588.6, 766.27, 229.36, 249.31],\r\n      [12, 5, 622.34, 779.56, 162.9, 182.8, 588.86, 746.31, 228.66, 248.55],\r\n      [15, 5, 752.31, 543.86, 182.02, 204.43, 714.55, 506.1, 257.53, 279.94],\r\n      [17, 8, 749.31, 496.69, 185.26, 185.26, 713.91, 460.99, 256.89, 257.12],\r\n      [19, 8, 749.91, 447.83, 193.75, 193.94, 712.28, 409.87, 269.18, 269.42],\r\n      [21, 8, 749.93, 441.63, 193.75, 194.0, 712.18, 403.87, 269.26, 269.5],\r\n      [24, 12, 762.93, 448.77, 181.48, 180.62, 725.18, 411.02, 256.99, 256.13],\r\n    ],\r\n    until: 26,\r\n    opacity: 1,\r\n  },\r\n  {\r\n    keys: [\r\n      [0, 6, 1330.0, 780.0, 192.35, 206.45, 1292.25, 742.24, 267.86, 281.96],\r\n      [11, 6, 1309.75, 779.87, 192.35, 206.45, 1272.0, 742.11, 267.86, 281.96],\r\n      [13, 6, 1187.38, 779.9, 192.35, 206.45, 1149.63, 742.14, 267.86, 281.96],\r\n      [15, 6, 1239.45, 638.43, 192.35, 206.45, 1201.7, 600.67, 267.86, 281.96],\r\n      [16, 6, 1239.42, 589.64, 191.97, 206.53, 1201.23, 551.57, 268.79, 282.95],\r\n      [18, 10, 1208.58, 463.2, 195.56, 193.59, 1170.82, 425.45, 271.07, 269.1],\r\n      [22, 10, 1208.63, 440.14, 195.51, 193.16, 1170.82, 402.2, 271.14, 269.17],\r\n      [\r\n        24, 10, 1192.69, 446.97, 183.67, 179.95, 1157.02, 411.29, 253.57,\r\n        251.73,\r\n      ],\r\n      [27, 14, 1136.2, 470.21, 135.32, 134.7, 1098.44, 432.46, 210.82, 210.2],\r\n    ],\r\n    until: 30,\r\n    opacity: 1,\r\n  },\r\n];\r\n\r\nexport interface WordTrack {\r\n  anchor: \"start\" | \"middle\" | \"end\";\r\n  /** from, x, baseline, font size. */\r\n  keys: readonly (readonly number[])[];\r\n  until: number;\r\n}\r\n\r\n/** Title words as they appear in `lines`, read left to right, top to bottom. */\r\nexport const WORDS: readonly WordTrack[] = [\r\n  {\r\n    anchor: \"middle\",\r\n    until: 14,\r\n    keys: [\r\n      [0, 972.67, 471.26, 123.07],\r\n      [10, 911.35, 471.32, 123.07],\r\n      [13, 913.46, 474.42, 117.25],\r\n    ],\r\n  },\r\n  {\r\n    anchor: \"end\",\r\n    until: 13,\r\n    keys: [\r\n      [0, 916.29, 581.72, 122.94],\r\n      [12, 875.76, 581.12, 122.7],\r\n      [13, 880.4, 579.8, 117.38],\r\n    ],\r\n  },\r\n  {\r\n    anchor: \"start\",\r\n    until: 14,\r\n    keys: [\r\n      [0, 938.37, 581.02, 126.12],\r\n      [13, 934.49, 578.99, 120.05],\r\n    ],\r\n  },\r\n  {\r\n    anchor: \"end\",\r\n    until: 14,\r\n    keys: [\r\n      [0, 1250.86, 690.01, 123.48],\r\n      [7, 1128.38, 690.12, 122.97],\r\n      [9, 1125.03, 690.31, 124.15],\r\n      [13, 1117.91, 682.68, 118.09],\r\n    ],\r\n  },\r\n  {\r\n    anchor: \"start\",\r\n    until: 13,\r\n    keys: [\r\n      [0, 1276.93, 689.91, 124.31],\r\n      [12, 1235.65, 689.8, 124.26],\r\n      [13, 1223.68, 683.76, 118.87],\r\n    ],\r\n  },\r\n];\r\n\r\n/** Mark keys are from, x, y; word keys are from, letters, split, x, baseline. */\r\nexport const LOGO = {\r\n  size: 78.2,\r\n  wordSize: 91.69,\r\n  gap: 10.79,\r\n  mark: [\r\n    [25, 623.46, 502.79],\r\n    [27, 747.51, 502.79],\r\n    [31, 760.99, 502.79],\r\n    [33, 765.03, 502.79],\r\n  ],\r\n  word: [\r\n    [27, 2, 0, 841.89, 571.55],\r\n    [29, 4, 1, 841.89, 571.55],\r\n    [31, 6, 0, 856.45, 571.55],\r\n    [33, 6, 0, 859.96, 571.55],\r\n  ],\r\n} as const;\r\n\r\n/** The kuchi mark. */\r\nexport const KUCHI_MARK = {\r\n  width: 723,\r\n  height: 632,\r\n  shapes: [\r\n    \"M139.04 0H583.96Q723 0 723 139.04V492.96000000000004Q723 632 583.96 632H139.04Q0 632 0 492.96000000000004V139.04Q0 0 139.04 0Z\",\r\n  ],\r\n} as const;\r\n\r\n\r\n/** The art from our own showcase: seven on the wall, four in the row, four they swap to. */\r\nexport const IMAGES = [\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-08.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-10.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-09.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-09.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-06.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-09.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-04.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-02.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-09.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-07.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-06.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-05.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-07.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-11.svg\",\r\n  \"https://kuchi-media.kalarislabs.com/components/art/art-10.svg\",\r\n] as const;\r\n\r\n/** A caption under each tile on the wall: what people cut with kuchi. */\r\nexport const CAPTIONS = [\r\n  \"Launch film\",\r\n  \"Product demo\",\r\n  \"Feature drop\",\r\n  \"Changelog\",\r\n  \"Pricing reel\",\r\n  \"Founder intro\",\r\n  \"Logo outro\",\r\n] as const;\r\n"}]}