{
  "component": {
    "id": "pagination",
    "name": "Pagination",
    "tier": "pro",
    "exampleId": "pagination",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/pagination-demo.tsx",
    "exportName": "PaginationDemo",
    "sha256": "785d75bc520b25323356710dbbd7d02020a1b72025a88dd7aa4115d6ba1e73cb",
    "helperImports": [],
    "directComponentImports": [
      "pagination"
    ],
    "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/pagination",
    "registryUrl": "https://tidalui.com/r/pro/pagination.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/pagination",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/pagination",
      "registryUrl": "https://tidalui.com/r/pro/pagination.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/pagination.tsx",
    "exports": [
      "TidalPagination"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/pagination.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "@radix-ui/react-dialog",
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "pagination"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/pagination.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/pagination.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/pagination-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useLayoutEffect, useRef, useState, type CSSProperties } from \"react\";\n\nimport { FileText } from \"lucide-react\";\n\nimport { TidalPagination } from \"./components/ui/pagination\";\n\nimport \"./components/ui/pagination.css\";\n\n\n\nconst tidalExampleStyles = \".pagination-specimen {\\n  width: 100%;\\n  max-width: 700px;\\n  padding: 28px;\\n  border: 1px solid var(--t-border);\\n  border-radius: var(--t-radius-card);\\n  background: var(--t-surface);\\n  box-shadow:\\n    0 24px 40px -28px #00000035,\\n    0 2px 4px #00000008;\\n}\\n.pagination-specimen > h3 {\\n  font-size: 29px;\\n  line-height: 1.08;\\n  letter-spacing: -1px;\\n  font-weight: 500;\\n  margin: 13px 0 26px;\\n}\\n.pagination-specimen > h3 > em {\\n  font-family: \\\"Instrument Serif\\\", serif;\\n  font-size: 1.2em;\\n  font-weight: 400;\\n}\\n.pagination-demo-archive {\\n  border: 1px solid var(--t-border);\\n  border-radius: 13px;\\n  background: var(--t-subtle);\\n  overflow: hidden;\\n}\\n.pagination-demo-range {\\n  display: flex;\\n  align-items: center;\\n  justify-content: flex-start;\\n  padding: 14px 22px;\\n  border-bottom: 1px solid var(--t-border);\\n  color: var(--t-ink);\\n  font-size: 13px;\\n  line-height: 1.2;\\n}\\n.pagination-demo-stage {\\n  padding: 6px 0;\\n  margin: 0;\\n  overflow: hidden;\\n  transition: height 420ms var(--t-ease-out);\\n}\\n.pagination-demo-content {\\n  display: flow-root;\\n}\\n.pagination-demo-list {\\n  margin: 0;\\n  padding: 8px 16px;\\n  list-style: none;\\n  display: grid;\\n  gap: 7px;\\n}\\n.pagination-demo-list > li {\\n  display: flex;\\n  align-items: center;\\n  gap: 13px;\\n  padding: 12px 14px;\\n  min-height: 76px;\\n  background: var(--t-surface);\\n  border: 1px solid var(--t-border);\\n  border-radius: 10px;\\n  animation: pagination-record-in 420ms var(--t-ease-out) var(--record-delay)\\n    both;\\n}\\n.pagination-demo-list > li > div:nth-child(2) {\\n  min-width: 0;\\n  flex: 1;\\n}\\n.pagination-demo-paper {\\n  display: flex;\\n  flex-direction: column;\\n  align-items: center;\\n  justify-content: center;\\n  gap: 6px;\\n  width: 35px;\\n  height: 44px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 5px;\\n  background: var(--t-subtle);\\n  box-shadow: 0 2px 4px #00000008;\\n  transform: rotate(-4deg);\\n  animation: pagination-paper-in 620ms var(--t-ease-spring) var(--record-delay)\\n    both;\\n}\\n.pagination-demo-paper > span {\\n  display: grid;\\n  gap: 2px;\\n  width: 100%;\\n  justify-items: center;\\n}\\n.pagination-demo-paper i {\\n  display: block;\\n  height: 1px;\\n  background: var(--t-muted);\\n  opacity: 0.45;\\n}\\n.pagination-demo-record-id {\\n  display: block;\\n  font-size: 11px;\\n  letter-spacing: 0.7px;\\n  color: var(--t-muted);\\n}\\n.pagination-demo-list h5 {\\n  font-size: 13px;\\n  line-height: 1.35;\\n  font-weight: 500;\\n  margin: 4px 0 3px;\\n  letter-spacing: -0.2px;\\n}\\n.pagination-demo-list p {\\n  font-size: 11px;\\n  color: var(--t-muted);\\n  line-height: 1.4;\\n  margin: 0;\\n}\\n.pagination-demo-record-status {\\n  font-size: 11px;\\n  white-space: nowrap;\\n  border: 1px solid var(--t-border);\\n  border-radius: 5px;\\n  padding: 4px 7px;\\n  background: var(--t-wash);\\n  color: var(--t-muted);\\n}\\n.pagination-demo-record-status[data-ready=\\\"true\\\"] {\\n  background: var(--t-ink);\\n  border-color: var(--t-ink);\\n  color: var(--t-surface);\\n}\\n.pagination-demo-footer {\\n  padding: 15px 20px 9px;\\n  background: var(--t-surface);\\n}\\n.pagination-demo-note {\\n  display: flex;\\n  align-items: flex-start;\\n  gap: 7px;\\n  font-size: 11px;\\n  color: var(--t-muted);\\n  line-height: 1.7;\\n  margin: 16px 0 0;\\n}\\n.pagination-demo-note svg {\\n  margin-top: 2px;\\n}\\n@keyframes pagination-record-in {\\n  from {\\n    opacity: 0;\\n    transform: translateX(9px);\\n  }\\n  to {\\n    opacity: 1;\\n    transform: none;\\n  }\\n}\\n.pagination-specimen[data-direction=\\\"back\\\"] .pagination-demo-list > li {\\n  animation-name: pagination-record-back;\\n}\\n@keyframes pagination-record-back {\\n  from {\\n    opacity: 0;\\n    transform: translateX(-9px);\\n  }\\n  to {\\n    opacity: 1;\\n    transform: none;\\n  }\\n}\\n@keyframes pagination-paper-in {\\n  from {\\n    opacity: 0;\\n    transform: rotate(-11deg) scale(0.92);\\n  }\\n  to {\\n    opacity: 1;\\n    transform: rotate(-4deg);\\n  }\\n}\\n@media (max-width: 480px) {\\n  .pagination-specimen {\\n    padding: 20px;\\n  }\\n  .pagination-demo-range {\\n    padding: 12px 15px;\\n  }\\n  .pagination-demo-list {\\n    padding: 8px 10px;\\n  }\\n  .pagination-demo-list > li {\\n    gap: 10px;\\n    padding: 11px 10px;\\n  }\\n  .pagination-demo-record-status {\\n    display: none;\\n  }\\n  .pagination-demo-list h5 {\\n    font-size: 12px;\\n  }\\n  .pagination-demo-footer {\\n    padding: 13px 10px 7px;\\n  }\\n}\\n@media (prefers-reduced-motion: reduce) {\\n  .pagination-demo-paper {\\n    transform: none;\\n  }\\n}\";\n\nconst titles = [\n  \"First impressions\",\n  \"A little hierarchy\",\n  \"Clearer navigation\",\n  \"The welcome screen\",\n  \"A space to choose\",\n  \"Thoughtful defaults\",\n  \"The empty state\",\n  \"Signals and status\",\n  \"The project overview\",\n  \"Writing for the interface\",\n  \"Connected settings\",\n  \"The right amount of motion\",\n  \"A quieter dashboard\",\n  \"Keeping your place\",\n  \"The invitation flow\",\n  \"A considered form\",\n  \"Before and after\",\n  \"The shortcut map\",\n  \"The workspace switcher\",\n  \"A moment of feedback\",\n  \"Reading on small screens\",\n  \"The search experience\",\n  \"A clearer comparison\",\n  \"The first five minutes\",\n  \"A little less friction\",\n  \"An honest progress bar\",\n  \"When things go wrong\",\n  \"The handoff notes\",\n  \"A meaningful metric\",\n  \"The detail view\",\n  \"Naming the next step\",\n  \"A calm notification\",\n  \"The billing overview\",\n  \"Preparing a release\",\n  \"Making space\",\n  \"One shared language\",\n  \"The final small details\",\n];\n\nconst records = titles.map((title, index) => ({\n  id: index + 1,\n  title,\n  category: [\"Interface\", \"Experience\", \"Writing\", \"Motion\"][index % 4],\n  status: [\"Draft\", \"In review\", \"Ready\"][index % 3],\n  lines: 8 + (index % 9),\n}));\n\nexport function PaginationDemo({\n  theme = \"light\",\n}: {\n  theme?: \"light\" | \"dark\";\n}) {\n  const [page, setPage] = useState(1);\n  const [direction, setDirection] = useState(\"forward\");\n  const [height, setHeight] = useState<number>();\n  const content = useRef<HTMLDivElement>(null);\n  const items = records.slice((page - 1) * 4, page * 4);\n  const start = (page - 1) * 4 + 1;\n  const end = Math.min(page * 4, records.length);\n  useLayoutEffect(() => {\n    const node = content.current;\n    if (!node) return;\n    const measure = () => {\n      const stageStyle = getComputedStyle(node.parentElement!);\n      setHeight(\n        node.offsetHeight +\n          Number.parseFloat(stageStyle.paddingTop) +\n          Number.parseFloat(stageStyle.paddingBottom),\n      );\n    };\n    measure();\n    const observer = new ResizeObserver(measure);\n    observer.observe(node);\n    return () => observer.disconnect();\n  }, []);\n  return (\n    <div className=\"pagination-specimen\" data-direction={direction}>\n      <div className=\"pagination-demo-archive\">\n        <div className=\"pagination-demo-range\" data-single={start === end}>\n          <span role=\"status\">\n            Showing {start === end ? start : `${start}–${end}`} of 37 sample\n            records\n          </span>\n        </div>\n        <div className=\"pagination-demo-footer\">\n          <TidalPagination\n            page={page}\n            pageCount={Math.ceil(records.length / 4)}\n            onPageChange={(next) => {\n              setDirection(next > page ? \"forward\" : \"back\");\n              setPage(next);\n            }}\n            label=\"Sample archive pages\"\n            theme={theme}\n          />\n        </div>\n        <div className=\"pagination-demo-stage\" style={{ height }}>\n          <div ref={content} className=\"pagination-demo-content\">\n            <ul key={page} className=\"pagination-demo-list\">\n              {items.map((record, index) => (\n                <li\n                  key={record.id}\n                  style={\n                    {\n                      \"--record-delay\": `${45 + index * 55}ms`,\n                    } as CSSProperties\n                  }\n                >\n                  <div className=\"pagination-demo-paper\" aria-hidden=\"true\">\n                    <FileText size={18} />\n                    <span>\n                      {Array.from({ length: 3 }, (_, n) => (\n                        <i\n                          key={n}\n                          style={{\n                            width: `${28 + ((record.id + n * 2) % 9) * 3}%`,\n                          }}\n                        />\n                      ))}\n                    </span>\n                  </div>\n                  <div>\n                    <span className=\"pagination-demo-record-id\">\n                      NOTE {String(record.id).padStart(2, \"0\")} ·{\" \"}\n                      {record.category.toUpperCase()}\n                    </span>\n                    <h5>{record.title}</h5>\n                    <p>{record.lines} lines · Original fictional content</p>\n                  </div>\n                  <span\n                    className=\"pagination-demo-record-status\"\n                    data-ready={record.status === \"Ready\"}\n                  >\n                    {record.status}\n                  </span>\n                </li>\n              ))}\n            </ul>\n          </div>\n        </div>\n      </div>\n      <p className=\"pagination-demo-note\">\n        Page through 37 fictional records. This preview stays in the browser.\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      <PaginationDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/pagination.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "direction",
      "type": "inferred-from-existing-demo",
      "initial": "\"forward\"",
      "setter": "setDirection",
      "proposalCanBeRejected": false
    },
    {
      "prop": "page",
      "type": "inferred-from-existing-demo",
      "initial": "1",
      "setter": "setPage",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onPageChange",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": false,
      "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": "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": []
}
