@react-pdf-kit/viewer 0.0.0-experimental.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +204 -0
- package/dist/Combination-54a77a7a.js +701 -0
- package/dist/MostPageTool.module-13578ad6.js +6 -0
- package/dist/OtherTool.module-a4be5f1f.js +6 -0
- package/dist/Paginate.module-4eef00aa.js +8 -0
- package/dist/PaginationContext-9217cab4.js +201 -0
- package/dist/RPLayout.module-b4b23e29.js +14 -0
- package/dist/RPSplitter-f6acf13b.js +71 -0
- package/dist/RPToolbar.module-27d7fe77.js +10 -0
- package/dist/RotateTool.module-67946714.js +6 -0
- package/dist/SearchTool.module-99f60dc7.js +16 -0
- package/dist/ToolbarLayout.module-6e339802.js +12 -0
- package/dist/ZoomTool.module-7082af8c.js +12 -0
- package/dist/assets/style.css +1 -0
- package/dist/assets/style.js +77 -0
- package/dist/clsx-0c6e471a.js +22 -0
- package/dist/components/RPConfig.js +17 -0
- package/dist/components/RPController.js +136 -0
- package/dist/components/RPDropFileZone.js +53 -0
- package/dist/components/RPPages.js +1049 -0
- package/dist/components/RPProvider.js +126 -0
- package/dist/components/RPTheme.js +22 -0
- package/dist/components/icons/CheckIcon.js +22 -0
- package/dist/components/icons/ChevronDownIcon.js +23 -0
- package/dist/components/icons/ChevronUpIcon.js +22 -0
- package/dist/components/icons/ClearIcon.js +25 -0
- package/dist/components/icons/ClockwiseIcon.js +22 -0
- package/dist/components/icons/CloseIcon.js +22 -0
- package/dist/components/icons/DarkPdfIcon.js +15 -0
- package/dist/components/icons/DualPageIcon.js +22 -0
- package/dist/components/icons/DualPageWithCoverIcon.js +22 -0
- package/dist/components/icons/FileDownloadDefaultIcon.js +23 -0
- package/dist/components/icons/FileUploadDefaultIcon.js +23 -0
- package/dist/components/icons/FullScreenIcon.js +22 -0
- package/dist/components/icons/GoToDownIcon.js +22 -0
- package/dist/components/icons/HandModeDefaultIcon.js +22 -0
- package/dist/components/icons/HorizontalScrollingIcon.js +24 -0
- package/dist/components/icons/InfoIcon.js +22 -0
- package/dist/components/icons/LightPdfIcon.js +15 -0
- package/dist/components/icons/LoaderIcon.js +17 -0
- package/dist/components/icons/MoonIcon.js +22 -0
- package/dist/components/icons/PageScrollingIcon.js +24 -0
- package/dist/components/icons/PrintDefaultIcon.js +23 -0
- package/dist/components/icons/SearchIcon.js +22 -0
- package/dist/components/icons/SinglePageIcon.js +22 -0
- package/dist/components/icons/SunIcon.js +25 -0
- package/dist/components/icons/TextSelectionDefaultIcon.js +23 -0
- package/dist/components/icons/ThreeDotIcon.js +22 -0
- package/dist/components/icons/Thumbnail.js +54 -0
- package/dist/components/icons/VerticalScrollingIcon.js +24 -0
- package/dist/components/icons/WrappedScrollingIcon.js +24 -0
- package/dist/components/icons/ZoomInIcon.js +22 -0
- package/dist/components/icons/ZoomOutIcon.js +22 -0
- package/dist/components/layout/Container.js +21 -0
- package/dist/components/layout/LayoutContainer.js +35 -0
- package/dist/components/layout/LayoutWrapper.js +11 -0
- package/dist/components/layout/RPDefaultLayout.js +238 -0
- package/dist/components/layout/RPLayout.js +213 -0
- package/dist/components/layout/SkipLink.js +29 -0
- package/dist/components/layout/WrapperLayout.js +26 -0
- package/dist/components/layout/sidebar/RPSidebar.js +107 -0
- package/dist/components/layout/sidebar/RPSplitter.js +8 -0
- package/dist/components/layout/sidebar/Thumbnail.js +145 -0
- package/dist/components/layout/sidebar/Thumbnails.js +77 -0
- package/dist/components/layout/toolbar/DarkModeTool.js +38 -0
- package/dist/components/layout/toolbar/DocumentDialog.js +314 -0
- package/dist/components/layout/toolbar/DocumentProperties.js +40 -0
- package/dist/components/layout/toolbar/FileDownloadTool.js +50 -0
- package/dist/components/layout/toolbar/FileUploadTool.js +49 -0
- package/dist/components/layout/toolbar/FullScreenTool.js +74 -0
- package/dist/components/layout/toolbar/MenuItem.js +19 -0
- package/dist/components/layout/toolbar/MenuSeparator.js +15 -0
- package/dist/components/layout/toolbar/MostPageTool.js +81 -0
- package/dist/components/layout/toolbar/OtherTool.js +199 -0
- package/dist/components/layout/toolbar/Paginate.js +145 -0
- package/dist/components/layout/toolbar/PrintTool.js +72 -0
- package/dist/components/layout/toolbar/PropertyItem.js +12 -0
- package/dist/components/layout/toolbar/RPMenuItem.js +33 -0
- package/dist/components/layout/toolbar/RPMoreOptions.js +220 -0
- package/dist/components/layout/toolbar/RPToolbar.js +151 -0
- package/dist/components/layout/toolbar/RPToolbarEnd.js +121 -0
- package/dist/components/layout/toolbar/RotateTool.js +60 -0
- package/dist/components/layout/toolbar/ScrollModeTool.js +68 -0
- package/dist/components/layout/toolbar/SearchCloseButton.js +32 -0
- package/dist/components/layout/toolbar/SearchResultNavigator.js +109 -0
- package/dist/components/layout/toolbar/SearchTool.js +264 -0
- package/dist/components/layout/toolbar/SelectionModeTool.js +52 -0
- package/dist/components/layout/toolbar/ThumbnailTool.js +39 -0
- package/dist/components/layout/toolbar/ToolbarCustom.js +108 -0
- package/dist/components/layout/toolbar/ToolbarDefault.js +192 -0
- package/dist/components/layout/toolbar/ToolbarLayout.js +154 -0
- package/dist/components/layout/toolbar/ViewModeTool.js +63 -0
- package/dist/components/layout/toolbar/ZoomTool.js +150 -0
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +54 -0
- package/dist/components/layout/toolbar/tools/DualPageTool.js +26 -0
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +204 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +35 -0
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +34 -0
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +199 -0
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +34 -0
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/InputPageTool.js +92 -0
- package/dist/components/layout/toolbar/tools/LastPageTool.js +199 -0
- package/dist/components/layout/toolbar/tools/NextPageTool.js +62 -0
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +62 -0
- package/dist/components/layout/toolbar/tools/PrintTool.js +35 -0
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +47 -0
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +48 -0
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +39 -0
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +26 -0
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +36 -0
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +46 -0
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +58 -0
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +27 -0
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +133 -0
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +58 -0
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +148 -0
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +42 -0
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +29 -0
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +52 -0
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +51 -0
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +43 -0
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +87 -0
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +52 -0
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +64 -0
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +73 -0
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +58 -0
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +67 -0
- package/dist/components/page/AnnotationLayer.js +145 -0
- package/dist/components/page/CanvasLayer.js +88 -0
- package/dist/components/page/CustomElement.js +53 -0
- package/dist/components/page/DualPage.js +100 -0
- package/dist/components/page/DualPageWithCover.js +132 -0
- package/dist/components/page/RPPage.js +144 -0
- package/dist/components/page/SinglePage.js +90 -0
- package/dist/components/page/TextHighlightLayer.js +198 -0
- package/dist/components/page/TextLayer.js +203 -0
- package/dist/components/page/searchHighlight.js +37 -0
- package/dist/components/ui/Button.js +25 -0
- package/dist/components/ui/Checkbox.js +273 -0
- package/dist/components/ui/DropDown.js +36 -0
- package/dist/components/ui/Input.js +28 -0
- package/dist/components/ui/LoadingIndicator.js +47 -0
- package/dist/components/ui/PasswordModal.js +75 -0
- package/dist/components/ui/RPTooltip.js +571 -0
- package/dist/contexts/ConfigContext.js +13 -0
- package/dist/contexts/DarkModeContext.js +28 -0
- package/dist/contexts/DimensionPagesContext.js +89 -0
- package/dist/contexts/DocumentPasswordContext.js +40 -0
- package/dist/contexts/DownloadContext.js +21 -0
- package/dist/contexts/DropFileZoneContext.js +62 -0
- package/dist/contexts/ElementPageContext.js +139 -0
- package/dist/contexts/EventCallbackContext.js +34 -0
- package/dist/contexts/FileInputContext.js +49 -0
- package/dist/contexts/FullScreenContext.js +25 -0
- package/dist/contexts/GlobalCurrentPage.js +19 -0
- package/dist/contexts/HighlightContext.js +31 -0
- package/dist/contexts/IconContext.js +11 -0
- package/dist/contexts/IconToolContext.js +13 -0
- package/dist/contexts/InitialStateContext.js +13 -0
- package/dist/contexts/LayerContext.js +8 -0
- package/dist/contexts/LayoutContainerContext.js +16 -0
- package/dist/contexts/LicenseContext.js +16 -0
- package/dist/contexts/LoaderContext.js +27 -0
- package/dist/contexts/LocalizationContext.js +34 -0
- package/dist/contexts/OtherToolContext.js +18 -0
- package/dist/contexts/PageViewportContext.js +8 -0
- package/dist/contexts/PagesRotateContext.js +43 -0
- package/dist/contexts/PaginationContext.js +39 -0
- package/dist/contexts/PrintContext.js +78 -0
- package/dist/contexts/RPDocumentContext.js +69 -0
- package/dist/contexts/RenderQueueProvider.js +72 -0
- package/dist/contexts/RenderedPagesCache.js +14 -0
- package/dist/contexts/RotationContext.js +38 -0
- package/dist/contexts/ScrollModeContext.js +22 -0
- package/dist/contexts/SearchContext.js +96 -0
- package/dist/contexts/SelectionModeContext.js +24 -0
- package/dist/contexts/SmoothScaleContext.js +67 -0
- package/dist/contexts/SmoothScrollContext.js +12 -0
- package/dist/contexts/ThemeContext.js +7 -0
- package/dist/contexts/ThumbnailsContext.js +43 -0
- package/dist/contexts/ToolComponentContext.js +52 -0
- package/dist/contexts/ToolbarComponentContext.js +48 -0
- package/dist/contexts/ViewModeContext.js +33 -0
- package/dist/contexts/ViewportContext.js +85 -0
- package/dist/contexts/VirtualGridContext.js +15 -0
- package/dist/contexts/VirtualScrollContext.js +53 -0
- package/dist/contexts/ZoomContext.js +107 -0
- package/dist/de_DE-a553b162.js +489 -0
- package/dist/floating-ui.react-dom-5ec29bd6.js +1327 -0
- package/dist/index-4baea9b5.js +1198 -0
- package/dist/index-655864a7.js +27 -0
- package/dist/index-c0faa594.js +309 -0
- package/dist/index-e3ee9457.js +150 -0
- package/dist/libInjectCss.js +9 -0
- package/dist/main.js +289 -0
- package/dist/types/assets/style.d.ts +1 -0
- package/dist/types/components/RPConfig.d.ts +3 -0
- package/dist/types/components/RPController.d.ts +3 -0
- package/dist/types/components/RPDropFileZone.d.ts +2 -0
- package/dist/types/components/RPPages.d.ts +2 -0
- package/dist/types/components/RPProvider.d.ts +3 -0
- package/dist/types/components/RPTheme.d.ts +3 -0
- package/dist/types/components/icons/CheckIcon.d.ts +2 -0
- package/dist/types/components/icons/ChevronDownIcon.d.ts +2 -0
- package/dist/types/components/icons/ChevronUpIcon.d.ts +2 -0
- package/dist/types/components/icons/ClearIcon.d.ts +2 -0
- package/dist/types/components/icons/ClockwiseIcon.d.ts +2 -0
- package/dist/types/components/icons/CloseIcon.d.ts +2 -0
- package/dist/types/components/icons/DarkPdfIcon.d.ts +2 -0
- package/dist/types/components/icons/DualPageIcon.d.ts +2 -0
- package/dist/types/components/icons/DualPageWithCoverIcon.d.ts +2 -0
- package/dist/types/components/icons/FileDownloadDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/FileUploadDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/FullScreenIcon.d.ts +2 -0
- package/dist/types/components/icons/GoToDownIcon.d.ts +2 -0
- package/dist/types/components/icons/HandModeDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/HorizontalScrollingIcon.d.ts +2 -0
- package/dist/types/components/icons/InfoIcon.d.ts +2 -0
- package/dist/types/components/icons/LightPdfIcon.d.ts +2 -0
- package/dist/types/components/icons/LoaderIcon.d.ts +2 -0
- package/dist/types/components/icons/MoonIcon.d.ts +2 -0
- package/dist/types/components/icons/PageScrollingIcon.d.ts +2 -0
- package/dist/types/components/icons/PrintDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/SearchIcon.d.ts +2 -0
- package/dist/types/components/icons/SinglePageIcon.d.ts +2 -0
- package/dist/types/components/icons/SunIcon.d.ts +2 -0
- package/dist/types/components/icons/TextSelectionDefaultIcon.d.ts +2 -0
- package/dist/types/components/icons/ThreeDotIcon.d.ts +2 -0
- package/dist/types/components/icons/Thumbnail.d.ts +2 -0
- package/dist/types/components/icons/VerticalScrollingIcon.d.ts +2 -0
- package/dist/types/components/icons/WrappedScrollingIcon.d.ts +2 -0
- package/dist/types/components/icons/ZoomInIcon.d.ts +2 -0
- package/dist/types/components/icons/ZoomOutIcon.d.ts +2 -0
- package/dist/types/components/layout/Container.d.ts +8 -0
- package/dist/types/components/layout/LayoutContainer.d.ts +10 -0
- package/dist/types/components/layout/LayoutWrapper.d.ts +8 -0
- package/dist/types/components/layout/RPDefaultLayout.d.ts +2 -0
- package/dist/types/components/layout/RPLayout.d.ts +3 -0
- package/dist/types/components/layout/SkipLink.d.ts +7 -0
- package/dist/types/components/layout/WrapperLayout.d.ts +2 -0
- package/dist/types/components/layout/sidebar/RPSidebar.d.ts +1 -0
- package/dist/types/components/layout/sidebar/RPSplitter.d.ts +9 -0
- package/dist/types/components/layout/sidebar/Thumbnail.d.ts +11 -0
- package/dist/types/components/layout/sidebar/Thumbnails.d.ts +6 -0
- package/dist/types/components/layout/toolbar/DarkModeTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/DocumentDialog.d.ts +2 -0
- package/dist/types/components/layout/toolbar/DocumentProperties.d.ts +1 -0
- package/dist/types/components/layout/toolbar/FileDownloadTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/FileUploadTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/FullScreenTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/MenuItem.d.ts +6 -0
- package/dist/types/components/layout/toolbar/MenuSeparator.d.ts +1 -0
- package/dist/types/components/layout/toolbar/MostPageTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/OtherTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/Paginate.d.ts +1 -0
- package/dist/types/components/layout/toolbar/PrintTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/PropertyItem.d.ts +7 -0
- package/dist/types/components/layout/toolbar/RPMenuItem.d.ts +11 -0
- package/dist/types/components/layout/toolbar/RPMoreOptions.d.ts +3 -0
- package/dist/types/components/layout/toolbar/RPToolbar.d.ts +1 -0
- package/dist/types/components/layout/toolbar/RPToolbarEnd.d.ts +1 -0
- package/dist/types/components/layout/toolbar/RotateTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/ScrollModeTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/SearchCloseButton.d.ts +7 -0
- package/dist/types/components/layout/toolbar/SearchResultNavigator.d.ts +1 -0
- package/dist/types/components/layout/toolbar/SearchTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/SelectionModeTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/ThumbnailTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/ToolbarCustom.d.ts +3 -0
- package/dist/types/components/layout/toolbar/ToolbarDefault.d.ts +4 -0
- package/dist/types/components/layout/toolbar/ToolbarLayout.d.ts +3 -0
- package/dist/types/components/layout/toolbar/ViewModeTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/ZoomTool.d.ts +1 -0
- package/dist/types/components/layout/toolbar/tools/DocumentPropertiesTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/DualPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/DualPageWithCoverTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FileDownloadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FileUploadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FirstPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FullScreenTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/HorizontalScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/InputPageTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/tools/LastPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/NextPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/PageScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/PreviousPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/PrintTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/RotateClockwiseTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/RotateCounterclockwiseTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/SelectionModeSwitcherTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/SinglePageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ThemeSwitcherTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ThumbnailTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/VerticalScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ZoomInTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ZoomLevelDisplay.d.ts +7 -0
- package/dist/types/components/layout/toolbar/tools/ZoomLevelTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/ZoomOutTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/defaults/RPHorizontalBar.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/defaults/RPVerticalBar.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/DocumentProperties.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FileDownloadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FileUploadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FullScreenTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/MostPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/PrintTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/RotateTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/ScrollModeTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/SelectionModeTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/ViewModeTool.d.ts +3 -0
- package/dist/types/components/page/AnnotationLayer.d.ts +6 -0
- package/dist/types/components/page/CanvasLayer.d.ts +8 -0
- package/dist/types/components/page/CustomElement.d.ts +6 -0
- package/dist/types/components/page/DualPage.d.ts +5 -0
- package/dist/types/components/page/DualPageWithCover.d.ts +5 -0
- package/dist/types/components/page/RPPage.d.ts +5 -0
- package/dist/types/components/page/SinglePage.d.ts +5 -0
- package/dist/types/components/page/TextHighlightLayer.d.ts +10 -0
- package/dist/types/components/page/TextLayer.d.ts +6 -0
- package/dist/types/components/page/searchHighlight.d.ts +5 -0
- package/dist/types/components/ui/Button.d.ts +6 -0
- package/dist/types/components/ui/Checkbox.d.ts +10 -0
- package/dist/types/components/ui/DropDown.d.ts +10 -0
- package/dist/types/components/ui/Input.d.ts +6 -0
- package/dist/types/components/ui/LoadingIndicator.d.ts +6 -0
- package/dist/types/components/ui/PasswordModal.d.ts +3 -0
- package/dist/types/components/ui/RPTooltip.d.ts +9 -0
- package/dist/types/contexts/ConfigContext.d.ts +5 -0
- package/dist/types/contexts/DarkModeContext.d.ts +5 -0
- package/dist/types/contexts/DimensionPagesContext.d.ts +4 -0
- package/dist/types/contexts/DocumentPasswordContext.d.ts +14 -0
- package/dist/types/contexts/DownloadContext.d.ts +11 -0
- package/dist/types/contexts/DropFileZoneContext.d.ts +5 -0
- package/dist/types/contexts/ElementPageContext.d.ts +6 -0
- package/dist/types/contexts/EventCallbackContext.d.ts +5 -0
- package/dist/types/contexts/FileInputContext.d.ts +7 -0
- package/dist/types/contexts/FullScreenContext.d.ts +7 -0
- package/dist/types/contexts/GlobalCurrentPage.d.ts +11 -0
- package/dist/types/contexts/HighlightContext.d.ts +8 -0
- package/dist/types/contexts/IconContext.d.ts +7 -0
- package/dist/types/contexts/IconToolContext.d.ts +9 -0
- package/dist/types/contexts/InitialStateContext.d.ts +5 -0
- package/dist/types/contexts/LayerContext.d.ts +5 -0
- package/dist/types/contexts/LayoutContainerContext.d.ts +12 -0
- package/dist/types/contexts/LicenseContext.d.ts +7 -0
- package/dist/types/contexts/LoaderContext.d.ts +12 -0
- package/dist/types/contexts/LocalizationContext.d.ts +5 -0
- package/dist/types/contexts/OtherToolContext.d.ts +9 -0
- package/dist/types/contexts/PageViewportContext.d.ts +4 -0
- package/dist/types/contexts/PagesRotateContext.d.ts +15 -0
- package/dist/types/contexts/PaginationContext.d.ts +5 -0
- package/dist/types/contexts/PrintContext.d.ts +7 -0
- package/dist/types/contexts/RPDocumentContext.d.ts +12 -0
- package/dist/types/contexts/RenderQueueProvider.d.ts +17 -0
- package/dist/types/contexts/RenderedPagesCache.d.ts +10 -0
- package/dist/types/contexts/RotationContext.d.ts +5 -0
- package/dist/types/contexts/ScrollModeContext.d.ts +5 -0
- package/dist/types/contexts/SearchContext.d.ts +7 -0
- package/dist/types/contexts/SelectionModeContext.d.ts +5 -0
- package/dist/types/contexts/SmoothScaleContext.d.ts +16 -0
- package/dist/types/contexts/SmoothScrollContext.d.ts +8 -0
- package/dist/types/contexts/ThemeContext.d.ts +4 -0
- package/dist/types/contexts/ThumbnailsContext.d.ts +7 -0
- package/dist/types/contexts/ToolComponentContext.d.ts +12 -0
- package/dist/types/contexts/ToolbarComponentContext.d.ts +9 -0
- package/dist/types/contexts/ViewModeContext.d.ts +5 -0
- package/dist/types/contexts/ViewportContext.d.ts +28 -0
- package/dist/types/contexts/VirtualGridContext.d.ts +9 -0
- package/dist/types/contexts/VirtualScrollContext.d.ts +30 -0
- package/dist/types/contexts/ZoomContext.d.ts +5 -0
- package/dist/types/libInjectCss.d.ts +1 -0
- package/dist/types/locales/de_DE.json.d.ts +83 -0
- package/dist/types/locales/en_US.json.d.ts +83 -0
- package/dist/types/locales/it_IT.json.d.ts +83 -0
- package/dist/types/locales/pt_PT.json.d.ts +83 -0
- package/dist/types/locales/th_TH.json.d.ts +83 -0
- package/dist/types/locales/zh_CN.json.d.ts +83 -0
- package/dist/types/main.d.ts +51 -0
- package/dist/types/utils/Queue.d.ts +18 -0
- package/dist/types/utils/annotations.d.ts +18 -0
- package/dist/types/utils/appConsole.d.ts +24 -0
- package/dist/types/utils/approximateFragtion.d.ts +9 -0
- package/dist/types/utils/calculatePage.d.ts +12 -0
- package/dist/types/utils/charators.d.ts +12 -0
- package/dist/types/utils/const.d.ts +3 -0
- package/dist/types/utils/constants.d.ts +5 -0
- package/dist/types/utils/convertPdfDate.d.ts +1 -0
- package/dist/types/utils/dateFormatter.d.ts +1 -0
- package/dist/types/utils/elementPagePosition.d.ts +17 -0
- package/dist/types/utils/formatFileSize.d.ts +1 -0
- package/dist/types/utils/getElementPositionInPage.d.ts +5 -0
- package/dist/types/utils/getScrollDistance.d.ts +1 -0
- package/dist/types/utils/getThumbnailViewport.d.ts +5 -0
- package/dist/types/utils/getWordPositionInPage.d.ts +8 -0
- package/dist/types/utils/getZoomLevel.d.ts +2 -0
- package/dist/types/utils/highlight.d.ts +14 -0
- package/dist/types/utils/hooks/useAccumulateFactor.d.ts +9 -0
- package/dist/types/utils/hooks/useCopyText.d.ts +1 -0
- package/dist/types/utils/hooks/useDarkMode.d.ts +2 -0
- package/dist/types/utils/hooks/useDarkModeProps.d.ts +2 -0
- package/dist/types/utils/hooks/useDebounce.d.ts +1 -0
- package/dist/types/utils/hooks/useElementSize.d.ts +8 -0
- package/dist/types/utils/hooks/useFileDownload.d.ts +3 -0
- package/dist/types/utils/hooks/useFlickerSelectText.d.ts +1 -0
- package/dist/types/utils/hooks/useFullScreen.d.ts +6 -0
- package/dist/types/utils/hooks/useGrabScroll.d.ts +11 -0
- package/dist/types/utils/hooks/useHighlight.d.ts +10 -0
- package/dist/types/utils/hooks/useInfiniteScroll.d.ts +6 -0
- package/dist/types/utils/hooks/useLicense.d.ts +2 -0
- package/dist/types/utils/hooks/useLoadPdf.d.ts +11 -0
- package/dist/types/utils/hooks/useLoadWorker.d.ts +3 -0
- package/dist/types/utils/hooks/useLocalization.d.ts +10 -0
- package/dist/types/utils/hooks/useMousePressed.d.ts +7 -0
- package/dist/types/utils/hooks/usePageRotateContext.d.ts +3 -0
- package/dist/types/utils/hooks/usePaginate.d.ts +2 -0
- package/dist/types/utils/hooks/usePdfProperties.d.ts +9 -0
- package/dist/types/utils/hooks/usePinch.d.ts +1 -0
- package/dist/types/utils/hooks/usePresentPage.d.ts +2 -0
- package/dist/types/utils/hooks/usePrint.d.ts +12 -0
- package/dist/types/utils/hooks/useRequestAnimationFrame.d.ts +5 -0
- package/dist/types/utils/hooks/useResizeObserver.d.ts +6 -0
- package/dist/types/utils/hooks/useRotate.d.ts +4 -0
- package/dist/types/utils/hooks/useScrollToPage.d.ts +3 -0
- package/dist/types/utils/hooks/useSearch.d.ts +13 -0
- package/dist/types/utils/hooks/useTextSelection.d.ts +7 -0
- package/dist/types/utils/hooks/useThumbnail.d.ts +7 -0
- package/dist/types/utils/hooks/useVirtualReactWindow.d.ts +17 -0
- package/dist/types/utils/hooks/useWatermark.d.ts +1 -0
- package/dist/types/utils/injectPrintCSS.d.ts +1 -0
- package/dist/types/utils/link_service.d.ts +81 -0
- package/dist/types/utils/renderPage.d.ts +3 -0
- package/dist/types/utils/sanitizeExternalUrl.d.ts +1 -0
- package/dist/types/utils/smoothScrollTo.d.ts +2 -0
- package/dist/types/utils/types.d.ts +920 -0
- package/dist/types/utils/withRef.d.ts +5 -0
- package/dist/types/utils/zoom.d.ts +2 -0
- package/dist/utils/Queue.js +47 -0
- package/dist/utils/annotations.js +277 -0
- package/dist/utils/appConsole.js +42 -0
- package/dist/utils/approximateFragtion.js +22 -0
- package/dist/utils/calculatePage.js +21 -0
- package/dist/utils/charators.js +48 -0
- package/dist/utils/const.js +9 -0
- package/dist/utils/constants.js +8 -0
- package/dist/utils/convertPdfDate.js +25 -0
- package/dist/utils/dateFormatter.js +7 -0
- package/dist/utils/elementPagePosition.js +11 -0
- package/dist/utils/formatFileSize.js +9 -0
- package/dist/utils/getElementPositionInPage.js +84 -0
- package/dist/utils/getScrollDistance.js +4 -0
- package/dist/utils/getThumbnailViewport.js +7 -0
- package/dist/utils/getWordPositionInPage.js +25 -0
- package/dist/utils/getZoomLevel.js +24 -0
- package/dist/utils/highlight.js +221 -0
- package/dist/utils/hooks/useAccumulateFactor.js +17 -0
- package/dist/utils/hooks/useCopyText.js +36 -0
- package/dist/utils/hooks/useDarkMode.js +11 -0
- package/dist/utils/hooks/useDarkModeProps.js +12 -0
- package/dist/utils/hooks/useDebounce.js +19 -0
- package/dist/utils/hooks/useElementSize.js +21 -0
- package/dist/utils/hooks/useFileDownload.js +33 -0
- package/dist/utils/hooks/useFlickerSelectText.js +25 -0
- package/dist/utils/hooks/useFullScreen.js +29 -0
- package/dist/utils/hooks/useGrabScroll.js +52 -0
- package/dist/utils/hooks/useHighlight.js +55 -0
- package/dist/utils/hooks/useInfiniteScroll.js +19 -0
- package/dist/utils/hooks/useLicense.js +110 -0
- package/dist/utils/hooks/useLoadPdf.js +85 -0
- package/dist/utils/hooks/useLoadWorker.js +16 -0
- package/dist/utils/hooks/useLocalization.js +26 -0
- package/dist/utils/hooks/useMousePressed.js +20 -0
- package/dist/utils/hooks/usePageRotateContext.js +42 -0
- package/dist/utils/hooks/usePaginate.js +37 -0
- package/dist/utils/hooks/usePdfProperties.js +37 -0
- package/dist/utils/hooks/usePinch.js +147 -0
- package/dist/utils/hooks/usePresentPage.js +90 -0
- package/dist/utils/hooks/usePrint.js +185 -0
- package/dist/utils/hooks/useRequestAnimationFrame.js +17 -0
- package/dist/utils/hooks/useResizeObserver.js +22 -0
- package/dist/utils/hooks/useRotate.js +27 -0
- package/dist/utils/hooks/useScrollToPage.js +37 -0
- package/dist/utils/hooks/useSearch.js +162 -0
- package/dist/utils/hooks/useTextSelection.js +76 -0
- package/dist/utils/hooks/useThumbnail.js +59 -0
- package/dist/utils/hooks/useVirtualReactWindow.js +96 -0
- package/dist/utils/hooks/useWatermark.js +94 -0
- package/dist/utils/injectPrintCSS.js +22 -0
- package/dist/utils/link_service.js +138 -0
- package/dist/utils/renderPage.js +20 -0
- package/dist/utils/sanitizeExternalUrl.js +16 -0
- package/dist/utils/smoothScrollTo.js +6 -0
- package/dist/utils/types.js +22 -0
- package/dist/utils/withRef.js +8 -0
- package/dist/utils/zoom.js +6 -0
- package/package.json +88 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { jsx as H } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as g, useState as P, useMemo as G, useCallback as _, useEffect as w } from "react";
|
|
3
|
+
import { useDocumentContext as J } from "../../contexts/RPDocumentContext.js";
|
|
4
|
+
import * as $ from "pdfjs-dist";
|
|
5
|
+
import { resetDivs as U, highlightMatches as V } from "../../utils/highlight.js";
|
|
6
|
+
import { useSearchContext as X } from "../../contexts/SearchContext.js";
|
|
7
|
+
import { useSmoothScaleContext as z } from "../../contexts/SmoothScaleContext.js";
|
|
8
|
+
import "../../utils/hooks/useLoadPdf.js";
|
|
9
|
+
import "../../utils/types.js";
|
|
10
|
+
import "../../de_DE-a553b162.js";
|
|
11
|
+
import "../../utils/getThumbnailViewport.js";
|
|
12
|
+
import "../../contexts/ConfigContext.js";
|
|
13
|
+
import "../../contexts/DocumentPasswordContext.js";
|
|
14
|
+
import "../../utils/appConsole.js";
|
|
15
|
+
import "../../utils/hooks/usePdfProperties.js";
|
|
16
|
+
import "../../utils/convertPdfDate.js";
|
|
17
|
+
import "../../utils/formatFileSize.js";
|
|
18
|
+
import "../../utils/charators.js";
|
|
19
|
+
import "../../utils/hooks/useSearch.js";
|
|
20
|
+
import "../../contexts/VirtualScrollContext.js";
|
|
21
|
+
import "../../contexts/ScrollModeContext.js";
|
|
22
|
+
import "../../contexts/InitialStateContext.js";
|
|
23
|
+
import "../../contexts/ZoomContext.js";
|
|
24
|
+
import "../../utils/constants.js";
|
|
25
|
+
import "../../utils/getZoomLevel.js";
|
|
26
|
+
import "../../contexts/LayoutContainerContext.js";
|
|
27
|
+
import "../../contexts/ViewModeContext.js";
|
|
28
|
+
import "../../contexts/RotationContext.js";
|
|
29
|
+
import "../../contexts/GlobalCurrentPage.js";
|
|
30
|
+
import "../../contexts/EventCallbackContext.js";
|
|
31
|
+
import "../../utils/hooks/useDebounce.js";
|
|
32
|
+
import "../../PaginationContext-9217cab4.js";
|
|
33
|
+
import "../../contexts/VirtualGridContext.js";
|
|
34
|
+
import "../../utils/smoothScrollTo.js";
|
|
35
|
+
import "../../contexts/DimensionPagesContext.js";
|
|
36
|
+
import "../../contexts/PagesRotateContext.js";
|
|
37
|
+
import "../../contexts/SmoothScrollContext.js";
|
|
38
|
+
import "../../utils/getScrollDistance.js";
|
|
39
|
+
import "../../utils/calculatePage.js";
|
|
40
|
+
import "../../utils/getWordPositionInPage.js";
|
|
41
|
+
const F = "_selecting_1553j_14", K = "_markedContent_1553j_37", a = {
|
|
42
|
+
"rp-text-layer": "_rp-text-layer_1553j_1",
|
|
43
|
+
selecting: F,
|
|
44
|
+
markedContent: K,
|
|
45
|
+
"rp-text-layer-text": "_rp-text-layer-text_1553j_61"
|
|
46
|
+
}, ke = (k) => {
|
|
47
|
+
const { pageNumber: d } = k, { pages: R } = J(), { isTransitioning: q } = z(), i = g(null), { matches: O, currentMatch: v } = X(), [D, A] = P(
|
|
48
|
+
[]
|
|
49
|
+
), p = g(), h = g(), L = g([]), y = G(() => O.filter((r) => r.pageIndex === d - 1), [O, d]), T = _(
|
|
50
|
+
(r, t, e = !1) => {
|
|
51
|
+
if (e && U(r, t), !y.length) {
|
|
52
|
+
L.current = [], A([]);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const n = V(y, r, t);
|
|
56
|
+
A(n);
|
|
57
|
+
},
|
|
58
|
+
[y]
|
|
59
|
+
), x = g(), C = g(!1), S = _(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
60
|
+
w(() => ((() => {
|
|
61
|
+
if (x.current)
|
|
62
|
+
return;
|
|
63
|
+
x.current = new AbortController();
|
|
64
|
+
const { signal: t } = x.current, e = () => {
|
|
65
|
+
S().forEach((o) => {
|
|
66
|
+
const s = o.querySelector(".endOfContent");
|
|
67
|
+
s && (o.appendChild(s), s.style.width = "", s.style.height = "", o.classList.remove(a.selecting));
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
document.addEventListener(
|
|
71
|
+
"pointerdown",
|
|
72
|
+
() => {
|
|
73
|
+
C.current = !0;
|
|
74
|
+
},
|
|
75
|
+
{ signal: t }
|
|
76
|
+
), document.addEventListener(
|
|
77
|
+
"pointerup",
|
|
78
|
+
() => {
|
|
79
|
+
C.current = !1, e();
|
|
80
|
+
},
|
|
81
|
+
{ signal: t }
|
|
82
|
+
), window.addEventListener(
|
|
83
|
+
"blur",
|
|
84
|
+
() => {
|
|
85
|
+
C.current = !1, e();
|
|
86
|
+
},
|
|
87
|
+
{ signal: t }
|
|
88
|
+
), document.addEventListener(
|
|
89
|
+
"keyup",
|
|
90
|
+
() => {
|
|
91
|
+
C.current || e();
|
|
92
|
+
},
|
|
93
|
+
{ signal: t }
|
|
94
|
+
);
|
|
95
|
+
let n = null;
|
|
96
|
+
document.addEventListener(
|
|
97
|
+
"selectionchange",
|
|
98
|
+
() => {
|
|
99
|
+
var M, j;
|
|
100
|
+
const o = document.getSelection();
|
|
101
|
+
if (!o)
|
|
102
|
+
return;
|
|
103
|
+
if (o.rangeCount === 0) {
|
|
104
|
+
e();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const s = /* @__PURE__ */ new Set();
|
|
108
|
+
for (let c = 0; c < o.rangeCount; c++) {
|
|
109
|
+
const f = o.getRangeAt(c);
|
|
110
|
+
S().forEach((N) => {
|
|
111
|
+
f.intersectsNode(N) && !s.has(N) && s.add(N);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
S().forEach((c) => {
|
|
115
|
+
if (s.has(c))
|
|
116
|
+
c.classList.add(a.selecting);
|
|
117
|
+
else {
|
|
118
|
+
const f = c.querySelector(".endOfContent");
|
|
119
|
+
f && (c.appendChild(f), f.style.width = "", f.style.height = "", c.classList.remove(a.selecting));
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
const l = o.getRangeAt(0);
|
|
123
|
+
let u = n && (l.compareBoundaryPoints(Range.END_TO_END, n) === 0 || l.compareBoundaryPoints(Range.START_TO_END, n) === 0) ? l.startContainer : l.endContainer;
|
|
124
|
+
u.nodeType === Node.TEXT_NODE && (u = u.parentNode);
|
|
125
|
+
const m = (M = u.parentElement) == null ? void 0 : M.closest(
|
|
126
|
+
a["rp-text-layer"]
|
|
127
|
+
), E = m == null ? void 0 : m.querySelector(".endOfContent");
|
|
128
|
+
E && m && (E.style.width = m.style.width, E.style.height = m.style.height, (j = u.parentElement) == null || j.insertBefore(E, u.nextSibling)), n = l.cloneRange();
|
|
129
|
+
},
|
|
130
|
+
{ signal: t }
|
|
131
|
+
);
|
|
132
|
+
})(), () => {
|
|
133
|
+
var t;
|
|
134
|
+
(t = x.current) == null || t.abort(), x.current = void 0;
|
|
135
|
+
}), [S]);
|
|
136
|
+
const I = _(() => {
|
|
137
|
+
i.current && i.current.classList.add(a.selecting);
|
|
138
|
+
}, []), B = _(() => {
|
|
139
|
+
i.current && i.current.classList.remove(a.selecting);
|
|
140
|
+
}, []);
|
|
141
|
+
return w(() => {
|
|
142
|
+
if (L.current.forEach((e) => {
|
|
143
|
+
e.classList.remove("selected");
|
|
144
|
+
}), !D.length || !v || v.pageIndex !== d - 1)
|
|
145
|
+
return;
|
|
146
|
+
const r = y.findIndex(
|
|
147
|
+
(e) => JSON.stringify(e) === JSON.stringify(v)
|
|
148
|
+
);
|
|
149
|
+
if (r === -1)
|
|
150
|
+
return;
|
|
151
|
+
const t = D.filter((e) => e.index === r);
|
|
152
|
+
t.length && (L.current = t.map((e) => e.element), t.forEach((e) => {
|
|
153
|
+
e.element.classList.add("selected");
|
|
154
|
+
}));
|
|
155
|
+
}, [v, D, y]), w(() => {
|
|
156
|
+
const r = R.get(d);
|
|
157
|
+
if (!r || !i.current)
|
|
158
|
+
return;
|
|
159
|
+
const t = i.current;
|
|
160
|
+
return p.current && p.current.cancel(), r.page.getTextContent().then((e) => {
|
|
161
|
+
const n = r.page.getViewport({ scale: 1 });
|
|
162
|
+
return p.current = new $.TextLayer({
|
|
163
|
+
viewport: n,
|
|
164
|
+
textContentSource: e,
|
|
165
|
+
container: t
|
|
166
|
+
}), h.current = e, t && (t.innerText = ""), p.current.render();
|
|
167
|
+
}).then(() => {
|
|
168
|
+
var s, l;
|
|
169
|
+
[].slice.call(t.children).forEach((b) => {
|
|
170
|
+
b.classList.add(a["rp-text-layer-text"]), b.setAttribute("data-rp", "rp-text-layer-text");
|
|
171
|
+
});
|
|
172
|
+
const n = (s = p.current) == null ? void 0 : s.textDivs;
|
|
173
|
+
n && h.current && T(h.current, n);
|
|
174
|
+
const o = document.createElement("div");
|
|
175
|
+
o.className = "endOfContent", (l = i.current) == null || l.appendChild(o);
|
|
176
|
+
}).catch(() => {
|
|
177
|
+
}), () => {
|
|
178
|
+
var e;
|
|
179
|
+
(e = p.current) == null || e.cancel();
|
|
180
|
+
};
|
|
181
|
+
}, [R, d]), w(() => {
|
|
182
|
+
var e;
|
|
183
|
+
[].slice.call(i.current.children).forEach((n) => {
|
|
184
|
+
n.classList.add(a["rp-text-layer-text"]);
|
|
185
|
+
});
|
|
186
|
+
const t = (e = p.current) == null ? void 0 : e.textDivs;
|
|
187
|
+
t && h.current && T(h.current, t, !0);
|
|
188
|
+
}, [T]), /* @__PURE__ */ H(
|
|
189
|
+
"div",
|
|
190
|
+
{
|
|
191
|
+
"data-rp-text-layer": !0,
|
|
192
|
+
"data-rp": `page-${d}-textLayer`,
|
|
193
|
+
className: a["rp-text-layer"],
|
|
194
|
+
ref: i,
|
|
195
|
+
style: q ? { visibility: "hidden" } : void 0,
|
|
196
|
+
onMouseDown: I,
|
|
197
|
+
onMouseUp: B
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
};
|
|
201
|
+
export {
|
|
202
|
+
ke as TextLayer
|
|
203
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { EMPTY_KEYWORD_REGEXP as c } from "../../utils/const.js";
|
|
2
|
+
const n = (e) => {
|
|
3
|
+
let s = e.keyword.replace(/[.^$*+?()[{|\\]/g, (f) => `\\${f}`).trim();
|
|
4
|
+
const i = e.matchCase ? "g" : "gi";
|
|
5
|
+
return {
|
|
6
|
+
keyword: e.keyword,
|
|
7
|
+
regExp: new RegExp(s, i),
|
|
8
|
+
wholeWords: e.wholeWords || !1
|
|
9
|
+
};
|
|
10
|
+
}, u = (e, t, r) => e instanceof RegExp ? {
|
|
11
|
+
keyword: e.source,
|
|
12
|
+
regExp: e,
|
|
13
|
+
wholeWords: r || !1
|
|
14
|
+
} : typeof e == "string" ? e === "" ? c : n({
|
|
15
|
+
keyword: e,
|
|
16
|
+
matchCase: t || !1,
|
|
17
|
+
wholeWords: r || !1
|
|
18
|
+
}) : (typeof t < "u" && (e.matchCase = t), typeof r < "u" && (e.wholeWords = r), n(e)), o = (e) => {
|
|
19
|
+
const t = e.parentNode;
|
|
20
|
+
t && t.removeChild(e);
|
|
21
|
+
}, p = (e, t) => {
|
|
22
|
+
o(e);
|
|
23
|
+
const r = t.parentNode;
|
|
24
|
+
r && r.insertBefore(e, t), o(t);
|
|
25
|
+
}, l = (e) => {
|
|
26
|
+
const t = e.parentNode;
|
|
27
|
+
if (!t)
|
|
28
|
+
return;
|
|
29
|
+
const r = document.createRange();
|
|
30
|
+
r.selectNodeContents(e), p(r.extractContents(), e), t.normalize();
|
|
31
|
+
}, g = (e, t) => e.top < t.top ? -1 : e.top > t.top ? 1 : e.left < t.left ? -1 : e.left > t.left ? 1 : 0;
|
|
32
|
+
export {
|
|
33
|
+
n as normalizeFlagKeyword,
|
|
34
|
+
u as normalizeSingleKeyword,
|
|
35
|
+
g as sortHighlightPosition,
|
|
36
|
+
l as unwrap
|
|
37
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as p } from "../../clsx-0c6e471a.js";
|
|
3
|
+
import { withRef as u } from "../../utils/withRef.js";
|
|
4
|
+
import "react";
|
|
5
|
+
const o = {
|
|
6
|
+
"rp-button": "_rp-button_1jswj_1",
|
|
7
|
+
"rp-button-active": "_rp-button-active_1jswj_18"
|
|
8
|
+
}, _ = u((r, s) => {
|
|
9
|
+
const { children: e, active: t, className: a, role: n, ...i } = r;
|
|
10
|
+
return /* @__PURE__ */ c(
|
|
11
|
+
"button",
|
|
12
|
+
{
|
|
13
|
+
tabIndex: 0,
|
|
14
|
+
ref: s,
|
|
15
|
+
role: n,
|
|
16
|
+
"aria-pressed": t !== void 0 ? t : void 0,
|
|
17
|
+
...i,
|
|
18
|
+
className: p(o["rp-button"], a, t ? o["rp-button-active"] : ""),
|
|
19
|
+
children: e
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
_ as UIButton
|
|
25
|
+
};
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { jsx as i, jsxs as w, Fragment as U } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { c as z, a as B, P as y, b as S, d as G, f as K } from "../../index-c0faa594.js";
|
|
4
|
+
import { u as X } from "../../index-655864a7.js";
|
|
5
|
+
import { CheckIcon as J } from "../icons/CheckIcon.js";
|
|
6
|
+
import "react-dom";
|
|
7
|
+
function Q(e) {
|
|
8
|
+
const r = s.useRef({ value: e, previous: e });
|
|
9
|
+
return s.useMemo(() => (r.current.value !== e && (r.current.previous = r.current.value, r.current.value = e), r.current.previous), [e]);
|
|
10
|
+
}
|
|
11
|
+
var g = "Checkbox", [V, ne] = z(g), [W, E] = V(g);
|
|
12
|
+
function Y(e) {
|
|
13
|
+
const {
|
|
14
|
+
__scopeCheckbox: r,
|
|
15
|
+
checked: o,
|
|
16
|
+
children: d,
|
|
17
|
+
defaultChecked: n,
|
|
18
|
+
disabled: t,
|
|
19
|
+
form: u,
|
|
20
|
+
name: f,
|
|
21
|
+
onCheckedChange: l,
|
|
22
|
+
required: k,
|
|
23
|
+
value: C = "on",
|
|
24
|
+
// @ts-expect-error
|
|
25
|
+
internal_do_not_use_render: p
|
|
26
|
+
} = e, [h, v] = K({
|
|
27
|
+
prop: o,
|
|
28
|
+
defaultProp: n ?? !1,
|
|
29
|
+
onChange: l,
|
|
30
|
+
caller: g
|
|
31
|
+
}), [m, x] = s.useState(null), [_, c] = s.useState(null), a = s.useRef(!1), I = m ? !!u || !!m.closest("form") : (
|
|
32
|
+
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
33
|
+
!0
|
|
34
|
+
), R = {
|
|
35
|
+
checked: h,
|
|
36
|
+
disabled: t,
|
|
37
|
+
setChecked: v,
|
|
38
|
+
control: m,
|
|
39
|
+
setControl: x,
|
|
40
|
+
name: f,
|
|
41
|
+
form: u,
|
|
42
|
+
value: C,
|
|
43
|
+
hasConsumerStoppedPropagationRef: a,
|
|
44
|
+
required: k,
|
|
45
|
+
defaultChecked: b(n) ? !1 : n,
|
|
46
|
+
isFormControl: I,
|
|
47
|
+
bubbleInput: _,
|
|
48
|
+
setBubbleInput: c
|
|
49
|
+
};
|
|
50
|
+
return /* @__PURE__ */ i(
|
|
51
|
+
W,
|
|
52
|
+
{
|
|
53
|
+
scope: r,
|
|
54
|
+
...R,
|
|
55
|
+
children: Z(p) ? p(R) : d
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
var M = "CheckboxTrigger", T = s.forwardRef(
|
|
60
|
+
({ __scopeCheckbox: e, onKeyDown: r, onClick: o, ...d }, n) => {
|
|
61
|
+
const {
|
|
62
|
+
control: t,
|
|
63
|
+
value: u,
|
|
64
|
+
disabled: f,
|
|
65
|
+
checked: l,
|
|
66
|
+
required: k,
|
|
67
|
+
setControl: C,
|
|
68
|
+
setChecked: p,
|
|
69
|
+
hasConsumerStoppedPropagationRef: h,
|
|
70
|
+
isFormControl: v,
|
|
71
|
+
bubbleInput: m
|
|
72
|
+
} = E(M, e), x = B(n, C), _ = s.useRef(l);
|
|
73
|
+
return s.useEffect(() => {
|
|
74
|
+
const c = t == null ? void 0 : t.form;
|
|
75
|
+
if (c) {
|
|
76
|
+
const a = () => p(_.current);
|
|
77
|
+
return c.addEventListener("reset", a), () => c.removeEventListener("reset", a);
|
|
78
|
+
}
|
|
79
|
+
}, [t, p]), /* @__PURE__ */ i(
|
|
80
|
+
y.button,
|
|
81
|
+
{
|
|
82
|
+
type: "button",
|
|
83
|
+
role: "checkbox",
|
|
84
|
+
"aria-checked": b(l) ? "mixed" : l,
|
|
85
|
+
"aria-required": k,
|
|
86
|
+
"data-state": j(l),
|
|
87
|
+
"data-disabled": f ? "" : void 0,
|
|
88
|
+
disabled: f,
|
|
89
|
+
value: u,
|
|
90
|
+
...d,
|
|
91
|
+
ref: x,
|
|
92
|
+
onKeyDown: S(r, (c) => {
|
|
93
|
+
c.key === "Enter" && c.preventDefault();
|
|
94
|
+
}),
|
|
95
|
+
onClick: S(o, (c) => {
|
|
96
|
+
p((a) => b(a) ? !0 : !a), m && v && (h.current = c.isPropagationStopped(), h.current || c.stopPropagation());
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
T.displayName = M;
|
|
103
|
+
var q = s.forwardRef(
|
|
104
|
+
(e, r) => {
|
|
105
|
+
const {
|
|
106
|
+
__scopeCheckbox: o,
|
|
107
|
+
name: d,
|
|
108
|
+
checked: n,
|
|
109
|
+
defaultChecked: t,
|
|
110
|
+
required: u,
|
|
111
|
+
disabled: f,
|
|
112
|
+
value: l,
|
|
113
|
+
onCheckedChange: k,
|
|
114
|
+
form: C,
|
|
115
|
+
...p
|
|
116
|
+
} = e;
|
|
117
|
+
return /* @__PURE__ */ i(
|
|
118
|
+
Y,
|
|
119
|
+
{
|
|
120
|
+
__scopeCheckbox: o,
|
|
121
|
+
checked: n,
|
|
122
|
+
defaultChecked: t,
|
|
123
|
+
disabled: f,
|
|
124
|
+
required: u,
|
|
125
|
+
onCheckedChange: k,
|
|
126
|
+
name: d,
|
|
127
|
+
form: C,
|
|
128
|
+
value: l,
|
|
129
|
+
internal_do_not_use_render: ({ isFormControl: h }) => /* @__PURE__ */ w(U, { children: [
|
|
130
|
+
/* @__PURE__ */ i(
|
|
131
|
+
T,
|
|
132
|
+
{
|
|
133
|
+
...p,
|
|
134
|
+
ref: r,
|
|
135
|
+
__scopeCheckbox: o
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
h && /* @__PURE__ */ i(
|
|
139
|
+
O,
|
|
140
|
+
{
|
|
141
|
+
__scopeCheckbox: o
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
] })
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
q.displayName = g;
|
|
150
|
+
var A = "CheckboxIndicator", F = s.forwardRef(
|
|
151
|
+
(e, r) => {
|
|
152
|
+
const { __scopeCheckbox: o, forceMount: d, ...n } = e, t = E(A, o);
|
|
153
|
+
return /* @__PURE__ */ i(
|
|
154
|
+
G,
|
|
155
|
+
{
|
|
156
|
+
present: d || b(t.checked) || t.checked === !0,
|
|
157
|
+
children: /* @__PURE__ */ i(
|
|
158
|
+
y.span,
|
|
159
|
+
{
|
|
160
|
+
"data-state": j(t.checked),
|
|
161
|
+
"data-disabled": t.disabled ? "" : void 0,
|
|
162
|
+
...n,
|
|
163
|
+
ref: r,
|
|
164
|
+
style: { pointerEvents: "none", ...e.style }
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
F.displayName = A;
|
|
172
|
+
var D = "CheckboxBubbleInput", O = s.forwardRef(
|
|
173
|
+
({ __scopeCheckbox: e, ...r }, o) => {
|
|
174
|
+
const {
|
|
175
|
+
control: d,
|
|
176
|
+
hasConsumerStoppedPropagationRef: n,
|
|
177
|
+
checked: t,
|
|
178
|
+
defaultChecked: u,
|
|
179
|
+
required: f,
|
|
180
|
+
disabled: l,
|
|
181
|
+
name: k,
|
|
182
|
+
value: C,
|
|
183
|
+
form: p,
|
|
184
|
+
bubbleInput: h,
|
|
185
|
+
setBubbleInput: v
|
|
186
|
+
} = E(D, e), m = B(o, v), x = Q(t), _ = X(d);
|
|
187
|
+
s.useEffect(() => {
|
|
188
|
+
const a = h;
|
|
189
|
+
if (!a)
|
|
190
|
+
return;
|
|
191
|
+
const I = window.HTMLInputElement.prototype, N = Object.getOwnPropertyDescriptor(
|
|
192
|
+
I,
|
|
193
|
+
"checked"
|
|
194
|
+
).set, H = !n.current;
|
|
195
|
+
if (x !== t && N) {
|
|
196
|
+
const L = new Event("click", { bubbles: H });
|
|
197
|
+
a.indeterminate = b(t), N.call(a, b(t) ? !1 : t), a.dispatchEvent(L);
|
|
198
|
+
}
|
|
199
|
+
}, [h, x, t, n]);
|
|
200
|
+
const c = s.useRef(b(t) ? !1 : t);
|
|
201
|
+
return /* @__PURE__ */ i(
|
|
202
|
+
y.input,
|
|
203
|
+
{
|
|
204
|
+
type: "checkbox",
|
|
205
|
+
"aria-hidden": !0,
|
|
206
|
+
defaultChecked: u ?? c.current,
|
|
207
|
+
required: f,
|
|
208
|
+
disabled: l,
|
|
209
|
+
name: k,
|
|
210
|
+
value: C,
|
|
211
|
+
form: p,
|
|
212
|
+
...r,
|
|
213
|
+
tabIndex: -1,
|
|
214
|
+
ref: m,
|
|
215
|
+
style: {
|
|
216
|
+
...r.style,
|
|
217
|
+
..._,
|
|
218
|
+
position: "absolute",
|
|
219
|
+
pointerEvents: "none",
|
|
220
|
+
opacity: 0,
|
|
221
|
+
margin: 0,
|
|
222
|
+
// We transform because the input is absolutely positioned but we have
|
|
223
|
+
// rendered it **after** the button. This pulls it back to sit on top
|
|
224
|
+
// of the button.
|
|
225
|
+
transform: "translateX(-100%)"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
O.displayName = D;
|
|
232
|
+
function Z(e) {
|
|
233
|
+
return typeof e == "function";
|
|
234
|
+
}
|
|
235
|
+
function b(e) {
|
|
236
|
+
return e === "indeterminate";
|
|
237
|
+
}
|
|
238
|
+
function j(e) {
|
|
239
|
+
return b(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
240
|
+
}
|
|
241
|
+
const P = {
|
|
242
|
+
"rp-checkbox": "_rp-checkbox_1vwg8_1",
|
|
243
|
+
"rp-checkbox-indicator": "_rp-checkbox-indicator_1vwg8_25"
|
|
244
|
+
}, ce = ({
|
|
245
|
+
children: e,
|
|
246
|
+
value: r,
|
|
247
|
+
name: o,
|
|
248
|
+
onChange: d,
|
|
249
|
+
tabIndex: n,
|
|
250
|
+
"aria-label": t
|
|
251
|
+
}) => {
|
|
252
|
+
const u = t ? { "aria-label": t } : {};
|
|
253
|
+
return /* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", position: "relative" }, children: [
|
|
254
|
+
/* @__PURE__ */ i(
|
|
255
|
+
q,
|
|
256
|
+
{
|
|
257
|
+
tabIndex: n,
|
|
258
|
+
className: P["rp-checkbox"],
|
|
259
|
+
checked: r,
|
|
260
|
+
id: o,
|
|
261
|
+
onCheckedChange: d,
|
|
262
|
+
role: "checkbox",
|
|
263
|
+
"aria-checked": r,
|
|
264
|
+
...u,
|
|
265
|
+
children: /* @__PURE__ */ i(F, { className: P["rp-checkbox-indicator"], "aria-hidden": "true", children: /* @__PURE__ */ i(J, {}) })
|
|
266
|
+
}
|
|
267
|
+
),
|
|
268
|
+
/* @__PURE__ */ i("label", { className: P["rp-checkbox-label"], htmlFor: o, children: e })
|
|
269
|
+
] });
|
|
270
|
+
};
|
|
271
|
+
export {
|
|
272
|
+
ce as UICheckbox
|
|
273
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsxs as p, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { R as l, T as c, P as _, C as m } from "../../index-4baea9b5.js";
|
|
3
|
+
import { c as A } from "../../clsx-0c6e471a.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "../../index-c0faa594.js";
|
|
6
|
+
import "react-dom";
|
|
7
|
+
import "../../index-e3ee9457.js";
|
|
8
|
+
import "../../Combination-54a77a7a.js";
|
|
9
|
+
import "../../floating-ui.react-dom-5ec29bd6.js";
|
|
10
|
+
import "../../index-655864a7.js";
|
|
11
|
+
const F = "_slideDownAndFade_1vzkq_1", w = "_slideLeftAndFade_1vzkq_1", f = "_slideUpAndFade_1vzkq_1", g = "_slideRightAndFade_1vzkq_1", h = {
|
|
12
|
+
"rp-dropdown-content": "_rp-dropdown-content_1vzkq_1",
|
|
13
|
+
slideDownAndFade: F,
|
|
14
|
+
slideLeftAndFade: w,
|
|
15
|
+
slideUpAndFade: f,
|
|
16
|
+
slideRightAndFade: g,
|
|
17
|
+
"rp-dropdown-arrow": "_rp-dropdown-arrow_1vzkq_30"
|
|
18
|
+
}, P = (e) => {
|
|
19
|
+
const { triggerComponent: n, children: o, container: r, className: t, open: s, onOpenChange: i, ...a } = e;
|
|
20
|
+
return /* @__PURE__ */ p(l, { modal: !1, open: s, onOpenChange: i, children: [
|
|
21
|
+
/* @__PURE__ */ d(c, { asChild: !0, children: n }),
|
|
22
|
+
/* @__PURE__ */ d(_, { container: r, children: /* @__PURE__ */ d(
|
|
23
|
+
m,
|
|
24
|
+
{
|
|
25
|
+
sideOffset: 8,
|
|
26
|
+
align: "end",
|
|
27
|
+
...a,
|
|
28
|
+
className: A(h["rp-dropdown-content"], t),
|
|
29
|
+
children: o
|
|
30
|
+
}
|
|
31
|
+
) })
|
|
32
|
+
] });
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
P as UIDropDown
|
|
36
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsxs as a, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { c as u } from "../../clsx-0c6e471a.js";
|
|
3
|
+
import { withRef as l } from "../../utils/withRef.js";
|
|
4
|
+
import "react";
|
|
5
|
+
const t = {
|
|
6
|
+
"rp-input": "_rp-input_3rj4v_1",
|
|
7
|
+
"rp-input-wrapper": "_rp-input-wrapper_3rj4v_22",
|
|
8
|
+
"rp-input-icon": "_rp-input-icon_3rj4v_26"
|
|
9
|
+
}, h = l((n, e) => {
|
|
10
|
+
const { className: o, icon: p, children: s, ...r } = n, c = r.role || (r.type === "text" || !r.type ? "textbox" : void 0);
|
|
11
|
+
return /* @__PURE__ */ a("div", { className: t["rp-input-wrapper"], children: [
|
|
12
|
+
/* @__PURE__ */ i(
|
|
13
|
+
"input",
|
|
14
|
+
{
|
|
15
|
+
...r,
|
|
16
|
+
role: c,
|
|
17
|
+
"data-icon": !!p,
|
|
18
|
+
ref: e,
|
|
19
|
+
className: u(o, t["rp-input"], "ignore-hover")
|
|
20
|
+
}
|
|
21
|
+
),
|
|
22
|
+
p && /* @__PURE__ */ i("span", { className: t["rp-input-icon"], "aria-hidden": "true", children: p }),
|
|
23
|
+
s
|
|
24
|
+
] });
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
h as UIInput
|
|
28
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as a, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as o } from "../../clsx-0c6e471a.js";
|
|
3
|
+
import { usePrintContext as p } from "../../contexts/PrintContext.js";
|
|
4
|
+
import { useLocalizationContext as d } from "../../contexts/LocalizationContext.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "../../utils/hooks/usePrint.js";
|
|
7
|
+
import "../../contexts/RPDocumentContext.js";
|
|
8
|
+
import "../../utils/hooks/useLoadPdf.js";
|
|
9
|
+
import "pdfjs-dist";
|
|
10
|
+
import "../../utils/types.js";
|
|
11
|
+
import "../../de_DE-a553b162.js";
|
|
12
|
+
import "../../utils/getThumbnailViewport.js";
|
|
13
|
+
import "../../contexts/ConfigContext.js";
|
|
14
|
+
import "../../contexts/DocumentPasswordContext.js";
|
|
15
|
+
import "../../utils/appConsole.js";
|
|
16
|
+
import "../../utils/hooks/usePdfProperties.js";
|
|
17
|
+
import "../../utils/convertPdfDate.js";
|
|
18
|
+
import "../../utils/formatFileSize.js";
|
|
19
|
+
import "../../utils/hooks/useLocalization.js";
|
|
20
|
+
const s = "_loading_wazy2_1", i = {
|
|
21
|
+
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
|
|
22
|
+
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
|
|
23
|
+
"rp-loading-title": "_rp-loading-title_wazy2_27",
|
|
24
|
+
"rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
|
|
25
|
+
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
|
|
26
|
+
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
|
|
27
|
+
loading: s
|
|
28
|
+
}, I = ({ percentage: n }) => {
|
|
29
|
+
const { cancel: l } = p(), { localeMessages: r } = d();
|
|
30
|
+
return n < 1 ? null : /* @__PURE__ */ a("div", { className: o(i["rp-loading-overlay"]), children: /* @__PURE__ */ t("div", { className: o(i["rp-loading-modal"]), children: [
|
|
31
|
+
/* @__PURE__ */ t("div", { className: o(i["rp-loading-title"]), children: [
|
|
32
|
+
r == null ? void 0 : r.printLoadingMessage,
|
|
33
|
+
"..."
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ a("div", { className: o(i["rp-loading-progress-bar"]), children: /* @__PURE__ */ a(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: o(i["rp-loading-progress"]),
|
|
39
|
+
style: { width: `${n}%` }
|
|
40
|
+
}
|
|
41
|
+
) }),
|
|
42
|
+
/* @__PURE__ */ a("button", { className: o(i["rp-loading-cancel-button"]), onClick: l, children: r == null ? void 0 : r.printCancelLabel })
|
|
43
|
+
] }) });
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
I as default
|
|
47
|
+
};
|