@react-pdf-kit/viewer 0.0.0-experimental.4 → 0.0.0-experimental.5
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.
- package/dist/{Combination-479e39c6.js → Combination-136ff99c.js} +184 -187
- package/dist/RPLayout.module-b4b23e29.js +14 -0
- package/dist/assets/style.css +1 -1
- package/dist/assets/style.js +15 -15
- package/dist/components/RPConfig.js +16 -6
- package/dist/components/RPController.js +21 -26
- package/dist/components/RPDropFileZone.js +35 -29
- package/dist/components/RPPages.js +351 -360
- package/dist/components/RPProvider.js +20 -24
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/LayoutWrapper.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +12 -13
- package/dist/components/layout/RPLayout.js +28 -28
- package/dist/components/layout/WrapperLayout.js +10 -11
- package/dist/components/layout/sidebar/RPSidebar.js +7 -8
- package/dist/components/layout/sidebar/Thumbnail.js +3 -4
- package/dist/components/layout/sidebar/Thumbnails.js +3 -4
- package/dist/components/layout/toolbar/DarkModeTool.js +4 -4
- package/dist/components/layout/toolbar/DocumentDialog.js +8 -9
- package/dist/components/layout/toolbar/DocumentProperties.js +6 -6
- package/dist/components/layout/toolbar/FileDownloadTool.js +9 -10
- package/dist/components/layout/toolbar/FileUploadTool.js +9 -10
- package/dist/components/layout/toolbar/FullScreenTool.js +6 -6
- package/dist/components/layout/toolbar/MenuItem.js +6 -6
- package/dist/components/layout/toolbar/MenuSeparator.js +6 -6
- package/dist/components/layout/toolbar/MostPageTool.js +9 -10
- package/dist/components/layout/toolbar/OtherTool.js +9 -10
- package/dist/components/layout/toolbar/Paginate.js +7 -8
- package/dist/components/layout/toolbar/PrintTool.js +9 -10
- package/dist/components/layout/toolbar/RPMenuItem.js +6 -6
- package/dist/components/layout/toolbar/RPMoreOptions.js +9 -10
- package/dist/components/layout/toolbar/RPToolbar.js +9 -12
- package/dist/components/layout/toolbar/RPToolbarEnd.js +9 -10
- package/dist/components/layout/toolbar/RotateTool.js +9 -10
- package/dist/components/layout/toolbar/ScrollModeTool.js +6 -6
- package/dist/components/layout/toolbar/SearchCloseButton.js +4 -4
- package/dist/components/layout/toolbar/SearchResultNavigator.js +7 -10
- package/dist/components/layout/toolbar/SearchTool.js +11 -14
- package/dist/components/layout/toolbar/SelectionModeTool.js +6 -6
- package/dist/components/layout/toolbar/ThumbnailTool.js +7 -8
- package/dist/components/layout/toolbar/ToolbarCustom.js +3 -4
- package/dist/components/layout/toolbar/ToolbarDefault.js +9 -12
- package/dist/components/layout/toolbar/ToolbarLayout.js +9 -12
- package/dist/components/layout/toolbar/ViewModeTool.js +6 -6
- package/dist/components/layout/toolbar/ZoomTool.js +9 -10
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +8 -9
- package/dist/components/layout/toolbar/tools/DualPageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +13 -15
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +7 -8
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +7 -8
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +13 -15
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +4 -4
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +4 -4
- package/dist/components/layout/toolbar/tools/InputPageTool.js +7 -8
- package/dist/components/layout/toolbar/tools/LastPageTool.js +13 -15
- package/dist/components/layout/toolbar/tools/NextPageTool.js +7 -8
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +4 -4
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +7 -8
- package/dist/components/layout/toolbar/tools/PrintTool.js +7 -8
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +7 -8
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +7 -8
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +4 -4
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +4 -4
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +7 -8
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +4 -4
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +7 -8
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +19 -20
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +7 -8
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +9 -12
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +7 -8
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +6 -6
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +9 -10
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +9 -10
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +6 -6
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +9 -10
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +9 -10
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +9 -10
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +6 -6
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +6 -6
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +6 -6
- package/dist/components/page/AnnotationLayer.js +65 -66
- package/dist/components/page/CanvasLayer.js +3 -4
- package/dist/components/page/CustomElement.js +3 -4
- package/dist/components/page/DualPage.js +5 -11
- package/dist/components/page/DualPageWithCover.js +5 -11
- package/dist/components/page/RPPage.js +6 -12
- package/dist/components/page/SinglePage.js +5 -11
- package/dist/components/page/TextHighlightLayer.js +178 -86
- package/dist/components/page/TextLayer.js +170 -125
- package/dist/components/ui/Checkbox.js +2 -2
- package/dist/components/ui/DropDown.js +6 -6
- package/dist/components/ui/LoadingIndicator.js +7 -8
- package/dist/components/ui/RPTooltip.js +411 -197
- package/dist/contexts/ConfigContext.js +5 -4
- package/dist/contexts/DimensionPagesContext.js +5 -6
- package/dist/contexts/DropFileZoneContext.js +4 -5
- package/dist/contexts/ElementPageContext.js +5 -6
- package/dist/contexts/FileInputContext.js +5 -6
- package/dist/contexts/HighlightContext.js +7 -10
- package/dist/contexts/LayoutDropFileZoneContext.js +11 -0
- package/dist/contexts/PagesRotateContext.js +5 -6
- package/dist/contexts/PaginationContext.js +5 -6
- package/dist/contexts/PrintContext.js +16 -17
- package/dist/contexts/RPDocumentContext.js +13 -14
- package/dist/contexts/RenderQueueProvider.js +5 -6
- package/dist/contexts/RotationContext.js +8 -9
- package/dist/contexts/SearchContext.js +5 -8
- package/dist/contexts/ThumbnailsContext.js +4 -5
- package/dist/contexts/ZoomContext.js +5 -6
- package/dist/floating-ui.react-dom-5ec29bd6.js +1327 -0
- package/dist/index-61f59539.js +1198 -0
- package/dist/{index-ada501c4.js → index-655864a7.js} +1 -1
- package/dist/{index-113053cf.js → index-c0faa594.js} +2 -2
- package/dist/{index-23911b43.js → index-e3ee9457.js} +6 -6
- package/dist/main.js +15 -15
- package/dist/polyfills.js +8055 -0
- package/dist/types/components/layout/sidebar/Thumbnail.d.ts +2 -2
- package/dist/types/contexts/LayoutDropFileZoneContext.d.ts +9 -0
- package/dist/types/contexts/RPDocumentContext.d.ts +1 -1
- package/dist/types/contexts/RenderQueueProvider.d.ts +1 -1
- package/dist/types/contexts/RenderedPagesCache.d.ts +2 -2
- package/dist/types/main.d.ts +1 -1
- package/dist/types/utils/annotations.d.ts +2 -2
- package/dist/types/utils/getThumbnailViewport.d.ts +2 -2
- package/dist/types/utils/highlight.d.ts +5 -5
- package/dist/types/utils/hooks/useDropFileZone.d.ts +5 -0
- package/dist/types/utils/hooks/useFlickerSelectText.d.ts +1 -0
- package/dist/types/utils/hooks/useHighlight.d.ts +1 -1
- package/dist/types/utils/hooks/useLoadPdf.d.ts +2 -2
- package/dist/types/utils/hooks/useLoadWorker.d.ts +1 -5
- package/dist/types/utils/hooks/usePdfProperties.d.ts +1 -1
- package/dist/types/utils/hooks/useTextSelection.d.ts +3 -12
- package/dist/types/utils/link_service.d.ts +3 -2
- package/dist/types/utils/renderPage.d.ts +2 -2
- package/dist/types/utils/types.d.ts +8 -5
- package/dist/utils/highlight.js +158 -184
- package/dist/utils/hooks/useCopyText.js +22 -60
- package/dist/utils/hooks/useDropFileZone.js +12 -0
- package/dist/utils/hooks/useFileDownload.js +5 -6
- package/dist/utils/hooks/useFlickerSelectText.js +25 -0
- package/dist/utils/hooks/useHighlight.js +33 -35
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLoadPdf.js +70 -95
- package/dist/utils/hooks/useLoadWorker.js +14 -4
- package/dist/utils/hooks/usePageRotateContext.js +7 -8
- package/dist/utils/hooks/usePaginate.js +3 -4
- package/dist/utils/hooks/usePinch.js +10 -11
- package/dist/utils/hooks/usePresentPage.js +3 -4
- package/dist/utils/hooks/usePrint.js +55 -54
- package/dist/utils/hooks/useRotate.js +3 -4
- package/dist/utils/hooks/useScrollToPage.js +3 -4
- package/dist/utils/hooks/useSearch.js +15 -18
- package/dist/utils/hooks/useTextSelection.js +73 -2
- package/dist/utils/hooks/useThumbnail.js +17 -18
- package/dist/utils/hooks/useVirtualReactWindow.js +3 -4
- package/dist/utils/link_service.js +19 -18
- package/dist/utils/renderPage.js +1 -1
- package/package.json +13 -4
- package/dist/RPLayout.module-7766e0b4.js +0 -14
- package/dist/contexts/TextSelectionContext.js +0 -191
- package/dist/index-535ad364.js +0 -983
- package/dist/index-d0f0aa9a.js +0 -1542
- package/dist/types/contexts/TextSelectionContext.d.ts +0 -14
- package/dist/types/utils/geometryCache.d.ts +0 -15
- package/dist/types/utils/glyphHitTest.d.ts +0 -12
- package/dist/types/utils/selectionUtils.d.ts +0 -30
- package/dist/utils/geometryCache.js +0 -32
- package/dist/utils/glyphHitTest.js +0 -29
- package/dist/utils/selectionUtils.js +0 -96
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PageViewport } from 'pdfjs-dist/types/web/interfaces';
|
|
3
3
|
interface Props {
|
|
4
4
|
pageNumber: number;
|
|
5
5
|
loading: boolean;
|
|
6
6
|
isFocused: boolean;
|
|
7
|
-
viewport:
|
|
7
|
+
viewport: PageViewport;
|
|
8
8
|
defaultRotation: number;
|
|
9
9
|
}
|
|
10
10
|
export declare const Thumbnail: FC<Props>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
interface LayoutDropFileZoneProviderProps extends PropsWithChildren {
|
|
3
|
+
value: LayoutDropFileZoneValue;
|
|
4
|
+
}
|
|
5
|
+
type LayoutDropFileZoneValue = boolean | React.ReactNode | React.ComponentType;
|
|
6
|
+
export declare const LayoutDropFileZoneContext: import('react').Context<LayoutDropFileZoneValue>;
|
|
7
|
+
export declare const useLayoutDropFileZoneContext: () => LayoutDropFileZoneValue;
|
|
8
|
+
export declare const LayoutDropFileZoneProvider: FC<LayoutDropFileZoneProviderProps>;
|
|
9
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { DocumentContextType, RPSrc, CharacterMap, LoadPDFOptions } from '../utils/types';
|
|
3
|
-
import { PDFDocumentProxy } from '
|
|
3
|
+
import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
|
|
4
4
|
declare const DocumentContext: React.Context<DocumentContextType>;
|
|
5
5
|
interface Props extends PropsWithChildren, LoadPDFOptions {
|
|
6
6
|
src?: RPSrc;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Queue } from '../utils/Queue';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
import { PDFPageProxy } from '
|
|
3
|
+
import { PDFPageProxy } from 'pdfjs-dist';
|
|
4
4
|
import { RenderOptions } from '../utils/types';
|
|
5
5
|
interface RenderData {
|
|
6
6
|
page: PDFPageProxy;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PageViewport } from 'pdfjs-dist';
|
|
2
2
|
import { FC, PropsWithChildren } from 'react';
|
|
3
3
|
interface CacheContext {
|
|
4
|
-
viewports: Map<number,
|
|
4
|
+
viewports: Map<number, PageViewport>;
|
|
5
5
|
pages: Map<number, any>;
|
|
6
6
|
}
|
|
7
7
|
export declare const RenderedPagesCacheContext: import('react').Context<CacheContext>;
|
package/dist/types/main.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export { useHighlightContext } from './contexts/HighlightContext';
|
|
|
21
21
|
export { useFullScreenContext } from './contexts/FullScreenContext';
|
|
22
22
|
export { usePageRotateContext } from './utils/hooks/usePageRotateContext';
|
|
23
23
|
export { useElementPageContext } from './contexts/ElementPageContext';
|
|
24
|
-
export { type PDFDocumentProxy } from '
|
|
24
|
+
export { type PDFDocumentProxy } from 'pdfjs-dist';
|
|
25
25
|
export { SearchTool } from './components/layout/toolbar/SearchTool';
|
|
26
26
|
export { ThemeSwitcherTool } from './components/layout/toolbar/tools/ThemeSwitcherTool';
|
|
27
27
|
export { ThumbnailTool } from './components/layout/toolbar/tools/ThumbnailTool';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PageViewport, PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
2
|
import { Annotation, AnnotationEventPayload } from './types';
|
|
3
3
|
export declare const insertDateText: (annotationLayer: HTMLDivElement | null) => void;
|
|
4
4
|
export declare function bindLayerEvents(annotatedLayer: HTMLDivElement, handler: (event: Event) => void): void;
|
|
5
5
|
export declare function unbindLayerEvents(annotatedLayer: HTMLDivElement, handler: (event: Event) => void): void;
|
|
6
6
|
export declare function handleAnnotationLink(annotation: Annotation): void;
|
|
7
|
-
export declare function handleAnnotationWidget(annotation: Annotation, viewport:
|
|
7
|
+
export declare function handleAnnotationWidget(annotation: Annotation, viewport: PageViewport, canvasMap: Map<string, HTMLCanvasElement>): void;
|
|
8
8
|
/**
|
|
9
9
|
* Fixes tabindex values greater than 0 in annotation layer elements
|
|
10
10
|
* WCAG 2.1 requires tabindex to be 0, -1, or not set (for natural tab order)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PDFPageProxy } from '
|
|
1
|
+
import { PDFPageProxy } from 'pdfjs-dist/types/web/interfaces';
|
|
2
2
|
export declare const getThumbnailViewport: (page: PDFPageProxy, rotation?: number) => {
|
|
3
3
|
scale: number;
|
|
4
|
-
thumbnailViewport: import('
|
|
4
|
+
thumbnailViewport: import('pdfjs-dist/types/src/display/display_utils').PageViewport;
|
|
5
5
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TextContent } from 'pdfjs-dist/types/src/display/text_layer';
|
|
2
2
|
import { SearchOptions, Match, MatchHighlight } from './types';
|
|
3
|
-
export declare function findMatches(queries: (string | RegExp)[], textContent:
|
|
3
|
+
export declare function findMatches(queries: (string | RegExp)[], textContent: TextContent, pageIndex: number, options: SearchOptions): Match[];
|
|
4
4
|
export declare function isMatchEntireWord(content: string, startIdx: number, length: number): boolean;
|
|
5
|
-
export declare function highlightMatches(matches: Match[], textContent:
|
|
5
|
+
export declare function highlightMatches(matches: Match[], textContent: TextContent, textDivs: HTMLElement[]): {
|
|
6
6
|
element: HTMLElement;
|
|
7
7
|
index: number;
|
|
8
8
|
}[];
|
|
9
|
-
export declare function resetDivs(textContent:
|
|
9
|
+
export declare function resetDivs(textContent: TextContent, textDivs: HTMLElement[]): void;
|
|
10
10
|
export declare function getHighlightOptionsWithDefaults(options?: SearchOptions): SearchOptions;
|
|
11
|
-
export declare function highlightMultipleColorMatches(matches: MatchHighlight[], textContent:
|
|
11
|
+
export declare function highlightMultipleColorMatches(matches: MatchHighlight[], textContent: TextContent, textDivs: HTMLElement[]): {
|
|
12
12
|
element: HTMLElement;
|
|
13
13
|
index: number;
|
|
14
14
|
}[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const useDropFileZone: () => {
|
|
2
|
+
DropFileZoneLayout: import('react').ReactNode | import('react').ComponentType<{}>;
|
|
3
|
+
DropFileZoneTool: import('react').ReactNode | import('react').ComponentType<{}>;
|
|
4
|
+
DropFileZoneToolbar: import('react').ReactNode | import('react').ComponentType<{}>;
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useFlickerSelectText: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PDFDocumentProxy } from '
|
|
1
|
+
import { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api.js';
|
|
2
2
|
import { PdfPage, RPSrc, CharacterMap, LoadPDFOptions, ErrorType } from '../types';
|
|
3
|
-
export declare const useLoadPdf: (src?: RPSrc,
|
|
3
|
+
export declare const useLoadPdf: (src?: RPSrc, characterMap?: CharacterMap, options?: LoadPDFOptions) => {
|
|
4
4
|
pdf: PDFDocumentProxy | undefined;
|
|
5
5
|
pages: Map<number, PdfPage>;
|
|
6
6
|
loading: boolean;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
* @deprecated No longer needed — PDFium uses WASM directly without a web worker.
|
|
3
|
-
* Kept for backward compatibility in case external code references it.
|
|
4
|
-
*/
|
|
5
|
-
export declare const useLoadWorker: (_workerUrl?: string) => {
|
|
1
|
+
export declare const useLoadWorker: (workerUrl?: string) => {
|
|
6
2
|
workerUrlAdded: boolean;
|
|
7
3
|
};
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
* Legacy hook — selection logic has moved to TextSelectionContext.
|
|
3
|
-
*
|
|
4
|
-
* This file is kept so existing call sites compile without changes.
|
|
5
|
-
* The TextSelectionProvider (in contexts/TextSelectionContext.tsx) now
|
|
6
|
-
* manages all pointer-event-based text selection via glyph hit-testing
|
|
7
|
-
* and fires `onTextSelect` through EventCallbackContext.
|
|
8
|
-
*
|
|
9
|
-
* This hook is intentionally a no-op. Remove the call site when convenient.
|
|
10
|
-
*/
|
|
1
|
+
import { TextSelectionData } from '../types';
|
|
11
2
|
interface UseTextSelectionOptions {
|
|
12
|
-
onTextSelect?: (
|
|
3
|
+
onTextSelect?: (selection: TextSelectionData | null) => void;
|
|
13
4
|
pagesRef: HTMLElement | null;
|
|
14
5
|
}
|
|
15
|
-
export declare const useTextSelection: (
|
|
6
|
+
export declare const useTextSelection: ({ onTextSelect, pagesRef }: UseTextSelectionOptions) => void;
|
|
16
7
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { PDFDocumentProxy
|
|
2
|
-
|
|
1
|
+
import { PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
|
+
import { IPDFLinkService } from 'pdfjs-dist/types/web/interfaces';
|
|
3
|
+
declare class SimpleLinkService implements IPDFLinkService {
|
|
3
4
|
externalLinkEnabled: boolean;
|
|
4
5
|
pdfDocument: PDFDocumentProxy | undefined;
|
|
5
6
|
constructor(pdfDocument: PDFDocumentProxy, goToPage: (page: number) => void);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PDFPageProxy
|
|
1
|
+
import { PDFPageProxy } from 'pdfjs-dist/types/web/interfaces';
|
|
2
2
|
import { RenderOptions } from './types';
|
|
3
|
-
export declare const renderPage: (page: PDFPageProxy, canvasElem: HTMLCanvasElement, options?: RenderOptions) => RenderTask;
|
|
3
|
+
export declare const renderPage: (page: PDFPageProxy, canvasElem: HTMLCanvasElement, options?: RenderOptions) => import('pdfjs-dist/types/src/display/api').RenderTask;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PDFPageProxy } from 'pdfjs-dist';
|
|
2
|
+
import { DocumentInitParameters, PDFDataRangeTransport, PDFDocumentProxy, TypedArray } from 'pdfjs-dist/types/src/display/api';
|
|
3
|
+
import { PageViewport } from 'pdfjs-dist/types/web/interfaces';
|
|
2
4
|
import { Dispatch, FC, PropsWithChildren, SetStateAction } from 'react';
|
|
3
5
|
export interface DocumentContextType {
|
|
4
6
|
pdf?: PDFDocumentProxy;
|
|
@@ -251,7 +253,7 @@ export type DecryptedLicense = {
|
|
|
251
253
|
};
|
|
252
254
|
export interface PdfPage {
|
|
253
255
|
page: PDFPageProxy;
|
|
254
|
-
thumbnailViewport:
|
|
256
|
+
thumbnailViewport: PageViewport;
|
|
255
257
|
thumbnailScale: number;
|
|
256
258
|
defaultRotation: number;
|
|
257
259
|
}
|
|
@@ -288,7 +290,7 @@ export interface ThumbnailRenderedList {
|
|
|
288
290
|
loading: boolean;
|
|
289
291
|
page: PDFPageProxy;
|
|
290
292
|
thumbnailSrc?: string;
|
|
291
|
-
viewport:
|
|
293
|
+
viewport: PageViewport;
|
|
292
294
|
scale: number;
|
|
293
295
|
defaultRotation: number;
|
|
294
296
|
}
|
|
@@ -297,8 +299,8 @@ export declare enum ViewMode {
|
|
|
297
299
|
DUAL_PAGE = "Dual",
|
|
298
300
|
DUAL_PAGE_WITH_COVER = "DualWithCover"
|
|
299
301
|
}
|
|
300
|
-
export type PDFSrc = string | URL |
|
|
301
|
-
export type RPSrc = PDFSrc
|
|
302
|
+
export type PDFSrc = string | URL | TypedArray | PDFDataRangeTransport | DocumentInitParameters | undefined | null;
|
|
303
|
+
export type RPSrc = Omit<PDFSrc, 'DocumentInitParameters' | 'PDFDataRangeTransport'>;
|
|
302
304
|
export interface FullScreenToolProps {
|
|
303
305
|
isFullScreen: boolean;
|
|
304
306
|
toggleFullScreen: () => void;
|
|
@@ -520,6 +522,7 @@ export interface RPDefaultLayoutProps extends PropsWithChildren, ViewportProps {
|
|
|
520
522
|
cleanupOnLoaded?: () => void;
|
|
521
523
|
}
|
|
522
524
|
export interface RPLayoutProps extends PropsWithChildren, ViewportProps {
|
|
525
|
+
dropFileZone?: boolean | React.ReactNode | React.ComponentType;
|
|
523
526
|
toolbar?: boolean | Partial<ToolbarProps>;
|
|
524
527
|
style?: React.CSSProperties;
|
|
525
528
|
className?: string;
|