{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "testimonials-plotted",
  "title": "Plotted testimonials",
  "description": "Quotes on sheets, each stamped with a spiral a pen winds from the rim inward, seeded from the person's name, with their initials in its eye.",
  "dependencies": [
    "svg-scroll-draw@^2.29.0"
  ],
  "registryDependencies": [
    "https://scrollfx-ui.vercel.app/r/plotter.json"
  ],
  "files": [
    {
      "path": "registry/blocks/testimonials-plotted.tsx",
      "content": "'use client';\n\n/**\n * testimonials-plotted — quotes on sheets, each stamped with a spiral a pen\n * winds from the rim inward as the card arrives. The spiral is seeded from the\n * person's name, so everyone gets a mark of their own, the same every time;\n * their initials sit in its eye.\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. The heading takes one emphasised\n * word between asterisks, set in `font-serif`. Cards are `bg-card` sheets.\n *\n * The default quotes are samples: pass your own customers' words. The quotes\n * are in the server HTML; the spirals are drawn in the browser, each finishing\n * as its card reaches the middle of the screen. 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 { scrollWindow, seedOf, spiral } from '@/lib/plotter';\n\nexport interface Testimonial {\n  quote: string;\n  name: string;\n  role: string;\n}\n\nexport interface TestimonialsPlottedProps {\n  eyebrow?: string;\n  heading?: string;\n  /** A line under the heading, e.g. where the quotes come from. */\n  note?: string;\n  testimonials?: Testimonial[];\n  accent?: string;\n  className?: string;\n}\n\nconst SAMPLES: Testimonial[] = [\n  { quote: 'We replaced three dashboards and a weekly spreadsheet with one page. The Monday meeting is twenty minutes shorter.', name: 'Lena Ortiz', role: 'Head of data' },\n  { quote: 'The alerts fire before the customer notices, and the chart in the message already explains why.', name: 'Sam Okafor', role: 'Platform engineer' },\n  { quote: 'Our analysts stopped exporting to CSV. Every number opens into the rows behind it, so there is nothing to argue about.', name: 'Mira Chen', role: 'Finance lead' },\n];\n\nfunction Heading({ 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\nconst initials = (name: string) => name.split(/\\s+/).map((w) => w[0]).slice(0, 2).join('').toUpperCase();\n\nfunction Medallion({ name, accent, first }: { name: string; accent: string; first: boolean }) {\n  const [d, setD] = useState<string | null>(null);\n  useEffect(() => setD(spiral(seedOf(name))[0].d), [name]);\n  return (\n    <div className=\"relative size-20 shrink-0\">\n      {d && (\n        <ScrollDraw easing=\"linear\" trigger={scrollWindow()} className=\"absolute inset-0\" aria-hidden>\n          <svg viewBox=\"0 0 100 100\" className=\"size-full\" fill=\"none\" stroke={first ? accent : 'currentColor'} strokeWidth=\"0.8\" strokeLinecap=\"round\">\n            <path d={d} />\n          </svg>\n        </ScrollDraw>\n      )}\n      <span className=\"absolute inset-0 grid place-items-center font-serif text-lg\" aria-hidden>{initials(name)}</span>\n    </div>\n  );\n}\n\nexport function TestimonialsPlotted({\n  eyebrow = 'In their words',\n  heading = 'What teams *say*.',\n  note = 'Sample quotes: replace them with your customers’ own words.',\n  testimonials = SAMPLES,\n  accent = '#e0482a',\n  className = '',\n}: TestimonialsPlottedProps) {\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 font-serif text-[clamp(2.6rem,5vw,4.2rem)] leading-[0.98] tracking-[-0.03em]\">\n        <Heading text={heading} />\n      </h2>\n      {note && <p className=\"mt-4 font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground\">{note}</p>}\n\n      <div className=\"mt-16 grid gap-6 md:grid-cols-3\">\n        {testimonials.map((t, i) => (\n          <figure key={t.name} className=\"flex flex-col rounded-[3px] bg-card p-8 shadow-[0_1px_0_rgba(0,0,0,.04),0_18px_40px_-24px_rgba(40,30,10,.3)] dark:shadow-[0_0_0_1px_rgba(255,255,255,.05)]\">\n            <Medallion name={t.name} accent={accent} first={i === 0} />\n            <blockquote className=\"mt-8 flex-1 text-pretty font-serif text-[1.35rem] leading-snug tracking-[-0.01em]\">\n              “{t.quote}”\n            </blockquote>\n            <figcaption className=\"mt-8 font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground\">\n              {t.name} · {t.role}\n            </figcaption>\n          </figure>\n        ))}\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "motion": "Scroll to them: each spiral winds in as its card arrives.",
    "tall": false
  },
  "type": "registry:block"
}