@vue-pdf-viewer/viewer 3.6.1 → 3.6.2-rc.1

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,10 +1,12 @@
1
1
  interface OwnProps {
2
- open: boolean;
3
2
  errorMessage?: string;
4
3
  }
5
4
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<OwnProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
5
  submitPassword: (password: string) => void;
6
+ } & {
7
+ cancel: () => void;
7
8
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<OwnProps>>> & Readonly<{
9
+ onCancel?: (() => any) | undefined;
8
10
  onSubmitPassword?: ((password: string) => any) | undefined;
9
11
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
12
  export default _default;
@@ -1,24 +1,6 @@
1
1
  import type { MaybeRef } from 'vue';
2
2
  import type { PDFOptions, PDFSrc, PDFDocumentOptions } from '../utils/types';
3
3
  import { type PDFDocumentProxy, type PDFPageProxy } from 'pdfjs-dist/types/src/display/api';
4
- /**
5
- * @typedef {Object} UsePDFParameters
6
- * @property {string} password
7
- * Document password to unlock content
8
- * @property {function} onProgress
9
- * Callback to request a password if a wrong or no password was provided. The callback receives two parameters: a function that should be called with the new password, and a reason (see PasswordResponses).
10
- * @property {function} onPassword
11
- * Callback to be able to monitor the loading progress of the PDF file (necessary to implement e.g. a loading bar). The callback receives an OnProgressParameters argument. if this function is used option.password is ignored
12
- * @property {function} onError
13
- * Callback to be able to handle errors during loading
14
- * */
15
- /**
16
- *
17
- * @param {string | URL | TypedArray | PDFDataRangeTransport | DocumentInitParameters} src
18
- * Can be a URL where a PDF file is located, a typed array (Uint8Array) already populated with data, or a parameter object.
19
- * @param {UsePDFParameters} options
20
- * UsePDF object parameters
21
- */
22
4
  declare function usePdf(src: MaybeRef<PDFSrc>, options?: PDFOptions, workerUrl?: string, documentOptions?: PDFDocumentOptions): {
23
5
  pdfDocLoadingTask: import("vue").ShallowRef<import("pdfjs-dist/types/src/display/api").PDFDocumentLoadingTask | undefined, import("pdfjs-dist/types/src/display/api").PDFDocumentLoadingTask | undefined>;
24
6
  getPage: (doc: PDFDocumentProxy, pageIndex: number) => Promise<PDFPageProxy>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/viewer",
3
3
  "private": false,
4
- "version": "3.6.1",
4
+ "version": "3.6.2-rc.1",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
7
7
  "module": "./dist/index.js",