{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "presence-cursor",
  "type": "registry:ui",
  "title": "Presence Cursor",
  "description": "Other people's pointers with a name tag or an avatar.",
  "categories": [
    "data-display"
  ],
  "dependencies": [],
  "registryDependencies": [
    "https://sprout.tulipfarm.ai/r/sprout-base.json"
  ],
  "files": [
    {
      "path": "registry/sprout/components/ui/presence-cursor.tsx",
      "type": "registry:ui",
      "target": "components/ui/presence-cursor.tsx",
      "content": "import type { ComponentProps, CSSProperties, ReactNode } from 'react';\nimport { cn } from '@/lib/sprout/classes';\n\nexport interface PresenceCursorProps extends Omit<ComponentProps<'div'>, 'children' | 'color'> {\n  name: string;\n  x: number;\n  y: number;\n  color: string;\n  avatar?: ReactNode;\n}\n\nexport function PresenceCursor({ name, x, y, color, avatar, className, style, ...props }: PresenceCursorProps) {\n  return (\n    <div\n      data-slot=\"presence-cursor\"\n      role=\"img\"\n      aria-label={name}\n      className={cn('sprout-presence-cursor', className)}\n      style={\n        {\n          '--sprout-presence-color': color,\n          transform: `translate(${x}px, ${y}px)`,\n          ...style,\n        } as CSSProperties\n      }\n      {...props}\n    >\n      <svg className=\"sprout-presence-cursor-arrow\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n        <path d=\"M1.5 1.5 14.5 6.6 8.4 8.4 6.6 14.5Z\" />\n      </svg>\n      {avatar != null ? (\n        <span data-slot=\"presence-cursor-avatar\" className=\"sprout-presence-cursor-avatar\" aria-hidden=\"true\">\n          {avatar}\n        </span>\n      ) : (\n        <span data-slot=\"presence-cursor-label\" className=\"sprout-presence-cursor-label\" aria-hidden=\"true\">\n          {name}\n        </span>\n      )}\n    </div>\n  );\n}\n"
    }
  ],
  "css": {
    "@layer components": {
      ".sprout-presence-cursor": {
        "z-index": "1",
        "pointer-events": "none",
        "user-select": "none",
        "font-family": "var(--sprout-font)",
        "position": "absolute",
        "top": "0",
        "left": "0"
      },
      ".sprout-presence-cursor-arrow": {
        "width": "18px",
        "height": "18px",
        "fill": "var(--sprout-presence-color)",
        "stroke": "oklch(100% 0 0)",
        "stroke-width": "1.5px",
        "stroke-linejoin": "round",
        "filter": "drop-shadow(0 1px 1px oklch(0% 0 0 / .2))",
        "display": "block"
      },
      ".sprout-presence-cursor-label, .sprout-presence-cursor-avatar": {
        "box-shadow": "var(--sprout-shadow-control)",
        "position": "absolute",
        "top": "16px",
        "left": "14px"
      },
      ".sprout-presence-cursor-label": {
        "box-sizing": "border-box",
        "border-radius": "var(--sprout-radius-control)",
        "background": "var(--sprout-presence-color)",
        "color": "oklch(100% 0 0)",
        "max-width": "16rem",
        "font-size": "var(--sprout-text-sm)",
        "white-space": "nowrap",
        "text-overflow": "ellipsis",
        "padding": "4px 8px",
        "font-weight": "500",
        "line-height": "1.25rem",
        "overflow": "hidden"
      },
      ".sprout-presence-cursor-avatar": {
        "border": "2px solid var(--sprout-presence-color)",
        "border-radius": "9999px",
        "display": "flex"
      },
      "@media (prefers-reduced-motion: no-preference)": {
        ".sprout-presence-cursor": {
          "transition": "transform var(--sprout-motion-normal) var(--sprout-motion-ease)"
        }
      },
      "@media (forced-colors: active)": {
        ".sprout-presence-cursor-arrow": {
          "fill": "canvastext",
          "stroke": "canvas"
        },
        ".sprout-presence-cursor-label": {
          "border": "1px solid canvastext"
        }
      }
    }
  },
  "docs": "Docs and examples: https://sprout.tulipfarm.ai/components/presence-cursor/",
  "meta": {
    "source": "packages/sprout/src/components/presence-cursor.tsx"
  }
}
