{
  "component": {
    "id": "avatar",
    "name": "Avatar group",
    "tier": "pro",
    "exampleId": "avatar",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/avatar-demo.tsx",
    "exportName": "AvatarDemo",
    "sha256": "79b1f2b348e9195906d24e484292ec9490fa6dac18ffe8151a93535a29be350e",
    "helperImports": [],
    "directComponentImports": [
      "avatar",
      "status-badge",
      "tidal-button"
    ],
    "sampleBoundary": "Existing local demo fixture with fictional data and callbacks. No live service, customer data, access key, or Pro source is included."
  },
  "install": {
    "command": "npx shadcn@latest add @tidal-pro/avatar",
    "registryUrl": "https://tidalui.com/r/pro/avatar.json",
    "namespace": "@tidal-pro",
    "access": "pro",
    "sourceDelivery": "server-gated",
    "requiresAuthorization": true,
    "tokenSource": "local-env",
    "tokenEnvName": "TIDALUI_TOKEN",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "@tidal-pro/avatar",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/avatar",
      "registryUrl": "https://tidalui.com/r/pro/avatar.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    },
    {
      "order": 2,
      "kind": "demo-only-additional",
      "dependency": "https://tidalui.com/r/status-badge.json",
      "purpose": "complete-example-demo-dependency",
      "command": "npx shadcn@latest add https://tidalui.com/r/status-badge.json",
      "registryUrl": "https://tidalui.com/r/status-badge.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    },
    {
      "order": 3,
      "kind": "demo-only-additional",
      "dependency": "https://tidalui.com/r/tidal-button.json",
      "purpose": "complete-example-demo-dependency",
      "command": "npx shadcn@latest add https://tidalui.com/r/tidal-button.json",
      "registryUrl": "https://tidalui.com/r/tidal-button.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    }
  ],
  "imports": {
    "componentPath": "components/ui/avatar.tsx",
    "exports": [
      "TidalAvatar",
      "TidalAvatarGroup",
      "TidalAvatarMember",
      "TidalButton",
      "TidalStatusBadge"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/avatar.css",
      "components/ui/status-badge.css",
      "components/ui/tooltip.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "@radix-ui/react-radio-group",
      "lucide-react"
    ],
    "registry": [
      "@tidal-pro/tooltip"
    ],
    "additionalRegistry": [
      "https://tidalui.com/r/status-badge.json",
      "https://tidalui.com/r/tidal-button.json"
    ],
    "installClosure": [
      "avatar",
      "status-badge",
      "tidal-button",
      "tooltip"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/avatar.css",
      "components/ui/status-badge.css",
      "components/ui/tooltip.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/avatar.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/avatar-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useState } from \"react\";\n\nimport { Check } from \"lucide-react\";\n\nimport { TidalAvatar, TidalAvatarGroup, type TidalAvatarMember } from \"./components/ui/avatar\";\n\nimport { TidalButton } from \"./components/ui/tidal-button\";\n\nimport { TidalStatusBadge } from \"./components/ui/status-badge\";\n\nimport \"./components/ui/avatar.css\";\n\nimport \"./components/ui/status-badge.css\";\n\nimport \"./components/ui/tooltip.css\";\n\nfunction tidalExampleAvatarDataUri(seed: unknown) {\n  const text = String(seed).replace(/[^a-z0-9]/gi, \"\").slice(-2) || \"UI\";\n  const palette = [\"#333333\", \"#555555\", \"#777777\", \"#999999\", \"#bbbbbb\"];\n  const color = palette[Array.from(text).reduce((sum, character) => sum + character.charCodeAt(0), 0) % palette.length];\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\"><rect width=\"96\" height=\"96\" rx=\"48\" fill=\"${color}\"/><circle cx=\"48\" cy=\"38\" r=\"17\" fill=\"white\" fill-opacity=\".92\"/><path d=\"M18 92c3-22 15-34 30-34s27 12 30 34\" fill=\"white\" fill-opacity=\".92\"/></svg>`;\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nfunction tidalExampleImageDataUri(label: string) {\n  const safeLabel = label.replace(/[<>&]/g, \"\").slice(0, 28) || \"Sample image\";\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1200 675\"><defs><linearGradient id=\"g\" x1=\"0\" x2=\"1\" y1=\"0\" y2=\"1\"><stop stop-color=\"#171717\"/><stop offset=\"1\" stop-color=\"#555555\"/></linearGradient></defs><rect width=\"1200\" height=\"675\" fill=\"url(#g)\"/><circle cx=\"950\" cy=\"100\" r=\"260\" fill=\"white\" fill-opacity=\".08\"/><text x=\"80\" y=\"570\" fill=\"white\" font-family=\"system-ui,sans-serif\" font-size=\"64\" font-weight=\"700\">${safeLabel}</text></svg>`;\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nconst tidalExampleStyles = \".avatar-specimen{width:100%;max-width:580px;padding:28px;border:1px solid var(--t-border);border-radius:var(--t-radius-card);background:var(--t-surface);box-shadow:0 24px 40px -28px #00000035,0 2px 4px #00000008}.avatar-specimen>h3{font-size:29px;font-weight:500;line-height:1.08;letter-spacing:-1px;margin:13px 0 29px}.avatar-specimen>h3>em{font-family:\\\"Instrument Serif\\\",serif;font-size:1.2em;font-weight:400}.avatar-demo-profile{display:flex;align-items:center;gap:20px;padding:22px;border:1px solid var(--t-border);border-radius:13px;background:var(--t-subtle)}.avatar-demo-profile>div{min-width:0}.avatar-demo-profile .demo-eyebrow{font-size:11px;color:var(--t-muted)}.avatar-demo-profile h4{font-size:23px;line-height:1.2;font-weight:500;letter-spacing:-.7px;margin:7px 0 4px;overflow-wrap:anywhere}.avatar-demo-profile p{font-size:11px;color:var(--t-muted);margin:0;line-height:1.8}.avatar-demo-people{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:20px -8px 21px}.avatar-demo-people>span{font-size:11px;line-height:1.8;color:var(--t-muted);max-width:175px}.avatar-demo-task{border-top:1px solid var(--t-border);padding-top:22px;display:flex;align-items:center;justify-content:space-between;gap:12px}.avatar-demo-task .demo-eyebrow{font-size:11px}.avatar-demo-task h4{font-size:12px;line-height:1.6;font-weight:550;margin:7px 0 0}.avatar-demo-task>.tidal-status-badge{flex:none}.avatar-demo-actions{display:flex;align-items:center;gap:8px;margin-top:22px}.avatar-demo-actions>.tidal-button{font-size:11px}.avatar-demo-note{font-size:11px;line-height:1.8;color:var(--t-muted);margin:18px 0 0;min-height:36px}@media(prefers-reduced-motion:no-preference){.avatar-demo-profile>div{animation:tidal-avatar-detail-in 240ms var(--t-ease-out)}}@keyframes tidal-avatar-detail-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media(max-width:420px){.avatar-specimen{padding:22px}.avatar-demo-profile{padding:18px;gap:14px}.avatar-demo-profile h4{font-size:21px}.avatar-demo-people{flex-wrap:wrap;gap:8px;margin-block:16px}.avatar-demo-people>span{margin-left:8px}.avatar-demo-task{flex-wrap:wrap}}\";\n\nconst members:TidalAvatarMember[]=[{id:\"ava\",name:\"Ava Chen\",src:tidalExampleAvatarDataUri(\"01\"),presence:\"available\"},{id:\"noah\",name:\"Noah Reed\",src:tidalExampleAvatarDataUri(\"02\"),presence:\"away\"},{id:\"mila\",name:\"Mila Stone\",src:tidalExampleAvatarDataUri(\"03\"),presence:\"busy\"},{id:\"eli\",name:\"Eli Park\",src:tidalExampleAvatarDataUri(\"04\"),presence:\"offline\"}];\n\nconst roles:Record<string,string>={ava:\"Product design\",noah:\"Frontend engineering\",mila:\"Design systems\",eli:\"Customer experience\"};\n\nexport function AvatarDemo({theme=\"light\"}:{theme?:\"light\"|\"dark\"}){\n  const [selected,setSelected]=useState(\"ava\");\n  const [assigned,setAssigned]=useState<string|null>(null);\n  const person=members.find(member=>member.id===selected)!;\n  return <div className=\"avatar-specimen\">\n    <div className=\"avatar-demo-profile\"><TidalAvatar name={person.name} src={person.src} presence={person.presence} size=\"lg\" selected /><div key={person.id}><span className=\"demo-eyebrow\">SELECTED TEAMMATE</span><h4>{person.name}</h4><p>{roles[person.id]} · {person.presence ? person.presence.charAt(0).toUpperCase()+person.presence.slice(1) : \"\"}</p></div></div>\n    <div className=\"avatar-demo-people\"><TidalAvatarGroup label=\"Choose a sample teammate\" members={members} selectedId={selected} onSelect={setSelected} theme={theme} /><span>Choose a teammate.</span></div>\n    <div className=\"avatar-demo-task\"><div><span className=\"demo-eyebrow\">SAMPLE TASK</span><h4>Polish the landing page</h4></div><TidalStatusBadge label={assigned?\"Sample assigned\":\"Ready to assign\"} status={assigned?\"success\":\"neutral\"} /></div>\n    <div className=\"avatar-demo-actions\"><TidalButton onClick={()=>setAssigned(person.name)}>{assigned===person.name?<Check size={14} aria-hidden=\"true\" />:null}Assign to {person.name.split(\" \")[0]}</TidalButton><TidalButton variant=\"ghost\" onClick={()=>setAssigned(null)}>Reset</TidalButton></div>\n    <p className=\"avatar-demo-note\" role=\"status\">{assigned?`${assigned} is assigned to this sample task. Nothing is sent or saved.`:\"Choose a teammate, then assign the sample task in this preview.\"}</p>\n  </div>;\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <AvatarDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/avatar.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "selectedId",
      "type": "inferred-from-existing-demo",
      "initial": "\"ava\"",
      "setter": "setSelected",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onClick",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onSelect",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "The existing demo's native form callback receives the submit event.",
    "resetBehavior": "Native reset behavior remains available where the demo renders a resettable control.",
    "disabledBehavior": "Disabled controls remain excluded from successful native form submission.",
    "readOnlyBehavior": "Read-only controls retain their value and remain inspectable by the consumer."
  },
  "accessibility": {
    "labelSource": "Existing demo label or ARIA prop",
    "semantics": "Preserve the component's native element and the semantics demonstrated by the source fixture.",
    "keyboard": [
      "Tab and Shift+Tab",
      "Enter or Space for native activation",
      "Arrow keys where the component exposes a composite control"
    ],
    "focusReturn": "Preserve browser focus order and visible focus.",
    "errorAnnouncement": "The existing error or alert path remains consumer-owned and should be announced by the rendered semantics.",
    "reducedMotion": "Verify prefers-reduced-motion with the existing component transition path.",
    "forcedColors": "Verify visible borders, text, and focus in forced-colors mode."
  },
  "responsive": {
    "widths": [
      320,
      390,
      768,
      1260
    ],
    "shortViewport": "Check the example at a 300px viewport height with keyboard or portal content visible.",
    "overflow": "The page should not gain horizontal overflow; component-local scrolling must remain intentional.",
    "touchTargetMinPx": 44,
    "coarseInputFontPx": 16
  },
  "errors": [
    {
      "fixture": "Exercise the existing demo's error, empty, loading, or invalid fixture.",
      "visibleResult": "The consumer-visible result must remain explicit and must not be replaced by a silent console error.",
      "focusResult": "Focus must remain on the triggering control or move to the announced error according to the native pattern.",
      "ownership": "Consumer-owned sample state only; no network request or customer data is used."
    }
  ],
  "verification": {
    "commands": [
      "npx tsc --noEmit",
      "npx vite build"
    ],
    "lockfile": "Use the consumer project's committed lockfile.",
    "browser": [
      "Chromium 1260x800",
      "Chromium 390x844",
      "Keyboard and reduced-motion pass"
    ]
  },
  "validation": {
    "consumerFixture": {
      "tsc": "pass",
      "viteBuild": "pass",
      "resourceModel": "Generated usage plus only the component files and CSS delivered by the primary item and listed registry dependencies."
    },
    "registryArtifact": "server-gated"
  },
  "exceptions": []
}
