Skip to content

Commit

Permalink
feat: upgrade to latest react pdf (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
thucpn authored Jul 24, 2024
1 parent dd3abe2 commit eee7d8c
Show file tree
Hide file tree
Showing 3 changed files with 329 additions and 50 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/pdf-viewer",
"version": "1.1.1",
"version": "1.1.2",
"description": "React PDF viewer for LLM applications",
"type": "module",
"license": "MIT",
Expand Down Expand Up @@ -40,7 +40,7 @@
"lodash": "^4.17.21",
"lodash.debounce": "^4.0.8",
"react-intersection-observer": "9.5.1",
"react-pdf": "6.2.2",
"react-pdf": "^9.1.0",
"react-window": "1.8.9"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/view/VirtualizedPdf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type { PdfDocument } from '../types/document.js';
const pdfjsOptions = pdfjs.GlobalWorkerOptions;
const pdfjsVersion = pdfjs.version;
pdfjsOptions.workerSrc =
'//unpkg.com/pdfjs-dist@' + String(pdfjsVersion) + '/legacy/build/pdf.worker.min.js';
'//unpkg.com/pdfjs-dist@' + String(pdfjsVersion) + '/legacy/build/pdf.worker.min.mjs';

interface PageType {
getViewport: (arg0: { scale: number }) => { width: number };
Expand Down
Loading

0 comments on commit eee7d8c

Please sign in to comment.