{
  "component": {
    "id": "tree-view",
    "name": "Tree view",
    "tier": "pro",
    "exampleId": "tree-view",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/tree-view-demo.tsx",
    "exportName": "TreeViewDemo",
    "sha256": "ff6b65361059802f4d4822e4dc08e57da5c40f81b0bbf1e7e8f92e7d6ab86661",
    "helperImports": [],
    "directComponentImports": [
      "tree-view"
    ],
    "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/tree-view",
    "registryUrl": "https://tidalui.com/r/pro/tree-view.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/tree-view",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/tree-view",
      "registryUrl": "https://tidalui.com/r/pro/tree-view.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/tree-view.tsx",
    "exports": [
      "TidalTreeNode",
      "TidalTreeView"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/tree-view.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "tree-view"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/tree-view.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/tree-view.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/tree-view-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useMemo, useState } from \"react\";\n\nimport { TidalTreeView, type TidalTreeNode } from \"./components/ui/tree-view\";\n\nimport \"./components/ui/tree-view.css\";\n\n\n\nconst tidalExampleStyles = \".tree-demo {\\n  display: grid;\\n  width: 100%;\\n  max-width: 620px;\\n  min-width: 0;\\n  gap: 12px;\\n}\\n\\n.tree-demo-detail {\\n  display: grid;\\n  min-width: 0;\\n  gap: 3px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 14px;\\n  padding: 12px 14px;\\n  background: var(--t-subtle);\\n}\\n\\n.tree-demo-detail > span,\\n.tree-demo-note {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.45;\\n}\\n\\n.tree-demo-detail strong {\\n  min-width: 0;\\n  font-size: 13px;\\n  line-height: 1.35;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tree-demo-detail p,\\n.tree-demo-note {\\n  margin: 0;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tree-demo-detail p {\\n  font-size: 12px;\\n  line-height: 1.45;\\n}\\n\\n.tree-demo-note {\\n  padding-inline: 4px;\\n}\\n\\n@media (max-width: 390px) {\\n  .tree-demo {\\n    gap: 10px;\\n  }\\n\\n  .tree-demo-detail {\\n    padding: 10px 12px;\\n  }\\n}\";\n\nfunction FolderIcon() {\n  return (\n    <svg viewBox=\"0 0 20 20\" fill=\"none\" aria-hidden=\"true\">\n      <path\n        d=\"M2.75 5.75c0-.83.67-1.5 1.5-1.5h3.1l1.4 1.5h7c.83 0 1.5.67 1.5 1.5v7c0 .83-.67 1.5-1.5 1.5H4.25c-.83 0-1.5-.67-1.5-1.5v-8.5Z\"\n        stroke=\"currentColor\"\n        strokeWidth=\"1.4\"\n      />\n    </svg>\n  );\n}\n\nfunction FileIcon() {\n  return (\n    <svg viewBox=\"0 0 20 20\" fill=\"none\" aria-hidden=\"true\">\n      <path\n        d=\"M5 2.75h6l4 4v10.5H5V2.75Z\"\n        stroke=\"currentColor\"\n        strokeLinejoin=\"round\"\n        strokeWidth=\"1.4\"\n      />\n      <path d=\"M11 2.75v4h4\" stroke=\"currentColor\" strokeWidth=\"1.4\" />\n    </svg>\n  );\n}\n\nexport function TreeViewDemo() {\n  const [expandedIds, setExpandedIds] = useState<readonly string[]>([\n    \"product\",\n    \"research\",\n  ]);\n  const [selectedId, setSelectedId] = useState<string | null>(\"launch\");\n  const [status, setStatus] = useState(\"Launch checklist selected.\");\n\n  const nodes = useMemo<readonly TidalTreeNode[]>(\n    () => [\n      {\n        id: \"product\",\n        label: \"Product\",\n        textValue: \"Product\",\n        description: \"Planning and release work\",\n        icon: <FolderIcon />,\n        children: [\n          {\n            id: \"roadmap\",\n            label: \"Roadmap\",\n            textValue: \"Roadmap\",\n            description: \"Quarterly priorities\",\n            icon: <FileIcon />,\n          },\n          {\n            id: \"launch\",\n            label: \"Launch checklist\",\n            textValue: \"Launch checklist\",\n            description: \"12 of 16 items complete\",\n            icon: <FileIcon />,\n          },\n        ],\n      },\n      {\n        id: \"research\",\n        label: \"Research\",\n        textValue: \"Research\",\n        description: \"Notes from recent interviews\",\n        icon: <FolderIcon />,\n        children: [\n          {\n            id: \"interviews\",\n            label: \"Interview notes\",\n            textValue: \"Interview notes\",\n            description: \"Six fictional local entries\",\n            icon: <FileIcon />,\n          },\n          {\n            id: \"themes\",\n            label: \"Themes\",\n            textValue: \"Themes\",\n            description: \"Grouped observations\",\n            icon: <FileIcon />,\n          },\n        ],\n      },\n      {\n        id: \"archive\",\n        label: \"Archive\",\n        textValue: \"Archive\",\n        description: \"Older sample material\",\n        icon: <FolderIcon />,\n        lazyState: \"Archived items are not included in this local sample.\",\n      },\n    ],\n    [],\n  );\n\n  const selectedNode = useMemo(() => {\n    const queue = [...nodes];\n    while (queue.length) {\n      const node = queue.shift();\n      if (!node) continue;\n      if (node.id === selectedId) return node;\n      if (node.children) queue.push(...node.children);\n    }\n    return null;\n  }, [nodes, selectedId]);\n\n  return (\n    <section className=\"tree-demo\" aria-label=\"Tree view sample\">\n      <TidalTreeView\n        label=\"Project resources\"\n        nodes={nodes}\n        expandedIds={expandedIds}\n        selectedId={selectedId}\n        onExpandedChange={(nextIds) => setExpandedIds(nextIds)}\n        onSelectedChange={(nextId, node) => {\n          setSelectedId(nextId);\n          setStatus(`${node.textValue} selected.`);\n        }}\n      />\n\n      <div\n        className=\"tree-demo-detail\"\n        role=\"region\"\n        aria-label=\"Selected resource\"\n      >\n        <span>Selected resource</span>\n        <strong>{selectedNode?.label ?? \"Nothing selected\"}</strong>\n        <p>{status}</p>\n      </div>\n\n      <p className=\"tree-demo-note\">\n        This sample changes local selection and expansion only.\n      </p>\n    </section>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <TreeViewDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/tree-view.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "expandedIds",
      "type": "inferred-from-existing-demo",
      "initial": "[\n    \"product\",\n    \"research\",\n  ]",
      "setter": "setExpandedIds",
      "proposalCanBeRejected": false
    },
    {
      "prop": "selectedId",
      "type": "inferred-from-existing-demo",
      "initial": "\"launch\"",
      "setter": "setSelectedId",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onExpandedChange",
      "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": "onSelectedChange",
      "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": "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": "No error announcement path is present in this demo; the consumer owns validation messaging.",
    "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": []
}
