{
  "component": {
    "id": "streaming-terminal",
    "name": "Streaming terminal",
    "tier": "pro",
    "exampleId": "streaming-terminal",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/streaming-terminal-demo.tsx",
    "exportName": "StreamingTerminalDemo",
    "sha256": "bf2679d030c0832287f09012fcecfea668629fa05e301683497f84f16da004c6",
    "helperImports": [],
    "directComponentImports": [
      "streaming-terminal"
    ],
    "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/streaming-terminal",
    "registryUrl": "https://tidalui.com/r/pro/streaming-terminal.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/streaming-terminal",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/streaming-terminal",
      "registryUrl": "https://tidalui.com/r/pro/streaming-terminal.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/streaming-terminal.tsx",
    "exports": [
      "TidalStreamingTerminal",
      "TidalTerminalLine",
      "TidalTerminalStatus"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/streaming-terminal.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "streaming-terminal"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/streaming-terminal.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/streaming-terminal.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/streaming-terminal-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useEffect, useState } from \"react\";\n\nimport { TidalStreamingTerminal, type TidalTerminalLine, type TidalTerminalStatus } from \"./components/ui/streaming-terminal\";\n\nimport \"./components/ui/streaming-terminal.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .streaming-terminal-demo {\\n  width: 100%;\\n  max-width: 940px;\\n  min-width: 0;\\n  display: grid;\\n  gap: 16px;\\n}\\n.streaming-terminal-demo-footer {\\n  display: flex;\\n  align-items: center;\\n  gap: 16px;\\n  flex-wrap: wrap;\\n}\\n.streaming-terminal-demo-footer button {\\n  min-height: 44px;\\n  padding: 0 16px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 10px;\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n  font: 600 12px var(--t-font);\\n  cursor: pointer;\\n}\\n.streaming-terminal-demo-footer button:disabled {\\n  opacity: 0.5;\\n  cursor: not-allowed;\\n}\\n.streaming-terminal-demo-footer button:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n.streaming-terminal-demo-footer p {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.5;\\n  margin: 0;\\n}\";\n\nconst sample: readonly TidalTerminalLine[] = [\n  { id: \"1\", timestamp: \"00:00\", text: \"Reading project manifest\" },\n  { id: \"2\", timestamp: \"00:01\", text: \"Found 12 routes and 38 components\" },\n  { id: \"3\", timestamp: \"00:02\", text: \"Compiling the production bundle\" },\n  { id: \"4\", timestamp: \"00:03\", text: \"Checking route definitions\" },\n  {\n    id: \"5\",\n    timestamp: \"00:04\",\n    text: \"One image is larger than the sample size target\",\n    level: \"warning\",\n  },\n  { id: \"6\", timestamp: \"00:05\", text: \"Writing preview files\" },\n  {\n    id: \"7\",\n    timestamp: \"00:06\",\n    text: \"Build complete. Preview files are ready.\",\n    level: \"success\",\n  },\n];\n\nexport function StreamingTerminalDemo() {\n  const [lines, setLines] = useState<readonly TidalTerminalLine[]>(\n      sample.slice(0, 3),\n    ),\n    [status, setStatus] = useState<TidalTerminalStatus>(\"idle\"),\n    [following, setFollowing] = useState(true),\n    [note, setNote] = useState(\"Sample output. Replay stays in this preview.\");\n  useEffect(() => {\n    if (status !== \"running\") return;\n    let cursor = 0;\n    const timer = setInterval(() => {\n      cursor++;\n      setLines(sample.slice(0, cursor));\n      if (cursor === sample.length) {\n        setStatus(\"complete\");\n        setNote(\"Sample replay complete.\");\n      }\n    }, 650);\n    return () => clearInterval(timer);\n  }, [status]);\n  return (\n    <div className=\"streaming-terminal-demo\">\n      <TidalStreamingTerminal\n        title=\"Build output\"\n        lines={lines}\n        status={status}\n        following={following}\n        onFollowingChange={setFollowing}\n        onCancel={() => {\n          setStatus(\"idle\");\n          setNote(\"Sample replay stopped.\");\n        }}\n        onClear={\n          status === \"running\"\n            ? undefined\n            : () => {\n                setLines([]);\n                setStatus(\"idle\");\n                setNote(\"Sample output cleared.\");\n              }\n        }\n        onCopy={async (text) => {\n          try {\n            await navigator.clipboard.writeText(text);\n            setNote(\"Sample output copied.\");\n          } catch {\n            setNote(\"Clipboard access is unavailable.\");\n          }\n        }}\n      />\n      <div className=\"streaming-terminal-demo-footer\">\n        <button\n          type=\"button\"\n          disabled={status === \"running\"}\n          onClick={() => {\n            setLines([]);\n            setFollowing(true);\n            setStatus(\"running\");\n            setNote(\"Replaying sample output. No command is running.\");\n          }}\n        >\n          Replay sample\n        </button>\n        <p role=\"status\">{note}</p>\n      </div>\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      <StreamingTerminalDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/streaming-terminal.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "lines",
      "type": "inferred-from-existing-demo",
      "initial": "sample.slice(0, 3",
      "setter": "setLines",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onCancel",
      "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": "onClear",
      "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": "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": "onCopy",
      "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": "onFollowingChange",
      "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": false,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "No form submit is present in the existing demo.",
    "resetBehavior": "No reset control is present in the existing demo.",
    "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": "Verify focus returns to the invoking control after dismissal.",
    "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": []
}
