{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "feature-plates",
  "title": "Feature plates",
  "description": "Features beside plates a pen draws as you reach them: a topographic map, a wireframe globe, a tunnel of turning squares.",
  "dependencies": [
    "svg-scroll-draw@^2.29.0"
  ],
  "registryDependencies": [
    "https://scrollfx-ui.vercel.app/r/plotter.json"
  ],
  "files": [
    {
      "path": "registry/blocks/feature-plates.tsx",
      "content": "'use client';\n\n/**\n * feature-plates — features, each beside a plate a pen draws as you reach it:\n * a topographic map, a wireframe globe, a tunnel of turning squares. Copy on\n * one side, the print on the other, alternating.\n *\n * Built on svg-scroll-draw (MIT): https://github.com/DhruvilChauahan0210/scrollfx\n * Needs: react, svg-scroll-draw, and lib/plotter (installed with it).\n * Styling: Tailwind CSS with shadcn/ui tokens. Titles take one emphasised word\n * between asterisks, set in `font-serif`. The prints are `bg-card` sheets.\n *\n * Drawings are made in the browser; the copy is in the server HTML. Pass\n * `art` per feature to choose the drawing. Reduced motion shows them drawn.\n */\n\nimport { useEffect, useState } from 'react';\nimport { ScrollDraw } from 'svg-scroll-draw/react';\nimport 'svg-scroll-draw/no-flash.css';\nimport { contours, globe, scrollWindow, staggerFor, tunnel, type Stroke } from '@/lib/plotter';\n\ntype Art = 'contours' | 'globe' | 'tunnel';\n\nexport interface PlateFeature {\n  title: string;\n  body: string;\n  art?: Art;\n  caption?: string;\n}\n\nexport interface FeaturePlatesProps {\n  eyebrow?: string;\n  heading?: string;\n  features?: PlateFeature[];\n  accent?: string;\n  className?: string;\n}\n\nconst ART: Record<Art, () => Stroke[]> = {\n  contours: () => contours({ seed: 11 }),\n  globe: () => globe({}),\n  tunnel: () => tunnel({}),\n};\n\nconst DEFAULT_FEATURES: PlateFeature[] = [\n  { title: 'Every number, *mapped*.', body: 'Dashboards that show the shape of your data, not just its totals. Drill from a year to a minute without losing your place.', art: 'contours', caption: 'Fig. 2 — Contours' },\n  { title: 'Data from *everywhere*.', body: 'Events arrive from forty regions and land on one screen in under a second, already joined, already clean.', art: 'globe', caption: 'Fig. 3 — Meridians' },\n  { title: 'Go as *deep* as you like.', body: 'Every chart opens into the rows behind it. Every row opens into the event that made it. Nothing is summarised away.', art: 'tunnel', caption: 'Fig. 4 — Tunnel' },\n];\n\nfunction Title({ text }: { text: string }) {\n  return <>{text.split(/(\\*[^*]+\\*)/).map((p, i) => (p.startsWith('*') ? <em key={i} className=\"italic\">{p.slice(1, -1)}</em> : <span key={i}>{p}</span>))}</>;\n}\n\nfunction Plate({ art, accent }: { art: Art; accent: string }) {\n  const [strokes, setStrokes] = useState<Stroke[] | null>(null);\n  useEffect(() => setStrokes(ART[art]()), [art]);\n  return (\n    <div className=\"aspect-[4/3] w-full rounded-[3px] bg-card p-[7%] shadow-[0_1px_0_rgba(0,0,0,.04),0_18px_40px_-20px_rgba(40,30,10,.28)] dark:shadow-[0_0_0_1px_rgba(255,255,255,.05),0_24px_60px_-24px_rgba(0,0,0,.8)]\">\n      {strokes && (\n        // Drawn as the plate rises, the last stroke landing as it reaches the\n        // middle of the screen.\n        <ScrollDraw stagger={staggerFor(strokes.length, 1)} easing=\"linear\" trigger={scrollWindow(1)} className=\"size-full\" aria-hidden>\n          <svg viewBox=\"0 0 400 300\" className=\"size-full\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"0.9\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n            {strokes.map((s, i) => (s.pen ? <path key={i} d={s.d} stroke={accent} strokeWidth=\"1.4\" /> : <path key={i} d={s.d} />))}\n          </svg>\n        </ScrollDraw>\n      )}\n    </div>\n  );\n}\n\nexport function FeaturePlates({\n  eyebrow = 'Features',\n  heading = 'Drawn from the data up.',\n  features = DEFAULT_FEATURES,\n  accent = '#e0482a',\n  className = '',\n}: FeaturePlatesProps) {\n  const arts: Art[] = ['contours', 'globe', 'tunnel'];\n  return (\n    <section className={`mx-auto max-w-7xl px-6 py-28 sm:px-10 ${className}`}>\n      <p className=\"font-mono text-[11px] uppercase tracking-[0.22em] text-muted-foreground\">{eyebrow}</p>\n      <h2 className=\"mt-6 max-w-3xl font-serif text-[clamp(2.6rem,5vw,4.2rem)] leading-[0.98] tracking-[-0.03em]\">{heading}</h2>\n\n      <div className=\"mt-24 space-y-28 sm:space-y-40\">\n        {features.map((ft, i) => (\n          <div key={ft.title} className=\"grid items-center gap-10 md:grid-cols-2 md:gap-20\">\n            <div className={i % 2 ? 'md:order-2' : ''}>\n              <p className=\"font-mono text-[11px] uppercase tracking-[0.22em] text-muted-foreground\">{String(i + 1).padStart(2, '0')}</p>\n              <h3 className=\"mt-5 text-balance font-serif text-[clamp(2rem,3.4vw,3rem)] leading-[1.02] tracking-[-0.025em]\">\n                <Title text={ft.title} />\n              </h3>\n              <p className=\"mt-5 max-w-md text-pretty text-[17px] leading-relaxed text-muted-foreground\">{ft.body}</p>\n            </div>\n            <figure>\n              <Plate art={ft.art ?? arts[i % arts.length]} accent={accent} />\n              {ft.caption && <figcaption className=\"mt-4 font-mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground\">{ft.caption}</figcaption>}\n            </figure>\n          </div>\n        ))}\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "motion": "Scroll down: each plate is drawn as it arrives.",
    "tall": true
  },
  "type": "registry:block"
}