{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "faq-plotted",
  "title": "Plotted FAQ",
  "description": "Questions that open in place with the browser's own disclosure, beside a plate where a pen draws a Lissajous knot.",
  "dependencies": [
    "svg-scroll-draw@^2.29.0"
  ],
  "registryDependencies": [
    "https://scrollfx-ui.vercel.app/r/plotter.json"
  ],
  "files": [
    {
      "path": "registry/blocks/faq-plotted.tsx",
      "content": "'use client';\n\n/**\n * faq-plotted — questions beside a plate where a pen draws a Lissajous knot,\n * one closed figure traced four times, each a little smaller. The answers open\n * in place, with the browser's own disclosure: keyboard and screen readers\n * work, and every answer is in the page for search.\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`. The plate is a `bg-card` sheet.\n *\n * The knot is drawn in the browser, finishing as the plate reaches the middle\n * of the screen. Reduced motion shows it drawn.\n */\n\nimport { useEffect, useState } from 'react';\nimport { ScrollDraw } from 'svg-scroll-draw/react';\nimport 'svg-scroll-draw/no-flash.css';\nimport { lissajous, scrollWindow, staggerFor, type Stroke } from '@/lib/plotter';\n\nexport interface Question {\n  q: string;\n  a: string;\n}\n\nexport interface FaqPlottedProps {\n  eyebrow?: string;\n  heading?: string;\n  questions?: Question[];\n  caption?: string;\n  /** Which of the four knots to draw. */\n  seed?: number;\n  accent?: string;\n  className?: string;\n}\n\nconst DEFAULT_QUESTIONS: Question[] = [\n  { q: 'How long does setup take?', a: 'Most teams connect a source and see their first dashboard in under ten minutes. Nothing is copied until you choose what to watch.' },\n  { q: 'Can I try it before paying?', a: 'Every plan starts with fourteen days of everything, with no card. When the trial ends you choose a plan or keep the free one.' },\n  { q: 'Where is my data stored?', a: 'In the region you pick when you sign up, encrypted at rest and in transit. You can export all of it, at any time, in open formats.' },\n  { q: 'Do you support single sign-on?', a: 'Yes, on every plan: SAML and OIDC, with Okta, Entra ID and Google. SCIM provisioning is on Business.' },\n  { q: 'What happens if I cancel?', a: 'Your workspace stays readable for thirty days, and your export is ready the moment you ask for it.' },\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\nexport function FaqPlotted({\n  eyebrow = 'Questions',\n  heading = 'Asked, and *answered*.',\n  questions = DEFAULT_QUESTIONS,\n  caption = 'Fig. — Lissajous knot',\n  seed = 0,\n  accent = '#e0482a',\n  className = '',\n}: FaqPlottedProps) {\n  const [strokes, setStrokes] = useState<Stroke[] | null>(null);\n  useEffect(() => setStrokes(lissajous(seed)), [seed]);\n\n  return (\n    <section className={`mx-auto grid max-w-7xl gap-14 px-6 py-28 sm:px-10 lg:grid-cols-[minmax(0,5fr)_minmax(0,7fr)] lg:gap-24 ${className}`}>\n      <div>\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        <figure className=\"mt-12 hidden lg:block\">\n          <div className=\"aspect-square w-full max-w-sm rounded-[3px] bg-card p-[8%] shadow-[0_1px_0_rgba(0,0,0,.04),0_18px_40px_-22px_rgba(40,30,10,.3)] dark:shadow-[0_0_0_1px_rgba(255,255,255,.05)]\">\n            {strokes && (\n              <ScrollDraw stagger={staggerFor(strokes.length, 0.6)} easing=\"linear\" trigger={scrollWindow(0.6)} className=\"size-full\" aria-hidden>\n                <svg viewBox=\"0 0 400 400\" className=\"size-full\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.1\" strokeLinejoin=\"round\">\n                  {strokes.map((s, i) => <path key={i} d={s.d} stroke={s.pen ? accent : undefined} />)}\n                </svg>\n              </ScrollDraw>\n            )}\n          </div>\n          <figcaption className=\"mt-4 font-mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground\">{caption}</figcaption>\n        </figure>\n      </div>\n\n      <div className=\"divide-y border-y\">\n        {questions.map((item) => (\n          <details key={item.q} className=\"group py-6\">\n            <summary className=\"flex cursor-pointer list-none items-baseline justify-between gap-6 font-serif text-[1.6rem] leading-tight tracking-[-0.015em] [&::-webkit-details-marker]:hidden\">\n              {item.q}\n              {/* A plus that turns into a cross: the pen's mark for \"open\". */}\n              <span aria-hidden className=\"font-mono text-base text-muted-foreground transition-transform duration-300 group-open:rotate-45\">+</span>\n            </summary>\n            <p className=\"mt-4 max-w-xl text-pretty text-[17px] leading-relaxed text-muted-foreground\">{item.a}</p>\n          </details>\n        ))}\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "motion": "Scroll to it: the knot is traced, four times over.",
    "tall": false
  },
  "type": "registry:block"
}