@react-pdf-kit/viewer 2.0.0-beta.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.
- package/README.md +204 -0
- package/dist/LayoutWrapper-a871c161.js +19 -0
- package/dist/RotateTool.module-03987eba.js +6 -0
- package/dist/SearchCloseButton-cbf182aa.js +33 -0
- package/dist/ToolbarLayout.module-c588d36b.js +3411 -0
- package/dist/ZoomTool.module-6c5eabbb.js +12 -0
- package/dist/assets/Button.css +1 -0
- package/dist/assets/Checkbox.css +1 -0
- package/dist/assets/Container.css +1 -0
- package/dist/assets/DropDown.css +1 -0
- package/dist/assets/Input.css +1 -0
- package/dist/assets/LayoutWrapper.css +1 -0
- package/dist/assets/LoaderIcon.css +1 -0
- package/dist/assets/MenuItem.css +1 -0
- package/dist/assets/MenuSeparator.css +1 -0
- package/dist/assets/PasswordModal.css +1 -0
- package/dist/assets/PropertyItem.css +1 -0
- package/dist/assets/RPDropFileZone.css +1 -0
- package/dist/assets/RPSplitter.css +1 -0
- package/dist/assets/RPTooltip.css +1 -0
- package/dist/assets/RotateTool.css +1 -0
- package/dist/assets/SearchCloseButton.css +1 -0
- package/dist/assets/ToolbarLayout.css +1 -0
- package/dist/assets/WrapperLayout.css +1 -0
- package/dist/assets/ZoomTool.css +1 -0
- package/dist/clsx-0c6e471a.js +22 -0
- package/dist/components/RPConfig.js +1492 -0
- package/dist/components/RPController.js +92 -0
- package/dist/components/RPDropFileZone.js +39 -0
- package/dist/components/RPPages.js +66 -0
- package/dist/components/RPProvider.js +27 -0
- package/dist/components/RPTheme.js +21 -0
- package/dist/components/icons/CheckIcon.js +22 -0
- package/dist/components/icons/ChevronDownIcon.js +23 -0
- package/dist/components/icons/ChevronUpIcon.js +22 -0
- package/dist/components/icons/ClearIcon.js +25 -0
- package/dist/components/icons/ClockwiseIcon.js +22 -0
- package/dist/components/icons/CloseIcon.js +22 -0
- package/dist/components/icons/DarkPdfIcon.js +15 -0
- package/dist/components/icons/DualPageIcon.js +22 -0
- package/dist/components/icons/FileDownloadDefaultIcon.js +23 -0
- package/dist/components/icons/FileUploadDefaultIcon.js +23 -0
- package/dist/components/icons/FullScreenIcon.js +22 -0
- package/dist/components/icons/GoToDownIcon.js +22 -0
- package/dist/components/icons/HandModeDefaultIcon.js +22 -0
- package/dist/components/icons/HorizontalScrollingIcon.js +24 -0
- package/dist/components/icons/InfoIcon.js +22 -0
- package/dist/components/icons/LightPdfIcon.js +15 -0
- package/dist/components/icons/LoaderIcon.js +17 -0
- package/dist/components/icons/MoonIcon.js +22 -0
- package/dist/components/icons/PageScrollingIcon.js +24 -0
- package/dist/components/icons/PrintDefaultIcon.js +23 -0
- package/dist/components/icons/SearchIcon.js +22 -0
- package/dist/components/icons/SinglePageIcon.js +22 -0
- package/dist/components/icons/SunIcon.js +25 -0
- package/dist/components/icons/TextSelectionDefaultIcon.js +23 -0
- package/dist/components/icons/ThreeDotIcon.js +22 -0
- package/dist/components/icons/Thumbnail.js +54 -0
- package/dist/components/icons/VerticalScrollingIcon.js +24 -0
- package/dist/components/icons/WrappedScrollingIcon.js +24 -0
- package/dist/components/icons/ZoomInIcon.js +22 -0
- package/dist/components/icons/ZoomOutIcon.js +22 -0
- package/dist/components/layout/Container.js +21 -0
- package/dist/components/layout/LayoutContainer.js +60 -0
- package/dist/components/layout/LayoutWrapper.js +6 -0
- package/dist/components/layout/RPDefaultLayout.js +16 -0
- package/dist/components/layout/RPLayout.js +107 -0
- package/dist/components/layout/WrapperLayout.js +13 -0
- package/dist/components/layout/sidebar/RPSidebar.js +15 -0
- package/dist/components/layout/sidebar/RPSplitter.js +61 -0
- package/dist/components/layout/sidebar/Thumbnail.js +59 -0
- package/dist/components/layout/sidebar/Thumbnails.js +8 -0
- package/dist/components/layout/toolbar/DarkModeTool.js +27 -0
- package/dist/components/layout/toolbar/DocumentDialog.js +59 -0
- package/dist/components/layout/toolbar/DocumentProperties.js +27 -0
- package/dist/components/layout/toolbar/FileDownloadTool.js +15 -0
- package/dist/components/layout/toolbar/FileUploadTool.js +25 -0
- package/dist/components/layout/toolbar/FullScreenTool.js +59 -0
- package/dist/components/layout/toolbar/MenuItem.js +12 -0
- package/dist/components/layout/toolbar/MenuSeparator.js +8 -0
- package/dist/components/layout/toolbar/MostPageTool.js +60 -0
- package/dist/components/layout/toolbar/OtherTool.js +24 -0
- package/dist/components/layout/toolbar/Paginate.js +19 -0
- package/dist/components/layout/toolbar/PrintTool.js +15 -0
- package/dist/components/layout/toolbar/PropertyItem.js +12 -0
- package/dist/components/layout/toolbar/RPMenuItem.js +23 -0
- package/dist/components/layout/toolbar/RPMoreOptions.js +147 -0
- package/dist/components/layout/toolbar/RPToolbar.js +10 -0
- package/dist/components/layout/toolbar/RPToolbarEnd.js +9 -0
- package/dist/components/layout/toolbar/RotateTool.js +36 -0
- package/dist/components/layout/toolbar/ScrollModeTool.js +56 -0
- package/dist/components/layout/toolbar/SearchCloseButton.js +9 -0
- package/dist/components/layout/toolbar/SearchResultNavigator.js +10 -0
- package/dist/components/layout/toolbar/SearchTool.js +61 -0
- package/dist/components/layout/toolbar/SelectionModeTool.js +40 -0
- package/dist/components/layout/toolbar/ThumbnailTool.js +17 -0
- package/dist/components/layout/toolbar/ToolbarCustom.js +95 -0
- package/dist/components/layout/toolbar/ToolbarDefault.js +97 -0
- package/dist/components/layout/toolbar/ToolbarLayout.js +10 -0
- package/dist/components/layout/toolbar/ViewModeTool.js +42 -0
- package/dist/components/layout/toolbar/ZoomTool.js +130 -0
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +28 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +13 -0
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +13 -0
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +21 -0
- package/dist/components/layout/toolbar/tools/InputPageTool.js +45 -0
- package/dist/components/layout/toolbar/tools/NextPageTool.js +72 -0
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +21 -0
- package/dist/components/layout/toolbar/tools/PrintTool.js +13 -0
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +17 -0
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +25 -0
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +17 -0
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +23 -0
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +28 -0
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +65 -0
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +28 -0
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +70 -0
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +16 -0
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +16 -0
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +20 -0
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +69 -0
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +20 -0
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +78 -0
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +20 -0
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +26 -0
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +43 -0
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +30 -0
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +32 -0
- package/dist/components/page/AnnotationLayer.js +62 -0
- package/dist/components/page/CanvasLayer.js +58 -0
- package/dist/components/page/CustomElement.js +22 -0
- package/dist/components/page/DualPage.js +6 -0
- package/dist/components/page/RPPage.js +60 -0
- package/dist/components/page/SinglePage.js +6 -0
- package/dist/components/page/TextHighlightLayer.js +60 -0
- package/dist/components/page/TextLayer.js +60 -0
- package/dist/components/page/searchHighlight.js +37 -0
- package/dist/components/ui/Button.js +22 -0
- package/dist/components/ui/Checkbox.js +264 -0
- package/dist/components/ui/DropDown.js +29 -0
- package/dist/components/ui/Input.js +26 -0
- package/dist/components/ui/LoadingIndicator.js +7 -0
- package/dist/components/ui/PasswordModal.js +58 -0
- package/dist/components/ui/RPTooltip.js +568 -0
- package/dist/contexts/ConfigContext.js +13 -0
- package/dist/contexts/DarkModeContext.js +28 -0
- package/dist/contexts/DimensionPagesContext.js +42 -0
- package/dist/contexts/DocumentPasswordContext.js +40 -0
- package/dist/contexts/DownloadContext.js +21 -0
- package/dist/contexts/DropFileZoneContext.js +52 -0
- package/dist/contexts/ElementPageContext.js +76 -0
- package/dist/contexts/FileInputContext.js +39 -0
- package/dist/contexts/FullScreenContext.js +18 -0
- package/dist/contexts/GlobalCurrentPage.js +16 -0
- package/dist/contexts/HighlightContext.js +18 -0
- package/dist/contexts/IconContext.js +11 -0
- package/dist/contexts/IconToolContext.js +13 -0
- package/dist/contexts/InitialStateContext.js +13 -0
- package/dist/contexts/LayerContext.js +8 -0
- package/dist/contexts/LayoutContainerContext.js +16 -0
- package/dist/contexts/LicenseContext.js +15 -0
- package/dist/contexts/LoaderContext.js +26 -0
- package/dist/contexts/LocalizationContext.js +38 -0
- package/dist/contexts/OtherToolContext.js +18 -0
- package/dist/contexts/PageViewportContext.js +8 -0
- package/dist/contexts/PagesRotateContext.js +25 -0
- package/dist/contexts/PaginationContext.js +11 -0
- package/dist/contexts/PrintContext.js +8 -0
- package/dist/contexts/RPDocumentContext.js +51 -0
- package/dist/contexts/RenderQueueProvider.js +10 -0
- package/dist/contexts/RenderedPagesCache.js +14 -0
- package/dist/contexts/RotationContext.js +28 -0
- package/dist/contexts/ScrollModeContext.js +21 -0
- package/dist/contexts/SearchContext.js +8 -0
- package/dist/contexts/SelectionModeContext.js +23 -0
- package/dist/contexts/SmoothScrollContext.js +12 -0
- package/dist/contexts/ThemeContext.js +7 -0
- package/dist/contexts/ThumbnailsContext.js +8 -0
- package/dist/contexts/ToolComponentContext.js +52 -0
- package/dist/contexts/ToolbarComponentContext.js +48 -0
- package/dist/contexts/ViewModeContext.js +28 -0
- package/dist/contexts/ViewportContext.js +85 -0
- package/dist/contexts/VirtualGridContext.js +15 -0
- package/dist/contexts/VirtualScrollContext.js +53 -0
- package/dist/contexts/ZoomContext.js +97 -0
- package/dist/floating-ui.react-dom-6b2fe0df.js +1474 -0
- package/dist/index-35c7f4a2.js +332 -0
- package/dist/index-f563c6f0.js +1889 -0
- package/dist/main.js +86 -0
- package/dist/th_TH-d627cd51.js +398 -0
- package/dist/types/components/RPConfig.d.ts +3 -0
- package/dist/types/components/RPController.d.ts +3 -0
- package/dist/types/components/RPDropFileZone.d.ts +2 -0
- package/dist/types/components/RPPages.d.ts +2 -0
- package/dist/types/components/RPProvider.d.ts +3 -0
- package/dist/types/components/RPTheme.d.ts +3 -0
- package/dist/types/components/icons/CheckIcon.d.ts +2 -0
- package/dist/types/components/icons/ChevronDownIcon.d.ts +2 -0
- package/dist/types/components/icons/ChevronUpIcon.d.ts +2 -0
- package/dist/types/components/icons/ClearIcon.d.ts +2 -0
- package/dist/types/components/icons/ClockwiseIcon.d.ts +2 -0
- package/dist/types/components/icons/CloseIcon.d.ts +2 -0
- package/dist/types/components/icons/DarkPdfIcon.d.ts +2 -0
- package/dist/types/components/icons/DualPageIcon.d.ts +2 -0
- package/dist/types/components/icons/FileDownloadDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/FileUploadDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/FullScreenIcon.d.ts +2 -0
- package/dist/types/components/icons/GoToDownIcon.d.ts +2 -0
- package/dist/types/components/icons/HandModeDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/HorizontalScrollingIcon.d.ts +2 -0
- package/dist/types/components/icons/InfoIcon.d.ts +2 -0
- package/dist/types/components/icons/LightPdfIcon.d.ts +2 -0
- package/dist/types/components/icons/LoaderIcon.d.ts +2 -0
- package/dist/types/components/icons/MoonIcon.d.ts +2 -0
- package/dist/types/components/icons/PageScrollingIcon.d.ts +2 -0
- package/dist/types/components/icons/PrintDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/SearchIcon.d.ts +2 -0
- package/dist/types/components/icons/SinglePageIcon.d.ts +2 -0
- package/dist/types/components/icons/SunIcon.d.ts +2 -0
- package/dist/types/components/icons/TextSelectionDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/ThreeDotIcon.d.ts +2 -0
- package/dist/types/components/icons/Thumbnail.d.ts +2 -0
- package/dist/types/components/icons/VerticalScrollingIcon.d.ts +2 -0
- package/dist/types/components/icons/WrappedScrollingIcon.d.ts +2 -0
- package/dist/types/components/icons/ZoomInIcon.d.ts +2 -0
- package/dist/types/components/icons/ZoomOutIcon.d.ts +2 -0
- package/dist/types/components/layout/Container.d.ts +8 -0
- package/dist/types/components/layout/LayoutContainer.d.ts +14 -0
- package/dist/types/components/layout/LayoutWrapper.d.ts +12 -0
- package/dist/types/components/layout/RPDefaultLayout.d.ts +2 -0
- package/dist/types/components/layout/RPLayout.d.ts +3 -0
- package/dist/types/components/layout/WrapperLayout.d.ts +2 -0
- package/dist/types/components/layout/sidebar/RPSidebar.d.ts +1 -0
- package/dist/types/components/layout/sidebar/RPSplitter.d.ts +9 -0
- package/dist/types/components/layout/sidebar/Thumbnail.d.ts +11 -0
- package/dist/types/components/layout/sidebar/Thumbnails.d.ts +8 -0
- package/dist/types/components/layout/toolbar/DarkModeTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/DocumentDialog.d.ts +2 -0
- package/dist/types/components/layout/toolbar/DocumentProperties.d.ts +1 -0
- package/dist/types/components/layout/toolbar/FileDownloadTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/FileUploadTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/FullScreenTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/MenuItem.d.ts +6 -0
- package/dist/types/components/layout/toolbar/MenuSeparator.d.ts +1 -0
- package/dist/types/components/layout/toolbar/MostPageTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/OtherTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/Paginate.d.ts +1 -0
- package/dist/types/components/layout/toolbar/PrintTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/PropertyItem.d.ts +7 -0
- package/dist/types/components/layout/toolbar/RPMenuItem.d.ts +11 -0
- package/dist/types/components/layout/toolbar/RPMoreOptions.d.ts +3 -0
- package/dist/types/components/layout/toolbar/RPToolbar.d.ts +3 -0
- package/dist/types/components/layout/toolbar/RPToolbarEnd.d.ts +1 -0
- package/dist/types/components/layout/toolbar/RotateTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/ScrollModeTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/SearchCloseButton.d.ts +7 -0
- package/dist/types/components/layout/toolbar/SearchResultNavigator.d.ts +1 -0
- package/dist/types/components/layout/toolbar/SearchTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/SelectionModeTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/ThumbnailTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/ToolbarCustom.d.ts +3 -0
- package/dist/types/components/layout/toolbar/ToolbarDefault.d.ts +4 -0
- package/dist/types/components/layout/toolbar/ToolbarLayout.d.ts +3 -0
- package/dist/types/components/layout/toolbar/ViewModeTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/ZoomTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/tools/DocumentPropertiesTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FileDownloadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FileUploadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FullScreenTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/InputPageTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/tools/NextPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/PreviousPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/PrintTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/RotateClockwiseTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/RotateCounterclockwiseTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ThemeSwitcherTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ThumbnailTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ZoomInTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ZoomLevelTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ZoomOutTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/defaults/RPHorizontalBar.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/defaults/RPVerticalBar.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/DocumentProperties.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FileDownloadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FileUploadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FullScreenTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/MostPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/PrintTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/RotateTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/ScrollModeTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/SelectionModeTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/ViewModeTool.d.ts +3 -0
- package/dist/types/components/page/AnnotationLayer.d.ts +6 -0
- package/dist/types/components/page/CanvasLayer.d.ts +8 -0
- package/dist/types/components/page/CustomElement.d.ts +6 -0
- package/dist/types/components/page/DualPage.d.ts +5 -0
- package/dist/types/components/page/RPPage.d.ts +7 -0
- package/dist/types/components/page/SinglePage.d.ts +5 -0
- package/dist/types/components/page/TextHighlightLayer.d.ts +10 -0
- package/dist/types/components/page/TextLayer.d.ts +6 -0
- package/dist/types/components/page/searchHighlight.d.ts +5 -0
- package/dist/types/components/ui/Button.d.ts +8 -0
- package/dist/types/components/ui/Checkbox.d.ts +9 -0
- package/dist/types/components/ui/DropDown.d.ts +10 -0
- package/dist/types/components/ui/Input.d.ts +8 -0
- package/dist/types/components/ui/LoadingIndicator.d.ts +6 -0
- package/dist/types/components/ui/PasswordModal.d.ts +3 -0
- package/dist/types/components/ui/RPTooltip.d.ts +11 -0
- package/dist/types/contexts/ConfigContext.d.ts +5 -0
- package/dist/types/contexts/DarkModeContext.d.ts +5 -0
- package/dist/types/contexts/DimensionPagesContext.d.ts +4 -0
- package/dist/types/contexts/DocumentPasswordContext.d.ts +14 -0
- package/dist/types/contexts/DownloadContext.d.ts +11 -0
- package/dist/types/contexts/DropFileZoneContext.d.ts +5 -0
- package/dist/types/contexts/ElementPageContext.d.ts +6 -0
- package/dist/types/contexts/FileInputContext.d.ts +7 -0
- package/dist/types/contexts/FullScreenContext.d.ts +7 -0
- package/dist/types/contexts/GlobalCurrentPage.d.ts +11 -0
- package/dist/types/contexts/HighlightContext.d.ts +8 -0
- package/dist/types/contexts/IconContext.d.ts +7 -0
- package/dist/types/contexts/IconToolContext.d.ts +9 -0
- package/dist/types/contexts/InitialStateContext.d.ts +5 -0
- package/dist/types/contexts/LayerContext.d.ts +5 -0
- package/dist/types/contexts/LayoutContainerContext.d.ts +12 -0
- package/dist/types/contexts/LicenseContext.d.ts +7 -0
- package/dist/types/contexts/LoaderContext.d.ts +12 -0
- package/dist/types/contexts/LocalizationContext.d.ts +5 -0
- package/dist/types/contexts/OtherToolContext.d.ts +9 -0
- package/dist/types/contexts/PageViewportContext.d.ts +4 -0
- package/dist/types/contexts/PagesRotateContext.d.ts +15 -0
- package/dist/types/contexts/PaginationContext.d.ts +5 -0
- package/dist/types/contexts/PrintContext.d.ts +7 -0
- package/dist/types/contexts/RPDocumentContext.d.ts +12 -0
- package/dist/types/contexts/RenderQueueProvider.d.ts +16 -0
- package/dist/types/contexts/RenderedPagesCache.d.ts +10 -0
- package/dist/types/contexts/RotationContext.d.ts +5 -0
- package/dist/types/contexts/ScrollModeContext.d.ts +5 -0
- package/dist/types/contexts/SearchContext.d.ts +7 -0
- package/dist/types/contexts/SelectionModeContext.d.ts +5 -0
- package/dist/types/contexts/SmoothScrollContext.d.ts +8 -0
- package/dist/types/contexts/ThemeContext.d.ts +4 -0
- package/dist/types/contexts/ThumbnailsContext.d.ts +7 -0
- package/dist/types/contexts/ToolComponentContext.d.ts +12 -0
- package/dist/types/contexts/ToolbarComponentContext.d.ts +9 -0
- package/dist/types/contexts/ViewModeContext.d.ts +5 -0
- package/dist/types/contexts/ViewportContext.d.ts +28 -0
- package/dist/types/contexts/VirtualGridContext.d.ts +9 -0
- package/dist/types/contexts/VirtualScrollContext.d.ts +30 -0
- package/dist/types/contexts/ZoomContext.d.ts +5 -0
- package/dist/types/locales/en_US.json.d.ts +81 -0
- package/dist/types/locales/it_IT.json.d.ts +81 -0
- package/dist/types/locales/pt_PT.json.d.ts +81 -0
- package/dist/types/locales/th_TH.json.d.ts +81 -0
- package/dist/types/locales/zh_CN.json.d.ts +81 -0
- package/dist/types/main.d.ts +45 -0
- package/dist/types/utils/Queue.d.ts +18 -0
- package/dist/types/utils/annotations.d.ts +9 -0
- package/dist/types/utils/appConsole.d.ts +24 -0
- package/dist/types/utils/calculatePage.d.ts +12 -0
- package/dist/types/utils/charators.d.ts +12 -0
- package/dist/types/utils/const.d.ts +3 -0
- package/dist/types/utils/constants.d.ts +5 -0
- package/dist/types/utils/convertPdfDate.d.ts +1 -0
- package/dist/types/utils/dateFormatter.d.ts +1 -0
- package/dist/types/utils/elementPagePosition.d.ts +17 -0
- package/dist/types/utils/formatFileSize.d.ts +1 -0
- package/dist/types/utils/getScrollDistance.d.ts +1 -0
- package/dist/types/utils/getThumbnailViewport.d.ts +5 -0
- package/dist/types/utils/getWordPositionInPage.d.ts +8 -0
- package/dist/types/utils/getZoomLevel.d.ts +2 -0
- package/dist/types/utils/highlight.d.ts +14 -0
- package/dist/types/utils/hooks/useDarkMode.d.ts +2 -0
- package/dist/types/utils/hooks/useDarkModeProps.d.ts +2 -0
- package/dist/types/utils/hooks/useDebounce.d.ts +1 -0
- package/dist/types/utils/hooks/useElementSize.d.ts +8 -0
- package/dist/types/utils/hooks/useFileDownload.d.ts +3 -0
- package/dist/types/utils/hooks/useFlickerSelectText.d.ts +1 -0
- package/dist/types/utils/hooks/useFullScreen.d.ts +6 -0
- package/dist/types/utils/hooks/useGrabScroll.d.ts +11 -0
- package/dist/types/utils/hooks/useHighlight.d.ts +10 -0
- package/dist/types/utils/hooks/useInfiniteScroll.d.ts +6 -0
- package/dist/types/utils/hooks/useLicense.d.ts +2 -0
- package/dist/types/utils/hooks/useLoadPdf.d.ts +11 -0
- package/dist/types/utils/hooks/useLoadWorker.d.ts +3 -0
- package/dist/types/utils/hooks/useLocalization.d.ts +10 -0
- package/dist/types/utils/hooks/useMousePressed.d.ts +7 -0
- package/dist/types/utils/hooks/usePageRotateContext.d.ts +3 -0
- package/dist/types/utils/hooks/usePaginate.d.ts +2 -0
- package/dist/types/utils/hooks/usePdfProperties.d.ts +9 -0
- package/dist/types/utils/hooks/usePinch.d.ts +1 -0
- package/dist/types/utils/hooks/usePresentPage.d.ts +1 -0
- package/dist/types/utils/hooks/usePrint.d.ts +11 -0
- package/dist/types/utils/hooks/useRequestAnimationFrame.d.ts +5 -0
- package/dist/types/utils/hooks/useResizeObserver.d.ts +6 -0
- package/dist/types/utils/hooks/useRotate.d.ts +4 -0
- package/dist/types/utils/hooks/useScrollToPage.d.ts +3 -0
- package/dist/types/utils/hooks/useSearch.d.ts +14 -0
- package/dist/types/utils/hooks/useThumbnail.d.ts +7 -0
- package/dist/types/utils/hooks/useVirtualReactWindow.d.ts +17 -0
- package/dist/types/utils/hooks/useWatermark.d.ts +1 -0
- package/dist/types/utils/link_service.d.ts +71 -0
- package/dist/types/utils/renderPage.d.ts +3 -0
- package/dist/types/utils/sanitizeExternalUrl.d.ts +1 -0
- package/dist/types/utils/smoothScrollTo.d.ts +2 -0
- package/dist/types/utils/types.d.ts +856 -0
- package/dist/types/utils/withRef.d.ts +4 -0
- package/dist/utils/Queue.js +47 -0
- package/dist/utils/annotations.js +306 -0
- package/dist/utils/appConsole.js +42 -0
- package/dist/utils/calculatePage.js +15 -0
- package/dist/utils/charators.js +48 -0
- package/dist/utils/const.js +9 -0
- package/dist/utils/constants.js +8 -0
- package/dist/utils/convertPdfDate.js +25 -0
- package/dist/utils/dateFormatter.js +7 -0
- package/dist/utils/elementPagePosition.js +11 -0
- package/dist/utils/formatFileSize.js +9 -0
- package/dist/utils/getScrollDistance.js +4 -0
- package/dist/utils/getThumbnailViewport.js +7 -0
- package/dist/utils/getWordPositionInPage.js +25 -0
- package/dist/utils/getZoomLevel.js +23 -0
- package/dist/utils/highlight.js +221 -0
- package/dist/utils/hooks/useDarkMode.js +11 -0
- package/dist/utils/hooks/useDarkModeProps.js +11 -0
- package/dist/utils/hooks/useDebounce.js +19 -0
- package/dist/utils/hooks/useElementSize.js +21 -0
- package/dist/utils/hooks/useFileDownload.js +58 -0
- package/dist/utils/hooks/useFlickerSelectText.js +25 -0
- package/dist/utils/hooks/useFullScreen.js +29 -0
- package/dist/utils/hooks/useGrabScroll.js +52 -0
- package/dist/utils/hooks/useHighlight.js +54 -0
- package/dist/utils/hooks/useInfiniteScroll.js +19 -0
- package/dist/utils/hooks/useLicense.js +110 -0
- package/dist/utils/hooks/useLoadPdf.js +77 -0
- package/dist/utils/hooks/useLoadWorker.js +13 -0
- package/dist/utils/hooks/useLocalization.js +25 -0
- package/dist/utils/hooks/useMousePressed.js +20 -0
- package/dist/utils/hooks/usePageRotateContext.js +26 -0
- package/dist/utils/hooks/usePaginate.js +60 -0
- package/dist/utils/hooks/usePdfProperties.js +37 -0
- package/dist/utils/hooks/usePinch.js +79 -0
- package/dist/utils/hooks/usePresentPage.js +60 -0
- package/dist/utils/hooks/usePrint.js +59 -0
- package/dist/utils/hooks/useRequestAnimationFrame.js +17 -0
- package/dist/utils/hooks/useResizeObserver.js +22 -0
- package/dist/utils/hooks/useRotate.js +13 -0
- package/dist/utils/hooks/useScrollToPage.js +62 -0
- package/dist/utils/hooks/useSearch.js +62 -0
- package/dist/utils/hooks/useThumbnail.js +59 -0
- package/dist/utils/hooks/useVirtualReactWindow.js +60 -0
- package/dist/utils/hooks/useWatermark.js +91 -0
- package/dist/utils/link_service.js +98 -0
- package/dist/utils/renderPage.js +17 -0
- package/dist/utils/sanitizeExternalUrl.js +16 -0
- package/dist/utils/smoothScrollTo.js +6 -0
- package/dist/utils/types.js +21 -0
- package/dist/utils/withRef.js +8 -0
- package/package.json +91 -0
|
@@ -0,0 +1,856 @@
|
|
|
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';
|
|
4
|
+
import { Dispatch, FC, PropsWithChildren, SetStateAction } from 'react';
|
|
5
|
+
export interface DocumentContextType {
|
|
6
|
+
pdf?: PDFDocumentProxy;
|
|
7
|
+
pages: Map<number, PdfPage>;
|
|
8
|
+
pdfSrc?: PDFSrc;
|
|
9
|
+
setPdfSrc: React.Dispatch<React.SetStateAction<RPSrc | undefined>>;
|
|
10
|
+
pdfProperties?: PdfProperties;
|
|
11
|
+
setFilename: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
12
|
+
filename?: string | null;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
loaderProgress: number;
|
|
15
|
+
error: ErrorType | unknown;
|
|
16
|
+
}
|
|
17
|
+
export declare enum AnnotationSubType {
|
|
18
|
+
Text = 1,
|
|
19
|
+
Link = 2,
|
|
20
|
+
FreeText = 3,
|
|
21
|
+
Line = 4,
|
|
22
|
+
Square = 5,
|
|
23
|
+
Circle = 6,
|
|
24
|
+
Polygon = 7,
|
|
25
|
+
Polyline = 8,
|
|
26
|
+
Highlight = 9,
|
|
27
|
+
Underline = 10,
|
|
28
|
+
Squiggly = 11,
|
|
29
|
+
StrikeOut = 12,
|
|
30
|
+
Stamp = 13,
|
|
31
|
+
Caret = 14,
|
|
32
|
+
Ink = 15,
|
|
33
|
+
Popup = 16,
|
|
34
|
+
FileAttachment = 17,
|
|
35
|
+
Widget = 20
|
|
36
|
+
}
|
|
37
|
+
export declare enum AnnotationType {
|
|
38
|
+
INTERNAL_LINK = "internal-link",
|
|
39
|
+
LINK = "link",
|
|
40
|
+
FILE_ATTACHMENT = "file-attachment",
|
|
41
|
+
FORM_TEXT = "form-text",
|
|
42
|
+
FORM_SELECT = "form-select",
|
|
43
|
+
FORM_CHECKBOX = "form-checkbox",
|
|
44
|
+
FORM_RADIO = "form-radio",
|
|
45
|
+
FORM_BUTTON = "form-button",
|
|
46
|
+
BUTTON = "button"
|
|
47
|
+
}
|
|
48
|
+
export declare enum ErrorType {
|
|
49
|
+
NOT_SUPPORTED = "not-supported"
|
|
50
|
+
}
|
|
51
|
+
export interface AnnotationEventPayload {
|
|
52
|
+
type: AnnotationType;
|
|
53
|
+
data: any;
|
|
54
|
+
}
|
|
55
|
+
interface AnnotationPoint {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
}
|
|
59
|
+
export interface OutlineRef {
|
|
60
|
+
gen: number;
|
|
61
|
+
num: number;
|
|
62
|
+
}
|
|
63
|
+
export interface OutlineDestinationName {
|
|
64
|
+
name: string;
|
|
65
|
+
}
|
|
66
|
+
export type OutlineDestination = [
|
|
67
|
+
OutlineRef | number,
|
|
68
|
+
OutlineDestinationName,
|
|
69
|
+
...any[]
|
|
70
|
+
];
|
|
71
|
+
export type OutlineDestinationType = string | OutlineDestination;
|
|
72
|
+
export declare enum ZoomLevel {
|
|
73
|
+
ACTUAL = "Actual Size",
|
|
74
|
+
PAGE_FIT = "Page Fit",
|
|
75
|
+
PAGE_WIDTH = "Page Width"
|
|
76
|
+
}
|
|
77
|
+
export type Localization = {
|
|
78
|
+
searchButtonTooltip?: string;
|
|
79
|
+
searchInputPlaceholder?: string;
|
|
80
|
+
searchInputTooltip?: string;
|
|
81
|
+
searchPrevTooltip?: string;
|
|
82
|
+
searchNextTooltip?: string;
|
|
83
|
+
searchCloseButtonTooltip?: string;
|
|
84
|
+
searchMatchCaseLabel?: string;
|
|
85
|
+
searchMatchCaseTooltip?: string;
|
|
86
|
+
searchWholeWordsLabel?: string;
|
|
87
|
+
searchWholeWordsTooltip?: string;
|
|
88
|
+
previousPageTooltip?: string;
|
|
89
|
+
currentPageTooltip?: string;
|
|
90
|
+
nextPageTooltip?: string;
|
|
91
|
+
zoomOutTooltip?: string;
|
|
92
|
+
zoomInTooltip?: string;
|
|
93
|
+
zoomSelectTooltip?: string;
|
|
94
|
+
zoomActualSize?: string;
|
|
95
|
+
zoomPageFit?: string;
|
|
96
|
+
zoomPageWidth?: string;
|
|
97
|
+
themeEnableDarkTooltip?: string;
|
|
98
|
+
themeEnableLightTooltip?: string;
|
|
99
|
+
openLocalFileLabel?: string;
|
|
100
|
+
openLocalFileTooltip?: string;
|
|
101
|
+
downloadFileLabel?: string;
|
|
102
|
+
downloadFileTooltip?: string;
|
|
103
|
+
printLabel?: string;
|
|
104
|
+
printTooltip?: string;
|
|
105
|
+
printLoadingMessage?: string;
|
|
106
|
+
printCancelLabel?: string;
|
|
107
|
+
fullScreenLabel?: string;
|
|
108
|
+
fullScreenTooltip?: string;
|
|
109
|
+
moreOptionTooltip?: string;
|
|
110
|
+
firstPageLabel?: string;
|
|
111
|
+
firstPageTooltip?: string;
|
|
112
|
+
lastPageLabel?: string;
|
|
113
|
+
lastPageTooltip?: string;
|
|
114
|
+
rotateClockwiseLabel?: string;
|
|
115
|
+
rotateClockwiseTooltip?: string;
|
|
116
|
+
rotateCounterclockwiseLabel?: string;
|
|
117
|
+
rotateCounterclockwiseTooltip?: string;
|
|
118
|
+
textSelectionLabel?: string;
|
|
119
|
+
textSelectionTooltip?: string;
|
|
120
|
+
handToolLabel?: string;
|
|
121
|
+
handToolTooltip?: string;
|
|
122
|
+
pageScrollingLabel?: string;
|
|
123
|
+
pageScrollingTooltip?: string;
|
|
124
|
+
verticalScrollingLabel?: string;
|
|
125
|
+
verticalScrollingTooltip?: string;
|
|
126
|
+
horizontalLabel?: string;
|
|
127
|
+
horizontalTooltip?: string;
|
|
128
|
+
singlePageLabel?: string;
|
|
129
|
+
singlePageTooltip?: string;
|
|
130
|
+
dualPageLabel?: string;
|
|
131
|
+
dualPageTooltip?: string;
|
|
132
|
+
documentPropertiesLabel?: string;
|
|
133
|
+
documentPropertiesTooltip?: string;
|
|
134
|
+
propertiesFilenameLabel?: string;
|
|
135
|
+
propertiesFileSizeLabel?: string;
|
|
136
|
+
propertiesTitleLabel?: string;
|
|
137
|
+
propertiesAuthorLabel?: string;
|
|
138
|
+
propertiesSubjectLabel?: string;
|
|
139
|
+
propertiesKeywordLabel?: string;
|
|
140
|
+
propertiesCreatorLabel?: string;
|
|
141
|
+
propertiesCreateOnLabel?: string;
|
|
142
|
+
propertiesModifiedOnLabel?: string;
|
|
143
|
+
propertiesPDFProducerLabel?: string;
|
|
144
|
+
propertiesPDFVersionLabel?: string;
|
|
145
|
+
propertiesPageCountLabel?: string;
|
|
146
|
+
thumbnailTooltip?: string;
|
|
147
|
+
passwordModalTitle?: string;
|
|
148
|
+
passwordModalMessage?: string;
|
|
149
|
+
passwordPlaceholder?: string;
|
|
150
|
+
passwordConfirmLabel?: string;
|
|
151
|
+
passwordError?: string;
|
|
152
|
+
dragDropFileMessage?: string;
|
|
153
|
+
};
|
|
154
|
+
interface Attachment {
|
|
155
|
+
content: Uint8Array;
|
|
156
|
+
filename: string;
|
|
157
|
+
}
|
|
158
|
+
export interface Annotation {
|
|
159
|
+
annotationType: number;
|
|
160
|
+
color?: Uint8ClampedArray;
|
|
161
|
+
dest: OutlineDestinationType;
|
|
162
|
+
hasAppearance: boolean;
|
|
163
|
+
id: string;
|
|
164
|
+
rect: number[];
|
|
165
|
+
subtype: string;
|
|
166
|
+
borderStyle: {
|
|
167
|
+
dashArray: number[];
|
|
168
|
+
horizontalCornerRadius: number;
|
|
169
|
+
style: number;
|
|
170
|
+
verticalCornerRadius: number;
|
|
171
|
+
width: number;
|
|
172
|
+
};
|
|
173
|
+
hasPopup?: boolean;
|
|
174
|
+
contents?: string;
|
|
175
|
+
contentsObj?: {
|
|
176
|
+
dir: string;
|
|
177
|
+
str: string;
|
|
178
|
+
};
|
|
179
|
+
modificationDate?: string;
|
|
180
|
+
quadPoints?: AnnotationPoint[][];
|
|
181
|
+
title?: string;
|
|
182
|
+
titleObj?: {
|
|
183
|
+
dir: string;
|
|
184
|
+
str: string;
|
|
185
|
+
};
|
|
186
|
+
parentId?: string;
|
|
187
|
+
parentType?: string;
|
|
188
|
+
file?: Attachment;
|
|
189
|
+
inkLists?: AnnotationPoint[][];
|
|
190
|
+
lineCoordinates: number[];
|
|
191
|
+
action?: string;
|
|
192
|
+
unsafeUrl?: string;
|
|
193
|
+
url?: string;
|
|
194
|
+
newWindow?: boolean;
|
|
195
|
+
vertices?: AnnotationPoint[];
|
|
196
|
+
name?: string;
|
|
197
|
+
fieldType: string;
|
|
198
|
+
pushButton: boolean;
|
|
199
|
+
}
|
|
200
|
+
export interface Destination {
|
|
201
|
+
pageIndex: number;
|
|
202
|
+
bottomOffset: number | DestinationOffsetFromViewport;
|
|
203
|
+
leftOffset: number | DestinationOffsetFromViewport;
|
|
204
|
+
label?: string;
|
|
205
|
+
scaleTo?: number;
|
|
206
|
+
}
|
|
207
|
+
export type DestinationOffsetFromViewport = (viewportWidth: number, viewportHeight: number) => number;
|
|
208
|
+
export interface OutlineRef {
|
|
209
|
+
gen: number;
|
|
210
|
+
num: number;
|
|
211
|
+
}
|
|
212
|
+
export interface RotateContextType {
|
|
213
|
+
rotate: number;
|
|
214
|
+
setRotate: React.Dispatch<React.SetStateAction<number>>;
|
|
215
|
+
}
|
|
216
|
+
export interface RPThemeContextType extends PropsWithChildren {
|
|
217
|
+
customVariables?: Partial<Record<ThemeVariables, string>>;
|
|
218
|
+
customDarkVariables?: Partial<Record<ThemeVariables, string>>;
|
|
219
|
+
}
|
|
220
|
+
export interface DarkModeProps {
|
|
221
|
+
darkMode: boolean;
|
|
222
|
+
setDarkMode: Dispatch<React.SetStateAction<boolean>>;
|
|
223
|
+
}
|
|
224
|
+
export interface DarkMode extends DarkModeProps {
|
|
225
|
+
onDarkModeChange: (value: boolean) => void;
|
|
226
|
+
}
|
|
227
|
+
export interface renderOptions {
|
|
228
|
+
scale?: number;
|
|
229
|
+
rotate?: number;
|
|
230
|
+
renderForms?: boolean;
|
|
231
|
+
}
|
|
232
|
+
export interface License {
|
|
233
|
+
validating?: boolean;
|
|
234
|
+
isValid: boolean;
|
|
235
|
+
invalidatedMessage?: string;
|
|
236
|
+
type?: LicenseType;
|
|
237
|
+
}
|
|
238
|
+
export declare enum LicenseType {
|
|
239
|
+
Organization = "organization",
|
|
240
|
+
Developer = "developer",
|
|
241
|
+
FreeTrial = "free-trial"
|
|
242
|
+
}
|
|
243
|
+
export type DecryptedLicense = {
|
|
244
|
+
exp: number;
|
|
245
|
+
avu: number;
|
|
246
|
+
t: LicenseType;
|
|
247
|
+
dmt: 'specific' | 'wildcard';
|
|
248
|
+
dm: string;
|
|
249
|
+
n: string;
|
|
250
|
+
};
|
|
251
|
+
export interface PdfPage {
|
|
252
|
+
page: PDFPageProxy;
|
|
253
|
+
thumbnailViewport: PageViewport;
|
|
254
|
+
thumbnailScale: number;
|
|
255
|
+
defaultRotation: number;
|
|
256
|
+
}
|
|
257
|
+
export interface SetPageResult {
|
|
258
|
+
success: boolean;
|
|
259
|
+
currentPage: number;
|
|
260
|
+
}
|
|
261
|
+
export interface PageControl {
|
|
262
|
+
focusedPage: number;
|
|
263
|
+
setFocusedPage: (page: number | string) => void;
|
|
264
|
+
goToPage: (page: number | string) => SetPageResult;
|
|
265
|
+
totalPages: number;
|
|
266
|
+
setTotalPages: (page: number) => void;
|
|
267
|
+
nextPage: () => void;
|
|
268
|
+
prevPage: () => void;
|
|
269
|
+
}
|
|
270
|
+
export interface PageControlContextType extends PageControl {
|
|
271
|
+
}
|
|
272
|
+
export interface ThumbnailContextType {
|
|
273
|
+
thumbnailPages: Record<number, ThumbnailRenderedList>;
|
|
274
|
+
addPage: (page: number) => void;
|
|
275
|
+
addToPage: (page: number) => void;
|
|
276
|
+
thumbnailLength: number;
|
|
277
|
+
active: boolean;
|
|
278
|
+
setActive: React.Dispatch<React.SetStateAction<boolean>>;
|
|
279
|
+
}
|
|
280
|
+
export interface FileDragDropControl {
|
|
281
|
+
dragging: boolean;
|
|
282
|
+
handleDragLeave: (event: React.DragEvent) => void;
|
|
283
|
+
handleDragEnter: (event: React.DragEvent) => void;
|
|
284
|
+
handleDrop: (event: React.DragEvent) => void;
|
|
285
|
+
}
|
|
286
|
+
export interface ThumbnailRenderedList {
|
|
287
|
+
loading: boolean;
|
|
288
|
+
page: PDFPageProxy;
|
|
289
|
+
thumbnailSrc?: string;
|
|
290
|
+
viewport: PageViewport;
|
|
291
|
+
scale: number;
|
|
292
|
+
defaultRotation: number;
|
|
293
|
+
}
|
|
294
|
+
export declare enum ViewMode {
|
|
295
|
+
SINGLE_PAGE = "Single",
|
|
296
|
+
DUAL_PAGE = "Dual"
|
|
297
|
+
}
|
|
298
|
+
export type PDFSrc = string | URL | TypedArray | PDFDataRangeTransport | DocumentInitParameters | undefined | null;
|
|
299
|
+
export type RPSrc = Omit<PDFSrc, 'DocumentInitParameters' | 'PDFDataRangeTransport'>;
|
|
300
|
+
export interface FullScreenToolProps {
|
|
301
|
+
isFullScreen: boolean;
|
|
302
|
+
toggleFullScreen: () => void;
|
|
303
|
+
isSupported?: boolean;
|
|
304
|
+
}
|
|
305
|
+
export interface OpenFileToolProps {
|
|
306
|
+
openFile: () => void;
|
|
307
|
+
}
|
|
308
|
+
export interface DownloadToolProps {
|
|
309
|
+
download: () => void;
|
|
310
|
+
}
|
|
311
|
+
export interface PageNavigationToolProps {
|
|
312
|
+
total: number;
|
|
313
|
+
current: number;
|
|
314
|
+
nextPage: () => void;
|
|
315
|
+
prevPage: () => void;
|
|
316
|
+
changePage: (page: number) => void;
|
|
317
|
+
goToPage: (page: number) => SetPageResult;
|
|
318
|
+
}
|
|
319
|
+
export interface PreparePrintProgress {
|
|
320
|
+
loadedPages: number;
|
|
321
|
+
totalPages: number;
|
|
322
|
+
percentage: number;
|
|
323
|
+
}
|
|
324
|
+
export interface PrintToolProps {
|
|
325
|
+
print: () => void;
|
|
326
|
+
cancel: () => void;
|
|
327
|
+
setOnProgress: (callback: (progress: PreparePrintProgress) => void) => void;
|
|
328
|
+
setOnComplete: (callback: () => void) => void;
|
|
329
|
+
setOnError: (callback: (error: Error) => void) => void;
|
|
330
|
+
progress: PreparePrintProgress;
|
|
331
|
+
}
|
|
332
|
+
export interface ThumbnailToolProps {
|
|
333
|
+
onClick: () => void;
|
|
334
|
+
active: boolean;
|
|
335
|
+
}
|
|
336
|
+
export interface RPSlots extends RPHorizontalBarSlots, RPVerticalBarSlots {
|
|
337
|
+
sidebarEnable?: boolean;
|
|
338
|
+
}
|
|
339
|
+
export interface RPIcons extends RPHorizontalBarIcons, RPVerticalBarIcons {
|
|
340
|
+
}
|
|
341
|
+
export interface PdfProperties {
|
|
342
|
+
filename: string;
|
|
343
|
+
fileSize: string;
|
|
344
|
+
title: string;
|
|
345
|
+
author: string;
|
|
346
|
+
subject: string;
|
|
347
|
+
keywords: string;
|
|
348
|
+
creator: string;
|
|
349
|
+
createdOn: string;
|
|
350
|
+
modifiedOn: string;
|
|
351
|
+
pdfProducer: string;
|
|
352
|
+
pdfVersion: string;
|
|
353
|
+
pageCount?: number;
|
|
354
|
+
}
|
|
355
|
+
export interface ConfigContextType {
|
|
356
|
+
workerUrlAdded: boolean;
|
|
357
|
+
}
|
|
358
|
+
export declare enum ThemeVariables {
|
|
359
|
+
FONT_FAMILY = "--rp-font-family",
|
|
360
|
+
PRIMARY_COLOR = "--rp-primary-color",
|
|
361
|
+
BORDER_RADIUS = "--rp-border-radius",
|
|
362
|
+
TEXT_COLOR = "--rp-text-color",
|
|
363
|
+
OUTLINE_COLOR = "--rp-outline-color",
|
|
364
|
+
FONT_SIZE = "--rp-font-size",
|
|
365
|
+
DROP_MASK_BACKGROUND_COLOR = "--rp-drop-mask-background-color",
|
|
366
|
+
LOADER_BACKDROP_COLOR = "--rp-loader-backdrop-color",
|
|
367
|
+
ICON_DISABLED = "--rp-icon-disabled",
|
|
368
|
+
ICON_FONT_SIZE = "--rp-icon-font-size",
|
|
369
|
+
TOOLBAR_BACKGROUND = "--rp-toolbar-background",
|
|
370
|
+
TOOLBAR_BORDER_COLOR = "--rp-toolbar-border-color",
|
|
371
|
+
TOOLBAR_PADDING = "--rp-toolbar-padding",
|
|
372
|
+
TOOLBAR_GAP = "--rp-toolbar-gap",
|
|
373
|
+
TOOLBAR_SIZE = "--rp-toolbar-size",
|
|
374
|
+
SIDEBAR_WIDTH = "--rp-sidebar-width",
|
|
375
|
+
THUMBNAIL_BORDER_COLOR = "--rp-thumbnail-border-color",
|
|
376
|
+
THUMBNAIL_BACKGROUND_COLOR = "--rp-thumbnail-background-color",
|
|
377
|
+
THUMBNAIL_ACTIVE_COLOR = "--rp-thumbnail-active-color",
|
|
378
|
+
THUMBNAIL_PADDING_Y = "--rp-thumbnail-padding-y",
|
|
379
|
+
BUTTON_HOVER_BACKGROUND = "--rp-button-hover-background",
|
|
380
|
+
BUTTON_PADDING = "--rp-button-padding",
|
|
381
|
+
INPUT_PADDING = "--rp-input-padding",
|
|
382
|
+
INPUT_BORDER_RADIUS = "--rp-input-border-radius",
|
|
383
|
+
INPUT_BACKGROUND_COLOR = "--rp-input-background-color",
|
|
384
|
+
INPUT_PLACEHOLDER_COLOR = "--rp-input-placeholder-color",
|
|
385
|
+
PAGES_BACKGROUND_COLOR = "--rp-pages-background-color",
|
|
386
|
+
ANNOTATION_LAYER_LINK_HOVER_BACKGROUND = "--rp-annotation-layer__link-hover-background",
|
|
387
|
+
DROPDOWN_BACKGROUND_COLOR = "--rp-dropdown-background-color",
|
|
388
|
+
DROPDOWN_PADDING = "--rp-dropdown-padding",
|
|
389
|
+
DROPDOWN_HOVER_BACKGROUND_COLOR = "--rp-dropdown-hover-background-color",
|
|
390
|
+
DROPDOWN_SEPARATOR_COLOR = "--rp-dropdown-separator-color",
|
|
391
|
+
DROPDOWN_SEPARATOR_MARGIN = "--rp-dropdown-separator-margin",
|
|
392
|
+
DROPDOWN_PADDING_MENU_ITEM = "--rp-dropdown-padding-menu-item",
|
|
393
|
+
DROPDOWN_FONT_SIZE = "--rp-dropdown-font-size",
|
|
394
|
+
DROPDOWN_BORDER_RADIUS = "--rp-dropdown-border-radius",
|
|
395
|
+
SEARCH_TOOL_DROPDOWN_PADDING = "--rp-search-tool-dropdown-padding",
|
|
396
|
+
POPOVER_FONT_SIZE = "--rp-popover-font-size",
|
|
397
|
+
POPOVER_BACKGROUND_COLOR = "--rp-popover-background-color",
|
|
398
|
+
POPOVER_COLOR = "--rp-popover-color",
|
|
399
|
+
POPOVER_BORDER_COLOR = "--rp-popover-border-color",
|
|
400
|
+
POPOVER_BORDER_RADIUS = "--rp-popover-border-radius",
|
|
401
|
+
OVERLAY_BACKGROUND_COLOR = "--rp-overlay-background-color",
|
|
402
|
+
DIALOG_BACKGROUND_COLOR = "--rp-dialog-background-color",
|
|
403
|
+
PROPERTIES_DIVIDER_COLOR = "--rp-properties-divider-color",
|
|
404
|
+
PROPERTIES_DIVIDER_MARGIN = "--rp-properties-divider-margin",
|
|
405
|
+
PROPERTY_ITEM_GAP = "--rp-property-item-gap",
|
|
406
|
+
DIALOG_TITLE_COLOR = "--rp-dialog-title-color",
|
|
407
|
+
PROPERTY_ITEM_LABEL_COLOR = "--rp-property-item-label-color",
|
|
408
|
+
PROPERTY_CLOSE_ICON_SIZE = "--rp-property-close-icon-size",
|
|
409
|
+
PROPERTY_ITEM_FONT_SIZE = "--rp-property-item-font-size",
|
|
410
|
+
PROPERTY_ITEM_FONT_WEIGHT = "--rp-property-item-font-weight",
|
|
411
|
+
DIALOG_TITLE_FONT_SIZE = "--rp-dialog-title-font-size",
|
|
412
|
+
DIALOG_TITLE_FONT_WEIGHT = "--rp-dialog-title-font-weight",
|
|
413
|
+
MENU_ITEM_ICON_SIZE = "--rp-menu-item-icon-size",
|
|
414
|
+
PRINT_PROGRESS_BACKGROUND = "--rp-print-progress-background",
|
|
415
|
+
PRINT_PROGRESS_COLOR = "--rp-print-progress-color",
|
|
416
|
+
DROP_ZONE_BORDER = "--rp-drop-zone-border",
|
|
417
|
+
DROP_ZONE_FONT_COLOR = "--rp-drop-zone-font-color",
|
|
418
|
+
DROP_ZONE_FONT_SIZE = "--rp-drop-zone-font-size",
|
|
419
|
+
DROP_ZONE_BACKGROUND_COLOR = "--rp-drop-zone-background-color",
|
|
420
|
+
CHECKBOX_BORDER_RADIUS = "--rp-checkbox-border-radius",
|
|
421
|
+
CHECKBOX_BORDER_COLOR = "--rp-checkbox-border-color",
|
|
422
|
+
CHECKBOX_INDICATOR_COLOR = "--rp-checkbox-indicator-color",
|
|
423
|
+
HIGHLIGHT_BACKGROUND_COLOR = "--rp-highlight-background-color",
|
|
424
|
+
TEXT_LAYER_HIGHLIGHT_BORDER_RADIUS = "--rp-text-layer-highlight-border-radius",
|
|
425
|
+
CURRENT_HIGHLIGHT_BACKGROUND_COLOR = "--rp-current-highlight-background-color",
|
|
426
|
+
TOOLTIP_BACKGROUND_COLOR = "--rp-tooltip-background-color",
|
|
427
|
+
TOOLTIP_BORDER_RADIUS = "--rp-tooltip-border-radius",
|
|
428
|
+
TOOLTIP_FONT_COLOR = "--rp-tooltip-font-color",
|
|
429
|
+
TOOLTIP_FONT_SIZE = "--rp-tooltip-font-size",
|
|
430
|
+
TOOLTIP_PADDING = "--rp-tooltip-padding",
|
|
431
|
+
PASSWORD_MODAL_BACKGROUND_COLOR = "--rp-password-background-color",
|
|
432
|
+
PASSWORD_MODAL_TITLE_FONT_COLOR = "--rp-password-title-font-color",
|
|
433
|
+
PASSWORD_MODAL_CONTENT_FONT_COLOR = "--rp-password-content-font-color",
|
|
434
|
+
PASSWORD_MODAL_INPUT_PLACEHOLDER_COLOR = "--rp-password-input-placeholder-color",
|
|
435
|
+
PASSWORD_MODAL_INPUT_BORDER_COLOR = "--rp-password-input-border-color",
|
|
436
|
+
PASSWORD_MODAL_INPUT_FONT_COLOR = "--rp-password-input-font-color",
|
|
437
|
+
PASSWORD_MODAL_BUTTON_FONT_COLOR = "--rp-password-button-font-color",
|
|
438
|
+
PASSWORD_MODAL_BUTTON_BACKGROUND_COLOR = "--rp-password-button-background-color",
|
|
439
|
+
PASSWORD_MODAL_BUTTON_BORDER_COLOR = "--rp-password-button-border-color",
|
|
440
|
+
PASSWORD_MODAL_BORDER_COLOR = "--rp-password-border-color",
|
|
441
|
+
CONTAINER_FOCUS_OUTLINE_WIDTH = "--rp-container-focus-outline-width",
|
|
442
|
+
CONTAINER_FOCUS_OUTLINE_COLOR = "--rp-container-focus-outline-color",
|
|
443
|
+
CONTAINER_FOCUS_OUTLINE_OFFSET = "--rp-container-focus-outline-offset",
|
|
444
|
+
BUTTON_BORDER_RADIUS = "--rp-button-border-radius"
|
|
445
|
+
}
|
|
446
|
+
export interface DarkModeProviderProps extends PropsWithChildren, Partial<Omit<DarkMode, 'setDarkMode'>> {
|
|
447
|
+
}
|
|
448
|
+
export interface RotateProviderProps extends PropsWithChildren {
|
|
449
|
+
initialRotation?: number;
|
|
450
|
+
}
|
|
451
|
+
export interface LayerProviderProps extends PropsWithChildren {
|
|
452
|
+
textLayer?: boolean;
|
|
453
|
+
}
|
|
454
|
+
export type RPThemeProps = RPThemeContextType;
|
|
455
|
+
export interface CharacterMap {
|
|
456
|
+
url: string;
|
|
457
|
+
isCompressed: boolean;
|
|
458
|
+
}
|
|
459
|
+
export interface RPProviderProps extends PropsWithChildren, LoadPDFOptions, RPControllerProps {
|
|
460
|
+
src: RPSrc;
|
|
461
|
+
workerUrl?: string;
|
|
462
|
+
characterMap?: CharacterMap;
|
|
463
|
+
}
|
|
464
|
+
export type LocalizationMap = Record<string, Localization>;
|
|
465
|
+
export interface RPControllerProps extends PropsWithChildren, DarkModeProviderProps, RotateProviderProps, LayerProviderProps, ZoomProviderProps, PageProviderProps, ViewModeInitialProps, ScrollModeInitialProps {
|
|
466
|
+
initialSearch?: string;
|
|
467
|
+
initialThumbnailsVisible?: boolean;
|
|
468
|
+
locale?: string;
|
|
469
|
+
localization?: LocalizationMap;
|
|
470
|
+
downloadFilename?: string;
|
|
471
|
+
}
|
|
472
|
+
export interface RPConfigProps extends Omit<ConfigContextType, 'workerUrlAdded'>, RPThemeContextType, PropsWithChildren {
|
|
473
|
+
workerUrl?: string;
|
|
474
|
+
licenseKey?: string;
|
|
475
|
+
}
|
|
476
|
+
export interface RPDefaultLayoutProps extends PropsWithChildren, ViewportProps {
|
|
477
|
+
slots?: RPSlots;
|
|
478
|
+
icons?: RPIcons;
|
|
479
|
+
style?: React.CSSProperties;
|
|
480
|
+
className?: string;
|
|
481
|
+
onLoaded?: () => void;
|
|
482
|
+
cleanupOnLoaded?: () => void;
|
|
483
|
+
}
|
|
484
|
+
export interface RPLayoutProps extends PropsWithChildren, ViewportProps {
|
|
485
|
+
toolbar?: boolean | Partial<ToolbarProps>;
|
|
486
|
+
style?: React.CSSProperties;
|
|
487
|
+
className?: string;
|
|
488
|
+
onLoaded?: () => void;
|
|
489
|
+
cleanupOnLoaded?: () => void;
|
|
490
|
+
}
|
|
491
|
+
export interface DimensionPagesContextType {
|
|
492
|
+
widths: number[];
|
|
493
|
+
heights: number[];
|
|
494
|
+
setWidths: React.Dispatch<React.SetStateAction<number[]>>;
|
|
495
|
+
setHeights: React.Dispatch<React.SetStateAction<number[]>>;
|
|
496
|
+
}
|
|
497
|
+
export interface ZoomContextType {
|
|
498
|
+
zoomLevel: number | ZoomLevel;
|
|
499
|
+
currentZoom: number;
|
|
500
|
+
setZoomLevel: (callback: number | ZoomLevel | ((prev: number) => number | ZoomLevel)) => void;
|
|
501
|
+
}
|
|
502
|
+
export type ZoomProps = Omit<ZoomContextType, 'currentZoom'>;
|
|
503
|
+
export type InitialStateContextType = {
|
|
504
|
+
instanceId: string;
|
|
505
|
+
} & ZoomProviderProps & PageProviderProps & ViewModeInitialProps & ScrollModeInitialProps & RotateProviderProps;
|
|
506
|
+
export interface ZoomProviderProps {
|
|
507
|
+
initialScale?: number | ZoomLevel;
|
|
508
|
+
}
|
|
509
|
+
export interface PageProviderProps {
|
|
510
|
+
initialPage?: number;
|
|
511
|
+
}
|
|
512
|
+
export interface ViewModeContextType {
|
|
513
|
+
columnCount: number;
|
|
514
|
+
setSinglePage: () => void;
|
|
515
|
+
setDualPage: () => void;
|
|
516
|
+
viewMode: ViewMode;
|
|
517
|
+
}
|
|
518
|
+
export interface ViewModeInitialProps {
|
|
519
|
+
initialViewMode?: ViewMode;
|
|
520
|
+
}
|
|
521
|
+
export interface ViewportProps {
|
|
522
|
+
mobileWidth?: number;
|
|
523
|
+
onLayoutWidthChange?: (isMobileScreen: boolean, currentWidth: number) => void;
|
|
524
|
+
}
|
|
525
|
+
export declare enum ScrollMode {
|
|
526
|
+
PAGE_SCROLLING = "PAGE",
|
|
527
|
+
VERTICAL_SCROLLING = "VERTICAL",
|
|
528
|
+
HORIZONTAL_SCROLLING = "HORIZONTAL"
|
|
529
|
+
}
|
|
530
|
+
export interface ScrollModeContextType {
|
|
531
|
+
scrollMode: ScrollMode;
|
|
532
|
+
setScrollMode: (mode: ScrollMode) => void;
|
|
533
|
+
}
|
|
534
|
+
export interface ScrollModeInitialProps {
|
|
535
|
+
initialScrollMode?: ScrollMode;
|
|
536
|
+
}
|
|
537
|
+
export interface RectPosition {
|
|
538
|
+
left: number;
|
|
539
|
+
top: number;
|
|
540
|
+
width: number;
|
|
541
|
+
height: number;
|
|
542
|
+
}
|
|
543
|
+
export interface Match {
|
|
544
|
+
start: {
|
|
545
|
+
idx: number;
|
|
546
|
+
offset: number;
|
|
547
|
+
};
|
|
548
|
+
end: {
|
|
549
|
+
idx: number;
|
|
550
|
+
offset: number;
|
|
551
|
+
};
|
|
552
|
+
str: string;
|
|
553
|
+
oIndex: number;
|
|
554
|
+
pageIndex: number;
|
|
555
|
+
rect: RectPosition;
|
|
556
|
+
}
|
|
557
|
+
export interface MatchValue extends Match {
|
|
558
|
+
page: number;
|
|
559
|
+
pageMatchIdx: number;
|
|
560
|
+
}
|
|
561
|
+
export interface SearchOptions {
|
|
562
|
+
matchCase?: boolean;
|
|
563
|
+
wholeWords?: boolean;
|
|
564
|
+
}
|
|
565
|
+
export type TextItem = {
|
|
566
|
+
/**
|
|
567
|
+
* - Text content.
|
|
568
|
+
*/
|
|
569
|
+
str: string;
|
|
570
|
+
/**
|
|
571
|
+
* - Text direction: 'ttb', 'ltr' or 'rtl'.
|
|
572
|
+
*/
|
|
573
|
+
dir: string;
|
|
574
|
+
/**
|
|
575
|
+
* - Transformation matrix.
|
|
576
|
+
*/
|
|
577
|
+
transform: Array<any>;
|
|
578
|
+
/**
|
|
579
|
+
* - Width in device space.
|
|
580
|
+
*/
|
|
581
|
+
width: number;
|
|
582
|
+
/**
|
|
583
|
+
* - Height in device space.
|
|
584
|
+
*/
|
|
585
|
+
height: number;
|
|
586
|
+
/**
|
|
587
|
+
* - Font name used by PDF.js for converted font.
|
|
588
|
+
*/
|
|
589
|
+
fontName: string;
|
|
590
|
+
/**
|
|
591
|
+
* - Indicating if the text content is followed by a
|
|
592
|
+
* line-break.
|
|
593
|
+
*/
|
|
594
|
+
hasEOL: boolean;
|
|
595
|
+
};
|
|
596
|
+
export interface SearchContextType {
|
|
597
|
+
search: string;
|
|
598
|
+
setSearch: Dispatch<SetStateAction<string>>;
|
|
599
|
+
loading: boolean;
|
|
600
|
+
matches: MatchValue[];
|
|
601
|
+
totalMatches: number;
|
|
602
|
+
currentMatchPosition: number;
|
|
603
|
+
currentMatch: MatchValue | null;
|
|
604
|
+
nextMatch: () => void;
|
|
605
|
+
prevMatch: () => void;
|
|
606
|
+
searchOptions: SearchOptions;
|
|
607
|
+
setSearchOptions: Dispatch<SetStateAction<SearchOptions>>;
|
|
608
|
+
currentMatchElement: HTMLElement | null;
|
|
609
|
+
setCurrentMatchElement: Dispatch<SetStateAction<HTMLElement | null>>;
|
|
610
|
+
}
|
|
611
|
+
export declare enum SelectionMode {
|
|
612
|
+
TEXT = "TEXT",
|
|
613
|
+
HAND = "HAND"
|
|
614
|
+
}
|
|
615
|
+
export interface SelectionModeContextType {
|
|
616
|
+
selectionMode: SelectionMode;
|
|
617
|
+
setSelectionMode: (mode: SelectionMode) => void;
|
|
618
|
+
}
|
|
619
|
+
export interface SelectionModeProviderProps {
|
|
620
|
+
initialSelectionMode?: SelectionMode;
|
|
621
|
+
}
|
|
622
|
+
export type LoaderImage = JSX.Element | string;
|
|
623
|
+
export interface LoadPDFOptions {
|
|
624
|
+
onLoadError?: (error: any) => void;
|
|
625
|
+
onLoaded?: (pdfDocument: PDFDocumentProxy) => void;
|
|
626
|
+
loaderImage?: LoaderImage;
|
|
627
|
+
}
|
|
628
|
+
export interface ScrollPosition {
|
|
629
|
+
left: number;
|
|
630
|
+
top: number;
|
|
631
|
+
}
|
|
632
|
+
export declare const Locales: LocalizationMap;
|
|
633
|
+
export interface LocalizationContextType {
|
|
634
|
+
localeMessages?: Localization;
|
|
635
|
+
}
|
|
636
|
+
export interface LocalizationProps {
|
|
637
|
+
locale?: string;
|
|
638
|
+
localization?: LocalizationMap;
|
|
639
|
+
}
|
|
640
|
+
export interface LoaderContextType {
|
|
641
|
+
LoaderImageComponent?: React.FC;
|
|
642
|
+
}
|
|
643
|
+
export interface TextHighlight {
|
|
644
|
+
keyword: string | RegExp;
|
|
645
|
+
highlightColor: string;
|
|
646
|
+
options?: SearchOptions;
|
|
647
|
+
}
|
|
648
|
+
export interface UseHighlight {
|
|
649
|
+
highlight: (value: TextHighlight[]) => Promise<void>;
|
|
650
|
+
highlightMatches: MatchHighlight[];
|
|
651
|
+
highlightKeywords: TextHighlight[] | undefined;
|
|
652
|
+
clear: () => void;
|
|
653
|
+
}
|
|
654
|
+
export interface useElementPage {
|
|
655
|
+
updateElement: (pageNumber: number, element: (prevElements: Array<HTMLElement | JSX.Element>, dimension: {
|
|
656
|
+
width: number;
|
|
657
|
+
height: number;
|
|
658
|
+
}, rotate: number, zoomLevel: number) => Array<HTMLElement | JSX.Element>) => void;
|
|
659
|
+
removeElement: (pageNumber: number, index: number) => void;
|
|
660
|
+
clearElements: (pageNumber: number) => void;
|
|
661
|
+
elementList: Record<number, Array<HTMLElement | JSX.Element>>;
|
|
662
|
+
}
|
|
663
|
+
export interface MatchHighlight extends MatchValue {
|
|
664
|
+
keyword: string | RegExp;
|
|
665
|
+
color: string;
|
|
666
|
+
}
|
|
667
|
+
export interface FlagKeyword {
|
|
668
|
+
keyword: string;
|
|
669
|
+
matchCase?: boolean;
|
|
670
|
+
wholeWords?: boolean;
|
|
671
|
+
}
|
|
672
|
+
export type SingleKeyword = string | RegExp | FlagKeyword;
|
|
673
|
+
export interface NormalizedKeyword {
|
|
674
|
+
keyword: string;
|
|
675
|
+
regExp: RegExp;
|
|
676
|
+
wholeWords: boolean;
|
|
677
|
+
color?: string;
|
|
678
|
+
}
|
|
679
|
+
export interface MatchRangeIndex {
|
|
680
|
+
keyword: RegExp;
|
|
681
|
+
startIndex: number;
|
|
682
|
+
endIndex: number;
|
|
683
|
+
}
|
|
684
|
+
export interface HighlightArea {
|
|
685
|
+
keywordStr: string;
|
|
686
|
+
left: number;
|
|
687
|
+
top: number;
|
|
688
|
+
height: number;
|
|
689
|
+
width: number;
|
|
690
|
+
pageHeight: number;
|
|
691
|
+
pageWidth: number;
|
|
692
|
+
highlightColor?: string;
|
|
693
|
+
}
|
|
694
|
+
export interface CharacterIndex {
|
|
695
|
+
char: string;
|
|
696
|
+
charIdxInSpan: number;
|
|
697
|
+
spanIdx: number;
|
|
698
|
+
}
|
|
699
|
+
export interface ToolbarLayoutProps {
|
|
700
|
+
children: React.ReactNode;
|
|
701
|
+
toolbar?: boolean | Partial<ToolbarProps>;
|
|
702
|
+
}
|
|
703
|
+
export interface ToolProps {
|
|
704
|
+
icon?: React.ReactNode;
|
|
705
|
+
}
|
|
706
|
+
export interface ThemeSwitcherIcons {
|
|
707
|
+
lightModeIcon?: React.ReactNode;
|
|
708
|
+
darkModeIcon?: React.ReactNode;
|
|
709
|
+
}
|
|
710
|
+
export interface ThemeSwitcherToolProps {
|
|
711
|
+
icons?: ThemeSwitcherIcons;
|
|
712
|
+
}
|
|
713
|
+
export interface ToolbarSection {
|
|
714
|
+
component: React.ReactNode;
|
|
715
|
+
}
|
|
716
|
+
export interface ToolbarProps {
|
|
717
|
+
topbar: boolean | Partial<ToolbarSection>;
|
|
718
|
+
leftSidebar: boolean | Partial<ToolbarSection>;
|
|
719
|
+
}
|
|
720
|
+
export interface RPHorizontalBarSlots {
|
|
721
|
+
themeSwitcher?: boolean | FC<Omit<DarkModeProps, 'onDarkModeChange'>>;
|
|
722
|
+
documentProperties?: boolean;
|
|
723
|
+
rotateTool?: boolean;
|
|
724
|
+
fullscreenTool?: boolean | FC<FullScreenToolProps>;
|
|
725
|
+
openFileTool?: boolean | FC<OpenFileToolProps>;
|
|
726
|
+
dropFileZone?: boolean | React.ReactNode | React.ComponentType;
|
|
727
|
+
downloadTool?: boolean | FC<DownloadToolProps>;
|
|
728
|
+
zoomTool?: boolean | FC<ZoomProps>;
|
|
729
|
+
viewModeTool?: boolean;
|
|
730
|
+
scrollModeTool?: boolean;
|
|
731
|
+
pageNavigationTool?: boolean | FC<PageNavigationToolProps>;
|
|
732
|
+
printTool?: boolean | FC<PrintToolProps>;
|
|
733
|
+
containerWidthSm?: number;
|
|
734
|
+
showPrintProgress?: boolean;
|
|
735
|
+
selectionModeTool?: boolean;
|
|
736
|
+
searchTool?: boolean;
|
|
737
|
+
jumpNavigationTool?: boolean;
|
|
738
|
+
}
|
|
739
|
+
export interface RPHorizontalBarIcons {
|
|
740
|
+
goToFirstPageIcon?: React.ReactNode;
|
|
741
|
+
goToLastPageIcon?: React.ReactNode;
|
|
742
|
+
lightModeIcon?: React.ReactNode;
|
|
743
|
+
darkModeIcon?: React.ReactNode;
|
|
744
|
+
nextIcon?: React.ReactNode;
|
|
745
|
+
prevIcon?: React.ReactNode;
|
|
746
|
+
fullScreenIcon?: React.ReactNode;
|
|
747
|
+
downloadIcon?: React.ReactNode;
|
|
748
|
+
zoomInIcon?: React.ReactNode;
|
|
749
|
+
zoomOutIcon?: React.ReactNode;
|
|
750
|
+
openFileIcon?: React.ReactNode;
|
|
751
|
+
rotateClockwiseIcon?: React.ReactNode;
|
|
752
|
+
rotateCounterClockwiseIcon?: React.ReactNode;
|
|
753
|
+
singlePageIcon?: React.ReactNode;
|
|
754
|
+
dualPageIcon?: React.ReactNode;
|
|
755
|
+
pageScrollIcon?: React.ReactNode;
|
|
756
|
+
verticalScrollIcon?: React.ReactNode;
|
|
757
|
+
horizontalScrollIcon?: React.ReactNode;
|
|
758
|
+
documentPropertiesIcon?: React.ReactNode;
|
|
759
|
+
printIcon?: React.ReactNode;
|
|
760
|
+
searchIcon?: React.ReactNode;
|
|
761
|
+
textSelectionIcon?: React.ReactNode;
|
|
762
|
+
handModeIcon?: React.ReactNode;
|
|
763
|
+
}
|
|
764
|
+
export interface RPHorizontalBarProps {
|
|
765
|
+
slots?: RPHorizontalBarSlots;
|
|
766
|
+
icons?: RPHorizontalBarIcons;
|
|
767
|
+
}
|
|
768
|
+
export interface RPVerticalBarSlots {
|
|
769
|
+
thumbnailTool?: boolean | FC<ThumbnailToolProps>;
|
|
770
|
+
}
|
|
771
|
+
export interface RPVerticalBarIcons {
|
|
772
|
+
thumbnailIcon?: React.ReactNode;
|
|
773
|
+
}
|
|
774
|
+
export interface RPVerticalBarProps {
|
|
775
|
+
slots?: RPVerticalBarSlots;
|
|
776
|
+
icons?: RPVerticalBarIcons;
|
|
777
|
+
}
|
|
778
|
+
export interface RPMoreOptionsSlots {
|
|
779
|
+
openFileTool?: boolean;
|
|
780
|
+
downloadTool?: boolean;
|
|
781
|
+
printTool?: boolean;
|
|
782
|
+
fullscreenTool?: boolean;
|
|
783
|
+
jumpNavigationTool?: boolean;
|
|
784
|
+
rotateTool?: boolean;
|
|
785
|
+
selectionModeTool?: boolean;
|
|
786
|
+
viewModeTool?: boolean;
|
|
787
|
+
scrollModeTool?: boolean;
|
|
788
|
+
documentProperties?: boolean;
|
|
789
|
+
}
|
|
790
|
+
export interface RPMoreOptionsIcons {
|
|
791
|
+
openFileIcon?: React.ReactNode;
|
|
792
|
+
downloadIcon?: React.ReactNode;
|
|
793
|
+
printIcon?: React.ReactNode;
|
|
794
|
+
fullScreenIcon?: React.ReactNode;
|
|
795
|
+
goToFirstPageIcon?: React.ReactNode;
|
|
796
|
+
goToLastPageIcon?: React.ReactNode;
|
|
797
|
+
rotateClockwiseIcon?: React.ReactNode;
|
|
798
|
+
rotateCounterClockwiseIcon?: React.ReactNode;
|
|
799
|
+
textSelectionIcon?: React.ReactNode;
|
|
800
|
+
handModeIcon?: React.ReactNode;
|
|
801
|
+
singlePageIcon?: React.ReactNode;
|
|
802
|
+
dualPageIcon?: React.ReactNode;
|
|
803
|
+
pageScrollIcon?: React.ReactNode;
|
|
804
|
+
verticalScrollIcon?: React.ReactNode;
|
|
805
|
+
horizontalScrollIcon?: React.ReactNode;
|
|
806
|
+
documentPropertiesIcon?: React.ReactNode;
|
|
807
|
+
}
|
|
808
|
+
export interface RPMoreOptionsProps extends PropsWithChildren {
|
|
809
|
+
slots?: RPMoreOptionsSlots;
|
|
810
|
+
icons?: RPMoreOptionsIcons;
|
|
811
|
+
slotTop?: React.ReactNode;
|
|
812
|
+
slotBottom?: React.ReactNode;
|
|
813
|
+
}
|
|
814
|
+
export interface ToolVisible {
|
|
815
|
+
isToolVisible?: boolean;
|
|
816
|
+
}
|
|
817
|
+
export interface MoreOptionToolProps extends ToolVisible {
|
|
818
|
+
icon?: React.ReactNode;
|
|
819
|
+
}
|
|
820
|
+
export interface MostPageIcons {
|
|
821
|
+
firstPageIcon: React.ReactNode;
|
|
822
|
+
lastPageIcon: React.ReactNode;
|
|
823
|
+
}
|
|
824
|
+
export interface MostPageToolProps extends ToolVisible {
|
|
825
|
+
icons?: MostPageIcons;
|
|
826
|
+
}
|
|
827
|
+
export interface RotateIcons {
|
|
828
|
+
rotateClockwiseIcon: React.ReactNode;
|
|
829
|
+
rotateCounterClockwiseIcon: React.ReactNode;
|
|
830
|
+
}
|
|
831
|
+
export interface RotateToolProps extends ToolVisible {
|
|
832
|
+
icons?: RotateIcons;
|
|
833
|
+
}
|
|
834
|
+
export interface SelectionModeIcons {
|
|
835
|
+
textSelectionIcon: React.ReactNode;
|
|
836
|
+
handModeIcon: React.ReactNode;
|
|
837
|
+
}
|
|
838
|
+
export interface SelectionModeProps extends ToolVisible {
|
|
839
|
+
icons?: SelectionModeIcons;
|
|
840
|
+
}
|
|
841
|
+
export interface ViewModeIcons {
|
|
842
|
+
singlePageIcon: React.ReactNode;
|
|
843
|
+
dualPageIcon: React.ReactNode;
|
|
844
|
+
}
|
|
845
|
+
export interface ViewModeProps extends ToolVisible {
|
|
846
|
+
icons?: ViewModeIcons;
|
|
847
|
+
}
|
|
848
|
+
export interface ScrollModeIcons {
|
|
849
|
+
pageScrollIcon: React.ReactNode;
|
|
850
|
+
verticalScrollIcon: React.ReactNode;
|
|
851
|
+
horizontalScrollIcon: React.ReactNode;
|
|
852
|
+
}
|
|
853
|
+
export interface ScrollModeProps extends ToolVisible {
|
|
854
|
+
icons?: ScrollModeIcons;
|
|
855
|
+
}
|
|
856
|
+
export {};
|