{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "waitlist-press",
  "title": "Waitlist: Press kit",
  "description": "The wordmark on its three grounds, the colours with a copy for each value, the boilerplate, the downloads and the press contact.",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "https://eased.dev/r/eased-tokens.json",
    "https://eased.dev/r/eased-motion.json",
    "https://eased.dev/r/waitlist-core.json",
    "https://eased.dev/r/button.json",
    "https://eased.dev/r/eased-copy.json"
  ],
  "files": [
    {
      "path": "src/registry/eased/templates/waitlist/press.tsx",
      "content": "\"use client\";\n\nimport { useEffect, useRef, useState } from \"react\";\nimport { useCopy } from \"../../_primitives/copy/copy\";\nimport { Button } from \"../../button/button\";\nimport { pressKit } from \"./content\";\nimport { COLUMN, LABEL, PageHead, Reveal, Wordmark } from \"./kit\";\n\n/**\n * The press kit: the wordmark on the three grounds it may sit on, the colours with a copy for\n * each value, the paragraph about Wendle, the downloads and who to write to. The downloads\n * point at \"#\" until you upload your files (README, \"Before you ship\").\n */\nexport function PressKit() {\n  return (\n    <div className={`${COLUMN} flex flex-col gap-section pt-group pb-section`}>\n      <PageHead label={pressKit.label} title={pressKit.title} lead={pressKit.lead} />\n      <Marks />\n      <Colours />\n      <div className=\"grid gap-group lg:grid-cols-[minmax(0,7fr)_minmax(0,5fr)] lg:gap-group-lg\">\n        <About />\n        <Downloads />\n      </div>\n    </div>\n  );\n}\n\nconst H2 = \"font-display text-display-3xl font-semibold tracking-display text-balance text-text\";\n\n/** The brand's colours by id, so the tiles show the mark in them whatever the page's theme. */\nconst HEX = Object.fromEntries(pressKit.colours.swatches.map((s) => [s.id, s.hex]));\nconst GROUND: Record<string, string> = { field: HEX.vermilion, paper: HEX.paper, ink: HEX.ink };\nconst INK: Record<string, string> = { field: HEX.ink, paper: HEX.ink, ink: HEX.paper };\n\n/** The field's week, still, in the brand's colours: each day's top edge, the fifth yours. */\nconst WEEK = [\"34%\", \"25%\", \"41%\", \"29%\", \"17%\", \"38%\", \"47%\"];\n\n/**\n * The downloads have no files behind them in the sample: pressing one says \"Sample asset\" for a\n * moment where its size was, and says so to screen readers, instead of jumping the page to \"#\".\n */\nfunction useSample() {\n  const [shown, setShown] = useState<string | null>(null);\n  const timer = useRef(0);\n  useEffect(() => () => window.clearTimeout(timer.current), []);\n  const show = (id: string) => {\n    setShown(id);\n    window.clearTimeout(timer.current);\n    timer.current = window.setTimeout(() => setShown(null), 1600);\n  };\n  return { shown, show };\n}\n\nfunction Marks() {\n  const { mark } = pressKit;\n  const sample = useSample();\n  return (\n    <section aria-labelledby=\"marks-title\" className=\"flex flex-col gap-pad-lg\">\n      <Reveal className=\"flex max-w-2xl flex-col gap-pad-sm\">\n        <h2 id=\"marks-title\" className={H2}>\n          {mark.title}\n        </h2>\n        <p className=\"text-ui-md text-pretty text-text-secondary\">{mark.body}</p>\n      </Reveal>\n      <ul className=\"grid gap-pad-base sm:grid-cols-3\">\n        {mark.tiles.map((t, i) => (\n          <li key={t.id}>\n            <Reveal index={i} className=\"flex flex-col gap-in\">\n              <div\n                className=\"relative isolate grid aspect-[4/3] place-items-center overflow-hidden rounded-surface border border-line-subtle\"\n                style={{ backgroundColor: GROUND[t.id], color: INK[t.id] }}\n              >\n                {t.id === \"field\" && (\n                  <span aria-hidden className=\"absolute inset-0 flex gap-[1.6%] px-[1.6%]\">\n                    {WEEK.map((top, d) => (\n                      <span key={top} className=\"relative flex-1\">\n                        <span className=\"absolute inset-x-0 -bottom-4 rounded-t-full\" style={{ top, backgroundColor: d === 4 ? HEX.cream : pressKit.colours.fieldBar }} />\n                      </span>\n                    ))}\n                  </span>\n                )}\n                <Wordmark className=\"relative text-display-3xl\" markClassName=\"size-9\" />\n              </div>\n              <div className=\"flex items-center justify-between gap-pad-sm\">\n                <span className=\"text-ui text-text-secondary\">{t.label}</span>\n                <button\n                  type=\"button\"\n                  onClick={() => sample.show(t.id)}\n                  className=\"focus-ring -me-2 inline-flex min-h-11 cursor-pointer items-center rounded-control px-2 text-ui font-medium text-brand-text hover-fine:bg-surface-hover\"\n                >\n                  {sample.shown === t.id ? pressKit.assets.sample : mark.download}\n                  <span className=\"sr-only\">, {t.label}</span>\n                </button>\n              </div>\n            </Reveal>\n          </li>\n        ))}\n      </ul>\n      <p role=\"status\" className=\"sr-only\">\n        {sample.shown ? pressKit.assets.sample : \"\"}\n      </p>\n    </section>\n  );\n}\n\nfunction Colours() {\n  const { colours } = pressKit;\n  const [said, setSaid] = useState(\"\");\n  return (\n    <section aria-labelledby=\"colours-title\" className=\"flex flex-col gap-pad-lg\">\n      <Reveal>\n        <h2 id=\"colours-title\" className={H2}>\n          {colours.title}\n        </h2>\n      </Reveal>\n      <ul className=\"grid grid-cols-2 gap-pad-base md:grid-cols-5\">\n        {colours.swatches.map((s, i) => (\n          <li key={s.id}>\n            <Reveal index={i} className=\"flex flex-col gap-pad-sm\">\n              <span aria-hidden className=\"block aspect-[3/4] rounded-panel border border-line-subtle\" style={{ backgroundColor: s.hex }} />\n              <Swatch name={s.name} hex={s.hex} note={s.note} onCopied={() => setSaid(`${s.name} ${s.hex} ${colours.copied.toLowerCase()}`)} />\n            </Reveal>\n          </li>\n        ))}\n      </ul>\n      <p role=\"status\" className=\"sr-only\">\n        {said}\n      </p>\n    </section>\n  );\n}\n\nfunction Swatch({ name, hex, note, onCopied }: { name: string; hex: string; note: string; onCopied: () => void }) {\n  const { copied, copy } = useCopy(hex, { onCopy: onCopied });\n  return (\n    <div className=\"grid grid-cols-[minmax(0,1fr)_auto] items-start gap-x-2\">\n      <div className=\"flex min-w-0 flex-col\">\n        <span className=\"text-ui font-medium text-text\">{name}</span>\n        <span className=\"font-mono text-ui-sm text-text-secondary\">{hex}</span>\n        <span className=\"text-ui-sm text-pretty text-text-muted\">{note}</span>\n      </div>\n      <Button size=\"sm\" variant=\"ghost\" edge=\"end\" hitArea aria-label={`${pressKit.colours.copy} ${name}`} onClick={() => void copy()}>\n        {copied ? pressKit.colours.copied : pressKit.colours.copy}\n      </Button>\n    </div>\n  );\n}\n\nfunction About() {\n  const { boilerplate, contact } = pressKit;\n  const { copied, copy } = useCopy(boilerplate.text);\n  return (\n    <section aria-labelledby=\"about-title\" className=\"flex flex-col gap-pad-md\">\n      <Reveal className=\"flex flex-col gap-pad-md\">\n        <h2 id=\"about-title\" className={H2}>\n          {boilerplate.title}\n        </h2>\n        <p className=\"max-w-2xl text-ui-lg text-pretty text-text\">{boilerplate.text}</p>\n        <div>\n          <Button size=\"md\" hitArea onClick={() => void copy()}>\n            {copied ? pressKit.colours.copied : boilerplate.copy}\n          </Button>\n          <span role=\"status\" className=\"sr-only\">\n            {copied ? pressKit.colours.copied : \"\"}\n          </span>\n        </div>\n      </Reveal>\n      <Reveal index={1} className=\"mt-pad-lg flex flex-col gap-1 border-t border-line-subtle pt-pad-md\">\n        <h3 className={LABEL}>{contact.title}</h3>\n        <a href={`mailto:${contact.email}`} className=\"focus-ring inline-flex min-h-11 items-center self-start rounded-control-xs text-ui-lg font-medium text-brand-text underline decoration-brand-line underline-offset-4 sm:min-h-0\">\n          {contact.email}\n        </a>\n        <p className=\"text-ui text-text-muted\">{contact.body}</p>\n      </Reveal>\n    </section>\n  );\n}\n\nfunction Downloads() {\n  const { assets } = pressKit;\n  const sample = useSample();\n  return (\n    <section aria-labelledby=\"downloads-title\" className=\"flex flex-col gap-pad-md\">\n      <Reveal>\n        <h2 id=\"downloads-title\" className={H2}>\n          {assets.title}\n        </h2>\n      </Reveal>\n      <Reveal index={1}>\n        <ul className=\"flex flex-col border-t border-line-subtle\">\n          {assets.items.map((a) => (\n            <li key={a.name} className=\"relative grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-pad-md border-b border-line-subtle py-pad-sm\">\n              <div className=\"flex min-w-0 flex-col\">\n                <button\n                  type=\"button\"\n                  onClick={() => sample.show(a.name)}\n                  className=\"focus-ring cursor-pointer self-start rounded-control-xs text-left text-ui-md font-medium text-text after:absolute after:inset-0 hover-fine:text-brand-text\"\n                >\n                  {a.name}\n                  <span className=\"sr-only\">\n                    , {assets.download}, {a.format}, {a.size}\n                  </span>\n                </button>\n                <span className=\"text-ui-sm text-text-muted\">{a.detail}</span>\n              </div>\n              <span aria-hidden className=\"flex items-center gap-pad-sm font-mono text-ui-sm text-text-secondary tabular-nums\">\n                {sample.shown === a.name ? assets.sample : a.size}\n                <span className=\"rounded-control-xs border border-line px-1.5 py-0.5 text-ui-xs text-text-muted\">{a.format}</span>\n                <DownloadIcon />\n              </span>\n            </li>\n          ))}\n        </ul>\n      </Reveal>\n      <p role=\"status\" className=\"sr-only\">\n        {sample.shown ? assets.sample : \"\"}\n      </p>\n    </section>\n  );\n}\n\nfunction DownloadIcon() {\n  return (\n    <svg viewBox=\"0 0 16 16\" fill=\"none\" className=\"size-4 shrink-0 text-text-muted\" aria-hidden>\n      <path d=\"M8 2.75v7.5M4.75 7.25 8 10.5l3.25-3.25M3 13.25h10\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n    </svg>\n  );\n}\n",
      "type": "registry:component",
      "target": "@components/eased/templates/waitlist/press.tsx"
    }
  ],
  "meta": {
    "template": "waitlist",
    "kind": "template-section",
    "industries": [
      "saas"
    ]
  },
  "type": "registry:block"
}