Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-pdfjs

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-pdfjs - npm Package Compare versions

Comparing version 0.3.10 to 0.3.13

24

CHANGELOG.md

@@ -1,5 +0,21 @@

## 0.2.0
- Document isn't dynamically imported on mount anymore
# svelte-pdfjs
## 0.1.4
- Allow disabling text layer rendering (disabled by default) (d6814dc4935517946c5774f06b78f26c48ecf7e2)
## 0.3.13
### Patch Changes
- use a symbol for the context key (49689427a2c3dc619ad94ca892e17eb2dba1adf3)
- better error handling (48733c1b66ce515332e578676e89ff3a0efd2679)
- perf: speedup clearing text layer (b859f6a201ef6c8a76e6390f2367cb16465f85f7)
## 0.3.12
### Patch Changes
- 2ca6fbd: set dimensions on page canvas through attributes instead of manual dom manipulations
## 0.3.11
### Patch Changes
- adc9629: Update PDFJS to 2.13 and update dev deps

4

index.d.ts

@@ -1,5 +0,5 @@

export { default as Document } from './PDFViewer/Document.svelte';
export { default as Document, key } from './PDFViewer/Document.svelte';
export { default as Page } from './PDFViewer/Page.svelte';
export * from './utils/target_dimension.js';
export { PDFJS };
import * as PDFJS from 'pdfjs-dist';
export { PDFJS };

@@ -1,4 +0,5 @@

export { default as Document } from './PDFViewer/Document.svelte';
export { default as Document, key } from './PDFViewer/Document.svelte';
export { default as Page } from './PDFViewer/Page.svelte';
export * from './utils/target_dimension.js';
export { PDFJS };
import * as PDFJS from 'pdfjs-dist';

@@ -8,2 +9,1 @@ if (PDFJS.GlobalWorkerOptions) {

}
export { PDFJS };
{
"name": "svelte-pdfjs",
"version": "0.3.10",
"version": "0.3.13",
"devDependencies": {
"@sveltejs/adapter-netlify": "^1.0.0-next.44",
"@changesets/cli": "^2.21.1",
"@sveltejs/adapter-netlify": "^1.0.0-next.50",
"@sveltejs/kit": "next",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^5.14.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-svelte3": "^3.4.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte3": "^3.4.1",
"prettier": "^2.5.1",
"prettier-plugin-svelte": "^2.6.0",
"svelte": "^3.46.4",
"svelte-check": "^2.4.2",
"svelte-preprocess": "^4.10.2",
"svelte2tsx": "^0.4.14",
"svelte-check": "^2.4.5",
"svelte-preprocess": "^4.10.4",
"svelte2tsx": "^0.5.5",
"tslib": "^2.3.1",
"typescript": "^4.5.5"
"typescript": "^4.6.2"
},
"dependencies": {
"pdfjs-dist": "^2.12.313"
"pdfjs-dist": "^2.13.216"
},

@@ -24,0 +25,0 @@ "type": "module",

import { SvelteComponentTyped } from "svelte";
import type { DocumentInitParameters, OnProgressParameters, PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
export declare const key: unique symbol;
declare const __propDef: {
props: {
/** The URL of the file to load. */ file?: string | URL;
/**
* The URL of the file to load.
*/ file?: string | URL;
/**
* Extra options provided to PDFJS.getDocument. [See 🔗](https://github.com/mozilla/pdf.js/blob/41dab8e7b6c1e2684d4afabb8f02e40a874d8e85/src/display/api.js#L126)
* Extra options provided to PDFJS.getDocument. [See](https://github.com/mozilla/pdf.js/blob/41dab8e7b6c1e2684d4afabb8f02e40a874d8e85/src/display/api.js#L126)
*/ loadOptions?: DocumentInitParameters;

@@ -20,10 +19,6 @@ /**

events: {
/**
* Dispatched when a document is successfully loaded.
*/
/** Dispatched when a document is successfully loaded. */
loadsuccess: CustomEvent<PDFDocumentProxy>;
/**
* Dispatched when there's an error while loading the document.
*/
loaderror: CustomEvent<Error>;
/** Dispatched when there's an error while loading the document. */
loaderror: CustomEvent<any>;
};

@@ -36,3 +31,3 @@ };

* Renderless component responsible for just loading the document and providing it to
* children Page components through the context API (key: svelte_pdf_current_doc)
* children Page components through the context API.
*/

@@ -39,0 +34,0 @@ export default class Document extends SvelteComponentTyped<DocumentProps, DocumentEvents, DocumentSlots> {

import { SvelteComponentTyped } from "svelte";
import type { MultipleOf90 } from '../utils/target_dimension.js';
import type { PDFPageProxy } from 'pdfjs-dist';
import type { PageViewport } from 'pdfjs-dist/types/src/display/display_utils';
import type { CalcViewport, MultipleOf90 } from '../utils/target_dimension.js';
declare const __propDef: {

@@ -30,3 +28,3 @@ props: {

* Use this if you need something more complicated than the default based on scale.
*/ getViewport?: (page: PDFPageProxy, rotation: MultipleOf90) => PageViewport;
*/ getViewport?: CalcViewport;
};

@@ -33,0 +31,0 @@ events: {

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;
export declare type CalcViewport = (page: PDFPageProxy, rotation: MultipleOf90) => PageViewport;
/**

@@ -9,3 +10,3 @@ * A function that returns another function that returns a PageViewport with the given width.

*/
export declare function preferThisWidth(width: number): (page: PDFPageProxy, rotation?: MultipleOf90) => PageViewport;
export declare function preferThisWidth(width: number): CalcViewport;
/**

@@ -16,2 +17,2 @@ * A function that returns another function that returns a PageViewport with the given height.

*/
export declare function preferThisHeight(height: number): (page: PDFPageProxy, rotation?: MultipleOf90) => PageViewport;
export declare function preferThisHeight(height: number): CalcViewport;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc