{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "local-hours-map",
  "type": "registry:component",
  "title": "Local Hours and Map",
  "description": "Opening hours with today highlighted and an Open now badge, next to an illustrated street map with a dropping pin and a Get directions button.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "local",
    "hours",
    "map",
    "location",
    "directions",
    "address",
    "store"
  ],
  "docs": "https://hyperblur.dev/effects/local-hours-map",
  "files": [
    {
      "path": "registry/hyperblur/local-hours-map.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/local-hours-map.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface LocalHoursRow {\n  day: string;\n  hours: string;\n  note?: string;\n}\n\nexport interface LocalHoursMapProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  name?: string;\n  address?: string[];\n  phone?: string;\n  hours?: LocalHoursRow[];\n  todayIndex?: number;\n  openNow?: boolean;\n  statusText?: string;\n  directions?: { label: string; href: string };\n  streets?: string[];\n  accent?: string;\n}\n\nconst defaultHours: LocalHoursRow[] = [\n  { day: \"Monday\", hours: \"Closed\" },\n  { day: \"Tuesday\", hours: \"10:00 – 7:00\" },\n  { day: \"Wednesday\", hours: \"10:00 – 7:00\" },\n  { day: \"Thursday\", hours: \"10:00 – 8:30\", note: \"Late night\" },\n  { day: \"Friday\", hours: \"10:00 – 8:30\" },\n  { day: \"Saturday\", hours: \"9:00 – 6:00\" },\n  { day: \"Sunday\", hours: \"11:00 – 5:00\" },\n];\n\nconst css = `\n.hb-kl3 {\n  --hb-kl3-accent: #2f5d3a;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  background: #efe8da;\n  color: #1f2a20;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kl3 *, .hb-kl3 *::before, .hb-kl3 *::after { box-sizing: border-box; }\n.hb-kl3-wrap { max-width: 1120px; margin: 0 auto; padding: 88px 24px 96px; }\n.hb-kl3-head { max-width: 620px; margin-bottom: 36px; }\n.hb-kl3-eyebrow { margin: 0 0 12px; color: var(--hb-kl3-accent); font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }\n.hb-kl3-title { margin: 0; font-family: var(--font-grotesk, ui-sans-serif, system-ui, sans-serif); font-weight: 600; font-size: clamp(32px, 4.6cqw, 52px); line-height: 1.02; letter-spacing: -.035em; color: #18241a; text-wrap: balance; }\n.hb-kl3-sub { margin: 14px 0 0; color: #5d6455; font-size: 16px; line-height: 1.6; }\n.hb-kl3-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); gap: 20px; align-items: stretch; }\n.hb-kl3-card { min-width: 0; padding: 28px; border-radius: 22px; background: #fbf8f1; border: 1px solid #e0d6c3; box-shadow: 0 24px 50px -36px rgba(40, 50, 30, .5); display: flex; flex-direction: column; }\n.hb-kl3-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }\n.hb-kl3-name { margin: 0; font-family: var(--font-grotesk, ui-sans-serif, system-ui, sans-serif); font-size: 20px; font-weight: 600; letter-spacing: -.02em; }\n.hb-kl3-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--hb-kl3-accent) 12%, #fff); color: var(--hb-kl3-accent); font-size: 12.5px; font-weight: 600; white-space: nowrap; }\n.hb-kl3-badge[data-closed] { background: #f6e3dc; color: #a2442a; }\n.hb-kl3-live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }\n.hb-kl3-live::after { content: \"\"; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: hb-kl3-ping 2s ease-out infinite; }\n@keyframes hb-kl3-ping { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }\n.hb-kl3-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }\n.hb-kl3-table th, .hb-kl3-table td { padding: 10px 12px; text-align: left; font-weight: 400; border-top: 1px solid #ebe3d3; }\n.hb-kl3-table tr:first-child th, .hb-kl3-table tr:first-child td { border-top: 0; }\n.hb-kl3-table td { text-align: right; font-variant-numeric: tabular-nums; color: #2d382e; white-space: nowrap; }\n.hb-kl3-table th { color: #5d6455; }\n.hb-kl3-table tr[data-today] th, .hb-kl3-table tr[data-today] td { background: var(--hb-kl3-accent); color: #f4efe2; border-color: transparent; font-weight: 600; }\n.hb-kl3-table tr[data-today] th { border-radius: 10px 0 0 10px; }\n.hb-kl3-table tr[data-today] td { border-radius: 0 10px 10px 0; }\n.hb-kl3-table tr[data-today] + tr th, .hb-kl3-table tr[data-today] + tr td { border-top-color: transparent; }\n.hb-kl3-today { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.18); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; }\n.hb-kl3-closed { color: #a2442a; }\n.hb-kl3-note { margin-left: 6px; color: #8b7f68; font-size: 12px; }\n.hb-kl3-table tr[data-today] .hb-kl3-note { color: rgba(244,239,226,.75); }\n.hb-kl3-contact { margin-top: auto; padding-top: 20px; display: grid; gap: 10px; font-size: 14.5px; color: #2d382e; }\n.hb-kl3-line { display: flex; align-items: flex-start; gap: 10px; line-height: 1.45; }\n.hb-kl3-line svg { flex: none; margin-top: 2px; color: var(--hb-kl3-accent); }\n.hb-kl3-line a { color: inherit; text-decoration: none; border-bottom: 1px solid #cfc3aa; }\n.hb-kl3-line a:hover { border-color: var(--hb-kl3-accent); }\n.hb-kl3-line a:focus-visible, .hb-kl3-btn:focus-visible { outline: 2px solid var(--hb-kl3-accent); outline-offset: 3px; border-radius: 4px; }\n.hb-kl3-mapcard { position: relative; min-width: 0; min-height: 420px; border-radius: 22px; overflow: hidden; border: 1px solid #d7ccb6; background: #e9e1cf; }\n.hb-kl3-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }\n.hb-kl3-route { stroke-dasharray: 7 7; animation: hb-kl3-dash 1.6s linear infinite; }\n@keyframes hb-kl3-dash { to { stroke-dashoffset: -28; } }\n.hb-kl3-pin { animation: hb-kl3-drop .9s cubic-bezier(.3,1.5,.5,1) .2s both; transform-box: fill-box; transform-origin: 50% 100%; }\n@keyframes hb-kl3-drop { from { transform: translateY(-40px); opacity: 0; } }\n.hb-kl3-halo { transform-box: fill-box; transform-origin: center; animation: hb-kl3-halo 2.4s ease-out infinite; }\n@keyframes hb-kl3-halo { 0% { transform: scale(.4); opacity: .55; } 100% { transform: scale(1.8); opacity: 0; } }\n.hb-kl3-float { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 18px; border-radius: 16px; background: rgba(251, 248, 241, .92); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.6); box-shadow: 0 16px 32px -20px rgba(30, 40, 20, .5); }\n.hb-kl3-eta { min-width: 0; font-size: 13px; color: #5d6455; line-height: 1.35; }\n.hb-kl3-eta b { display: block; color: #1f2a20; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.hb-kl3-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; background: var(--hb-kl3-accent); color: #f4efe2; font-size: 14px; font-weight: 600; text-decoration: none; transition: transform .2s, box-shadow .2s, filter .2s; }\n.hb-kl3-btn:hover { transform: translateY(-1px); filter: brightness(1.1); box-shadow: 0 12px 24px -12px var(--hb-kl3-accent); }\n@container (max-width: 820px) {\n  .hb-kl3-grid { grid-template-columns: minmax(0, 1fr); }\n  .hb-kl3-wrap { padding: 64px 20px 72px; }\n  .hb-kl3-mapcard { min-height: 340px; }\n}\n@container (max-width: 420px) {\n  .hb-kl3-card { padding: 20px; }\n  .hb-kl3-table th, .hb-kl3-table td { padding: 9px 8px; font-size: 13.5px; }\n  .hb-kl3-note { display: none; }\n  .hb-kl3-float { flex-direction: column; align-items: stretch; }\n  .hb-kl3-btn { justify-content: center; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-kl3 *, .hb-kl3 *::before, .hb-kl3 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nfunction StreetMap({ accent, streets }: { accent: string; streets: string[] }) {\n  const blocks: { x: number; y: number; w: number; h: number; park?: boolean }[] = [];\n  const cols = [0, 130, 250, 380, 500, 630];\n  const rows = [0, 110, 210, 330, 430];\n  for (let c = 0; c < cols.length - 1; c++) {\n    for (let r = 0; r < rows.length - 1; r++) {\n      const h = ((c * 7 + r * 13) % 5) === 0;\n      blocks.push({ x: cols[c] + 14, y: rows[r] + 14, w: cols[c + 1] - cols[c] - 28, h: rows[r + 1] - rows[r] - 28, park: h });\n    }\n  }\n  return (\n    <svg className=\"hb-kl3-map\" viewBox=\"0 0 630 430\" preserveAspectRatio=\"xMidYMid slice\" aria-hidden=\"true\">\n      <rect width=\"630\" height=\"430\" fill=\"#e4dbc6\" />\n      <path d=\"M-20 360 C 120 320, 220 400, 360 350 S 560 300, 660 330 L 660 470 L -20 470 Z\" fill=\"#c9d8d3\" />\n      <path d=\"M-20 360 C 120 320, 220 400, 360 350 S 560 300, 660 330\" fill=\"none\" stroke=\"#b5c8c2\" strokeWidth=\"3\" />\n      {blocks.map((b, i) => (\n        <rect key={i} x={b.x} y={b.y} width={b.w} height={b.h} rx=\"8\" fill={b.park ? \"#c8d4b0\" : \"#efe8d8\"} stroke={b.park ? \"#b6c59a\" : \"#ddd2bc\"} />\n      ))}\n      {blocks.filter((b) => b.park).map((b, i) => (\n        <g key={`t${i}`} fill=\"#9fb383\">\n          <circle cx={(b.x + b.w * 0.3).toFixed(1)} cy={(b.y + b.h * 0.4).toFixed(1)} r=\"7\" />\n          <circle cx={(b.x + b.w * 0.6).toFixed(1)} cy={(b.y + b.h * 0.6).toFixed(1)} r=\"9\" />\n          <circle cx={(b.x + b.w * 0.75).toFixed(1)} cy={(b.y + b.h * 0.3).toFixed(1)} r=\"5\" />\n        </g>\n      ))}\n      <path d=\"M-20 228 L 660 160\" stroke=\"#fbf6ea\" strokeWidth=\"18\" />\n      <path d=\"M-20 228 L 660 160\" stroke=\"#e2c98f\" strokeWidth=\"2\" strokeDasharray=\"10 10\" />\n      <path d=\"M60 470 L 60 330 L 250 330 L 250 210 L 380 210\" fill=\"none\" stroke={accent} strokeWidth=\"5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"hb-kl3-route\" />\n      <circle cx=\"60\" cy=\"400\" r=\"7\" fill=\"#fbf8f1\" stroke={accent} strokeWidth=\"3\" />\n      <text x=\"140\" y=\"104\" fontSize=\"11\" fill=\"#8b7f68\" fontFamily=\"inherit\" letterSpacing=\"1.5\">{(streets[0] ?? \"\").toUpperCase()}</text>\n      <text x=\"390\" y=\"324\" fontSize=\"11\" fill=\"#8b7f68\" fontFamily=\"inherit\" letterSpacing=\"1.5\">{(streets[1] ?? \"\").toUpperCase()}</text>\n      <text x=\"470\" y=\"160\" fontSize=\"11\" fill=\"#7d6a40\" fontFamily=\"inherit\" letterSpacing=\"1.5\" transform=\"rotate(-5.7 470 160)\">{(streets[2] ?? \"\").toUpperCase()}</text>\n      <circle cx=\"380\" cy=\"210\" r=\"26\" fill={accent} opacity=\".35\" className=\"hb-kl3-halo\" />\n      <g className=\"hb-kl3-pin\">\n        <path d=\"M380 212 c-4-10-20-22-20-38 a20 20 0 0 1 40 0 c0 16-16 28-20 38z\" fill={accent} stroke=\"#fbf8f1\" strokeWidth=\"3\" />\n        <circle cx=\"380\" cy=\"174\" r=\"7\" fill=\"#fbf8f1\" />\n      </g>\n    </svg>\n  );\n}\n\nexport function LocalHoursMap({\n  eyebrow = \"Visit the shop\",\n  title = \"Come say hello on Larch Street.\",\n  subtitle = \"Plants, pots and repotting help, five minutes from the Clinton Street stop. Free parking behind the building.\",\n  name = \"Fern & Field\",\n  address = [\"214 Larch Street\", \"Portland, OR 97214\"],\n  phone = \"(503) 555-0187\",\n  hours = defaultHours,\n  todayIndex = 3,\n  openNow = true,\n  statusText,\n  directions = { label: \"Get directions\", href: \"https://maps.google.com/?q=214+Larch+Street+Portland\" },\n  streets = [\"Larch St\", \"Clinton St\", \"Hawthorne Blvd\"],\n  accent = \"#2f5d3a\",\n  className,\n  style,\n  ...rest\n}: LocalHoursMapProps) {\n  const today = hours[todayIndex];\n  const status = statusText ?? (openNow ? `Open now · until ${today?.hours.split(\"–\")[1]?.trim() ?? \"close\"}` : \"Closed now\");\n\n  return (\n    <section\n      className={[\"hb-kl3\", className].filter(Boolean).join(\" \")}\n      style={{ \"--hb-kl3-accent\": accent, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-local-hours-map\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kl3-wrap\">\n        <div className=\"hb-kl3-head\">\n          <p className=\"hb-kl3-eyebrow\">{eyebrow}</p>\n          <h2 className=\"hb-kl3-title\">{title}</h2>\n          <p className=\"hb-kl3-sub\">{subtitle}</p>\n        </div>\n        <div className=\"hb-kl3-grid\">\n          <div className=\"hb-kl3-card\">\n            <div className=\"hb-kl3-top\">\n              <h3 className=\"hb-kl3-name\">{name}</h3>\n              <span className=\"hb-kl3-badge\" data-closed={openNow ? undefined : \"\"}>\n                <span className=\"hb-kl3-live\" aria-hidden=\"true\" />\n                {status}\n              </span>\n            </div>\n            <table className=\"hb-kl3-table\">\n              <caption style={{ position: \"absolute\", width: 1, height: 1, overflow: \"hidden\", clip: \"rect(0 0 0 0)\" }}>Opening hours</caption>\n              <tbody>\n                {hours.map((h, i) => (\n                  <tr key={h.day} data-today={i === todayIndex ? \"\" : undefined} aria-current={i === todayIndex ? \"date\" : undefined}>\n                    <th scope=\"row\">\n                      {h.day}\n                      {i === todayIndex ? <span className=\"hb-kl3-today\">Today</span> : null}\n                    </th>\n                    <td>\n                      <span className={h.hours.toLowerCase() === \"closed\" ? \"hb-kl3-closed\" : undefined}>{h.hours}</span>\n                      {h.note ? <span className=\"hb-kl3-note\">{h.note}</span> : null}\n                    </td>\n                  </tr>\n                ))}\n              </tbody>\n            </table>\n            <div className=\"hb-kl3-contact\">\n              <div className=\"hb-kl3-line\">\n                <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n                  <path d=\"M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z\" stroke=\"currentColor\" strokeWidth=\"1.8\" />\n                  <circle cx=\"12\" cy=\"9.5\" r=\"2.5\" stroke=\"currentColor\" strokeWidth=\"1.8\" />\n                </svg>\n                <address style={{ fontStyle: \"normal\" }}>{address.map((l, i) => <React.Fragment key={l}>{i > 0 ? <br /> : null}{l}</React.Fragment>)}</address>\n              </div>\n              {phone ? (\n                <div className=\"hb-kl3-line\">\n                  <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n                    <path d=\"M6.6 3.5h2.7l1.4 4-2 1.4a12 12 0 0 0 6.4 6.4l1.4-2 4 1.4v2.7a2 2 0 0 1-2.2 2A16.5 16.5 0 0 1 4.6 5.7a2 2 0 0 1 2-2.2z\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinejoin=\"round\" />\n                  </svg>\n                  <a href={`tel:${phone.replace(/[^0-9+]/g, \"\")}`}>{phone}</a>\n                </div>\n              ) : null}\n            </div>\n          </div>\n          <div className=\"hb-kl3-mapcard\">\n            <StreetMap accent={accent} streets={streets} />\n            <div className=\"hb-kl3-float\">\n              <div className=\"hb-kl3-eta\">\n                <b>{address[0]}</b>\n                6 min walk from {streets[1] ?? \"the station\"}\n              </div>\n              {directions ? (\n                <a className=\"hb-kl3-btn\" href={directions.href} target=\"_blank\" rel=\"noreferrer\">\n                  <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n                    <path d=\"M3 11l18-8-8 18-2-8-8-2z\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinejoin=\"round\" />\n                  </svg>\n                  {directions.label}\n                </a>\n              ) : null}\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}