{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-section-v9",
  "title": "Hero Section v9",
  "description": "Centered hero with headline, description, dual CTAs, and a simulated live product preview dashboard with ticking metrics, streaming activity chart, and workflow task updates.",
  "registryDependencies": [
    "button"
  ],
  "files": [
    {
      "path": "registry/new-york/blocks/hero-section-v9/page.tsx",
      "content": "import HeroSectionV9 from \"./components/hero-section-v9\"\n\nexport default function Page() {\n  return (\n    <div className=\"p-6\">\n      <HeroSectionV9 />\n    </div>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/hero-section-v9/page.tsx"
    },
    {
      "path": "registry/new-york/blocks/hero-section-v9/components/hero-section-v9.tsx",
      "content": "import HeroContent from \"./hero-content\"\n\nimport type { HeroV9Props } from \"../lib/config\"\n\nimport \"../styles/hero-section-v9.css\"\n\nexport default function HeroSectionV9(props: HeroV9Props) {\n  return (\n    <section className=\"py-4 md:py-6 lg:py-8\">\n      <div className=\"mx-auto max-w-6xl px-4\">\n        <HeroContent {...props} />\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component",
      "target": "app/hero-section-v9/components/hero-section-v9.tsx"
    },
    {
      "path": "registry/new-york/blocks/hero-section-v9/components/hero-content.tsx",
      "content": "import CtaButtons from \"./cta-buttons\"\nimport ProductPreviewShell from \"./product-preview-shell\"\n\nimport type { HeroV9Props } from \"../lib/config\"\nimport { resolveHeroV9Content, resolveHeroV9Preview } from \"../lib/config\"\n\nexport default function HeroContent(props: HeroV9Props) {\n  const content = resolveHeroV9Content(props)\n  const preview = resolveHeroV9Preview(props.preview)\n\n  return (\n    <div className=\"flex flex-col items-center gap-6 text-center\">\n      <h1 className=\"max-w-3xl text-3xl font-medium tracking-tight sm:text-4xl lg:text-5xl lg:leading-[1.15]\">\n        {content.title}\n      </h1>\n\n      <p className=\"max-w-xl text-base leading-relaxed text-muted-foreground sm:text-lg\">\n        {content.description}\n      </p>\n\n      <CtaButtons\n        primaryCta={content.primaryCta}\n        secondaryCta={content.secondaryCta}\n      />\n\n      <div className=\"w-full pt-2\">\n        <ProductPreviewShell preview={preview} />\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "app/hero-section-v9/components/hero-content.tsx"
    },
    {
      "path": "registry/new-york/blocks/hero-section-v9/components/cta-buttons.tsx",
      "content": "import Link from \"next/link\"\n\nimport { Button } from \"@/components/ui/button\"\n\nimport type { HeroV9Cta } from \"../lib/config\"\nimport { heroV9Content } from \"../lib/config\"\n\nconst PRIMARY_HREF = \"#\"\nconst SECONDARY_HREF = \"#\"\n\nexport default function CtaButtons({\n  primaryCta = heroV9Content.primaryCta,\n  secondaryCta = heroV9Content.secondaryCta,\n}: {\n  primaryCta?: HeroV9Cta\n  secondaryCta?: HeroV9Cta\n}) {\n  return (\n    <div className=\"flex flex-row flex-wrap justify-center gap-3\">\n      <Button className=\"w-full sm:w-auto\" asChild>\n        <Link href={PRIMARY_HREF}>{primaryCta.label}</Link>\n      </Button>\n      <Button\n        variant=\"secondary\"\n        className=\"w-full sm:w-auto\"\n        asChild\n      >\n        <Link href={SECONDARY_HREF}>{secondaryCta.label}</Link>\n      </Button>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "app/hero-section-v9/components/cta-buttons.tsx"
    },
    {
      "path": "registry/new-york/blocks/hero-section-v9/components/product-preview-shell.tsx",
      "content": "\"use client\"\n\nimport ActivityPanel from \"./activity-panel\"\nimport MetricsRow from \"./metrics-row\"\nimport TasksPanel from \"./tasks-panel\"\nimport { useLiveDashboardPreview } from \"../hooks/use-live-dashboard-preview\"\n\nimport type { ProductPreviewConfig } from \"../lib/config\"\n\nexport default function ProductPreviewShell({\n  preview,\n}: {\n  preview: ProductPreviewConfig\n}) {\n  const live = useLiveDashboardPreview(preview)\n\n  return (\n    <div\n      className=\"pp-root relative mx-auto w-full max-w-5xl overflow-hidden rounded-xl bg-(--pp-shell-bg) shadow-(--pp-shadow)\"\n      role=\"img\"\n      aria-label=\"Operations dashboard preview\"\n    >\n      <MetricsRow metrics={live.metrics} />\n      <div className=\"hero-v9-panels grid grid-cols-1 items-stretch lg:grid-cols-2\">\n        <ActivityPanel\n          activity={live.panels.activity}\n          live\n          pulseKey={live.barsPulseKey}\n          taskStates={live.panels.tasks.rows.map((row) => row.state)}\n          queuedJobs={live.queuedJobs}\n          barPeaks={live.barPeaks}\n        />\n        <TasksPanel tasks={live.panels.tasks} />\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "app/hero-section-v9/components/product-preview-shell.tsx"
    },
    {
      "path": "registry/new-york/blocks/hero-section-v9/components/metrics-row.tsx",
      "content": "import MetricCard from \"./metric-card\"\n\nexport default function MetricsRow({\n  metrics,\n}: {\n  metrics: ReadonlyArray<{ value: string; label: string; pulseKey: number }>\n}) {\n  return (\n    <div className=\"hero-v9-metrics relative z-1\">\n      {metrics.map((metric) => (\n        <MetricCard\n          key={metric.label}\n          value={metric.value}\n          label={metric.label}\n          pulseKey={metric.pulseKey}\n        />\n      ))}\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "app/hero-section-v9/components/metrics-row.tsx"
    },
    {
      "path": "registry/new-york/blocks/hero-section-v9/components/metric-card.tsx",
      "content": "import { cn } from \"@/lib/utils\"\n\nexport default function MetricCard({\n  value,\n  label,\n  pulseKey,\n}: {\n  value: string\n  label: string\n  pulseKey?: number\n}) {\n  return (\n    <div className=\"hero-v9-metric flex flex-col items-center justify-center gap-1 px-3 py-4 text-center\">\n      <span\n        key={`${value}-${pulseKey ?? 0}`}\n        className={cn(\n          \"hero-v9-metric-value text-2xl font-semibold tracking-tight text-foreground tabular-nums\",\n          pulseKey !== undefined && pulseKey > 0 && \"hero-v9-metric-live\"\n        )}\n      >\n        {value}\n      </span>\n      <span className=\"text-[0.6875rem] uppercase tracking-wider text-muted-foreground\">\n        {label}\n      </span>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "app/hero-section-v9/components/metric-card.tsx"
    },
    {
      "path": "registry/new-york/blocks/hero-section-v9/components/activity-panel.tsx",
      "content": "import type { CSSProperties } from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport type { PreviewStatusState, ProductPreviewConfig } from \"../lib/config\"\n\ntype ActivityConfig = ProductPreviewConfig[\"panels\"][\"activity\"]\n\n// Integer-only hash (no Math.sin) so the result is bit-identical on the\n// server and client — transcendental functions like Math.sin can differ in\n// their last bit between engines, which caused hydration mismatches once\n// that noise was amplified into CSS custom properties.\nfunction pseudoRandom(seed: number, salt: number): number {\n  let x = (seed * 374761393 + salt * 668265263) | 0\n  x = (x ^ (x >>> 13)) * 1274126177\n  x = (x ^ (x >>> 16)) >>> 0\n  return x / 4294967296\n}\n\nconst QUEUED_BAR_MIN = 3\nconst QUEUED_BAR_MAX = 14\nconst QUEUED_JOBS_BASELINE = 20\nconst QUEUED_JOBS_PER_BAR = 2\n\n// Queued/status bars don't measure anything — their meaning lives in fill\n// style (dashed/hollow) and how many of them there are, not in height. They\n// share one flat height so they read as a state ledger, not more volume data.\nconst STATE_ZONE_BAR_HEIGHT = 60\n\n// Scales the real \"Queued jobs\" count into a bar count, so the backlog the\n// chart implies is sitting behind the 4 named automations grows and shrinks\n// with the actual metric instead of always looking like exactly 4 jobs.\nfunction queuedBarCountFor(queuedJobs: number): number {\n  const scaled = Math.round((queuedJobs - QUEUED_JOBS_BASELINE) / QUEUED_JOBS_PER_BAR)\n  return Math.min(QUEUED_BAR_MAX, Math.max(QUEUED_BAR_MIN, scaled))\n}\n\nexport default function ActivityPanel({\n  activity,\n  live = false,\n  pulseKey,\n  taskStates = [],\n  queuedJobs = 0,\n  barPeaks = [],\n}: {\n  activity: ActivityConfig\n  live?: boolean\n  pulseKey?: number\n  taskStates?: ReadonlyArray<PreviewStatusState>\n  queuedJobs?: number\n  barPeaks?: ReadonlyArray<boolean>\n}) {\n  const lastIndex = activity.bars.length - 1\n\n  // The rightmost bars double as a status readout: one bar per automation\n  // in the Status overview table, filled while it's running and hollow\n  // once it completes — so \"bars filled\" tracks \"tasks running\" 1:1.\n  const hasStatusBars = taskStates.length > 0\n  const statusBarStart = activity.bars.length - taskStates.length\n\n  // Just before those, a wider band of dashed bars stands in for the rest\n  // of the queue that isn't named in the table — its width tracks the real\n  // \"Queued jobs\" metric so the volume chart implies a bigger backlog.\n  const queuedBarCount = hasStatusBars ? queuedBarCountFor(queuedJobs) : 0\n  const queuedZoneStart = Math.max(0, statusBarStart - queuedBarCount)\n\n  return (\n    <div className=\"hero-v9-activity-panel relative z-1 flex min-h-0 flex-1 flex-col\">\n      <h3 className=\"hero-v9-panel-heading shrink-0 px-4 py-2.5 text-[0.6875rem] font-semibold uppercase tracking-widest text-muted-foreground\">\n        {activity.title}\n      </h3>\n\n      <div\n        className={cn(\n          \"hero-v9-activity-chart flex min-h-0 w-full flex-1 items-end justify-between gap-1 px-4 py-3\",\n          live && \"hero-v9-activity-chart-live\"\n        )}\n        aria-hidden\n      >\n        {activity.bars.map((height, index) => {\n          const waveDuration = 1.8 + pseudoRandom(index, 1) * 1.8\n          const waveDelay = -(pseudoRandom(index, 2) * waveDuration)\n          const isNewest = live && index === lastIndex\n\n          const taskState =\n            index >= statusBarStart\n              ? taskStates[index - statusBarStart]\n              : undefined\n          const isCompletedBar = taskState !== undefined && taskState !== \"running\"\n          const isQueuedBar =\n            taskState === undefined &&\n            index >= queuedZoneStart &&\n            index < statusBarStart\n          const isStateZoneBar = index >= queuedZoneStart\n\n          return (\n            <div\n              key={index}\n              className={cn(\n                \"hero-v9-bar w-2 shrink-0 rounded-t-sm\",\n                live && \"hero-v9-bar-live\"\n              )}\n              style={{\n                height: `${isStateZoneBar ? STATE_ZONE_BAR_HEIGHT : height}%`,\n                animationDelay: live ? `${Math.min(index * 5, 150)}ms` : undefined,\n                transitionDelay: live ? `${index * 3}ms` : undefined,\n              }}\n            >\n              <span\n                key={isNewest ? pulseKey : undefined}\n                className={cn(\n                  \"block h-full w-full rounded-t-sm\",\n                  isCompletedBar\n                    ? \"hero-v9-bar-fill-hollow\"\n                    : isQueuedBar\n                      ? \"hero-v9-bar-fill-queued\"\n                      : cn(\n                          \"hero-v9-bar-fill\",\n                          // Accent marks bars that landed as a volume burst,\n                          // which is the same event that bumps \"Runs\n                          // completed\" — so the highlight tracks that metric\n                          // instead of just whichever bar is tallest.\n                          barPeaks[index]\n                            ? \"bg-(--pp-accent)\"\n                            : \"bg-(--pp-accent-muted)\"\n                        ),\n                  isNewest && !isCompletedBar && !isQueuedBar && \"hero-v9-bar-fill-new\"\n                )}\n                style={\n                  isQueuedBar\n                    ? { animationDelay: `${(index - queuedZoneStart) * 90}ms` }\n                    : live && !isCompletedBar\n                      ? ({\n                          \"--wave-duration\": `${waveDuration}s`,\n                          \"--wave-delay\": `${waveDelay}s`,\n                        } as CSSProperties)\n                      : undefined\n                }\n              />\n            </div>\n          )\n        })}\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "app/hero-section-v9/components/activity-panel.tsx"
    },
    {
      "path": "registry/new-york/blocks/hero-section-v9/components/tasks-panel.tsx",
      "content": "import StatusChip from \"./status-chip\"\n\nimport type { ProductPreviewConfig } from \"../lib/config\"\n\ntype TasksConfig = ProductPreviewConfig[\"panels\"][\"tasks\"]\n\nexport default function TasksPanel({ tasks }: { tasks: TasksConfig }) {\n  return (\n    <div className=\"relative z-1 flex min-h-0 flex-col\">\n      <h3 className=\"hero-v9-panel-heading px-4 py-2.5 text-[0.6875rem] font-semibold uppercase tracking-widest text-muted-foreground\">\n        {tasks.legendTitle}\n      </h3>\n\n      <div className=\"flex flex-wrap gap-x-4 gap-y-2 px-4 py-3\" />\n\n      <div>\n        <div className=\"hero-v9-table-head grid grid-cols-[1fr_100px_72px] items-center px-4 py-2 text-[0.6875rem] uppercase tracking-wider text-muted-foreground\">\n          <span>Automation</span>\n          <span className=\"text-center\">Status</span>\n          <span className=\"text-right\">Last run</span>\n        </div>\n\n        {tasks.rows.map((row) => (\n          <div\n            key={row.automation}\n            className=\"hero-v9-table-row hero-v9-table-row-live grid grid-cols-[1fr_100px_72px] items-center px-4 py-2.5\"\n          >\n            <span className=\"text-sm font-medium text-foreground\">{row.automation}</span>\n            <div className=\"flex justify-center\">\n              <StatusChip label={row.status} state={row.state} />\n            </div>\n            <span className=\"text-right text-xs text-muted-foreground tabular-nums\">\n              {row.lastRun}\n            </span>\n          </div>\n        ))}\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "app/hero-section-v9/components/tasks-panel.tsx"
    },
    {
      "path": "registry/new-york/blocks/hero-section-v9/components/status-chip.tsx",
      "content": "import { cn } from \"@/lib/utils\"\n\nimport type { PreviewStatusState } from \"../lib/config\"\n\nexport default function StatusChip({\n  label,\n  state,\n}: {\n  label: string\n  state: PreviewStatusState\n}) {\n  return (\n    <div className=\"inline-flex items-center gap-1.5\">\n      <span\n        className={cn(\n          \"relative size-1.5 shrink-0 rounded-full\",\n          state === \"waiting\" ? \"bg-(--pp-dot-idle)\" : \"bg-(--pp-accent)\",\n          state === \"running\" && \"hero-v9-status-live\"\n        )}\n        aria-hidden\n      />\n      <span\n        className={cn(\n          \"text-xs font-medium transition-colors duration-500\",\n          state === \"waiting\" ? \"text-muted-foreground\" : \"text-foreground/80\",\n          state === \"running\" && \"text-foreground\"\n        )}\n      >\n        {label}\n      </span>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "app/hero-section-v9/components/status-chip.tsx"
    },
    {
      "path": "registry/new-york/blocks/hero-section-v9/hooks/use-live-dashboard-preview.ts",
      "content": "\"use client\"\n\nimport { useEffect, useMemo, useState, useSyncExternalStore } from \"react\"\n\nimport type { PreviewStatusState, ProductPreviewConfig } from \"../lib/config\"\n\nfunction subscribeReducedMotion(onStoreChange: () => void) {\n  const mq = window.matchMedia(\"(prefers-reduced-motion: reduce)\")\n  mq.addEventListener(\"change\", onStoreChange)\n  return () => mq.removeEventListener(\"change\", onStoreChange)\n}\n\nfunction getReducedMotion() {\n  return window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n}\n\nfunction getReducedMotionServer() {\n  return false\n}\n\ntype MetricKind = \"k\" | \"percent\" | \"minutes\" | \"integer\"\n\ntype MetricSeed = {\n  label: string\n  kind: MetricKind\n  value: number\n  pulseKey: number\n}\n\ntype TaskSeed = {\n  automation: string\n  status: string\n  state: PreviewStatusState\n  minutesAgo: number\n}\n\ntype DashboardState = {\n  metrics: MetricSeed[]\n  bars: number[]\n  barPeaks: boolean[]\n  barsPulseKey: number\n  tasks: TaskSeed[]\n  cyclePhase: number\n}\n\nexport type LiveDashboardPreview = {\n  metrics: ReadonlyArray<{ value: string; label: string; pulseKey: number }>\n  panels: ProductPreviewConfig[\"panels\"] & {\n    tasks: ProductPreviewConfig[\"panels\"][\"tasks\"] & {\n      rows: ReadonlyArray<{\n        automation: string\n        status: string\n        lastRun: string\n        state: PreviewStatusState\n      }>\n    }\n  }\n  barsPulseKey: number\n  barPeaks: ReadonlyArray<boolean>\n  queuedJobs: number\n}\n\n// Metric order is fixed by heroV9Preview.metrics: Runs completed, Success\n// rate, Avg. duration, Queued jobs. These two are referenced by index\n// elsewhere so the volume chart can react to and reflect them.\nconst RUNS_COMPLETED_METRIC_INDEX = 0\nconst QUEUED_JOBS_METRIC_INDEX = 3\n\n// Each metric ticks on its own randomized cadence so the row reads like a\n// live market ticker instead of four numbers changing in lockstep.\nconst METRIC_CADENCE_MS: ReadonlyArray<readonly [number, number]> = [\n  [900, 1600], // Runs completed – fast live counter\n  [4400, 6600], // Success rate – slow drift\n  [2800, 4200], // Avg. duration – medium pace\n  [1500, 2500], // Queued jobs – jumpy, order-book feel\n]\nconst DEFAULT_CADENCE_MS: readonly [number, number] = [2200, 3600]\nconst BARS_CADENCE_MS: readonly [number, number] = [1000, 1800]\nconst TASKS_CADENCE_MS: readonly [number, number] = [2800, 4200]\n\nfunction randomDelay([min, max]: readonly [number, number]): number {\n  return min + Math.random() * (max - min)\n}\n\nfunction detectMetricKind(value: string): MetricKind {\n  if (value.includes(\"%\")) return \"percent\"\n  if (/min/i.test(value)) return \"minutes\"\n  if (/k/i.test(value)) return \"k\"\n  return \"integer\"\n}\n\nfunction parseMetricValue(value: string, kind: MetricKind): number {\n  const numeric = Number.parseFloat(value.replace(/[^\\d.]/g, \"\"))\n  if (kind === \"k\") return numeric * 1000\n  return numeric\n}\n\nfunction formatMetricValue(value: number, kind: MetricKind): string {\n  switch (kind) {\n    case \"k\":\n      return `${(value / 1000).toFixed(1)}K`\n    case \"percent\":\n      return `${value.toFixed(1)}%`\n    case \"minutes\":\n      return `${value.toFixed(1)} Min`\n    default:\n      return `${Math.round(value)}`\n  }\n}\n\nfunction formatLastRun(minutesAgo: number): string {\n  if (minutesAgo <= 0) return \"just now\"\n  if (minutesAgo === 1) return \"1 min ago\"\n  return `${minutesAgo} min ago`\n}\n\nfunction seedMetrics(metrics: ProductPreviewConfig[\"metrics\"]): MetricSeed[] {\n  return metrics.map((metric) => {\n    const kind = detectMetricKind(metric.value)\n    return {\n      label: metric.label,\n      kind,\n      value: parseMetricValue(metric.value, kind),\n      pulseKey: 0,\n    }\n  })\n}\n\nfunction seedTasks(\n  rows: ProductPreviewConfig[\"panels\"][\"tasks\"][\"rows\"]\n): TaskSeed[] {\n  return rows.map((row) => ({\n    automation: row.automation,\n    status: row.status,\n    state: row.state,\n    minutesAgo: Number.parseInt(row.lastRun, 10) || 1,\n  }))\n}\n\nfunction tickMetricValue(metric: MetricSeed): number {\n  let next = metric.value\n\n  switch (metric.kind) {\n    case \"k\":\n      next += 3 + Math.random() * 7\n      break\n    case \"percent\":\n      next += Math.random() > 0.65 ? -0.1 : 0.05\n      next = Math.min(99.9, Math.max(98.4, next))\n      break\n    case \"minutes\":\n      next += (Math.random() - 0.5) * 0.12\n      next = Math.min(2.2, Math.max(1.1, next))\n      break\n    default:\n      next += Math.floor(Math.random() * 3) - 1\n      next = Math.max(24, next)\n      break\n  }\n\n  return next\n}\n\n// Only bumps pulseKey when the *displayed* value actually changes, so a\n// metric card doesn't replay its tick animation on ticks that move the raw\n// number by an amount too small to show up in the formatted text.\nfunction applyMetricValue(metric: MetricSeed, value: number): MetricSeed {\n  const changed =\n    formatMetricValue(value, metric.kind) !==\n    formatMetricValue(metric.value, metric.kind)\n\n  return {\n    ...metric,\n    value,\n    pulseKey: changed ? metric.pulseKey + 1 : metric.pulseKey,\n  }\n}\n\nconst BARS_MIN = 15\nconst BARS_MAX = 98\nconst BARS_BASELINE = 58\n\ntype BarEvent = \"burst\" | \"lull\" | \"normal\"\n\nfunction clampBar(value: number): number {\n  return Math.min(BARS_MAX, Math.max(BARS_MIN, Math.round(value)))\n}\n\nfunction nextBarTick(bars: ReadonlyArray<number>): { value: number; event: BarEvent } {\n  const last = bars[bars.length - 1]\n  const prev = bars[bars.length - 2] ?? last\n  const momentum = last - prev\n\n  const roll = Math.random()\n\n  if (roll < 0.06) {\n    // a batch job lands: quick burst in run volume\n    return { value: clampBar(last + 14 + Math.random() * 22), event: \"burst\" }\n  }\n\n  if (roll < 0.12) {\n    // queue drains out: sudden lull\n    return { value: clampBar(last - (14 + Math.random() * 22)), event: \"lull\" }\n  }\n\n  // otherwise drift with some carried momentum, gently pulled back to baseline\n  const meanPull = (BARS_BASELINE - last) * 0.08\n  const carried = momentum * 0.35\n  const noise = (Math.random() - 0.5) * 16\n  return { value: clampBar(last + meanPull + carried + noise), event: \"normal\" }\n}\n\n// Peaks shift through the window alongside their bar so a burst stays\n// marked as it scrolls left, then falls off once it exits the window —\n// this is what ties the accent bars to \"Runs completed\" (see below).\nfunction tickBars(\n  bars: ReadonlyArray<number>,\n  peaks: ReadonlyArray<boolean>\n): { bars: number[]; peaks: boolean[]; event: BarEvent } {\n  const tick = nextBarTick(bars)\n  return {\n    bars: [...bars.slice(1), tick.value],\n    peaks: [...peaks.slice(1), tick.event === \"burst\"],\n    event: tick.event,\n  }\n}\n\n// Bumps a single metric out of its own cadence, so a notable moment in the\n// volume chart (a burst or a lull) visibly ripples into the metrics row\n// instead of the two panels just simulating side by side.\nfunction bumpMetric(\n  metrics: MetricSeed[],\n  index: number,\n  nextValue: (value: number) => number\n): MetricSeed[] {\n  const current = metrics[index]\n  if (!current) return metrics\n  const next = metrics.slice()\n  next[index] = applyMetricValue(current, nextValue(current.value))\n  return next\n}\n\n// Reacts to a volume burst by pulling a currently idle automation into\n// \"Running\" early, tying the Status overview table to the volume chart.\nfunction startIdleTask(tasks: TaskSeed[]): TaskSeed[] {\n  const candidateIndex = tasks.findIndex(\n    (task, index) => index !== 1 && task.state !== \"running\"\n  )\n  if (candidateIndex === -1) return tasks\n\n  const next = tasks.slice()\n  next[candidateIndex] = {\n    ...next[candidateIndex],\n    status: \"Running\",\n    state: \"running\",\n    minutesAgo: 0,\n  }\n  return next\n}\n\nfunction tickTasks(tasks: TaskSeed[], cyclePhase: number): TaskSeed[] {\n  return tasks.map((task, index) => {\n    let { status, state, minutesAgo } = task\n\n    minutesAgo = state === \"running\" ? minutesAgo : minutesAgo + 1\n\n    if (index === 1) {\n      return { ...task, status, state, minutesAgo: Math.max(0, minutesAgo - 1) }\n    }\n\n    if (cyclePhase === 0 && index === 2 && state !== \"running\") {\n      status = \"Running\"\n      state = \"running\"\n      minutesAgo = 0\n    } else if (cyclePhase === 2 && index === 2 && state === \"running\") {\n      status = \"Completed\"\n      state = \"success\"\n      minutesAgo = 1\n    } else if (cyclePhase === 4 && index === 0 && state !== \"running\") {\n      status = \"Running\"\n      state = \"running\"\n      minutesAgo = 0\n    } else if (cyclePhase === 6 && index === 0 && state === \"running\") {\n      status = \"Completed\"\n      state = \"success\"\n      minutesAgo = 1\n    }\n\n    return { ...task, status, state, minutesAgo }\n  })\n}\n\nfunction seedState(config: ProductPreviewConfig): DashboardState {\n  const bars = config.panels.activity.bars\n  const seedMaxIndex = bars.reduce(\n    (best, height, index) => (height > bars[best] ? index : best),\n    0\n  )\n\n  return {\n    metrics: seedMetrics(config.metrics),\n    bars: [...bars],\n    barPeaks: bars.map((_, index) => index === seedMaxIndex),\n    barsPulseKey: 0,\n    tasks: seedTasks(config.panels.tasks.rows),\n    cyclePhase: 0,\n  }\n}\n\nfunction buildPreview(\n  config: ProductPreviewConfig,\n  state: DashboardState\n): LiveDashboardPreview {\n  return {\n    metrics: state.metrics.map((metric) => ({\n      label: metric.label,\n      value: formatMetricValue(metric.value, metric.kind),\n      pulseKey: metric.pulseKey,\n    })),\n    panels: {\n      activity: {\n        title: config.panels.activity.title,\n        bars: state.bars,\n      },\n      tasks: {\n        legendTitle: config.panels.tasks.legendTitle,\n        legend: config.panels.tasks.legend,\n        tableTitle: config.panels.tasks.tableTitle,\n        rows: state.tasks.map((task) => ({\n          automation: task.automation,\n          status: task.status,\n          state: task.state,\n          lastRun: formatLastRun(task.minutesAgo),\n        })),\n      },\n    },\n    barsPulseKey: state.barsPulseKey,\n    barPeaks: state.barPeaks,\n    queuedJobs: state.metrics[QUEUED_JOBS_METRIC_INDEX]?.value ?? 0,\n  }\n}\n\nexport function useLiveDashboardPreview(\n  config: ProductPreviewConfig\n): LiveDashboardPreview {\n  const reducedMotion = useSyncExternalStore(\n    subscribeReducedMotion,\n    getReducedMotion,\n    getReducedMotionServer\n  )\n\n  const [state, setState] = useState<DashboardState>(() => seedState(config))\n\n  useEffect(() => {\n    if (reducedMotion) return\n\n    const timeouts = new Set<number>()\n\n    function scheduleMetric(index: number) {\n      const cadence = METRIC_CADENCE_MS[index] ?? DEFAULT_CADENCE_MS\n      const id = window.setTimeout(() => {\n        timeouts.delete(id)\n        setState((prev) => {\n          const current = prev.metrics[index]\n          if (!current) return prev\n          const metrics = prev.metrics.slice()\n          metrics[index] = applyMetricValue(current, tickMetricValue(current))\n          return { ...prev, metrics }\n        })\n        scheduleMetric(index)\n      }, randomDelay(cadence))\n      timeouts.add(id)\n    }\n\n    function scheduleBars() {\n      const id = window.setTimeout(() => {\n        timeouts.delete(id)\n        setState((prev) => {\n          const { bars, peaks, event } = tickBars(prev.bars, prev.barPeaks)\n          let metrics = prev.metrics\n          let tasks = prev.tasks\n\n          if (event === \"burst\") {\n            // a burst in volume reads as a wave of runs landing at once\n            metrics = bumpMetric(\n              metrics,\n              RUNS_COMPLETED_METRIC_INDEX,\n              (value) => value + 40 + Math.random() * 70\n            )\n            metrics = bumpMetric(metrics, QUEUED_JOBS_METRIC_INDEX, (value) =>\n              Math.max(24, value - (3 + Math.random() * 6))\n            )\n            tasks = startIdleTask(tasks)\n          } else if (event === \"lull\") {\n            // a lull means fewer runs draining the queue, so it backs up\n            metrics = bumpMetric(\n              metrics,\n              QUEUED_JOBS_METRIC_INDEX,\n              (value) => value + 2 + Math.random() * 5\n            )\n          }\n\n          return {\n            ...prev,\n            bars,\n            barPeaks: peaks,\n            barsPulseKey: prev.barsPulseKey + 1,\n            metrics,\n            tasks,\n          }\n        })\n        scheduleBars()\n      }, randomDelay(BARS_CADENCE_MS))\n      timeouts.add(id)\n    }\n\n    function scheduleTasks() {\n      const id = window.setTimeout(() => {\n        timeouts.delete(id)\n        setState((prev) => {\n          const cyclePhase = (prev.cyclePhase + 1) % 8\n          return { ...prev, tasks: tickTasks(prev.tasks, cyclePhase), cyclePhase }\n        })\n        scheduleTasks()\n      }, randomDelay(TASKS_CADENCE_MS))\n      timeouts.add(id)\n    }\n\n    config.metrics.forEach((_, index) => scheduleMetric(index))\n    scheduleBars()\n    scheduleTasks()\n\n    return () => {\n      timeouts.forEach((id) => window.clearTimeout(id))\n    }\n  }, [config, reducedMotion])\n\n  return useMemo(() => buildPreview(config, state), [config, state])\n}\n",
      "type": "registry:hook",
      "target": "app/hero-section-v9/hooks/use-live-dashboard-preview.ts"
    },
    {
      "path": "registry/new-york/blocks/hero-section-v9/lib/config.ts",
      "content": "export type HeroV9Cta = {\n  label: string\n  href: string\n}\n\nexport type PreviewStatusState = \"success\" | \"running\" | \"waiting\"\n\nexport type HeroV9Content = {\n  title: string\n  description: string\n  primaryCta: HeroV9Cta\n  secondaryCta: HeroV9Cta\n}\n\nexport type ProductPreviewConfig = {\n  metrics: ReadonlyArray<{ value: string; label: string }>\n  panels: {\n    activity: {\n      title: string\n      bars: ReadonlyArray<number>\n    }\n    tasks: {\n      legendTitle: string\n      legend: ReadonlyArray<{ label: string; state: PreviewStatusState }>\n      tableTitle: string\n      rows: ReadonlyArray<{\n        automation: string\n        status: string\n        lastRun: string\n        state: PreviewStatusState\n      }>\n    }\n  }\n}\n\nexport const heroV9Content: HeroV9Content = {\n  title: \"Visual Automation for Modern Teams\",\n  description:\n    \"Design playbooks once, schedule recurring work, and keep every operation visible in one place.\",\n  primaryCta: { label: \"View pricing\", href: \"#\" },\n  secondaryCta: { label: \"Join waitlist\", href: \"#\" },\n}\n\nexport const heroV9Preview: ProductPreviewConfig = {\n  metrics: [\n    { value: \"12.4K\", label: \"Runs completed\" },\n    { value: \"98.9%\", label: \"Success rate\" },\n    { value: \"1.5 Min\", label: \"Avg. duration\" },\n    { value: \"28\", label: \"Queued jobs\" },\n  ],\n  panels: {\n    activity: {\n      title: \"Volume overview\",\n      bars: [\n        42, 68, 55, 88, 72, 95, 60, 78, 50, 82, 65, 90, 58, 74, 63, 85, 70,\n        92, 48, 80, 67, 86, 52, 76, 61, 94, 45, 83, 69, 91, 56, 79, 64, 87,\n        53, 81, 66, 89, 47, 77,\n      ],\n    },\n    tasks: {\n      legendTitle: \"Status overview\",\n      legend: [\n        { label: \"Success\", state: \"success\" },\n        { label: \"In progress\", state: \"running\" },\n        { label: \"Waiting\", state: \"waiting\" },\n      ],\n      tableTitle: \"Recent runs\",\n      rows: [\n        {\n          automation: \"Data backup\",\n          status: \"Completed\",\n          lastRun: \"2 min ago\",\n          state: \"success\",\n        },\n        {\n          automation: \"Email campaign\",\n          status: \"Running\",\n          lastRun: \"5 min ago\",\n          state: \"running\",\n        },\n        {\n          automation: \"API sync\",\n          status: \"Completed\",\n          lastRun: \"6 min ago\",\n          state: \"success\",\n        },\n        {\n          automation: \"Report generation\",\n          status: \"Completed\",\n          lastRun: \"7 min ago\",\n          state: \"success\",\n        },\n      ],\n    },\n  },\n}\n\nexport type HeroV9Props = Partial<HeroV9Content> & {\n  preview?: Partial<ProductPreviewConfig>\n}\n\nexport function resolveHeroV9Content(overrides?: HeroV9Props): HeroV9Content {\n  return {\n    title: overrides?.title ?? heroV9Content.title,\n    description: overrides?.description ?? heroV9Content.description,\n    primaryCta: overrides?.primaryCta ?? heroV9Content.primaryCta,\n    secondaryCta: overrides?.secondaryCta ?? heroV9Content.secondaryCta,\n  }\n}\n\nexport function resolveHeroV9Preview(\n  overrides?: HeroV9Props[\"preview\"]\n): ProductPreviewConfig {\n  if (!overrides) return heroV9Preview\n\n  return {\n    metrics: overrides.metrics ?? heroV9Preview.metrics,\n    panels: {\n      activity: {\n        ...heroV9Preview.panels.activity,\n        ...overrides.panels?.activity,\n      },\n      tasks: {\n        ...heroV9Preview.panels.tasks,\n        ...overrides.panels?.tasks,\n      },\n    },\n  }\n}\n",
      "type": "registry:lib",
      "target": "app/hero-section-v9/lib/config.ts"
    },
    {
      "path": "registry/new-york/blocks/hero-section-v9/styles/hero-section-v9.css",
      "content": ".pp-root {\n  --pp-shell-bg: oklch(0.985 0 0);\n  --pp-border: rgb(0 0 0 / 0.1);\n  --pp-v-border: 1px dashed var(--pp-border);\n  --pp-h-border: 1px solid var(--pp-border);\n  --pp-accent: rgb(39 39 42);\n  --pp-accent-muted: rgb(39 39 42 / 0.28);\n  --pp-accent-soft: rgb(39 39 42 / 0.06);\n  --pp-accent-ring: rgb(39 39 42 / 0.35);\n  --pp-accent-row: rgb(39 39 42 / 0.04);\n  --pp-muted: rgb(113 113 122);\n  --pp-dot-active: rgb(39 39 42);\n  --pp-dot-idle: rgb(161 161 170 / 0.35);\n  --pp-radius: 0.75rem;\n  --pp-shadow: 0 24px 48px -28px rgb(0 0 0 / 0.12);\n  --pp-noise-opacity: 0.03;\n  border-top: var(--pp-h-border);\n  border-bottom: var(--pp-h-border);\n  border-left: var(--pp-v-border);\n  border-right: var(--pp-v-border);\n}\n\n.dark .pp-root {\n  --pp-shell-bg: oklch(0.12 0 0);\n  --pp-border: rgb(255 255 255 / 0.1);\n  --pp-v-border: 1px dashed var(--pp-border);\n  --pp-h-border: 1px solid var(--pp-border);\n  --pp-accent: rgb(228 228 231);\n  --pp-accent-muted: rgb(228 228 231 / 0.28);\n  --pp-accent-soft: rgb(228 228 231 / 0.08);\n  --pp-accent-ring: rgb(228 228 231 / 0.35);\n  --pp-accent-row: rgb(228 228 231 / 0.06);\n  --pp-muted: rgb(150 150 150);\n  --pp-dot-active: rgb(242 242 242);\n  --pp-dot-idle: rgb(242 242 242 / 0.35);\n  --pp-shadow: 0 24px 48px -28px rgb(0 0 0 / 0.45);\n  --pp-noise-opacity: 0.05;\n}\n\n.pp-root::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  pointer-events: none;\n  opacity: var(--pp-noise-opacity);\n  background-image: url(\"data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E\");\n  background-size: 128px 128px;\n}\n\n.hero-v9-metrics {\n  display: grid;\n  grid-template-columns: repeat(2, minmax(0, 1fr));\n  border-bottom: var(--pp-h-border);\n}\n\n@media (min-width: 640px) {\n  .hero-v9-metrics {\n    grid-template-columns: repeat(4, minmax(0, 1fr));\n  }\n}\n\n.hero-v9-metrics .hero-v9-metric {\n  border-right: var(--pp-v-border);\n}\n\n.hero-v9-metrics .hero-v9-metric:nth-child(2n) {\n  border-right: none;\n}\n\n@media (min-width: 640px) {\n  .hero-v9-metrics .hero-v9-metric:nth-child(2n) {\n    border-right: var(--pp-v-border);\n  }\n\n  .hero-v9-metrics .hero-v9-metric:nth-child(4n) {\n    border-right: none;\n  }\n}\n\n.hero-v9-activity-panel {\n  border-bottom: var(--pp-h-border);\n}\n\n@media (min-width: 1024px) {\n  .hero-v9-activity-panel {\n    border-bottom: none;\n    border-right: var(--pp-v-border);\n  }\n}\n\n.hero-v9-panel-heading,\n.hero-v9-table-head,\n.hero-v9-table-row {\n  border-bottom: var(--pp-h-border);\n}\n\n.hero-v9-table-row:last-child {\n  border-bottom: none;\n}\n\n.hero-v9-panels {\n  min-height: 14rem;\n}\n\n.hero-v9-activity-chart {\n  width: 100%;\n  height: 100%;\n  min-height: 8rem;\n}\n\n.hero-v9-activity-chart-live {\n  position: relative;\n  overflow: hidden;\n}\n\n.hero-v9-bar {\n  transform-origin: bottom;\n  transition: height 420ms cubic-bezier(0.22, 1, 0.36, 1);\n}\n\n.hero-v9-bar-live {\n  animation: hero-v9-bar-rise 580ms cubic-bezier(0.34, 1.2, 0.64, 1) backwards;\n}\n\n.hero-v9-bar-fill {\n  transform-origin: bottom;\n  animation: hero-v9-bar-wave var(--wave-duration, 2.4s) ease-in-out\n    var(--wave-delay, 0s) infinite alternate;\n  will-change: transform;\n}\n\n.hero-v9-bar-fill-new {\n  animation:\n    hero-v9-bar-wave var(--wave-duration, 2.4s) ease-in-out\n      var(--wave-delay, 0s) infinite alternate,\n    hero-v9-bar-print 900ms cubic-bezier(0.22, 1, 0.36, 1);\n}\n\n.hero-v9-bar-fill-hollow {\n  background-color: transparent;\n  border: 1px solid var(--pp-accent-muted);\n  transition:\n    background-color 400ms ease,\n    border-color 400ms ease;\n}\n\n.hero-v9-bar-fill-queued {\n  background-color: transparent;\n  border: 1px dashed var(--pp-accent-muted);\n  animation: hero-v9-bar-queued-pulse 2.6s ease-in-out infinite;\n}\n\n.hero-v9-metric-live {\n  animation: hero-v9-metric-tick 480ms cubic-bezier(0.22, 1, 0.36, 1);\n}\n\n.hero-v9-status-live {\n  animation:\n    hero-v9-dot-grow 2.4s ease-in-out infinite,\n    hero-v9-ring-expand 2.4s ease-out infinite;\n}\n\n.hero-v9-table-row-live {\n  transition: background-color 700ms ease;\n}\n\n.hero-v9-table-row-live:has(.hero-v9-status-live) {\n  background: var(--pp-accent-row);\n}\n\n@keyframes hero-v9-bar-rise {\n  from {\n    transform: scaleY(0.05);\n    opacity: 0;\n  }\n\n  65% {\n    opacity: 1;\n  }\n\n  to {\n    transform: scaleY(1);\n    opacity: 1;\n  }\n}\n\n@keyframes hero-v9-bar-wave {\n  0% {\n    transform: scaleY(0.92);\n  }\n\n  100% {\n    transform: scaleY(1.07);\n  }\n}\n\n@keyframes hero-v9-bar-print {\n  0% {\n    filter: brightness(1.55) saturate(1.25);\n  }\n\n  100% {\n    filter: brightness(1) saturate(1);\n  }\n}\n\n@keyframes hero-v9-bar-queued-pulse {\n  0%,\n  100% {\n    opacity: 0.55;\n  }\n\n  50% {\n    opacity: 1;\n  }\n}\n\n@keyframes hero-v9-metric-tick {\n  0% {\n    opacity: 0;\n    transform: translateY(-7px);\n    filter: blur(2px);\n  }\n\n  55% {\n    filter: blur(0);\n  }\n\n  100% {\n    opacity: 1;\n    transform: translateY(0);\n    filter: blur(0);\n  }\n}\n\n@keyframes hero-v9-dot-grow {\n  0%,\n  60%,\n  100% {\n    transform: scale(1);\n  }\n\n  35% {\n    transform: scale(1.4);\n  }\n}\n\n@keyframes hero-v9-ring-expand {\n  0%,\n  34% {\n    box-shadow: 0 0 0 0 var(--pp-accent-ring);\n  }\n\n  80% {\n    box-shadow: 0 0 0 7px transparent;\n  }\n\n  100% {\n    box-shadow: 0 0 0 0 transparent;\n  }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .pp-root .animate-pulse {\n    animation: none;\n  }\n\n  .hero-v9-bar,\n  .hero-v9-bar-live,\n  .hero-v9-bar-fill,\n  .hero-v9-bar-fill-new,\n  .hero-v9-bar-fill-hollow,\n  .hero-v9-bar-fill-queued,\n  .hero-v9-metric-live,\n  .hero-v9-status-live,\n  .hero-v9-table-row-live {\n    animation: none;\n    transition: none;\n    filter: none;\n  }\n}\n",
      "type": "registry:file",
      "target": "app/hero-section-v9/styles/hero-section-v9.css"
    }
  ],
  "type": "registry:block"
}