{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "logos-plotted",
  "title": "Plotted logo cloud",
  "description": "A logo cloud between two rules a pen draws across the page, each name beside a simple mark it plots line by line: rings, a hatched disc, triangles, waves, a ruled square, a burst.",
  "dependencies": [
    "svg-scroll-draw@^2.29.0"
  ],
  "registryDependencies": [
    "https://scrollfx-ui.vercel.app/r/plotter.json"
  ],
  "files": [
    {
      "path": "registry/blocks/logos-plotted.tsx",
      "content": "'use client';\n\n/**\n * logos-plotted — a logo cloud between two rules a pen draws across the page,\n * each name set beside a simple mark the pen plots line by line as the row\n * arrives: rings, a hatched disc, nested triangles, waves, a ruled square, a\n * burst of rays.\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`.\n *\n * The default names are invented: pass your own customers, and swap each\n * cell's mark for their real logo if you have it. Names are in the server\n * HTML; the marks and rules are drawn in the browser, finishing as they reach\n * 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 { logoMark, scrollWindow, seedOf, sketchLine, staggerFor, type MarkKind, type Stroke } from '@/lib/plotter';\n\nexport interface Logo {\n  name: string;\n  /** The mark drawn beside the name. */\n  mark?: MarkKind;\n  href?: string;\n}\n\nexport interface LogosPlottedProps {\n  eyebrow?: string;\n  heading?: string;\n  description?: string;\n  logos?: Logo[];\n  accent?: string;\n  className?: string;\n}\n\nconst SAMPLES: Logo[] = [\n  { name: 'Ferrowind', mark: 'rings' },\n  { name: 'Quillstone', mark: 'disc' },\n  { name: 'Marlow & Pike', mark: 'delta' },\n  { name: 'Tessellate', mark: 'grid' },\n  { name: 'Brightfold', mark: 'wave' },\n  { name: 'Okkara', mark: 'burst' },\n];\n\nconst MARKS: MarkKind[] = ['rings', 'disc', 'delta', 'grid', 'wave', 'burst'];\n\n// Each mark's lines draw one after another over this many trigger ranges (see scrollWindow).\nconst SPREAD = 0.6;\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\n/** A rule across the section, ink then accent, left to right. */\nfunction Rule({ seed, accent }: { seed: number; accent: string }) {\n  const [strokes, setStrokes] = useState<Stroke[] | null>(null);\n  useEffect(() => setStrokes(sketchLine({ w: 1000, h: 12, seed })), [seed]);\n  return (\n    <div className=\"relative h-3 w-full\">\n      {strokes && (\n        <ScrollDraw stagger={0.5} easing=\"linear\" trigger={scrollWindow(0.5)} className=\"absolute inset-0\" aria-hidden>\n          <svg viewBox=\"0 0 1000 12\" preserveAspectRatio=\"none\" className=\"block size-full\" fill=\"none\" strokeWidth=\"1\" strokeLinecap=\"round\">\n            {strokes.map((s, i) => <path key={i} d={s.d} stroke={s.pen ? accent : 'currentColor'} />)}\n          </svg>\n        </ScrollDraw>\n      )}\n    </div>\n  );\n}\n\nfunction Mark({ kind, name }: { kind: MarkKind; name: string }) {\n  const [strokes, setStrokes] = useState<Stroke[] | null>(null);\n  useEffect(() => setStrokes(logoMark(kind, 40, seedOf(name))), [kind, name]);\n  return (\n    <span className=\"relative size-9 shrink-0\">\n      {strokes && (\n        <ScrollDraw stagger={staggerFor(strokes.length, SPREAD)} easing=\"linear\" trigger={scrollWindow(SPREAD)} className=\"absolute inset-0\" aria-hidden>\n          <svg viewBox=\"0 0 40 40\" className=\"size-full\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.3\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n            {strokes.map((s, i) => <path key={i} d={s.d} />)}\n          </svg>\n        </ScrollDraw>\n      )}\n    </span>\n  );\n}\n\nexport function LogosPlotted({\n  eyebrow = 'In good company',\n  heading = 'Used by teams who *read* their numbers.',\n  description = 'Invented names: replace them with your customers.',\n  logos = SAMPLES,\n  accent = '#e0482a',\n  className = '',\n}: LogosPlottedProps) {\n  return (\n    <section className={`mx-auto max-w-7xl px-6 py-28 sm:px-10 ${className}`}>\n      <div className=\"flex flex-wrap items-end justify-between gap-6\">\n        <div className=\"max-w-2xl\">\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(2rem,3.6vw,3rem)] leading-[1.02] tracking-[-0.025em]\">\n            <Heading text={heading} />\n          </h2>\n        </div>\n        {description && <p className=\"font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground\">{description}</p>}\n      </div>\n\n      <div className=\"mt-12\">\n        <Rule seed={11} accent={accent} />\n        <ul className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6\">\n          {logos.map((l, i) => {\n            const body = (\n              <>\n                <Mark kind={l.mark ?? MARKS[i % MARKS.length]} name={l.name} />\n                <span className=\"font-serif text-xl tracking-[-0.015em]\">{l.name}</span>\n              </>\n            );\n            return (\n              <li key={l.name} className=\"flex items-center justify-center py-10\">\n                {l.href ? (\n                  <a href={l.href} className=\"flex items-center gap-3 opacity-80 transition-opacity hover:opacity-100\">{body}</a>\n                ) : (\n                  <span className=\"flex items-center gap-3 opacity-80\">{body}</span>\n                )}\n              </li>\n            );\n          })}\n        </ul>\n        <Rule seed={29} accent={accent} />\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "motion": "Scroll to it: the rules are drawn across and each mark is plotted.",
    "tall": false
  },
  "type": "registry:block"
}