@react-pdf-kit/viewer 0.0.0-experimental.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/Combination-54a77a7a.js +701 -0
- package/dist/MostPageTool.module-13578ad6.js +6 -0
- package/dist/OtherTool.module-a4be5f1f.js +6 -0
- package/dist/Paginate.module-4eef00aa.js +8 -0
- package/dist/PaginationContext-9217cab4.js +201 -0
- package/dist/RPLayout.module-b4b23e29.js +14 -0
- package/dist/RPSplitter-f6acf13b.js +71 -0
- package/dist/RPToolbar.module-27d7fe77.js +10 -0
- package/dist/RotateTool.module-67946714.js +6 -0
- package/dist/SearchTool.module-99f60dc7.js +16 -0
- package/dist/ToolbarLayout.module-6e339802.js +12 -0
- package/dist/ZoomTool.module-7082af8c.js +12 -0
- package/dist/assets/style.css +1 -0
- package/dist/assets/style.js +77 -0
- package/dist/clsx-0c6e471a.js +22 -0
- package/dist/components/RPConfig.js +17 -0
- package/dist/components/RPController.js +136 -0
- package/dist/components/RPDropFileZone.js +53 -0
- package/dist/components/RPPages.js +1049 -0
- package/dist/components/RPProvider.js +126 -0
- package/dist/components/RPTheme.js +22 -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/DualPageWithCoverIcon.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 +35 -0
- package/dist/components/layout/LayoutWrapper.js +11 -0
- package/dist/components/layout/RPDefaultLayout.js +238 -0
- package/dist/components/layout/RPLayout.js +213 -0
- package/dist/components/layout/SkipLink.js +29 -0
- package/dist/components/layout/WrapperLayout.js +26 -0
- package/dist/components/layout/sidebar/RPSidebar.js +107 -0
- package/dist/components/layout/sidebar/RPSplitter.js +8 -0
- package/dist/components/layout/sidebar/Thumbnail.js +145 -0
- package/dist/components/layout/sidebar/Thumbnails.js +77 -0
- package/dist/components/layout/toolbar/DarkModeTool.js +38 -0
- package/dist/components/layout/toolbar/DocumentDialog.js +314 -0
- package/dist/components/layout/toolbar/DocumentProperties.js +40 -0
- package/dist/components/layout/toolbar/FileDownloadTool.js +50 -0
- package/dist/components/layout/toolbar/FileUploadTool.js +49 -0
- package/dist/components/layout/toolbar/FullScreenTool.js +74 -0
- package/dist/components/layout/toolbar/MenuItem.js +19 -0
- package/dist/components/layout/toolbar/MenuSeparator.js +15 -0
- package/dist/components/layout/toolbar/MostPageTool.js +81 -0
- package/dist/components/layout/toolbar/OtherTool.js +199 -0
- package/dist/components/layout/toolbar/Paginate.js +145 -0
- package/dist/components/layout/toolbar/PrintTool.js +72 -0
- package/dist/components/layout/toolbar/PropertyItem.js +12 -0
- package/dist/components/layout/toolbar/RPMenuItem.js +33 -0
- package/dist/components/layout/toolbar/RPMoreOptions.js +220 -0
- package/dist/components/layout/toolbar/RPToolbar.js +151 -0
- package/dist/components/layout/toolbar/RPToolbarEnd.js +121 -0
- package/dist/components/layout/toolbar/RotateTool.js +60 -0
- package/dist/components/layout/toolbar/ScrollModeTool.js +68 -0
- package/dist/components/layout/toolbar/SearchCloseButton.js +32 -0
- package/dist/components/layout/toolbar/SearchResultNavigator.js +109 -0
- package/dist/components/layout/toolbar/SearchTool.js +264 -0
- package/dist/components/layout/toolbar/SelectionModeTool.js +52 -0
- package/dist/components/layout/toolbar/ThumbnailTool.js +39 -0
- package/dist/components/layout/toolbar/ToolbarCustom.js +108 -0
- package/dist/components/layout/toolbar/ToolbarDefault.js +192 -0
- package/dist/components/layout/toolbar/ToolbarLayout.js +154 -0
- package/dist/components/layout/toolbar/ViewModeTool.js +63 -0
- package/dist/components/layout/toolbar/ZoomTool.js +150 -0
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +54 -0
- package/dist/components/layout/toolbar/tools/DualPageTool.js +26 -0
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +204 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +35 -0
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +34 -0
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +199 -0
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +34 -0
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/InputPageTool.js +92 -0
- package/dist/components/layout/toolbar/tools/LastPageTool.js +199 -0
- package/dist/components/layout/toolbar/tools/NextPageTool.js +62 -0
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +62 -0
- package/dist/components/layout/toolbar/tools/PrintTool.js +35 -0
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +47 -0
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +48 -0
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +39 -0
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +26 -0
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +36 -0
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +46 -0
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +58 -0
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +27 -0
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +133 -0
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +58 -0
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +148 -0
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +42 -0
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +29 -0
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +52 -0
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +51 -0
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +43 -0
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +87 -0
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +52 -0
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +64 -0
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +73 -0
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +58 -0
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +67 -0
- package/dist/components/page/AnnotationLayer.js +145 -0
- package/dist/components/page/CanvasLayer.js +88 -0
- package/dist/components/page/CustomElement.js +53 -0
- package/dist/components/page/DualPage.js +100 -0
- package/dist/components/page/DualPageWithCover.js +132 -0
- package/dist/components/page/RPPage.js +144 -0
- package/dist/components/page/SinglePage.js +90 -0
- package/dist/components/page/TextHighlightLayer.js +198 -0
- package/dist/components/page/TextLayer.js +203 -0
- package/dist/components/page/searchHighlight.js +37 -0
- package/dist/components/ui/Button.js +25 -0
- package/dist/components/ui/Checkbox.js +273 -0
- package/dist/components/ui/DropDown.js +36 -0
- package/dist/components/ui/Input.js +28 -0
- package/dist/components/ui/LoadingIndicator.js +47 -0
- package/dist/components/ui/PasswordModal.js +75 -0
- package/dist/components/ui/RPTooltip.js +571 -0
- package/dist/contexts/ConfigContext.js +13 -0
- package/dist/contexts/DarkModeContext.js +28 -0
- package/dist/contexts/DimensionPagesContext.js +89 -0
- package/dist/contexts/DocumentPasswordContext.js +40 -0
- package/dist/contexts/DownloadContext.js +21 -0
- package/dist/contexts/DropFileZoneContext.js +62 -0
- package/dist/contexts/ElementPageContext.js +139 -0
- package/dist/contexts/EventCallbackContext.js +34 -0
- package/dist/contexts/FileInputContext.js +49 -0
- package/dist/contexts/FullScreenContext.js +25 -0
- package/dist/contexts/GlobalCurrentPage.js +19 -0
- package/dist/contexts/HighlightContext.js +31 -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 +16 -0
- package/dist/contexts/LoaderContext.js +27 -0
- package/dist/contexts/LocalizationContext.js +34 -0
- package/dist/contexts/OtherToolContext.js +18 -0
- package/dist/contexts/PageViewportContext.js +8 -0
- package/dist/contexts/PagesRotateContext.js +43 -0
- package/dist/contexts/PaginationContext.js +39 -0
- package/dist/contexts/PrintContext.js +78 -0
- package/dist/contexts/RPDocumentContext.js +69 -0
- package/dist/contexts/RenderQueueProvider.js +72 -0
- package/dist/contexts/RenderedPagesCache.js +14 -0
- package/dist/contexts/RotationContext.js +38 -0
- package/dist/contexts/ScrollModeContext.js +22 -0
- package/dist/contexts/SearchContext.js +96 -0
- package/dist/contexts/SelectionModeContext.js +24 -0
- package/dist/contexts/SmoothScaleContext.js +67 -0
- package/dist/contexts/SmoothScrollContext.js +12 -0
- package/dist/contexts/ThemeContext.js +7 -0
- package/dist/contexts/ThumbnailsContext.js +43 -0
- package/dist/contexts/ToolComponentContext.js +52 -0
- package/dist/contexts/ToolbarComponentContext.js +48 -0
- package/dist/contexts/ViewModeContext.js +33 -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 +107 -0
- package/dist/de_DE-a553b162.js +489 -0
- package/dist/floating-ui.react-dom-5ec29bd6.js +1327 -0
- package/dist/index-4baea9b5.js +1198 -0
- package/dist/index-655864a7.js +27 -0
- package/dist/index-c0faa594.js +309 -0
- package/dist/index-e3ee9457.js +150 -0
- package/dist/libInjectCss.js +9 -0
- package/dist/main.js +289 -0
- package/dist/types/assets/style.d.ts +1 -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/DualPageWithCoverIcon.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 +10 -0
- package/dist/types/components/layout/LayoutWrapper.d.ts +8 -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/SkipLink.d.ts +7 -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 +6 -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 +1 -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/DualPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/DualPageWithCoverTool.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/FirstPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FullScreenTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/HorizontalScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/InputPageTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/tools/LastPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/NextPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/PageScrollingTool.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/SelectionModeSwitcherTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/SinglePageTool.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/VerticalScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ZoomInTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ZoomLevelDisplay.d.ts +7 -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/DualPageWithCover.d.ts +5 -0
- package/dist/types/components/page/RPPage.d.ts +5 -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 +6 -0
- package/dist/types/components/ui/Checkbox.d.ts +10 -0
- package/dist/types/components/ui/DropDown.d.ts +10 -0
- package/dist/types/components/ui/Input.d.ts +6 -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 +9 -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/EventCallbackContext.d.ts +5 -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 +17 -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/SmoothScaleContext.d.ts +16 -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/libInjectCss.d.ts +1 -0
- package/dist/types/locales/de_DE.json.d.ts +83 -0
- package/dist/types/locales/en_US.json.d.ts +83 -0
- package/dist/types/locales/it_IT.json.d.ts +83 -0
- package/dist/types/locales/pt_PT.json.d.ts +83 -0
- package/dist/types/locales/th_TH.json.d.ts +83 -0
- package/dist/types/locales/zh_CN.json.d.ts +83 -0
- package/dist/types/main.d.ts +51 -0
- package/dist/types/utils/Queue.d.ts +18 -0
- package/dist/types/utils/annotations.d.ts +18 -0
- package/dist/types/utils/appConsole.d.ts +24 -0
- package/dist/types/utils/approximateFragtion.d.ts +9 -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/getElementPositionInPage.d.ts +5 -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/useAccumulateFactor.d.ts +9 -0
- package/dist/types/utils/hooks/useCopyText.d.ts +1 -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 +2 -0
- package/dist/types/utils/hooks/usePrint.d.ts +12 -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 +13 -0
- package/dist/types/utils/hooks/useTextSelection.d.ts +7 -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/injectPrintCSS.d.ts +1 -0
- package/dist/types/utils/link_service.d.ts +81 -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 +920 -0
- package/dist/types/utils/withRef.d.ts +5 -0
- package/dist/types/utils/zoom.d.ts +2 -0
- package/dist/utils/Queue.js +47 -0
- package/dist/utils/annotations.js +277 -0
- package/dist/utils/appConsole.js +42 -0
- package/dist/utils/approximateFragtion.js +22 -0
- package/dist/utils/calculatePage.js +21 -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/getElementPositionInPage.js +84 -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 +24 -0
- package/dist/utils/highlight.js +221 -0
- package/dist/utils/hooks/useAccumulateFactor.js +17 -0
- package/dist/utils/hooks/useCopyText.js +36 -0
- package/dist/utils/hooks/useDarkMode.js +11 -0
- package/dist/utils/hooks/useDarkModeProps.js +12 -0
- package/dist/utils/hooks/useDebounce.js +19 -0
- package/dist/utils/hooks/useElementSize.js +21 -0
- package/dist/utils/hooks/useFileDownload.js +33 -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 +55 -0
- package/dist/utils/hooks/useInfiniteScroll.js +19 -0
- package/dist/utils/hooks/useLicense.js +110 -0
- package/dist/utils/hooks/useLoadPdf.js +85 -0
- package/dist/utils/hooks/useLoadWorker.js +16 -0
- package/dist/utils/hooks/useLocalization.js +26 -0
- package/dist/utils/hooks/useMousePressed.js +20 -0
- package/dist/utils/hooks/usePageRotateContext.js +42 -0
- package/dist/utils/hooks/usePaginate.js +37 -0
- package/dist/utils/hooks/usePdfProperties.js +37 -0
- package/dist/utils/hooks/usePinch.js +147 -0
- package/dist/utils/hooks/usePresentPage.js +90 -0
- package/dist/utils/hooks/usePrint.js +185 -0
- package/dist/utils/hooks/useRequestAnimationFrame.js +17 -0
- package/dist/utils/hooks/useResizeObserver.js +22 -0
- package/dist/utils/hooks/useRotate.js +27 -0
- package/dist/utils/hooks/useScrollToPage.js +37 -0
- package/dist/utils/hooks/useSearch.js +162 -0
- package/dist/utils/hooks/useTextSelection.js +76 -0
- package/dist/utils/hooks/useThumbnail.js +59 -0
- package/dist/utils/hooks/useVirtualReactWindow.js +96 -0
- package/dist/utils/hooks/useWatermark.js +94 -0
- package/dist/utils/injectPrintCSS.js +22 -0
- package/dist/utils/link_service.js +138 -0
- package/dist/utils/renderPage.js +20 -0
- package/dist/utils/sanitizeExternalUrl.js +16 -0
- package/dist/utils/smoothScrollTo.js +6 -0
- package/dist/utils/types.js +22 -0
- package/dist/utils/withRef.js +8 -0
- package/dist/utils/zoom.js +6 -0
- package/package.json +88 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as N, useContext as A, useState as b, useRef as l, useEffect as v, useMemo as L } from "react";
|
|
3
|
+
import { appConsole as H } from "../utils/appConsole.js";
|
|
4
|
+
import { useDocumentContext as S } from "./RPDocumentContext.js";
|
|
5
|
+
import { useZoomContext as V } from "./ZoomContext.js";
|
|
6
|
+
import { PAGE_PADDING as f } from "../utils/constants.js";
|
|
7
|
+
import { usePagesRotateContext as W } from "./PagesRotateContext.js";
|
|
8
|
+
import "../utils/hooks/useLoadPdf.js";
|
|
9
|
+
import "pdfjs-dist";
|
|
10
|
+
import "../utils/types.js";
|
|
11
|
+
import "../de_DE-a553b162.js";
|
|
12
|
+
import "../utils/getThumbnailViewport.js";
|
|
13
|
+
import "./ConfigContext.js";
|
|
14
|
+
import "./DocumentPasswordContext.js";
|
|
15
|
+
import "../utils/hooks/usePdfProperties.js";
|
|
16
|
+
import "../utils/convertPdfDate.js";
|
|
17
|
+
import "../utils/formatFileSize.js";
|
|
18
|
+
import "./InitialStateContext.js";
|
|
19
|
+
import "../utils/getZoomLevel.js";
|
|
20
|
+
import "./LayoutContainerContext.js";
|
|
21
|
+
import "./ViewModeContext.js";
|
|
22
|
+
import "./RotationContext.js";
|
|
23
|
+
import "./GlobalCurrentPage.js";
|
|
24
|
+
import "./EventCallbackContext.js";
|
|
25
|
+
import "../utils/hooks/useDebounce.js";
|
|
26
|
+
const y = N({
|
|
27
|
+
widths: [],
|
|
28
|
+
heights: [],
|
|
29
|
+
setWidths: () => {
|
|
30
|
+
},
|
|
31
|
+
setHeights: () => {
|
|
32
|
+
}
|
|
33
|
+
}), st = () => {
|
|
34
|
+
const c = A(y), { widths: s, heights: o } = c;
|
|
35
|
+
if (s && o) {
|
|
36
|
+
const h = s.every((t) => typeof t == "number"), i = o.every((t) => typeof t == "number");
|
|
37
|
+
(!h || !i) && H.warn("Please use this hooks inside children component of RPProvider");
|
|
38
|
+
}
|
|
39
|
+
return c;
|
|
40
|
+
}, it = ({ children: c }) => {
|
|
41
|
+
const [s, o] = b([]), [h, i] = b([]), { pages: t } = S(), { currentZoom: n } = V(), { pageRotate: r } = W(), d = l([]), w = l(null), P = l({});
|
|
42
|
+
v(() => {
|
|
43
|
+
if (!t)
|
|
44
|
+
return;
|
|
45
|
+
const a = w.current !== t, u = JSON.stringify(P.current) !== JSON.stringify(r);
|
|
46
|
+
if (!a && !u && d.current.length > 0)
|
|
47
|
+
return;
|
|
48
|
+
const m = [];
|
|
49
|
+
for (const e of Array.from(t.values())) {
|
|
50
|
+
const g = r[e.page.pageNumber], p = e.page.getViewport({
|
|
51
|
+
scale: 1,
|
|
52
|
+
rotation: g,
|
|
53
|
+
dontFlip: !0
|
|
54
|
+
});
|
|
55
|
+
m.push({ width: p.width, height: p.height });
|
|
56
|
+
}
|
|
57
|
+
d.current = m, w.current = t, P.current = { ...r };
|
|
58
|
+
}, [t, r]), v(() => {
|
|
59
|
+
if (!t || n === 0)
|
|
60
|
+
return;
|
|
61
|
+
const a = d.current;
|
|
62
|
+
if (a.length === 0) {
|
|
63
|
+
const e = [], g = [];
|
|
64
|
+
for (const p of Array.from(t.values())) {
|
|
65
|
+
const D = r[p.page.pageNumber], x = p.page.getViewport({
|
|
66
|
+
scale: n,
|
|
67
|
+
rotation: D,
|
|
68
|
+
dontFlip: !0
|
|
69
|
+
});
|
|
70
|
+
e.push(x.width + f), g.push(x.height + f);
|
|
71
|
+
}
|
|
72
|
+
o(e), i(g);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const u = [], m = [];
|
|
76
|
+
for (const e of a)
|
|
77
|
+
u.push(e.width * n + f), m.push(e.height * n + f);
|
|
78
|
+
o(u), i(m);
|
|
79
|
+
}, [n, r, t]);
|
|
80
|
+
const C = L(
|
|
81
|
+
() => ({ widths: s, heights: h, setWidths: o, setHeights: i }),
|
|
82
|
+
[s, h]
|
|
83
|
+
);
|
|
84
|
+
return /* @__PURE__ */ R(y.Provider, { value: C, children: c });
|
|
85
|
+
};
|
|
86
|
+
export {
|
|
87
|
+
it as DimensionPagesProvider,
|
|
88
|
+
st as useDimensionPagesContext
|
|
89
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as P } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as l, useState as r, useEffect as p, useMemo as m, useContext as f } from "react";
|
|
3
|
+
import { appConsole as v } from "../utils/appConsole.js";
|
|
4
|
+
const a = l({
|
|
5
|
+
password: void 0,
|
|
6
|
+
setPassword: () => {
|
|
7
|
+
},
|
|
8
|
+
passwordError: void 0,
|
|
9
|
+
setPasswordError: () => {
|
|
10
|
+
},
|
|
11
|
+
passwordRequired: void 0,
|
|
12
|
+
setPasswordRequired: () => {
|
|
13
|
+
},
|
|
14
|
+
invalidPassword: !1
|
|
15
|
+
}), q = ({
|
|
16
|
+
children: s
|
|
17
|
+
}) => {
|
|
18
|
+
const [e, n] = r(), [o, i] = r(), [t, c] = r(!1), [d, w] = r(!1);
|
|
19
|
+
p(() => {
|
|
20
|
+
w(o === "Incorrect Password");
|
|
21
|
+
}, [o]);
|
|
22
|
+
const u = m(() => ({
|
|
23
|
+
password: e,
|
|
24
|
+
setPassword: n,
|
|
25
|
+
passwordError: o,
|
|
26
|
+
setPasswordError: i,
|
|
27
|
+
passwordRequired: t,
|
|
28
|
+
setPasswordRequired: c,
|
|
29
|
+
invalidPassword: d
|
|
30
|
+
}), [e, o, t, d]);
|
|
31
|
+
return /* @__PURE__ */ P(a.Provider, { value: u, children: s });
|
|
32
|
+
}, D = () => {
|
|
33
|
+
const s = f(a);
|
|
34
|
+
return s || v.error("Please use this hooks inside children component of DocumentPasswordContext"), s;
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
q as DocumentPasswordProvider,
|
|
38
|
+
a as default,
|
|
39
|
+
D as useDocumentPasswordContext
|
|
40
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as n, useContext as d } from "react";
|
|
3
|
+
const t = n(void 0), a = () => {
|
|
4
|
+
const o = d(t);
|
|
5
|
+
if (!o)
|
|
6
|
+
throw new Error("useDownloadContext must be used within a DownloadProvider");
|
|
7
|
+
return o;
|
|
8
|
+
}, u = ({ children: o, downloadFilename: e }) => /* @__PURE__ */ r(
|
|
9
|
+
t.Provider,
|
|
10
|
+
{
|
|
11
|
+
value: {
|
|
12
|
+
downloadFilename: e
|
|
13
|
+
},
|
|
14
|
+
children: o
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
export {
|
|
18
|
+
t as DownloadContext,
|
|
19
|
+
u as DownloadProvider,
|
|
20
|
+
a as useDownloadContext
|
|
21
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as x, useContext as P, useState as F, useCallback as r } from "react";
|
|
3
|
+
import { useDocumentContext as h } from "./RPDocumentContext.js";
|
|
4
|
+
import { useToolbarComponentContext as T } from "./ToolbarComponentContext.js";
|
|
5
|
+
import { useDocumentPasswordContext as v } from "./DocumentPasswordContext.js";
|
|
6
|
+
import { useToolComponentContext as L } from "./ToolComponentContext.js";
|
|
7
|
+
import "../utils/hooks/useLoadPdf.js";
|
|
8
|
+
import "pdfjs-dist";
|
|
9
|
+
import "../utils/types.js";
|
|
10
|
+
import "../de_DE-a553b162.js";
|
|
11
|
+
import "../utils/getThumbnailViewport.js";
|
|
12
|
+
import "./ConfigContext.js";
|
|
13
|
+
import "../utils/hooks/usePdfProperties.js";
|
|
14
|
+
import "../utils/convertPdfDate.js";
|
|
15
|
+
import "../utils/formatFileSize.js";
|
|
16
|
+
import "../utils/appConsole.js";
|
|
17
|
+
const l = x({
|
|
18
|
+
dragging: !1,
|
|
19
|
+
handleDragLeave: () => {
|
|
20
|
+
},
|
|
21
|
+
handleDragEnter: () => {
|
|
22
|
+
},
|
|
23
|
+
handleDrop: () => {
|
|
24
|
+
}
|
|
25
|
+
}), H = () => P(l), I = ({ children: m }) => {
|
|
26
|
+
const [c, e] = F(!1), { setFilename: n, setPdfSrc: a } = h(), { openFileTool: p } = T(), { openFileTool: s } = L(), { setPassword: f } = v(), u = r(
|
|
27
|
+
(o) => {
|
|
28
|
+
var i;
|
|
29
|
+
o.preventDefault(), o.stopPropagation(), e(!1);
|
|
30
|
+
const t = (i = o.dataTransfer) == null ? void 0 : i.files[0];
|
|
31
|
+
if (!t || t.type !== "application/pdf")
|
|
32
|
+
return;
|
|
33
|
+
const D = URL.createObjectURL(t);
|
|
34
|
+
n(t.name), a(D), f("");
|
|
35
|
+
},
|
|
36
|
+
[n, a]
|
|
37
|
+
), d = r(
|
|
38
|
+
(o) => {
|
|
39
|
+
o.preventDefault(), o.stopPropagation(), !(!p || !s) && e(!0);
|
|
40
|
+
},
|
|
41
|
+
[p, s]
|
|
42
|
+
), g = r((o) => {
|
|
43
|
+
o.preventDefault(), o.stopPropagation(), e(!1);
|
|
44
|
+
}, []);
|
|
45
|
+
return /* @__PURE__ */ C(
|
|
46
|
+
l.Provider,
|
|
47
|
+
{
|
|
48
|
+
value: {
|
|
49
|
+
dragging: c,
|
|
50
|
+
handleDragLeave: g,
|
|
51
|
+
handleDragEnter: d,
|
|
52
|
+
handleDrop: u
|
|
53
|
+
},
|
|
54
|
+
children: m
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
l as DropFileZoneContext,
|
|
60
|
+
I as DropFileZoneProvider,
|
|
61
|
+
H as useDropFileZoneContext
|
|
62
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { jsx as z } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as H, useState as N, useCallback as d, useContext as U, useRef as W, useMemo as q } from "react";
|
|
3
|
+
import { ScrollMode as g, LicenseType as B } from "../utils/types.js";
|
|
4
|
+
import { useDimensionPagesContext as J } from "./DimensionPagesContext.js";
|
|
5
|
+
import { usePagesRotateContext as K } from "./PagesRotateContext.js";
|
|
6
|
+
import { useLicenseContext as Q } from "./LicenseContext.js";
|
|
7
|
+
import { useZoomContext as X } from "./ZoomContext.js";
|
|
8
|
+
import { ORGANIZATION_ALLOWED_FEATURES_MESSAGE as x } from "../utils/const.js";
|
|
9
|
+
import { getScrollDistance as w } from "../utils/getScrollDistance.js";
|
|
10
|
+
import { useLayoutContainer as Y } from "./LayoutContainerContext.js";
|
|
11
|
+
import { useScrollModeContext as $ } from "./ScrollModeContext.js";
|
|
12
|
+
import { getElementPagePosition as ee } from "../utils/getElementPositionInPage.js";
|
|
13
|
+
import { useViewModeContext as te } from "./ViewModeContext.js";
|
|
14
|
+
import { useVirtualScrollContext as oe } from "./VirtualScrollContext.js";
|
|
15
|
+
import "../de_DE-a553b162.js";
|
|
16
|
+
import "../utils/appConsole.js";
|
|
17
|
+
import "./RPDocumentContext.js";
|
|
18
|
+
import "../utils/hooks/useLoadPdf.js";
|
|
19
|
+
import "pdfjs-dist";
|
|
20
|
+
import "../utils/getThumbnailViewport.js";
|
|
21
|
+
import "./ConfigContext.js";
|
|
22
|
+
import "./DocumentPasswordContext.js";
|
|
23
|
+
import "../utils/hooks/usePdfProperties.js";
|
|
24
|
+
import "../utils/convertPdfDate.js";
|
|
25
|
+
import "../utils/formatFileSize.js";
|
|
26
|
+
import "../utils/constants.js";
|
|
27
|
+
import "./RotationContext.js";
|
|
28
|
+
import "./InitialStateContext.js";
|
|
29
|
+
import "./EventCallbackContext.js";
|
|
30
|
+
import "../utils/hooks/useLicense.js";
|
|
31
|
+
import "../utils/getZoomLevel.js";
|
|
32
|
+
import "./GlobalCurrentPage.js";
|
|
33
|
+
import "../utils/hooks/useDebounce.js";
|
|
34
|
+
const S = H(void 0), Ve = ({ children: l }) => {
|
|
35
|
+
const [s, m] = N({}), { widths: t, heights: r } = J(), { pagesRef: c } = Y(), { scrollMode: C } = $(), { pageRotate: u } = K(), { currentZoom: a } = X(), { columnCount: R } = te(), { pageScrollElementRef: I, virtualScrollableElementRef: T } = oe(), M = d(
|
|
36
|
+
(e, i, o = { behavior: "smooth" }) => {
|
|
37
|
+
var v;
|
|
38
|
+
const n = T || I;
|
|
39
|
+
if (!c || !n)
|
|
40
|
+
return;
|
|
41
|
+
const L = (v = s[e]) == null ? void 0 : v[i];
|
|
42
|
+
if (!L)
|
|
43
|
+
return;
|
|
44
|
+
let p = 0, P = 0;
|
|
45
|
+
if (C === g.VERTICAL_SCROLLING) {
|
|
46
|
+
const f = e - 1, E = R, j = f % E, k = Math.floor(f / E);
|
|
47
|
+
p = w(r, k), P = w(t, j);
|
|
48
|
+
}
|
|
49
|
+
C === g.HORIZONTAL_SCROLLING && (P = t.slice(0, e - 1).reduce((f, E) => f + E, 0));
|
|
50
|
+
const _ = {
|
|
51
|
+
height: r[e - 1],
|
|
52
|
+
width: t[e - 1]
|
|
53
|
+
}, D = u[e], { left: G, top: Z } = ee(
|
|
54
|
+
_,
|
|
55
|
+
c,
|
|
56
|
+
L,
|
|
57
|
+
D,
|
|
58
|
+
a
|
|
59
|
+
), V = P + G, b = p + Z, F = {
|
|
60
|
+
left: Math.max(V, 0),
|
|
61
|
+
top: Math.max(b, 0)
|
|
62
|
+
};
|
|
63
|
+
n.scrollTo({
|
|
64
|
+
...F,
|
|
65
|
+
behavior: o.behavior
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
[s, r, t, c, u, a, C]
|
|
69
|
+
), A = d(
|
|
70
|
+
(e, i) => {
|
|
71
|
+
m((o) => {
|
|
72
|
+
const n = { width: t[e - 1], height: r[e - 1] };
|
|
73
|
+
return {
|
|
74
|
+
...o,
|
|
75
|
+
[e]: i(
|
|
76
|
+
o[e],
|
|
77
|
+
n,
|
|
78
|
+
u[e],
|
|
79
|
+
a * 100
|
|
80
|
+
)
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
[t, r, a, u]
|
|
85
|
+
), O = d((e) => {
|
|
86
|
+
m((i) => {
|
|
87
|
+
const o = { ...i };
|
|
88
|
+
return delete o[e], o;
|
|
89
|
+
});
|
|
90
|
+
}, []), y = d((e, i) => {
|
|
91
|
+
m((o) => {
|
|
92
|
+
const n = { ...o };
|
|
93
|
+
return n[e] = n[e].filter((L, p) => p !== i), n;
|
|
94
|
+
});
|
|
95
|
+
}, []);
|
|
96
|
+
return /* @__PURE__ */ z(
|
|
97
|
+
S.Provider,
|
|
98
|
+
{
|
|
99
|
+
value: { updateElement: A, clearElements: O, removeElement: y, elementList: s, scrollToElement: M },
|
|
100
|
+
children: l
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}, h = () => {
|
|
104
|
+
}, be = () => {
|
|
105
|
+
const l = U(S), { type: s, validating: m } = Q(), t = W(0), r = q(() => {
|
|
106
|
+
if (m !== !1)
|
|
107
|
+
return {
|
|
108
|
+
updateElement: h,
|
|
109
|
+
clearElements: h,
|
|
110
|
+
removeElement: h,
|
|
111
|
+
elementList: {},
|
|
112
|
+
scrollToElement: h
|
|
113
|
+
};
|
|
114
|
+
if (!(s !== B.Developer))
|
|
115
|
+
return {
|
|
116
|
+
updateElement: () => {
|
|
117
|
+
t.current === 0 && (console.error(x), t.current++);
|
|
118
|
+
},
|
|
119
|
+
clearElements: () => {
|
|
120
|
+
t.current === 0 && (console.error(x), t.current++);
|
|
121
|
+
},
|
|
122
|
+
removeElement: () => {
|
|
123
|
+
t.current === 0 && (console.error(x), t.current++);
|
|
124
|
+
},
|
|
125
|
+
elementList: {},
|
|
126
|
+
scrollToElement: () => {
|
|
127
|
+
t.current === 0 && (console.error(x), t.current++);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}, [s, m]);
|
|
131
|
+
if (!l)
|
|
132
|
+
throw new Error("useElementPageContext must be used within a ElementPageProvider");
|
|
133
|
+
return r || l;
|
|
134
|
+
};
|
|
135
|
+
export {
|
|
136
|
+
S as ElementPageContext,
|
|
137
|
+
Ve as ElementPageProvider,
|
|
138
|
+
be as useElementPageContext
|
|
139
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as c, useContext as C } from "react";
|
|
3
|
+
const t = c({
|
|
4
|
+
onPageChange: () => {
|
|
5
|
+
},
|
|
6
|
+
onRotate: () => {
|
|
7
|
+
},
|
|
8
|
+
onScroll: () => {
|
|
9
|
+
},
|
|
10
|
+
onTextSelect: () => {
|
|
11
|
+
}
|
|
12
|
+
}), v = () => C(t), u = ({
|
|
13
|
+
children: e,
|
|
14
|
+
onPageChange: o,
|
|
15
|
+
onRotate: n,
|
|
16
|
+
onScroll: r,
|
|
17
|
+
onTextSelect: a
|
|
18
|
+
}) => /* @__PURE__ */ l(
|
|
19
|
+
t.Provider,
|
|
20
|
+
{
|
|
21
|
+
value: {
|
|
22
|
+
onPageChange: o,
|
|
23
|
+
onRotate: n,
|
|
24
|
+
onScroll: r,
|
|
25
|
+
onTextSelect: a
|
|
26
|
+
},
|
|
27
|
+
children: e
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
export {
|
|
31
|
+
t as EventCallbackContext,
|
|
32
|
+
u as EventCallbackProvider,
|
|
33
|
+
v as useEventCallbackContext
|
|
34
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs as d, jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as C, useRef as s, useContext as F } from "react";
|
|
3
|
+
import { useDocumentContext as h } from "./RPDocumentContext.js";
|
|
4
|
+
import { useDocumentPasswordContext as P } from "./DocumentPasswordContext.js";
|
|
5
|
+
import "../utils/hooks/useLoadPdf.js";
|
|
6
|
+
import "pdfjs-dist";
|
|
7
|
+
import "../utils/types.js";
|
|
8
|
+
import "../de_DE-a553b162.js";
|
|
9
|
+
import "../utils/getThumbnailViewport.js";
|
|
10
|
+
import "./ConfigContext.js";
|
|
11
|
+
import "../utils/hooks/usePdfProperties.js";
|
|
12
|
+
import "../utils/convertPdfDate.js";
|
|
13
|
+
import "../utils/formatFileSize.js";
|
|
14
|
+
import "../utils/appConsole.js";
|
|
15
|
+
const c = C(null), S = ({ children: e }) => {
|
|
16
|
+
const { setFilename: l, setPdfSrc: u } = h(), o = s(), n = s(null), { setPassword: m } = P(), a = () => {
|
|
17
|
+
var t;
|
|
18
|
+
(t = n.current) == null || t.click();
|
|
19
|
+
}, f = (t) => {
|
|
20
|
+
var p;
|
|
21
|
+
const r = (p = t.target.files) == null ? void 0 : p[0];
|
|
22
|
+
if (!r || r.type !== "application/pdf")
|
|
23
|
+
return;
|
|
24
|
+
const i = URL.createObjectURL(r);
|
|
25
|
+
o.current && URL.revokeObjectURL(o.current), o.current = i, l(r.name), u(i), t.target.value = "", m("");
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ d(c.Provider, { value: { openFile: a }, children: [
|
|
28
|
+
e,
|
|
29
|
+
/* @__PURE__ */ x(
|
|
30
|
+
"input",
|
|
31
|
+
{
|
|
32
|
+
accept: "application/pdf",
|
|
33
|
+
type: "file",
|
|
34
|
+
ref: n,
|
|
35
|
+
style: { display: "none" },
|
|
36
|
+
onChange: f
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] });
|
|
40
|
+
}, q = () => {
|
|
41
|
+
const e = F(c);
|
|
42
|
+
if (!e)
|
|
43
|
+
throw new Error("useOpenFileContext must be used within FileInputProvider");
|
|
44
|
+
return e;
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
S as FileInputProvider,
|
|
48
|
+
q as useOpenFileContext
|
|
49
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as S, useCallback as x, useMemo as F, useContext as a } from "react";
|
|
3
|
+
import { useFullScreen as d } from "../utils/hooks/useFullScreen.js";
|
|
4
|
+
const u = S(void 0), v = ({ elementRef: e, children: c }) => {
|
|
5
|
+
const { isFullScreen: r, enterFullScreen: t, exitFullScreen: o, isSupported: n } = d(), l = x(() => {
|
|
6
|
+
r ? o() : e && t(e);
|
|
7
|
+
}, [r, o, t, e]), s = F(
|
|
8
|
+
() => ({
|
|
9
|
+
isFullScreen: r,
|
|
10
|
+
toggleFullScreen: l,
|
|
11
|
+
isSupported: n
|
|
12
|
+
}),
|
|
13
|
+
[r, l, n]
|
|
14
|
+
);
|
|
15
|
+
return /* @__PURE__ */ i(u.Provider, { value: s, children: c });
|
|
16
|
+
}, f = () => {
|
|
17
|
+
const e = a(u);
|
|
18
|
+
if (!e)
|
|
19
|
+
throw new Error("useFullScreenContext must be used within a FullScreenProvider");
|
|
20
|
+
return e;
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
v as FullScreenProvider,
|
|
24
|
+
f as useFullScreenContext
|
|
25
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as s, useContext as c, useState as i, useEffect as l } from "react";
|
|
3
|
+
import { useInitialStateContext as C } from "./InitialStateContext.js";
|
|
4
|
+
import { useEventCallbackContext as P } from "./EventCallbackContext.js";
|
|
5
|
+
const n = s({
|
|
6
|
+
currentPage: 1,
|
|
7
|
+
setCurrentPage: () => {
|
|
8
|
+
}
|
|
9
|
+
}), p = () => c(n), b = ({ children: r }) => {
|
|
10
|
+
const { initialPage: o = 1 } = C(), [t, a] = i(o), { onPageChange: e } = P();
|
|
11
|
+
return l(() => {
|
|
12
|
+
e && e(t);
|
|
13
|
+
}, [t, e]), /* @__PURE__ */ u(n.Provider, { value: { currentPage: t, setCurrentPage: a }, children: r });
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
n as GlobalCurrentPage,
|
|
17
|
+
b as GlobalCurrentPageProvider,
|
|
18
|
+
p as useGlobalCurrentPage
|
|
19
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as g, useContext as n } from "react";
|
|
3
|
+
import { useDocumentContext as s } from "./RPDocumentContext.js";
|
|
4
|
+
import { useHighlight as c } from "../utils/hooks/useHighlight.js";
|
|
5
|
+
import "../utils/hooks/useLoadPdf.js";
|
|
6
|
+
import "pdfjs-dist";
|
|
7
|
+
import "../utils/types.js";
|
|
8
|
+
import "../de_DE-a553b162.js";
|
|
9
|
+
import "../utils/getThumbnailViewport.js";
|
|
10
|
+
import "./ConfigContext.js";
|
|
11
|
+
import "./DocumentPasswordContext.js";
|
|
12
|
+
import "../utils/appConsole.js";
|
|
13
|
+
import "../utils/hooks/usePdfProperties.js";
|
|
14
|
+
import "../utils/convertPdfDate.js";
|
|
15
|
+
import "../utils/formatFileSize.js";
|
|
16
|
+
import "../utils/highlight.js";
|
|
17
|
+
import "../utils/charators.js";
|
|
18
|
+
const o = g(void 0), M = ({ children: t }) => {
|
|
19
|
+
const { pdf: i } = s(), { highlight: r, highlightMatches: e, highlightKeywords: h, clear: m } = c(i);
|
|
20
|
+
return /* @__PURE__ */ p(o.Provider, { value: { highlight: r, highlightMatches: e, highlightKeywords: h, clear: m }, children: t });
|
|
21
|
+
}, k = () => {
|
|
22
|
+
const t = n(o);
|
|
23
|
+
if (!t)
|
|
24
|
+
throw new Error("useHighlightContext must be used within a HighlightProvider");
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
o as HighlightContext,
|
|
29
|
+
M as HighlightProvider,
|
|
30
|
+
k as useHighlightContext
|
|
31
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as n, useContext as c } from "react";
|
|
3
|
+
const o = n({}), u = () => c(o), i = ({
|
|
4
|
+
children: t,
|
|
5
|
+
icons: e = {}
|
|
6
|
+
}) => /* @__PURE__ */ r(o.Provider, { value: e, children: t });
|
|
7
|
+
export {
|
|
8
|
+
o as IconContext,
|
|
9
|
+
i as IconProvider,
|
|
10
|
+
u as useIconContext
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as s, useContext as c, useState as i } from "react";
|
|
3
|
+
const u = () => {
|
|
4
|
+
throw new Error("setIcons is not initialized yet");
|
|
5
|
+
}, o = s({ setIcons: u }), x = () => c(o), a = ({ children: t }) => {
|
|
6
|
+
const [e, n] = i({});
|
|
7
|
+
return /* @__PURE__ */ r(o.Provider, { value: { ...e, setIcons: n }, children: t });
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
o as IconToolContext,
|
|
11
|
+
a as IconToolProvider,
|
|
12
|
+
x as useIconToolContext
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as r, useContext as i } from "react";
|
|
3
|
+
const t = r({
|
|
4
|
+
instanceId: ""
|
|
5
|
+
}), x = ({
|
|
6
|
+
children: e,
|
|
7
|
+
...n
|
|
8
|
+
}) => /* @__PURE__ */ o(t.Provider, { value: n, children: e }), c = () => i(t);
|
|
9
|
+
export {
|
|
10
|
+
t as InitialStateContext,
|
|
11
|
+
x as InitialStateProvider,
|
|
12
|
+
c as useInitialStateContext
|
|
13
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as n, useContext as u } from "react";
|
|
3
|
+
const e = n({ textLayer: !0 }), s = () => u(e), c = ({ children: t, textLayer: r = !0 }) => /* @__PURE__ */ o(e.Provider, { value: { textLayer: r }, children: t });
|
|
4
|
+
export {
|
|
5
|
+
e as LayerContext,
|
|
6
|
+
c as LayerProvider,
|
|
7
|
+
s as useLayerContext
|
|
8
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createContext as t, useContext as e } from "react";
|
|
2
|
+
const n = t({
|
|
3
|
+
container: null,
|
|
4
|
+
contentRef: null,
|
|
5
|
+
pagesRef: null,
|
|
6
|
+
setContainer: () => {
|
|
7
|
+
},
|
|
8
|
+
setContentRef: () => {
|
|
9
|
+
},
|
|
10
|
+
setPagesRef: () => {
|
|
11
|
+
}
|
|
12
|
+
}), r = () => e(n);
|
|
13
|
+
export {
|
|
14
|
+
n as LayoutContainerContext,
|
|
15
|
+
r as useLayoutContainer
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as s, useContext as i } from "react";
|
|
3
|
+
import { useLicense as c } from "../utils/hooks/useLicense.js";
|
|
4
|
+
import "../utils/appConsole.js";
|
|
5
|
+
const e = s({ isValid: !1 }), a = () => i(e), f = ({
|
|
6
|
+
children: t,
|
|
7
|
+
licenseKey: o
|
|
8
|
+
}) => {
|
|
9
|
+
const r = c(o);
|
|
10
|
+
return /* @__PURE__ */ n(e.Provider, { value: r, children: t });
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
e as LicenseContext,
|
|
14
|
+
f as LicenseProvider,
|
|
15
|
+
a as useLicenseContext
|
|
16
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as i, useContext as m } from "react";
|
|
3
|
+
import { appConsole as d } from "../utils/appConsole.js";
|
|
4
|
+
import { LoaderIcon as s } from "../components/icons/LoaderIcon.js";
|
|
5
|
+
import "../clsx-0c6e471a.js";
|
|
6
|
+
const t = i({
|
|
7
|
+
LoaderImageComponent: void 0
|
|
8
|
+
}), C = () => {
|
|
9
|
+
const o = m(t);
|
|
10
|
+
return typeof o.LoaderImageComponent > "u" && d.error("Please use this hooks inside children component of RPProvider"), o;
|
|
11
|
+
}, x = ({ children: o, loaderImage: e }) => {
|
|
12
|
+
const n = () => e || /* @__PURE__ */ r(s, {});
|
|
13
|
+
return /* @__PURE__ */ r(
|
|
14
|
+
t.Provider,
|
|
15
|
+
{
|
|
16
|
+
value: {
|
|
17
|
+
LoaderImageComponent: n
|
|
18
|
+
},
|
|
19
|
+
children: o
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
t as LoaderContext,
|
|
25
|
+
x as LoaderProvider,
|
|
26
|
+
C as useLoaderContext
|
|
27
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as m, useContext as u, useEffect as i, useMemo as p } from "react";
|
|
3
|
+
import { appConsole as d } from "../utils/appConsole.js";
|
|
4
|
+
import { useLocalization as x } from "../utils/hooks/useLocalization.js";
|
|
5
|
+
import "../de_DE-a553b162.js";
|
|
6
|
+
const a = m({
|
|
7
|
+
localeMessages: {}
|
|
8
|
+
}), M = () => {
|
|
9
|
+
const e = u(a);
|
|
10
|
+
return typeof e.localeMessages > "u" && d.error("Please use this hooks inside children component of RPProvider"), e;
|
|
11
|
+
}, g = ({
|
|
12
|
+
children: e,
|
|
13
|
+
locale: o = "en_US",
|
|
14
|
+
localization: t
|
|
15
|
+
}) => {
|
|
16
|
+
const { setLocale: s, localeMessages: n, addLocalization: r } = x(o);
|
|
17
|
+
i(() => {
|
|
18
|
+
o && s(o);
|
|
19
|
+
}, [o, s]), i(() => {
|
|
20
|
+
t && r(t);
|
|
21
|
+
}, [t, r]);
|
|
22
|
+
const c = p(
|
|
23
|
+
() => ({
|
|
24
|
+
localeMessages: n
|
|
25
|
+
}),
|
|
26
|
+
[n]
|
|
27
|
+
);
|
|
28
|
+
return /* @__PURE__ */ f(a.Provider, { value: c, children: e });
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
a as LocalizationContext,
|
|
32
|
+
g as LocalizationProvider,
|
|
33
|
+
M as useLocalizationContext
|
|
34
|
+
};
|