{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"grid-to-app","type":"registry:component","title":"Grid to App","description":"A product grid expands into a store admin app with sidebar and product catalogue.","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>.","registryDependencies":["https://kuchi.kalarislabs.com/r/gradient-ground.json"],"files":[{"path":"components/kuchi/grid-to-app.tsx","type":"registry:component","target":"components/kuchi/grid-to-app.tsx","content":"/*! Portions Copyright (c) 2026 Remocn. MIT License. See THIRD_PARTY_LICENSES. */\n\"use client\";\n\nimport { loadFont as loadMono } from \"@remotion/google-fonts/DMMono\";\nimport { loadFont as loadInterTight } from \"@remotion/google-fonts/InterTight\";\nimport type React from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  Img,\n  interpolate,\n  spring,\n  useCurrentFrame,\n  useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/kuchi/gsh/gradient-engine\";\nimport { GshGround } from \"@/lib/kuchi/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/kuchi/gsh/presets\";\n\nconst inter = loadInterTight(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\nconst mono = loadMono(\"normal\", { weights: [\"400\"], subsets: [\"latin\"] });\n\nconst ENTER = Easing.bezier(0.32, 0.72, 0, 1);\nconst CAM = Easing.bezier(0.87, 0, 0.13, 1);\nconst MOVE = Easing.bezier(0.65, 0, 0.35, 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 };\n\nconst B = {\n  row1: [-8, -5, -2, 1],\n  pull: 14,\n  pullLen: 40,\n  chrome: 24,\n  side: 28,\n  row2: [50, 53, 56, 59],\n  count: 50,\n  publish: 84,\n  end: 132,\n};\n\nconst ramp = (f: number, start: number, dur: number, easing = ENTER) =>\n  interpolate(f, [start, start + dur], [0, 1], {\n    extrapolateLeft: \"clamp\",\n    extrapolateRight: \"clamp\",\n    easing,\n  });\n\nconst mix = (a: number, b: number, t: number) => a + (b - a) * t;\n\nconst dip = (f: number, at: number, depth: number) =>\n  1 - depth * ramp(f, at, 3, MOVE) + depth * ramp(f, at + 3, 9, ENTER);\n\nconst line = (color: string, w = 1.5) => ({\n  fill: \"none\",\n  stroke: color,\n  strokeWidth: w,\n  strokeLinecap: \"round\" as const,\n  strokeLinejoin: \"round\" as const,\n});\n\nconst ICONS: Record<string, string> = {\n  home: \"M4 10.5 12 4l8 6.5V20h-5.5v-5.5h-5V20H4z\",\n  orders: \"M6 4h12l1 16H5L6 4ZM9 8a3 3 0 0 0 6 0\",\n  products: \"M12 3.5 20 8v8l-8 4.5L4 16V8l8-4.5ZM4 8l8 4.5L20 8M12 12.5V20.5\",\n  customers:\n    \"M9 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM3 20c0-3.3 2.7-6 6-6s6 2.7 6 6M16 4.5a3.5 3.5 0 0 1 0 6.5M18 14c2 .8 3 2.8 3 6\",\n  analytics: \"M4 20V10M10 20V4M16 20v-7M21 20H3\",\n  store: \"M4 9.5 5.5 4h13L20 9.5M4 9.5h16M4 9.5V20h16V9.5M9.5 20v-5h5v5\",\n  pos: \"M5 4h14v16H5zM8 8h8M8 12h2M12 12h2M8 16h2M12 16h2\",\n  search: \"M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14ZM20 20l-4-4\",\n  bell: \"M6 16V11a6 6 0 0 1 12 0v5l1.5 2h-15L6 16ZM10 20.5h4\",\n};\n\nfunction Icon({\n  d,\n  color,\n  size = 18,\n}: {\n  d: string;\n  color: string;\n  size?: number;\n}) {\n  return (\n    <svg viewBox=\"0 0 24 24\" width={size} height={size} aria-hidden>\n      <path d={d} {...line(color)} />\n    </svg>\n  );\n}\n\nexport interface GridToAppProps {\n  theme?: \"dark\" | \"light\";\n  accent?: string;\n  storeName?: string;\n  pageTitle?: string;\n  images?: string[];\n  products?: { name: string; price: string }[];\n  /** Label of the top-bar button before the store goes live. */\n  publishLabel?: string;\n  /** Label of the same button once the store is live. */\n  liveLabel?: string;\n  /** Label of the primary button next to the page title. */\n  addLabel?: string;\n  /** Text color; overrides the theme ink. */\n  ink?: string;\n  /** Solid fill in place of the gradient ground; \"transparent\" drops it. */\n  background?: string;\n  /** Typeface for the copy. Load it yourself; Inter Tight by default. */\n  fontFamily?: string;\n  /** Size of the window, around the frame's center. */\n  scale?: number;\n  /** Frames to hold the first frame before anything moves. */\n  delay?: number;\n  speed?: number;\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\n/** The foreground at `scale`, around the frame's center; nothing extra at 1. */\nfunction ScaleLayer({\n  scale,\n  children,\n}: {\n  scale: number;\n  children: React.ReactNode;\n}) {\n  if (scale === 1) return children;\n  return (\n    <AbsoluteFill style={{ transform: `scale(${scale})` }}>\n      {children}\n    </AbsoluteFill>\n  );\n}\n\nexport function GridToApp({\n  theme = \"dark\",\n  accent = \"#ff6a2b\",\n  storeName = \"Studio Goods\",\n  pageTitle = \"Products\",\n  images = [\n    \"https://kuchi-media.kalarislabs.com/components/art/art-03.svg\",\n    \"https://kuchi-media.kalarislabs.com/components/art/art-04.svg\",\n    \"https://kuchi-media.kalarislabs.com/components/art/art-05.svg\",\n    \"https://kuchi-media.kalarislabs.com/components/art/art-06.svg\",\n    \"https://kuchi-media.kalarislabs.com/components/art/art-07.svg\",\n    \"https://kuchi-media.kalarislabs.com/components/art/art-08.svg\",\n    \"https://kuchi-media.kalarislabs.com/components/art/art-09.svg\",\n    \"https://kuchi-media.kalarislabs.com/components/art/art-10.svg\",\n  ],\n  products = [\n    { name: \"Ceramic pitcher\", price: \"$48.00\" },\n    { name: \"Oak stool\", price: \"$120.00\" },\n    { name: \"Arch sculpture\", price: \"$86.00\" },\n    { name: \"Material kit\", price: \"$32.00\" },\n    { name: \"Writing desk\", price: \"$640.00\" },\n    { name: \"Oak dining table\", price: \"$1,180.00\" },\n    { name: \"Travertine bench\", price: \"$420.00\" },\n    { name: \"Olive planter\", price: \"$64.00\" },\n  ],\n  publishLabel = \"Publish\",\n  liveLabel = \"Store live\",\n  addLabel = \"Add product\",\n  ink: inkProp,\n  background,\n  fontFamily = inter.fontFamily,\n  scale = 1,\n  delay = 0,\n  speed = 1,\n  ground,\n  groundParams,\n}: GridToAppProps) {\n  const frame = Math.max(0, useCurrentFrame() - delay) * speed;\n  const { width, height, fps } = useVideoConfig();\n  const dark = theme === \"dark\";\n  const portrait = height > width * 1.2;\n  const stageW = portrait ? 720 : 1280;\n  const stageH = portrait ? 1280 : 720;\n  const k = width / stageW;\n\n  const ink = inkProp ?? (dark ? \"#f6efe9\" : \"#1b1714\");\n  const muted = dark ? \"rgba(246,239,233,0.54)\" : \"rgba(27,23,20,0.52)\";\n  const faint = dark ? \"rgba(246,239,233,0.3)\" : \"rgba(27,23,20,0.3)\";\n  const hair = dark ? \"rgba(255,236,222,0.09)\" : \"rgba(60,36,20,0.09)\";\n  const fill = dark ? \"rgba(255,236,222,0.05)\" : \"rgba(60,36,20,0.045)\";\n  const winBg = dark ? \"#141010\" : \"#ffffff\";\n  const sideBg = dark ? \"#100d0c\" : \"#f8f5f2\";\n  const mainBg = dark ? \"#171312\" : \"#fcfbf9\";\n  const cardBg = dark ? \"#1f1a18\" : \"#ffffff\";\n  const shadow = dark\n    ? \"inset 0 1px 0 rgba(255,240,225,0.06), 0 1px 2px rgba(0,0,0,0.4), 0 20px 44px rgba(0,0,0,0.4), 0 70px 140px rgba(20,6,0,0.6)\"\n    : \"inset 0 1px 0 #ffffff, 0 1px 2px rgba(120,60,20,0.06), 0 18px 40px rgba(150,80,30,0.1), 0 60px 130px rgba(150,80,30,0.18)\";\n\n  const winW = portrait ? 680 : 1180;\n  const winH = portrait ? 1180 : 660;\n  const topH = 54;\n  const sideW = portrait ? 66 : 232;\n  const mainW = winW - sideW;\n  const pad = portrait ? 22 : 30;\n  const cols = portrait ? 2 : 4;\n  const gap = portrait ? 16 : 18;\n  const cardW = (mainW - pad * 2 - gap * (cols - 1)) / cols;\n  const imgH = cardW;\n  const cardH = imgH + 72;\n  const headTop = topH + (portrait ? 22 : 26);\n  const tabsTop = headTop + 58;\n  const gridTop = tabsTop + 56;\n  const cardPos = (i: number) => ({\n    x: sideW + pad + (i % cols) * (cardW + gap),\n    y: gridTop + Math.floor(i / cols) * (cardH + gap),\n  });\n\n  const pull = ramp(frame, B.pull, B.pullLen, CAM);\n  const pullPrev = ramp(frame - 1, B.pull, B.pullLen, CAM);\n  const tilt = spring({\n    frame: frame - B.pull,\n    fps,\n    config: HEAVY,\n    durationInFrames: B.pullLen + 10,\n  });\n  const focusX = sideW + pad + (mainW - pad * 2) / 2 - winW / 2;\n  const focusY = gridTop + cardH / 2 - winH / 2 + (portrait ? cardH / 2 : 0);\n  const z0 = portrait ? 1.2 : 1.42;\n  const z =\n    mix(z0, 1, pull) *\n      (1 + 0.03 * ramp(frame, B.pull + B.pullLen, B.end, Easing.linear)) +\n    0.025 * ramp(frame, -10, B.pull + 6, Easing.linear) * (1 - pull);\n  const fx = mix(focusX, 0, pull);\n  const fy = mix(focusY, portrait ? 10 : 6, pull);\n  const rotX = mix(0, 7, tilt) + 6 * Math.sin(Math.PI * pull);\n  const rotY = mix(0, portrait ? -6 : -10, tilt) + Math.sin(frame / 50) * 0.6;\n  const rotZ = mix(0, portrait ? 0.6 : 1.2, tilt);\n  const pullV = Math.abs(pull - pullPrev);\n  const camBlur = Math.min(4, pullV * 60);\n\n  const chrome = ramp(frame, B.chrome, 18);\n  const sideItem = (i: number) => ramp(frame, B.side + i * 2, 12);\n  const countRoll = ramp(frame, B.count, 12, MOVE);\n  const countVal = Math.round(mix(4, products.length, countRoll));\n  const pub = spring({ frame: frame - B.publish, fps, config: CHIP });\n  const live = frame >= B.publish;\n  const pubDip = dip(frame, B.publish - 4, 0.08);\n\n  const resolvedPreset: GshPresetId | undefined = ground;\n  const resolvedParams: Partial<GradientParams> | undefined =\n    groundParams ??\n    (ground\n      ? undefined\n      : dark\n        ? {\n            kind: \"mist\",\n            background: \"#0b0705\",\n            colors: [\"#ffb37a\", \"#ff6a2c\", \"#5a1d0c\", \"#1a0a05\"],\n            seed: 11,\n          }\n        : {\n            kind: \"mist\",\n            background: \"#fbf6f0\",\n            colors: [\"#ffa266\", \"#ffd6b6\", \"#fff3e8\", \"#e8763a\"],\n            seed: 11,\n          });\n\n  const navItems = [\n    { id: \"home\", label: \"Home\" },\n    { id: \"orders\", label: \"Orders\", badge: \"4\" },\n    { id: \"products\", label: \"Products\", active: true },\n    { id: \"customers\", label: \"Customers\" },\n    { id: \"analytics\", label: \"Analytics\" },\n  ];\n  const channelItems = [\n    { id: \"store\", label: \"Online store\" },\n    { id: \"pos\", label: \"Point of sale\" },\n  ];\n\n  const chromeStyle = (i: number): React.CSSProperties => {\n    const t = sideItem(i);\n    return {\n      opacity: t * chrome,\n      transform: `translateX(${mix(-14, 0, t)}px)`,\n    };\n  };\n\n  const navRow = (\n    it: { id: string; label: string; badge?: string; active?: boolean },\n    i: number,\n  ) => (\n    <div\n      key={it.id}\n      style={{\n        height: 40,\n        borderRadius: 10,\n        display: \"flex\",\n        alignItems: \"center\",\n        justifyContent: portrait ? \"center\" : undefined,\n        gap: 12,\n        padding: portrait ? 0 : \"0 12px\",\n        background: it.active ? fill : \"transparent\",\n        boxShadow: it.active\n          ? dark\n            ? \"inset 0 1px 0 rgba(255,240,225,0.05)\"\n            : \"0 1px 2px rgba(60,36,20,0.06)\"\n          : undefined,\n        border: it.active ? `1px solid ${hair}` : \"1px solid transparent\",\n        color: it.active ? ink : muted,\n        fontSize: 16,\n        ...chromeStyle(i),\n      }}\n    >\n      <Icon d={ICONS[it.id]} color={it.active ? ink : muted} />\n      {portrait ? null : <span style={{ flex: 1 }}>{it.label}</span>}\n      {it.badge && !portrait ? (\n        <span\n          style={{\n            minWidth: 22,\n            height: 22,\n            borderRadius: 7,\n            background: fill,\n            fontSize: 13,\n            display: \"flex\",\n            alignItems: \"center\",\n            justifyContent: \"center\",\n            fontFamily: mono.fontFamily,\n          }}\n        >\n          {it.badge}\n        </span>\n      ) : null}\n    </div>\n  );\n\n  return (\n    <AbsoluteFill style={{ fontFamily, overflow: \"hidden\" }}>\n      {background === undefined ? (\n        <GshGround\n          preset={resolvedPreset}\n          params={resolvedParams}\n          timeOffset={4}\n          timeScale={0.45}\n        />\n      ) : (\n        <AbsoluteFill\n          style={{\n            background: background === \"transparent\" ? undefined : background,\n          }}\n        />\n      )}\n      <svg width={0} height={0} style={{ position: \"absolute\" }} aria-hidden>\n        <filter id=\"gta-cam\" x=\"-5%\" y=\"-5%\" width=\"110%\" height=\"110%\">\n          <feGaussianBlur stdDeviation={`${camBlur * 0.6} ${camBlur}`} />\n        </filter>\n      </svg>\n      <ScaleLayer scale={scale}>\n        <div\n          style={{\n            position: \"absolute\",\n            left: 0,\n            top: 0,\n            width: stageW,\n            height: stageH,\n            transform: `scale(${k})`,\n            transformOrigin: \"0 0\",\n            perspective: 2200,\n          }}\n        >\n          <div\n            style={{\n              position: \"absolute\",\n              left: stageW / 2,\n              top: stageH / 2,\n              width: 0,\n              height: 0,\n              transformStyle: \"preserve-3d\",\n              transform: `translate(${-fx * z}px, ${-fy * z}px) rotateX(${rotX}deg) rotateY(${rotY}deg) rotateZ(${rotZ}deg) scale(${z})`,\n            }}\n          >\n            <div\n              style={{\n                position: \"absolute\",\n                left: -winW / 2,\n                top: -winH / 2,\n                width: winW,\n                height: winH,\n                borderRadius: 20,\n                background: winBg,\n                border: `1px solid ${hair}`,\n                boxShadow: shadow,\n                opacity: chrome,\n              }}\n            />\n            <div\n              style={{\n                position: \"absolute\",\n                left: -winW / 2,\n                top: -winH / 2,\n                width: winW,\n                height: winH,\n                borderRadius: 20,\n                overflow: \"hidden\",\n                filter: camBlur > 0.4 ? \"url(#gta-cam)\" : undefined,\n              }}\n            >\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: sideW,\n                  top: topH,\n                  right: 0,\n                  bottom: 0,\n                  background: mainBg,\n                  opacity: chrome,\n                }}\n              />\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 0,\n                  top: topH,\n                  width: sideW,\n                  bottom: 0,\n                  background: sideBg,\n                  borderRight: `1px solid ${hair}`,\n                  opacity: chrome,\n                  padding: portrait ? \"18px 12px\" : \"18px 14px\",\n                  boxSizing: \"border-box\",\n                  display: \"flex\",\n                  flexDirection: \"column\",\n                  gap: 4,\n                }}\n              >\n                {navItems.map((it, i) => navRow(it, i))}\n                {portrait ? (\n                  <div\n                    style={{ height: 1, background: hair, margin: \"12px 6px\" }}\n                  />\n                ) : (\n                  <div\n                    style={{\n                      fontSize: 13,\n                      color: faint,\n                      letterSpacing: \"0.04em\",\n                      padding: \"20px 12px 8px\",\n                      ...chromeStyle(5),\n                    }}\n                  >\n                    Sales channels\n                  </div>\n                )}\n                {channelItems.map((it, i) => navRow(it, i + 6))}\n                <div style={{ flex: 1 }} />\n                {portrait ? null : (\n                  <div\n                    style={{\n                      borderRadius: 14,\n                      border: `1px solid ${hair}`,\n                      background: fill,\n                      padding: 14,\n                      ...chromeStyle(8),\n                    }}\n                  >\n                    <div style={{ fontSize: 15, color: ink }}>Setup guide</div>\n                    <div style={{ fontSize: 13, color: muted, marginTop: 4 }}>\n                      4 of 6 tasks done\n                    </div>\n                    <div\n                      style={{\n                        height: 5,\n                        borderRadius: 3,\n                        background: fill,\n                        marginTop: 10,\n                        overflow: \"hidden\",\n                      }}\n                    >\n                      <div\n                        style={{\n                          width: `${mix(50, 67, ramp(frame, B.count, 18))}%`,\n                          height: \"100%\",\n                          borderRadius: 3,\n                          background: accent,\n                        }}\n                      />\n                    </div>\n                  </div>\n                )}\n              </div>\n\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 0,\n                  right: 0,\n                  top: 0,\n                  height: topH,\n                  borderBottom: `1px solid ${hair}`,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  padding: \"0 16px\",\n                  gap: 14,\n                  opacity: chrome,\n                  transform: `translateY(${mix(-12, 0, chrome)}px)`,\n                }}\n              >\n                <div style={{ display: \"flex\", gap: 8 }}>\n                  {[0, 1, 2].map((i) => (\n                    <span\n                      key={i}\n                      style={{\n                        width: 12,\n                        height: 12,\n                        borderRadius: 6,\n                        background: fill,\n                        border: `1px solid ${hair}`,\n                      }}\n                    />\n                  ))}\n                </div>\n                <div\n                  style={{\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    gap: 10,\n                    marginLeft: 8,\n                    fontSize: 16,\n                    color: ink,\n                  }}\n                >\n                  <span\n                    style={{\n                      width: 26,\n                      height: 26,\n                      borderRadius: 7,\n                      background: accent,\n                      color: \"#fff\",\n                      fontSize: 14,\n                      display: \"flex\",\n                      alignItems: \"center\",\n                      justifyContent: \"center\",\n                      boxShadow: \"inset 0 1px 0 rgba(255,255,255,0.3)\",\n                    }}\n                  >\n                    {storeName.slice(0, 1)}\n                  </span>\n                  {portrait ? null : storeName}\n                  {portrait ? null : (\n                    <svg viewBox=\"0 0 24 24\" width={14} height={14} aria-hidden>\n                      <path d=\"m7 10 5 5 5-5\" {...line(muted)} />\n                    </svg>\n                  )}\n                </div>\n                <div\n                  style={{ flex: 1, display: \"flex\", justifyContent: \"center\" }}\n                >\n                  {portrait ? null : (\n                    <div\n                      style={{\n                        width: 360,\n                        height: 34,\n                        borderRadius: 10,\n                        background: fill,\n                        border: `1px solid ${hair}`,\n                        display: \"flex\",\n                        alignItems: \"center\",\n                        gap: 10,\n                        padding: \"0 12px\",\n                        fontSize: 15,\n                        color: faint,\n                      }}\n                    >\n                      <Icon d={ICONS.search} color={muted} size={16} />\n                      <span style={{ flex: 1 }}>Search products</span>\n                      <span\n                        style={{ fontFamily: mono.fontFamily, fontSize: 13 }}\n                      >\n                        ⌘K\n                      </span>\n                    </div>\n                  )}\n                </div>\n                <Icon d={ICONS.bell} color={muted} />\n                <div\n                  style={{\n                    height: 34,\n                    padding: \"0 14px\",\n                    borderRadius: 10,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    gap: 8,\n                    fontSize: 15,\n                    color: live ? \"#fff\" : ink,\n                    background: live ? accent : fill,\n                    border: live ? \"none\" : `1px solid ${hair}`,\n                    transform: `scale(${live ? mix(0.82, 1, pub) : pubDip})`,\n                    boxShadow: live\n                      ? `inset 0 1px 0 rgba(255,255,255,0.3), 0 8px 22px color-mix(in oklab, ${accent} 45%, transparent)`\n                      : undefined,\n                  }}\n                >\n                  {live ? (\n                    <span\n                      style={{\n                        width: 7,\n                        height: 7,\n                        borderRadius: 4,\n                        background: \"#fff\",\n                      }}\n                    />\n                  ) : null}\n                  {live ? liveLabel : publishLabel}\n                </div>\n                <span\n                  style={{\n                    width: 32,\n                    height: 32,\n                    borderRadius: 16,\n                    background: dark ? \"#3a2b24\" : \"#f1e2d6\",\n                    color: ink,\n                    fontSize: 13,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    justifyContent: \"center\",\n                  }}\n                >\n                  AS\n                </span>\n              </div>\n\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: sideW + pad,\n                  right: pad,\n                  top: headTop,\n                  height: 46,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  gap: 12,\n                  opacity: chrome,\n                  transform: `translateY(${mix(14, 0, chrome)}px)`,\n                }}\n              >\n                <span\n                  style={{\n                    fontSize: portrait ? 32 : 36,\n                    fontWeight: 300,\n                    color: ink,\n                    letterSpacing: \"-0.04em\",\n                  }}\n                >\n                  {pageTitle}\n                </span>\n                <span\n                  style={{\n                    height: 26,\n                    minWidth: 26,\n                    padding: \"0 8px\",\n                    borderRadius: 8,\n                    background: fill,\n                    border: `1px solid ${hair}`,\n                    fontFamily: mono.fontFamily,\n                    fontSize: 14,\n                    color: muted,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    justifyContent: \"center\",\n                    overflow: \"hidden\",\n                  }}\n                >\n                  {countVal}\n                </span>\n                <span style={{ flex: 1 }} />\n                {portrait ? null : (\n                  <span\n                    style={{\n                      height: 38,\n                      padding: \"0 16px\",\n                      borderRadius: 11,\n                      border: `1px solid ${hair}`,\n                      fontSize: 15,\n                      color: ink,\n                      display: \"flex\",\n                      alignItems: \"center\",\n                    }}\n                  >\n                    Import\n                  </span>\n                )}\n                <span\n                  style={{\n                    height: 38,\n                    padding: \"0 16px\",\n                    borderRadius: 11,\n                    background: ink,\n                    color: winBg,\n                    fontSize: 15,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    gap: 8,\n                  }}\n                >\n                  <svg viewBox=\"0 0 24 24\" width={14} height={14} aria-hidden>\n                    <path d=\"M12 5v14M5 12h14\" {...line(winBg, 2)} />\n                  </svg>\n                  {addLabel}\n                </span>\n              </div>\n\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: sideW + pad,\n                  right: pad,\n                  top: tabsTop,\n                  height: 40,\n                  display: \"flex\",\n                  alignItems: \"flex-end\",\n                  gap: 26,\n                  borderBottom: `1px solid ${hair}`,\n                  opacity: chrome,\n                }}\n              >\n                {[\"All\", \"Active\", \"Drafts\", \"Archived\"].map((t, i) => (\n                  <span\n                    key={t}\n                    style={{\n                      fontSize: 16,\n                      color: i === 0 ? ink : muted,\n                      paddingBottom: 11,\n                      borderBottom:\n                        i === 0\n                          ? `1.5px solid ${ink}`\n                          : \"1.5px solid transparent\",\n                      marginBottom: -1,\n                    }}\n                  >\n                    {t}\n                  </span>\n                ))}\n              </div>\n\n              {products.slice(0, cols * (portrait ? 3 : 2)).map((p, i) => {\n                const pos = cardPos(i);\n                const firstRow = i < 4;\n                const at = firstRow\n                  ? (B.row1[i] ?? 0)\n                  : (B.row2[(i - 4) % B.row2.length] ?? 50) +\n                    Math.floor((i - 4) / B.row2.length) * 6;\n                const pop = spring({ frame: frame - at, fps, config: CARD });\n                const shown = frame >= at;\n                return (\n                  <div\n                    key={p.name}\n                    style={{\n                      position: \"absolute\",\n                      left: pos.x,\n                      top: pos.y,\n                      width: cardW,\n                      height: cardH,\n                      borderRadius: 16,\n                      background: cardBg,\n                      border: `1px solid ${hair}`,\n                      boxShadow: dark\n                        ? \"inset 0 1px 0 rgba(255,240,225,0.05), 0 10px 26px rgba(0,0,0,0.35)\"\n                        : \"0 1px 2px rgba(60,36,20,0.05), 0 10px 24px rgba(120,60,20,0.07)\",\n                      overflow: \"hidden\",\n                      opacity: shown ? Math.min(1, pop * 1.8) : 0,\n                      transform: `translateY(${mix(firstRow ? 60 : 40, 0, pop)}px) scale(${mix(0.86, 1, pop)})`,\n                    }}\n                  >\n                    <div\n                      style={{\n                        position: \"absolute\",\n                        left: 8,\n                        top: 8,\n                        width: cardW - 16,\n                        height: imgH - 16,\n                        borderRadius: 10,\n                        overflow: \"hidden\",\n                      }}\n                    >\n                      <Img\n                        src={images[i % images.length]}\n                        style={{\n                          width: \"100%\",\n                          height: \"100%\",\n                          objectFit: \"cover\",\n                          transform: `scale(${1.06 - 0.06 * ramp(frame, at, 60, Easing.linear)})`,\n                        }}\n                      />\n                      {i === 1 ? (\n                        <span\n                          style={{\n                            position: \"absolute\",\n                            left: 8,\n                            top: 8,\n                            height: 24,\n                            padding: \"0 9px\",\n                            borderRadius: 7,\n                            background: \"rgba(255,255,255,0.88)\",\n                            color: \"#1b1714\",\n                            fontSize: 13,\n                            display: \"flex\",\n                            alignItems: \"center\",\n                          }}\n                        >\n                          New\n                        </span>\n                      ) : null}\n                    </div>\n                    <div\n                      style={{\n                        position: \"absolute\",\n                        left: 14,\n                        right: 14,\n                        top: imgH + 2,\n                      }}\n                    >\n                      <div\n                        style={{\n                          fontSize: 17,\n                          color: ink,\n                          whiteSpace: \"nowrap\",\n                          overflow: \"hidden\",\n                          textOverflow: \"ellipsis\",\n                          letterSpacing: \"-0.01em\",\n                        }}\n                      >\n                        {p.name}\n                      </div>\n                      <div\n                        style={{\n                          display: \"flex\",\n                          alignItems: \"center\",\n                          justifyContent: \"space-between\",\n                          marginTop: 6,\n                        }}\n                      >\n                        <span\n                          style={{\n                            fontFamily: mono.fontFamily,\n                            fontSize: 15,\n                            color: muted,\n                          }}\n                        >\n                          {p.price}\n                        </span>\n                        <span\n                          style={{\n                            display: \"flex\",\n                            alignItems: \"center\",\n                            gap: 6,\n                            fontSize: 14,\n                            color: muted,\n                          }}\n                        >\n                          <span\n                            style={{\n                              width: 7,\n                              height: 7,\n                              borderRadius: 4,\n                              background: i % 5 === 3 ? faint : \"#3fb37f\",\n                            }}\n                          />\n                          {i % 5 === 3 ? \"Draft\" : \"Active\"}\n                        </span>\n                      </div>\n                    </div>\n                  </div>\n                );\n              })}\n            </div>\n          </div>\n        </div>\n      </ScaleLayer>\n    </AbsoluteFill>\n  );\n}\n\nexport default GridToApp;\n"}]}