Prompt to App
A prompt types into a chat and a site preview builds as files are written.
Source
components/kuchi/prompt-to-app.tsx
1"use client";23import { loadFont } from "@remotion/google-fonts/Geist";4import { loadFont as loadMono } from "@remotion/google-fonts/GeistMono";5import { loadFont as loadSerif } from "@remotion/google-fonts/InstrumentSerif";6import type React from "react";7import { useId } from "react";8import {9 AbsoluteFill,10 Easing,11 interpolate,12 spring,13 useCurrentFrame,14 useVideoConfig,15} from "remotion";16import type { GradientParams } from "@/lib/kuchi/gsh/gradient-engine";17import { GshGround } from "@/lib/kuchi/gsh/gsh-ground";18import type { GshPresetId } from "@/lib/kuchi/gsh/presets";1920const geist = loadFont("normal", {21 weights: ["300", "400"],22 subsets: ["latin"],23});24const { fontFamily: serif } = loadSerif("normal", {25 weights: ["400"],26 subsets: ["latin"],27});28const { fontFamily: mono } = loadMono("normal", {29 weights: ["400"],30 subsets: ["latin"],31});3233export interface AppPour {34 name: string;35 origin: string;36 price: string;37 tone: [string, string];38}3940export interface PromptToAppProps {41 prompt?: string;42 plan?: string;43 files?: string[];44 doneMessage?: string;45 projectName?: string;46 deployUrl?: string;47 siteName?: string;48 siteEyebrow?: string;49 siteHeadline?: string;50 siteBody?: string;51 siteLinks?: string[];52 pours?: AppPour[];53 /** Heading of the empty chat before the prompt is sent. */54 emptyTitle?: string;55 /** Booking button in the generated site's nav and hero. */56 siteCta?: string;57 /** Heading over the generated site's pour cards. */58 poursTitle?: string;59 children?: React.ReactNode;60 /** Replaces the acme mark in the chat header and beside the replies. */61 logo?: React.ReactNode;62 theme?: "light" | "dark";63 accent?: string;64 /** Text color of the chat and preview chrome; overrides the theme. */65 ink?: string;66 /** Solid fill in place of the gradient ground; "transparent" drops it. */67 background?: string;68 /** Typeface for the copy. Load it yourself; Geist by default. */69 fontFamily?: string;70 /** Size of the windows, around the frame's center. */71 scale?: number;72 /** Frames to hold the first frame before anything moves. */73 delay?: number;74 speed?: number;75 ground?: GshPresetId;76 groundParams?: Partial<GradientParams>;77}7879const DEFAULT_POURS: AppPour[] = [80 {81 name: "Skin-contact Riesling",82 origin: "Pfalz, DE · 2022",83 price: "14 / 58",84 tone: ["#E9B35A", "#C9792E"],85 },86 {87 name: "Carbonic Gamay",88 origin: "Beaujolais, FR · 2023",89 price: "13 / 52",90 tone: ["#9A2C3E", "#5E1424"],91 },92 {93 name: "Pét-nat Rosé",94 origin: "Sonoma, CA · 2023",95 price: "15 / 60",96 tone: ["#F2B8A6", "#D97C6B"],97 },98];99100const PVW = 784;101const PV_BAR = 52;102const DEPLOY = { x: PVW - 12 - 96, y: 11, w: 96, h: 30 };103104interface Layout {105 w: number;106 h: number;107 chat: { x: number; y: number; w: number; h: number; s: number };108 pv: { x: number; y: number; s: number };109 pvH: number;110 cursorFrom: { x: number; y: number };111}112113const LAYOUT_WIDE: Layout = {114 w: 1280,115 h: 720,116 chat: { x: 72, y: 75, w: 408, h: 620, s: 0.92 },117 pv: { x: 487, y: 75, s: 0.92 },118 pvH: 620,119 cursorFrom: { x: 330, y: 610 },120};121122const LAYOUT_TALL: Layout = {123 w: 1080,124 h: 1920,125 chat: { x: 82, y: 150, w: 560, h: 540, s: 1.6375 },126 pv: { x: 82, y: 1080, s: 1.17 },127 pvH: 600,128 cursorFrom: { x: 620, y: 930 },129};130131const SITE = {132 bg: "#FBF7F1",133 ink: "#2A211C",134 muted: "#7A6A5E",135 line: "rgba(42,33,28,0.1)",136 brand: "#B4532A",137};138139const clampX = { extrapolateLeft: "clamp", extrapolateRight: "clamp" } as const;140const enterE = Easing.bezier(0.22, 1, 0.36, 1);141const exitE = Easing.bezier(0.55, 0, 1, 0.45);142const camE = Easing.bezier(0.87, 0, 0.13, 1);143const tween = (f: number, a: number, b: number, easing = enterE) =>144 interpolate(f, [a, b], [0, 1], { ...clampX, easing });145146type SpringCfg = { mass?: number; damping: number; stiffness?: number };147const HEAVY: SpringCfg = { mass: 1, damping: 26, stiffness: 120 };148const CARD: SpringCfg = { mass: 0.8, damping: 18, stiffness: 160 };149const CHIP: SpringCfg = { mass: 0.5, damping: 12, stiffness: 200 };150const MORPH: SpringCfg = { damping: 200 };151152153function KuchiR({ height, color }: { height: number; color: string }) {154 return (155 <svg156 viewBox="0 0 124.06 134.26"157 height={height}158 width={(height * 124.06) / 134.26}159 style={{ display: "block", flexShrink: 0 }}160 aria-hidden161 >162 <circle cx="62.03" cy="67.13" r="56" fill={color} />163 </svg>164 );165}166167function withAlpha(hex: string, alpha: number) {168 const h = hex.replace("#", "");169 const full = h.length === 3 ? h.replace(/./g, (c) => c + c) : h.slice(0, 6);170 if (!/^[0-9a-fA-F]{6}$/.test(full)) return hex;171 const n = Number.parseInt(full, 16);172 return `rgba(${(n >> 16) & 255}, ${(n >> 8) & 255}, ${n & 255}, ${alpha})`;173}174175const T = {176 type: 12,177 cps: 2.3,178};179180function timeline(promptLen: number, planWords: number) {181 const typeEnd = T.type + promptLen / T.cps;182 const send = typeEnd + 6;183 const think = send + 6;184 const planAt = think + 16;185 const planEnd = planAt + planWords * 1.3;186 const file = (i: number) => {187 const s = planEnd + 4 + i * 24;188 return { start: s, done: s + 20 };189 };190 const doneMsg = file(3).done + 4;191 const cursorIn = doneMsg + 4;192 const deployClick = cursorIn + 22;193 const deployed = deployClick + 24;194 return {195 typeEnd,196 send,197 think,198 planAt,199 planEnd,200 file,201 doneMsg,202 cursorIn,203 deployClick,204 deployed,205 end: deployed + 40,206 };207}208209export function promptToAppDuration(210 prompt = DEFAULT_PROMPT,211 plan = DEFAULT_PLAN,212) {213 return Math.ceil(timeline(prompt.length, plan.split(" ").length).end);214}215216const DEFAULT_PROMPT =217 "Build a landing page for Fernway, a neighborhood wine bar. Warm and editorial, with tonight’s pours and a booking button.";218const DEFAULT_PLAN =219 "I’ll build a one-page site for Fernway: a sticky nav, an editorial hero with a booking CTA, and a card grid for tonight’s pours.";220221interface Pal {222 base: string;223 scrim: string;224 win: string;225 border: string;226 line: string;227 text: string;228 muted: string;229 faint: string;230 bubble: string;231 field: string;232 well: string;233 green: string;234 shadow: string;235 pop: string;236 popShadow: string;237 dark: boolean;238}239240function palette(theme: "light" | "dark"): Pal {241 return theme === "dark"242 ? {243 base: "#0B0907",244 scrim: "rgba(8,6,5,0.28)",245 win: "#111113",246 border: "rgba(255,255,255,0.1)",247 line: "rgba(255,255,255,0.07)",248 text: "#EDEDEF",249 muted: "#A4A5AB",250 faint: "#707178",251 bubble: "#1C1C1F",252 field: "#161618",253 well: "#1A1A1D",254 green: "#3DD68C",255 shadow:256 "inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(255,255,255,0.08), 0 30px 80px -20px rgba(0,0,0,0.7)",257 pop: "#1A1A1D",258 popShadow:259 "inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(255,255,255,0.1), 0 18px 40px -8px rgba(0,0,0,0.6)",260 dark: true,261 }262 : {263 base: "#EEF0F5",264 scrim: "rgba(246,246,248,0.22)",265 win: "#FFFFFF",266 border: "rgba(17,19,24,0.1)",267 line: "rgba(17,19,24,0.07)",268 text: "#18181B",269 muted: "#5F6168",270 faint: "#8E9096",271 bubble: "#F3F3F5",272 field: "#FFFFFF",273 well: "#F3F3F5",274 green: "#16A34A",275 shadow:276 "0 0 0 1px rgba(17,19,24,0.06), 0 2px 4px rgba(17,19,24,0.04), 0 28px 64px -18px rgba(30,34,60,0.28)",277 pop: "#FFFFFF",278 popShadow:279 "0 0 0 1px rgba(17,19,24,0.08), 0 4px 8px rgba(17,19,24,0.04), 0 18px 40px -8px rgba(17,19,24,0.2)",280 dark: false,281 };282}283284const ICONS = {285 arrowUp: "M12 19V5M5.5 11.5 12 5l6.5 6.5",286 plus: "M12 5v14M5 12h14",287 paperclip:288 "M20.5 11.5 12.6 19.4a5 5 0 0 1-7.1-7.1l8.3-8.3a3.3 3.3 0 0 1 4.7 4.7l-8.3 8.3a1.7 1.7 0 0 1-2.4-2.4l7.6-7.6",289 file: "M14 3H6.5A1.5 1.5 0 0 0 5 4.5v15A1.5 1.5 0 0 0 6.5 21h11a1.5 1.5 0 0 0 1.5-1.5V8zM14 3v5h5",290 check: "M20 6.5 9.5 17 4 11.5",291 refresh: "M20 11a8 8 0 1 0-2.3 5.7M20 4.5V11h-6.5",292 monitor: "M3.5 5h17v11h-17zM8.5 20h7M12 16v4",293 phoneDev:294 "M8 3h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zM11 18h2",295 external:296 "M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5",297 lock: "M7 11V8a5 5 0 0 1 10 0v3M5.5 11h13v9.5h-13z",298 chevDown: "M6 9l6 6 6-6",299 chevRight: "M9 6l6 6-6 6",300 rocket:301 "M5 15c-1.5 1.3-2 5-2 5s3.7-.5 5-2c.7-.8.7-2.1-.1-2.9a2.2 2.2 0 0 0-2.9-.1zM12 15l-3-3a22 22 0 0 1 2-4A12.9 12.9 0 0 1 22 2c0 2.7-.8 7.5-6 11a22.4 22.4 0 0 1-4 2zM9 12H4s.6-3 2-4c1.6-1.1 5 0 5 0M12 15v5s3-.6 4-2c1.1-1.6 0-5 0-5",302 share: "M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7M16 6l-4-4-4 4M12 2v13",303 code: "M16 18l6-6-6-6M8 6l-6 6 6 6",304 eye: "M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",305 arrowRight: "M5 12h14M13 6l6 6-6 6",306} as const;307type IconName = keyof typeof ICONS;308309function Icon({310 name,311 color,312 size = 16,313 stroke = 1.75,314}: {315 name: IconName;316 color: string;317 size?: number;318 stroke?: number;319}) {320 return (321 <svg322 width={size}323 height={size}324 viewBox="0 0 24 24"325 style={{ flexShrink: 0, display: "block" }}326 >327 <path328 d={ICONS[name]}329 fill="none"330 stroke={color}331 strokeWidth={stroke}332 strokeLinecap="round"333 strokeLinejoin="round"334 />335 </svg>336 );337}338339function Spinner({340 color,341 size,342 frame,343}: {344 color: string;345 size: number;346 frame: number;347}) {348 return (349 <svg350 width={size}351 height={size}352 viewBox="0 0 24 24"353 style={{ display: "block", transform: `rotate(${frame * 22}deg)` }}354 >355 <circle356 cx={12}357 cy={12}358 r={9}359 fill="none"360 stroke={color}361 strokeOpacity={0.2}362 strokeWidth={2.5}363 />364 <path365 d="M12 3a9 9 0 0 1 9 9"366 fill="none"367 stroke={color}368 strokeWidth={2.5}369 strokeLinecap="round"370 />371 </svg>372 );373}374375function Cursor({ x, y, press }: { x: number; y: number; press: number }) {376 return (377 <svg378 width={22}379 height={26}380 viewBox="0 0 20 24"381 style={{382 position: "absolute",383 left: x - 2,384 top: y - 2,385 transformOrigin: "2px 2px",386 transform: `scale(${1 - 0.12 * press})`,387 filter: "drop-shadow(0 2px 3px rgba(0,0,0,0.28))",388 overflow: "visible",389 zIndex: 5,390 }}391 >392 <path393 d="M2 2 L2 19.5 L6.6 15.4 L9.8 22.4 L12.9 21 L9.8 14.2 L16 14.2 Z"394 fill="#FFFFFF"395 stroke="#16171A"396 strokeWidth={1.1}397 strokeLinejoin="round"398 />399 </svg>400 );401}402403function arc(404 a: { x: number; y: number },405 b: { x: number; y: number },406 p: number,407) {408 const dx = b.x - a.x;409 const dy = b.y - a.y;410 const d = Math.hypot(dx, dy) || 1;411 const lift = Math.sin(p * Math.PI) * Math.min(40, d * 0.12);412 return {413 x: a.x + dx * p + (-dy / d) * lift,414 y: a.y + dy * p + (dx / d) * lift,415 };416}417418function Grow({ p, children }: { p: number; children: React.ReactNode }) {419 return (420 <div style={{ display: "grid", gridTemplateRows: `${p}fr` }}>421 <div style={{ minHeight: 0, overflow: "hidden" }}>{children}</div>422 </div>423 );424}425426function Skeleton({427 rows,428 pal,429}: {430 rows: [number, number][];431 pal: { line: string };432}) {433 return (434 <div style={{ display: "flex", flexDirection: "column", gap: 12 }}>435 {rows.map(([w, h], i) => (436 <div437 key={i}438 style={{439 width: `${w}%`,440 height: h,441 borderRadius: 5,442 background: pal.line,443 }}444 />445 ))}446 </div>447 );448}449450function Section({451 start,452 done,453 frame,454 label,455 accent,456 fontFamily,457 skeleton,458 children,459 height,460}: {461 start: number;462 done: number;463 frame: number;464 label: string;465 accent: string;466 fontFamily: string;467 skeleton: React.ReactNode;468 children: React.ReactNode;469 height: number;470}) {471 const shown = tween(frame, start - 2, start + 5);472 const real = tween(frame, start + 8, start + 15);473 const edit =474 tween(frame, start, start + 5) * (1 - tween(frame, done + 2, done + 9));475 if (shown <= 0) return <div style={{ height }} />;476 return (477 <div style={{ position: "relative", height }}>478 <div479 style={{480 position: "absolute",481 inset: 0,482 opacity: shown * (1 - tween(frame, start + 8, start + 11)),483 }}484 >485 {skeleton}486 </div>487 <div488 style={{489 position: "absolute",490 inset: 0,491 opacity: real,492 transform: `translateY(${(1 - real) * 6}px)`,493 }}494 >495 {children}496 </div>497 {edit > 0 ? (498 <>499 <div500 style={{501 position: "absolute",502 inset: 3,503 borderRadius: 6,504 boxShadow: `inset 0 0 0 1.5px ${withAlpha(accent, 0.85 * edit)}`,505 pointerEvents: "none",506 }}507 />508 <div509 style={{510 position: "absolute",511 left: 3,512 top: 3,513 transform: `translateY(${(1 - edit) * 2}px)`,514 opacity: edit,515 fontFamily,516 fontSize: 11,517 fontWeight: 400,518 color: "#fff",519 background: accent,520 borderRadius: "6px 0 6px 0",521 padding: "2px 7px",522 }}523 >524 {label}525 </div>526 </>527 ) : null}528 </div>529 );530}531532function SitePhoto({ id }: { id: string }) {533 return (534 <svg535 width="100%"536 height="100%"537 viewBox="0 0 260 216"538 preserveAspectRatio="xMidYMid slice"539 style={{ display: "block" }}540 >541 <defs>542 <linearGradient id={`${id}sky`} x1="0" y1="0" x2="0" y2="1">543 <stop offset="0" stopColor="#5B3A2E" />544 <stop offset="0.55" stopColor="#8E5A3C" />545 <stop offset="1" stopColor="#C68A55" />546 </linearGradient>547 <linearGradient id={`${id}table`} x1="0" y1="0" x2="0" y2="1">548 <stop offset="0" stopColor="#6B4128" />549 <stop offset="1" stopColor="#3E2416" />550 </linearGradient>551 <linearGradient id={`${id}wine`} x1="0" y1="0" x2="0" y2="1">552 <stop offset="0" stopColor="#8E2236" />553 <stop offset="1" stopColor="#4E0E1C" />554 </linearGradient>555 </defs>556 <rect width="260" height="216" fill={`url(#${id}sky)`} />557 <rect558 x="22"559 y="18"560 width="70"561 height="96"562 rx="3"563 fill="#F3C98B"564 opacity="0.18"565 />566 <rect567 x="100"568 y="18"569 width="70"570 height="96"571 rx="3"572 fill="#F3C98B"573 opacity="0.12"574 />575 <rect x="0" y="150" width="260" height="66" fill={`url(#${id}table)`} />576 <rect x="0" y="148" width="260" height="3" fill="#2A160D" opacity="0.5" />577 <path578 d="M170 68h12v22c8 6 11 12 11 22v40h-34v-40c0-10 3-16 11-22z"579 fill="#1F2A1E"580 />581 <rect x="161" y="110" width="30" height="24" rx="2" fill="#EDE2CC" />582 <rect x="166" y="117" width="20" height="2.5" rx="1" fill="#8E5A3C" />583 <rect x="166" y="123" width="14" height="2" rx="1" fill="#B9A78A" />584 <path585 d="M96 96h34c0 22-6 34-17 36-11-2-17-14-17-36z"586 fill="#FFFFFF"587 opacity="0.22"588 />589 <path590 d="M98 112h30c-1 12-6 19-15 20-9-1-14-8-15-20z"591 fill={`url(#${id}wine)`}592 />593 <rect594 x="111.5"595 y="132"596 width="3"597 height="16"598 fill="#FFFFFF"599 opacity="0.3"600 />601 <ellipse602 cx="113"603 cy="150"604 rx="12"605 ry="2.5"606 fill="#FFFFFF"607 opacity="0.3"608 />609 <rect x="54" y="122" width="12" height="28" rx="2" fill="#F1E6D2" />610 <path d="M60 110c3 4 3 8 0 11-3-3-3-7 0-11z" fill="#FFD27A" />611 </svg>612 );613}614615function Site({616 frame,617 accent,618 file,619 siteName,620 siteEyebrow,621 siteHeadline,622 siteBody,623 siteLinks,624 pours,625 siteCta,626 poursTitle,627 fontFamily,628}: {629 frame: number;630 accent: string;631 file: (i: number) => { start: number; done: number };632 siteName: string;633 siteEyebrow: string;634 siteHeadline: string;635 siteBody: string;636 siteLinks: string[];637 pours: AppPour[];638 siteCta: string;639 poursTitle: string;640 fontFamily: string;641}) {642 const id = useId().replace(/[^a-zA-Z0-9_-]/g, "");643 const skel = { line: "rgba(42,33,28,0.08)" };644 const btn = (label: string, primary: boolean) => (645 <div646 style={{647 height: 34,648 padding: "0 14px",649 borderRadius: 8,650 display: "flex",651 alignItems: "center",652 gap: 6,653 fontSize: 13,654 fontWeight: 400,655 background: primary ? SITE.ink : "transparent",656 color: primary ? "#FBF7F1" : SITE.ink,657 boxShadow: primary ? "none" : `inset 0 0 0 1px ${SITE.line}`,658 }}659 >660 {label}661 </div>662 );663 return (664 <div665 style={{666 background: SITE.bg,667 height: "100%",668 fontFamily,669 color: SITE.ink,670 }}671 >672 <Section673 start={file(0).start}674 done={file(0).done}675 frame={frame}676 label="Nav"677 accent={accent}678 fontFamily={fontFamily}679 height={58}680 skeleton={681 <div682 style={{683 display: "flex",684 alignItems: "center",685 gap: 22,686 height: 58,687 padding: "0 32px",688 }}689 >690 <div691 style={{692 width: 84,693 height: 18,694 borderRadius: 5,695 background: skel.line,696 }}697 />698 {[38, 56, 44, 34].map((w) => (699 <div700 key={w}701 style={{702 width: w,703 height: 10,704 borderRadius: 5,705 background: skel.line,706 }}707 />708 ))}709 <div710 style={{711 marginLeft: "auto",712 width: 104,713 height: 34,714 borderRadius: 8,715 background: skel.line,716 }}717 />718 </div>719 }720 >721 <div722 style={{723 height: 58,724 display: "flex",725 alignItems: "center",726 padding: "0 32px",727 borderBottom: `1px solid ${SITE.line}`,728 }}729 >730 <div731 style={{732 fontFamily: serif,733 fontSize: 24,734 letterSpacing: "-0.01em",735 }}736 >737 {siteName}738 </div>739 <div740 style={{741 marginLeft: 36,742 display: "flex",743 gap: 22,744 fontSize: 13,745 color: SITE.muted,746 }}747 >748 {siteLinks.map((l) => (749 <span key={l}>{l}</span>750 ))}751 </div>752 <div style={{ marginLeft: "auto" }}>{btn(siteCta, true)}</div>753 </div>754 </Section>755756 <Section757 start={file(1).start}758 done={file(1).done}759 frame={frame}760 label="Hero"761 accent={accent}762 fontFamily={fontFamily}763 height={276}764 skeleton={765 <div style={{ display: "flex", gap: 32, padding: "32px 32px 0" }}>766 <div style={{ flex: 1 }}>767 <Skeleton768 rows={[769 [34, 10],770 [92, 36],771 [74, 36],772 [84, 10],773 [56, 10],774 [42, 34],775 ]}776 pal={skel}777 />778 </div>779 <div780 style={{781 width: 260,782 height: 216,783 borderRadius: 12,784 background: skel.line,785 }}786 />787 </div>788 }789 >790 <div style={{ display: "flex", gap: 32, padding: "28px 32px 0" }}>791 <div style={{ flex: 1, paddingTop: 4 }}>792 <div793 style={{794 fontSize: 11,795 fontWeight: 400,796 letterSpacing: "0.08em",797 textTransform: "uppercase",798 color: SITE.brand,799 }}800 >801 {siteEyebrow}802 </div>803 <div804 style={{805 fontFamily: serif,806 fontSize: 44,807 lineHeight: 1.02,808 letterSpacing: "-0.015em",809 marginTop: 12,810 textWrap: "balance",811 }}812 >813 {siteHeadline}814 </div>815 <div816 style={{817 fontSize: 14,818 lineHeight: 1.55,819 color: SITE.muted,820 marginTop: 14,821 maxWidth: 360,822 textWrap: "pretty",823 }}824 >825 {siteBody}826 </div>827 <div style={{ display: "flex", gap: 10, marginTop: 20 }}>828 {btn(siteCta, true)}829 {btn("See the menu", false)}830 </div>831 </div>832 <div833 style={{834 width: 260,835 height: 216,836 borderRadius: 12,837 overflow: "hidden",838 flexShrink: 0,839 boxShadow: "0 0 0 1px rgba(0,0,0,0.08)",840 }}841 >842 <SitePhoto id={id} />843 </div>844 </div>845 </Section>846847 <Section848 start={file(2).start}849 done={file(2).done}850 frame={frame}851 label="PourCards"852 accent={accent}853 fontFamily={fontFamily}854 height={196}855 skeleton={856 <div style={{ display: "flex", gap: 14, padding: "58px 32px 0" }}>857 {[0, 1, 2].map((i) => (858 <div859 key={i}860 style={{861 flex: 1,862 height: 140,863 borderRadius: 10,864 background: skel.line,865 }}866 />867 ))}868 </div>869 }870 >871 <div style={{ padding: "18px 32px 0" }}>872 <div style={{ display: "flex", alignItems: "baseline" }}>873 <div style={{ fontFamily: serif, fontSize: 24 }}>{poursTitle}</div>874 <div875 style={{ marginLeft: "auto", fontSize: 13, color: SITE.muted }}876 >877 Full wine list →878 </div>879 </div>880 <div style={{ display: "flex", gap: 14, marginTop: 12 }}>881 {pours.slice(0, 3).map((p, i) => {882 const a = tween(883 frame,884 file(2).start + 9 + i * 3,885 file(2).start + 17 + i * 3,886 );887 return (888 <div889 key={p.name}890 style={{891 flex: 1,892 borderRadius: 10,893 background: "#FFFFFF",894 boxShadow:895 "0 0 0 1px rgba(42,33,28,0.08), 0 1px 2px rgba(42,33,28,0.04)",896 padding: 8,897 opacity: a,898 transform: `translateY(${(1 - a) * 8}px)`,899 }}900 >901 <div902 style={{903 height: 64,904 borderRadius: 6,905 background: `linear-gradient(135deg, ${p.tone[0]}, ${p.tone[1]})`,906 position: "relative",907 overflow: "hidden",908 }}909 >910 <svg911 width={40}912 height={64}913 viewBox="0 0 40 64"914 style={{ position: "absolute", right: 16, bottom: 0 }}915 >916 <path917 d="M16 4h8v14c6 4 8 9 8 16v30H8V34c0-7 2-12 8-16z"918 fill="rgba(20,12,8,0.32)"919 />920 <rect921 x="11"922 y="38"923 width="18"924 height="14"925 rx="1.5"926 fill="rgba(255,250,240,0.75)"927 />928 </svg>929 </div>930 <div style={{ padding: "8px 4px 2px" }}>931 <div style={{ fontSize: 13, fontWeight: 400 }}>932 {p.name}933 </div>934 <div935 style={{936 display: "flex",937 fontSize: 12,938 color: SITE.muted,939 marginTop: 3,940 }}941 >942 <span>{p.origin}</span>943 <span944 style={{945 marginLeft: "auto",946 fontVariantNumeric: "tabular-nums",947 color: SITE.ink,948 }}949 >950 {p.price}951 </span>952 </div>953 </div>954 </div>955 );956 })}957 </div>958 </div>959 </Section>960 </div>961 );962}963964/** The foreground at `scale`, around the frame's center; nothing extra at 1. */965function ScaleLayer({966 scale,967 children,968}: {969 scale: number;970 children: React.ReactNode;971}) {972 if (scale === 1) return children;973 return (974 <AbsoluteFill style={{ transform: `scale(${scale})` }}>975 {children}976 </AbsoluteFill>977 );978}979980export function PromptToApp({981 prompt = DEFAULT_PROMPT,982 plan = DEFAULT_PLAN,983 files = [984 "components/Nav.tsx",985 "components/Hero.tsx",986 "components/PourCards.tsx",987 "app/page.tsx",988 ],989 doneMessage = "Fernway is ready. The booking button links to your reservations page.",990 projectName = "fernway-site",991 deployUrl = "fernway.acme.app",992 siteName = "Fernway",993 siteEyebrow = "Wine bar · Open late",994 siteHeadline = "Natural wine, small plates, one long table.",995 siteBody = "Low-intervention bottles and seasonal plates in the Mission. Walk-ins welcome until 10.",996 siteLinks = ["Menu", "Wine list", "Events", "Visit"],997 pours = DEFAULT_POURS,998 emptyTitle = "What should we build?",999 siteCta = "Book a table",1000 poursTitle = "Tonight’s pours",1001 children,1002 logo,1003 theme = "light",1004 accent = "#3B5BFD",1005 ink: inkProp,1006 background,1007 fontFamily = geist.fontFamily,1008 scale = 1,1009 delay = 0,1010 speed = 1,1011 ground,1012 groundParams,1013}: PromptToAppProps) {1014 const frame = Math.max(0, useCurrentFrame() - delay) * speed;1015 const { width: W, height: H, fps } = useVideoConfig();1016 const tall = H > W;1017 const L = tall ? LAYOUT_TALL : LAYOUT_WIDE;1018 const u = W / L.w;1019 const themePal = palette(theme);1020 const pal = inkProp ? { ...themePal, text: inkProp } : themePal;1021 const planWords = plan.split(" ");1022 const tl = timeline(prompt.length, planWords.length);1023 const file = (i: number) => tl.file(i);1024 const sp = (at: number, config: SpringCfg, durationInFrames?: number) =>1025 spring({ frame: frame - at, fps, config, durationInFrames });10261027 const chatIn = sp(0, HEAVY);1028 const dock = sp(tl.send - 6, HEAVY);1029 const pvIn = sp(tl.send - 2, HEAVY);1030 const chatW = L.chat.w * L.chat.s;1031 const chatH = L.chat.h * L.chat.s;1032 const chatX = interpolate(1033 dock,1034 [0, 1],1035 [tall ? L.chat.x : (L.w - chatW) / 2, L.chat.x],1036 );1037 const chatY = interpolate(1038 dock,1039 [0, 1],1040 [tall ? (L.h - chatH) / 2 : L.chat.y, L.chat.y],1041 );1042 const typed = Math.max(1043 0,1044 Math.min(prompt.length, Math.floor((frame - T.type) * T.cps)),1045 );1046 const sent = frame >= tl.send + 1;1047 const sendScale =1048 1 - 0.06 * (sp(tl.send - 2, MORPH, 3) - sp(tl.send + 1, CHIP));1049 const emptyOut = tween(frame, tl.send + 1, tl.send + 6, exitE);1050 const bubble = sp(tl.send, MORPH);1051 const thinkIn = sp(tl.think, MORPH);1052 const thinking = frame < tl.planAt;1053 const planIn = sp(tl.planAt - 2, MORPH);1054 const filesIn = (i: number) => sp(file(i).start - 2, MORPH);1055 const doneIn = sp(tl.doneMsg, MORPH);1056 const ready =1057 tween(frame, tl.think, tl.think + 6) *1058 (1 - tween(frame, file(0).start - 4, file(0).start + 2, exitE));10591060 const target = {1061 x: L.pv.x + L.pv.s * (DEPLOY.x + DEPLOY.w / 2 + 6),1062 y: L.pv.y + L.pv.s * (DEPLOY.y + DEPLOY.h / 2 + 4),1063 };1064 const cp = sp(tl.cursorIn, CARD, tl.deployClick - 2 - tl.cursorIn);1065 const cur = arc(L.cursorFrom, target, cp);1066 const cursorOp =1067 tween(frame, tl.cursorIn - 4, tl.cursorIn + 2) *1068 (1 - tween(frame, tl.deployed + 12, tl.deployed + 18, exitE));1069 const press = sp(tl.deployClick - 2, MORPH, 3) - sp(tl.deployClick + 2, CHIP);1070 const deploying = frame >= tl.deployClick + 1 && frame < tl.deployed;1071 const isLive = frame >= tl.deployed;1072 const hover = tween(frame, tl.deployClick - 8, tl.deployClick - 4);1073 const pop = sp(tl.deployed + 2, CHIP);1074 const popOp = tween(frame, tl.deployed + 2, tl.deployed + 6);1075 const urlSwap = tween(frame, tl.deployed, tl.deployed + 8);10761077 const cam = interpolate(frame, [0, tl.end], [1, 1.025], {1078 ...clampX,1079 easing: camE,1080 });10811082 const composerText = sent ? "" : prompt.slice(0, typed);1083 const caretOn = !sent && Math.floor(frame / 8) % 2 === 0;1084 const ink = inkProp ?? (pal.dark ? "#EDEDEF" : "#18181B");1085 const inkOn = pal.dark ? "#18181B" : "#FFFFFF";10861087 return (1088 <AbsoluteFill1089 style={{1090 fontFamily,1091 overflow: "hidden",1092 WebkitFontSmoothing: "antialiased",1093 background: background === undefined ? pal.base : undefined,1094 }}1095 >1096 {background === undefined ? (1097 <>1098 <GshGround1099 preset={ground ?? (pal.dark ? "hearth" : "paper-crease")}1100 params={groundParams}1101 timeOffset={pal.dark ? 5 : 3}1102 timeScale={0.3}1103 />1104 <AbsoluteFill style={{ background: pal.scrim }} />1105 </>1106 ) : (1107 <AbsoluteFill1108 style={{1109 background: background === "transparent" ? undefined : background,1110 }}1111 />1112 )}1113 <ScaleLayer scale={scale}>1114 <div1115 style={{1116 position: "absolute",1117 left: 0,1118 top: 0,1119 width: L.w,1120 height: L.h,1121 transformOrigin: "0 0",1122 transform: `scale(${u})`,1123 }}1124 >1125 <div1126 style={{1127 position: "absolute",1128 inset: 0,1129 transform: `scale(${cam})`,1130 transformOrigin: `${(target.x / L.w) * 100}% ${(target.y / L.h) * 100}%`,1131 }}1132 >1133 <div1134 style={{1135 position: "absolute",1136 left: chatX,1137 top: chatY,1138 width: L.chat.w,1139 height: L.chat.h,1140 transformOrigin: "0 0",1141 transform: `translateY(${(1 - chatIn) * 40}px) scale(${L.chat.s})`,1142 opacity: Math.min(1, chatIn * 1.6),1143 }}1144 >1145 <div1146 style={{1147 position: "relative",1148 width: L.chat.w,1149 height: L.chat.h,1150 borderRadius: 18,1151 background: pal.win,1152 boxShadow: pal.shadow,1153 overflow: "hidden",1154 display: "flex",1155 flexDirection: "column",1156 }}1157 >1158 <div1159 style={{1160 height: 52,1161 flexShrink: 0,1162 display: "flex",1163 alignItems: "center",1164 gap: 10,1165 padding: "0 20px",1166 borderBottom: `1px solid ${pal.line}`,1167 fontSize: 15,1168 }}1169 >1170 {logo ?? <KuchiR height={15} color={pal.text} />}1171 <span style={{ color: pal.faint }}>/</span>1172 <span style={{ color: pal.text }}>{projectName}</span>1173 <Icon name="chevDown" color={pal.faint} size={14} />1174 </div>1175 <div1176 style={{1177 flex: 1,1178 minHeight: 0,1179 overflow: "hidden",1180 display: "flex",1181 flexDirection: "column",1182 justifyContent: "flex-end",1183 padding: "0 22px",1184 }}1185 >1186 <div style={{ marginBottom: "auto", paddingTop: 20 }}>1187 {frame >= tl.send ? (1188 <Grow p={bubble}>1189 <div1190 style={{1191 marginLeft: 28,1192 background: pal.bubble,1193 borderRadius: 14,1194 padding: "12px 15px",1195 fontSize: 15,1196 lineHeight: 1.5,1197 color: pal.text,1198 textWrap: "pretty",1199 opacity: tween(frame, tl.send, tl.send + 4),1200 }}1201 >1202 {prompt}1203 </div>1204 </Grow>1205 ) : null}1206 {frame >= tl.think ? (1207 <Grow p={thinkIn}>1208 <div1209 style={{1210 display: "flex",1211 alignItems: "center",1212 gap: 8,1213 marginTop: 20,1214 fontSize: 14,1215 color: pal.muted,1216 }}1217 >1218 {logo ?? <KuchiR height={13} color={pal.text} />}1219 {thinking ? (1220 <span1221 style={{1222 opacity:1223 0.45 + 0.55 * Math.abs(Math.cos(frame / 9)),1224 }}1225 >1226 Thinking1227 </span>1228 ) : (1229 <span1230 style={{1231 display: "flex",1232 alignItems: "center",1233 gap: 2,1234 color: pal.faint,1235 }}1236 >1237 Thought for 3s1238 <Icon1239 name="chevRight"1240 color={pal.faint}1241 size={13}1242 />1243 </span>1244 )}1245 </div>1246 </Grow>1247 ) : null}1248 {frame >= tl.planAt - 2 ? (1249 <Grow p={planIn}>1250 <div1251 style={{1252 marginTop: 10,1253 fontSize: 15,1254 lineHeight: 1.5,1255 color: pal.text,1256 textWrap: "pretty",1257 }}1258 >1259 {planWords.map((w, k) => (1260 <span1261 key={k}1262 style={{1263 opacity: tween(1264 frame,1265 tl.planAt + k * 1.3,1266 tl.planAt + k * 1.3 + 5,1267 ),1268 }}1269 >1270 {w}{" "}1271 </span>1272 ))}1273 </div>1274 </Grow>1275 ) : null}1276 {frame >= file(0).start - 2 ? (1277 <div1278 style={{1279 marginTop: 14,1280 opacity: tween(1281 frame,1282 file(0).start - 2,1283 file(0).start + 4,1284 ),1285 }}1286 >1287 {files.slice(0, 4).map((f, i) => {1288 const st =1289 frame >= file(i).done1290 ? 21291 : frame >= file(i).start1292 ? 11293 : 0;1294 const ok = sp(file(i).done, CHIP);1295 if (i > 0 && frame < file(i).start - 2) return null;1296 return (1297 <Grow key={f} p={i === 0 ? 1 : filesIn(i)}>1298 <div1299 style={{1300 display: "flex",1301 alignItems: "center",1302 gap: 10,1303 height: 32,1304 fontSize: 14,1305 color: pal.muted,1306 borderTop:1307 i === 0 ? "none" : `1px solid ${pal.line}`,1308 }}1309 >1310 <span1311 style={{1312 width: 58,1313 color: st === 1 ? pal.text : pal.faint,1314 }}1315 >1316 {st === 2 ? "Edited" : "Writing"}1317 </span>1318 <span1319 style={{1320 fontFamily: mono,1321 fontSize: 13,1322 color: st === 1 ? pal.text : pal.muted,1323 }}1324 >1325 {f}1326 </span>1327 <span1328 style={{1329 marginLeft: "auto",1330 position: "relative",1331 width: 15,1332 height: 15,1333 }}1334 >1335 <span1336 style={{1337 position: "absolute",1338 inset: 0,1339 opacity: 1 - Math.min(1, ok),1340 }}1341 >1342 <Spinner1343 color={pal.muted}1344 size={15}1345 frame={frame}1346 />1347 </span>1348 <span1349 style={{1350 position: "absolute",1351 inset: 0,1352 opacity: Math.min(1, ok),1353 transform: `scale(${0.4 + 0.6 * ok})`,1354 }}1355 >1356 <Icon1357 name="check"1358 color={pal.green}1359 size={15}1360 stroke={2}1361 />1362 </span>1363 </span>1364 </div>1365 </Grow>1366 );1367 })}1368 </div>1369 ) : null}1370 {frame >= tl.doneMsg ? (1371 <Grow p={doneIn}>1372 <div1373 style={{1374 marginTop: 12,1375 fontSize: 15,1376 lineHeight: 1.5,1377 color: pal.text,1378 opacity: tween(1379 frame,1380 tl.doneMsg + 2,1381 tl.doneMsg + 8,1382 ),1383 textWrap: "pretty",1384 }}1385 >1386 {doneMessage}1387 </div>1388 </Grow>1389 ) : null}1390 </div>1391 </div>13921393 {emptyOut < 1 ? (1394 <div1395 style={{1396 position: "absolute",1397 left: 28,1398 right: 28,1399 top: L.chat.h * 0.3,1400 opacity: 1 - emptyOut,1401 transform: `translateY(${-emptyOut * 10}px)`,1402 }}1403 >1404 <div1405 style={{1406 fontSize: 26,1407 fontWeight: 300,1408 letterSpacing: "-0.03em",1409 lineHeight: 1.15,1410 color: pal.text,1411 }}1412 >1413 {emptyTitle}1414 </div>1415 </div>1416 ) : null}14171418 <div style={{ padding: "12px 14px 14px", flexShrink: 0 }}>1419 <div1420 style={{1421 borderRadius: 14,1422 background: pal.field,1423 boxShadow: `inset 0 0 0 1px ${pal.border}`,1424 padding: "12px 10px 10px 14px",1425 }}1426 >1427 <div1428 style={{1429 height: 45,1430 fontSize: 15,1431 lineHeight: 1.5,1432 color: composerText ? pal.text : pal.faint,1433 overflow: "hidden",1434 display: "flex",1435 flexDirection: "column",1436 justifyContent: "flex-end",1437 }}1438 >1439 <div style={{ marginBottom: "auto" }}>1440 {composerText || "Describe an app or a page"}1441 {caretOn && composerText ? (1442 <span1443 style={{1444 display: "inline-block",1445 width: 1.5,1446 height: 18,1447 background: ink,1448 verticalAlign: "-3px",1449 marginLeft: 1,1450 }}1451 />1452 ) : null}1453 </div>1454 </div>1455 <div1456 style={{1457 display: "flex",1458 alignItems: "center",1459 gap: 12,1460 marginTop: 6,1461 }}1462 >1463 <Icon name="paperclip" color={pal.faint} size={17} />1464 <div1465 style={{1466 marginLeft: "auto",1467 width: 32,1468 height: 32,1469 borderRadius: 99,1470 background:1471 typed > 0 && !sent1472 ? ink1473 : pal.dark1474 ? "rgba(255,255,255,0.08)"1475 : "rgba(17,19,24,0.06)",1476 display: "flex",1477 alignItems: "center",1478 justifyContent: "center",1479 transform: `scale(${sendScale})`,1480 }}1481 >1482 {sent && frame < tl.doneMsg ? (1483 <div1484 style={{1485 width: 10,1486 height: 10,1487 borderRadius: 2,1488 background: pal.muted,1489 }}1490 />1491 ) : (1492 <Icon1493 name="arrowUp"1494 color={typed > 0 && !sent ? inkOn : pal.faint}1495 size={16}1496 stroke={2}1497 />1498 )}1499 </div>1500 </div>1501 </div>1502 </div>1503 </div>1504 </div>15051506 <div1507 style={{1508 position: "absolute",1509 left: L.pv.x,1510 top: L.pv.y,1511 width: PVW,1512 height: L.pvH,1513 transformOrigin: "0 0",1514 transform: `translateY(${(1 - pvIn) * 56}px) scale(${L.pv.s})`,1515 opacity: Math.min(1, pvIn * 1.6),1516 }}1517 >1518 <div1519 style={{1520 position: "relative",1521 width: PVW,1522 height: L.pvH,1523 borderRadius: 14,1524 overflow: "hidden",1525 background: pal.win,1526 boxShadow: pal.shadow,1527 }}1528 >1529 <div1530 style={{1531 height: PV_BAR,1532 display: "flex",1533 alignItems: "center",1534 gap: 12,1535 padding: "0 12px 0 16px",1536 borderBottom: `1px solid ${pal.line}`,1537 }}1538 >1539 <div style={{ display: "flex", gap: 7 }}>1540 {[0, 1, 2].map((d) => (1541 <div1542 key={d}1543 style={{1544 width: 11,1545 height: 11,1546 borderRadius: 99,1547 boxShadow: `inset 0 0 0 1px ${pal.border}`,1548 }}1549 />1550 ))}1551 </div>1552 <div1553 style={{1554 marginLeft: 70,1555 width: 330,1556 height: 30,1557 borderRadius: 8,1558 background: pal.well,1559 display: "flex",1560 alignItems: "center",1561 justifyContent: "center",1562 fontSize: 13,1563 color: pal.muted,1564 position: "relative",1565 overflow: "hidden",1566 fontVariantNumeric: "tabular-nums",1567 }}1568 >1569 <span1570 style={{1571 position: "absolute",1572 opacity: 1 - urlSwap,1573 transform: `translateY(${-urlSwap * 8}px)`,1574 }}1575 >1576 localhost:30001577 </span>1578 <span1579 style={{1580 position: "absolute",1581 opacity: urlSwap,1582 display: "flex",1583 alignItems: "center",1584 gap: 6,1585 transform: `translateY(${(1 - urlSwap) * 8}px)`,1586 }}1587 >1588 <Icon name="lock" color={pal.muted} size={12} />1589 <span style={{ color: pal.text }}>{deployUrl}</span>1590 </span>1591 </div>1592 </div>1593 <div1594 style={{1595 position: "absolute",1596 left: DEPLOY.x,1597 top: DEPLOY.y,1598 width: DEPLOY.w,1599 height: DEPLOY.h,1600 borderRadius: 8,1601 background: isLive ? "transparent" : ink,1602 boxShadow: isLive1603 ? `inset 0 0 0 1px ${pal.border}`1604 : "none",1605 color: isLive ? pal.text : inkOn,1606 display: "flex",1607 alignItems: "center",1608 justifyContent: "center",1609 gap: 7,1610 fontSize: 14,1611 transform: `scale(${1 - 0.04 * press})`,1612 filter: `brightness(${1 + (pal.dark ? -0.08 : 0.25) * hover * (isLive ? 0 : 1)})`,1613 }}1614 >1615 {deploying ? (1616 <Spinner color={inkOn} size={13} frame={frame} />1617 ) : isLive ? (1618 <div1619 style={{1620 width: 7,1621 height: 7,1622 borderRadius: 99,1623 background: pal.green,1624 }}1625 />1626 ) : null}1627 {deploying ? "Deploying" : isLive ? "Live" : "Deploy"}1628 </div>1629 <div1630 style={{1631 position: "absolute",1632 left: 0,1633 right: 0,1634 top: PV_BAR,1635 bottom: 0,1636 background: pal.dark ? "#141416" : "#F6F6F7",1637 }}1638 >1639 {children ? (1640 <div1641 style={{1642 width: "100%",1643 height: "100%",1644 opacity: tween(1645 frame,1646 file(0).start,1647 file(0).start + 10,1648 ),1649 }}1650 >1651 {children}1652 </div>1653 ) : (1654 <div1655 style={{1656 height: "100%",1657 opacity: tween(1658 frame,1659 file(0).start - 4,1660 file(0).start + 2,1661 ),1662 }}1663 >1664 <Site1665 frame={frame}1666 accent={accent}1667 file={file}1668 siteName={siteName}1669 siteEyebrow={siteEyebrow}1670 siteHeadline={siteHeadline}1671 siteBody={siteBody}1672 siteLinks={siteLinks}1673 pours={pours}1674 siteCta={siteCta}1675 poursTitle={poursTitle}1676 fontFamily={fontFamily}1677 />1678 </div>1679 )}1680 {ready > 0 ? (1681 <div1682 style={{1683 position: "absolute",1684 inset: 0,1685 display: "flex",1686 alignItems: "center",1687 justifyContent: "center",1688 gap: 9,1689 opacity: ready,1690 fontSize: 14,1691 color: pal.muted,1692 }}1693 >1694 <Spinner color={pal.muted} size={14} frame={frame} />1695 Starting dev server1696 </div>1697 ) : null}1698 </div>16991700 {popOp > 0 ? (1701 <div1702 style={{1703 position: "absolute",1704 right: 12,1705 top: DEPLOY.y + DEPLOY.h + 8,1706 width: 316,1707 borderRadius: 14,1708 background: pal.pop,1709 boxShadow: pal.popShadow,1710 padding: 6,1711 opacity: popOp,1712 transform: `translateY(${(1 - pop) * -6}px) scale(${0.94 + 0.06 * pop})`,1713 transformOrigin: `${316 - DEPLOY.w / 2}px 0`,1714 }}1715 >1716 <div1717 style={{1718 display: "flex",1719 alignItems: "baseline",1720 padding: "8px 10px 10px",1721 }}1722 >1723 <span style={{ fontSize: 16, color: pal.text }}>1724 Deployed to production1725 </span>1726 <span1727 style={{1728 marginLeft: "auto",1729 fontSize: 13,1730 color: pal.faint,1731 fontVariantNumeric: "tabular-nums",1732 }}1733 >1734 21.4s1735 </span>1736 </div>1737 <div1738 style={{1739 height: 40,1740 borderRadius: 8,1741 background: pal.well,1742 display: "flex",1743 alignItems: "center",1744 gap: 9,1745 padding: "0 5px 0 12px",1746 fontSize: 14,1747 color: pal.text,1748 }}1749 >1750 <div1751 style={{1752 width: 7,1753 height: 7,1754 borderRadius: 99,1755 background: pal.green,1756 }}1757 />1758 {deployUrl}1759 <div1760 style={{1761 marginLeft: "auto",1762 height: 30,1763 padding: "0 11px",1764 borderRadius: 6,1765 background: ink,1766 color: inkOn,1767 display: "flex",1768 alignItems: "center",1769 gap: 5,1770 fontSize: 13,1771 }}1772 >1773 Visit1774 <Icon1775 name="external"1776 color={inkOn}1777 size={12}1778 stroke={1.75}1779 />1780 </div>1781 </div>1782 </div>1783 ) : null}1784 </div>1785 </div>17861787 {cursorOp > 0 ? (1788 <div style={{ opacity: cursorOp }}>1789 <Cursor x={cur.x} y={cur.y} press={press} />1790 </div>1791 ) : null}1792 </div>1793 </div>1794 </ScaleLayer>1795 </AbsoluteFill>1796 );1797}







