svelte-pdfjs
Advanced tools
Comparing version 0.3.0-alpha.1 to 0.3.0-alpha.2
{ | ||
"name": "svelte-pdfjs", | ||
"version": "0.3.0-alpha.1", | ||
"version": "0.3.0-alpha.2", | ||
"devDependencies": { | ||
@@ -5,0 +5,0 @@ "@sveltejs/adapter-netlify": "^1.0.0-next.37", |
import type { PDFPageProxy } from 'pdfjs-dist'; | ||
import type { PageViewport } from 'pdfjs-dist/types/src/display/display_utils'; | ||
export declare type MultipleOf90 = 0 | 90 | 180 | 270; | ||
/** | ||
* A function that returns another function that returns a PageViewport with the given width. | ||
* | ||
* @param width - The width that you want the page to be. | ||
*/ | ||
export declare function preferThisWidth(width: number): (page: PDFPageProxy, rotation?: MultipleOf90) => PageViewport; | ||
/** | ||
* A function that returns another function that returns a PageViewport with the given height. | ||
* | ||
* @param height - The height that you want the page to be. | ||
*/ | ||
export declare function preferThisHeight(height: number): (page: PDFPageProxy, rotation?: MultipleOf90) => PageViewport; |
@@ -0,1 +1,6 @@ | ||
/** | ||
* A function that returns another function that returns a PageViewport with the given width. | ||
* | ||
* @param width - The width that you want the page to be. | ||
*/ | ||
export function preferThisWidth(width) { | ||
@@ -7,2 +12,7 @@ return (page, rotation = 0) => { | ||
} | ||
/** | ||
* A function that returns another function that returns a PageViewport with the given height. | ||
* | ||
* @param height - The height that you want the page to be. | ||
*/ | ||
export function preferThisHeight(height) { | ||
@@ -9,0 +19,0 @@ return (page, rotation = 0) => { |
18340
209