@tempots/beatui 0.61.13 → 0.61.14
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.
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { Value, type TNode, SplitValue } from '@tempots/dom';
|
|
2
|
+
import type { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
|
|
3
|
+
export type PDFDocument = PDFDocumentProxy;
|
|
4
|
+
interface LoadCompleteOptions {
|
|
5
|
+
pdfDoc: PDFDocument;
|
|
6
|
+
}
|
|
2
7
|
export interface PdfPageViewerOptions {
|
|
3
8
|
/** PDF source: URL string, Uint8Array, or ArrayBuffer */
|
|
4
9
|
source: SplitValue<string | Uint8Array | ArrayBuffer>;
|
|
@@ -48,9 +53,7 @@ export interface PdfPageViewerOptions {
|
|
|
48
53
|
/**
|
|
49
54
|
* Callback when PDF loads successfully
|
|
50
55
|
*/
|
|
51
|
-
onLoadComplete?: (info:
|
|
52
|
-
numPages: number;
|
|
53
|
-
}) => void;
|
|
56
|
+
onLoadComplete?: (info: LoadCompleteOptions) => void;
|
|
54
57
|
}
|
|
55
58
|
/**
|
|
56
59
|
* PdfPageViewer component that displays a single PDF page as a canvas element.
|
|
@@ -62,3 +65,4 @@ export interface PdfPageViewerOptions {
|
|
|
62
65
|
* PdfPageViewer({ source: pdfUrl, page: 1 }, attr.class('my-canvas'))
|
|
63
66
|
*/
|
|
64
67
|
export declare function PdfPageViewer({ source, page, fit, scale, rotation, quality, renderTextLayer, renderAnnotationLayer, onPageChange, onLoadComplete, }: PdfPageViewerOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
68
|
+
export {};
|