@react-pdf-viewer/core
Advanced tools
Comparing version 3.9.0 to 3.10.0
@@ -25,3 +25,13 @@ /** | ||
export interface PageLayout { | ||
buildPageStyles?: ({ numPages, pageIndex }: { numPages: number; pageIndex: number }) => React.CSSProperties; | ||
buildPageStyles?: ({ | ||
numPages, | ||
pageIndex, | ||
scrollMode, | ||
viewMode, | ||
}: { | ||
numPages: number; | ||
pageIndex: number; | ||
scrollMode: ScrollMode; | ||
viewMode: ViewMode; | ||
}) => React.CSSProperties; | ||
tranformSize?: ({ numPages, pageIndex, size }: { numPages: number; pageIndex: number; size: Rect }) => Rect; | ||
@@ -56,2 +66,4 @@ } | ||
): void; | ||
jumpToNextPage(): void; | ||
jumpToPreviousPage(): void; | ||
jumpToPage(pageIndex: number): void; | ||
@@ -63,2 +75,3 @@ openFile(file: File): void; | ||
switchScrollMode(scrollMode: ScrollMode): void; | ||
switchViewMode(viewMode: ViewMode): void; | ||
zoom(scale: number | SpecialZoomLevel): void; | ||
@@ -140,2 +153,4 @@ } | ||
rotatePage(pageIndex: number, direction: RotateDirection): void; | ||
switchScrollMode(scrollMode: ScrollMode): void; | ||
switchViewMode(viewMode: ViewMode): void; | ||
zoom(level: number | SpecialZoomLevel): void; | ||
@@ -171,2 +186,4 @@ } | ||
scrollMode: ScrollMode; | ||
// The current view mode | ||
viewMode: ViewMode; | ||
} | ||
@@ -234,2 +251,3 @@ export interface VisibilityChanged { | ||
export enum ScrollMode { | ||
Page = 'Page', | ||
Horizontal = 'Horizontal', | ||
@@ -246,2 +264,8 @@ Vertical = 'Vertical', | ||
export enum ViewMode { | ||
DualPage = 'DualPage', | ||
DualPageWithCover = 'DualPageWithCover', | ||
SinglePage = 'SinglePage', | ||
} | ||
export enum ToggleStatus { | ||
@@ -511,2 +535,3 @@ Close = 'Close', | ||
transformGetDocumentParams?(options: PdfJs.GetDocumentParams): PdfJs.GetDocumentParams; | ||
viewMode?: ViewMode; | ||
// Indicate the cross-site requests should be made with credentials such as cookie and authorization headers. | ||
@@ -513,0 +538,0 @@ // The default value is `false` |
{ | ||
"name": "@react-pdf-viewer/core", | ||
"version": "3.9.0", | ||
"version": "3.10.0", | ||
"description": "A React component to view a PDF document", | ||
@@ -50,3 +50,3 @@ "license": "https://react-pdf-viewer.dev/license", | ||
}, | ||
"gitHead": "cd870dc8f610be09a7c53883f2d4c4421d3f441e" | ||
"gitHead": "bf5c12d9dcac3215cee0f6b9a214dcdf3a67d81d" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
311538
5047