{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pdf-viewer-demo",
  "title": "PDF Viewer Demo",
  "description": "A worked example of PDF Viewer: Page-by-page PDF rendering on a canvas, with paging and zoom, over any loader you give it.",
  "registryDependencies": [
    "https://ui.tinkererslabs.com/r/pdf-viewer.json"
  ],
  "files": [
    {
      "path": "components/demos/pdf-viewer-demo.tsx",
      "content": "\"use client\"\n\nimport { PDF_WORKER, SAMPLE_PDF } from \"@/components/demos/document-fixtures\"\nimport { PdfViewer } from \"@/registry/default/pdf-viewer/pdf-viewer\"\n\nexport function PdfViewerDemo() {\n  return (\n    <PdfViewer\n      className=\"w-full max-w-md\"\n      source={SAMPLE_PDF}\n      workerSrc={PDF_WORKER}\n      label=\"Master Services Agreement\"\n    />\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"
}