{
  "component": {
    "id": "pivot-table",
    "name": "Pivot table",
    "tier": "pro",
    "exampleId": "pivot-table",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/pivot-table-demo.tsx",
    "exportName": "PivotTableDemo",
    "sha256": "15f4d59e6268131d691383fa502230b607178c628a584da138f6802db45e6cb4",
    "helperImports": [],
    "directComponentImports": [
      "pivot-table"
    ],
    "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/pivot-table",
    "registryUrl": "https://tidalui.com/r/pro/pivot-table.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/pivot-table",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/pivot-table",
      "registryUrl": "https://tidalui.com/r/pro/pivot-table.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/pivot-table.tsx",
    "exports": [
      "TidalPivotRow",
      "TidalPivotSelection",
      "TidalPivotTable"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/pivot-table.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "pivot-table"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/pivot-table.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/pivot-table.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useState } from \"react\";\n\nimport { TidalPivotTable, type TidalPivotRow, type TidalPivotSelection } from \"./components/ui/pivot-table\";\n\nimport \"./components/ui/pivot-table.css\";\n\n\n\nexport const pivotColumns = [\n  { id: \"q1\", label: \"Q1\" },\n  { id: \"q2\", label: \"Q2\" },\n  { id: \"q3\", label: \"Q3\" },\n];\n\nexport const pivotRows: readonly TidalPivotRow[] = [\n  {\n    id: \"north\",\n    label: \"North America\",\n    values: { q1: 64000, q2: 82000, q3: 96000 },\n    total: 242000,\n  },\n  {\n    id: \"us\",\n    label: \"United States\",\n    parentId: \"north\",\n    values: { q1: 48000, q2: 60000, q3: 70000 },\n    total: 178000,\n  },\n  {\n    id: \"ca\",\n    label: \"Canada\",\n    parentId: \"north\",\n    values: { q1: 16000, q2: 22000, q3: 26000 },\n    total: 64000,\n  },\n  {\n    id: \"eu\",\n    label: \"Europe\",\n    values: { q1: 38000, q2: 46000, q3: 59000 },\n    total: 143000,\n  },\n  {\n    id: \"uk\",\n    label: \"United Kingdom\",\n    parentId: \"eu\",\n    values: { q1: 22000, q2: 27000, q3: 35000 },\n    total: 84000,\n  },\n  {\n    id: \"de\",\n    label: \"Germany\",\n    parentId: \"eu\",\n    values: { q1: 16000, q2: 19000, q3: 24000 },\n    total: 59000,\n  },\n];\n\nexport function PivotTableDemo() {\n  const [expanded, setExpanded] = useState<readonly string[]>([\"north\"]);\n  const [selected, setSelected] = useState<TidalPivotSelection | null>({\n    rowId: \"north\",\n    columnId: \"q3\",\n  });\n  return (\n    <TidalPivotTable\n      title=\"Revenue by market\"\n      description=\"Compare quarterly revenue. Expand a region to see its markets.\"\n      columns={pivotColumns}\n      rows={pivotRows}\n      expandedIds={expanded}\n      onExpandedChange={setExpanded}\n      selected={selected}\n      onSelectedChange={setSelected}\n      totals={{ q1: 102000, q2: 128000, q3: 155000 }}\n      grandTotal={385000}\n      formatValue={(v) =>\n        new Intl.NumberFormat(\"en-US\", {\n          style: \"currency\",\n          currency: \"USD\",\n          maximumFractionDigits: 0,\n        }).format(v)\n      }\n    />\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <PivotTableDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/pivot-table.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "expandedIds",
      "type": "inferred-from-existing-demo",
      "initial": "[\"north\"]",
      "setter": "setExpanded",
      "proposalCanBeRejected": false
    },
    {
      "prop": "selected",
      "type": "inferred-from-existing-demo",
      "initial": "{\n    rowId: \"north\",\n    columnId: \"q3\",\n  }",
      "setter": "setSelected",
      "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": "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": "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": "No error fixture is exposed by the existing demo; inject a consumer-owned failure state before production use.",
      "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": []
}
