fix: pdf viewer and embeds

This commit is contained in:
David Nguyen
2025-02-20 15:06:36 +11:00
parent 250381fec8
commit 50a41d0799
20 changed files with 572 additions and 665 deletions

View File

@ -23,7 +23,10 @@ export type LoadedPDFDocument = PDFDocumentProxy;
/**
* This imports the worker from the `pdfjs-dist` package.
*/
pdfjs.GlobalWorkerOptions.workerSrc = `/pdf.worker.min.js`;
pdfjs.GlobalWorkerOptions.workerSrc = new URL(
'pdfjs-dist/build/pdf.worker.min.js',
import.meta.url,
).toString();
export type OnPDFViewerPageClick = (_event: {
pageNumber: number;