@kopjra/pdf-sentinel 1.2.1 → 1.3.0

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,5 +1,5 @@
1
1
  import { PluginBatchRegistrations } from '@embedpdf/core';
2
- import { ExportCapability, ScrollCapability, HistoryCapability, ZoomCapability } from '../framework/index.ts';
2
+ import { ExportCapability, ScrollCapability, ViewportCapability, HistoryCapability, ZoomCapability } from '../framework/index.ts';
3
3
  import { UsePdfFormsResult } from '../plugins/forms/hooks/usePdfForms.ts';
4
4
  import { AnnotationUsage, FormUsage, PlainUsage } from '../hooks/usePdfSentinel.tsx';
5
5
  import { AnnotationsApi } from '../plugins/annotations/AnnotationProvider.tsx';
@@ -9,6 +9,8 @@ interface PdfSentinelProps {
9
9
  setZoomCapability: (capability: ZoomCapability | null) => void;
10
10
  setExportCapability: (capability: ExportCapability | null) => void;
11
11
  setScrollCapability: (scrollCapability: ScrollCapability | null) => void;
12
+ setViewportCapability: (viewportCapability: ViewportCapability | null) => void;
13
+ setDocumentScale: (scale: number) => void;
12
14
  setCurrentPage: (pageNumber: number | null) => void;
13
15
  setTotalPages: (totalPages: number | null) => void;
14
16
  setLoadingPdf: (loading: boolean) => void;
@@ -64,6 +64,11 @@ export declare function usePdfSentinel({ pdf, name, hideToolbar, onDocumentLoade
64
64
  zoomOut: () => void;
65
65
  resetZoom: () => void;
66
66
  scrollToPage: (pageNumber: number) => void;
67
+ scrollToPosition: (position: {
68
+ x: number;
69
+ y: number;
70
+ behavior?: ScrollBehavior;
71
+ }) => void;
67
72
  download: () => void;
68
73
  };
69
74
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kopjra/pdf-sentinel",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "A React and Preact component library for embedding and interacting with PDF documents using EmbedPDF.",
5
5
  "keywords": [
6
6
  "react",