{
  "component": {
    "id": "chat-composer",
    "name": "Chat composer",
    "tier": "pro",
    "exampleId": "chat-composer",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/chat-composer-demo.tsx",
    "exportName": "ChatComposerDemo",
    "sha256": "610726b5d6c53fcc763ad52574c7b0efaffd33810bbc752068514b30d257e3ce",
    "helperImports": [],
    "directComponentImports": [
      "attachment-tray",
      "chat-composer"
    ],
    "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/chat-composer",
    "registryUrl": "https://tidalui.com/r/pro/chat-composer.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/chat-composer",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/chat-composer",
      "registryUrl": "https://tidalui.com/r/pro/chat-composer.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/chat-composer.tsx",
    "exports": [
      "TidalAttachment",
      "TidalChatComposer"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/chat-composer.css",
      "components/ui/attachment-tray.css",
      "components/ui/textarea.css",
      "components/ui/status-badge.css",
      "components/ui/progress.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [
      "https://tidalui.com/r/textarea.json",
      "https://tidalui.com/r/tidal-button.json",
      "@tidal-pro/attachment-tray"
    ],
    "additionalRegistry": [],
    "installClosure": [
      "attachment-tray",
      "chat-composer",
      "progress",
      "status-badge",
      "textarea",
      "tidal-button"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/chat-composer.css",
      "components/ui/attachment-tray.css",
      "components/ui/textarea.css",
      "components/ui/status-badge.css",
      "components/ui/progress.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/chat-composer.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/chat-composer-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useRef, useState } from \"react\";\n\nimport { TidalChatComposer } from \"./components/ui/chat-composer\";\n\nimport type { TidalAttachment } from \"./components/ui/attachment-tray\";\n\nimport \"./components/ui/attachment-tray.css\";\n\nimport \"./components/ui/chat-composer.css\";\n\nimport \"./components/ui/textarea.css\";\n\nimport \"./components/ui/status-badge.css\";\n\nimport \"./components/ui/progress.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .chat-composer-demo {\\n  width: min(100%, 680px);\\n  min-width: 0;\\n}\\n.tidal-scope .chat-composer-demo > p {\\n  margin: 14px 2px 0;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.6;\\n  overflow-wrap: anywhere;\\n}\\n.tidal-scope .composer-demo-attach {\\n  min-height: 44px;\\n  padding: 8px 12px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 9px;\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n  font: inherit;\\n  font-size: 12px;\\n}\";\n\nexport function ChatComposerDemo() {\n  const [value, setValue] = useState(\n    \"Summarize the release notes and list anything blocking launch.\",\n  );\n  const [busy, setBusy] = useState(false);\n  const [files, setFiles] = useState<TidalAttachment[]>([]);\n  const [status, setStatus] = useState(\"Local sample. No message is sent.\");\n  const input = useRef<HTMLTextAreaElement>(null);\n  return (\n    <div className=\"chat-composer-demo\">\n      <TidalChatComposer\n        value={value}\n        onValueChange={setValue}\n        busy={busy}\n        textareaRef={input}\n        onSend={(message) => {\n          setBusy(true);\n          setValue(\"\");\n          setStatus(\n            `Sample received ${message.length} characters. Use Stop to end the preview.`,\n          );\n        }}\n        onStop={() => {\n          setBusy(false);\n          setStatus(\"Sample response stopped. No request was made.\");\n        }}\n        tools={\n          <button\n            type=\"button\"\n            className=\"composer-demo-attach\"\n            onClick={() => {\n              setFiles([\n                {\n                  id: \"notes\",\n                  name: \"release-notes.md\",\n                  typeText: \"Markdown\",\n                  sizeText: \"4 KB\",\n                  status: \"ready\",\n                },\n              ]);\n              setStatus(\"Sample attachment added locally.\");\n            }}\n          >\n            Attach sample\n          </button>\n        }\n        attachmentTray={\n          files.length\n            ? {\n                label: \"Attachments\",\n                attachments: files,\n                onRemove: (item, event) => {\n                  if (document.activeElement === event.currentTarget)\n                    input.current?.focus({ preventScroll: true });\n                  setFiles(files.filter((file) => file.id !== item.id));\n                  setStatus(\"Sample attachment removed.\");\n                },\n              }\n            : undefined\n        }\n      />\n      <p role=\"status\">{status}</p>\n    </div>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <ChatComposerDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/chat-composer.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "value",
      "type": "inferred-from-existing-demo",
      "initial": "\"Summarize the release notes and list anything blocking launch.\",",
      "setter": "setValue",
      "proposalCanBeRejected": false
    },
    {
      "prop": "busy",
      "type": "inferred-from-existing-demo",
      "initial": "false",
      "setter": "setBusy",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onClick",
      "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": "onSend",
      "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": "onStop",
      "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": "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": [],
    "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": "Consumer-provided label remains required where the component API requires one.",
    "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": []
}
