{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "marketing-07",
  "title": "Shared card launch page",
  "description": "A Tallypot launch page: group cards in a coverflow that follows the hand and keeps its momentum, a large figure that drops in with one burst of confetti, shapes that pop in as sections arrive, a live feed of who paid what in a split, perks whose meters fill with the group spend, a flap countdown to the launch and a share action.",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/agent-run.json",
    "https://ui.ndekocode.dev/r/avatar.json",
    "https://ui.ndekocode.dev/r/badge.json",
    "https://ui.ndekocode.dev/r/brand-logos.json",
    "https://ui.ndekocode.dev/r/brand-tile.json",
    "https://ui.ndekocode.dev/r/button.json",
    "https://ui.ndekocode.dev/r/chat-motion.json",
    "https://ui.ndekocode.dev/r/demonstration.json",
    "https://ui.ndekocode.dev/r/drawn-check.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/input.json",
    "https://ui.ndekocode.dev/r/live-region.json",
    "https://ui.ndekocode.dev/r/motion-confetti.json",
    "https://ui.ndekocode.dev/r/motion-number.json",
    "https://ui.ndekocode.dev/r/motion-presets.json",
    "https://ui.ndekocode.dev/r/progress.json",
    "https://ui.ndekocode.dev/r/replay-button.json",
    "https://ui.ndekocode.dev/r/settle.json",
    "https://ui.ndekocode.dev/r/sheet.json",
    "https://ui.ndekocode.dev/r/slider.json",
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/use-agent-run.json",
    "https://ui.ndekocode.dev/r/use-autoplay.json",
    "https://ui.ndekocode.dev/r/use-kept-height.json",
    "https://ui.ndekocode.dev/r/use-prefers-reduced-motion.json",
    "https://ui.ndekocode.dev/r/use-session.json",
    "https://ui.ndekocode.dev/r/use-timeouts.json",
    "https://ui.ndekocode.dev/r/utils.json",
    "https://ui.ndekocode.dev/r/words.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/index.tsx",
      "content": "import { Countdown } from './countdown';\nimport { Feed } from './feed';\nimport { GoalFigure } from './goal-figure';\nimport { Hero } from './hero';\nimport { Perks } from './perks';\nimport { Share } from './share';\nimport { SiteFooter } from './site-footer';\nimport { SiteHeader } from './site-header';\n\nexport default function Marketing07() {\n  return (\n    <div className='@container flex min-h-screen flex-col'>\n      <SiteHeader />\n      <main className='flex-1'>\n        <Hero />\n        <GoalFigure />\n        <Feed />\n        <Perks />\n        <Countdown />\n        <Share />\n      </main>\n      <SiteFooter />\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/index.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/brand-mark.tsx",
      "content": "import { cn } from '@/registry/ndeko/lib/utils';\n\nexport function TallypotMark({ className }: { className?: string }) {\n  return (\n    <svg\n      viewBox='0 0 24 24'\n      aria-hidden='true'\n      className={cn('size-6 shrink-0', className)}\n    >\n      <rect width='24' height='24' rx='12' className='fill-primary' />\n      <rect\n        x='5'\n        y='7.5'\n        width='14'\n        height='9'\n        rx='2.2'\n        fill='none'\n        strokeWidth='1.6'\n        className='stroke-primary-foreground'\n      />\n      <rect\n        x='5'\n        y='10.5'\n        width='14'\n        height='2'\n        className='fill-primary-foreground/70'\n      />\n      <circle cx='9' cy='14.6' r='0.9' className='fill-primary-foreground' />\n    </svg>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/brand-mark.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/countdown.tsx",
      "content": "'use client';\n\nimport { useInView } from 'motion/react';\nimport { useRef } from 'react';\n\nimport { useNow } from '@/registry/ndeko/hooks/use-agent-run';\nimport { ArrowRightIcon } from '@/registry/ndeko/lib/icons';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { SettleItem } from '@/registry/ndeko/ui/settle';\n\nimport { LAUNCH, LAUNCH_ANCHOR } from './data';\nimport { FlapDigit } from './flap-digit';\nimport { PopShape } from './pop-shape';\nimport { Reveal } from './reveal';\n\nconst SECOND_MS = 1000;\nconst MINUTE_MS = 60 * SECOND_MS;\nconst HOUR_MS = 60 * MINUTE_MS;\nconst DAY_MS = 24 * HOUR_MS;\nconst MAX_DAYS = 99;\n\ntype Parts = [days: number, hours: number, minutes: number, seconds: number];\n\nfunction partsOf(now: number): Parts {\n  if (now === 0) {\n    return [0, 0, 0, 0];\n  }\n  const remaining = Math.max(LAUNCH.at - now, 0);\n  const days = Math.min(Math.floor(remaining / DAY_MS), MAX_DAYS);\n  const hours = Math.floor((remaining % DAY_MS) / HOUR_MS);\n  const minutes = Math.floor((remaining % HOUR_MS) / MINUTE_MS);\n  const seconds = Math.floor((remaining % MINUTE_MS) / SECOND_MS);\n  return [days, hours, minutes, seconds];\n}\n\nfunction spokenOf(parts: Parts) {\n  const [days, hours, minutes] = parts;\n  return `${days} days, ${hours} hours and ${minutes} minutes to the launch`;\n}\n\nfunction FlapUnit({ value, label }: { value: number; label: string }) {\n  const tens = Math.floor(value / 10);\n  const units = value % 10;\n\n  return (\n    <div className='flex flex-col items-center gap-2'>\n      <div className='flex gap-1' aria-hidden='true'>\n        <FlapDigit value={tens} />\n        <FlapDigit value={units} />\n      </div>\n      <p className='text-muted-foreground text-xs'>{label}</p>\n    </div>\n  );\n}\n\nfunction Flaps() {\n  const ref = useRef<HTMLDivElement>(null);\n  const isInView = useInView(ref);\n  const now = useNow(SECOND_MS, isInView);\n  const parts = partsOf(now);\n  const isOver = now >= LAUNCH.at;\n\n  return (\n    <div ref={ref} className='flex flex-col items-center gap-4'>\n      <div\n        role='timer'\n        aria-label={spokenOf(parts)}\n        className='flex justify-center gap-3 @sm:gap-5'\n      >\n        {LAUNCH.units.map((label, index) => (\n          <FlapUnit key={label} value={parts[index]} label={label} />\n        ))}\n      </div>\n      {isOver && (\n        <p className='text-muted-foreground text-sm'>{LAUNCH.launched}</p>\n      )}\n    </div>\n  );\n}\n\nexport function Countdown() {\n  return (\n    <section\n      id={LAUNCH_ANCHOR}\n      className='relative overflow-x-clip px-4 py-16 @sm:px-6 @sm:py-24 @5xl:px-8'\n    >\n      <PopShape\n        kind='circle'\n        series={3}\n        className='top-10 right-6 size-12 @3xl:top-20 @3xl:right-28 @3xl:size-16'\n      />\n      <PopShape\n        kind='pill'\n        series={2}\n        delay={0.1}\n        className='bottom-12 left-6 h-6 w-14 rotate-6 @3xl:bottom-24 @3xl:left-28 @3xl:h-8 @3xl:w-24'\n      />\n      <Reveal\n        className='mx-auto max-w-3xl'\n        groupClassName='flex flex-col items-center gap-8 text-center'\n      >\n        <SettleItem className='flex flex-col gap-3'>\n          <h2 className='text-2xl font-semibold text-balance @2xl:text-3xl'>\n            {LAUNCH.title}\n          </h2>\n          <p className='text-muted-foreground mx-auto max-w-xl text-base text-pretty'>\n            {LAUNCH.description}\n          </p>\n        </SettleItem>\n        <SettleItem>\n          <Flaps />\n        </SettleItem>\n        <SettleItem>\n          <Button size='lg' nativeButton={false} render={<a href='#' />}>\n            {LAUNCH.action}\n            <ArrowRightIcon />\n          </Button>\n        </SettleItem>\n      </Reveal>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/countdown.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/cover-card.tsx",
      "content": "'use client';\n\nimport { motion, useTransform, type MotionValue } from 'motion/react';\n\nimport { seriesColorOf } from '@/registry/ndeko/lib/agent-run';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Avatar } from '@/registry/ndeko/ui/avatar';\nimport { BrandTile } from '@/registry/ndeko/ui/brand-tile';\n\nimport { coverOpacityOf, coverStackOf, coverTransformOf } from './cover-math';\nimport type { GroupCard } from './data';\n\ntype FaceStyle = React.CSSProperties & { '--face': string };\n\nfunction faceStyleOf(card: GroupCard): FaceStyle {\n  const hue = seriesColorOf(card.series);\n  return { '--face': `color-mix(in oklab, ${hue} 78%, black)` };\n}\n\nexport function CardFace({ card }: { card: GroupCard }) {\n  const visibleMembers = card.members.slice(0, 4);\n\n  return (\n    <div\n      style={faceStyleOf(card)}\n      className='text-primary-foreground relative flex aspect-[1.586/1] w-full flex-col justify-between overflow-hidden rounded-2xl bg-(--face) p-4 shadow-[0_1px_2px_rgb(0_0_0/0.2),0_16px_32px_-12px_rgb(0_0_0/0.35)] @sm:p-5'\n    >\n      <span\n        aria-hidden='true'\n        className='bg-primary-foreground/10 absolute -top-10 -right-10 size-40 rounded-full'\n      />\n      <span\n        aria-hidden='true'\n        className='bg-primary-foreground/[0.07] absolute -bottom-16 -left-8 size-36 rounded-full'\n      />\n      <div className='relative flex items-center justify-between gap-3'>\n        <span className='flex items-center gap-2 text-sm font-semibold'>\n          <span\n            aria-hidden='true'\n            className='border-primary-foreground/90 flex size-5 items-center justify-center rounded-full border-2'\n          >\n            <span className='bg-primary-foreground/90 size-1.5 rounded-full' />\n          </span>\n          Tallypot\n        </span>\n        <span className='text-primary-foreground/90 truncate text-xs font-medium'>\n          {card.name}\n        </span>\n      </div>\n      <div className='relative flex flex-col gap-3'>\n        <p className='text-primary-foreground/90 font-mono text-sm tabular-nums'>\n          •••• •••• •••• {card.last4}\n        </p>\n        <div className='flex items-end justify-between gap-3'>\n          <div className='flex -space-x-2'>\n            {visibleMembers.map((member) => (\n              <Avatar\n                key={member}\n                seed={member}\n                role='img'\n                aria-label={member}\n                className='ring-primary-foreground/40 size-6 ring-2'\n              />\n            ))}\n          </div>\n          <BrandTile brand={card.network} size='xl' title={card.networkName} />\n        </div>\n      </div>\n    </div>\n  );\n}\n\ntype CoverCardProps = {\n  card: GroupCard;\n  index: number;\n  position: MotionValue<number>;\n  isActive: boolean;\n  onPick: (index: number) => void;\n  className?: string;\n};\n\nexport function CoverCard({\n  card,\n  index,\n  position,\n  isActive,\n  onPick,\n  className,\n}: CoverCardProps) {\n  const transform = useTransform(position, (latest) =>\n    coverTransformOf(index - latest)\n  );\n  const opacity = useTransform(position, (latest) =>\n    coverOpacityOf(index - latest)\n  );\n  const zIndex = useTransform(position, (latest) =>\n    coverStackOf(index - latest)\n  );\n\n  function pick() {\n    onPick(index);\n  }\n\n  return (\n    <motion.li\n      style={{ transform, opacity, zIndex }}\n      onClick={pick}\n      aria-hidden={!isActive}\n      className={cn(\n        'absolute top-0 left-[calc(50%-var(--card-w)/2)] w-(--card-w) cursor-grab select-none active:cursor-grabbing',\n        className\n      )}\n    >\n      <CardFace card={card} />\n    </motion.li>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/cover-card.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/cover-math.ts",
      "content": "export const CARD_STEP = 0.62;\n\nconst FAR_STEP = 0.3;\n\nconst TURN_DEGREES = 42;\n\nconst DEPTH_PX = 80;\n\nconst SCALE_LOSS = 0.1;\n\nconst FADE_FROM = 2;\n\nfunction magnitudeOf(offset: number) {\n  return Math.abs(offset);\n}\n\nfunction shiftOf(offset: number) {\n  const magnitude = magnitudeOf(offset);\n  const near = Math.min(magnitude, 1) * CARD_STEP;\n  const far = Math.max(magnitude - 1, 0) * FAR_STEP;\n  return Math.sign(offset) * (near + far);\n}\n\nfunction turnOf(offset: number) {\n  const bounded = Math.max(-1, Math.min(1, offset));\n  return -bounded * TURN_DEGREES;\n}\n\nfunction scaleOf(offset: number) {\n  const magnitude = Math.min(magnitudeOf(offset), 2);\n  return 1 - magnitude * SCALE_LOSS;\n}\n\nfunction depthOf(offset: number) {\n  const magnitude = Math.min(magnitudeOf(offset), 2);\n  return -magnitude * DEPTH_PX;\n}\n\nexport function coverTransformOf(offset: number) {\n  const shift = shiftOf(offset);\n  const turn = turnOf(offset);\n  const scale = scaleOf(offset);\n  const depth = depthOf(offset);\n  return `translateX(calc(var(--card-w) * ${shift})) translateZ(${depth}px) rotateY(${turn}deg) scale(${scale})`;\n}\n\nexport function coverOpacityOf(offset: number) {\n  const past = magnitudeOf(offset) - FADE_FROM;\n  return Math.max(1 - Math.max(past, 0), 0);\n}\n\nexport function coverStackOf(offset: number) {\n  return 100 - Math.round(magnitudeOf(offset) * 10);\n}\n\nexport function nearestIndexOf(position: number, lastIndex: number) {\n  const rounded = Math.round(position);\n  return Math.min(Math.max(rounded, 0), lastIndex);\n}\n\nexport function heldPositionOf(position: number, lastIndex: number) {\n  if (position < 0) {\n    return position * 0.35;\n  }\n  if (position > lastIndex) {\n    return lastIndex + (position - lastIndex) * 0.35;\n  }\n  return position;\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/cover-math.ts"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/coverflow.tsx",
      "content": "'use client';\n\nimport {\n  animate,\n  useMotionValue,\n  useMotionValueEvent,\n  type AnimationPlaybackControls,\n  type Transition,\n} from 'motion/react';\nimport { useRef, useState } from 'react';\n\nimport { MotionNumber } from '@/components/core/motion-number';\nimport { useAutoplay } from '@/registry/ndeko/hooks/use-autoplay';\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { spokenUnless } from '@/registry/ndeko/lib/demonstration';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { countOf } from '@/registry/ndeko/lib/words';\nimport { Avatar } from '@/registry/ndeko/ui/avatar';\nimport { LiveRegion } from '@/registry/ndeko/ui/live-region';\n\nimport { CoverCard } from './cover-card';\nimport { CARD_STEP, heldPositionOf, nearestIndexOf } from './cover-math';\nimport { CARDS_ANCHOR, CARDS_SECTION, GROUP_CARDS, START_INDEX } from './data';\n\ntype CoverStyle = React.CSSProperties & { '--card-w': string };\n\nconst STAGE_STYLE: CoverStyle = {\n  '--card-w': 'min(66cqw, 19rem)',\n  height: 'calc(var(--card-w) / 1.586 + 1.5rem)',\n};\n\nconst GLIDE: Transition = {\n  type: 'spring',\n  stiffness: 240,\n  damping: 30,\n  mass: 0.9,\n};\n\nconst LAST_INDEX = GROUP_CARDS.length - 1;\n\nconst TOUR_INDEXES = [3, 4, 0, 1, START_INDEX];\n\nconst TOUR_STEP_MS = 2600;\n\nconst DRAG_THRESHOLD_PX = 4;\n\nconst FLING_MS = 220;\n\ntype Press = {\n  pointerId: number;\n  startX: number;\n  startPosition: number;\n  step: number;\n  lastX: number;\n  lastTime: number;\n  velocity: number;\n};\n\nfunction dotToneOf(isActive: boolean) {\n  if (isActive) {\n    return 'bg-foreground';\n  }\n  return 'bg-foreground/25';\n}\n\nexport function Coverflow() {\n  const position = useMotionValue(START_INDEX);\n  const [active, setActive] = useState(START_INDEX);\n  const [isDragging, setIsDragging] = useState(false);\n  const glide = useRef<AnimationPlaybackControls | null>(null);\n  const press = useRef<Press | null>(null);\n  const hasMoved = useRef(false);\n  const shouldReduceMotion = usePrefersReducedMotion();\n\n  useMotionValueEvent(position, 'change', (latest) => {\n    const nearest = nearestIndexOf(latest, LAST_INDEX);\n    setActive(nearest);\n  });\n\n  function goTo(index: number, velocity = 0) {\n    const target = nearestIndexOf(index, LAST_INDEX);\n    glide.current?.stop();\n    if (shouldReduceMotion) {\n      position.set(target);\n      return;\n    }\n    glide.current = animate(position, target, { ...GLIDE, velocity });\n  }\n\n  const tourSteps = TOUR_INDEXES.map((index) => ({\n    after: TOUR_STEP_MS,\n    run: () => goTo(index),\n  }));\n  const { ref, isAutoplaying } = useAutoplay(tourSteps, {\n    loopAfter: TOUR_STEP_MS,\n  });\n\n  function startPress(event: React.PointerEvent<HTMLUListElement>) {\n    const isMouse = event.pointerType === 'mouse';\n    const isMainButton = event.button === 0;\n    if (isMouse && !isMainButton) {\n      return;\n    }\n    const card = event.currentTarget.firstElementChild;\n    if (!(card instanceof HTMLElement)) {\n      return;\n    }\n    glide.current?.stop();\n    hasMoved.current = false;\n    press.current = {\n      pointerId: event.pointerId,\n      startX: event.clientX,\n      startPosition: position.get(),\n      step: card.offsetWidth * CARD_STEP,\n      lastX: event.clientX,\n      lastTime: event.timeStamp,\n      velocity: 0,\n    };\n  }\n\n  function movePress(event: React.PointerEvent<HTMLUListElement>) {\n    const current = press.current;\n    if (!current) {\n      return;\n    }\n    const travel = event.clientX - current.startX;\n    const hasStarted = hasMoved.current;\n    const isPastThreshold = Math.abs(travel) > DRAG_THRESHOLD_PX;\n    if (!hasStarted && !isPastThreshold) {\n      return;\n    }\n    if (!hasStarted) {\n      hasMoved.current = true;\n      setIsDragging(true);\n      event.currentTarget.setPointerCapture(current.pointerId);\n    }\n    const elapsed = event.timeStamp - current.lastTime;\n    if (elapsed > 0) {\n      const speed = (event.clientX - current.lastX) / elapsed;\n      current.velocity = current.velocity * 0.6 + speed * 0.4;\n    }\n    current.lastX = event.clientX;\n    current.lastTime = event.timeStamp;\n    const raw = current.startPosition - travel / current.step;\n    position.set(heldPositionOf(raw, LAST_INDEX));\n  }\n\n  function endPress(event: React.PointerEvent<HTMLUListElement>) {\n    const current = press.current;\n    press.current = null;\n    if (!current) {\n      return;\n    }\n    setIsDragging(false);\n    if (!hasMoved.current) {\n      return;\n    }\n    const scroller = event.currentTarget;\n    if (scroller.hasPointerCapture(event.pointerId)) {\n      scroller.releasePointerCapture(event.pointerId);\n    }\n    const flung = (current.velocity * FLING_MS) / current.step;\n    const target = position.get() - flung;\n    const positionsPerSecond = (-current.velocity * 1000) / current.step;\n    goTo(target, positionsPerSecond);\n  }\n\n  function swallowClickAfterDrag(event: React.MouseEvent<HTMLUListElement>) {\n    if (!hasMoved.current) {\n      return;\n    }\n    hasMoved.current = false;\n    event.preventDefault();\n    event.stopPropagation();\n  }\n\n  function moveWithKeys(event: React.KeyboardEvent<HTMLDivElement>) {\n    if (event.key === 'ArrowLeft') {\n      event.preventDefault();\n      goTo(active - 1);\n    }\n    if (event.key === 'ArrowRight') {\n      event.preventDefault();\n      goTo(active + 1);\n    }\n    if (event.key === 'Home') {\n      event.preventDefault();\n      goTo(0);\n    }\n    if (event.key === 'End') {\n      event.preventDefault();\n      goTo(LAST_INDEX);\n    }\n  }\n\n  const card = GROUP_CARDS[active];\n  const memberCount = countOf(card.members.length, 'member');\n  const message = spokenUnless(isAutoplaying, `${card.name}, ${memberCount}`);\n\n  return (\n    <div\n      ref={ref}\n      id={CARDS_ANCHOR}\n      className='flex flex-col items-center gap-6'\n    >\n      <div\n        role='group'\n        aria-roledescription='carousel'\n        aria-label='Group cards'\n        tabIndex={0}\n        onKeyDown={moveWithKeys}\n        className='focus-visible:ring-ring/25 @container w-full overflow-x-clip rounded-2xl outline-none focus-visible:ring-[3px]'\n      >\n        <ul\n          style={STAGE_STYLE}\n          onPointerDown={startPress}\n          onPointerMove={movePress}\n          onPointerUp={endPress}\n          onPointerCancel={endPress}\n          onClickCapture={swallowClickAfterDrag}\n          className={cn(\n            'relative w-full touch-pan-y [perspective:1200px]',\n            isDragging && 'cursor-grabbing'\n          )}\n        >\n          {GROUP_CARDS.map((groupCard, index) => (\n            <CoverCard\n              key={groupCard.id}\n              card={groupCard}\n              index={index}\n              position={position}\n              isActive={index === active}\n              onPick={goTo}\n            />\n          ))}\n        </ul>\n      </div>\n      <div className='flex flex-col items-center gap-3 text-center'>\n        <div className='flex items-center gap-2'>\n          <div className='flex -space-x-1.5'>\n            {card.members.slice(0, 4).map((member) => (\n              <Avatar\n                key={member}\n                seed={member}\n                role='img'\n                aria-label={member}\n                className='ring-background size-6 ring-2'\n              />\n            ))}\n          </div>\n          <p className='text-sm font-medium'>{card.name}</p>\n          <p className='text-muted-foreground text-xs'>{memberCount}</p>\n        </div>\n        <p className='text-muted-foreground text-xs tabular-nums'>\n          <MotionNumber\n            value={card.spentCents / 100}\n            prefix='$'\n            format={{ minimumFractionDigits: 2, maximumFractionDigits: 2 }}\n          />{' '}\n          spent this month\n        </p>\n        <div role='group' aria-label='Choose a card' className='flex gap-1'>\n          {GROUP_CARDS.map((groupCard, index) => (\n            <button\n              key={groupCard.id}\n              type='button'\n              aria-label={`Show ${groupCard.name}`}\n              aria-pressed={index === active}\n              onClick={() => goTo(index)}\n              className='focus-visible:ring-ring/25 flex size-6 items-center justify-center rounded-full outline-none focus-visible:ring-[3px]'\n            >\n              <span\n                className={cn(\n                  'size-2 rounded-full transition-colors duration-200',\n                  dotToneOf(index === active)\n                )}\n              />\n            </button>\n          ))}\n        </div>\n        <p className='text-muted-foreground text-xs'>{CARDS_SECTION.note}</p>\n        <p className='text-muted-foreground text-xs'>{CARDS_SECTION.hint}</p>\n      </div>\n      <LiveRegion message={message} />\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/coverflow.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/data.ts",
      "content": "import type { SeriesSlot } from '@/registry/ndeko/lib/agent-run';\nimport type { BrandSlug } from '@/registry/ndeko/lib/brand-logos';\nimport {\n  GlobeIcon,\n  HeadphonesIcon,\n  type Icon,\n  ShieldCheckIcon,\n  WalletIcon,\n} from '@/registry/ndeko/lib/icons';\n\nexport const CARDS_ANCHOR = 'cards';\n\nexport const FEED_ANCHOR = 'feed';\n\nexport const PERKS_ANCHOR = 'perks';\n\nexport const LAUNCH_ANCHOR = 'launch';\n\nexport type NavLink = {\n  id: string;\n  label: string;\n  href: string;\n};\n\nexport const NAV_LINKS: NavLink[] = [\n  { id: 'cards', label: 'Cards', href: `#${CARDS_ANCHOR}` },\n  { id: 'feed', label: 'Live feed', href: `#${FEED_ANCHOR}` },\n  { id: 'perks', label: 'Perks', href: `#${PERKS_ANCHOR}` },\n  { id: 'launch', label: 'Launch', href: `#${LAUNCH_ANCHOR}` },\n];\n\nexport const BRAND = {\n  name: 'Tallypot',\n  tagline: 'A payment card a group shares',\n  copyright: '© 2026 Tallypot',\n};\n\nexport const HEADER = {\n  action: 'Reserve a card',\n  shortAction: 'Reserve',\n  actionHref: `#${LAUNCH_ANCHOR}`,\n};\n\nexport const HERO = {\n  eyebrow: 'Launching soon',\n  title: 'One card for the whole group',\n  description:\n    'Tallypot is a payment card a group shares. Everyone pays with it, everyone sees who paid what, and the split is settled before the receipt is printed.',\n  primaryAction: 'Reserve a card',\n  secondaryAction: 'Watch a split happen',\n};\n\nexport type GroupCard = {\n  id: string;\n  name: string;\n  series: SeriesSlot;\n  network: BrandSlug;\n  networkName: string;\n  last4: string;\n  members: string[];\n  spentCents: number;\n};\n\nexport const CARDS_SECTION = {\n  note: 'Illustrative groups and balances',\n  hint: 'Drag the cards, use the arrow keys or pick a dot',\n};\n\nexport const START_INDEX = 2;\n\nexport const GROUP_CARDS: GroupCard[] = [\n  {\n    id: 'lisbon',\n    name: 'Lisbon trip',\n    series: 1,\n    network: 'visa',\n    networkName: 'Visa',\n    last4: '4821',\n    members: ['Amani Kasongo', 'Inès Duarte', 'Kofi Asante', 'Mira Holm'],\n    spentCents: 128450,\n  },\n  {\n    id: 'flat',\n    name: 'Flat 4B',\n    series: 2,\n    network: 'mastercard',\n    networkName: 'Mastercard',\n    last4: '9034',\n    members: ['Esther Mbuyi', 'Peter Otieno', 'Marta Silva'],\n    spentCents: 64210,\n  },\n  {\n    id: 'lunch',\n    name: 'Team lunches',\n    series: 3,\n    network: 'visa',\n    networkName: 'Visa',\n    last4: '7716',\n    members: [\n      'Samuel Mukendi',\n      'Naomi Lutumba',\n      'Daniel Okafor',\n      'Camille Ndala',\n      'Aline Kabongo',\n    ],\n    spentCents: 31890,\n  },\n  {\n    id: 'wedding',\n    name: 'Lubumbashi wedding',\n    series: 4,\n    network: 'mastercard',\n    networkName: 'Mastercard',\n    last4: '2250',\n    members: [\n      'Aline Kabongo',\n      'Samuel Mukendi',\n      'Esther Mbuyi',\n      'Amani Kasongo',\n    ],\n    spentCents: 482000,\n  },\n  {\n    id: 'climbing',\n    name: 'Climbing club',\n    series: 5,\n    network: 'visa',\n    networkName: 'Visa',\n    last4: '6602',\n    members: ['Peter Otieno', 'Mira Holm', 'Kofi Asante'],\n    spentCents: 18775,\n  },\n];\n\nexport const GOAL = {\n  title: 'A pot that reaches its goal',\n  description:\n    'Set a goal for the group and every payment moves the pot closer. When it is reached, everyone sees it at once.',\n  caption: 'Lubumbashi wedding fund, pooled by 4 people',\n  figure: 4820,\n  note: 'Illustrative figure',\n  replay: 'Drop it again',\n};\n\nexport type FeedEvent = {\n  id: string;\n  payer: string;\n  place: string;\n  amountCents: number;\n  ways: number;\n  owing: string[];\n};\n\nexport const FEED_SECTION = {\n  title: 'See who paid what as it happens',\n  description:\n    'Each payment shows up with its split. Open a row to see who owes their share.',\n  totalLabel: 'Spent this month',\n  yourShareLabel: 'Your share',\n  note: 'Illustrative group, names and amounts',\n};\n\nexport const FEED_START_CENTS = 128450;\n\nexport const YOUR_SHARE = 0.25;\n\nexport const FEED_EVENTS: FeedEvent[] = [\n  {\n    id: 'market',\n    payer: 'Amani Kasongo',\n    place: 'Fish market, Marché Central',\n    amountCents: 4200,\n    ways: 4,\n    owing: ['Inès Duarte', 'Kofi Asante', 'Mira Holm'],\n  },\n  {\n    id: 'taxi',\n    payer: 'Inès Duarte',\n    place: 'Taxi to the airport',\n    amountCents: 1840,\n    ways: 4,\n    owing: ['Amani Kasongo', 'Kofi Asante', 'Mira Holm'],\n  },\n  {\n    id: 'dinner',\n    payer: 'Kofi Asante',\n    place: 'Dinner by the river',\n    amountCents: 9600,\n    ways: 4,\n    owing: ['Amani Kasongo', 'Inès Duarte', 'Mira Holm'],\n  },\n  {\n    id: 'coffee',\n    payer: 'Mira Holm',\n    place: 'Coffee, morning',\n    amountCents: 720,\n    ways: 2,\n    owing: ['Kofi Asante'],\n  },\n  {\n    id: 'apartment',\n    payer: 'Amani Kasongo',\n    place: 'Apartment, two nights',\n    amountCents: 21000,\n    ways: 4,\n    owing: ['Inès Duarte', 'Kofi Asante', 'Mira Holm'],\n  },\n  {\n    id: 'groceries',\n    payer: 'Inès Duarte',\n    place: 'Groceries',\n    amountCents: 3360,\n    ways: 4,\n    owing: ['Amani Kasongo', 'Kofi Asante', 'Mira Holm'],\n  },\n  {\n    id: 'metro',\n    payer: 'Kofi Asante',\n    place: 'Metro tickets',\n    amountCents: 1400,\n    ways: 4,\n    owing: ['Amani Kasongo', 'Inès Duarte', 'Mira Holm'],\n  },\n  {\n    id: 'boat',\n    payer: 'Mira Holm',\n    place: 'Boat tour',\n    amountCents: 6400,\n    ways: 4,\n    owing: ['Amani Kasongo', 'Inès Duarte', 'Kofi Asante'],\n  },\n];\n\nexport const FEED_VISIBLE = 4;\n\nexport type Perk = {\n  id: string;\n  icon: Icon;\n  title: string;\n  description: string;\n  threshold: number;\n};\n\nexport const PERKS_SECTION = {\n  title: 'Perks the group earns together',\n  description:\n    'Move the slider to the group spend of a month. Each perk fills as the group gets closer to it and ticks when it is reached.',\n  spendLabel: 'Group spend in a month',\n  note: 'Illustrative perks and thresholds, in US dollars',\n};\n\nexport const SPEND_RANGE = { min: 0, max: 2400, step: 50 };\n\nexport const DEFAULT_SPEND = 1900;\n\nexport const PERKS: Perk[] = [\n  {\n    id: 'fx',\n    icon: GlobeIcon,\n    title: 'No foreign fee',\n    description: 'Pay abroad at the rate of the day with nothing added',\n    threshold: 300,\n  },\n  {\n    id: 'cashback',\n    icon: WalletIcon,\n    title: 'Group cashback',\n    description: 'A share of the monthly spend returns to the pot',\n    threshold: 800,\n  },\n  {\n    id: 'cover',\n    icon: ShieldCheckIcon,\n    title: 'Trip cover',\n    description: 'Delays and lost bags are covered for the whole group',\n    threshold: 1500,\n  },\n  {\n    id: 'support',\n    icon: HeadphonesIcon,\n    title: 'Priority support',\n    description: 'A person answers within the hour',\n    threshold: 2200,\n  },\n];\n\nexport const LAUNCH = {\n  title: 'Cards ship on 1 February 2027',\n  description:\n    'Reserve a card now and the first group on the list gets it first. Reserving costs nothing and can be cancelled.',\n  at: Date.UTC(2027, 1, 1, 8, 0, 0),\n  units: ['Days', 'Hours', 'Minutes', 'Seconds'],\n  launched: 'Cards are shipping',\n  action: 'Reserve a card',\n};\n\nexport const SHARE = {\n  title: 'Invite the group before the card arrives',\n  description:\n    'Send the link to the people who will pay with the card. They join the group, and their share is ready on day one.',\n  link: 'tallypot.example/join/lisbon-4821',\n  shareTitle: 'Join our Tallypot group',\n  shareText: 'Join the Lisbon trip group on Tallypot',\n  copyLabel: 'Copy link',\n  shareLabel: 'Share',\n  members: ['Amani Kasongo', 'Inès Duarte', 'Kofi Asante'],\n  invited: 'Mira Holm',\n  networksTitle: 'Pays where you already pay',\n};\n\nexport type NetworkMark = {\n  id: BrandSlug;\n  name: string;\n};\n\nexport const NETWORKS: NetworkMark[] = [\n  { id: 'applepay', name: 'Apple Pay' },\n  { id: 'googlepay', name: 'Google Pay' },\n  { id: 'visa', name: 'Visa' },\n  { id: 'mastercard', name: 'Mastercard' },\n];\n\nexport type FooterLink = {\n  label: string;\n  href: string;\n};\n\nexport const FOOTER_LINKS: FooterLink[] = [\n  { label: 'Cards', href: `#${CARDS_ANCHOR}` },\n  { label: 'Privacy', href: '#' },\n  { label: 'Terms', href: '#' },\n  { label: 'Contact', href: '#' },\n];\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/data.ts"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/feed-session.ts",
      "content": "import type {\n  SessionConfig,\n  SessionStep,\n} from '@/registry/ndeko/hooks/use-session';\n\nimport {\n  FEED_EVENTS,\n  FEED_START_CENTS,\n  FEED_VISIBLE,\n  YOUR_SHARE,\n  type FeedEvent,\n} from './data';\n\nexport type FeedState = {\n  arrived: number;\n  openId: string | null;\n};\n\nexport type FeedAction = { type: 'arrived' } | { type: 'toggled'; id: string };\n\ntype Step = SessionStep<FeedState, FeedAction>;\n\nexport const INITIAL: FeedState = { arrived: 2, openId: null };\n\nexport const RESTING: FeedState = { arrived: 4, openId: null };\n\nexport function reducer(state: FeedState, action: FeedAction): FeedState {\n  switch (action.type) {\n    case 'arrived':\n      return {\n        ...state,\n        arrived: Math.min(state.arrived + 1, FEED_EVENTS.length),\n      };\n    case 'toggled':\n      if (state.openId === action.id) {\n        return { ...state, openId: null };\n      }\n      return { ...state, openId: action.id };\n  }\n}\n\nexport function shownEventsOf(state: FeedState): FeedEvent[] {\n  const arrived = FEED_EVENTS.slice(0, state.arrived);\n  const latest = arrived.slice(-FEED_VISIBLE);\n  return latest.reverse();\n}\n\nexport function spentCentsOf(state: FeedState) {\n  const arrived = FEED_EVENTS.slice(0, state.arrived);\n  let total = FEED_START_CENTS;\n  for (const event of arrived) {\n    total += event.amountCents;\n  }\n  return total;\n}\n\nexport function yourShareCentsOf(state: FeedState) {\n  return Math.round(spentCentsOf(state) * YOUR_SHARE);\n}\n\nconst ARRIVAL_MS = 2300;\n\nfunction arrivalSteps() {\n  const remaining = FEED_EVENTS.length - INITIAL.arrived;\n  const steps: Step[] = [];\n  for (let index = 0; index < remaining; index += 1) {\n    steps.push({ after: ARRIVAL_MS, by: 'demo', action: { type: 'arrived' } });\n  }\n  return steps;\n}\n\nexport const SESSION: SessionConfig<FeedState, FeedAction> = {\n  reducer,\n  initial: INITIAL,\n  resting: RESTING,\n  script: arrivalSteps(),\n  loopAfter: 3200,\n};\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/feed-session.ts"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/feed.tsx",
      "content": "'use client';\n\nimport { AnimatePresence, motion } from 'motion/react';\nimport { useId } from 'react';\n\nimport { MotionNumber } from '@/components/core/motion-number';\nimport { useKeptHeight } from '@/registry/ndeko/hooks/use-kept-height';\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { useSession } from '@/registry/ndeko/hooks/use-session';\nimport { ChevronDownIcon } from '@/registry/ndeko/lib/icons';\nimport { rowPresenceOf } from '@/registry/ndeko/lib/motion-presets';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Avatar } from '@/registry/ndeko/ui/avatar';\nimport { Badge } from '@/registry/ndeko/ui/badge';\nimport { Fold } from '@/registry/ndeko/ui/chat-motion';\nimport { SettleItem } from '@/registry/ndeko/ui/settle';\n\nimport { FEED_ANCHOR, FEED_SECTION, GROUP_CARDS, type FeedEvent } from './data';\nimport {\n  SESSION,\n  shownEventsOf,\n  spentCentsOf,\n  yourShareCentsOf,\n} from './feed-session';\nimport { CENTS_FORMAT, moneyOf } from './money';\nimport { PopShape } from './pop-shape';\nimport { Reveal } from './reveal';\n\nconst LISBON = GROUP_CARDS[0];\n\nfunction shareCentsOf(event: FeedEvent) {\n  return Math.round(event.amountCents / event.ways);\n}\n\ntype FeedRowProps = {\n  event: FeedEvent;\n  isOpen: boolean;\n  onToggle: (id: string) => void;\n};\n\nfunction FeedRow({ event, isOpen, onToggle }: FeedRowProps) {\n  const panelId = useId();\n  const shareCents = shareCentsOf(event);\n\n  function toggle() {\n    onToggle(event.id);\n  }\n\n  return (\n    <div className='flex flex-col'>\n      <button\n        type='button'\n        aria-expanded={isOpen}\n        aria-controls={panelId}\n        onClick={toggle}\n        className='hover:bg-foreground/[0.03] focus-visible:ring-ring/25 flex w-full items-center gap-3 rounded-xl p-3 text-start transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-inset'\n      >\n        <Avatar\n          seed={event.payer}\n          role='img'\n          aria-label={event.payer}\n          className='size-8'\n        />\n        <span className='flex min-w-0 flex-1 flex-col gap-0.5'>\n          <span className='truncate text-[13px] font-medium'>\n            {event.payer} paid\n          </span>\n          <span className='text-muted-foreground truncate text-xs'>\n            {event.place}\n          </span>\n        </span>\n        <span className='flex shrink-0 flex-col items-end gap-0.5'>\n          <span className='text-[13px] font-medium tabular-nums'>\n            {moneyOf(event.amountCents)}\n          </span>\n          <span className='text-muted-foreground text-xs tabular-nums'>\n            {event.ways} ways\n          </span>\n        </span>\n        <ChevronDownIcon\n          className={cn(\n            'text-muted-foreground size-4 shrink-0 transition-transform duration-200 ease-(--ease-out-strong)',\n            isOpen && 'rotate-180'\n          )}\n        />\n      </button>\n      <Fold open={isOpen} id={panelId}>\n        <ul className='flex flex-wrap gap-2 px-3 ps-14 pb-3'>\n          {event.owing.map((name) => (\n            <li\n              key={name}\n              className='bg-foreground/[0.05] flex items-center gap-1.5 rounded-full py-1 ps-1 pe-2.5 text-xs'\n            >\n              <Avatar\n                seed={name}\n                role='img'\n                aria-label={name}\n                className='size-5'\n              />\n              <span>{name.split(' ')[0]}</span>\n              <Badge variant='warning'>owes {moneyOf(shareCents)}</Badge>\n            </li>\n          ))}\n        </ul>\n      </Fold>\n    </div>\n  );\n}\n\nexport function Feed() {\n  const { ref, state, act } = useSession(SESSION);\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const presence = rowPresenceOf(shouldReduceMotion);\n  const events = shownEventsOf(state);\n  const spentCents = spentCentsOf(state);\n  const shareCents = yourShareCentsOf(state);\n  useKeptHeight(ref);\n\n  function toggleRow(id: string) {\n    act({ type: 'toggled', id });\n  }\n\n  return (\n    <section\n      id={FEED_ANCHOR}\n      className='relative overflow-x-clip px-4 py-16 @sm:px-6 @sm:py-20 @5xl:px-8'\n    >\n      <PopShape\n        kind='square'\n        series={3}\n        className='top-12 right-6 size-10 -rotate-6 @3xl:top-20 @3xl:right-24 @3xl:size-14'\n      />\n      <Reveal\n        className='mx-auto max-w-6xl'\n        groupClassName='flex flex-col gap-8'\n      >\n        <SettleItem className='flex max-w-2xl flex-col gap-3'>\n          <h2 className='text-2xl font-semibold text-balance @2xl:text-3xl'>\n            {FEED_SECTION.title}\n          </h2>\n          <p className='text-muted-foreground text-base text-pretty'>\n            {FEED_SECTION.description}\n          </p>\n        </SettleItem>\n        <SettleItem>\n          <div\n            ref={ref}\n            className='bg-foreground/[0.03] grid min-h-[34rem] gap-2 rounded-2xl p-2 @3xl:min-h-[26rem] @3xl:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] @3xl:gap-3 @3xl:p-3'\n          >\n            <div className='bg-card hairline-ring ring-border dark:bg-foreground/[0.04] flex flex-col justify-between gap-6 rounded-xl p-5 shadow-[0_1px_2px_rgb(0_0_0/0.04)]'>\n              <div className='flex flex-col gap-1'>\n                <p className='text-muted-foreground text-xs'>\n                  {LISBON.name}, {FEED_SECTION.totalLabel.toLowerCase()}\n                </p>\n                <p className='text-4xl font-semibold tabular-nums'>\n                  <MotionNumber\n                    value={spentCents / 100}\n                    prefix='$'\n                    format={CENTS_FORMAT}\n                  />\n                </p>\n              </div>\n              <div className='flex items-end justify-between gap-3'>\n                <div className='flex flex-col gap-1'>\n                  <p className='text-muted-foreground text-xs'>\n                    {FEED_SECTION.yourShareLabel}\n                  </p>\n                  <p className='text-xl font-medium tabular-nums'>\n                    <MotionNumber\n                      value={shareCents / 100}\n                      prefix='$'\n                      format={CENTS_FORMAT}\n                    />\n                  </p>\n                </div>\n                <div className='flex -space-x-1.5'>\n                  {LISBON.members.map((member) => (\n                    <Avatar\n                      key={member}\n                      seed={member}\n                      role='img'\n                      aria-label={member}\n                      className='ring-card size-7 ring-2'\n                    />\n                  ))}\n                </div>\n              </div>\n              <p className='text-muted-foreground text-xs'>\n                {FEED_SECTION.note}\n              </p>\n            </div>\n            <ul className='bg-card hairline-ring ring-border dark:bg-foreground/[0.04] flex flex-col rounded-xl p-1 shadow-[0_1px_2px_rgb(0_0_0/0.04)]'>\n              <AnimatePresence initial={false}>\n                {events.map((event) => (\n                  <motion.li\n                    key={event.id}\n                    initial={presence.initial}\n                    animate={presence.animate}\n                    exit={presence.exit}\n                    transition={presence.transition}\n                    className='overflow-hidden'\n                  >\n                    <FeedRow\n                      event={event}\n                      isOpen={state.openId === event.id}\n                      onToggle={toggleRow}\n                    />\n                  </motion.li>\n                ))}\n              </AnimatePresence>\n            </ul>\n          </div>\n        </SettleItem>\n      </Reveal>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/feed.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/flap-digit.tsx",
      "content": "'use client';\n\nimport { motion } from 'motion/react';\nimport { useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { EASE_IN_OUT_STRONG } from '@/registry/ndeko/lib/motion-presets';\nimport { cn } from '@/registry/ndeko/lib/utils';\n\ntype Part = 'top' | 'bottom';\n\nconst FLIP_SECONDS = 0.42;\n\nconst FLIP_FROM = { rotateX: 0 };\n\nconst FLIP_TO = { rotateX: -180 };\n\nconst FACE_HIDDEN = '[backface-visibility:hidden]';\n\nfunction glyphShiftOf(part: Part) {\n  if (part === 'top') {\n    return 'top-0';\n  }\n  return '-top-full';\n}\n\nfunction halfPlaceOf(part: Part) {\n  if (part === 'top') {\n    return 'top-0 rounded-t-lg';\n  }\n  return 'bottom-0 rounded-b-lg';\n}\n\ntype FaceProps = {\n  digit: number;\n  part: Part;\n  className?: string;\n};\n\nfunction Face({ digit, part, className }: FaceProps) {\n  return (\n    <span className={cn('bg-card absolute inset-0 overflow-hidden', className)}>\n      <span\n        className={cn(\n          'absolute inset-x-0 flex h-[200%] items-center justify-center',\n          glyphShiftOf(part)\n        )}\n      >\n        {digit}\n      </span>\n    </span>\n  );\n}\n\nfunction StaticHalf({ digit, part }: { digit: number; part: Part }) {\n  return (\n    <span\n      className={cn(\n        'absolute inset-x-0 h-1/2 overflow-hidden',\n        halfPlaceOf(part)\n      )}\n    >\n      <Face digit={digit} part={part} />\n    </span>\n  );\n}\n\nfunction lowerDigitOf(\n  isFlipping: boolean,\n  previous: number | null,\n  current: number\n) {\n  if (isFlipping && previous !== null) {\n    return previous;\n  }\n  return current;\n}\n\nexport function FlapDigit({ value }: { value: number }) {\n  const [current, setCurrent] = useState(value);\n  const [previous, setPrevious] = useState<number | null>(null);\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const hasChanged = value !== current;\n  if (hasChanged) {\n    setPrevious(current);\n    setCurrent(value);\n  }\n  const isFlipping = previous !== null && !shouldReduceMotion;\n  const lowerDigit = lowerDigitOf(isFlipping, previous, current);\n\n  function land() {\n    setPrevious(null);\n  }\n\n  return (\n    <span className='hairline-ring ring-border text-foreground relative inline-block h-14 w-9 rounded-lg text-3xl font-semibold tabular-nums shadow-[0_1px_2px_rgb(0_0_0/0.05)] [perspective:360px] @sm:h-16 @sm:w-11 @sm:text-4xl'>\n      <StaticHalf digit={current} part='top' />\n      <StaticHalf digit={lowerDigit} part='bottom' />\n      {isFlipping && (\n        <motion.span\n          key={`${previous}-${current}`}\n          initial={FLIP_FROM}\n          animate={FLIP_TO}\n          transition={{ duration: FLIP_SECONDS, ease: EASE_IN_OUT_STRONG }}\n          onAnimationComplete={land}\n          className='absolute inset-x-0 top-0 z-10 h-1/2 origin-bottom [transform-style:preserve-3d]'\n        >\n          <Face\n            digit={previous}\n            part='top'\n            className={cn('rounded-t-lg', FACE_HIDDEN)}\n          />\n          <Face\n            digit={current}\n            part='bottom'\n            className={cn(\n              '[transform:rotateX(180deg)] rounded-b-lg',\n              FACE_HIDDEN\n            )}\n          />\n        </motion.span>\n      )}\n      <span\n        aria-hidden='true'\n        className='bg-border absolute inset-x-0 top-1/2 z-20 h-(--hairline)'\n      />\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/flap-digit.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/goal-figure.tsx",
      "content": "'use client';\n\nimport { motion, useInView, type Transition } from 'motion/react';\nimport { useEffect, useRef, useState } from 'react';\n\nimport { confetti } from '@/components/core/confetti';\nimport { MotionNumber } from '@/components/core/motion-number';\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { EASE_OUT_STRONG } from '@/registry/ndeko/lib/motion-presets';\nimport { ReplayButton } from '@/registry/ndeko/ui/replay-button';\nimport { SettleItem } from '@/registry/ndeko/ui/settle';\n\nimport { GOAL } from './data';\nimport { PopShape } from './pop-shape';\nimport { Reveal } from './reveal';\n\nconst SEEN_ONCE = { once: true, amount: 0.6 } as const;\n\nconst CONFETTI_COLORS = [\n  'var(--primary)',\n  'var(--series-2)',\n  'var(--series-3)',\n  'var(--series-4)',\n  'var(--series-5)',\n];\n\nconst DROP: Transition = { duration: 0.55, ease: EASE_OUT_STRONG };\n\nconst FADE: Transition = { duration: 0.2 };\n\nconst HIDDEN = { y: -56, opacity: 0, scale: 1.04 };\n\nconst LANDED = { y: 0, opacity: 1, scale: 1 };\n\nconst HIDDEN_STILL = { opacity: 0 };\n\nconst LANDED_STILL = { opacity: 1 };\n\nfunction startOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return HIDDEN_STILL;\n  }\n  return HIDDEN;\n}\n\nfunction endOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return LANDED_STILL;\n  }\n  return LANDED;\n}\n\nfunction figureStateOf(isInView: boolean, shouldReduceMotion: boolean | null) {\n  if (isInView) {\n    return endOf(shouldReduceMotion);\n  }\n  return startOf(shouldReduceMotion);\n}\n\nfunction dropOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE;\n  }\n  return DROP;\n}\n\nexport function GoalFigure() {\n  const sectionRef = useRef<HTMLDivElement>(null);\n  const figureRef = useRef<HTMLParagraphElement>(null);\n  const isInView = useInView(sectionRef, SEEN_ONCE);\n  const [value, setValue] = useState(0);\n  const [round, setRound] = useState(0);\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const hasLanded = value > 0;\n\n  useEffect(() => {\n    if (!isInView) {\n      return;\n    }\n    const landing = setTimeout(() => setValue(GOAL.figure), 150);\n    const burst = setTimeout(() => {\n      const figure = figureRef.current;\n      if (!figure) {\n        return;\n      }\n      void confetti({\n        origin: figure,\n        particleCount: 80,\n        spread: 100,\n        velocity: 34,\n        colors: CONFETTI_COLORS,\n      });\n    }, 700);\n    return () => {\n      clearTimeout(landing);\n      clearTimeout(burst);\n    };\n  }, [isInView, round]);\n\n  function replay() {\n    setValue(0);\n    setRound((count) => count + 1);\n  }\n\n  return (\n    <section className='relative overflow-x-clip px-4 py-16 @sm:px-6 @sm:py-24 @5xl:px-8'>\n      <PopShape\n        kind='pill'\n        series={5}\n        className='top-12 left-4 h-6 w-16 -rotate-12 @3xl:top-20 @3xl:left-24 @3xl:h-8 @3xl:w-24'\n      />\n      <PopShape\n        kind='circle'\n        series={1}\n        delay={0.1}\n        className='right-6 bottom-16 size-10 @3xl:right-28 @3xl:bottom-24 @3xl:size-14'\n      />\n      <Reveal\n        className='mx-auto max-w-3xl'\n        groupClassName='flex flex-col items-center gap-6 text-center'\n      >\n        <SettleItem className='flex flex-col gap-3'>\n          <h2 className='text-2xl font-semibold text-balance @2xl:text-3xl'>\n            {GOAL.title}\n          </h2>\n          <p className='text-muted-foreground mx-auto max-w-xl text-base text-pretty'>\n            {GOAL.description}\n          </p>\n        </SettleItem>\n        <SettleItem>\n          <div ref={sectionRef} className='flex flex-col items-center gap-3'>\n            <motion.p\n              key={round}\n              ref={figureRef}\n              initial={startOf(shouldReduceMotion)}\n              animate={figureStateOf(isInView, shouldReduceMotion)}\n              transition={dropOf(shouldReduceMotion)}\n              className='text-6xl font-semibold tabular-nums @2xl:text-8xl'\n            >\n              <MotionNumber value={value} prefix='$' />\n            </motion.p>\n            <p className='text-muted-foreground text-sm'>{GOAL.caption}</p>\n            <p className='text-muted-foreground text-xs'>{GOAL.note}</p>\n            <ReplayButton\n              isShown={hasLanded}\n              onReplay={replay}\n              label={GOAL.replay}\n            />\n          </div>\n        </SettleItem>\n      </Reveal>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/goal-figure.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/hero.tsx",
      "content": "import { ArrowRightIcon } from '@/registry/ndeko/lib/icons';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { Settle, SettleItem } from '@/registry/ndeko/ui/settle';\n\nimport { Coverflow } from './coverflow';\nimport { FEED_ANCHOR, HERO, LAUNCH_ANCHOR } from './data';\nimport { PopShape } from './pop-shape';\n\nexport function Hero() {\n  return (\n    <section className='relative overflow-x-clip px-4 pt-12 pb-12 @sm:px-6 @sm:pt-20 @5xl:px-8'>\n      <PopShape\n        kind='circle'\n        series={2}\n        className='top-10 left-4 size-10 @3xl:top-16 @3xl:left-16 @3xl:size-16'\n      />\n      <PopShape\n        kind='ring'\n        series={3}\n        delay={0.08}\n        className='top-24 right-4 size-12 @3xl:top-32 @3xl:right-20 @3xl:size-20'\n      />\n      <PopShape\n        kind='square'\n        series={4}\n        delay={0.16}\n        className='bottom-48 left-6 size-8 rotate-12 @3xl:bottom-60 @3xl:left-24 @3xl:size-12'\n      />\n      <Settle\n        isShown\n        className='relative mx-auto flex max-w-6xl flex-col items-center gap-10'\n      >\n        <div className='flex max-w-2xl flex-col items-center gap-5 text-center'>\n          <SettleItem>\n            <p className='text-primary-ink text-xs font-medium'>\n              {HERO.eyebrow}\n            </p>\n          </SettleItem>\n          <SettleItem>\n            <h1 className='text-4xl font-semibold text-balance @2xl:text-6xl'>\n              {HERO.title}\n            </h1>\n          </SettleItem>\n          <SettleItem>\n            <p className='text-muted-foreground text-base text-pretty'>\n              {HERO.description}\n            </p>\n          </SettleItem>\n          <SettleItem>\n            <div className='flex flex-wrap justify-center gap-2 pt-1'>\n              <Button\n                size='lg'\n                nativeButton={false}\n                render={<a href={`#${LAUNCH_ANCHOR}`} />}\n              >\n                {HERO.primaryAction}\n                <ArrowRightIcon />\n              </Button>\n              <Button\n                size='lg'\n                variant='outline'\n                nativeButton={false}\n                render={<a href={`#${FEED_ANCHOR}`} />}\n              >\n                {HERO.secondaryAction}\n              </Button>\n            </div>\n          </SettleItem>\n        </div>\n        <SettleItem className='w-full'>\n          <Coverflow />\n        </SettleItem>\n      </Settle>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/hero.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/mobile-sheet.tsx",
      "content": "'use client';\n\nimport { useRef, useState } from 'react';\n\nimport { MenuIcon } from '@/registry/ndeko/lib/icons';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport {\n  Sheet,\n  SheetContent,\n  SheetDescription,\n  SheetFooter,\n  SheetHeader,\n  SheetTitle,\n  SheetTrigger,\n} from '@/registry/ndeko/ui/sheet';\n\nimport { TallypotMark } from './brand-mark';\nimport { BRAND, HEADER, type NavLink } from './data';\nimport { scrollToSection, sectionHashOf } from './section-link';\n\ntype MobileSheetProps = {\n  links: NavLink[];\n};\n\nexport function MobileSheet({ links }: MobileSheetProps) {\n  const [isOpen, setIsOpen] = useState(false);\n  const [shouldReturnFocus, setShouldReturnFocus] = useState(true);\n  const pendingHashRef = useRef<string | null>(null);\n\n  function changeOpen(open: boolean) {\n    if (open) {\n      setShouldReturnFocus(true);\n    }\n    setIsOpen(open);\n  }\n\n  function followLink(event: React.MouseEvent<HTMLElement>) {\n    const href = event.currentTarget.getAttribute('href');\n    const sectionHash = sectionHashOf(href);\n    setShouldReturnFocus(false);\n    setIsOpen(false);\n    if (sectionHash === null) {\n      return;\n    }\n    event.preventDefault();\n    pendingHashRef.current = sectionHash;\n  }\n\n  function finishOpenChange(open: boolean) {\n    const pendingHash = pendingHashRef.current;\n    pendingHashRef.current = null;\n    if (open) {\n      return;\n    }\n    if (pendingHash === null) {\n      return;\n    }\n    scrollToSection(pendingHash);\n  }\n\n  return (\n    <Sheet\n      open={isOpen}\n      onOpenChange={changeOpen}\n      onOpenChangeComplete={finishOpenChange}\n    >\n      <SheetTrigger\n        render={\n          <Button\n            variant='ghost'\n            size='icon'\n            className='@3xl:hidden'\n            aria-label='Open menu'\n          />\n        }\n      >\n        <MenuIcon />\n      </SheetTrigger>\n      <SheetContent side='right' finalFocus={shouldReturnFocus}>\n        <SheetHeader>\n          <SheetTitle className='flex items-center gap-2'>\n            <TallypotMark />\n            {BRAND.name}\n          </SheetTitle>\n          <SheetDescription>{BRAND.tagline}</SheetDescription>\n        </SheetHeader>\n        <nav aria-label='Main'>\n          <ul className='flex flex-col gap-0.5'>\n            {links.map((link) => (\n              <li key={link.id}>\n                <a\n                  href={link.href}\n                  onClick={followLink}\n                  className='text-foreground hover:bg-foreground/5 focus-visible:ring-ring/25 flex h-11 items-center rounded-md px-3 text-base font-medium transition-colors outline-none focus-visible:ring-[3px]'\n                >\n                  {link.label}\n                </a>\n              </li>\n            ))}\n          </ul>\n        </nav>\n        <SheetFooter>\n          <Button\n            size='lg'\n            nativeButton={false}\n            render={<a href={HEADER.actionHref} />}\n            onClick={followLink}\n          >\n            {HEADER.action}\n          </Button>\n        </SheetFooter>\n      </SheetContent>\n    </Sheet>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/mobile-sheet.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/money.ts",
      "content": "const MONEY_FORMAT = new Intl.NumberFormat('en-US', {\n  style: 'currency',\n  currency: 'USD',\n});\n\nexport function moneyOf(cents: number) {\n  return MONEY_FORMAT.format(cents / 100);\n}\n\nexport const CENTS_FORMAT = {\n  minimumFractionDigits: 2,\n  maximumFractionDigits: 2,\n} as const;\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/money.ts"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/nav-links.tsx",
      "content": "'use client';\n\nimport { AnimatePresence, motion, type Transition } from 'motion/react';\nimport { useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\n\nimport { type NavLink } from './data';\n\nconst HIGHLIGHT_TRANSITION: Transition = {\n  type: 'spring',\n  bounce: 0,\n  duration: 0.3,\n};\n\nconst INSTANT_LAYOUT: Transition = {\n  layout: { duration: 0 },\n  opacity: { duration: 0.15 },\n};\n\nfunction highlightTransitionOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return INSTANT_LAYOUT;\n  }\n  return HIGHLIGHT_TRANSITION;\n}\n\ntype NavLinksProps = {\n  links: NavLink[];\n};\n\nexport function NavLinks({ links }: NavLinksProps) {\n  const [hoveredId, setHoveredId] = useState<string | null>(null);\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const highlightTransition = highlightTransitionOf(shouldReduceMotion);\n\n  function clearHover() {\n    setHoveredId(null);\n  }\n\n  return (\n    <nav aria-label='Main'>\n      <ul className='flex items-center' onPointerLeave={clearHover}>\n        {links.map((link) => {\n          const isHovered = hoveredId === link.id;\n\n          function highlight() {\n            setHoveredId(link.id);\n          }\n\n          return (\n            <li key={link.id}>\n              <a\n                href={link.href}\n                onPointerEnter={highlight}\n                onFocus={highlight}\n                onBlur={clearHover}\n                className='text-muted-foreground hover:text-foreground focus-visible:ring-ring/25 relative inline-flex h-8 items-center rounded-full px-3 text-[13px] font-medium transition-colors outline-none focus-visible:ring-[3px]'\n              >\n                <AnimatePresence>\n                  {isHovered && (\n                    <motion.span\n                      layoutId='marketing-07-nav-highlight'\n                      aria-hidden='true'\n                      className='bg-foreground/5 absolute inset-0 rounded-full'\n                      initial={{ opacity: 0 }}\n                      animate={{ opacity: 1 }}\n                      exit={{ opacity: 0 }}\n                      transition={highlightTransition}\n                    />\n                  )}\n                </AnimatePresence>\n                <span className='relative'>{link.label}</span>\n              </a>\n            </li>\n          );\n        })}\n      </ul>\n    </nav>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/nav-links.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/perks-path.ts",
      "content": "import { DEFAULT_SPEND, SPEND_RANGE } from './data';\n\nexport type SpendStep = {\n  after: number;\n  value: number;\n};\n\nconst WAYPOINTS = [2400, 300, 1200, DEFAULT_SPEND];\n\nconst HOLD_MS = 900;\n\nconst TICK_MS = 60;\n\nfunction delayOf(isFirstOfLeg: boolean) {\n  if (isFirstOfLeg) {\n    return HOLD_MS;\n  }\n  return TICK_MS;\n}\n\nfunction pathOf(start: number, waypoints: number[]) {\n  const steps: SpendStep[] = [];\n  let current = start;\n  for (const target of waypoints) {\n    const direction = Math.sign(target - current);\n    let isFirstOfLeg = true;\n    while (current !== target) {\n      current += direction * SPEND_RANGE.step;\n      steps.push({ after: delayOf(isFirstOfLeg), value: current });\n      isFirstOfLeg = false;\n    }\n  }\n  return steps;\n}\n\nexport const SPEND_PATH = pathOf(DEFAULT_SPEND, WAYPOINTS);\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/perks-path.ts"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/perks.tsx",
      "content": "'use client';\n\nimport { AnimatePresence } from 'motion/react';\nimport { useState } from 'react';\n\nimport { useAutoplay } from '@/registry/ndeko/hooks/use-autoplay';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { DrawnCheck } from '@/registry/ndeko/ui/drawn-check';\nimport { Progress } from '@/registry/ndeko/ui/progress';\nimport { SettleItem } from '@/registry/ndeko/ui/settle';\nimport { Slider } from '@/registry/ndeko/ui/slider';\n\nimport {\n  DEFAULT_SPEND,\n  PERKS,\n  PERKS_ANCHOR,\n  PERKS_SECTION,\n  SPEND_RANGE,\n  type Perk,\n} from './data';\nimport { moneyOf } from './money';\nimport { SPEND_PATH } from './perks-path';\nimport { PopShape } from './pop-shape';\nimport { Reveal } from './reveal';\n\nfunction firstOf(value: number | readonly number[]) {\n  if (typeof value === 'number') {\n    return value;\n  }\n  return value[0];\n}\n\nfunction shareOf(spend: number, perk: Perk) {\n  return Math.min(spend / perk.threshold, 1);\n}\n\nfunction toneOf(isUnlocked: boolean) {\n  if (isUnlocked) {\n    return 'bg-card';\n  }\n  return 'bg-transparent';\n}\n\nfunction PerkStatus({ perk, spend }: { perk: Perk; spend: number }) {\n  const isUnlocked = spend >= perk.threshold;\n  const remaining = perk.threshold - spend;\n\n  return (\n    <div className='flex h-5 w-24 shrink-0 items-center justify-end gap-1.5 text-xs tabular-nums'>\n      <AnimatePresence initial={false} mode='popLayout'>\n        {isUnlocked && (\n          <DrawnCheck key='check' tone='success' label='Reached' />\n        )}\n      </AnimatePresence>\n      {isUnlocked && <span className='text-success-foreground'>Reached</span>}\n      {!isUnlocked && (\n        <span className='text-muted-foreground'>\n          {moneyOf(remaining * 100)} to go\n        </span>\n      )}\n    </div>\n  );\n}\n\nfunction PerkRow({ perk, spend }: { perk: Perk; spend: number }) {\n  const PerkIcon = perk.icon;\n  const share = shareOf(spend, perk);\n  const isUnlocked = spend >= perk.threshold;\n\n  return (\n    <li\n      className={cn(\n        'hairline-ring ring-border flex items-center gap-3 rounded-xl p-3 transition-colors duration-300',\n        toneOf(isUnlocked)\n      )}\n    >\n      <span className='keycap-3d text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-lg'>\n        <PerkIcon className='size-4' />\n      </span>\n      <div className='flex min-w-0 flex-1 flex-col gap-1.5'>\n        <div className='flex flex-col gap-0.5'>\n          <p className='text-[13px] font-medium'>{perk.title}</p>\n          <p className='text-muted-foreground text-xs text-pretty'>\n            {perk.description}\n          </p>\n        </div>\n        <Progress\n          value={share * 100}\n          aria-label={`Progress to ${perk.title}`}\n          className='gap-0'\n        />\n      </div>\n      <PerkStatus perk={perk} spend={spend} />\n    </li>\n  );\n}\n\nexport function Perks() {\n  const [spend, setSpend] = useState(DEFAULT_SPEND);\n  const tourSteps = SPEND_PATH.map((step) => ({\n    after: step.after,\n    run: () => setSpend(step.value),\n  }));\n  const { ref } = useAutoplay(tourSteps, {\n    loopAfter: 1800,\n    onReset: () => setSpend(DEFAULT_SPEND),\n  });\n\n  function changeSpend(value: number | readonly number[]) {\n    setSpend(firstOf(value));\n  }\n\n  return (\n    <section\n      id={PERKS_ANCHOR}\n      className='relative overflow-x-clip px-4 py-16 @sm:px-6 @sm:py-20 @5xl:px-8'\n    >\n      <PopShape\n        kind='ring'\n        series={4}\n        className='top-10 left-6 size-10 @3xl:top-16 @3xl:left-24 @3xl:size-16'\n      />\n      <Reveal\n        className='mx-auto max-w-6xl'\n        groupClassName='flex flex-col gap-8'\n      >\n        <SettleItem className='flex max-w-2xl flex-col gap-3'>\n          <h2 className='text-2xl font-semibold text-balance @2xl:text-3xl'>\n            {PERKS_SECTION.title}\n          </h2>\n          <p className='text-muted-foreground text-base text-pretty'>\n            {PERKS_SECTION.description}\n          </p>\n        </SettleItem>\n        <SettleItem>\n          <div\n            ref={ref}\n            className='bg-foreground/[0.03] grid gap-2 rounded-2xl p-2 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] @3xl:gap-3 @3xl:p-3'\n          >\n            <div className='bg-card hairline-ring ring-border dark:bg-foreground/[0.04] flex flex-col justify-between gap-6 rounded-xl p-5 shadow-[0_1px_2px_rgb(0_0_0/0.04)]'>\n              <div className='flex flex-col gap-1'>\n                <p className='text-muted-foreground text-xs'>\n                  {PERKS_SECTION.spendLabel}\n                </p>\n                <p className='text-4xl font-semibold tabular-nums'>\n                  {moneyOf(spend * 100)}\n                </p>\n              </div>\n              <Slider\n                value={[spend]}\n                onValueChange={changeSpend}\n                min={SPEND_RANGE.min}\n                max={SPEND_RANGE.max}\n                step={SPEND_RANGE.step}\n                thumbLabels={[PERKS_SECTION.spendLabel]}\n              />\n              <p className='text-muted-foreground text-xs'>\n                {PERKS_SECTION.note}\n              </p>\n            </div>\n            <ul className='flex flex-col gap-2'>\n              {PERKS.map((perk) => (\n                <PerkRow key={perk.id} perk={perk} spend={spend} />\n              ))}\n            </ul>\n          </div>\n        </SettleItem>\n      </Reveal>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/perks.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/pop-shape.tsx",
      "content": "'use client';\n\nimport { motion, type Transition, type Variants } from 'motion/react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { seriesColorOf, type SeriesSlot } from '@/registry/ndeko/lib/agent-run';\nimport { cn } from '@/registry/ndeko/lib/utils';\n\nexport type ShapeKind = 'circle' | 'ring' | 'square' | 'pill';\n\nconst POP: Transition = { type: 'spring', bounce: 0, duration: 0.5 };\n\nconst FADE: Transition = { duration: 0.2 };\n\nconst POP_VARIANTS: Variants = {\n  hidden: { scale: 0.4, opacity: 0 },\n  shown: { scale: 1, opacity: 1 },\n};\n\nconst FADE_VARIANTS: Variants = {\n  hidden: { opacity: 0 },\n  shown: { opacity: 1 },\n};\n\nconst VIEWPORT = { once: true, margin: '0px 0px -8% 0px' } as const;\n\nconst KIND_CLASS: Record<ShapeKind, string> = {\n  circle: 'rounded-full',\n  ring: 'rounded-full border-[7px] bg-transparent',\n  square: 'rounded-2xl',\n  pill: 'rounded-full',\n};\n\nfunction variantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return POP_VARIANTS;\n}\n\nfunction transitionOf(shouldReduceMotion: boolean | null, delay: number) {\n  if (shouldReduceMotion) {\n    return FADE;\n  }\n  return { ...POP, delay };\n}\n\nfunction paintOf(kind: ShapeKind, color: string) {\n  if (kind === 'ring') {\n    return { borderColor: color };\n  }\n  return { backgroundColor: color };\n}\n\ntype PopShapeProps = {\n  kind: ShapeKind;\n  series: SeriesSlot;\n  className?: string;\n  delay?: number;\n};\n\nexport function PopShape({\n  kind,\n  series,\n  className,\n  delay = 0,\n}: PopShapeProps) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const color = seriesColorOf(series);\n\n  return (\n    <motion.span\n      aria-hidden='true'\n      variants={variantsOf(shouldReduceMotion)}\n      initial='hidden'\n      whileInView='shown'\n      viewport={VIEWPORT}\n      transition={transitionOf(shouldReduceMotion, delay)}\n      style={paintOf(kind, color)}\n      className={cn(\n        'pointer-events-none absolute opacity-90',\n        KIND_CLASS[kind],\n        className\n      )}\n    />\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/pop-shape.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/reveal.tsx",
      "content": "'use client';\n\nimport { useInView } from 'motion/react';\nimport { useRef } from 'react';\n\nimport { Settle } from '@/registry/ndeko/ui/settle';\n\nconst ENTERED_ONCE = { once: true, margin: '0px 0px -12% 0px' } as const;\n\ntype RevealProps = {\n  className?: string;\n  groupClassName?: string;\n  children: React.ReactNode;\n};\n\nexport function Reveal({ className, groupClassName, children }: RevealProps) {\n  const ref = useRef<HTMLDivElement>(null);\n  const isInView = useInView(ref, ENTERED_ONCE);\n\n  return (\n    <div ref={ref} className={className}>\n      <Settle isShown={isInView} className={groupClassName}>\n        {children}\n      </Settle>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/reveal.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/section-link.ts",
      "content": "const SECTION_HASH_PATTERN = /^#.+/;\n\nexport function sectionHashOf(href: string | null) {\n  if (href === null) {\n    return null;\n  }\n  const isSectionHash = SECTION_HASH_PATTERN.test(href);\n  if (!isSectionHash) {\n    return null;\n  }\n  return href;\n}\n\nexport function scrollToSection(hash: string) {\n  const id = hash.slice(1);\n  const target = document.getElementById(id);\n  target?.scrollIntoView();\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/section-link.ts"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/share-session.ts",
      "content": "import type {\n  SessionConfig,\n  SessionStep,\n} from '@/registry/ndeko/hooks/use-session';\n\nimport { SHARE } from './data';\n\nexport type ShareState = {\n  isCopied: boolean;\n  joined: number;\n};\n\nexport type ShareAction =\n  { type: 'copied' } | { type: 'copyEnded' } | { type: 'joined' };\n\ntype Step = SessionStep<ShareState, ShareAction>;\n\nexport const COPY_PRESS_KEY = 'copy';\n\nexport const MEMBER_TOTAL = SHARE.members.length + 1;\n\nexport const INITIAL: ShareState = {\n  isCopied: false,\n  joined: SHARE.members.length,\n};\n\nexport const RESTING: ShareState = {\n  isCopied: false,\n  joined: MEMBER_TOTAL,\n};\n\nexport function reducer(state: ShareState, action: ShareAction): ShareState {\n  switch (action.type) {\n    case 'copied':\n      return { ...state, isCopied: true };\n    case 'copyEnded':\n      return { ...state, isCopied: false };\n    case 'joined':\n      return { ...state, joined: Math.min(state.joined + 1, MEMBER_TOTAL) };\n  }\n}\n\nconst SCRIPT: Step[] = [\n  {\n    after: 2200,\n    by: 'demo',\n    press: COPY_PRESS_KEY,\n    action: { type: 'copied' },\n  },\n  { after: 1500, by: 'demo', action: { type: 'joined' } },\n  { after: 1800, by: 'demo', action: { type: 'copyEnded' } },\n];\n\nexport const SESSION: SessionConfig<ShareState, ShareAction> = {\n  reducer,\n  initial: INITIAL,\n  resting: RESTING,\n  script: SCRIPT,\n  loopAfter: 2600,\n};\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/share-session.ts"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/share.tsx",
      "content": "'use client';\n\nimport { MotionNumber } from '@/components/core/motion-number';\nimport { useKeptHeight } from '@/registry/ndeko/hooks/use-kept-height';\nimport { useSession } from '@/registry/ndeko/hooks/use-session';\nimport { useTimeouts } from '@/registry/ndeko/hooks/use-timeouts';\nimport {\n  pressedQuietOf,\n  spokenUnless,\n} from '@/registry/ndeko/lib/demonstration';\nimport {\n  CheckIcon,\n  CopyIcon,\n  MailIcon,\n  ShareIcon,\n} from '@/registry/ndeko/lib/icons';\nimport { Avatar } from '@/registry/ndeko/ui/avatar';\nimport { BrandTile } from '@/registry/ndeko/ui/brand-tile';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { Swap } from '@/registry/ndeko/ui/chat-motion';\nimport { Input } from '@/registry/ndeko/ui/input';\nimport { LiveRegion } from '@/registry/ndeko/ui/live-region';\nimport { SettleItem } from '@/registry/ndeko/ui/settle';\n\nimport { NETWORKS, SHARE } from './data';\nimport { PopShape } from './pop-shape';\nimport { Reveal } from './reveal';\nimport { COPY_PRESS_KEY, MEMBER_TOTAL, SESSION } from './share-session';\n\nconst COPIED_FOR_MS = 1600;\n\nconst INVITE_URL = `https://${SHARE.link}`;\n\nfunction CopyLabel({ isCopied }: { isCopied: boolean }) {\n  if (isCopied) {\n    return (\n      <span className='inline-flex items-center gap-1.5'>\n        <CheckIcon />\n        Copied\n      </span>\n    );\n  }\n  return (\n    <span className='inline-flex items-center gap-1.5'>\n      <CopyIcon />\n      {SHARE.copyLabel}\n    </span>\n  );\n}\n\nexport function Share() {\n  const { ref, isAutoplaying, state, act, pressed } = useSession(SESSION);\n  const { schedule } = useTimeouts();\n  const joinedMembers = [...SHARE.members, SHARE.invited].slice(\n    0,\n    state.joined\n  );\n  const hasPending = state.joined < MEMBER_TOTAL;\n  const isCopyPressed = pressed === COPY_PRESS_KEY;\n  const announcement = announcementOf(state.isCopied, state.joined);\n  const message = spokenUnless(isAutoplaying, announcement);\n  useKeptHeight(ref);\n\n  async function copy() {\n    try {\n      await navigator.clipboard.writeText(INVITE_URL);\n    } catch {\n      return;\n    }\n    act({ type: 'copied' });\n    schedule(() => act({ type: 'copyEnded' }), COPIED_FOR_MS);\n  }\n\n  async function share() {\n    const canShare = typeof navigator.share === 'function';\n    if (!canShare) {\n      await copy();\n      return;\n    }\n    try {\n      await navigator.share({\n        title: SHARE.shareTitle,\n        text: SHARE.shareText,\n        url: INVITE_URL,\n      });\n    } catch {\n      return;\n    }\n  }\n\n  return (\n    <section className='relative overflow-x-clip px-4 py-16 @sm:px-6 @sm:py-20 @5xl:px-8'>\n      <PopShape\n        kind='square'\n        series={5}\n        className='top-12 left-6 size-8 rotate-12 @3xl:top-20 @3xl:left-28 @3xl:size-12'\n      />\n      <Reveal\n        className='mx-auto max-w-4xl'\n        groupClassName='flex flex-col gap-8'\n      >\n        <SettleItem className='flex max-w-2xl flex-col gap-3'>\n          <h2 className='text-2xl font-semibold text-balance @2xl:text-3xl'>\n            {SHARE.title}\n          </h2>\n          <p className='text-muted-foreground text-base text-pretty'>\n            {SHARE.description}\n          </p>\n        </SettleItem>\n        <SettleItem>\n          <div\n            ref={ref}\n            className='bg-foreground/[0.03] min-h-[26rem] rounded-2xl p-2 @3xl:min-h-[20rem] @3xl:p-3'\n          >\n            <div className='bg-card hairline-ring ring-border dark:bg-foreground/[0.04] flex flex-col gap-6 rounded-xl p-5 shadow-[0_1px_2px_rgb(0_0_0/0.04)] @3xl:p-6'>\n              <div className='flex flex-col gap-2 @xl:flex-row'>\n                <Input\n                  readOnly\n                  size='lg'\n                  value={SHARE.link}\n                  aria-label='Invite link'\n                />\n                <div className='flex gap-2'>\n                  <Button\n                    variant='outline'\n                    size='lg'\n                    onClick={copy}\n                    className={pressedQuietOf(isCopyPressed)}\n                  >\n                    <Swap swapKey={String(state.isCopied)}>\n                      <CopyLabel isCopied={state.isCopied} />\n                    </Swap>\n                  </Button>\n                  <Button size='lg' onClick={share}>\n                    <ShareIcon />\n                    {SHARE.shareLabel}\n                  </Button>\n                </div>\n              </div>\n              <div className='flex flex-wrap items-center gap-4'>\n                <div className='flex -space-x-2'>\n                  {joinedMembers.map((member) => (\n                    <Avatar\n                      key={member}\n                      seed={member}\n                      role='img'\n                      aria-label={member}\n                      className='ring-card size-9 ring-2'\n                    />\n                  ))}\n                  {hasPending && (\n                    <span\n                      role='img'\n                      aria-label={`${SHARE.invited}, invited`}\n                      className='border-foreground/25 text-muted-foreground bg-card ring-card flex size-9 items-center justify-center rounded-full border border-dashed ring-2'\n                    >\n                      <MailIcon className='size-4' />\n                    </span>\n                  )}\n                </div>\n                <p className='text-muted-foreground text-[13px] tabular-nums'>\n                  <MotionNumber value={state.joined} /> of {MEMBER_TOTAL} have\n                  joined\n                </p>\n              </div>\n              <div className='flex flex-col gap-3'>\n                <p className='text-muted-foreground text-xs'>\n                  {SHARE.networksTitle}\n                </p>\n                <ul className='flex flex-wrap gap-2'>\n                  {NETWORKS.map((network) => (\n                    <li\n                      key={network.id}\n                      className='bg-foreground/[0.05] flex items-center gap-2 rounded-full py-1 ps-1 pe-3 text-xs font-medium'\n                    >\n                      <BrandTile brand={network.id} size='lg' />\n                      {network.name}\n                    </li>\n                  ))}\n                </ul>\n              </div>\n            </div>\n          </div>\n          <LiveRegion message={message} />\n        </SettleItem>\n      </Reveal>\n    </section>\n  );\n}\n\nfunction announcementOf(isCopied: boolean, joined: number) {\n  if (isCopied) {\n    return 'Invite link copied';\n  }\n  return `${joined} of ${MEMBER_TOTAL} have joined`;\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/share.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/site-footer.tsx",
      "content": "import { TallypotMark } from './brand-mark';\nimport { BRAND, FOOTER_LINKS } from './data';\n\nexport function SiteFooter() {\n  return (\n    <footer className='px-4 py-8 @sm:px-6 @5xl:px-8'>\n      <div className='mx-auto flex max-w-6xl flex-col items-center gap-6 @3xl:flex-row @3xl:justify-between @3xl:gap-8'>\n        <div className='flex items-center gap-3'>\n          <a\n            href='#'\n            className='focus-visible:ring-ring/25 flex items-center gap-2 rounded-md text-sm font-semibold outline-none focus-visible:ring-[3px]'\n          >\n            <TallypotMark />\n            {BRAND.name}\n          </a>\n          <p className='text-muted-foreground text-xs'>{BRAND.copyright}</p>\n        </div>\n        <nav aria-label='Footer'>\n          <ul className='flex flex-wrap justify-center gap-x-5 gap-y-2'>\n            {FOOTER_LINKS.map((link) => (\n              <li key={link.label}>\n                <a\n                  href={link.href}\n                  className='text-muted-foreground hover:text-foreground focus-visible:ring-ring/25 rounded-sm text-[13px] transition-colors outline-none focus-visible:ring-[3px]'\n                >\n                  {link.label}\n                </a>\n              </li>\n            ))}\n          </ul>\n        </nav>\n      </div>\n    </footer>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/site-footer.tsx"
    },
    {
      "path": "registry/ndeko/templates/landing-pages/marketing-07/site-header.tsx",
      "content": "import { Button } from '@/registry/ndeko/ui/button';\n\nimport { TallypotMark } from './brand-mark';\nimport { BRAND, HEADER, NAV_LINKS } from './data';\nimport { MobileSheet } from './mobile-sheet';\nimport { NavLinks } from './nav-links';\n\nexport function SiteHeader() {\n  return (\n    <header className='px-4 pt-4 @sm:px-6'>\n      <div className='bg-card hairline-ring ring-border dark:bg-foreground/[0.04] mx-auto flex h-14 max-w-6xl items-center gap-3 rounded-full ps-4 pe-2 shadow-[0_1px_2px_rgb(0_0_0/0.04)]'>\n        <a\n          href='#'\n          aria-current='page'\n          className='focus-visible:ring-ring/25 flex items-center gap-2 rounded-full text-sm font-semibold outline-none focus-visible:ring-[3px]'\n        >\n          <TallypotMark />\n          {BRAND.name}\n        </a>\n        <div className='hidden flex-1 justify-center @3xl:flex'>\n          <NavLinks links={NAV_LINKS} />\n        </div>\n        <div className='ms-auto flex items-center gap-1 @3xl:ms-0'>\n          <Button\n            variant='outline'\n            nativeButton={false}\n            render={<a href={HEADER.actionHref} />}\n          >\n            <span className='@sm:hidden'>{HEADER.shortAction}</span>\n            <span className='hidden @sm:inline'>{HEADER.action}</span>\n          </Button>\n          <MobileSheet links={NAV_LINKS} />\n        </div>\n      </div>\n    </header>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-07/site-header.tsx"
    }
  ],
  "categories": [
    "templates",
    "landing-pages"
  ],
  "type": "registry:block"
}