{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "profile-dev-skyline",
  "type": "registry:component",
  "title": "Profile Dev Skyline",
  "description": "A developer profile whose contributions rise as an isometric skyline, one tower per day, with hover and arrow-key inspection of each day. Beside it sit streak counters, a language bar and pinned repositories.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "profile",
    "profile",
    "developer",
    "contributions",
    "isometric",
    "chart",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/profile-dev-skyline",
  "files": [
    {
      "path": "registry/hyperblur/profile-dev-skyline.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/profile-dev-skyline.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ProfileDevLanguage {\n  name: string;\n  share: number;\n  color: string;\n}\n\nexport interface ProfileDevRepo {\n  name: string;\n  description: string;\n  stars: string;\n  language: string;\n}\n\nexport interface ProfileDevSkylineProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  name?: string;\n  handle?: string;\n  role?: string;\n  bio?: string;\n  weeks?: number;\n  startDate?: string;\n  seed?: number;\n  contributions?: number[];\n  languages?: ProfileDevLanguage[];\n  repos?: ProfileDevRepo[];\n  followLabel?: string;\n  onFollow?: () => void;\n  onCellSelect?: (cell: { date: string; count: number }) => void;\n  accent?: string;\n}\n\nconst defaultLanguages: ProfileDevLanguage[] = [\n  { name: \"Rust\", share: 46, color: \"#f59e0b\" },\n  { name: \"TypeScript\", share: 31, color: \"#38bdf8\" },\n  { name: \"Go\", share: 14, color: \"#2dd4bf\" },\n  { name: \"Shell\", share: 9, color: \"#a3a3a3\" },\n];\n\nconst defaultRepos: ProfileDevRepo[] = [\n  { name: \"quarry\", description: \"Embedded columnar store for edge devices\", stars: \"4.2k\", language: \"Rust\" },\n  { name: \"tidepool\", description: \"Backpressure-aware job queue for Postgres\", stars: \"1.8k\", language: \"Go\" },\n  { name: \"lintel\", description: \"Zero-config schema linter for TypeScript APIs\", stars: \"912\", language: \"TypeScript\" },\n];\n\nconst months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nconst dayNames = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nfunction addDays(start: string, n: number) {\n  const [ys, ms, ds] = start.split(\"-\").map(Number);\n  let y = ys;\n  let m = ms - 1;\n  let d = ds + n;\n  const dim = (yy: number, mm: number) => [31, (yy % 4 === 0 && yy % 100 !== 0) || yy % 400 === 0 ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][mm];\n  while (d > dim(y, m)) {\n    d -= dim(y, m);\n    m++;\n    if (m > 11) {\n      m = 0;\n      y++;\n    }\n  }\n  return { y, m, d };\n}\n\nfunction hash(n: number) {\n  let x = (n * 2654435761) >>> 0;\n  x ^= x >>> 15;\n  x = Math.imul(x, 2246822519) >>> 0;\n  x ^= x >>> 13;\n  return x >>> 0;\n}\n\nconst css = `\n@keyframes hb-wd10-rise { from { transform: scaleY(0.02); } to { transform: scaleY(1); } }\n@keyframes hb-wd10-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }\n.hb-wd10 {\n  --hb-wd10-accent: #38bdf8;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  background: radial-gradient(60% 50% at 80% 10%, color-mix(in srgb, var(--hb-wd10-accent) 9%, transparent), transparent 70%), #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-wd10 *, .hb-wd10 *::before, .hb-wd10 *::after { box-sizing: border-box; }\n.hb-wd10-in { max-width: 1120px; margin: 0 auto; padding: 64px 20px 84px; display: grid; gap: 28px; }\n@container (min-width: 900px) { .hb-wd10-in { grid-template-columns: 300px 1fr; gap: 40px; align-items: start; } }\n.hb-wd10-card { display: grid; gap: 16px; }\n.hb-wd10-who { display: flex; gap: 14px; align-items: center; }\n.hb-wd10-av { position: relative; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font: 600 22px/1 var(--font-grotesk, inherit); color: #04131c; background: conic-gradient(from 210deg, var(--hb-wd10-accent), #a78bfa, #f472b6, var(--hb-wd10-accent)); box-shadow: 0 10px 30px -12px var(--hb-wd10-accent); flex: none; }\n.hb-wd10-av::after { content: \"\"; position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: #22c55e; border: 3px solid #0a0a0a; }\n.hb-wd10-name { margin: 0; font: 600 22px/1.15 var(--font-grotesk, inherit); letter-spacing: -0.02em; }\n.hb-wd10-handle { margin: 4px 0 0; font: 500 13px/1 var(--font-mono, monospace); color: #8f8f8f; }\n.hb-wd10-role { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 5px 10px; border-radius: 999px; background: #141414; border: 1px solid rgba(255,255,255,0.08); font-size: 12px; color: #cfcfcf; }\n.hb-wd10-role::before { content: \"\"; width: 6px; height: 6px; border-radius: 50%; background: var(--hb-wd10-accent); }\n.hb-wd10-bio { margin: 0; font-size: 14px; line-height: 1.6; color: #9a9a9a; }\n.hb-wd10-follow { appearance: none; border: 0; height: 40px; border-radius: 10px; background: #ededed; color: #0a0a0a; font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; transition: transform 0.2s cubic-bezier(0.34, 1.4, 0.5, 1), background-color 0.2s ease; }\n.hb-wd10-follow:hover { background: #fff; }\n.hb-wd10-follow:active { transform: scale(0.98); }\n.hb-wd10-follow[aria-pressed=\"true\"] { background: #171717; color: #ededed; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }\n.hb-wd10-follow:focus-visible { outline: 2px solid var(--hb-wd10-accent); outline-offset: 3px; }\n.hb-wd10-langbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; }\n.hb-wd10-langbar span { height: 100%; animation: hb-wd10-fade 0.6s ease both; }\n.hb-wd10-langs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12.5px; color: #a1a1a1; }\n.hb-wd10-langs li { display: flex; align-items: center; gap: 7px; }\n.hb-wd10-langs i { width: 8px; height: 8px; border-radius: 50%; font-style: normal; }\n.hb-wd10-langs b { margin-left: auto; font: 500 11.5px var(--font-mono, monospace); color: #6f6f6f; }\n.hb-wd10-main { display: grid; gap: 16px; min-width: 0; }\n.hb-wd10-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }\n.hb-wd10-kpi { padding: 14px 16px; border-radius: 14px; background: #111; border: 1px solid rgba(255,255,255,0.07); animation: hb-wd10-fade 0.5s ease both; }\n.hb-wd10-kpi b { display: block; font: 600 24px/1 var(--font-grotesk, inherit); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }\n.hb-wd10-kpi span { display: block; margin-top: 6px; font-size: 12px; color: #8f8f8f; }\n.hb-wd10-kpi:first-child b { color: var(--hb-wd10-accent); }\n.hb-wd10-city { position: relative; border-radius: 20px; border: 1px solid rgba(255,255,255,0.08); background: linear-gradient(180deg, #0f1214, #0c0c0c 70%); padding: 16px 16px 12px; overflow: hidden; }\n.hb-wd10-cityhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: #a1a1a1; }\n.hb-wd10-cityhead strong { color: #ededed; font-weight: 600; }\n.hb-wd10-legend { display: inline-flex; align-items: center; gap: 4px; font: 500 11px var(--font-mono, monospace); color: #6f6f6f; }\n.hb-wd10-legend i { width: 10px; height: 10px; border-radius: 2px; font-style: normal; }\n.hb-wd10-svg { display: block; width: 100%; height: auto; margin-top: 6px; outline: none; border-radius: 10px; }\n.hb-wd10-svg:focus-visible { box-shadow: 0 0 0 2px var(--hb-wd10-accent); }\n.hb-wd10-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: hb-wd10-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; cursor: crosshair; }\n.hb-wd10-bar polygon { transition: opacity 0.2s ease; }\n.hb-wd10-svg:hover .hb-wd10-bar:not([data-on=\"true\"]) polygon, .hb-wd10-svg:focus-visible .hb-wd10-bar:not([data-on=\"true\"]) polygon { opacity: 0.55; }\n.hb-wd10-bar[data-on=\"true\"] polygon.t { fill: #fff; }\n.hb-wd10-tip { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #121212; border: 1px solid rgba(255,255,255,0.06); font-size: 12.5px; color: #a1a1a1; min-height: 40px; align-items: center; }\n.hb-wd10-tip b { color: #ededed; font-weight: 600; }\n.hb-wd10-tip span:last-child { font: 500 11px var(--font-mono, monospace); color: #6f6f6f; }\n.hb-wd10-repos { display: grid; gap: 10px; }\n@container (min-width: 700px) { .hb-wd10-repos { grid-template-columns: repeat(3, 1fr); } }\n.hb-wd10-repo { display: grid; gap: 6px; padding: 14px; border-radius: 14px; background: #111; border: 1px solid rgba(255,255,255,0.07); text-decoration: none; color: inherit; transition: border-color 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }\n.hb-wd10-repo:hover { border-color: color-mix(in srgb, var(--hb-wd10-accent) 45%, transparent); transform: translateY(-2px); }\n.hb-wd10-repo:focus-visible { outline: 2px solid var(--hb-wd10-accent); outline-offset: 2px; }\n.hb-wd10-repo b { font: 600 14px/1.2 var(--font-mono, monospace); color: var(--hb-wd10-accent); }\n.hb-wd10-repo span { font-size: 12.5px; color: #9a9a9a; line-height: 1.45; }\n.hb-wd10-repo small { display: flex; gap: 12px; font: 500 11.5px var(--font-mono, monospace); color: #7a7a7a; }\n@media (prefers-reduced-motion: reduce) {\n  .hb-wd10 *, .hb-wd10 *::before, .hb-wd10 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nexport function ProfileDevSkyline({\n  name = \"Teodor Vasquez\",\n  handle = \"@tvasquez\",\n  role = \"Systems engineer at Brightline\",\n  bio = \"Builds storage engines and the boring tools around them. Maintainer of quarry. Writes about latency, caches and good error messages.\",\n  weeks = 30,\n  startDate = \"2026-04-06\",\n  seed = 7,\n  contributions,\n  languages = defaultLanguages,\n  repos = defaultRepos,\n  followLabel = \"Follow\",\n  onFollow,\n  onCellSelect,\n  accent = \"#38bdf8\",\n  className = \"\",\n  style,\n  ...rest\n}: ProfileDevSkylineProps) {\n  const total = weeks * 7;\n  const data = React.useMemo(() => {\n    if (contributions && contributions.length >= total) return contributions.slice(0, total);\n    return Array.from({ length: total }, (_, i) => {\n      const day = i % 7;\n      const w = Math.floor(i / 7);\n      const r = hash(i * 13 + seed);\n      if (day >= 5 && r % 3 !== 0) return r % 2;\n      const sprint = Math.sin(w * 0.55 + seed) * 0.5 + 0.5;\n      if (r % 9 === 0) return 0;\n      return Math.round(1 + sprint * 9 + (r % 5));\n    });\n  }, [contributions, total, seed]);\n  const [sel, setSel] = React.useState<number | null>(null);\n  const [following, setFollowing] = React.useState(false);\n\n  const sum = data.reduce((a, b) => a + b, 0);\n  let streak = 0;\n  for (let i = data.length - 1; i >= 0 && data[i] > 0; i--) streak++;\n  let best = 0;\n  let run = 0;\n  for (const v of data) {\n    run = v > 0 ? run + 1 : 0;\n    best = Math.max(best, run);\n  }\n  const maxV = Math.max(1, ...data);\n\n  const cw = 10;\n  const dx = 6;\n  const dy = 8;\n  const unit = 54 / maxV;\n  const W = weeks * (cw + 2) + 7 * dx + 20;\n  const H = 7 * dy + 80;\n  const ox = 7 * dx + 6;\n  const oy = 62;\n\n  const level = (v: number) => (v === 0 ? 0 : Math.min(4, Math.ceil((v / maxV) * 4)));\n  const tops = [\"#1b1f22\", \"color-mix(in srgb, var(--hb-wd10-accent) 35%, #12181c)\", \"color-mix(in srgb, var(--hb-wd10-accent) 60%, #12181c)\", \"color-mix(in srgb, var(--hb-wd10-accent) 82%, #12181c)\", \"var(--hb-wd10-accent)\"];\n\n  const label = (i: number) => {\n    const { m, d } = addDays(startDate, i);\n    return `${dayNames[i % 7]}, ${months[m]} ${d}`;\n  };\n\n  const choose = (i: number) => {\n    setSel(i);\n    const { y, m, d } = addDays(startDate, i);\n    onCellSelect?.({ date: `${y}-${String(m + 1).padStart(2, \"0\")}-${String(d).padStart(2, \"0\")}`, count: data[i] });\n  };\n\n  const onKey = (e: React.KeyboardEvent) => {\n    const cur = sel ?? data.length - 1;\n    const map: Record<string, number> = { ArrowRight: 7, ArrowLeft: -7, ArrowDown: 1, ArrowUp: -1 };\n    if (!(e.key in map)) return;\n    e.preventDefault();\n    const n = cur + map[e.key];\n    if (n >= 0 && n < data.length) choose(n);\n  };\n\n  const order: number[] = [];\n  for (let d = 0; d < 7; d++) for (let w = 0; w < weeks; w++) order.push(w * 7 + d);\n\n  const monthMarks: { x: number; text: string }[] = [];\n  let lastM = -1;\n  for (let w = 0; w < weeks; w++) {\n    const { m } = addDays(startDate, w * 7);\n    if (m !== lastM) {\n      monthMarks.push({ x: ox + w * (cw + 2) - 6 * dx, text: months[m] });\n      lastM = m;\n    }\n  }\n\n  const initials = name.split(\" \").filter(Boolean).slice(0, 2).map((p) => p[0]).join(\"\");\n\n  return (\n    <section className={`hb-wd10 ${className}`} style={{ \"--hb-wd10-accent\": accent, ...style } as React.CSSProperties} {...rest}>\n      <style href=\"hb-profile-dev-skyline\" precedence=\"default\">{css}</style>\n      <div className=\"hb-wd10-in\">\n        <aside className=\"hb-wd10-card\">\n          <div className=\"hb-wd10-who\">\n            <span className=\"hb-wd10-av\" aria-hidden=\"true\">{initials}</span>\n            <div>\n              <h2 className=\"hb-wd10-name\">{name}</h2>\n              <p className=\"hb-wd10-handle\">{handle}</p>\n            </div>\n          </div>\n          <span className=\"hb-wd10-role\">{role}</span>\n          <p className=\"hb-wd10-bio\">{bio}</p>\n          <button\n            type=\"button\"\n            className=\"hb-wd10-follow\"\n            aria-pressed={following}\n            onClick={() => {\n              setFollowing((f) => !f);\n              onFollow?.();\n            }}\n          >\n            {following ? \"Following\" : followLabel}\n          </button>\n          <div>\n            <div className=\"hb-wd10-langbar\" aria-hidden=\"true\">\n              {languages.map((l, i) => (\n                <span key={l.name} style={{ width: `${l.share}%`, background: l.color, animationDelay: `${(i * 0.1).toFixed(1)}s` }} />\n              ))}\n            </div>\n            <ul className=\"hb-wd10-langs\">\n              {languages.map((l) => (\n                <li key={l.name}>\n                  <i style={{ background: l.color }} />\n                  {l.name}\n                  <b>{l.share}%</b>\n                </li>\n              ))}\n            </ul>\n          </div>\n        </aside>\n        <div className=\"hb-wd10-main\">\n          <div className=\"hb-wd10-kpis\">\n            <div className=\"hb-wd10-kpi\"><b>{sum.toLocaleString(\"en-US\")}</b><span>contributions, {weeks} weeks</span></div>\n            <div className=\"hb-wd10-kpi\" style={{ animationDelay: \"0.08s\" }}><b>{streak} days</b><span>current streak</span></div>\n            <div className=\"hb-wd10-kpi\" style={{ animationDelay: \"0.16s\" }}><b>{best} days</b><span>longest streak</span></div>\n          </div>\n          <div className=\"hb-wd10-city\">\n            <div className=\"hb-wd10-cityhead\">\n              <span><strong>Contribution skyline</strong>, one tower per day</span>\n              <span className=\"hb-wd10-legend\" aria-hidden=\"true\">\n                Less\n                {tops.map((c, i) => (\n                  <i key={i} style={{ background: c }} />\n                ))}\n                More\n              </span>\n            </div>\n            <svg\n              className=\"hb-wd10-svg\"\n              viewBox={`0 0 ${W} ${H}`}\n              tabIndex={0}\n              role=\"img\"\n              aria-label={`${sum} contributions over ${weeks} weeks. Use arrow keys to inspect days.`}\n              onKeyDown={onKey}\n              onPointerLeave={() => setSel(null)}\n            >\n              {monthMarks.map((mk) => (\n                <text key={mk.text + mk.x} x={mk.x} y={H - 4} fill=\"#5f5f5f\" style={{ font: \"500 8px var(--font-mono, monospace)\" }}>{mk.text}</text>\n              ))}\n              {order.map((i) => {\n                const w = Math.floor(i / 7);\n                const d = i % 7;\n                const v = data[i];\n                const h = v === 0 ? 1.2 : 3 + v * unit;\n                const x = ox + w * (cw + 2) - d * dx;\n                const y = oy + d * dy;\n                const lv = level(v);\n                const top = `${x},${(y - h).toFixed(1)} ${x + cw},${(y - h).toFixed(1)} ${x + cw - dx},${(y + dy - h).toFixed(1)} ${x - dx},${(y + dy - h).toFixed(1)}`;\n                const front = `${x - dx},${(y + dy - h).toFixed(1)} ${x + cw - dx},${(y + dy - h).toFixed(1)} ${x + cw - dx},${y + dy} ${x - dx},${y + dy}`;\n                const side = `${x + cw},${(y - h).toFixed(1)} ${x + cw - dx},${(y + dy - h).toFixed(1)} ${x + cw - dx},${y + dy} ${x + cw},${y}`;\n                return (\n                  <g key={i} className=\"hb-wd10-bar\" data-on={sel === i} style={{ animationDelay: `${(w * 0.025 + d * 0.03).toFixed(3)}s` }} onPointerEnter={() => choose(i)}>\n                    <polygon points={front} fill={tops[lv]} style={{ filter: \"brightness(0.62)\" }} />\n                    <polygon points={side} fill={tops[lv]} style={{ filter: \"brightness(0.42)\" }} />\n                    <polygon className=\"t\" points={top} fill={tops[lv]} />\n                  </g>\n                );\n              })}\n            </svg>\n            <div className=\"hb-wd10-tip\" aria-live=\"polite\">\n              {sel !== null ? (\n                <>\n                  <span>\n                    <b>{data[sel]} {data[sel] === 1 ? \"contribution\" : \"contributions\"}</b> on {label(sel)}\n                  </span>\n                  <span>week {Math.floor(sel / 7) + 1}</span>\n                </>\n              ) : (\n                <>\n                  <span>Hover a tower or focus the chart and use the arrow keys</span>\n                  <span>{weeks} weeks</span>\n                </>\n              )}\n            </div>\n          </div>\n          <div className=\"hb-wd10-repos\">\n            {repos.map((r) => (\n              <a key={r.name} className=\"hb-wd10-repo\" href=\"#\">\n                <b>{r.name}</b>\n                <span>{r.description}</span>\n                <small>\n                  <span>{r.language}</span>\n                  <span>{r.stars} stars</span>\n                </small>\n              </a>\n            ))}\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}