{
  "component": {
    "id": "mention-input",
    "name": "Mention input",
    "tier": "pro",
    "exampleId": "mention-input",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/mention-input-demo.tsx",
    "exportName": "MentionInputDemo",
    "sha256": "cea27c1ea251af3fc2c061a350333adec18e3c4d542cf542a3755b422ff23638",
    "helperImports": [],
    "directComponentImports": [
      "mention-input"
    ],
    "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/mention-input",
    "registryUrl": "https://tidalui.com/r/pro/mention-input.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/mention-input",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/mention-input",
      "registryUrl": "https://tidalui.com/r/pro/mention-input.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/mention-input.tsx",
    "exports": [
      "TidalMentionInput",
      "TidalMentionSuggestion"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/mention-input.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "mention-input"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/mention-input.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/mention-input.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/mention-input-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useState } from \"react\";\n\nimport { TidalMentionInput, type TidalMentionSuggestion } from \"./components/ui/mention-input\";\n\nimport \"./components/ui/mention-input.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .mention-input-demo {\\n  container: mention-input-demo / inline-size;\\n  display: grid;\\n  gap: 20px;\\n  width: min(100%, 560px);\\n  min-width: 0;\\n  color: var(--t-ink);\\n}\\n\\n.tidal-scope .mention-input-demo-actions {\\n  display: flex;\\n  flex-wrap: wrap;\\n  gap: 10px;\\n}\\n\\n.tidal-scope .mention-input-demo-actions > button {\\n  min-width: 126px;\\n  min-height: 44px;\\n  padding: 10px 15px;\\n  border: 1px solid var(--t-border);\\n  border-radius: var(--t-radius-control);\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n  font: inherit;\\n  font-size: 13px;\\n  font-weight: 650;\\n  cursor: pointer;\\n  transition:\\n    border-color 140ms,\\n    background-color 140ms,\\n    color 140ms,\\n    transform 140ms var(--t-ease-out);\\n}\\n\\n.tidal-scope .mention-input-demo-actions > button[type=\\\"submit\\\"] {\\n  border-color: var(--t-ink);\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n}\\n\\n.tidal-scope .mention-input-demo-actions > button:hover {\\n  border-color: var(--t-ink);\\n}\\n\\n.tidal-scope .mention-input-demo-actions > button[type=\\\"reset\\\"]:hover {\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n}\\n\\n.tidal-scope .mention-input-demo-actions > button:active {\\n  transform: scale(0.98);\\n}\\n\\n.tidal-scope .mention-input-demo-actions > button:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n.tidal-scope .mention-input-demo-status {\\n  min-width: 0;\\n  margin: 0;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.5;\\n  overflow-wrap: anywhere;\\n}\\n\\n@container mention-input-demo (max-width: 320px) {\\n  .tidal-scope .mention-input-demo-actions {\\n    display: grid;\\n    grid-template-columns: minmax(0, 1fr);\\n  }\\n\\n  .tidal-scope .mention-input-demo-actions > button {\\n    width: 100%;\\n  }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .tidal-scope .mention-input-demo-actions > button {\\n    transition: none;\\n  }\\n\\n  .tidal-scope .mention-input-demo-actions > button:active {\\n    transform: none;\\n  }\\n}\";\n\nconst INITIAL_MESSAGE = \"Review this with @\";\n\nconst PEOPLE: readonly TidalMentionSuggestion[] = [\n  { id: \"ava\", label: \"Ava Reed\", value: \"ava\", description: \"Design\" },\n  { id: \"noah\", label: \"Noah Kim\", value: \"noah\", description: \"Product\" },\n  { id: \"mila\", label: \"Mila Chen\", value: \"mila\", description: \"Research\" },\n  { id: \"sam\", label: \"Sam Ortiz\", value: \"sam\", description: \"Engineering\" },\n];\n\nexport function MentionInputDemo() {\n  const [message, setMessage] = useState(INITIAL_MESSAGE);\n  const [error, setError] = useState<string | null>(null);\n  const [status, setStatus] = useState(\n    \"Type @ to choose a fictional teammate.\",\n  );\n\n  return (\n    <form\n      className=\"mention-input-demo\"\n      aria-label=\"Mention input preview\"\n      onSubmit={(event) => {\n        event.preventDefault();\n        const submitted = new FormData(event.currentTarget).get(\"message\");\n        setError(null);\n        setStatus(`Prepared locally: ${String(submitted)}`);\n      }}\n      onReset={(event) => {\n        if (event.defaultPrevented) return;\n        setMessage(INITIAL_MESSAGE);\n        setError(null);\n        setStatus(\"Sample reset.\");\n      }}\n    >\n      <TidalMentionInput\n        name=\"message\"\n        label=\"Review note\"\n        value={message}\n        onValueChange={(nextValue) => {\n          setMessage(nextValue);\n          setError(null);\n          setStatus(\"Type @ to choose a fictional teammate.\");\n        }}\n        suggestions={PEOPLE}\n        onMentionSelect={(person) =>\n          setStatus(`${person.label} added to the local note.`)\n        }\n        description=\"Suggestions are supplied by this local sample.\"\n        error={error}\n        placeholder=\"Write a note and type @\"\n        required\n        onInvalid={(event) => {\n          event.preventDefault();\n          setError(\"Write a review note.\");\n          setStatus(\"Check the note.\");\n          event.currentTarget.focus({ preventScroll: true });\n        }}\n      />\n\n      <div className=\"mention-input-demo-actions\">\n        <button type=\"submit\">Prepare note</button>\n        <button type=\"reset\">Reset</button>\n      </div>\n      <p className=\"mention-input-demo-status\" role=\"status\" aria-live=\"polite\">\n        {status}\n      </p>\n    </form>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <MentionInputDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/mention-input.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "value",
      "type": "inferred-from-existing-demo",
      "initial": "INITIAL_MESSAGE",
      "setter": "setMessage",
      "proposalCanBeRejected": false
    },
    {
      "prop": "error",
      "type": "inferred-from-existing-demo",
      "initial": "null",
      "setter": "setError",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onInvalid",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onMentionSelect",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onReset",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onSubmit",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onValueChange",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [
      "message"
    ],
    "expectedFormData": {
      "message": "fixture value"
    },
    "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": []
}
