@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,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,52 @@
|
|
|
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
|
+
const i = x({
|
|
8
|
+
dragging: !1,
|
|
9
|
+
handleDragLeave: () => {
|
|
10
|
+
},
|
|
11
|
+
handleDragEnter: () => {
|
|
12
|
+
},
|
|
13
|
+
handleDrop: () => {
|
|
14
|
+
}
|
|
15
|
+
}), R = () => P(i), S = ({ children: c }) => {
|
|
16
|
+
const [f, t] = F(!1), { setFilename: n, setPdfSrc: a } = h(), { openFileTool: s } = T(), { openFileTool: l } = L(), { setPassword: u } = v(), m = r(
|
|
17
|
+
(e) => {
|
|
18
|
+
var p;
|
|
19
|
+
e.preventDefault(), e.stopPropagation(), t(!1);
|
|
20
|
+
const o = (p = e.dataTransfer) == null ? void 0 : p.files[0];
|
|
21
|
+
if (!o || o.type !== "application/pdf")
|
|
22
|
+
return;
|
|
23
|
+
const D = URL.createObjectURL(o);
|
|
24
|
+
n(o.name), a(D), u("");
|
|
25
|
+
},
|
|
26
|
+
[n, a]
|
|
27
|
+
), d = r(
|
|
28
|
+
(e) => {
|
|
29
|
+
e.preventDefault(), e.stopPropagation(), !(!s || !l) && t(!0);
|
|
30
|
+
},
|
|
31
|
+
[s, l]
|
|
32
|
+
), g = r((e) => {
|
|
33
|
+
e.preventDefault(), e.stopPropagation(), t(!1);
|
|
34
|
+
}, []);
|
|
35
|
+
return /* @__PURE__ */ C(
|
|
36
|
+
i.Provider,
|
|
37
|
+
{
|
|
38
|
+
value: {
|
|
39
|
+
dragging: f,
|
|
40
|
+
handleDragLeave: g,
|
|
41
|
+
handleDragEnter: d,
|
|
42
|
+
handleDrop: m
|
|
43
|
+
},
|
|
44
|
+
children: c
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
i as DropFileZoneContext,
|
|
50
|
+
S as DropFileZoneProvider,
|
|
51
|
+
R as useDropFileZoneContext
|
|
52
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as L, useState as P, useCallback as u, useContext as h, useRef as g, useMemo as A } from "react";
|
|
3
|
+
import { LicenseType as R } from "../utils/types.js";
|
|
4
|
+
import { useDimensionPagesContext as y } from "./DimensionPagesContext.js";
|
|
5
|
+
import { usePagesRotateContext as S } from "./PagesRotateContext.js";
|
|
6
|
+
import { useLicenseContext as T } from "./LicenseContext.js";
|
|
7
|
+
import { useZoomContext as _ } from "./ZoomContext.js";
|
|
8
|
+
import { ORGANIZATION_ALLOWED_FEATURES_MESSAGE as E } from "../utils/const.js";
|
|
9
|
+
const d = L(void 0), U = ({ children: c }) => {
|
|
10
|
+
const [i, o] = P({}), { widths: t, heights: l } = y(), { pageRotate: m } = S(), { currentZoom: f } = _(), x = u(
|
|
11
|
+
(e, r) => {
|
|
12
|
+
o((n) => {
|
|
13
|
+
const s = { width: t[e], height: l[e] };
|
|
14
|
+
return {
|
|
15
|
+
...n,
|
|
16
|
+
[e]: r(
|
|
17
|
+
n[e],
|
|
18
|
+
s,
|
|
19
|
+
m[e],
|
|
20
|
+
f * 100
|
|
21
|
+
)
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
[t, l, f, m]
|
|
26
|
+
), p = u((e) => {
|
|
27
|
+
o((r) => {
|
|
28
|
+
const n = { ...r };
|
|
29
|
+
return delete n[e], n;
|
|
30
|
+
});
|
|
31
|
+
}, []), C = u((e, r) => {
|
|
32
|
+
o((n) => {
|
|
33
|
+
const s = { ...n };
|
|
34
|
+
return s[e] = s[e].filter((D, v) => v !== r), s;
|
|
35
|
+
});
|
|
36
|
+
}, []);
|
|
37
|
+
return /* @__PURE__ */ w(
|
|
38
|
+
d.Provider,
|
|
39
|
+
{
|
|
40
|
+
value: { updateElement: x, clearElements: p, removeElement: C, elementList: i },
|
|
41
|
+
children: c
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}, a = () => {
|
|
45
|
+
}, W = () => {
|
|
46
|
+
const c = h(d), { type: i, validating: o } = T(), t = g(0), l = A(() => {
|
|
47
|
+
if (o !== !1)
|
|
48
|
+
return {
|
|
49
|
+
updateElement: a,
|
|
50
|
+
clearElements: a,
|
|
51
|
+
removeElement: a,
|
|
52
|
+
elementList: {}
|
|
53
|
+
};
|
|
54
|
+
if (!(i !== R.Developer))
|
|
55
|
+
return {
|
|
56
|
+
updateElement: () => {
|
|
57
|
+
t.current === 0 && (console.error(E), t.current++);
|
|
58
|
+
},
|
|
59
|
+
clearElements: () => {
|
|
60
|
+
t.current === 0 && (console.error(E), t.current++);
|
|
61
|
+
},
|
|
62
|
+
removeElement: () => {
|
|
63
|
+
t.current === 0 && (console.error(E), t.current++);
|
|
64
|
+
},
|
|
65
|
+
elementList: {}
|
|
66
|
+
};
|
|
67
|
+
}, [i, o]);
|
|
68
|
+
if (!c)
|
|
69
|
+
throw new Error("useElementPageContext must be used within a ElementPageProvider");
|
|
70
|
+
return l || c;
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
d as ElementPageContext,
|
|
74
|
+
U as ElementPageProvider,
|
|
75
|
+
W as useElementPageContext
|
|
76
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsxs as m, jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as C, useRef as c, useContext as F } from "react";
|
|
3
|
+
import { useDocumentContext as h } from "./RPDocumentContext.js";
|
|
4
|
+
import { useDocumentPasswordContext as P } from "./DocumentPasswordContext.js";
|
|
5
|
+
const l = C(null), g = ({ children: t }) => {
|
|
6
|
+
const { setFilename: u, setPdfSrc: p } = h(), r = c(), o = c(null), { setPassword: a } = P(), f = () => {
|
|
7
|
+
var e;
|
|
8
|
+
(e = o.current) == null || e.click();
|
|
9
|
+
}, d = (e) => {
|
|
10
|
+
var i;
|
|
11
|
+
const n = (i = e.target.files) == null ? void 0 : i[0];
|
|
12
|
+
if (!n || n.type !== "application/pdf")
|
|
13
|
+
return;
|
|
14
|
+
const s = URL.createObjectURL(n);
|
|
15
|
+
r.current && URL.revokeObjectURL(r.current), r.current = s, u(n.name), p(s), e.target.value = "", a("");
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ m(l.Provider, { value: { openFile: f }, children: [
|
|
18
|
+
t,
|
|
19
|
+
/* @__PURE__ */ x(
|
|
20
|
+
"input",
|
|
21
|
+
{
|
|
22
|
+
accept: "application/pdf",
|
|
23
|
+
type: "file",
|
|
24
|
+
ref: o,
|
|
25
|
+
style: { display: "none" },
|
|
26
|
+
onChange: d
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
] });
|
|
30
|
+
}, j = () => {
|
|
31
|
+
const t = F(l);
|
|
32
|
+
if (!t)
|
|
33
|
+
throw new Error("useOpenFileContext must be used within FileInputProvider");
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
g as FileInputProvider,
|
|
38
|
+
j as useOpenFileContext
|
|
39
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as i, useContext as S } from "react";
|
|
3
|
+
import { useFullScreen as F } from "../utils/hooks/useFullScreen.js";
|
|
4
|
+
const t = i(void 0), p = ({ elementRef: e, children: o }) => {
|
|
5
|
+
const { isFullScreen: r, enterFullScreen: n, exitFullScreen: l, isSupported: u } = F(), c = () => {
|
|
6
|
+
r ? l() : e && n(e);
|
|
7
|
+
};
|
|
8
|
+
return /* @__PURE__ */ s(t.Provider, { value: { isFullScreen: r, toggleFullScreen: c, isSupported: u }, children: o });
|
|
9
|
+
}, f = () => {
|
|
10
|
+
const e = S(t);
|
|
11
|
+
if (!e)
|
|
12
|
+
throw new Error("useFullScreenContext must be used within a FullScreenProvider");
|
|
13
|
+
return e;
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
p as FullScreenProvider,
|
|
17
|
+
f as useFullScreenContext
|
|
18
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as u, useContext as s, useState as c } from "react";
|
|
3
|
+
import { useInitialStateContext as i } from "./InitialStateContext.js";
|
|
4
|
+
const e = u({
|
|
5
|
+
currentPage: 1,
|
|
6
|
+
setCurrentPage: () => {
|
|
7
|
+
}
|
|
8
|
+
}), C = () => s(e), x = ({ children: t }) => {
|
|
9
|
+
const { initialPage: r = 1 } = i(), [o, n] = c(r);
|
|
10
|
+
return /* @__PURE__ */ a(e.Provider, { value: { currentPage: o, setCurrentPage: n }, children: t });
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
e as GlobalCurrentPage,
|
|
14
|
+
x as GlobalCurrentPageProvider,
|
|
15
|
+
C as useGlobalCurrentPage
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as s, useContext as c } from "react";
|
|
3
|
+
import { useDocumentContext as l } from "./RPDocumentContext.js";
|
|
4
|
+
import { useHighlight as u } from "../utils/hooks/useHighlight.js";
|
|
5
|
+
const o = s(void 0), p = ({ children: t }) => {
|
|
6
|
+
const { pdf: i } = l(), { highlight: e, highlightMatches: r, highlightKeywords: h, clear: g } = u(i);
|
|
7
|
+
return /* @__PURE__ */ n(o.Provider, { value: { highlight: e, highlightMatches: r, highlightKeywords: h, clear: g }, children: t });
|
|
8
|
+
}, C = () => {
|
|
9
|
+
const t = c(o);
|
|
10
|
+
if (!t)
|
|
11
|
+
throw new Error("useHighlightContext must be used within a HighlightProvider");
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
o as HighlightContext,
|
|
16
|
+
p as HighlightProvider,
|
|
17
|
+
C as useHighlightContext
|
|
18
|
+
};
|
|
@@ -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,15 @@
|
|
|
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
|
+
const e = s({ isValid: !1 }), a = () => i(e), f = ({
|
|
5
|
+
children: t,
|
|
6
|
+
licenseKey: o
|
|
7
|
+
}) => {
|
|
8
|
+
const r = c(o);
|
|
9
|
+
return /* @__PURE__ */ n(e.Provider, { value: r, children: t });
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
e as LicenseContext,
|
|
13
|
+
f as LicenseProvider,
|
|
14
|
+
a as useLicenseContext
|
|
15
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as d, useContext as i } from "react";
|
|
3
|
+
import { appConsole as m } from "../utils/appConsole.js";
|
|
4
|
+
import { LoaderIcon as s } from "../components/icons/LoaderIcon.js";
|
|
5
|
+
const t = d({
|
|
6
|
+
LoaderImageComponent: void 0
|
|
7
|
+
}), u = () => {
|
|
8
|
+
const o = i(t);
|
|
9
|
+
return typeof o.LoaderImageComponent > "u" && m.error("Please use this hooks inside children component of RPProvider"), o;
|
|
10
|
+
}, C = ({ children: o, loaderImage: e }) => {
|
|
11
|
+
const n = () => e || /* @__PURE__ */ r(s, {});
|
|
12
|
+
return /* @__PURE__ */ r(
|
|
13
|
+
t.Provider,
|
|
14
|
+
{
|
|
15
|
+
value: {
|
|
16
|
+
LoaderImageComponent: n
|
|
17
|
+
},
|
|
18
|
+
children: o
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
t as LoaderContext,
|
|
24
|
+
C as LoaderProvider,
|
|
25
|
+
u as useLoaderContext
|
|
26
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as f, useContext as d, useEffect as s } from "react";
|
|
3
|
+
import { appConsole as m } from "../utils/appConsole.js";
|
|
4
|
+
import { useLocalization as p } from "../utils/hooks/useLocalization.js";
|
|
5
|
+
const r = f({
|
|
6
|
+
localeMessages: {}
|
|
7
|
+
}), C = () => {
|
|
8
|
+
const e = d(r);
|
|
9
|
+
return typeof e.localeMessages > "u" && m.error("Please use this hooks inside children component of RPProvider"), e;
|
|
10
|
+
}, P = ({
|
|
11
|
+
children: e,
|
|
12
|
+
locale: o = "en_US",
|
|
13
|
+
localization: t
|
|
14
|
+
}) => {
|
|
15
|
+
const {
|
|
16
|
+
setLocale: n,
|
|
17
|
+
localeMessages: i,
|
|
18
|
+
addLocalization: a
|
|
19
|
+
} = p(o);
|
|
20
|
+
return s(() => {
|
|
21
|
+
o && n(o);
|
|
22
|
+
}, [o]), s(() => {
|
|
23
|
+
t && a(t);
|
|
24
|
+
}, [t]), /* @__PURE__ */ c(
|
|
25
|
+
r.Provider,
|
|
26
|
+
{
|
|
27
|
+
value: {
|
|
28
|
+
localeMessages: i
|
|
29
|
+
},
|
|
30
|
+
children: e
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
r as LocalizationContext,
|
|
36
|
+
P as LocalizationProvider,
|
|
37
|
+
C as useLocalizationContext
|
|
38
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as c, useContext as i, useState as u, useMemo as m } from "react";
|
|
3
|
+
const t = c({
|
|
4
|
+
activeDocumentProperties: !1,
|
|
5
|
+
setActiveDocumentProperties: () => {
|
|
6
|
+
}
|
|
7
|
+
}), v = () => i(t), l = ({ children: o }) => {
|
|
8
|
+
const [e, r] = u(!1), s = m(() => ({
|
|
9
|
+
activeDocumentProperties: e,
|
|
10
|
+
setActiveDocumentProperties: r
|
|
11
|
+
}), [e]);
|
|
12
|
+
return /* @__PURE__ */ n(t.Provider, { value: s, children: o });
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
t as OtherToolContext,
|
|
16
|
+
l as OtherToolProvider,
|
|
17
|
+
v as useOtherToolContext
|
|
18
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as r, useContext as n } from "react";
|
|
3
|
+
const e = r({}), s = () => n(e), x = ({ children: t }) => /* @__PURE__ */ o(e.Provider, { value: {}, children: t });
|
|
4
|
+
export {
|
|
5
|
+
e as PageViewportContext,
|
|
6
|
+
x as PageViewportProvider,
|
|
7
|
+
s as usePageViewportContext
|
|
8
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as R, useContext as m, useState as f, useEffect as p, useMemo as P } from "react";
|
|
3
|
+
import { useDocumentContext as c } from "./RPDocumentContext.js";
|
|
4
|
+
import { useRotationContext as l } from "./RotationContext.js";
|
|
5
|
+
const g = R({
|
|
6
|
+
singlePageRotate: {},
|
|
7
|
+
setSinglePageRotate: () => {
|
|
8
|
+
},
|
|
9
|
+
pageRotate: {}
|
|
10
|
+
}), S = () => {
|
|
11
|
+
const { singlePageRotate: r, setSinglePageRotate: e, pageRotate: a } = m(g);
|
|
12
|
+
return { singlePageRotate: r, setSinglePageRotate: e, pageRotate: a };
|
|
13
|
+
}, b = ({ children: r }) => {
|
|
14
|
+
const [e, a] = f({}), { rotate: n } = l(), { pages: t } = c();
|
|
15
|
+
p(() => {
|
|
16
|
+
t && a({});
|
|
17
|
+
}, [t]);
|
|
18
|
+
const u = P(() => t ? Array.from(t.values()).reduce((s, o) => (s[o.page.pageNumber] = e[o.page.pageNumber] ? (n + e[o.page.pageNumber] + o.defaultRotation) % 360 : (n + o.defaultRotation) % 360, s), {}) : {}, [n, t, e]);
|
|
19
|
+
return /* @__PURE__ */ i(g.Provider, { value: { singlePageRotate: e, setSinglePageRotate: a, pageRotate: u }, children: r });
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
g as PagesRotateContext,
|
|
23
|
+
b as PagesRotateProvider,
|
|
24
|
+
S as usePagesRotateContext
|
|
25
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { t as p, P as e, u as P } from "../ToolbarLayout.module-c588d36b.js";
|
|
4
|
+
import "./RPDocumentContext.js";
|
|
5
|
+
import "../utils/appConsole.js";
|
|
6
|
+
import "./GlobalCurrentPage.js";
|
|
7
|
+
export {
|
|
8
|
+
p as PaginationContext,
|
|
9
|
+
e as PaginationProvider,
|
|
10
|
+
P as usePaginationContext
|
|
11
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as h, useState as m, useEffect as v, useMemo as S, useContext as D } from "react";
|
|
3
|
+
import { useLoadPdf as F } from "../utils/hooks/useLoadPdf.js";
|
|
4
|
+
import { usePdfProperties as M } from "../utils/hooks/usePdfProperties.js";
|
|
5
|
+
import { appConsole as j } from "../utils/appConsole.js";
|
|
6
|
+
const u = h({
|
|
7
|
+
pdf: void 0,
|
|
8
|
+
pages: /* @__PURE__ */ new Map(),
|
|
9
|
+
setPdfSrc: () => {
|
|
10
|
+
},
|
|
11
|
+
setFilename: () => {
|
|
12
|
+
},
|
|
13
|
+
loading: !1,
|
|
14
|
+
loaderProgress: 0,
|
|
15
|
+
error: void 0
|
|
16
|
+
}), b = ({
|
|
17
|
+
children: t,
|
|
18
|
+
src: e,
|
|
19
|
+
characterMap: c,
|
|
20
|
+
onLoadError: P,
|
|
21
|
+
onLoaded: g
|
|
22
|
+
}) => {
|
|
23
|
+
const [o, n] = m(e), [s, i] = m(), { pdf: r, pages: d, loading: p, loadingProgress: f, error: a } = F(o, c, {
|
|
24
|
+
onLoadError: P,
|
|
25
|
+
onLoaded: g
|
|
26
|
+
}), l = M(o, r, s);
|
|
27
|
+
v(() => {
|
|
28
|
+
i(e == null ? void 0 : e.split("/").pop()), n(e);
|
|
29
|
+
}, [e]);
|
|
30
|
+
const x = S(() => ({
|
|
31
|
+
pdf: r,
|
|
32
|
+
pages: d,
|
|
33
|
+
pdfSrc: o,
|
|
34
|
+
setPdfSrc: n,
|
|
35
|
+
pdfProperties: l,
|
|
36
|
+
setFilename: i,
|
|
37
|
+
filename: s,
|
|
38
|
+
loading: p,
|
|
39
|
+
loaderProgress: f,
|
|
40
|
+
error: a
|
|
41
|
+
}), [r, d, o, l, p, f, a]);
|
|
42
|
+
return /* @__PURE__ */ C(u.Provider, { value: x, children: o ? t : null });
|
|
43
|
+
}, q = () => {
|
|
44
|
+
const t = D(u);
|
|
45
|
+
return t.pdfSrc || j.error("Please use this hooks inside children component of RPDocument"), t;
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
b as DocumentProvider,
|
|
49
|
+
u as default,
|
|
50
|
+
q as useDocumentContext
|
|
51
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../utils/Queue.js";
|
|
4
|
+
import "../utils/renderPage.js";
|
|
5
|
+
import { B as m, f as p, C as d } from "../ToolbarLayout.module-c588d36b.js";
|
|
6
|
+
export {
|
|
7
|
+
m as RenderQueueContext,
|
|
8
|
+
p as RenderQueueProvider,
|
|
9
|
+
d as useRenderQueue
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as s, useContext as a } from "react";
|
|
3
|
+
const e = s({
|
|
4
|
+
viewports: /* @__PURE__ */ new Map(),
|
|
5
|
+
pages: /* @__PURE__ */ new Map()
|
|
6
|
+
}), d = () => a(e), i = ({ children: r }) => {
|
|
7
|
+
const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
8
|
+
return /* @__PURE__ */ o(e.Provider, { value: { viewports: t, pages: n }, children: r });
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
e as RenderedPagesCacheContext,
|
|
12
|
+
i as RenderedPagesCacheProvider,
|
|
13
|
+
d as useRenderedPagesCache
|
|
14
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as u, useContext as c, useState as f, useEffect as m, useMemo as p } from "react";
|
|
3
|
+
import { appConsole as d } from "../utils/appConsole.js";
|
|
4
|
+
import { useInitialStateContext as x } from "./InitialStateContext.js";
|
|
5
|
+
import { useDocumentContext as C } from "./RPDocumentContext.js";
|
|
6
|
+
const s = u({
|
|
7
|
+
rotate: 0,
|
|
8
|
+
setRotate: () => {
|
|
9
|
+
}
|
|
10
|
+
}), S = () => {
|
|
11
|
+
const t = c(s);
|
|
12
|
+
return typeof (t == null ? void 0 : t.rotate) > "u" && d.error("Please use this hooks inside children component of RPProvider"), t;
|
|
13
|
+
}, j = ({ children: t }) => {
|
|
14
|
+
const { initialRotation: o = 0 } = x(), { pdf: r } = C(), [n, e] = f(o);
|
|
15
|
+
m(() => {
|
|
16
|
+
r && e(o);
|
|
17
|
+
}, [r, o]);
|
|
18
|
+
const i = p(() => ({
|
|
19
|
+
rotate: n,
|
|
20
|
+
setRotate: e
|
|
21
|
+
}), [n, e]);
|
|
22
|
+
return /* @__PURE__ */ a(s.Provider, { value: i, children: t });
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
s as RotateContext,
|
|
26
|
+
j as RotateProvider,
|
|
27
|
+
S as useRotationContext
|
|
28
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as c, useContext as i, useState as d } from "react";
|
|
3
|
+
import { appConsole as m } from "../utils/appConsole.js";
|
|
4
|
+
import { ScrollMode as e } from "../utils/types.js";
|
|
5
|
+
import { useInitialStateContext as S } from "./InitialStateContext.js";
|
|
6
|
+
const t = c({
|
|
7
|
+
scrollMode: e.VERTICAL_SCROLLING,
|
|
8
|
+
setScrollMode: () => {
|
|
9
|
+
}
|
|
10
|
+
}), a = () => {
|
|
11
|
+
const o = i(t);
|
|
12
|
+
return typeof o.scrollMode > "u" && m.error("Please use this hooks inside children component of RPProvider"), o;
|
|
13
|
+
}, x = ({ children: o }) => {
|
|
14
|
+
const { initialScrollMode: r = e.VERTICAL_SCROLLING } = S(), [l, n] = d(r);
|
|
15
|
+
return /* @__PURE__ */ s(t.Provider, { value: { scrollMode: l, setScrollMode: n }, children: o });
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
t as ScrollModeContext,
|
|
19
|
+
x as ScrollModeProvider,
|
|
20
|
+
a as useScrollModeContext
|
|
21
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as c, useContext as d, useState as l } from "react";
|
|
3
|
+
import { appConsole as m } from "../utils/appConsole.js";
|
|
4
|
+
import { SelectionMode as o } from "../utils/types.js";
|
|
5
|
+
const t = c({
|
|
6
|
+
selectionMode: o.TEXT,
|
|
7
|
+
setSelectionMode: () => {
|
|
8
|
+
}
|
|
9
|
+
}), x = () => {
|
|
10
|
+
const e = d(t);
|
|
11
|
+
return typeof e.selectionMode > "u" && m.error("Please use this hooks inside children component of RPProvider"), e;
|
|
12
|
+
}, S = ({
|
|
13
|
+
children: e,
|
|
14
|
+
initialSelectionMode: n = o.TEXT
|
|
15
|
+
}) => {
|
|
16
|
+
const [r, i] = l(n);
|
|
17
|
+
return /* @__PURE__ */ s(t.Provider, { value: { selectionMode: r, setSelectionMode: i }, children: e });
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
t as SelectionModeContext,
|
|
21
|
+
S as SelectionModeProvider,
|
|
22
|
+
x as useSelectionModeContext
|
|
23
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as c, useRef as l, useContext as n } from "react";
|
|
3
|
+
const o = c({
|
|
4
|
+
targetScrollPage: { current: void 0 }
|
|
5
|
+
}), m = ({ children: t }) => {
|
|
6
|
+
const r = l();
|
|
7
|
+
return /* @__PURE__ */ e(o.Provider, { value: { targetScrollPage: r }, children: t });
|
|
8
|
+
}, u = () => n(o);
|
|
9
|
+
export {
|
|
10
|
+
m as SmoothScrollProvider,
|
|
11
|
+
u as useSmoothScrollContext
|
|
12
|
+
};
|