{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "footer-sitemap-status",
  "type": "registry:component",
  "title": "Footer Sitemap Status",
  "description": "A footer with a live status card: a pulsing system state, a 90 day uptime strip you can scrub with the pointer or arrow keys to read each day, and per service states, beside a four column sitemap.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "footer",
    "footer",
    "status",
    "uptime",
    "sitemap",
    "developer",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/footer-sitemap-status",
  "files": [
    {
      "path": "registry/hyperblur/footer-sitemap-status.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/footer-sitemap-status.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface FooterSitemapStatusLink {\n  label: string;\n  href: string;\n}\n\nexport interface FooterSitemapStatusGroup {\n  title: string;\n  links: FooterSitemapStatusLink[];\n}\n\nexport interface FooterSitemapStatusDay {\n  label: string;\n  uptime: number;\n  note?: string;\n}\n\nexport interface FooterSitemapStatusService {\n  name: string;\n  state: \"operational\" | \"degraded\" | \"outage\";\n}\n\nexport interface FooterSitemapStatusProps extends React.HTMLAttributes<HTMLElement> {\n  brand?: string;\n  description?: string;\n  status?: \"operational\" | \"degraded\" | \"outage\";\n  statusHref?: string;\n  history?: FooterSitemapStatusDay[];\n  services?: FooterSitemapStatusService[];\n  groups?: FooterSitemapStatusGroup[];\n  copyright?: string;\n  legal?: FooterSitemapStatusLink[];\n  accent?: string;\n}\n\nconst css = `\n.hb-wc4 {\n  --hb-wc4-accent: #22d3ee;\n  --hb-wc4-ok: #34d399;\n  --hb-wc4-warn: #fbbf24;\n  --hb-wc4-bad: #f87171;\n  container-type: inline-size;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-wc4 *, .hb-wc4 *::before, .hb-wc4 *::after { box-sizing: border-box; }\n.hb-wc4-inner { max-width: 1180px; margin: 0 auto; padding: 64px 20px 28px; }\n.hb-wc4-grid { display: grid; gap: 44px; }\n.hb-wc4-left { display: grid; gap: 22px; align-content: start; }\n.hb-wc4-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-grotesk), var(--font-sans), sans-serif; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }\n.hb-wc4-logo { position: relative; width: 28px; height: 28px; border-radius: 8px; background: #151515; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); overflow: hidden; }\n.hb-wc4-logo::before, .hb-wc4-logo::after { content: \"\"; position: absolute; left: 6px; right: 6px; height: 3px; border-radius: 2px; background: var(--hb-wc4-accent); }\n.hb-wc4-logo::before { top: 9px; }\n.hb-wc4-logo::after { top: 16px; right: 11px; opacity: .55; }\n.hb-wc4-desc { margin: 0; max-width: 380px; color: #8f8f8f; font-size: 14.5px; line-height: 1.6; }\n.hb-wc4-card {\n  position: relative;\n  display: grid;\n  gap: 16px;\n  padding: 18px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 16px;\n  background: linear-gradient(180deg, #131313, #0f0f0f);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 24px 60px -30px rgba(0, 0, 0, .9);\n}\n.hb-wc4-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }\n.hb-wc4-state { display: inline-flex; align-items: center; gap: 10px; color: #ededed; font-size: 14px; font-weight: 600; text-decoration: none; }\n.hb-wc4-state:focus-visible, .hb-wc4-link:focus-visible, .hb-wc4-legal a:focus-visible { outline: 2px solid var(--hb-wc4-accent); outline-offset: 3px; border-radius: 6px; }\n.hb-wc4-pulse { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--hb-wc4-c); box-shadow: 0 0 12px var(--hb-wc4-c); }\n.hb-wc4-pulse::before, .hb-wc4-pulse::after { content: \"\"; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--hb-wc4-c); animation: hb-wc4-ring 2.4s cubic-bezier(.2, .6, .3, 1) infinite; }\n.hb-wc4-pulse::after { animation-delay: 1.2s; }\n.hb-wc4-pct { color: #8f8f8f; font-family: var(--font-mono), monospace; font-size: 12px; font-variant-numeric: tabular-nums; }\n.hb-wc4-strip { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 34px; padding: 0; border-radius: 6px; outline: none; cursor: crosshair; }\n.hb-wc4-strip:focus-visible { box-shadow: 0 0 0 2px #0a0a0a, 0 0 0 4px var(--hb-wc4-accent); }\n.hb-wc4-bar { flex: 1 1 0; min-width: 1px; height: 100%; border-radius: 2px; background: var(--hb-wc4-c); opacity: .78; transform-origin: 50% 100%; animation: hb-wc4-grow .8s cubic-bezier(.2, .9, .2, 1) both; animation-delay: calc(var(--hb-wc4-i) * 6ms); transition: opacity .15s ease, transform .2s ease; }\n.hb-wc4-bar[data-active=\"true\"] { opacity: 1; transform: scaleY(1.18); box-shadow: 0 0 10px var(--hb-wc4-c); }\n.hb-wc4-strip:hover .hb-wc4-bar:not([data-active=\"true\"]) { opacity: .45; }\n.hb-wc4-tip {\n  position: absolute;\n  bottom: calc(100% + 10px);\n  left: var(--hb-wc4-x);\n  z-index: 2;\n  min-width: 168px;\n  padding: 9px 11px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 10px;\n  background: rgba(23, 23, 23, .96);\n  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .8);\n  color: #ededed;\n  font-size: 12px;\n  line-height: 1.45;\n  transform: translateX(-50%);\n  pointer-events: none;\n  animation: hb-wc4-tip .18s ease-out;\n}\n.hb-wc4-tip b { display: block; font-weight: 600; }\n.hb-wc4-tip span { color: #8f8f8f; }\n.hb-wc4-axis { display: flex; justify-content: space-between; color: #5f5f5f; font-size: 11.5px; }\n.hb-wc4-svc { display: grid; gap: 8px; margin: 0; padding: 12px 0 0; border-top: 1px dashed rgba(255, 255, 255, .08); list-style: none; }\n.hb-wc4-svc li { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #a1a1a1; font-size: 13px; }\n.hb-wc4-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--hb-wc4-c); font-size: 12px; font-weight: 550; }\n.hb-wc4-tag::before { content: \"\"; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }\n.hb-wc4-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; align-content: start; }\n.hb-wc4-gt { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: #6f6f6f; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }\n.hb-wc4-gt::before { content: \"\"; width: 10px; height: 1px; background: var(--hb-wc4-accent); }\n.hb-wc4-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }\n.hb-wc4-link { color: #b4b4b4; font-size: 14px; text-decoration: none; transition: color .2s ease; }\n.hb-wc4-link:hover { color: #fff; }\n.hb-wc4-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .07); color: #6f6f6f; font-size: 13px; }\n.hb-wc4-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }\n.hb-wc4-legal a { color: #8f8f8f; text-decoration: none; }\n.hb-wc4-legal a:hover { color: #ededed; }\n.hb-wc4-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n@keyframes hb-wc4-ring { from { transform: scale(1); opacity: .8; } to { transform: scale(2.6); opacity: 0; } }\n@keyframes hb-wc4-grow { from { transform: scaleY(.15); opacity: 0; } }\n@keyframes hb-wc4-tip { from { opacity: 0; transform: translate(-50%, 4px); } }\n@container (min-width: 760px) {\n  .hb-wc4-inner { padding: 88px 40px 32px; }\n  .hb-wc4-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 72px; }\n  .hb-wc4-map { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-wc4 *, .hb-wc4 *::before, .hb-wc4 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nconst months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nconst monthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nfunction hash(n: number) {\n  let x = (n + 1) * 2654435761;\n  x = Math.imul(x ^ (x >>> 15), 2246822519);\n  x = Math.imul(x ^ (x >>> 13), 3266489917);\n  return (x ^ (x >>> 16)) >>> 0;\n}\n\nfunction buildHistory(): FooterSitemapStatusDay[] {\n  const out: FooterSitemapStatusDay[] = [];\n  let m = 10;\n  let d = 7;\n  for (let i = 0; i < 90; i++) {\n    const h = hash(i) % 1000;\n    let uptime = 100;\n    let note: string | undefined;\n    if (i === 23) {\n      uptime = 97.42;\n      note = \"Partial outage in webhook delivery, 37 min\";\n    } else if (i === 58) {\n      uptime = 99.31;\n      note = \"Elevated API latency in eu-west, 12 min\";\n    } else if (h < 40) {\n      uptime = 99.9 + (h % 9) / 100;\n      note = \"Brief connection resets, resolved automatically\";\n    }\n    out.unshift({ label: `${months[m]} ${d}`, uptime, note });\n    d -= 1;\n    if (d === 0) {\n      m = (m + 11) % 12;\n      d = monthDays[m];\n    }\n  }\n  return out;\n}\n\nconst defaultHistory = buildHistory();\n\nconst defaultServices: FooterSitemapStatusService[] = [\n  { name: \"REST and GraphQL API\", state: \"operational\" },\n  { name: \"Webhooks\", state: \"operational\" },\n  { name: \"Dashboard\", state: \"operational\" },\n];\n\nconst defaultGroups: FooterSitemapStatusGroup[] = [\n  { title: \"Platform\", links: [{ label: \"Payments\", href: \"#\" }, { label: \"Invoicing\", href: \"#\" }, { label: \"Payouts\", href: \"#\" }, { label: \"Fraud rules\", href: \"#\" }] },\n  { title: \"Developers\", links: [{ label: \"Documentation\", href: \"#\" }, { label: \"API reference\", href: \"#\" }, { label: \"SDKs\", href: \"#\" }, { label: \"Changelog\", href: \"#\" }] },\n  { title: \"Company\", links: [{ label: \"About\", href: \"#\" }, { label: \"Customers\", href: \"#\" }, { label: \"Careers\", href: \"#\" }, { label: \"Newsroom\", href: \"#\" }] },\n  { title: \"Support\", links: [{ label: \"Help center\", href: \"#\" }, { label: \"Contact sales\", href: \"#\" }, { label: \"Security\", href: \"#\" }, { label: \"System status\", href: \"#\" }] },\n];\n\nconst defaultLegal: FooterSitemapStatusLink[] = [\n  { label: \"Privacy\", href: \"#\" },\n  { label: \"Terms\", href: \"#\" },\n  { label: \"DPA\", href: \"#\" },\n  { label: \"Licenses\", href: \"#\" },\n];\n\nconst labels = { operational: \"All systems operational\", degraded: \"Degraded performance\", outage: \"Major outage\" };\nconst short = { operational: \"Operational\", degraded: \"Degraded\", outage: \"Outage\" };\n\nfunction color(state: \"operational\" | \"degraded\" | \"outage\") {\n  return state === \"operational\" ? \"var(--hb-wc4-ok)\" : state === \"degraded\" ? \"var(--hb-wc4-warn)\" : \"var(--hb-wc4-bad)\";\n}\n\nfunction dayColor(u: number) {\n  return u >= 99.95 ? \"var(--hb-wc4-ok)\" : u >= 99 ? \"var(--hb-wc4-warn)\" : \"var(--hb-wc4-bad)\";\n}\n\nexport function FooterSitemapStatus({\n  brand = \"Ledgerline\",\n  description = \"Payments infrastructure for software platforms. Accept, route and reconcile money in 46 countries with one integration.\",\n  status = \"operational\",\n  statusHref = \"#\",\n  history = defaultHistory,\n  services = defaultServices,\n  groups = defaultGroups,\n  copyright = \"© 2026 Ledgerline, Inc.\",\n  legal = defaultLegal,\n  accent = \"#22d3ee\",\n  className = \"\",\n  style,\n  ...rest\n}: FooterSitemapStatusProps) {\n  const [active, setActive] = React.useState<number | null>(null);\n  const strip = React.useRef<HTMLDivElement>(null);\n  const avg = history.length ? history.reduce((s, d) => s + d.uptime, 0) / history.length : 100;\n  const cur = active === null ? null : history[active];\n\n  const pick = (clientX: number) => {\n    const el = strip.current;\n    if (!el || !history.length) return;\n    const r = el.getBoundingClientRect();\n    const i = Math.floor(((clientX - r.left) / r.width) * history.length);\n    setActive(Math.max(0, Math.min(history.length - 1, i)));\n  };\n\n  const key = (e: React.KeyboardEvent<HTMLDivElement>) => {\n    const last = history.length - 1;\n    if (e.key === \"ArrowRight\" || e.key === \"ArrowLeft\") {\n      e.preventDefault();\n      const step = e.key === \"ArrowRight\" ? 1 : -1;\n      setActive((a) => Math.max(0, Math.min(last, (a ?? last) + (a === null ? 0 : step))));\n    } else if (e.key === \"Home\") {\n      e.preventDefault();\n      setActive(0);\n    } else if (e.key === \"End\") {\n      e.preventDefault();\n      setActive(last);\n    } else if (e.key === \"Escape\") {\n      setActive(null);\n    }\n  };\n\n  const vars = { \"--hb-wc4-accent\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <footer className={`hb-wc4 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-footer-sitemap-status\" precedence=\"default\">{css}</style>\n      <div className=\"hb-wc4-inner\">\n        <div className=\"hb-wc4-grid\">\n          <div className=\"hb-wc4-left\">\n            <span className=\"hb-wc4-brand\">\n              <span className=\"hb-wc4-logo\" aria-hidden=\"true\" />\n              {brand}\n            </span>\n            <p className=\"hb-wc4-desc\">{description}</p>\n            <div className=\"hb-wc4-card\">\n              <div className=\"hb-wc4-head\">\n                <a className=\"hb-wc4-state\" href={statusHref} style={{ \"--hb-wc4-c\": color(status) } as React.CSSProperties}>\n                  <span className=\"hb-wc4-pulse\" aria-hidden=\"true\" />\n                  {labels[status]}\n                </a>\n                <span className=\"hb-wc4-pct\">{avg.toFixed(2)}% uptime</span>\n              </div>\n              <div\n                ref={strip}\n                className=\"hb-wc4-strip\"\n                role=\"group\"\n                tabIndex={0}\n                aria-label={`Uptime for the last ${history.length} days. Use the arrow keys to inspect a day.`}\n                onPointerMove={(e) => pick(e.clientX)}\n                onPointerDown={(e) => pick(e.clientX)}\n                onPointerLeave={() => setActive(null)}\n                onBlur={() => setActive(null)}\n                onKeyDown={key}\n              >\n                {history.map((d, i) => (\n                  <span\n                    key={`${d.label}-${i}`}\n                    className=\"hb-wc4-bar\"\n                    data-active={active === i ? \"true\" : \"false\"}\n                    style={{ \"--hb-wc4-c\": dayColor(d.uptime), \"--hb-wc4-i\": i } as React.CSSProperties}\n                  />\n                ))}\n                {cur && active !== null ? (\n                  <span className=\"hb-wc4-tip\" style={{ \"--hb-wc4-x\": `${(((active + 0.5) / history.length) * 100).toFixed(2)}%` } as React.CSSProperties}>\n                    <b>\n                      {cur.label} · {cur.uptime.toFixed(2)}%\n                    </b>\n                    <span>{cur.note ?? \"No incidents recorded\"}</span>\n                  </span>\n                ) : null}\n              </div>\n              <span className=\"hb-wc4-sr\" aria-live=\"polite\">\n                {cur ? `${cur.label}, ${cur.uptime.toFixed(2)} percent. ${cur.note ?? \"No incidents recorded\"}` : \"\"}\n              </span>\n              <div className=\"hb-wc4-axis\" aria-hidden=\"true\">\n                <span>{history.length} days ago</span>\n                <span>Today</span>\n              </div>\n              <ul className=\"hb-wc4-svc\">\n                {services.map((s) => (\n                  <li key={s.name}>\n                    {s.name}\n                    <span className=\"hb-wc4-tag\" style={{ \"--hb-wc4-c\": color(s.state) } as React.CSSProperties}>{short[s.state]}</span>\n                  </li>\n                ))}\n              </ul>\n            </div>\n          </div>\n          <nav className=\"hb-wc4-map\" aria-label=\"Sitemap\">\n            {groups.map((g) => (\n              <div key={g.title}>\n                <p className=\"hb-wc4-gt\">{g.title}</p>\n                <ul className=\"hb-wc4-list\">\n                  {g.links.map((l) => (\n                    <li key={l.label}>\n                      <a className=\"hb-wc4-link\" href={l.href}>{l.label}</a>\n                    </li>\n                  ))}\n                </ul>\n              </div>\n            ))}\n          </nav>\n        </div>\n        <div className=\"hb-wc4-bottom\">\n          <span>{copyright}</span>\n          <ul className=\"hb-wc4-legal\">\n            {legal.map((l) => (\n              <li key={l.label}>\n                <a href={l.href}>{l.label}</a>\n              </li>\n            ))}\n          </ul>\n        </div>\n      </div>\n    </footer>\n  );\n}\n"
    }
  ]
}