{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "document-splits-demo",
  "title": "Document Splits Demo",
  "description": "A worked example of Document Splits: Mark where one scanned batch becomes several documents. Splits are toggled between pages and the segments update as you go.",
  "registryDependencies": [
    "https://ui.tinkererslabs.com/r/document-splits.json"
  ],
  "files": [
    {
      "path": "components/demos/document-splits-demo.tsx",
      "content": "\"use client\"\n\nimport { samplePages } from \"@/components/demos/document-fixtures\"\nimport { DocumentSplits } from \"@/registry/default/document-splits/document-splits\"\n\nexport function DocumentSplitsDemo() {\n  return (\n    <DocumentSplits\n      className=\"w-full max-w-xl\"\n      pages={samplePages}\n      defaultSplitAfter={[2]}\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"
}