react-3d-flipbook 1.1.5 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +10828 -6118
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +10828 -6118
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -0
- package/dist/utils/pdfUtils.d.ts +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ import { Flipbook, pdfToFlipbookPages, setPdfWorkerSrc } from 'react-3d-flipbook
|
|
|
79
79
|
import 'react-3d-flipbook/dist/styles.css';
|
|
80
80
|
|
|
81
81
|
// Set up PDF.js worker (required once)
|
|
82
|
-
setPdfWorkerSrc('https://unpkg.com/pdfjs-dist
|
|
82
|
+
setPdfWorkerSrc('https://unpkg.com/pdfjs-dist/build/pdf.worker.mjs');
|
|
83
83
|
|
|
84
84
|
function PdfFlipbook() {
|
|
85
85
|
const [pages, setPages] = useState([]);
|
|
@@ -124,7 +124,7 @@ import {
|
|
|
124
124
|
setPdfWorkerSrc
|
|
125
125
|
} from 'react-3d-flipbook';
|
|
126
126
|
|
|
127
|
-
setPdfWorkerSrc('https://unpkg.com/pdfjs-dist
|
|
127
|
+
setPdfWorkerSrc('https://unpkg.com/pdfjs-dist/build/pdf.worker.mjs');
|
|
128
128
|
|
|
129
129
|
function AutoSizedPdfFlipbook() {
|
|
130
130
|
const [pages, setPages] = useState([]);
|
|
@@ -171,7 +171,7 @@ Set the PDF.js worker source URL. Must be called before using any PDF functions.
|
|
|
171
171
|
import { setPdfWorkerSrc } from 'react-3d-flipbook';
|
|
172
172
|
|
|
173
173
|
// Using CDN
|
|
174
|
-
setPdfWorkerSrc('https://unpkg.com/pdfjs-dist
|
|
174
|
+
setPdfWorkerSrc('https://unpkg.com/pdfjs-dist/build/pdf.worker.mjs');
|
|
175
175
|
|
|
176
176
|
// Using local file (Vite)
|
|
177
177
|
import workerSrc from 'pdfjs-dist/build/pdf.worker.mjs?url';
|
|
@@ -1002,4 +1002,4 @@ MIT License
|
|
|
1002
1002
|
- PDF support via PDF.js
|
|
1003
1003
|
- Single-page and two-page spread modes
|
|
1004
1004
|
- Thumbnails, TOC, Search, and Bookmarks panels
|
|
1005
|
-
- Multiple themes and full customization
|
|
1005
|
+
- Multiple themes and full customization
|
package/dist/index.d.ts
CHANGED
|
@@ -905,7 +905,7 @@ declare function calculateFlipbookSizeFromPages(pages: FlipbookPage[], options?:
|
|
|
905
905
|
* setPdfWorkerSrc(workerSrc);
|
|
906
906
|
*
|
|
907
907
|
* // For CDN
|
|
908
|
-
* setPdfWorkerSrc('https://unpkg.com/pdfjs-dist
|
|
908
|
+
* setPdfWorkerSrc('https://unpkg.com/pdfjs-dist/build/pdf.worker.mjs');
|
|
909
909
|
*/
|
|
910
910
|
declare function setPdfWorkerSrc(workerSrc: string): void;
|
|
911
911
|
interface PdfToImagesOptions {
|
|
@@ -944,7 +944,7 @@ interface PdfPageInfo {
|
|
|
944
944
|
* import { pdfToFlipbookPages, setPdfWorkerSrc } from 'react-3d-flipbook/utils';
|
|
945
945
|
*
|
|
946
946
|
* // Set up worker first
|
|
947
|
-
* setPdfWorkerSrc('https://unpkg.com/pdfjs-dist
|
|
947
|
+
* setPdfWorkerSrc('https://unpkg.com/pdfjs-dist/build/pdf.worker.mjs');
|
|
948
948
|
*
|
|
949
949
|
* // Convert PDF to flipbook pages
|
|
950
950
|
* const pages = await pdfToFlipbookPages('https://example.com/document.pdf', {
|