{
  "component": {
    "id": "csv-preview",
    "name": "CSV preview",
    "tier": "pro",
    "exampleId": "csv-preview",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/csv-preview-demo.tsx",
    "exportName": "CsvPreviewDemo",
    "sha256": "128b3ebff9ac91ed7494103a14c1aa6d1f70f50f24f25e3026a89d8d3350f61f",
    "helperImports": [],
    "directComponentImports": [
      "csv-preview"
    ],
    "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/csv-preview",
    "registryUrl": "https://tidalui.com/r/pro/csv-preview.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/csv-preview",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/csv-preview",
      "registryUrl": "https://tidalui.com/r/pro/csv-preview.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/csv-preview.tsx",
    "exports": [
      "TidalCsvPreview",
      "TidalCsvRow",
      "TidalCsvView"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/csv-preview.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [
      "https://tidalui.com/r/tidal-button.json"
    ],
    "additionalRegistry": [],
    "installClosure": [
      "csv-preview",
      "tidal-button"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/csv-preview.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/csv-preview.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/csv-preview-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useState } from \"react\";\n\nimport { TidalCsvPreview, type TidalCsvView, type TidalCsvRow } from \"./components/ui/csv-preview\";\n\nimport \"./components/ui/csv-preview.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .csv-preview-demo {\\n  width: 100%;\\n  max-width: 1080px;\\n  min-width: 0;\\n}\\n.tidal-scope .csv-preview-note {\\n  font-size: 11px;\\n  line-height: 1.6;\\n  color: var(--t-muted);\\n  text-align: center;\\n  margin: 14px 8px 0;\\n}\";\n\nconst rows: readonly TidalCsvRow[] = [\n  {\n    id: \"1\",\n    rowNumber: 2,\n    cells: { name: \"Mira Chen\", email: \"mira@example.com\", role: \"Admin\" },\n  },\n  {\n    id: \"2\",\n    rowNumber: 3,\n    cells: { name: \"Jon Bell\", email: \"jon.example.com\", role: \"Editor\" },\n    issues: [\n      {\n        id: \"email\",\n        columnId: \"email\",\n        severity: \"error\",\n        message: \"Enter a complete email address.\",\n      },\n    ],\n  },\n  {\n    id: \"3\",\n    rowNumber: 4,\n    cells: { name: \"Sam Rivera\", email: \"sam@example.com\", role: \"Member\" },\n    issues: [\n      {\n        id: \"role\",\n        columnId: \"role\",\n        severity: \"warning\",\n        message: \"Member will use the default Viewer role.\",\n      },\n    ],\n  },\n];\n\nexport function CsvPreviewDemo() {\n  const [view, setView] = useState<TidalCsvView>(\"all\");\n  return (\n    <div className=\"csv-preview-demo\">\n      <TidalCsvPreview\n        title=\"Review imported contacts\"\n        fileName=\"contacts.csv\"\n        columns={[\n          { id: \"name\", label: \"Name\", typeLabel: \"Text\" },\n          { id: \"email\", label: \"Email\", typeLabel: \"Email address\" },\n          { id: \"role\", label: \"Role\", typeLabel: \"Workspace role\" },\n        ]}\n        rows={rows}\n        totalRows={3}\n        view={view}\n        onViewChange={setView}\n        summary={(shown, _supplied, total) => (\n          <>\n            {shown} of {total} data rows · 1 error, 1 warning\n          </>\n        )}\n      />\n      <p className=\"csv-preview-note\">\n        Sample parsed data. Filter the rows to inspect validation messages.\n      </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      <CsvPreviewDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/csv-preview.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "view",
      "type": "inferred-from-existing-demo",
      "initial": "\"all\"",
      "setter": "setView",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onViewChange",
      "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": []
}
