{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "page-navigator-demo",
  "title": "Page Navigator Demo",
  "description": "A worked example of Page Navigator: A rail of page thumbnails for moving through a long document, with arrow-key navigation and a clear active page.",
  "registryDependencies": [
    "https://ui.tinkererslabs.com/r/page-navigator.json"
  ],
  "files": [
    {
      "path": "components/demos/page-navigator-demo.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { samplePages } from \"@/components/demos/document-fixtures\"\nimport { PageNavigator } from \"@/registry/default/page-navigator/page-navigator\"\n\nexport function PageNavigatorDemo() {\n  const [page, setPage] = React.useState(2)\n\n  return (\n    <div className=\"grid w-full max-w-md gap-3\">\n      <PageNavigator\n        className=\"w-full\"\n        orientation=\"horizontal\"\n        pages={samplePages}\n        activePage={page}\n        onActivePageChange={setPage}\n      />\n      <p className=\"text-muted-foreground text-center text-xs\">\n        Showing page {page} of {samplePages.length}\n      </p>\n    </div>\n  )\n}\n",
      "type": "registry:example"
    },
    {
      "path": "components/demos/document-fixtures.ts",
      "content": "/** Generated from public/demo/documents/master-services-agreement.pdf. */\nexport const SAMPLE_PDF = \"/demo/documents/master-services-agreement.pdf\"\nexport const SAMPLE_DOCX = \"/demo/documents/master-services-agreement.docx\"\nexport const SAMPLE_CSV = \"/demo/documents/invoices.csv\"\nexport const PDF_WORKER = \"/demo/pdf.worker.min.mjs\"\n\nexport const PAGE_COUNT = 3\n\nexport const samplePages = Array.from({ length: PAGE_COUNT }, (_, index) => ({\n  number: index + 1,\n  src: `/demo/documents/page-${index + 1}.png`,\n}))\n\nexport const pageImage = samplePages[0]!.src\n\n/**\n * Read out of the PDF text layer and checked by drawing them back onto the\n * exported page, so every region sits on the value it names.\n */\nexport const invoiceBoxes = [\n  {\n    id: \"customer\",\n    label: \"Customer\",\n    x: 0.2979,\n    y: 0.1893,\n    width: 0.1397,\n    height: 0.022,\n  },\n  {\n    id: \"agreement-no\",\n    label: \"Agreement number\",\n    x: 0.2979,\n    y: 0.2484,\n    width: 0.125,\n    height: 0.022,\n    tone: \"accent\" as const,\n  },\n  {\n    id: \"net30\",\n    label: \"Payment window\",\n    x: 0.3247,\n    y: 0.6301,\n    width: 0.0553,\n    height: 0.0214,\n  },\n  {\n    id: \"late-fee\",\n    label: \"Late payment\",\n    x: 0.3247,\n    y: 0.6876,\n    width: 0.1011,\n    height: 0.0214,\n    tone: \"warning\" as const,\n  },\n]\n\nexport const customerRegion = {\n  x: 0.2979,\n  y: 0.1893,\n  width: 0.1397,\n  height: 0.022,\n}\nexport const agreementRegion = {\n  x: 0.2979,\n  y: 0.2484,\n  width: 0.125,\n  height: 0.022,\n}\nexport const paymentRegion = {\n  x: 0.3247,\n  y: 0.6301,\n  width: 0.0553,\n  height: 0.0214,\n}\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}