@pdf-viewer/react 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/LayoutWrapper-6224491f.js +19 -0
- package/dist/RotateTool.module-67946714.js +6 -0
- package/dist/SearchCloseButton-08d57275.js +33 -0
- package/dist/ToolbarLayout.module-89451ab3.js +3410 -0
- package/dist/ZoomTool.module-7082af8c.js +12 -0
- package/dist/assets/style.css +1 -0
- package/dist/assets/style.js +74 -0
- package/dist/clsx-0c6e471a.js +22 -0
- package/dist/components/RPConfig.js +1492 -0
- package/dist/components/RPController.js +203 -0
- package/dist/components/RPDropFileZone.js +53 -0
- package/dist/components/RPPages.js +140 -0
- package/dist/components/RPProvider.js +162 -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/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 +140 -0
- package/dist/components/layout/LayoutWrapper.js +7 -0
- package/dist/components/layout/RPDefaultLayout.js +140 -0
- package/dist/components/layout/RPLayout.js +195 -0
- package/dist/components/layout/WrapperLayout.js +26 -0
- package/dist/components/layout/sidebar/RPSidebar.js +140 -0
- package/dist/components/layout/sidebar/RPSplitter.js +61 -0
- package/dist/components/layout/sidebar/Thumbnail.js +140 -0
- package/dist/components/layout/sidebar/Thumbnails.js +140 -0
- package/dist/components/layout/toolbar/DarkModeTool.js +36 -0
- package/dist/components/layout/toolbar/DocumentDialog.js +140 -0
- package/dist/components/layout/toolbar/DocumentProperties.js +37 -0
- package/dist/components/layout/toolbar/FileDownloadTool.js +140 -0
- package/dist/components/layout/toolbar/FileUploadTool.js +46 -0
- package/dist/components/layout/toolbar/FullScreenTool.js +71 -0
- package/dist/components/layout/toolbar/MenuItem.js +16 -0
- package/dist/components/layout/toolbar/MenuSeparator.js +12 -0
- package/dist/components/layout/toolbar/MostPageTool.js +140 -0
- package/dist/components/layout/toolbar/OtherTool.js +140 -0
- package/dist/components/layout/toolbar/Paginate.js +140 -0
- package/dist/components/layout/toolbar/PrintTool.js +140 -0
- package/dist/components/layout/toolbar/PropertyItem.js +12 -0
- package/dist/components/layout/toolbar/RPMenuItem.js +30 -0
- package/dist/components/layout/toolbar/RPMoreOptions.js +272 -0
- package/dist/components/layout/toolbar/RPToolbar.js +140 -0
- package/dist/components/layout/toolbar/RPToolbarEnd.js +140 -0
- package/dist/components/layout/toolbar/RotateTool.js +57 -0
- package/dist/components/layout/toolbar/ScrollModeTool.js +65 -0
- package/dist/components/layout/toolbar/SearchCloseButton.js +18 -0
- package/dist/components/layout/toolbar/SearchResultNavigator.js +140 -0
- package/dist/components/layout/toolbar/SearchTool.js +140 -0
- package/dist/components/layout/toolbar/SelectionModeTool.js +49 -0
- package/dist/components/layout/toolbar/ThumbnailTool.js +146 -0
- package/dist/components/layout/toolbar/ToolbarCustom.js +176 -0
- package/dist/components/layout/toolbar/ToolbarDefault.js +179 -0
- package/dist/components/layout/toolbar/ToolbarLayout.js +149 -0
- package/dist/components/layout/toolbar/ViewModeTool.js +51 -0
- package/dist/components/layout/toolbar/ZoomTool.js +153 -0
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +158 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +144 -0
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +32 -0
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +31 -0
- package/dist/components/layout/toolbar/tools/InputPageTool.js +176 -0
- package/dist/components/layout/toolbar/tools/NextPageTool.js +152 -0
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +152 -0
- package/dist/components/layout/toolbar/tools/PrintTool.js +144 -0
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +38 -0
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +46 -0
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +26 -0
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +154 -0
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +53 -0
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +89 -0
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +53 -0
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +155 -0
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +149 -0
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +26 -0
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +150 -0
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +150 -0
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +32 -0
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +158 -0
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +150 -0
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +47 -0
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +52 -0
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +39 -0
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +41 -0
- package/dist/components/page/AnnotationLayer.js +140 -0
- package/dist/components/page/CanvasLayer.js +140 -0
- package/dist/components/page/CustomElement.js +48 -0
- package/dist/components/page/DualPage.js +140 -0
- package/dist/components/page/RPPage.js +140 -0
- package/dist/components/page/SinglePage.js +140 -0
- package/dist/components/page/TextHighlightLayer.js +140 -0
- package/dist/components/page/TextLayer.js +140 -0
- package/dist/components/page/searchHighlight.js +37 -0
- package/dist/components/ui/Button.js +23 -0
- package/dist/components/ui/Checkbox.js +265 -0
- package/dist/components/ui/DropDown.js +33 -0
- package/dist/components/ui/Input.js +27 -0
- package/dist/components/ui/LoadingIndicator.js +140 -0
- package/dist/components/ui/PasswordModal.js +61 -0
- package/dist/components/ui/RPTooltip.js +585 -0
- package/dist/contexts/ConfigContext.js +13 -0
- package/dist/contexts/DarkModeContext.js +28 -0
- package/dist/contexts/DimensionPagesContext.js +59 -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 +96 -0
- package/dist/contexts/FileInputContext.js +49 -0
- package/dist/contexts/FullScreenContext.js +18 -0
- package/dist/contexts/GlobalCurrentPage.js +16 -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 +39 -0
- package/dist/contexts/OtherToolContext.js +18 -0
- package/dist/contexts/PageViewportContext.js +8 -0
- package/dist/contexts/PagesRotateContext.js +37 -0
- package/dist/contexts/PaginationContext.js +142 -0
- package/dist/contexts/PrintContext.js +142 -0
- package/dist/contexts/RPDocumentContext.js +59 -0
- package/dist/contexts/RenderQueueProvider.js +142 -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 +142 -0
- package/dist/contexts/SelectionModeContext.js +24 -0
- package/dist/contexts/SmoothScrollContext.js +12 -0
- package/dist/contexts/ThemeContext.js +7 -0
- package/dist/contexts/ThumbnailsContext.js +142 -0
- package/dist/contexts/ToolComponentContext.js +52 -0
- package/dist/contexts/ToolbarComponentContext.js +48 -0
- package/dist/contexts/ViewModeContext.js +29 -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 +106 -0
- package/dist/floating-ui.react-dom-d22a10b4.js +1474 -0
- package/dist/index-3bf64864.js +1886 -0
- package/dist/index-c9a2990a.js +332 -0
- package/dist/libInjectCss.js +9 -0
- package/dist/main.js +217 -0
- package/dist/th_TH-d627cd51.js +398 -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/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/libInjectCss.d.ts +1 -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/injectPrintCSS.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 +307 -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 +24 -0
- package/dist/utils/highlight.js +221 -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 +140 -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 +80 -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 +41 -0
- package/dist/utils/hooks/usePaginate.js +140 -0
- package/dist/utils/hooks/usePdfProperties.js +37 -0
- package/dist/utils/hooks/usePinch.js +99 -0
- package/dist/utils/hooks/usePresentPage.js +140 -0
- package/dist/utils/hooks/usePrint.js +140 -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 +140 -0
- package/dist/utils/hooks/useSearch.js +140 -0
- package/dist/utils/hooks/useThumbnail.js +140 -0
- package/dist/utils/hooks/useVirtualReactWindow.js +140 -0
- package/dist/utils/hooks/useWatermark.js +94 -0
- package/dist/utils/injectPrintCSS.js +22 -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 +86 -0
|
@@ -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 "../th_TH-d627cd51.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,96 @@
|
|
|
1
|
+
import { jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as L, useState as P, useCallback as p, 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 u } from "../utils/const.js";
|
|
9
|
+
import "../th_TH-d627cd51.js";
|
|
10
|
+
import "../utils/appConsole.js";
|
|
11
|
+
import "./RPDocumentContext.js";
|
|
12
|
+
import "../utils/hooks/useLoadPdf.js";
|
|
13
|
+
import "pdfjs-dist";
|
|
14
|
+
import "../utils/getThumbnailViewport.js";
|
|
15
|
+
import "./ConfigContext.js";
|
|
16
|
+
import "./DocumentPasswordContext.js";
|
|
17
|
+
import "../utils/hooks/usePdfProperties.js";
|
|
18
|
+
import "../utils/convertPdfDate.js";
|
|
19
|
+
import "../utils/formatFileSize.js";
|
|
20
|
+
import "../utils/constants.js";
|
|
21
|
+
import "./RotationContext.js";
|
|
22
|
+
import "./InitialStateContext.js";
|
|
23
|
+
import "../utils/hooks/useLicense.js";
|
|
24
|
+
import "../utils/getZoomLevel.js";
|
|
25
|
+
import "./LayoutContainerContext.js";
|
|
26
|
+
import "./ViewModeContext.js";
|
|
27
|
+
import "./GlobalCurrentPage.js";
|
|
28
|
+
import "../utils/hooks/useDebounce.js";
|
|
29
|
+
const f = L(void 0), ie = ({ children: m }) => {
|
|
30
|
+
const [s, r] = P({}), { widths: t, heights: c } = y(), { pageRotate: l } = S(), { currentZoom: a } = _(), d = p(
|
|
31
|
+
(e, n) => {
|
|
32
|
+
r((o) => {
|
|
33
|
+
const i = { width: t[e], height: c[e] };
|
|
34
|
+
return {
|
|
35
|
+
...o,
|
|
36
|
+
[e]: n(
|
|
37
|
+
o[e],
|
|
38
|
+
i,
|
|
39
|
+
l[e],
|
|
40
|
+
a * 100
|
|
41
|
+
)
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
[t, c, a, l]
|
|
46
|
+
), x = p((e) => {
|
|
47
|
+
r((n) => {
|
|
48
|
+
const o = { ...n };
|
|
49
|
+
return delete o[e], o;
|
|
50
|
+
});
|
|
51
|
+
}, []), C = p((e, n) => {
|
|
52
|
+
r((o) => {
|
|
53
|
+
const i = { ...o };
|
|
54
|
+
return i[e] = i[e].filter((D, v) => v !== n), i;
|
|
55
|
+
});
|
|
56
|
+
}, []);
|
|
57
|
+
return /* @__PURE__ */ w(
|
|
58
|
+
f.Provider,
|
|
59
|
+
{
|
|
60
|
+
value: { updateElement: d, clearElements: x, removeElement: C, elementList: s },
|
|
61
|
+
children: m
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}, E = () => {
|
|
65
|
+
}, me = () => {
|
|
66
|
+
const m = h(f), { type: s, validating: r } = T(), t = g(0), c = A(() => {
|
|
67
|
+
if (r !== !1)
|
|
68
|
+
return {
|
|
69
|
+
updateElement: E,
|
|
70
|
+
clearElements: E,
|
|
71
|
+
removeElement: E,
|
|
72
|
+
elementList: {}
|
|
73
|
+
};
|
|
74
|
+
if (!(s !== R.Developer))
|
|
75
|
+
return {
|
|
76
|
+
updateElement: () => {
|
|
77
|
+
t.current === 0 && (console.error(u), t.current++);
|
|
78
|
+
},
|
|
79
|
+
clearElements: () => {
|
|
80
|
+
t.current === 0 && (console.error(u), t.current++);
|
|
81
|
+
},
|
|
82
|
+
removeElement: () => {
|
|
83
|
+
t.current === 0 && (console.error(u), t.current++);
|
|
84
|
+
},
|
|
85
|
+
elementList: {}
|
|
86
|
+
};
|
|
87
|
+
}, [s, r]);
|
|
88
|
+
if (!m)
|
|
89
|
+
throw new Error("useElementPageContext must be used within a ElementPageProvider");
|
|
90
|
+
return c || m;
|
|
91
|
+
};
|
|
92
|
+
export {
|
|
93
|
+
f as ElementPageContext,
|
|
94
|
+
ie as ElementPageProvider,
|
|
95
|
+
me as useElementPageContext
|
|
96
|
+
};
|
|
@@ -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 "../th_TH-d627cd51.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,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,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 "../th_TH-d627cd51.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,39 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as f, useContext as m, useEffect as s } from "react";
|
|
3
|
+
import { appConsole as p } from "../utils/appConsole.js";
|
|
4
|
+
import { useLocalization as d } from "../utils/hooks/useLocalization.js";
|
|
5
|
+
import "../th_TH-d627cd51.js";
|
|
6
|
+
const r = f({
|
|
7
|
+
localeMessages: {}
|
|
8
|
+
}), P = () => {
|
|
9
|
+
const e = m(r);
|
|
10
|
+
return typeof e.localeMessages > "u" && p.error("Please use this hooks inside children component of RPProvider"), e;
|
|
11
|
+
}, v = ({
|
|
12
|
+
children: e,
|
|
13
|
+
locale: o = "en_US",
|
|
14
|
+
localization: t
|
|
15
|
+
}) => {
|
|
16
|
+
const {
|
|
17
|
+
setLocale: n,
|
|
18
|
+
localeMessages: i,
|
|
19
|
+
addLocalization: a
|
|
20
|
+
} = d(o);
|
|
21
|
+
return s(() => {
|
|
22
|
+
o && n(o);
|
|
23
|
+
}, [o]), s(() => {
|
|
24
|
+
t && a(t);
|
|
25
|
+
}, [t]), /* @__PURE__ */ c(
|
|
26
|
+
r.Provider,
|
|
27
|
+
{
|
|
28
|
+
value: {
|
|
29
|
+
localeMessages: i
|
|
30
|
+
},
|
|
31
|
+
children: e
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
r as LocalizationContext,
|
|
37
|
+
v as LocalizationProvider,
|
|
38
|
+
P as useLocalizationContext
|
|
39
|
+
};
|
|
@@ -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,37 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as g, useContext as u, useState as R, useEffect as f, useMemo as P } from "react";
|
|
3
|
+
import { useDocumentContext as c } from "./RPDocumentContext.js";
|
|
4
|
+
import { useRotationContext as l } from "./RotationContext.js";
|
|
5
|
+
import "../utils/hooks/useLoadPdf.js";
|
|
6
|
+
import "pdfjs-dist";
|
|
7
|
+
import "../utils/types.js";
|
|
8
|
+
import "../th_TH-d627cd51.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 "./InitialStateContext.js";
|
|
17
|
+
const s = g({
|
|
18
|
+
singlePageRotate: {},
|
|
19
|
+
setSinglePageRotate: () => {
|
|
20
|
+
},
|
|
21
|
+
pageRotate: {}
|
|
22
|
+
}), w = () => {
|
|
23
|
+
const { singlePageRotate: a, setSinglePageRotate: t, pageRotate: r } = u(s);
|
|
24
|
+
return { singlePageRotate: a, setSinglePageRotate: t, pageRotate: r };
|
|
25
|
+
}, z = ({ children: a }) => {
|
|
26
|
+
const [t, r] = R({}), { rotate: i } = l(), { pages: e } = c();
|
|
27
|
+
f(() => {
|
|
28
|
+
e && r({});
|
|
29
|
+
}, [e]);
|
|
30
|
+
const m = P(() => e ? Array.from(e.values()).reduce((n, o) => (n[o.page.pageNumber] = t[o.page.pageNumber] ? (i + t[o.page.pageNumber] + o.defaultRotation) % 360 : (i + o.defaultRotation) % 360, n), {}) : {}, [i, e, t]);
|
|
31
|
+
return /* @__PURE__ */ p(s.Provider, { value: { singlePageRotate: t, setSinglePageRotate: r, pageRotate: m }, children: a });
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
s as PagesRotateContext,
|
|
35
|
+
z as PagesRotateProvider,
|
|
36
|
+
w as usePagesRotateContext
|
|
37
|
+
};
|