Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "figure-to-label",
"title": "Figure to Label",
"description": "A $6.4B figure resolves into its label \"valuation\" under the Remocn mark.",
"dependencies": ["remotion", "@remotion/google-fonts"],
"registryDependencies": ["@remocn/gsh"],
"files": [
{
"path": "registry/remocn/figure-to-label/index.tsx",
"content": "\"use client\";\n\nimport { loadFont as loadManrope } from \"@remotion/google-fonts/Manrope\";\nimport { loadFont } from \"@remotion/google-fonts/Onest\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\nimport {\n AbsoluteFill,\n continueRender,\n delayRender,\n Easing,\n interpolate,\n random,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/remocn/gsh/gradient-engine\";\nimport { GshGround, gshParams } from \"@/lib/remocn/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/remocn/gsh/presets\";\n\nconst onest = loadFont(\"normal\", {\n weights: [\"300\", \"400\"],\n subsets: [\"latin\"],\n});\nconst manrope = loadManrope(\"normal\", {\n weights: [\"600\"],\n subsets: [\"latin\"],\n});\n\nconst REMOCN_R_PATH =\n \"M 0.01 0.81 C 0.01 1.73, 0.36 2.79, 1.09 4.13 C 4.91 11.04, 13.45 17.16, 21.7 18.9 C 22.94 19.16, 23.18 19.16, 51.39 19.27 C 76.07 19.36, 80.02 19.4, 81.32 19.57 C 89.89 20.69, 96.2 24.68, 99.38 31.01 C 103.19 38.56, 102.53 50.1, 97.91 57.07 C 94.66 61.96, 89.68 64.99, 83.26 66 C 82.81 66.07, 70.18 66.83, 55.2 67.69 C 24.82 69.43, 27.03 69.23, 24.18 70.4 C 19.9 72.15, 14.84 75.7, 10.65 79.89 C 4.86 85.68, 1.3 91.91, 0.25 98.13 C 0.12 98.85, 0.08 103.13, 0.04 116.66 L 0 134.26 9.5 134.26 L 19 134.26 19.05 119.41 C 19.1 103.27, 19.08 103.82, 19.82 101.04 C 21.79 93.65, 27.86 88.75, 36.45 87.63 C 37.23 87.53, 39.41 87.5, 43.57 87.53 C 50.12 87.59, 50.75 87.65, 53.22 88.45 C 56.61 89.56, 59.67 91.86, 62.02 95.07 C 62.52 95.76, 69.35 103.85, 77.2 113.07 C 85.04 122.28, 91.63 130.04, 91.85 130.32 C 92.07 130.59, 92.5 131.34, 92.82 131.97 C 93.52 133.35, 94.11 133.93, 95.06 134.13 C 95.5 134.23, 98.97 134.26, 106.36 134.23 L 117.01 134.19 100.82 113.07 C 91.91 101.45, 84.52 91.78, 84.39 91.57 C 83.36 89.89, 83.66 87.53, 85.09 86 C 85.79 85.25, 86.36 84.94, 88.07 84.38 C 96.18 81.72, 104.15 76.62, 109.97 70.36 C 120.59 58.93, 124.06 44.32, 119.44 30.43 C 114.59 15.81, 101.93 4.02, 87.64 0.83 C 83.93 0.01, 88.09 0.08, 41.85 0.04 L 0.01 0 0.01 0.81 Z\";\n\nfunction RemocnLogo({ fontSize, color }: { fontSize: number; color: string }) {\n return (\n <div\n style={{\n display: \"flex\",\n alignItems: \"baseline\",\n color,\n fontFamily: manrope.fontFamily,\n fontWeight: 600,\n fontSize,\n letterSpacing: \"-0.025em\",\n lineHeight: 1,\n }}\n >\n <svg\n viewBox=\"0 0 124.06 134.26\"\n style={{ height: \"0.76em\", width: \"auto\" }}\n aria-hidden\n >\n <path fill=\"currentColor\" d={REMOCN_R_PATH} />\n </svg>\n <span style={{ marginLeft: \"0.04em\" }}>emocn</span>\n </div>\n );\n}\n\nexport interface FigureToLabelProps {\n value?: string;\n word?: string;\n eyebrow?: string;\n accent?: string;\n ink?: string;\n background?: string;\n theme?: \"dark\" | \"light\";\n ground?: GshPresetId;\n groundParams?: Partial<GradientParams>;\n}\n\nconst LIGHT_GROUND: Partial<GradientParams> = {\n kind: \"mist\",\n background: \"#eef1ec\",\n colors: [\"#d2f3e3\", \"#93d6bb\", \"#e3ecdf\", \"#eef1ec\"],\n speed: 0.8,\n loopSeconds: 14,\n scale: 0.85,\n warp: 0.45,\n blur: 0.7,\n grain: 0.2,\n seed: 31,\n};\n\nconst THEMES = {\n dark: {\n ink: \"#eef6f2\",\n dim: \"rgba(238,246,242,0.58)\",\n accent: \"#7cf0c2\",\n ground: undefined as GshPresetId | undefined,\n groundParams: {\n kind: \"mist\",\n colors: [\"#dcfff4\", \"#55e6bd\", \"#0e9a7e\", \"#04332b\"],\n background: \"#010605\",\n speed: 0.8,\n loopSeconds: 16,\n scale: 0.85,\n warp: 0.45,\n blur: 0.7,\n grain: 0.22,\n seed: 27,\n } as Partial<GradientParams> | undefined,\n groundOffset: 3,\n scrim: \"1,6,5\",\n scrimAlpha: 0.5,\n card: \"#f3f1ec\",\n cardInk: \"#18201d\",\n cardFaint: \"rgba(24,32,29,0.22)\",\n cardShadow:\n \"inset 0 1px 0 rgba(255,255,255,0.9), 0 1px 2px rgba(0,8,6,0.35), 0 16px 36px rgba(0,8,6,0.4), 0 60px 120px rgba(0,8,6,0.5)\",\n line: \"rgba(238,246,242,0.35)\",\n },\n light: {\n ink: \"#121a17\",\n dim: \"rgba(18,26,23,0.55)\",\n accent: \"#0f8a63\",\n ground: undefined as GshPresetId | undefined,\n groundParams: LIGHT_GROUND as Partial<GradientParams> | undefined,\n groundOffset: 2,\n scrim: \"238,241,236\",\n scrimAlpha: 0.45,\n card: \"#101815\",\n cardInk: \"#d9f7ea\",\n cardFaint: \"rgba(217,247,234,0.22)\",\n cardShadow:\n \"inset 0 1px 0 rgba(255,255,255,0.08), 0 1px 2px rgba(10,30,20,0.12), 0 16px 36px rgba(10,30,20,0.16), 0 60px 120px rgba(10,30,20,0.2)\",\n line: \"rgba(18,26,23,0.3)\",\n },\n};\n\nconst BEAT = {\n card: -3,\n dots: -8,\n dotsLen: 27,\n line: 9,\n note: 15,\n wave: 15,\n waveLen: 18,\n resolve: 33,\n resolveLen: 15,\n exit: 51,\n collapse: 54,\n type: 69,\n charStep: 2,\n logo: 75,\n caretOff: 117,\n};\n\nconst FONT_PX = 200;\nconst CELLS = 15;\nconst REVEAL = Easing.bezier(0.32, 0.72, 0, 1);\nconst WIPE = Easing.bezier(0.65, 0, 0.35, 1);\nconst EXIT = Easing.bezier(0.55, 0, 1, 0.45);\nconst COLOR = Easing.bezier(0.83, 0, 0.17, 1);\nconst HEAVY = { mass: 1, damping: 26, stiffness: 120 };\nconst CARD = { mass: 0.8, damping: 18, stiffness: 160 };\nconst CHIP = { mass: 0.5, damping: 12, stiffness: 200 };\nconst CLAMP = {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n} as const;\n\ninterface Dot {\n x: number;\n y: number;\n cov: number;\n}\n\ninterface Sampled {\n text: (s: string, weight: number) => number;\n dots: Dot[];\n boxEm: number;\n figEm: number;\n}\n\nfunction buildSampled(_version: number, value: string): Sampled {\n const mctx = document.createElement(\"canvas\").getContext(\"2d\");\n const cache: Record<string, number> = {};\n const text = (s: string, weight: number) => {\n const key = `${weight}|${s}`;\n if (cache[key] === undefined) {\n if (!mctx) return s.length * 0.55;\n mctx.font = `${weight} ${FONT_PX}px \"${onest.fontFamily}\"`;\n cache[key] = mctx.measureText(s).width / FONT_PX;\n }\n return cache[key];\n };\n const boxEm = 1.2;\n const figEm = text(value, 300);\n const cw = Math.ceil(figEm * FONT_PX) + 4;\n const ch = Math.ceil(boxEm * FONT_PX);\n const canvas = document.createElement(\"canvas\");\n canvas.width = cw;\n canvas.height = ch;\n const ctx = canvas.getContext(\"2d\", { willReadFrequently: true });\n const dots: Dot[] = [];\n if (ctx) {\n ctx.font = `300 ${FONT_PX}px \"${onest.fontFamily}\"`;\n const mt = ctx.measureText(value);\n const asc = mt.fontBoundingBoxAscent;\n const desc = mt.fontBoundingBoxDescent;\n const baseline = (ch - (asc + desc)) / 2 + asc;\n ctx.fillStyle = \"#000\";\n ctx.fillText(value, 0, baseline);\n const data = ctx.getImageData(0, 0, cw, ch).data;\n const cell = FONT_PX / CELLS;\n const cols = Math.ceil(cw / cell);\n const rows = Math.ceil(ch / cell);\n for (let gy = 0; gy < rows; gy++) {\n for (let gx = 0; gx < cols; gx++) {\n let sum = 0;\n let cnt = 0;\n for (let sy = 0; sy < 5; sy++) {\n for (let sx = 0; sx < 5; sx++) {\n const px = Math.floor(gx * cell + ((sx + 0.5) * cell) / 5);\n const py = Math.floor(gy * cell + ((sy + 0.5) * cell) / 5);\n if (px < cw && py < ch) {\n sum += data[(py * cw + px) * 4 + 3] / 255;\n cnt++;\n }\n }\n }\n const cov = cnt > 0 ? sum / cnt : 0;\n if (cov > 0.14) {\n dots.push({\n x: ((gx + 0.5) * cell) / FONT_PX,\n y: ((gy + 0.5) * cell) / FONT_PX,\n cov,\n });\n }\n }\n }\n }\n return { text, dots, boxEm, figEm };\n}\n\nfunction useSampled(value: string) {\n const [version, setVersion] = useState(0);\n const [handle] = useState(() => delayRender(\"figure-to-label: sampling\"));\n const released = useRef(false);\n useEffect(() => {\n let live = true;\n const bump = () => {\n if (live) setVersion((v) => v + 1);\n };\n document.fonts.addEventListener(\"loadingdone\", bump);\n Promise.all([\n onest.waitUntilDone(),\n manrope.waitUntilDone(),\n document.fonts.load(`300 100px \"${onest.fontFamily}\"`),\n document.fonts.load(`400 100px \"${onest.fontFamily}\"`),\n ])\n .catch(() => undefined)\n .then(() => {\n bump();\n if (!released.current) {\n released.current = true;\n continueRender(handle);\n }\n });\n return () => {\n live = false;\n document.fonts.removeEventListener(\"loadingdone\", bump);\n };\n }, [handle]);\n return useMemo(() => buildSampled(version, value), [version, value]);\n}\n\nexport function FigureToLabel({\n value = \"$6.4B\",\n word = \"valuation\",\n eyebrow = \"\",\n accent,\n ink,\n background,\n theme = \"dark\",\n ground,\n groundParams,\n}: FigureToLabelProps) {\n const frame = useCurrentFrame();\n const { width: W, height: H, fps, durationInFrames } = useVideoConfig();\n const c = THEMES[theme];\n const inkC = ink ?? c.ink;\n const hi = accent ?? c.accent;\n const preset = ground ?? (groundParams ? undefined : c.ground);\n const gParams = groundParams ?? (ground ? undefined : c.groundParams);\n const bg = background ?? gshParams(preset, gParams).background;\n const m = useSampled(value);\n const portrait = H > W * 1.1;\n\n let content: React.ReactNode = <div />;\n if (m) {\n const cx = W / 2;\n const cy = H / 2;\n const room = W * (portrait ? 0.84 : 0.86);\n\n const noteE = portrait ? W * 0.04 : H * 0.04;\n const noteW = noteE * 3.9 + noteE * 0.45 + m.text(word, 400) * noteE;\n const lineLen = portrait ? H * 0.06 : W * 0.06;\n\n const Fg = portrait\n ? Math.min(W * 0.3, (room * 0.86) / m.figEm)\n : Math.min(H * 0.34, (room - lineLen - noteW - H * 0.1) / m.figEm);\n const figW = m.figEm * Fg;\n const boxH = m.boxEm * Fg;\n const padX = Fg * 0.16;\n const rulerH = Fg * 0.2;\n const cardW = figW + padX * 2;\n const cardH = boxH + rulerH;\n const groupW = portrait ? cardW : cardW + lineLen + noteW;\n const cardX = portrait ? cx - cardW / 2 : cx - groupW / 2;\n const cardY = portrait\n ? cy - (cardH + lineLen + noteE) / 2\n : cy - cardH / 2;\n\n const sp = m.text(\" \", 300);\n const wordEm = m.text(word, 300);\n const Fi = portrait\n ? Math.min(W * 0.26, (W * 0.84) / Math.max(m.figEm, wordEm))\n : Math.min(H * 0.18, (W * 0.8) / (m.figEm + sp + wordEm));\n const lineW = (m.figEm + sp + wordEm) * Fi;\n const finX = portrait ? cx - (m.figEm * Fi) / 2 : cx - lineW / 2;\n const finY = portrait\n ? cy - m.boxEm * Fi * 0.92 + Fi * 0.18\n : cy - (m.boxEm * Fi) / 2 + Fi * 0.18;\n const wordY = portrait ? finY + Fi * 1.02 : finY;\n\n const cardIn = spring({ frame: frame - BEAT.card, fps, config: CARD });\n const col = spring({ frame: frame - BEAT.collapse, fps, config: HEAVY });\n const colPrev = spring({\n frame: frame - 1 - BEAT.collapse,\n fps,\n config: HEAVY,\n });\n const colE = Math.min(1, Math.max(0, col));\n const startX = cardX + padX;\n const startY = cardY;\n const figX = startX + (finX - startX) * col;\n const figY = startY + (finY - startY) * col;\n const figS = 1 + (Fi / Fg - 1) * col;\n const moveBlur = Math.min(6, Math.abs(col - colPrev) * 60);\n\n const colorP = interpolate(\n frame,\n [BEAT.collapse + 4, BEAT.collapse + 18],\n [0, 1],\n { ...CLAMP, easing: COLOR },\n );\n const figColor = `color-mix(in oklab, ${hi} ${(colorP * 100).toFixed(1)}%, ${c.cardInk})`;\n\n const cardScaleX =\n (1 - colE) * (0.94 + 0.06 * cardIn) + colE * ((figW * figS) / cardW);\n const cardOpacity =\n Math.min(1, Math.max(0, cardIn)) *\n (1 -\n interpolate(frame, [BEAT.collapse + 2, BEAT.collapse + 14], [0, 1], {\n ...CLAMP,\n easing: EXIT,\n }));\n const cardCx =\n cardX +\n cardW / 2 +\n (finX + (figW * Fi) / Fg / 2 - (cardX + cardW / 2)) * col;\n const cardCy =\n cardY +\n cardH / 2 +\n (finY + (boxH * Fi) / Fg / 2 - (cardY + cardH / 2)) * col;\n const cardH2 = cardH * (1 - colE) + boxH * figS * colE;\n const cardIntro = (1 - Math.min(1, Math.max(0, cardIn))) * H * 0.03;\n\n const card = (\n <div\n style={{\n position: \"absolute\",\n left: cardCx - cardW / 2,\n top: cardCy - cardH2 / 2 + cardIntro,\n width: cardW,\n height: cardH2,\n transform: `scaleX(${cardScaleX.toFixed(4)})`,\n borderRadius: Fg * 0.07,\n background: c.card,\n boxShadow: c.cardShadow,\n opacity: cardOpacity,\n overflow: \"hidden\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: padX,\n right: padX,\n bottom: rulerH * 0.36,\n height: rulerH * 0.3,\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"flex-end\",\n }}\n >\n {Array.from({ length: 25 }).map((_, i) => {\n const tick = interpolate(\n frame,\n [BEAT.line + i * 0.6, BEAT.line + 9 + i * 0.6],\n [0, 1],\n { ...CLAMP, easing: REVEAL },\n );\n return (\n <div\n key={`k${i}`}\n style={{\n width: Math.max(1, Fg * 0.006),\n height: `${(i % 6 === 0 ? 100 : 45) * tick}%`,\n background: c.cardFaint,\n }}\n />\n );\n })}\n </div>\n </div>\n );\n\n const cell = 1 / CELLS;\n const waveX = interpolate(\n frame,\n [BEAT.wave, BEAT.wave + BEAT.waveLen],\n [-0.3, m.figEm + 0.3],\n { ...CLAMP, easing: WIPE },\n );\n const resolveEdge = interpolate(\n frame,\n [BEAT.resolve, BEAT.resolve + BEAT.resolveLen],\n [-0.25, m.figEm + 0.25],\n { ...CLAMP, easing: WIPE },\n );\n const soft = 0.35;\n const dotNodes = m.dots.map((d, i) => {\n const at = BEAT.dots + random(`ftl-${i}`) * (BEAT.dotsLen - 8);\n const pop = spring({ frame: frame - at, fps, config: CHIP });\n const wave = Math.exp(-(((d.x - waveX) / 0.22) ** 2));\n const res = Math.max(\n 0,\n Math.min(1, (resolveEdge - d.x + soft * 0.5) / soft),\n );\n const baseR = cell * 0.5 * (0.42 + 0.5 * Math.sqrt(d.cov));\n const r = baseR * Math.max(0, pop) * (1 + 0.45 * wave) * (1 + 0.5 * res);\n return (\n <circle\n key={`d${i}`}\n cx={d.x}\n cy={d.y}\n r={Math.max(0, r)}\n opacity={1 - res}\n />\n );\n });\n const solidMask = `linear-gradient(90deg, #000 ${((resolveEdge - soft) / m.figEm) * 100}%, transparent ${(resolveEdge / m.figEm) * 100}%)`;\n\n const figure = (\n <div\n style={{\n position: \"absolute\",\n left: figX,\n top: figY,\n width: figW,\n height: boxH,\n transformOrigin: \"0 0\",\n transform: `scale(${figS.toFixed(5)})`,\n filter: moveBlur > 0.1 ? `blur(${moveBlur.toFixed(2)}px)` : undefined,\n }}\n >\n <svg\n viewBox={`0 0 ${m.figEm.toFixed(4)} ${m.boxEm}`}\n width={figW}\n height={boxH}\n style={{ position: \"absolute\", left: 0, top: 0, overflow: \"visible\" }}\n aria-hidden\n >\n <g fill={c.cardInk}>{dotNodes}</g>\n </svg>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n width: figW * 1.1,\n height: boxH,\n lineHeight: `${boxH}px`,\n fontFamily: onest.fontFamily,\n fontWeight: 300,\n fontSize: Fg,\n color: figColor,\n whiteSpace: \"pre\",\n WebkitMaskImage: solidMask,\n maskImage: solidMask,\n }}\n >\n {value}\n </div>\n </div>\n );\n\n const exitP = interpolate(frame, [BEAT.exit, BEAT.exit + 8], [0, 1], {\n ...CLAMP,\n easing: EXIT,\n });\n const lineP = interpolate(frame, [BEAT.line, BEAT.line + 12], [0, 1], {\n ...CLAMP,\n easing: WIPE,\n });\n const noteIn = interpolate(frame, [BEAT.note, BEAT.note + 12], [0, 1], {\n ...CLAMP,\n easing: REVEAL,\n });\n const noteLogo = spring({ frame: frame - BEAT.note, fps, config: CHIP });\n const anchorX = portrait ? cx : cardX + cardW;\n const anchorY = portrait ? cardY + cardH : cy;\n const outboard = (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n opacity: 1 - exitP,\n transform: portrait\n ? `translateY(${(exitP * noteE * 2).toFixed(2)}px)`\n : `translateX(${(exitP * noteE * 2).toFixed(2)}px)`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: portrait ? anchorX - 0.5 : anchorX,\n top: portrait ? anchorY : anchorY - 0.5,\n width: portrait ? 1 : lineLen * 0.86,\n height: portrait ? lineLen * 0.8 : 1,\n background: c.line,\n transformOrigin: portrait ? \"50% 0\" : \"0 50%\",\n transform: portrait\n ? `scaleY(${lineP.toFixed(4)})`\n : `scaleX(${lineP.toFixed(4)})`,\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: portrait ? cx - noteW / 2 : anchorX + lineLen,\n top: portrait ? anchorY + lineLen : anchorY - noteE / 2,\n height: noteE,\n display: \"flex\",\n alignItems: \"center\",\n gap: noteE * 0.45,\n }}\n >\n <div\n style={{\n opacity: Math.min(1, Math.max(0, noteLogo)),\n transform: `scale(${(0.7 + 0.3 * noteLogo).toFixed(4)})`,\n }}\n >\n <RemocnLogo fontSize={noteE} color={inkC} />\n </div>\n <div\n style={{\n fontFamily: onest.fontFamily,\n fontWeight: 400,\n fontSize: noteE,\n lineHeight: 1,\n color: c.dim,\n whiteSpace: \"pre\",\n clipPath: `inset(-20% ${((1 - noteIn) * 100).toFixed(2)}% -20% 0)`,\n }}\n >\n {word}\n </div>\n </div>\n </div>\n );\n\n const nChars = Array.from(word).length;\n const typedN = Math.max(\n 0,\n Math.min(nChars, Math.floor((frame - BEAT.type) / BEAT.charStep) + 1),\n );\n const typedStr = Array.from(word).slice(0, typedN).join(\"\");\n const typedPx = m.text(typedStr, 300) * Fi;\n const wordX = portrait\n ? cx - (wordEm * Fi) / 2\n : finX + (m.figEm + sp) * Fi;\n const caretVisible =\n frame >= BEAT.type - 4 &&\n frame < BEAT.caretOff &&\n (frame < BEAT.type + nChars * BEAT.charStep + 2 ||\n Math.floor(frame / 9) % 2 === 0);\n const lineTop = finY + (m.boxEm * Fi - Fi) / 2;\n const wordTop = wordY + (m.boxEm * Fi - Fi) / 2;\n\n const typed = (\n <>\n <div\n style={{\n position: \"absolute\",\n left: wordX,\n top: wordY,\n height: m.boxEm * Fi,\n lineHeight: `${m.boxEm * Fi}px`,\n fontFamily: onest.fontFamily,\n fontWeight: 300,\n fontSize: Fi,\n color: inkC,\n whiteSpace: \"pre\",\n }}\n >\n {typedStr}\n </div>\n <div\n style={{\n position: \"absolute\",\n left: wordX + typedPx + Fi * 0.05,\n top: wordTop + Fi * 0.08,\n width: Math.max(2, Fi * 0.035),\n height: Fi * 0.94,\n borderRadius: Fi * 0.02,\n background: hi,\n opacity: caretVisible ? 1 : 0,\n }}\n />\n </>\n );\n\n const logoP = spring({ frame: frame - BEAT.logo, fps, config: CHIP });\n const logoE = Math.min(1, Math.max(0, logoP));\n const eyeE = Fi * 0.32;\n const eyeIn = interpolate(frame, [BEAT.logo + 3, BEAT.logo + 15], [0, 1], {\n ...CLAMP,\n easing: REVEAL,\n });\n const eyeW =\n eyeE * 3.9 + (eyebrow ? eyeE * 0.45 + m.text(eyebrow, 400) * eyeE : 0);\n const eyebrowNode = (\n <div\n style={{\n position: \"absolute\",\n left: cx - eyeW / 2,\n top: lineTop - eyeE * 2.1,\n height: eyeE,\n display: \"flex\",\n alignItems: \"center\",\n gap: eyeE * 0.45,\n }}\n >\n <div\n style={{\n opacity: logoE,\n transform: `translateY(${((1 - logoP) * eyeE).toFixed(2)}px) scale(${(0.8 + 0.2 * logoP).toFixed(4)})`,\n }}\n >\n <RemocnLogo fontSize={eyeE} color={inkC} />\n </div>\n {eyebrow ? (\n <div\n style={{\n fontFamily: onest.fontFamily,\n fontWeight: 400,\n fontSize: eyeE,\n lineHeight: 1,\n color: c.dim,\n whiteSpace: \"pre\",\n clipPath: `inset(-20% ${((1 - eyeIn) * 100).toFixed(2)}% -20% 0)`,\n }}\n >\n {eyebrow}\n </div>\n ) : null}\n </div>\n );\n\n const push = interpolate(frame, [0, durationInFrames], [1, 1.035], CLAMP);\n content = (\n <AbsoluteFill\n style={{\n transform: `scale(${push.toFixed(5)})`,\n }}\n >\n {card}\n {outboard}\n {figure}\n {typed}\n {eyebrowNode}\n </AbsoluteFill>\n );\n }\n\n return (\n <AbsoluteFill style={{ background: bg, overflow: \"hidden\" }}>\n <GshGround\n preset={preset}\n params={gParams}\n timeOffset={c.groundOffset}\n timeScale={0.5}\n />\n <AbsoluteFill\n style={{\n background: `radial-gradient(${portrait ? \"95% 55%\" : \"70% 75%\"} at 50% 50%, rgba(${c.scrim},${c.scrimAlpha}) 0%, rgba(${c.scrim},${(c.scrimAlpha * 0.35).toFixed(3)}) 100%)`,\n }}\n />\n {content}\n </AbsoluteFill>\n );\n}\n\nexport default FigureToLabel;\n",
"type": "registry:component",
"target": "components/remocn/figure-to-label.tsx"
}
],
"type": "registry:component"
}