{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "blog-list-editorial",
  "type": "registry:component",
  "title": "Blog List Editorial",
  "description": "A light, paper toned list of essays with a date column, serif titles, excerpts and a sticky category filter that fades the list in on change.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "blog",
    "blog",
    "editorial",
    "list",
    "serif",
    "filter",
    "light"
  ],
  "docs": "https://hyperblur.dev/effects/blog-list-editorial",
  "files": [
    {
      "path": "registry/hyperblur/blog-list-editorial.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/blog-list-editorial.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface EditorialPost {\n  title: string;\n  excerpt: string;\n  date: string;\n  tag: string;\n  readTime: string;\n  href: string;\n}\n\nexport interface BlogListEditorialProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  posts?: EditorialPost[];\n  categories?: string[];\n  allLabel?: string;\n  category?: string;\n  defaultCategory?: string;\n  onCategoryChange?: (category: string) => void;\n  accent?: string;\n}\n\nconst defaultPosts: EditorialPost[] = [\n  {\n    title: \"The quiet economics of a four-day studio week\",\n    excerpt: \"Eighteen months in, our output went up and our sick days went down. The numbers, the trade-offs and the one meeting we refused to cut.\",\n    date: \"Oct 30, 2026\",\n    tag: \"Culture\",\n    readTime: \"9 min\",\n    href: \"#\",\n  },\n  {\n    title: \"Typesetting for long reads on small screens\",\n    excerpt: \"Measure, rhythm and the forgotten art of the hanging punctuation. A field guide to making 4,000 words feel short on a phone.\",\n    date: \"Oct 22, 2026\",\n    tag: \"Design\",\n    readTime: \"7 min\",\n    href: \"#\",\n  },\n  {\n    title: \"What we learned shipping a print magazine from a codebase\",\n    excerpt: \"Markdown in, press-ready PDF out. How a static site generator ended up running our quarterly print edition of 6,000 copies.\",\n    date: \"Oct 15, 2026\",\n    tag: \"Engineering\",\n    readTime: \"11 min\",\n    href: \"#\",\n  },\n  {\n    title: \"Interview: Mara Lindqvist on drawing maps by hand\",\n    excerpt: \"The cartographer behind the Nordic Trails atlas talks about ink, error, and why her maps leave out half the roads on purpose.\",\n    date: \"Oct 8, 2026\",\n    tag: \"Interviews\",\n    readTime: \"14 min\",\n    href: \"#\",\n  },\n  {\n    title: \"A small case for slower product launches\",\n    excerpt: \"We stopped announcing features on launch day. Adoption rose 22 percent. Notes on staged releases and listening before talking.\",\n    date: \"Sep 29, 2026\",\n    tag: \"Culture\",\n    readTime: \"6 min\",\n    href: \"#\",\n  },\n  {\n    title: \"Color systems that survive dark mode\",\n    excerpt: \"Why perceptual lightness beats hex math, and the twelve tokens that carried our product through three rebrands.\",\n    date: \"Sep 18, 2026\",\n    tag: \"Design\",\n    readTime: \"8 min\",\n    href: \"#\",\n  },\n];\n\nconst css = `\n.hb-ki2 {\n  --hb-ki2-accent: #d4573b;\n  --hb-ki2-paper: #f7f5ef;\n  --hb-ki2-ink: #1b1a17;\n  --hb-ki2-muted: #6f6a60;\n  --hb-ki2-line: rgba(27,26,23,.12);\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  background: var(--hb-ki2-paper);\n  color: var(--hb-ki2-ink);\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-ki2 *, .hb-ki2 *::before, .hb-ki2 *::after { box-sizing: border-box; }\n.hb-ki2-inner {\n  max-width: 1120px;\n  margin: 0 auto;\n  padding: clamp(56px, 9cqi, 112px) clamp(18px, 4cqi, 40px);\n}\n.hb-ki2-head {\n  display: grid;\n  gap: 16px;\n  padding-bottom: clamp(24px, 3.4cqi, 36px);\n  border-bottom: 1px solid var(--hb-ki2-ink);\n}\n.hb-ki2-eyebrow {\n  margin: 0 0 10px;\n  color: var(--hb-ki2-muted);\n  font-size: 12px;\n  font-weight: 600;\n  letter-spacing: .14em;\n  text-transform: uppercase;\n}\n.hb-ki2-title {\n  margin: 0;\n  font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);\n  font-size: clamp(44px, 8cqi, 88px);\n  font-weight: 400;\n  line-height: .95;\n  letter-spacing: -.02em;\n}\n.hb-ki2-title em { font-style: normal; color: var(--hb-ki2-accent); }\n.hb-ki2-sub {\n  margin: 0;\n  max-width: 380px;\n  color: var(--hb-ki2-muted);\n  font-size: 15px;\n  line-height: 1.6;\n}\n.hb-ki2-bar {\n  position: sticky;\n  top: 0;\n  z-index: 2;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 12px;\n  margin: 0 calc(clamp(18px, 4cqi, 40px) * -1);\n  padding: 14px clamp(18px, 4cqi, 40px);\n  border-bottom: 1px solid var(--hb-ki2-line);\n  background: color-mix(in srgb, var(--hb-ki2-paper) 88%, transparent);\n  backdrop-filter: blur(10px);\n  -webkit-backdrop-filter: blur(10px);\n}\n.hb-ki2-filters {\n  display: flex;\n  gap: 6px;\n  min-width: 0;\n  overflow-x: auto;\n  scrollbar-width: none;\n}\n.hb-ki2-filters::-webkit-scrollbar { display: none; }\n.hb-ki2-filter {\n  flex: none;\n  height: 32px;\n  margin: 0;\n  padding: 0 14px;\n  border: 1px solid var(--hb-ki2-line);\n  border-radius: 999px;\n  background: transparent;\n  color: var(--hb-ki2-ink);\n  font: inherit;\n  font-size: 13px;\n  font-weight: 500;\n  cursor: pointer;\n  transition: background-color .2s ease, color .2s ease, border-color .2s ease;\n}\n.hb-ki2-filter:hover { border-color: rgba(27,26,23,.3); }\n.hb-ki2-filter[aria-pressed=\"true\"] { border-color: var(--hb-ki2-ink); background: var(--hb-ki2-ink); color: var(--hb-ki2-paper); }\n.hb-ki2-filter:focus-visible { outline: 2px solid var(--hb-ki2-accent); outline-offset: 2px; }\n.hb-ki2-count {\n  flex: none;\n  display: none;\n  color: var(--hb-ki2-muted);\n  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);\n  font-size: 12px;\n}\n.hb-ki2-list { margin: 0; padding: 0; list-style: none; }\n.hb-ki2-item {\n  border-bottom: 1px solid var(--hb-ki2-line);\n  animation: hb-ki2-fade .55s cubic-bezier(.2,.7,.2,1) both;\n  animation-delay: var(--hb-ki2-d, 0ms);\n}\n.hb-ki2-link {\n  position: relative;\n  display: grid;\n  grid-template-columns: 1fr auto;\n  gap: 8px 20px;\n  padding: 24px 0;\n  color: inherit;\n  text-decoration: none;\n}\n.hb-ki2-link::before {\n  content: \"\";\n  position: absolute;\n  inset: 0 calc(clamp(18px, 4cqi, 40px) * -.5);\n  border-radius: 12px;\n  background: rgba(27,26,23,.035);\n  opacity: 0;\n  transition: opacity .25s ease;\n}\n.hb-ki2-link:hover::before { opacity: 1; }\n.hb-ki2-link:focus-visible { outline: none; }\n.hb-ki2-link:focus-visible::before { opacity: 1; box-shadow: inset 0 0 0 2px var(--hb-ki2-accent); }\n.hb-ki2-date {\n  position: relative;\n  grid-column: 1 / -1;\n  display: flex;\n  align-items: baseline;\n  gap: 8px;\n  color: var(--hb-ki2-muted);\n  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);\n  font-size: 12px;\n  letter-spacing: .02em;\n}\n.hb-ki2-day {\n  color: var(--hb-ki2-ink);\n  font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);\n  font-size: 22px;\n  line-height: 1;\n  letter-spacing: 0;\n}\n.hb-ki2-main { position: relative; min-width: 0; }\n.hb-ki2-tag {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  margin-bottom: 8px;\n  color: var(--hb-ki2-accent);\n  font-size: 11.5px;\n  font-weight: 600;\n  letter-spacing: .1em;\n  text-transform: uppercase;\n}\n.hb-ki2-tag::before { content: \"\"; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }\n.hb-ki2-read { color: var(--hb-ki2-muted); font-weight: 500; letter-spacing: .04em; }\n.hb-ki2-ptitle {\n  margin: 0;\n  font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);\n  font-size: clamp(24px, 3.2cqi, 34px);\n  font-weight: 400;\n  line-height: 1.08;\n  letter-spacing: -.01em;\n  text-wrap: balance;\n  transition: color .25s ease;\n}\n.hb-ki2-link:hover .hb-ki2-ptitle { color: color-mix(in srgb, var(--hb-ki2-ink) 70%, var(--hb-ki2-accent)); }\n.hb-ki2-excerpt {\n  margin: 10px 0 0;\n  max-width: 620px;\n  color: var(--hb-ki2-muted);\n  font-size: 15px;\n  line-height: 1.6;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n  overflow: hidden;\n}\n.hb-ki2-arrow {\n  position: relative;\n  align-self: center;\n  display: grid;\n  place-items: center;\n  width: 44px;\n  height: 44px;\n  border: 1px solid var(--hb-ki2-line);\n  border-radius: 50%;\n  overflow: hidden;\n  transition: border-color .25s ease, background-color .25s ease, color .25s ease;\n}\n.hb-ki2-arrow svg {\n  width: 18px;\n  height: 18px;\n  grid-area: 1 / 1;\n  transition: transform .45s cubic-bezier(.6,0,.2,1);\n}\n.hb-ki2-arrow svg + svg { transform: translateX(-180%); }\n.hb-ki2-link:hover .hb-ki2-arrow, .hb-ki2-link:focus-visible .hb-ki2-arrow { border-color: var(--hb-ki2-accent); background: var(--hb-ki2-accent); color: #fff; }\n.hb-ki2-link:hover .hb-ki2-arrow svg, .hb-ki2-link:focus-visible .hb-ki2-arrow svg { transform: translateX(180%); }\n.hb-ki2-link:hover .hb-ki2-arrow svg + svg, .hb-ki2-link:focus-visible .hb-ki2-arrow svg + svg { transform: none; }\n.hb-ki2-empty {\n  padding: 56px 0;\n  color: var(--hb-ki2-muted);\n  font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);\n  font-size: 24px;\n  text-align: center;\n}\n@container (min-width: 560px) {\n  .hb-ki2-count { display: inline; }\n}\n@container (min-width: 720px) {\n  .hb-ki2-head { grid-template-columns: 1fr auto; align-items: end; }\n  .hb-ki2-link { grid-template-columns: 120px 1fr auto; gap: 32px; padding: 28px 0; }\n  .hb-ki2-date { grid-column: auto; flex-direction: column; gap: 6px; padding-top: 2px; }\n  .hb-ki2-day { font-size: 30px; }\n}\n@keyframes hb-ki2-fade {\n  from { opacity: 0; transform: translateY(10px); }\n  to { opacity: 1; transform: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-ki2-item { animation: none; }\n  .hb-ki2-filter, .hb-ki2-link::before, .hb-ki2-ptitle, .hb-ki2-arrow, .hb-ki2-arrow svg { transition: none; }\n}\n`;\n\nfunction ArrowIcon() {\n  return (\n    <svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n      <path d=\"M4 10h12M11 5l5 5-5 5\" />\n    </svg>\n  );\n}\n\nfunction splitDate(date: string) {\n  const match = /^([A-Za-z]+)\\s+(\\d{1,2}),?\\s*(\\d{4})?$/.exec(date.trim());\n  if (!match) return { day: \"\", rest: date };\n  return { day: match[2].padStart(2, \"0\"), rest: `${match[1]} ${match[3] ?? \"\"}`.trim() };\n}\n\nexport function BlogListEditorial({\n  eyebrow = \"Field notes · Issue 31\",\n  title = \"Writing from the studio\",\n  subtitle = \"Essays, interviews and working notes on design, engineering and the business of making things slowly.\",\n  posts = defaultPosts,\n  categories,\n  allLabel = \"All\",\n  category,\n  defaultCategory,\n  onCategoryChange,\n  accent = \"#d4573b\",\n  className,\n  style,\n  ...rest\n}: BlogListEditorialProps) {\n  const options = React.useMemo(() => {\n    const list = categories ?? Array.from(new Set(posts.map((post) => post.tag)));\n    return [allLabel, ...list.filter((item) => item !== allLabel)];\n  }, [categories, posts, allLabel]);\n  const [internal, setInternal] = React.useState(defaultCategory ?? allLabel);\n  const active = category ?? internal;\n  const visible = active === allLabel ? posts : posts.filter((post) => post.tag === active);\n\n  const choose = (next: string) => {\n    if (category === undefined) setInternal(next);\n    onCategoryChange?.(next);\n  };\n\n  const onKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n    if (event.key !== \"ArrowRight\" && event.key !== \"ArrowLeft\") return;\n    const buttons = Array.from(event.currentTarget.querySelectorAll<HTMLButtonElement>(\"button\"));\n    const current = buttons.indexOf(document.activeElement as HTMLButtonElement);\n    if (current < 0) return;\n    event.preventDefault();\n    const next = (current + (event.key === \"ArrowRight\" ? 1 : -1) + buttons.length) % buttons.length;\n    buttons[next]?.focus();\n  };\n\n  const words = title.split(\" \");\n  const last = words.pop();\n\n  return (\n    <section\n      className={className ? `hb-ki2 ${className}` : \"hb-ki2\"}\n      style={{ \"--hb-ki2-accent\": accent, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-blog-list-editorial\" precedence=\"default\">{css}</style>\n      <div className=\"hb-ki2-inner\">\n        <header className=\"hb-ki2-head\">\n          <div>\n            {eyebrow && <p className=\"hb-ki2-eyebrow\">{eyebrow}</p>}\n            <h2 className=\"hb-ki2-title\">\n              {words.join(\" \")}\n              {words.length > 0 ? \" \" : \"\"}\n              <em>{last}</em>\n            </h2>\n          </div>\n          {subtitle && <p className=\"hb-ki2-sub\">{subtitle}</p>}\n        </header>\n        <div className=\"hb-ki2-bar\">\n          <div className=\"hb-ki2-filters\" role=\"group\" aria-label=\"Filter posts by category\" onKeyDown={onKeyDown}>\n            {options.map((option) => (\n              <button\n                key={option}\n                type=\"button\"\n                className=\"hb-ki2-filter\"\n                aria-pressed={option === active}\n                onClick={() => choose(option)}\n              >\n                {option}\n              </button>\n            ))}\n          </div>\n          <span className=\"hb-ki2-count\" aria-live=\"polite\">\n            {String(visible.length).padStart(2, \"0\")} {visible.length === 1 ? \"entry\" : \"entries\"}\n          </span>\n        </div>\n        {visible.length === 0 ? (\n          <p className=\"hb-ki2-empty\">Nothing filed under {active} yet.</p>\n        ) : (\n          <ul className=\"hb-ki2-list\" key={active}>\n            {visible.map((post, i) => {\n              const { day, rest: monthYear } = splitDate(post.date);\n              return (\n                <li\n                  key={`${post.title}-${i}`}\n                  className=\"hb-ki2-item\"\n                  style={{ \"--hb-ki2-d\": `${(i * 70).toFixed(0)}ms` } as React.CSSProperties}\n                >\n                  <a className=\"hb-ki2-link\" href={post.href}>\n                    <time className=\"hb-ki2-date\">\n                      {day && <span className=\"hb-ki2-day\">{day}</span>}\n                      <span>{monthYear}</span>\n                    </time>\n                    <div className=\"hb-ki2-main\">\n                      <span className=\"hb-ki2-tag\">\n                        {post.tag}\n                        <span className=\"hb-ki2-read\">· {post.readTime}</span>\n                      </span>\n                      <h3 className=\"hb-ki2-ptitle\">{post.title}</h3>\n                      <p className=\"hb-ki2-excerpt\">{post.excerpt}</p>\n                    </div>\n                    <span className=\"hb-ki2-arrow\" aria-hidden=\"true\">\n                      <ArrowIcon />\n                      <ArrowIcon />\n                    </span>\n                  </a>\n                </li>\n              );\n            })}\n          </ul>\n        )}\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}