{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "aurora-ai-persona",
  "title": "Aurora AI Persona",
  "author": "jmagar <https://github.com/jmagar>",
  "description": "Aurora-native persona parity surface from AI Elements.",
  "dependencies": [
    "lucide-react@^0.487.0"
  ],
  "registryDependencies": [
    "@aurora/aurora-tokens",
    "@aurora/aurora-ai-elements",
    "@aurora/aurora-components"
  ],
  "files": [
    {
      "path": "registry/aurora/blocks/ai/elements/persona.tsx",
      "content": "\"use client\"\n\n/**\n * Aurora Persona — identity card (avatar, role, presence, capability chips) + compact row.\n * CD-parity standalone implementation (self-contained; the canonical shadcn file).\n */\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nexport type PersonaPresence = \"online\" | \"busy\" | \"away\" | \"offline\"\n\nexport interface PersonaProps extends React.HTMLAttributes<HTMLDivElement> {\n  name: string\n  /** Role / one-line description under the name. */\n  role?: string\n  /** @deprecated alias for `role`. */\n  description?: string\n  presence?: PersonaPresence\n  /** Capability chips (full variant only). */\n  tags?: string[]\n  /** Show the Axon orange \"AI\" badge next to the name (full variant). */\n  badge?: boolean\n  variant?: \"default\" | \"compact\"\n  /** Compact: render as a selected (rose-outlined) row. */\n  selected?: boolean\n}\n\nconst PRESENCE: Record<PersonaPresence, string> = {\n  online: \"var(--aurora-success)\",\n  busy: \"var(--aurora-accent-pink)\",\n  away: \"var(--aurora-warn)\",\n  offline: \"var(--aurora-neutral)\",\n}\n\nconst PRESENCE_LABEL: Record<PersonaPresence, string> = {\n  online: \"Online\",\n  busy: \"Busy\",\n  away: \"Away\",\n  offline: \"Offline\",\n}\n\nconst AI_STYLE: React.CSSProperties = {\n  color: \"var(--axon-orange)\",\n  background: \"var(--axon-orange-surface)\",\n  borderColor: \"var(--axon-orange-border)\",\n}\n\nfunction initials(name: string): string {\n  const parts = name.trim().split(/\\s+/).slice(0, 2)\n  return parts.map((p) => p[0]?.toUpperCase() ?? \"\").join(\"\") || \"?\"\n}\n\n// Styles: registry/aurora/styles/aurora-components.css (@layer aurora-components).\n\nconst Persona = (\n    { ref,\n      name,\n      role,\n      description,\n      presence,\n      tags,\n      badge = false,\n      variant = \"default\",\n      selected = false,\n      className,\n      style,\n      role: elementRole,\n      tabIndex,\n      onClick,\n      onKeyDown,\n      ...props\n    }: PersonaProps & { ref?: React.Ref<HTMLDivElement> }\n  ) => {\n    const sub = role ?? description\n    const dotColor = presence ? PRESENCE[presence] : null\n    const isCompact = variant === \"compact\"\n    const dotSize = isCompact ? 10 : 13\n    const interactiveProps = onClick\n      ? {\n          role: elementRole ?? \"button\",\n          tabIndex: tabIndex ?? 0,\n        }\n      : {\n          role: elementRole,\n          tabIndex,\n        }\n\n    const handleKeyDown = React.useCallback(\n      (event: React.KeyboardEvent<HTMLDivElement>) => {\n        onKeyDown?.(event)\n        if (event.defaultPrevented || !onClick) return\n        if (event.key === \"Enter\" || event.key === \" \") {\n          event.preventDefault()\n          event.currentTarget.click()\n        }\n      },\n      [onClick, onKeyDown]\n    )\n\n    const avatar = (\n      <span className=\"aurora-persona__av\" aria-hidden=\"true\" style={badge ? AI_STYLE : undefined}>\n        {initials(name)}\n        {dotColor ? (\n          <span\n            className=\"aurora-persona__dot\"\n            style={{ width: dotSize, height: dotSize, background: dotColor, boxShadow: `0 0 6px ${dotColor}` }}\n          />\n        ) : null}\n      </span>\n    )\n\n    if (isCompact) {\n      return (\n        <div\n          ref={ref}\n          className={cn(\"aurora-persona aurora-persona--compact\", selected && \"aurora-persona--selected\", onClick && \"aurora-persona--clickable\", className)}\n          style={\n            selected\n              ? {\n                  background: \"var(--aurora-selected-bg)\",\n                  borderColor: \"var(--aurora-border-strong)\",\n                  boxShadow: \"var(--aurora-active-glow)\",\n                  ...style,\n                }\n              : style\n          }\n          onClick={onClick}\n          onKeyDown={handleKeyDown}\n          {...interactiveProps}\n          {...props}\n        >\n          {avatar}\n          <span className=\"min-w-0\">\n            <span className=\"aurora-persona__name\" style={{ display: \"block\" }}>{name}</span>\n            {sub ? <span className=\"aurora-persona__role\" style={{ display: \"block\", fontSize: 12.5 }}>{sub}</span> : null}\n          </span>\n        </div>\n      )\n    }\n\n    return (\n      <div\n        ref={ref}\n        className={cn(\"aurora-persona aurora-persona--default\", onClick && \"aurora-persona--clickable\", className)}\n        style={style}\n        onClick={onClick}\n        onKeyDown={handleKeyDown}\n        {...interactiveProps}\n        {...props}\n      >\n        <div className=\"aurora-persona__head\">\n          {avatar}\n          <span className=\"min-w-0\" style={{ flex: 1 }}>\n            <span className=\"aurora-persona__titlerow\">\n              <span className=\"aurora-persona__name\" style={{ fontSize: 19 }}>{name}</span>\n              {badge ? <span className=\"aurora-persona__aibadge\" style={AI_STYLE}>AI</span> : null}\n            </span>\n            {sub ? <span className=\"aurora-persona__role\" style={{ display: \"block\", fontSize: 15 }}>{sub}</span> : null}\n          </span>\n          {presence ? (\n            <span\n              className=\"aurora-persona__status\"\n              style={{\n                fontFamily: \"var(--aurora-font-sans)\",\n                letterSpacing: \"var(--aurora-letter-label)\",\n                textTransform: \"none\",\n              }}\n            >\n              <span style={{ width: 8, height: 8, borderRadius: 999, background: dotColor ?? \"transparent\", boxShadow: dotColor ? `0 0 6px ${dotColor}` : undefined }} />\n              {PRESENCE_LABEL[presence]}\n            </span>\n          ) : null}\n        </div>\n        {tags && tags.length ? (\n          <div style={{ display: \"flex\", flexWrap: \"wrap\", gap: 7 }}>\n            {tags.map((t) => (\n              <span\n                key={t}\n                className=\"aurora-persona__chip\"\n                style={{ fontFamily: \"var(--aurora-font-sans)\" }}\n              >\n                {t}\n              </span>\n            ))}\n          </div>\n        ) : null}\n      </div>\n    )\n  }\nPersona.displayName = \"Persona\"\n\nconst MemoPersona = React.memo(Persona)\nMemoPersona.displayName = \"Persona\"\n\nexport { MemoPersona as Persona }\nexport default MemoPersona\n",
      "type": "registry:component",
      "target": "@components/aurora/ai/persona.tsx"
    }
  ],
  "meta": {
    "namespace": "@aurora",
    "style": "aurora",
    "family": "block",
    "requiresTokens": true,
    "sourcePath": "registry/aurora/blocks/ai/elements/persona.tsx",
    "installTarget": "@components/aurora/ai/persona.tsx",
    "taxonomy": "ai"
  },
  "docs": "Aurora block that installs Aurora AI Persona.\n\nInstall `aurora-tokens`, `aurora-ai-elements`, and `aurora-components` first; the shadcn CLI resolves these automatically through the @aurora registry namespace.\n\nDefault install target: `@components/aurora/ai/persona.tsx`.\n\nRegistry dependencies: `aurora-tokens`, `aurora-ai-elements`, `aurora-components`.",
  "categories": [
    "aurora",
    "block",
    "ai"
  ],
  "type": "registry:block"
}