{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"sky-lockup","type":"registry:component","title":"Sky Lockup","description":"Logo outro in under two seconds. A one-line promise takes itself apart word by word, the white page washes off to a soft sky, and the mark in the middle of the sentence slides over, turns white and picks up your wordmark.","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/sky-lockup/index.tsx","type":"registry:component","target":"components/kuchi/sky-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 loadGeist } from \"@remotion/google-fonts/Geist\";\r\nimport { loadFont as loadPoppins } from \"@remotion/google-fonts/Poppins\";\r\nimport type { ReactNode } from \"react\";\r\nimport { useEffect, useId, useState } from \"react\";\r\nimport {\r\n  AbsoluteFill,\r\n  continueRender,\r\n  delayRender,\r\n  Img,\r\n  useCurrentFrame,\r\n  useVideoConfig,\r\n} from \"remotion\";\r\nimport {\r\n  mixOklch,\r\n  resolveFont,\r\n  type KuchiTheme,\r\n  useKuchiTheme,\r\n} from \"@/lib/kuchi-ui\";\r\nimport {\r\n  CUT,\r\n  FLIP_FROM,\r\n  FLIP_INK,\r\n  FLIP_PAPER,\r\n  FLIP_WIDTH,\r\n  LEAVE,\r\n  LEAVE_FADE,\r\n  LEAVE_Y,\r\n  LETTER_FADE,\r\n  LETTER_RISE,\r\n  LETTERS_OFF,\r\n  LETTERS_ON,\r\n  LINE_CENTER,\r\n  LINE_ON,\r\n  LINE_PIVOT,\r\n  LINE_SCALE,\r\n  LINE_X,\r\n  LINE_Y,\r\n  LOCKUP_CENTER,\r\n  LOCKUP_GAP,\r\n  LOCKUP_MARK,\r\n  LOCKUP_SIZE,\r\n  LOCKUP_Y,\r\n  MARK_SCALE,\r\n  MARK_X,\r\n  MARK_Y,\r\n  SKY,\r\n  SKY_ZOOM,\r\n  KUCHI_MARK,\r\n  TILE_FADE,\r\n  TILE_LINE,\r\n  TILE_RADIUS,\r\n  TILE_SIZE,\r\n  TILE_STROKE,\r\n  TYPE_SIZE,\r\n  TYPE_TRACKING,\r\n  WIPE,\r\n  WIPE_LEAN,\r\n  WIPE_STOPS,\r\n  WORD_FADE,\r\n  WORD_GAP,\r\n  WORD_RISE,\r\n} from \"./data\";\r\n\r\nconst { fontFamily: GEIST } = loadGeist(\"normal\", {\r\n  weights: [\"500\"],\r\n  subsets: [\"latin\"],\r\n});\r\nconst { fontFamily: POPPINS } = loadPoppins(\"normal\", {\r\n  weights: [\"600\"],\r\n  subsets: [\"latin\"],\r\n});\r\n\r\nconst STAGE_W = 1920;\r\nconst STAGE_H = 1080;\r\n/** The line may fill this much of the stage before it scales down to fit. */\r\nconst MAX_LINE = STAGE_W * 0.86;\r\n/** The source frames the mark rests in the lockup, and in the line. */\r\nconst LOCKUP_FRAME = 12;\r\nconst LINE_FRAME = 44;\r\n/** The source frame the line's layout was measured on. */\r\nconst LAYOUT_FRAME = 72;\r\n\r\nexport interface SkyLockupProps {\r\n  /** The wordmark that types on beside the mark, on the sky. */\r\n  wordmark?: string;\r\n  /** Your mark as SVG paths, like Cut Lockup's `logo`. Defaults to the kuchi mark. */\r\n  logo?: { width: number; height: number; shapes: readonly string[] };\r\n  /** The words left of the mark. */\r\n  before?: string;\r\n  /** The words right of the mark. */\r\n  after?: string;\r\n  /** Any image URL. Defaults to the Portal Intro picture. */\r\n  sky?: string;\r\n  /** A label from `fonts.ts` or a CSS family you have loaded. Defaults to Geist. */\r\n  fontFamily?: string;\r\n  fontWeight?: number;\r\n  /** Type size on a 1920x1080 stage. */\r\n  fontSize?: number;\r\n  /** Nudge per word, `[x, y]` in stage px, for optical spacing. */\r\n  wordNudge?: [number, number][];\r\n  /** Tracking per word in em. */\r\n  wordTracking?: number[];\r\n  /** The wordmark's own face. Defaults to Poppins, which is the kuchi logotype. */\r\n  wordmarkFont?: string;\r\n  wordmarkWeight?: number;\r\n  /** Wordmark size on that stage. */\r\n  wordmarkSize?: number;\r\n  /** Wordmark tracking in em. */\r\n  wordmarkTracking?: number;\r\n  /** Space between the mark and the wordmark, in stage px. */\r\n  wordmarkGap?: number;\r\n  /** Mark and wordmark colour on the sky. */\r\n  lockupColor?: string;\r\n  speed?: number;\r\n  theme?: Partial<KuchiTheme>;\r\n  mode?: \"light\" | \"dark\";\r\n}\r\n\r\n/** Sample a measured table at a fractional index; holds both ends. */\r\nexport const sample = (table: readonly number[], at: number) => {\r\n  const x = Math.max(0, Math.min(at, table.length - 1));\r\n  const i = Math.floor(x);\r\n  const a = table[i] ?? 0;\r\n  return a + ((table[i + 1] ?? a) - a) * (x - i);\r\n};\r\n\r\n/** Which source frame an out frame shows. The clip runs backwards through `CUT`. */\r\nexport const sourceFrame = (frame: number) => {\r\n  const last = CUT[CUT.length - 1];\r\n  if (frame >= last[0]) return last[1];\r\n  const next = CUT.findIndex(([f]) => f > Math.max(0, frame));\r\n  const [f0, s0] = CUT[next - 1];\r\n  const [f1, s1] = CUT[next];\r\n  return s0 + ((Math.max(0, frame) - f0) / (f1 - f0)) * (s1 - s0);\r\n};\r\n\r\n/** `count` beats spread evenly from `from` to `to`. */\r\nexport const beats = (count: number, from: number, to: number) => {\r\n  const step = count > 1 ? (to - from) / (count - 1) : 0;\r\n  return Array.from({ length: count }, (_, i) => from + i * step);\r\n};\r\n\r\n/** Where each word starts, on the frames the measured line keys them. */\r\nexport const wordBeats = (count: number, at: readonly number[]) =>\r\n  Array.from(\r\n    { length: count },\r\n    (_, i) =>\r\n      (at[Math.min(i, at.length - 1)] ?? 0) +\r\n      Math.max(0, i - at.length + 1) * LINE_ON.step,\r\n  );\r\n\r\n/** Left edge of every word, in px from the centre of the tile. */\r\nexport const layoutLine = (\r\n  before: readonly number[],\r\n  after: readonly number[],\r\n  gap: number,\r\n  tile: number,\r\n) => {\r\n  const left: number[] = [];\r\n  let x = -tile / 2;\r\n  for (let i = before.length - 1; i >= 0; i--) {\r\n    x -= gap + (before[i] ?? 0);\r\n    left.unshift(x);\r\n  }\r\n  const start = left[0] ?? -tile / 2;\r\n  const right: number[] = [];\r\n  let y = tile / 2;\r\n  for (const w of after) {\r\n    y += gap;\r\n    right.push(y);\r\n    y += w;\r\n  }\r\n  return {\r\n    before: left,\r\n    after: right,\r\n    centre: (start + y) / 2,\r\n    width: y - start,\r\n  };\r\n};\r\n\r\ninterface Metrics {\r\n  before: number[];\r\n  after: number[];\r\n  letters: number[];\r\n  wordmark: number;\r\n}\r\n\r\nconst measure = (\r\n  face: string,\r\n  weight: number,\r\n  before: string[],\r\n  after: string[],\r\n  tracking: (i: number) => number,\r\n  markFace: string,\r\n  markWeight: number,\r\n  markTracking: number,\r\n  wordmark: string,\r\n): Metrics => {\r\n  const P = 100;\r\n  const ctx = document.createElement(\"canvas\").getContext(\"2d\");\r\n  if (!ctx) throw new Error(\"sky-lockup: no 2d context\");\r\n  const em = (text: string, f: string, w: number, track: number) => {\r\n    ctx.font = `${w} ${P}px ${f}`;\r\n    ctx.letterSpacing = `${track * P}px`;\r\n    return ctx.measureText(text).width / P - track;\r\n  };\r\n  const chars = Array.from(wordmark);\r\n  return {\r\n    before: before.map((w, i) => em(w, face, weight, tracking(i))),\r\n    after: after.map((w, i) =>\r\n      em(w, face, weight, tracking(before.length + i)),\r\n    ),\r\n    letters: chars.map((_, i) =>\r\n      i === 0\r\n        ? 0\r\n        : em(\r\n            chars.slice(0, i + 1).join(\"\"),\r\n            markFace,\r\n            markWeight,\r\n            markTracking,\r\n          ) - em(chars[i] ?? \"\", markFace, markWeight, markTracking),\r\n    ),\r\n    wordmark: em(wordmark, markFace, markWeight, markTracking),\r\n  };\r\n};\r\n\r\n/**\r\n * Type at a fraction of a device pixel. Chrome rounds a baseline to a whole device\r\n * row, which turns a slow rise into a staircase, so the word is painted on the two\r\n * rows around `y` and added by the fraction between them. The scale pivots on the\r\n * baseline, so neither copy can climb the grid.\r\n */\r\nconst Word: React.FC<{\r\n  x: number;\r\n  y: number;\r\n  scale: number;\r\n  opacity: number;\r\n  px: number;\r\n  children: ReactNode;\r\n}> = ({ x, y, scale, opacity, px, children }) => {\r\n  if (opacity <= 0) return null;\r\n  const row = Math.floor(y * px);\r\n  const f = y * px - row;\r\n  return (\r\n    <g opacity={opacity} style={{ isolation: \"isolate\" }}>\r\n      {[\r\n        { r: row, w: 1 - f },\r\n        { r: row + 1, w: f },\r\n      ].map(({ r, w }) => (\r\n        <g\r\n          key={r}\r\n          transform={`translate(${x} ${(r + 1e-3) / px}) scale(${scale})`}\r\n          style={{ opacity: w, mixBlendMode: \"plus-lighter\" }}\r\n        >\r\n          {children}\r\n        </g>\r\n      ))}\r\n    </g>\r\n  );\r\n};\r\n\r\n/**\r\n * Sky Lockup: a finished sentence takes itself apart word by word, the white page\r\n * washes off to a soft sky, and the mark that sat in the middle of the sentence\r\n * slides over, turns white and picks up its wordmark. One clock drives everything:\r\n * `source` is a frame of the recording this was measured from.\r\n */\r\nexport const SkyLockupScene: React.FC<SkyLockupProps & { source: number }> = ({\r\n  source: s,\r\n  wordmark = \"kuchi\",\r\n  logo = KUCHI_MARK,\r\n  before = \"your animations\",\r\n  after = \"as one install\",\r\n  sky = SKY,\r\n  fontFamily,\r\n  fontWeight = 500,\r\n  fontSize = TYPE_SIZE,\r\n  wordNudge,\r\n  wordTracking,\r\n  wordmarkFont,\r\n  wordmarkWeight = 600,\r\n  wordmarkSize = LOCKUP_SIZE,\r\n  wordmarkTracking = 0,\r\n  wordmarkGap = LOCKUP_GAP,\r\n  lockupColor = \"#ffffff\",\r\n  theme,\r\n  mode,\r\n}) => {\r\n  const t = useKuchiTheme(theme, mode);\r\n  const uid = useId().replace(/:/g, \"\");\r\n  const { width, height } = useVideoConfig();\r\n  const px = Math.max(width / STAGE_W, height / STAGE_H);\r\n  const face = resolveFont(fontFamily) ?? resolveFont(t.fontFamily) ?? GEIST;\r\n  const markFace = resolveFont(wordmarkFont) ?? POPPINS;\r\n  const left = before.trim().split(/\\s+/).filter(Boolean);\r\n  const right = after.trim().split(/\\s+/).filter(Boolean);\r\n  const letters = Array.from(wordmark);\r\n\r\n  const [m, setM] = useState<Metrics | null>(null);\r\n  const [handle] = useState(() => delayRender(\"sky-lockup: measuring type\"));\r\n  const text = `${left.join(\" \")}\\n${right.join(\" \")}`;\r\n  const tracks = wordTracking ?? [];\r\n  const trackKey = tracks.join();\r\n  useEffect(() => {\r\n    let live = true;\r\n    // measuring a fallback face measures the wrong face\r\n    Promise.all([\r\n      document.fonts.load(`${fontWeight} 100px ${face}`, text),\r\n      document.fonts.load(`${wordmarkWeight} 100px ${markFace}`, wordmark),\r\n    ])\r\n      .catch(() => undefined)\r\n      .then(() => {\r\n        if (live) {\r\n          const [a = \"\", b = \"\"] = text.split(\"\\n\");\r\n          setM(\r\n            measure(\r\n              face,\r\n              fontWeight,\r\n              a.split(\" \").filter(Boolean),\r\n              b.split(\" \").filter(Boolean),\r\n              (i) => Number(trackKey.split(\",\")[i] || TYPE_TRACKING),\r\n              markFace,\r\n              wordmarkWeight,\r\n              wordmarkTracking,\r\n              wordmark,\r\n            ),\r\n          );\r\n        }\r\n      });\r\n    return () => {\r\n      live = false;\r\n    };\r\n  }, [\r\n    face,\r\n    fontWeight,\r\n    text,\r\n    trackKey,\r\n    markFace,\r\n    wordmarkWeight,\r\n    wordmarkTracking,\r\n    wordmark,\r\n  ]);\r\n  useEffect(() => {\r\n    if (m) continueRender(handle);\r\n  }, [m, handle]);\r\n\r\n  const tile72 = sample(TILE_SIZE, LAYOUT_FRAME);\r\n  const lineAt = (size: number) =>\r\n    m\r\n      ? layoutLine(\r\n          m.before.map((w) => w * size),\r\n          m.after.map((w) => w * size),\r\n          (WORD_GAP * size) / TYPE_SIZE,\r\n          tile72,\r\n        )\r\n      : null;\r\n  const full = lineAt(fontSize);\r\n  // Only the type gives way to a long line: the tile stays the size of the mark.\r\n  const fit = full\r\n    ? Math.min(1, (MAX_LINE - tile72) / (full.width - tile72))\r\n    : 1;\r\n  const rest = lineAt(fontSize * fit);\r\n\r\n  // The measured line sat `centre` off its tile. Any other sentence stays centred on\r\n  // the same spot, and carries the tile with it.\r\n  const lineShift = rest\r\n    ? LINE_CENTER - sample(MARK_X, LAYOUT_FRAME) - rest.centre\r\n    : 0;\r\n  const lockupWidth = m\r\n    ? LOCKUP_MARK + wordmarkGap + m.wordmark * wordmarkSize\r\n    : 0;\r\n  const lockupShift = m\r\n    ? LOCKUP_CENTER -\r\n      lockupWidth / 2 +\r\n      LOCKUP_MARK / 2 -\r\n      sample(MARK_X, LOCKUP_FRAME)\r\n    : 0;\r\n\r\n  // How far the mark has travelled from lockup to line, read off its own curve, so\r\n  // a wider lockup cannot pull it into the words while they are still on screen.\r\n  const lockupX = sample(MARK_X, LOCKUP_FRAME);\r\n  const glide = Math.max(\r\n    0,\r\n    Math.min(\r\n      1,\r\n      (sample(MARK_X, s) - lockupX) /\r\n        ((sample(MARK_X, LINE_FRAME) - lockupX) * 0.85),\r\n    ),\r\n  );\r\n  const markX =\r\n    sample(MARK_X, s) + lockupShift * (1 - glide) + lineShift * glide;\r\n  const markY = sample(MARK_Y, s);\r\n  const markScale = sample(MARK_SCALE, s);\r\n  const logoScale = LOCKUP_MARK / Math.max(logo.width, logo.height);\r\n\r\n  const lineScale = sample(LINE_SCALE, s);\r\n  const lineDrift = sample(LINE_X, s);\r\n\r\n  const zoom = 1 + SKY_ZOOM.from * Math.exp(-s / SKY_ZOOM.tau);\r\n  const swing = sample(WIPE_LEAN, s);\r\n  const lean = 1 + swing * swing;\r\n  const wipe = sample(WIPE, s);\r\n  const [uMin = 0, uMax = 0] = [\r\n    WIPE_STOPS[0],\r\n    WIPE_STOPS[WIPE_STOPS.length - 2],\r\n  ];\r\n  // Measured against the stage, so it rides with a mark that sits somewhere else.\r\n  const flipShift = markX - sample(MARK_X, s);\r\n  const flipPaper = sample(FLIP_PAPER, s - FLIP_FROM) + flipShift;\r\n  const flipInk = sample(FLIP_INK, s - FLIP_FROM) + flipShift;\r\n  const local = (x: number) => (x - markX) / (markScale * logoScale);\r\n  const tile = sample(TILE_SIZE, s);\r\n\r\n  const on = beats(letters.length, LETTERS_ON.from, LETTERS_ON.to);\r\n  const off = beats(letters.length, LETTERS_OFF.to, LETTERS_OFF.from);\r\n  const words = rest\r\n    ? [\r\n        ...left.map((w, i) => ({\r\n          w,\r\n          x: rest.before[i] ?? 0,\r\n          at: wordBeats(left.length, LINE_ON.first)[i] ?? 0,\r\n        })),\r\n        ...right.map((w, i) => ({\r\n          w,\r\n          x: rest.after[i] ?? 0,\r\n          at: wordBeats(right.length, LINE_ON.second)[i] ?? 0,\r\n        })),\r\n      ]\r\n    : [];\r\n\r\n  return (\r\n    <AbsoluteFill style={{ background: t.card, overflow: \"hidden\" }}>\r\n      <Img\r\n        src={sky}\r\n        style={{\r\n          position: \"absolute\",\r\n          inset: 0,\r\n          width: \"100%\",\r\n          height: \"100%\",\r\n          maxWidth: \"none\",\r\n          objectFit: \"cover\",\r\n          transform: `scale(${zoom})`,\r\n        }}\r\n      />\r\n      <svg\r\n        viewBox={`0 0 ${STAGE_W} ${STAGE_H}`}\r\n        width=\"100%\"\r\n        height=\"100%\"\r\n        preserveAspectRatio=\"xMidYMid slice\"\r\n        style={{ position: \"absolute\", inset: 0 }}\r\n      >\r\n        <title>{`${before} ${after}`}</title>\r\n        <defs>\r\n          <linearGradient\r\n            id={`${uid}w`}\r\n            gradientUnits=\"userSpaceOnUse\"\r\n            x1={wipe + uMin / lean}\r\n            y1={STAGE_H / 2 + (swing * uMin) / lean}\r\n            x2={wipe + uMax / lean}\r\n            y2={STAGE_H / 2 + (swing * uMax) / lean}\r\n          >\r\n            {WIPE_STOPS.flatMap((u, i) =>\r\n              i % 2\r\n                ? []\r\n                : [\r\n                    <stop\r\n                      key={u}\r\n                      offset={(u - uMin) / (uMax - uMin)}\r\n                      stopColor={t.card}\r\n                      stopOpacity={WIPE_STOPS[i + 1]}\r\n                    />,\r\n                  ],\r\n            )}\r\n          </linearGradient>\r\n          {[\r\n            { id: \"p\", at: flipPaper, from: 1, to: 0, c: lockupColor },\r\n            { id: \"i\", at: flipInk, from: 0, to: 1, c: t.foreground },\r\n          ].map(({ id, at, from, to, c }) => (\r\n            <linearGradient\r\n              key={id}\r\n              id={`${uid}${id}`}\r\n              gradientUnits=\"userSpaceOnUse\"\r\n              x1={local(at - FLIP_WIDTH / 2) + logo.width / 2}\r\n              x2={local(at + FLIP_WIDTH / 2) + logo.width / 2}\r\n              y1={0}\r\n              y2={0}\r\n            >\r\n              <stop offset={0} stopColor={c} stopOpacity={from} />\r\n              <stop offset={1} stopColor={c} stopOpacity={to} />\r\n            </linearGradient>\r\n          ))}\r\n        </defs>\r\n\r\n        <rect width={STAGE_W} height={STAGE_H} fill={`url(#${uid}w)`} />\r\n\r\n        {m &&\r\n          letters.map((ch, i) => {\r\n            const fade = sample(LETTER_FADE, s - (off[i] ?? 0));\r\n            const k = s - (on[i] ?? 0);\r\n            return (\r\n              <Word\r\n                // biome-ignore lint/suspicious/noArrayIndexKey: letters of a fixed string\r\n                key={i}\r\n                x={\r\n                  markX +\r\n                  LOCKUP_MARK / 2 +\r\n                  wordmarkGap +\r\n                  (m.letters[i] ?? 0) * wordmarkSize\r\n                }\r\n                y={LOCKUP_Y + sample(LETTER_RISE, k)}\r\n                scale={1}\r\n                opacity={k < 0 ? 0 : fade}\r\n                px={px}\r\n              >\r\n                <text\r\n                  fill={lockupColor}\r\n                  style={{\r\n                    fontFamily: markFace,\r\n                    fontWeight: wordmarkWeight,\r\n                    fontSize: wordmarkSize,\r\n                    textRendering: \"geometricPrecision\",\r\n                  }}\r\n                >\r\n                  {ch}\r\n                </text>\r\n              </Word>\r\n            );\r\n          })}\r\n\r\n        <g transform={`translate(${markX} ${markY})`}>\r\n          <rect\r\n            x={-tile / 2}\r\n            y={-tile / 2}\r\n            width={tile}\r\n            height={tile}\r\n            rx={(tile / 2) * TILE_RADIUS}\r\n            fill={t.card}\r\n            stroke={mixOklch(t.border, t.card, TILE_LINE)}\r\n            strokeWidth={TILE_STROKE}\r\n            opacity={sample(TILE_FADE, s - FLIP_FROM)}\r\n          />\r\n          <g\r\n            transform={`scale(${markScale * logoScale}) translate(${-logo.width / 2} ${-logo.height / 2})`}\r\n          >\r\n            {logo.shapes.map((d) => (\r\n              <path key={d} d={d} fillRule=\"evenodd\" fill={`url(#${uid}p)`} />\r\n            ))}\r\n            {logo.shapes.map((d) => (\r\n              <path key={d} d={d} fillRule=\"evenodd\" fill={`url(#${uid}i)`} />\r\n            ))}\r\n          </g>\r\n        </g>\r\n\r\n        {words.map(({ w, x, at }, i) => {\r\n          const k = s - at;\r\n          const gone = s - LEAVE.from - i * LEAVE.stagger;\r\n          return (\r\n            <Word\r\n              key={w + at}\r\n              x={\r\n                LINE_PIVOT +\r\n                lineScale *\r\n                  (sample(MARK_X, LAYOUT_FRAME) +\r\n                    lineShift +\r\n                    x +\r\n                    (wordNudge?.[i]?.[0] ?? 0) -\r\n                    LINE_PIVOT) +\r\n                lineDrift\r\n              }\r\n              y={\r\n                LINE_Y +\r\n                (wordNudge?.[i]?.[1] ?? 0) +\r\n                sample(WORD_RISE, k) +\r\n                sample(LEAVE_Y, gone) +\r\n                (lineScale - 1) * (LINE_Y - sample(MARK_Y, LAYOUT_FRAME))\r\n              }\r\n              scale={lineScale * fit}\r\n              opacity={\r\n                k < 0 ? 0 : sample(WORD_FADE, k) * sample(LEAVE_FADE, gone)\r\n              }\r\n              px={px}\r\n            >\r\n              <text\r\n                fill={t.foreground}\r\n                style={{\r\n                  fontFamily: face,\r\n                  fontWeight,\r\n                  fontSize: fontSize,\r\n                  letterSpacing: `${tracks[i] ?? TYPE_TRACKING}em`,\r\n                  textRendering: \"geometricPrecision\",\r\n                }}\r\n              >\r\n                {w}\r\n              </text>\r\n            </Word>\r\n          );\r\n        })}\r\n      </svg>\r\n    </AbsoluteFill>\r\n  );\r\n};\r\n\r\nexport const SkyLockup: React.FC<SkyLockupProps> = ({\r\n  speed = 1,\r\n  ...props\r\n}) => {\r\n  const frame = useCurrentFrame() * speed;\r\n  return <SkyLockupScene {...props} source={sourceFrame(frame)} />;\r\n};\r\n\r\nexport default SkyLockup;\r\n"},{"path":"components/kuchi/sky-lockup/data.ts","type":"registry:component","target":"components/kuchi/sky-lockup/data.ts","content":"/*! Portions Copyright (c) 2026 Sri Nath (snap-cn). MIT License. See THIRD_PARTY_LICENSES. */\n/**\r\n * Every number here was measured off a screen recording, one sample per frame, then\r\n * scaled up from its 712x400 to a 1920x1080 stage. Tables are indexed by source\r\n * frame: 0 is the logo on the sky, 77 is the finished sentence. The scene plays them\r\n * backwards, see `CUT`.\r\n */\r\n\r\n/** Out frame to source frame. Everything that moves plays one to one; only the held line is squeezed. */\r\nexport const CUT = [\r\n  [0, 77],\r\n  [27, 50],\r\n  [30, 41],\r\n  [46, 25],\r\n  [57, 14],\r\n] as const;\r\n\r\n/** Source frames each word and letter is keyed to. */\r\nexport const LINE_ON = {\r\n  first: [32, 36],\r\n  second: [57, 61, 65],\r\n  step: 4,\r\n} as const;\r\nexport const LETTERS_ON = { from: 2, to: 6 } as const;\r\nexport const LETTERS_OFF = { from: 24, to: 28 } as const;\r\n\r\n/** The rest position of the type, in stage px. */\r\nexport const LINE_Y = 569.9;\r\nexport const LINE_PIVOT = 942.5;\r\nexport const LINE_CENTER = 941.5;\r\nexport const LOCKUP_CENTER = 964.5;\r\nexport const LOCKUP_MARK = 74.4;\r\nexport const LOCKUP_GAP = 20;\r\nexport const LOCKUP_Y = 577.9;\r\nexport const TYPE_SIZE = 90.5;\r\nexport const TYPE_TRACKING = -0.02;\r\nexport const WORD_GAP = 18.5;\r\nexport const LOCKUP_SIZE = 105;\r\n\r\n/** The card the mark sits on: its edge per source frame, then its corner as a share of half that. */\r\nexport const TILE_SIZE = [\r\n  100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3,\r\n  100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3,\r\n  100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 100.3, 99.8, 96.5,\r\n  94.7, 94.5, 93.7, 92.3, 90.9, 90, 89.6, 89.3, 89.2, 89.2, 89.2, 89.2, 89.2,\r\n  89.2, 89.2, 89.3, 89.3, 89.3, 89.3, 89.3, 89.4, 89.5, 89.9, 90.9, 92.6, 93.7,\r\n  94.2, 94.3, 94.4, 94.5, 94.5, 94.6, 94.6, 94.7, 94.7, 94.8, 94.8, 94.7, 94.7,\r\n  94.7, 94.7, 94.7, 94.7, 94.7, 94.7,\r\n] as const;\r\nexport const TILE_RADIUS = 0.52;\r\nexport const TILE_STROKE = 1.5;\r\n/** The hairline is the border token, walked this far toward the card: it is lighter than a control's. */\r\nexport const TILE_LINE = 0.55;\r\n/** Card opacity per source frame, from `FLIP_FROM`. */\r\nexport const TILE_FADE = [0, 0, 0, 0.24, 0.88, 1] as const;\r\n\r\n/** The sky settles from a slightly tighter crop, at this much over its resting scale. */\r\nexport const SKY_ZOOM = { from: 0.00715, tau: 5.68 } as const;\r\n\r\n/** The white band that wipes the sky swings as it crosses, like a wiper: its lean per source frame. */\r\nexport const WIPE_LEAN = [\r\n  0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03,\r\n  0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.03,\r\n  0.035, 0.039, 0.06, 0.059, 0.082, 0.12, 0.162, 0.179, 0.194, 0.198, 0.209,\r\n  0.215, 0.224, 0.231, 0.228, 0.239, 0.238, 0.254, 0.249, 0.241, 0.24, 0.231,\r\n  0.229, 0.222, 0.223, 0.222, 0.225, 0.225, 0.226, 0.226, 0.227, 0.227, 0.227,\r\n  0.227, 0.227, 0.24, 0.241, 0.241, 0.241, 0.241, 0.241, 0.241, 0.241, 0.241,\r\n  0.241, 0.241, 0.241, 0.241, 0.241, 0.241, 0.241, 0.241,\r\n] as const;\r\n/** Band opacity by distance from its centre, stage px. A smoothstep, near enough. */\r\nexport const WIPE_STOPS = [\r\n  -647.2, 0, -566.3, 0.015, -485.4, 0.045, -404.5, 0.084, -323.6, 0.141, -242.7,\r\n  0.22, -161.8, 0.312, -80.9, 0.42, 0, 0.537, 80.9, 0.654, 161.8, 0.757, 242.7,\r\n  0.847, 323.6, 0.913, 404.5, 0.963, 485.4, 0.986, 566.3, 0.999, 647.2, 1,\r\n] as const;\r\n/** Band centre per source frame, stage px. It parks at the left edge and leaves on 63. */\r\nexport const WIPE = [\r\n  2967.6, 2967.6, 2967.6, 2967.6, 2967.6, 2967.6, 2967.6, 2967.6, 2967.6,\r\n  2967.6, 2967.6, 2967.6, 2967.6, 2967.6, 2967.6, 2967.6, 2967.6, 2967.6,\r\n  2967.6, 2967.6, 2967.6, 2967.6, 2967.6, 2967.6, 2722.2, 2427.9, 2327.9,\r\n  2265.8, 2130.9, 1958.8, 1678.9, 1169, 657.2, 378.2, 205.5, 82, -11.1, -85,\r\n  -145.5, -193.3, -232.9, -269.4, -293.5, -322.2, -337.5, -353.6, -358, -367.8,\r\n  -368.4, -367.8, -368, -368, -367.5, -367.5, -367.3, -367.4, -367.2, -367.2,\r\n  -367.2, -367.2, -367.2, -372.2, -372.5, -1131.2, -1131.2, -1131.2, -1131.2,\r\n  -1131.2, -1131.2, -1131.2, -1131.2, -1131.2, -1131.2, -1131.2, -1131.2,\r\n  -1131.2, -1131.2, -1131.2,\r\n] as const;\r\n\r\n/** Mark centre and scale per source frame. Scale 1 is the logo on the sky. */\r\nexport const MARK_X = [\r\n  881.04, 880.96, 880.96, 880.91, 880.96, 880.99, 880.99, 880.97, 880.98,\r\n  880.97, 880.95, 880.98, 880.97, 880.97, 880.96, 880.95, 880.95, 880.96,\r\n  881.05, 881.05, 881.17, 881.3, 881.83, 882.48, 883.14, 884.45, 886.15, 888.68,\r\n  891.84, 896.58, 902.18, 920.66, 939.13, 949.21, 955.76, 959.13, 961.43,\r\n  962.95, 964.13, 964.72, 965.29, 965.64, 965.75, 965.81, 965.83, 965.79, 965.8,\r\n  965.8, 965.82, 965.85, 965.91, 965.98, 966.03, 966.1, 966.21, 966.37, 966.53,\r\n  966.73, 966.92, 967.01, 967.11, 967.18, 967.25, 967.31, 967.36, 967.38,\r\n  967.41, 967.44, 967.48, 967.49, 967.5, 967.55, 967.56, 967.56, 967.56, 967.58,\r\n  967.6, 967.61,\r\n] as const;\r\nexport const MARK_Y = [\r\n  561.09, 557.32, 555.61, 554.2, 553.17, 552.32, 551.59, 551.01, 550.41, 549.95,\r\n  549.51, 549.05, 548.77, 548.5, 548.25, 548.02, 547.77, 547.55, 547.41, 547.33,\r\n  547.2, 547.08, 546.95, 546.86, 546.85, 546.81, 546.78, 546.73, 546.79, 546.94,\r\n  546.75, 546.75, 546.73, 546.76, 546.75, 546.77, 546.78, 546.77, 546.78,\r\n  546.79, 546.78, 546.8, 546.81, 546.79, 546.79, 546.79, 546.8, 546.8, 546.8,\r\n  546.81, 546.8, 546.8, 546.8, 546.8, 546.8, 546.79, 546.78, 546.77, 546.77,\r\n  546.77, 546.76, 546.76, 546.75, 546.75, 546.76, 546.76, 546.75, 546.75,\r\n  546.75, 546.75, 546.76, 546.75, 546.76, 546.76, 546.76, 546.76, 546.76,\r\n  546.76,\r\n] as const;\r\nexport const MARK_SCALE = [\r\n  0.8113, 0.9106, 0.9483, 0.972, 0.9876, 0.9987, 1.0062, 1.0073, 1.0075, 1.0086,\r\n  1.0096, 1.01, 1.0098, 1.009, 1.0096, 1.0092, 1.0094, 1.0087, 1.0074, 1.004,\r\n  1.0018, 0.9981, 0.9926, 0.9898, 0.9846, 0.9776, 0.9693, 0.9601, 0.9456,\r\n  0.9177, 0.88, 0.83, 0.7752, 0.7462, 0.7278, 0.7136, 0.7035, 0.6973, 0.6874,\r\n  0.6825, 0.681, 0.6764, 0.6747, 0.6735, 0.6717, 0.6712, 0.671, 0.671, 0.6712,\r\n  0.6719, 0.6731, 0.6745, 0.6759, 0.6777, 0.6805, 0.685, 0.69, 0.6963, 0.7024,\r\n  0.7058, 0.7093, 0.7114, 0.7137, 0.7154, 0.7171, 0.718, 0.7188, 0.7198, 0.7211,\r\n  0.7212, 0.7216, 0.7225, 0.7228, 0.723, 0.7233, 0.724, 0.7248, 0.7248,\r\n] as const;\r\n\r\n/** A short soft edge crosses the mark and swaps its colour: its x per frame from 28, off until it reaches the mark. */\r\nexport const FLIP_FROM = 28;\r\nexport const FLIP_WIDTH = 65;\r\nexport const FLIP_PAPER = [2698.0, 947.9, 933.3, 919.0, 897.2, 810.3] as const;\r\nexport const FLIP_INK = [2698.0, 1004.5, 943.6, 922.8, 903.4, 877.8] as const;\r\n\r\n/** The whole line drifts and pushes in around `LINE_PIVOT`. */\r\nexport const LINE_SCALE = [\r\n  0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163,\r\n  0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163,\r\n  0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163,\r\n  0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163, 0.9163,\r\n  0.9159, 0.9168, 0.9172, 0.9176, 0.9183, 0.9192, 0.9196, 0.9204, 0.9212, 0.922,\r\n  0.9233, 0.9245, 0.9258, 0.9275, 0.9294, 0.9314, 0.9339, 0.9371, 0.9412, 0.947,\r\n  0.9545, 0.9627, 0.9705, 0.9769, 0.9813, 0.9842, 0.9868, 0.989, 0.991, 0.9927,\r\n  0.9942, 0.9953, 0.9967, 0.9978, 0.9987, 0.9995, 1.0001, 1.0007, 1.0011,\r\n  1.0017, 1.0022, 1.0025,\r\n] as const;\r\nexport const LINE_X = [\r\n  10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2,\r\n  10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2,\r\n  10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 10.2, 9.05, 8.21, 6.95, 6.01, 5.17,\r\n  4.42, 3.85, 3.24, 2.63, 2.02, 1.56, 1.22, 0.79, 0.42, 0.27, 0.14, 0.07, 0.1,\r\n  0.07, 0.02, 0.16, 0.16, 0.04, -0.08, -0.02, 0.06, 0.07, 0.01, -0.08, -0.05,\r\n  -0.04, -0.01, -0.01, 0.02, 0.02, 0.02, 0, -0.01, 0.01, 0.02, 0, 0, -0.03,\r\n  -0.06,\r\n] as const;\r\n\r\n/** Each word, by frames since it started: px below rest, and opacity. */\r\nexport const WORD_RISE = [\r\n  7.91, 5.66, 4.07, 2.82, 2.05, 1.4, 0.91, 0.59, 0.31, 0.1, -0.02, -0.06, -0.07,\r\n] as const;\r\nexport const WORD_FADE = [\r\n  0.437, 0.603, 0.71, 0.795, 0.855, 0.896, 0.929, 0.955, 0.973, 0.991, 1.003,\r\n] as const;\r\n\r\n/** The line starts to leave from source frame 65, one word after another. */\r\nexport const LEAVE = { from: 65, stagger: 0.7 } as const;\r\nexport const LEAVE_Y = [\r\n  -0.2, -0.33, -0.5, -0.72, -1.07, -1.44, -1.88, -2.42, -3.04, -3.82, -4.64,\r\n  -5.61, -6.9,\r\n] as const;\r\nexport const LEAVE_FADE = [\r\n  1, 1, 1, 1, 0.983, 0.98, 0.975, 0.971, 0.953, 0.943, 0.919, 0.904, 0.883,\r\n] as const;\r\n\r\n/** Each letter by frames since it cut in, and frames since it started to go. */\r\nexport const LETTER_RISE = [\r\n  16.2, 12.15, 10.26, 8.64, 7.29, 5.94, 5, 4.19, 3.51, 2.84, 2.29, 1.89, 1.49,\r\n  1.13, 0.81, 0.54, 0.32, 0.14, 0,\r\n] as const;\r\nexport const LETTER_FADE = [1, 0.7, 0.34, 0] as const;\r\n\r\n/** The kuchi mark, outlined. */\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/** The picture behind the logo, shared with Portal Intro. */\r\nexport const SKY = \"https://kuchi-media.kalarislabs.com/components/art/art-03.svg\";\r\n"}]}