@vue-pdf-viewer/viewer 1.6.0-beta.1 → 1.6.0-beta.2

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,7 +1,9 @@
1
1
  import type { PageViewport } from 'pdfjs-dist';
2
+ import type { TextContent } from 'pdfjs-dist/types/src/display/text_layer';
2
3
  interface OwnProps {
3
4
  pageIndex: number;
4
5
  viewport: PageViewport;
6
+ textContent: TextContent;
5
7
  searchKeyword?: string;
6
8
  }
7
9
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<OwnProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<OwnProps>>>, {}, {}>;
@@ -1,6 +1,6 @@
1
- import type { CanvasLoadedCallback, AnnotationEventPayload, HighlightEventPayload, HighlightOptions, Match, TextLayerLoadedEventPayload, VisibilityInfo } from '../utils/types';
2
1
  import type { PageViewport, PDFPageProxy } from 'pdfjs-dist/types/web/interfaces';
3
2
  import type { PDFDocumentProxy } from 'pdfjs-dist';
3
+ import type { CanvasLoadedCallback, AnnotationEventPayload, HighlightEventPayload, HighlightOptions, Match, TextLayerLoadedEventPayload, VisibilityInfo } from '../utils/types';
4
4
  interface BaseProps {
5
5
  pageIndex: number;
6
6
  page: PDFPageProxy;
@@ -81,9 +81,36 @@ declare const _default: {
81
81
  onError?: ((error: Error) => void) | undefined;
82
82
  onComplete?: (() => void) | undefined;
83
83
  } | undefined>;
84
- searchControl: import("vue").ComputedRef<import("@/utils/types").SearchControl | undefined>;
85
- pageControl: import("vue").ComputedRef<import("@/utils/types").PageControl | undefined>;
86
- rotateControl: import("@/utils/types").RotateControl;
84
+ pageControl: import("vue").ComputedRef<{
85
+ goToPage: (pageNumber: number) => void;
86
+ totalPages: number;
87
+ currentPage: number;
88
+ } | undefined>;
89
+ searchControl: import("vue").ComputedRef<{
90
+ searchMatches: {
91
+ totalMatches: number;
92
+ matches: {
93
+ index: number;
94
+ page: number;
95
+ }[];
96
+ } | {
97
+ totalMatches: number;
98
+ matches: {
99
+ index: number;
100
+ page: number;
101
+ }[];
102
+ };
103
+ searching: import("vue").Ref<boolean, boolean>;
104
+ goToMatch: (index: number) => void;
105
+ search: (value: string) => void;
106
+ nextSearchMatch: () => void;
107
+ prevSearchMatch: () => void;
108
+ } | undefined>;
109
+ rotateControl: {
110
+ rotateClockwise: () => void;
111
+ rotateCounterclockwise: () => void;
112
+ currentRotation: number;
113
+ };
87
114
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
88
115
  annotation: (payload: AnnotationEventPayload) => void;
89
116
  } & {
@@ -271,9 +298,36 @@ declare const _default: {
271
298
  onError?: ((error: Error) => void) | undefined;
272
299
  onComplete?: (() => void) | undefined;
273
300
  } | undefined>;
274
- searchControl: import("vue").ComputedRef<import("@/utils/types").SearchControl | undefined>;
275
- pageControl: import("vue").ComputedRef<import("@/utils/types").PageControl | undefined>;
276
- rotateControl: import("@/utils/types").RotateControl;
301
+ pageControl: import("vue").ComputedRef<{
302
+ goToPage: (pageNumber: number) => void;
303
+ totalPages: number;
304
+ currentPage: number;
305
+ } | undefined>;
306
+ searchControl: import("vue").ComputedRef<{
307
+ searchMatches: {
308
+ totalMatches: number;
309
+ matches: {
310
+ index: number;
311
+ page: number;
312
+ }[];
313
+ } | {
314
+ totalMatches: number;
315
+ matches: {
316
+ index: number;
317
+ page: number;
318
+ }[];
319
+ };
320
+ searching: import("vue").Ref<boolean, boolean>;
321
+ goToMatch: (index: number) => void;
322
+ search: (value: string) => void;
323
+ nextSearchMatch: () => void;
324
+ prevSearchMatch: () => void;
325
+ } | undefined>;
326
+ rotateControl: {
327
+ rotateClockwise: () => void;
328
+ rotateCounterclockwise: () => void;
329
+ currentRotation: number;
330
+ };
277
331
  }, {}, {}, {}, {
278
332
  readonly initialViewMode: ViewMode;
279
333
  readonly initialScrollMode: ScrollMode;
@@ -371,9 +425,36 @@ declare const _default: {
371
425
  onError?: ((error: Error) => void) | undefined;
372
426
  onComplete?: (() => void) | undefined;
373
427
  } | undefined>;
374
- searchControl: import("vue").ComputedRef<import("@/utils/types").SearchControl | undefined>;
375
- pageControl: import("vue").ComputedRef<import("@/utils/types").PageControl | undefined>;
376
- rotateControl: import("@/utils/types").RotateControl;
428
+ pageControl: import("vue").ComputedRef<{
429
+ goToPage: (pageNumber: number) => void;
430
+ totalPages: number;
431
+ currentPage: number;
432
+ } | undefined>;
433
+ searchControl: import("vue").ComputedRef<{
434
+ searchMatches: {
435
+ totalMatches: number;
436
+ matches: {
437
+ index: number;
438
+ page: number;
439
+ }[];
440
+ } | {
441
+ totalMatches: number;
442
+ matches: {
443
+ index: number;
444
+ page: number;
445
+ }[];
446
+ };
447
+ searching: import("vue").Ref<boolean, boolean>;
448
+ goToMatch: (index: number) => void;
449
+ search: (value: string) => void;
450
+ nextSearchMatch: () => void;
451
+ prevSearchMatch: () => void;
452
+ } | undefined>;
453
+ rotateControl: {
454
+ rotateClockwise: () => void;
455
+ rotateCounterclockwise: () => void;
456
+ currentRotation: number;
457
+ };
377
458
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
378
459
  annotation: (payload: AnnotationEventPayload) => void;
379
460
  } & {
@@ -595,9 +595,9 @@ export interface RotateControl {
595
595
  currentRotation: number;
596
596
  }
597
597
  export interface VPVInstance {
598
- printControl: ComputedRef<Reactive<PrintControl> | undefined>;
599
- searchControl: ComputedRef<SearchControl | undefined>;
600
- pageControl: ComputedRef<PageControl | undefined>;
598
+ printControl: Reactive<PrintControl> | undefined;
599
+ searchControl: SearchControl | undefined;
600
+ pageControl: PageControl | undefined;
601
601
  rotateControl: RotateControl;
602
602
  }
603
603
  export interface PageControl {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/viewer",
3
3
  "private": false,
4
- "version": "1.6.0-beta.1",
4
+ "version": "1.6.0-beta.2",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
7
7
  "module": "./dist/index.js",