{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "social-share-dial",
  "type": "registry:component",
  "title": "Social Share Dial",
  "description": "Press and hold the share button, drag toward a channel on the ring that opens around it and release to share. A tap keeps the ring open for clicking, and the keyboard opens it with Enter and moves with the arrow keys.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "buttons",
    "share",
    "radial",
    "gesture",
    "menu",
    "social",
    "drag"
  ],
  "docs": "https://hyperblur.dev/effects/social-share-dial",
  "files": [
    {
      "path": "registry/hyperblur/social-share-dial.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/social-share-dial.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport type SocialProviderId =\n  | \"google\"\n  | \"github\"\n  | \"apple\"\n  | \"x\"\n  | \"linkedin\"\n  | \"discord\"\n  | \"facebook\"\n  | \"microsoft\"\n  | \"slack\"\n  | \"spotify\"\n  | \"twitch\"\n  | \"figma\"\n  | \"email\"\n  | \"link\";\n\nexport interface SocialProviderConfig {\n  id: string;\n  label?: string;\n  icon?: React.ReactNode;\n  color?: string;\n  bg?: string;\n  fg?: string;\n}\n\nexport type SocialProvider = SocialProviderId | SocialProviderConfig;\n\nconst BRANDS: Record<SocialProviderId, { label: string; color: string; bg: string; fg: string }> = {\n  google: { label: \"Google\", color: \"#4285f4\", bg: \"#ffffff\", fg: \"#1f1f1f\" },\n  github: { label: \"GitHub\", color: \"#c9d1d9\", bg: \"#24292f\", fg: \"#ffffff\" },\n  apple: { label: \"Apple\", color: \"#f5f5f7\", bg: \"#000000\", fg: \"#ffffff\" },\n  x: { label: \"X\", color: \"#e7e9ea\", bg: \"#0f1419\", fg: \"#ffffff\" },\n  linkedin: { label: \"LinkedIn\", color: \"#3b8fe0\", bg: \"#0a66c2\", fg: \"#ffffff\" },\n  discord: { label: \"Discord\", color: \"#7983f5\", bg: \"#5865f2\", fg: \"#ffffff\" },\n  facebook: { label: \"Facebook\", color: \"#4a95f5\", bg: \"#1877f2\", fg: \"#ffffff\" },\n  microsoft: { label: \"Microsoft\", color: \"#36b3f0\", bg: \"#2f2f2f\", fg: \"#ffffff\" },\n  slack: { label: \"Slack\", color: \"#e8587f\", bg: \"#4a154b\", fg: \"#ffffff\" },\n  spotify: { label: \"Spotify\", color: \"#1ed760\", bg: \"#1db954\", fg: \"#04140a\" },\n  twitch: { label: \"Twitch\", color: \"#a970ff\", bg: \"#9146ff\", fg: \"#ffffff\" },\n  figma: { label: \"Figma\", color: \"#b17cff\", bg: \"#1e1e1e\", fg: \"#ffffff\" },\n  email: { label: \"Email\", color: \"#f5b450\", bg: \"#2a2014\", fg: \"#ffe8c2\" },\n  link: { label: \"Copy link\", color: \"#a1a1a1\", bg: \"#262626\", fg: \"#ededed\" },\n};\n\nfunction Glyph({ id }: { id: string }) {\n  let body: React.ReactNode;\n  switch (id) {\n    case \"google\":\n      body = <path d=\"M18.4 7.2A8 8 0 1 0 20 12h-7.4\" />;\n      break;\n    case \"github\":\n      body = (\n        <>\n          <circle cx=\"7\" cy=\"5.5\" r=\"2.1\" />\n          <circle cx=\"7\" cy=\"18.5\" r=\"2.1\" />\n          <circle cx=\"17\" cy=\"7\" r=\"2.1\" />\n          <path d=\"M7 7.6v8.8M17 9.1v1.2a3 3 0 0 1-3 3h-4a3 3 0 0 0-3 3\" />\n        </>\n      );\n      break;\n    case \"apple\":\n      body = (\n        <>\n          <path d=\"M12 8.2c-1.7-1.3-4.7-1.2-6 1.1-1.5 2.6-.5 6.9 1.6 9.4 1.1 1.3 2.2 1.6 3.2 1.1.8-.4 1.6-.4 2.4 0 1 .5 2.1.2 3.2-1.1 2.1-2.5 3.1-6.8 1.6-9.4-1.3-2.3-4.3-2.4-6-1.1z\" />\n          <path d=\"M12 8.2c0-1.7.5-2.9 1.6-3.9\" />\n        </>\n      );\n      break;\n    case \"x\":\n      body = <path d=\"M5.5 5.5l13 13M18.5 5.5l-13 13\" />;\n      break;\n    case \"linkedin\":\n      body = (\n        <>\n          <circle cx=\"6.5\" cy=\"6\" r=\"1.3\" fill=\"currentColor\" stroke=\"none\" />\n          <path d=\"M6.5 10v8.5M11 18.5V10m0 3.4c0-2 1.5-3.4 3.3-3.4s3.2 1.4 3.2 3.4v5.1\" />\n        </>\n      );\n      break;\n    case \"discord\":\n      body = (\n        <>\n          <path d=\"M7.6 7.5h8.8a4 4 0 0 1 3.9 3.1l.9 4.1a2.3 2.3 0 0 1-3.9 2.1l-1.9-1.9H8.6l-1.9 1.9a2.3 2.3 0 0 1-3.9-2.1l.9-4.1a4 4 0 0 1 3.9-3.1z\" />\n          <path d=\"M8.2 10.4v2.8M6.8 11.8h2.8\" />\n          <circle cx=\"15.6\" cy=\"11\" r=\".8\" fill=\"currentColor\" stroke=\"none\" />\n          <circle cx=\"17.2\" cy=\"12.6\" r=\".8\" fill=\"currentColor\" stroke=\"none\" />\n        </>\n      );\n      break;\n    case \"facebook\":\n      body = <path d=\"M15.5 4.5h-1.8a2.7 2.7 0 0 0-2.7 2.7v12.3M8.5 11h6.5\" />;\n      break;\n    case \"microsoft\":\n      body = (\n        <>\n          <rect x=\"4.5\" y=\"4.5\" width=\"6.4\" height=\"6.4\" rx=\"1.4\" />\n          <rect x=\"13.1\" y=\"4.5\" width=\"6.4\" height=\"6.4\" rx=\"1.4\" />\n          <rect x=\"4.5\" y=\"13.1\" width=\"6.4\" height=\"6.4\" rx=\"1.4\" />\n          <rect x=\"13.1\" y=\"13.1\" width=\"6.4\" height=\"6.4\" rx=\"1.4\" />\n        </>\n      );\n      break;\n    case \"slack\":\n      body = <path d=\"M10 4.5 8.4 19.5M15.6 4.5 14 19.5M5 9.2h14.5M4.5 14.8H19\" />;\n      break;\n    case \"spotify\":\n      body = <path d=\"M4.5 10.5v3M8.25 7.5v9M12 4.5v15M15.75 8v8M19.5 10.5v3\" />;\n      break;\n    case \"twitch\":\n      body = (\n        <>\n          <path d=\"M6.5 4.5h11a2 2 0 0 1 2 2V14a2 2 0 0 1-2 2H12l-4 3.5V16H6.5a2 2 0 0 1-2-2V6.5a2 2 0 0 1 2-2z\" />\n          <path d=\"M10.2 8.5v3.2M14.4 8.5v3.2\" />\n        </>\n      );\n      break;\n    case \"figma\":\n      body = (\n        <>\n          <path d=\"M12 3.5 18 11l-6 9.5L6 11z\" />\n          <path d=\"M12 3.5v8\" />\n          <circle cx=\"12\" cy=\"13\" r=\"1.5\" />\n        </>\n      );\n      break;\n    case \"email\":\n      body = (\n        <>\n          <rect x=\"3.5\" y=\"5.5\" width=\"17\" height=\"13\" rx=\"2.5\" />\n          <path d=\"m4.5 7.5 7.5 5.5 7.5-5.5\" />\n        </>\n      );\n      break;\n    case \"link\":\n      body = (\n        <>\n          <path d=\"M10.2 13.8a3.6 3.6 0 0 0 5.1 0l3-3a3.6 3.6 0 0 0-5.1-5.1l-1.1 1.1\" />\n          <path d=\"M13.8 10.2a3.6 3.6 0 0 0-5.1 0l-3 3a3.6 3.6 0 0 0 5.1 5.1l1.1-1.1\" />\n        </>\n      );\n      break;\n    default:\n      body = <circle cx=\"12\" cy=\"12\" r=\"7\" />;\n  }\n  return (\n    <svg\n      viewBox=\"0 0 24 24\"\n      width=\"1em\"\n      height=\"1em\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={1.9}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      focusable=\"false\"\n    >\n      {body}\n    </svg>\n  );\n}\n\ninterface ResolvedProvider {\n  id: string;\n  label: string;\n  color: string;\n  bg: string;\n  fg: string;\n  icon: React.ReactNode;\n}\n\nfunction resolveProvider(p: SocialProvider): ResolvedProvider {\n  const cfg: SocialProviderConfig = typeof p === \"string\" ? { id: p } : p;\n  const brand = BRANDS[cfg.id as SocialProviderId] as (typeof BRANDS)[SocialProviderId] | undefined;\n  return {\n    id: cfg.id,\n    label: cfg.label ?? brand?.label ?? cfg.id,\n    color: cfg.color ?? brand?.color ?? \"#2f7bff\",\n    bg: cfg.bg ?? brand?.bg ?? cfg.color ?? \"#2f7bff\",\n    fg: cfg.fg ?? brand?.fg ?? \"#ffffff\",\n    icon: cfg.icon ?? <Glyph id={cfg.id} />,\n  };\n}\n\nexport interface SocialShareDialProps extends React.HTMLAttributes<HTMLDivElement> {\n  providers?: SocialProvider[];\n  url?: string;\n  radius?: number;\n  hint?: string;\n  onShare?: (provider: string) => void;\n}\n\nconst css = `\n.hb-xc7 { --hb-xc7-r: 56px; --hb-xc7-it: 34px; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; box-sizing: border-box; font-family: inherit; user-select: none; -webkit-user-select: none; }\n.hb-xc7 *, .hb-xc7 *::before, .hb-xc7 *::after { box-sizing: border-box; }\n.hb-xc7-stage { position: relative; width: calc(var(--hb-xc7-r) * 2 + var(--hb-xc7-it) + 10px); height: calc(var(--hb-xc7-r) * 2 + var(--hb-xc7-it) + 10px); touch-action: none; }\n.hb-xc7-ring, .hb-xc7-wedge {\n  position: absolute;\n  inset: 0;\n  border-radius: 50%;\n  -webkit-mask: radial-gradient(circle, transparent calc(var(--hb-xc7-r) - var(--hb-xc7-it) * 0.5 - 6px), #000 calc(var(--hb-xc7-r) - var(--hb-xc7-it) * 0.5 - 5px));\n  mask: radial-gradient(circle, transparent calc(var(--hb-xc7-r) - var(--hb-xc7-it) * 0.5 - 6px), #000 calc(var(--hb-xc7-r) - var(--hb-xc7-it) * 0.5 - 5px));\n  opacity: 0;\n  transform: scale(0.55) rotate(-30deg);\n  transition: opacity 0.22s ease, transform 0.5s cubic-bezier(0.34, 1.4, 0.5, 1);\n  pointer-events: none;\n}\n.hb-xc7-ring { background: radial-gradient(circle, #191919 40%, #121212 72%); box-shadow: inset 0 0 0 1px #262626; }\n.hb-xc7-ring::after { content: \"\"; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 2px 0 rgba(255, 255, 255, 0.04); }\n.hb-xc7-wedge {\n  --hb-xc7-c: #7fb3ff;\n  background: conic-gradient(from calc(var(--hb-xc7-half) * -1), color-mix(in srgb, var(--hb-xc7-c) 30%, transparent) 0 var(--hb-xc7-step), transparent var(--hb-xc7-step));\n  transform: scale(0.55) rotate(var(--hb-xc7-a, 0deg));\n  transition: opacity 0.2s ease, transform 0.32s cubic-bezier(0.34, 1.3, 0.5, 1), background 0.2s ease;\n}\n.hb-xc7[data-open=\"true\"] .hb-xc7-ring { opacity: 1; transform: scale(1) rotate(0deg); }\n.hb-xc7[data-open=\"true\"][data-hot=\"true\"] .hb-xc7-wedge { opacity: 1; transform: scale(1) rotate(var(--hb-xc7-a, 0deg)); }\n.hb-xc7-it {\n  --hb-xc7-c: #7fb3ff;\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  width: var(--hb-xc7-it);\n  height: var(--hb-xc7-it);\n  margin: calc(var(--hb-xc7-it) * -0.5) 0 0 calc(var(--hb-xc7-it) * -0.5);\n  padding: 0;\n  border: 0;\n  border-radius: 50%;\n  font: inherit;\n  font-size: 16px;\n  color: #9a9a9a;\n  background: transparent;\n  cursor: pointer;\n  opacity: 0;\n  transform: rotate(var(--hb-xc7-deg)) translateY(0) rotate(calc(var(--hb-xc7-deg) * -1)) scale(0.3);\n  transition: transform 0.46s cubic-bezier(0.34, 1.5, 0.5, 1), opacity 0.2s ease, color 0.2s ease;\n  transition-delay: calc(var(--hb-xc7-n) * 22ms);\n  pointer-events: none;\n}\n.hb-xc7-it svg { display: block; }\n.hb-xc7[data-open=\"true\"] .hb-xc7-it { opacity: 1; pointer-events: auto; transform: rotate(var(--hb-xc7-deg)) translateY(calc(var(--hb-xc7-r) * -1)) rotate(calc(var(--hb-xc7-deg) * -1)) scale(1); }\n.hb-xc7-it[data-hot=\"true\"] { color: var(--hb-xc7-c); transition-delay: 0s; }\n.hb-xc7[data-open=\"true\"] .hb-xc7-it[data-hot=\"true\"] { transform: rotate(var(--hb-xc7-deg)) translateY(calc(var(--hb-xc7-r) * -1 - 3px)) rotate(calc(var(--hb-xc7-deg) * -1)) scale(1.18); }\n.hb-xc7-it:focus-visible { outline: 2px solid #ededed; outline-offset: 1px; }\n.hb-xc7-tg {\n  --hb-xc7-c: #ededed;\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  width: 50px;\n  height: 50px;\n  margin: -25px 0 0 -25px;\n  padding: 0;\n  border: 0;\n  border-radius: 50%;\n  font: inherit;\n  font-size: 19px;\n  color: #0a0a0a;\n  background: radial-gradient(circle at 50% 30%, #ffffff, #d9d9d9 70%);\n  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.18), inset 0 1px 0 #ffffff, 0 10px 24px -8px rgba(0, 0, 0, 0.8), 0 0 0 6px rgba(255, 255, 255, 0.04);\n  cursor: pointer;\n  touch-action: none;\n  -webkit-tap-highlight-color: transparent;\n  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;\n  z-index: 2;\n}\n.hb-xc7-tg svg { display: block; }\n.hb-xc7[data-open=\"true\"] .hb-xc7-tg { transform: scale(0.84); color: var(--hb-xc7-c); background: radial-gradient(circle at 50% 30%, #262626, #161616 70%); box-shadow: inset 0 0 0 1px #333, inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 20px -8px rgba(0, 0, 0, 0.9); }\n.hb-xc7[data-done=\"true\"] .hb-xc7-tg { color: #04140a; background: radial-gradient(circle at 50% 30%, #6af0a0, #2fcf72 70%); animation: hb-xc7-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }\n.hb-xc7-tg:focus-visible { outline: 2px solid #7fb3ff; outline-offset: 4px; }\n.hb-xc7-face { display: inline-flex; animation: hb-xc7-in 0.3s cubic-bezier(0.22, 1, 0.36, 1); }\n.hb-xc7-cap { height: 18px; font-size: 12px; line-height: 18px; color: #8f8f8f; white-space: nowrap; }\n.hb-xc7-cap b { font-weight: 600; color: #ededed; }\n.hb-xc7-cap span { display: inline-block; animation: hb-xc7-in 0.3s cubic-bezier(0.22, 1, 0.36, 1); }\n@keyframes hb-xc7-pop { 0% { transform: scale(0.7); } 100% { transform: scale(1); } }\n@keyframes hb-xc7-in { from { opacity: 0; transform: translateY(4px) scale(0.9); } to { opacity: 1; transform: none; } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-xc7-ring, .hb-xc7-wedge, .hb-xc7-it, .hb-xc7-tg { transition: none; }\n  .hb-xc7[data-done=\"true\"] .hb-xc7-tg, .hb-xc7-face, .hb-xc7-cap span { animation: none; }\n}\n`;\n\nconst SHARE_ICON = (\n  <svg viewBox=\"0 0 24 24\" width=\"1em\" height=\"1em\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n    <path d=\"M12 14.5V4M8 7.5 12 3.5l4 4\" />\n    <path d=\"M7.5 10.5H7a2.5 2.5 0 0 0-2.5 2.5v4.5A2.5 2.5 0 0 0 7 20h10a2.5 2.5 0 0 0 2.5-2.5V13a2.5 2.5 0 0 0-2.5-2.5h-.5\" />\n  </svg>\n);\n\nconst CHECK_ICON = (\n  <svg viewBox=\"0 0 24 24\" width=\"1em\" height=\"1em\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2.4} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n    <path d=\"m5.5 12.5 4.2 4.2 8.8-9.4\" />\n  </svg>\n);\n\nexport function SocialShareDial({\n  providers = [\"x\", \"linkedin\", \"facebook\", \"email\", \"link\", \"slack\"],\n  url = \"https://northwind.app/changelog/realtime-cursors\",\n  radius = 56,\n  hint = \"Hold and drag to share\",\n  onShare,\n  className = \"\",\n  style,\n  ...rest\n}: SocialShareDialProps) {\n  const items = providers.map(resolveProvider);\n  const n = Math.max(1, items.length);\n  const step = 360 / n;\n  const [open, setOpen] = React.useState(false);\n  const [hot, setHot] = React.useState(-1);\n  const [done, setDone] = React.useState<string | null>(null);\n  const rootRef = React.useRef<HTMLDivElement>(null);\n  const trigRef = React.useRef<HTMLButtonElement>(null);\n  const itemRefs = React.useRef<(HTMLButtonElement | null)[]>([]);\n  const press = React.useRef({ on: false, moved: false, t: 0, x: 0, y: 0 });\n  const timer = React.useRef<number | undefined>(undefined);\n\n  React.useEffect(() => () => window.clearTimeout(timer.current), []);\n\n  React.useEffect(() => {\n    if (!open) return;\n    function away(e: PointerEvent) {\n      if (rootRef.current && !rootRef.current.contains(e.target as Node)) {\n        setOpen(false);\n        setHot(-1);\n      }\n    }\n    document.addEventListener(\"pointerdown\", away);\n    return () => document.removeEventListener(\"pointerdown\", away);\n  }, [open]);\n\n  function pick(i: number) {\n    const p = items[i];\n    if (!p) return;\n    if (p.id === \"link\" && typeof navigator !== \"undefined\" && navigator.clipboard) {\n      navigator.clipboard.writeText(url).catch(() => {});\n    }\n    onShare?.(p.id);\n    setDone(p.label);\n    setOpen(false);\n    setHot(-1);\n    trigRef.current?.focus();\n    window.clearTimeout(timer.current);\n    timer.current = window.setTimeout(() => setDone(null), 1800);\n  }\n\n  function aim(e: React.PointerEvent<HTMLButtonElement>) {\n    const r = e.currentTarget.getBoundingClientRect();\n    const dx = e.clientX - (r.left + r.width / 2);\n    const dy = e.clientY - (r.top + r.height / 2);\n    const dist = Math.hypot(dx, dy);\n    if (dist > 6) press.current.moved = true;\n    if (dist < 24) {\n      setHot(-1);\n      return;\n    }\n    const deg = (Math.atan2(dy, dx) * 180) / Math.PI + 90;\n    setHot(Math.round((((deg % 360) + 360) % 360) / step) % n);\n  }\n\n  function close(refocus: boolean) {\n    setOpen(false);\n    setHot(-1);\n    if (refocus) trigRef.current?.focus();\n  }\n\n  function onItemKey(e: React.KeyboardEvent<HTMLButtonElement>, i: number) {\n    let next = -1;\n    if (e.key === \"ArrowRight\" || e.key === \"ArrowDown\") next = (i + 1) % n;\n    else if (e.key === \"ArrowLeft\" || e.key === \"ArrowUp\") next = (i - 1 + n) % n;\n    else if (e.key === \"Escape\") {\n      e.preventDefault();\n      close(true);\n      return;\n    }\n    if (next < 0) return;\n    e.preventDefault();\n    setHot(next);\n    itemRefs.current[next]?.focus();\n  }\n\n  const hotItem = hot >= 0 ? items[hot] : undefined;\n  const caption = done ? (\n    <span key={`d-${done}`}>\n      {done === \"Copy link\" ? \"Link copied\" : <>Shared to <b>{done}</b></>}\n    </span>\n  ) : open && hotItem ? (\n    <span key={`h-${hotItem.id}`}>\n      {hotItem.id === \"link\" ? \"Release to copy link\" : <>Share to <b>{hotItem.label}</b></>}\n    </span>\n  ) : (\n    <span key={open ? \"open\" : \"idle\"}>{open ? \"Pick a channel\" : hint}</span>\n  );\n\n  return (\n    <>\n      <style href=\"hb-social-share-dial\" precedence=\"default\">{css}</style>\n      <div\n        ref={rootRef}\n        className={`hb-xc7 ${className}`}\n        style={\n          {\n            \"--hb-xc7-r\": `${radius}px`,\n            \"--hb-xc7-step\": `${step.toFixed(3)}deg`,\n            \"--hb-xc7-half\": `${(step / 2).toFixed(3)}deg`,\n            ...style,\n          } as React.CSSProperties\n        }\n        data-open={open ? \"true\" : undefined}\n        data-hot={hot >= 0 ? \"true\" : undefined}\n        data-done={done ? \"true\" : undefined}\n        {...rest}\n      >\n        <div className=\"hb-xc7-stage\">\n          <span className=\"hb-xc7-ring\" aria-hidden=\"true\" />\n          <span\n            className=\"hb-xc7-wedge\"\n            aria-hidden=\"true\"\n            style={{ \"--hb-xc7-a\": `${(Math.max(0, hot) * step).toFixed(3)}deg`, \"--hb-xc7-c\": hotItem?.color ?? \"#7fb3ff\" } as React.CSSProperties}\n          />\n          <div role=\"menu\" aria-label=\"Share to\" aria-hidden={open ? undefined : true}>\n            {items.map((p, i) => (\n              <button\n                key={p.id}\n                ref={(el) => {\n                  itemRefs.current[i] = el;\n                }}\n                type=\"button\"\n                role=\"menuitem\"\n                className=\"hb-xc7-it\"\n                style={{ \"--hb-xc7-deg\": `${(i * step).toFixed(3)}deg`, \"--hb-xc7-n\": i, \"--hb-xc7-c\": p.color } as React.CSSProperties}\n                data-hot={hot === i ? \"true\" : undefined}\n                tabIndex={open ? (hot === i || (hot < 0 && i === 0) ? 0 : -1) : -1}\n                aria-label={p.id === \"link\" ? \"Copy link\" : `Share to ${p.label}`}\n                onPointerEnter={() => setHot(i)}\n                onFocus={() => setHot(i)}\n                onKeyDown={(e) => onItemKey(e, i)}\n                onClick={() => pick(i)}\n              >\n                {p.icon}\n              </button>\n            ))}\n          </div>\n          <button\n            ref={trigRef}\n            type=\"button\"\n            className=\"hb-xc7-tg\"\n            style={{ \"--hb-xc7-c\": hotItem?.color ?? \"#ededed\" } as React.CSSProperties}\n            aria-haspopup=\"menu\"\n            aria-expanded={open}\n            aria-label=\"Share\"\n            onPointerDown={(e) => {\n              if (e.button !== 0) return;\n              if (open) {\n                press.current.on = false;\n                close(false);\n                return;\n              }\n              e.currentTarget.setPointerCapture(e.pointerId);\n              press.current = { on: true, moved: false, t: e.timeStamp, x: e.clientX, y: e.clientY };\n              setDone(null);\n              setOpen(true);\n            }}\n            onPointerMove={(e) => {\n              if (press.current.on) aim(e);\n            }}\n            onPointerUp={(e) => {\n              if (!press.current.on) return;\n              press.current.on = false;\n              const quick = e.timeStamp - press.current.t < 280;\n              if (press.current.moved && hot >= 0) pick(hot);\n              else if (!quick || press.current.moved) close(false);\n            }}\n            onPointerCancel={() => {\n              press.current.on = false;\n              close(false);\n            }}\n            onClick={(e) => {\n              if (e.detail !== 0) return;\n              if (open) {\n                close(false);\n                return;\n              }\n              setDone(null);\n              setOpen(true);\n              setHot(0);\n              window.requestAnimationFrame(() => itemRefs.current[0]?.focus());\n            }}\n            onKeyDown={(e) => {\n              if (e.key === \"Escape\" && open) {\n                e.preventDefault();\n                close(false);\n              }\n            }}\n          >\n            <span className=\"hb-xc7-face\" key={done ? \"done\" : open && hotItem ? hotItem.id : \"share\"}>\n              {done ? CHECK_ICON : open && hotItem ? hotItem.icon : SHARE_ICON}\n            </span>\n          </button>\n        </div>\n        <div className=\"hb-xc7-cap\" aria-live=\"polite\">\n          {caption}\n        </div>\n      </div>\n    </>\n  );\n}\n"
    }
  ]
}