@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,27 @@
|
|
|
1
|
+
import * as h from "react";
|
|
2
|
+
import { u as z } from "./index-c0faa594.js";
|
|
3
|
+
function n(r) {
|
|
4
|
+
const [d, e] = h.useState(void 0);
|
|
5
|
+
return z(() => {
|
|
6
|
+
if (r) {
|
|
7
|
+
e({ width: r.offsetWidth, height: r.offsetHeight });
|
|
8
|
+
const f = new ResizeObserver((i) => {
|
|
9
|
+
if (!Array.isArray(i) || !i.length)
|
|
10
|
+
return;
|
|
11
|
+
const b = i[0];
|
|
12
|
+
let o, t;
|
|
13
|
+
if ("borderBoxSize" in b) {
|
|
14
|
+
const s = b.borderBoxSize, u = Array.isArray(s) ? s[0] : s;
|
|
15
|
+
o = u.inlineSize, t = u.blockSize;
|
|
16
|
+
} else
|
|
17
|
+
o = r.offsetWidth, t = r.offsetHeight;
|
|
18
|
+
e({ width: o, height: t });
|
|
19
|
+
});
|
|
20
|
+
return f.observe(r, { box: "border-box" }), () => f.unobserve(r);
|
|
21
|
+
} else
|
|
22
|
+
e(void 0);
|
|
23
|
+
}, [r]), d;
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
n as u
|
|
27
|
+
};
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import * as s from "react";
|
|
2
|
+
import { jsx as S, Fragment as R } from "react/jsx-runtime";
|
|
3
|
+
import * as b from "react-dom";
|
|
4
|
+
function B(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
5
|
+
return function(r) {
|
|
6
|
+
if (e == null || e(r), n === !1 || !r.defaultPrevented)
|
|
7
|
+
return t == null ? void 0 : t(r);
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function g(e, t) {
|
|
11
|
+
if (typeof e == "function")
|
|
12
|
+
return e(t);
|
|
13
|
+
e != null && (e.current = t);
|
|
14
|
+
}
|
|
15
|
+
function w(...e) {
|
|
16
|
+
return (t) => {
|
|
17
|
+
let n = !1;
|
|
18
|
+
const o = e.map((r) => {
|
|
19
|
+
const i = g(r, t);
|
|
20
|
+
return !n && typeof i == "function" && (n = !0), i;
|
|
21
|
+
});
|
|
22
|
+
if (n)
|
|
23
|
+
return () => {
|
|
24
|
+
for (let r = 0; r < o.length; r++) {
|
|
25
|
+
const i = o[r];
|
|
26
|
+
typeof i == "function" ? i() : g(e[r], null);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function A(...e) {
|
|
32
|
+
return s.useCallback(w(...e), e);
|
|
33
|
+
}
|
|
34
|
+
function Z(e, t) {
|
|
35
|
+
const n = s.createContext(t), o = (i) => {
|
|
36
|
+
const { children: u, ...c } = i, a = s.useMemo(() => c, Object.values(c));
|
|
37
|
+
return /* @__PURE__ */ S(n.Provider, { value: a, children: u });
|
|
38
|
+
};
|
|
39
|
+
o.displayName = e + "Provider";
|
|
40
|
+
function r(i) {
|
|
41
|
+
const u = s.useContext(n);
|
|
42
|
+
if (u)
|
|
43
|
+
return u;
|
|
44
|
+
if (t !== void 0)
|
|
45
|
+
return t;
|
|
46
|
+
throw new Error(`\`${i}\` must be used within \`${e}\``);
|
|
47
|
+
}
|
|
48
|
+
return [o, r];
|
|
49
|
+
}
|
|
50
|
+
function q(e, t = []) {
|
|
51
|
+
let n = [];
|
|
52
|
+
function o(i, u) {
|
|
53
|
+
const c = s.createContext(u), a = n.length;
|
|
54
|
+
n = [...n, u];
|
|
55
|
+
const l = (f) => {
|
|
56
|
+
var P;
|
|
57
|
+
const { scope: m, children: p, ...v } = f, N = ((P = m == null ? void 0 : m[e]) == null ? void 0 : P[a]) || c, y = s.useMemo(() => v, Object.values(v));
|
|
58
|
+
return /* @__PURE__ */ S(N.Provider, { value: y, children: p });
|
|
59
|
+
};
|
|
60
|
+
l.displayName = i + "Provider";
|
|
61
|
+
function d(f, m) {
|
|
62
|
+
var N;
|
|
63
|
+
const p = ((N = m == null ? void 0 : m[e]) == null ? void 0 : N[a]) || c, v = s.useContext(p);
|
|
64
|
+
if (v)
|
|
65
|
+
return v;
|
|
66
|
+
if (u !== void 0)
|
|
67
|
+
return u;
|
|
68
|
+
throw new Error(`\`${f}\` must be used within \`${i}\``);
|
|
69
|
+
}
|
|
70
|
+
return [l, d];
|
|
71
|
+
}
|
|
72
|
+
const r = () => {
|
|
73
|
+
const i = n.map((u) => s.createContext(u));
|
|
74
|
+
return function(c) {
|
|
75
|
+
const a = (c == null ? void 0 : c[e]) || i;
|
|
76
|
+
return s.useMemo(
|
|
77
|
+
() => ({ [`__scope${e}`]: { ...c, [e]: a } }),
|
|
78
|
+
[c, a]
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
return r.scopeName = e, [o, O(r, ...t)];
|
|
83
|
+
}
|
|
84
|
+
function O(...e) {
|
|
85
|
+
const t = e[0];
|
|
86
|
+
if (e.length === 1)
|
|
87
|
+
return t;
|
|
88
|
+
const n = () => {
|
|
89
|
+
const o = e.map((r) => ({
|
|
90
|
+
useScope: r(),
|
|
91
|
+
scopeName: r.scopeName
|
|
92
|
+
}));
|
|
93
|
+
return function(i) {
|
|
94
|
+
const u = o.reduce((c, { useScope: a, scopeName: l }) => {
|
|
95
|
+
const f = a(i)[`__scope${l}`];
|
|
96
|
+
return { ...c, ...f };
|
|
97
|
+
}, {});
|
|
98
|
+
return s.useMemo(() => ({ [`__scope${t.scopeName}`]: u }), [u]);
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
return n.scopeName = t.scopeName, n;
|
|
102
|
+
}
|
|
103
|
+
// @__NO_SIDE_EFFECTS__
|
|
104
|
+
function x(e) {
|
|
105
|
+
const t = /* @__PURE__ */ M(e), n = s.forwardRef((o, r) => {
|
|
106
|
+
const { children: i, ...u } = o, c = s.Children.toArray(i), a = c.find(I);
|
|
107
|
+
if (a) {
|
|
108
|
+
const l = a.props.children, d = c.map((f) => f === a ? s.Children.count(l) > 1 ? s.Children.only(null) : s.isValidElement(l) ? l.props.children : null : f);
|
|
109
|
+
return /* @__PURE__ */ S(t, { ...u, ref: r, children: s.isValidElement(l) ? s.cloneElement(l, void 0, d) : null });
|
|
110
|
+
}
|
|
111
|
+
return /* @__PURE__ */ S(t, { ...u, ref: r, children: i });
|
|
112
|
+
});
|
|
113
|
+
return n.displayName = `${e}.Slot`, n;
|
|
114
|
+
}
|
|
115
|
+
// @__NO_SIDE_EFFECTS__
|
|
116
|
+
function M(e) {
|
|
117
|
+
const t = s.forwardRef((n, o) => {
|
|
118
|
+
const { children: r, ...i } = n;
|
|
119
|
+
if (s.isValidElement(r)) {
|
|
120
|
+
const u = _(r), c = T(i, r.props);
|
|
121
|
+
return r.type !== s.Fragment && (c.ref = o ? w(o, u) : u), s.cloneElement(r, c);
|
|
122
|
+
}
|
|
123
|
+
return s.Children.count(r) > 1 ? s.Children.only(null) : null;
|
|
124
|
+
});
|
|
125
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
126
|
+
}
|
|
127
|
+
var E = Symbol("radix.slottable");
|
|
128
|
+
// @__NO_SIDE_EFFECTS__
|
|
129
|
+
function z(e) {
|
|
130
|
+
const t = ({ children: n }) => /* @__PURE__ */ S(R, { children: n });
|
|
131
|
+
return t.displayName = `${e}.Slottable`, t.__radixId = E, t;
|
|
132
|
+
}
|
|
133
|
+
function I(e) {
|
|
134
|
+
return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === E;
|
|
135
|
+
}
|
|
136
|
+
function T(e, t) {
|
|
137
|
+
const n = { ...t };
|
|
138
|
+
for (const o in t) {
|
|
139
|
+
const r = e[o], i = t[o];
|
|
140
|
+
/^on[A-Z]/.test(o) ? r && i ? n[o] = (...c) => {
|
|
141
|
+
const a = i(...c);
|
|
142
|
+
return r(...c), a;
|
|
143
|
+
} : r && (n[o] = r) : o === "style" ? n[o] = { ...r, ...i } : o === "className" && (n[o] = [r, i].filter(Boolean).join(" "));
|
|
144
|
+
}
|
|
145
|
+
return { ...e, ...n };
|
|
146
|
+
}
|
|
147
|
+
function _(e) {
|
|
148
|
+
var o, r;
|
|
149
|
+
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
150
|
+
return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
151
|
+
}
|
|
152
|
+
var $ = [
|
|
153
|
+
"a",
|
|
154
|
+
"button",
|
|
155
|
+
"div",
|
|
156
|
+
"form",
|
|
157
|
+
"h2",
|
|
158
|
+
"h3",
|
|
159
|
+
"img",
|
|
160
|
+
"input",
|
|
161
|
+
"label",
|
|
162
|
+
"li",
|
|
163
|
+
"nav",
|
|
164
|
+
"ol",
|
|
165
|
+
"p",
|
|
166
|
+
"select",
|
|
167
|
+
"span",
|
|
168
|
+
"svg",
|
|
169
|
+
"ul"
|
|
170
|
+
], G = $.reduce((e, t) => {
|
|
171
|
+
const n = /* @__PURE__ */ x(`Primitive.${t}`), o = s.forwardRef((r, i) => {
|
|
172
|
+
const { asChild: u, ...c } = r, a = u ? n : t;
|
|
173
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ S(a, { ...c, ref: i });
|
|
174
|
+
});
|
|
175
|
+
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
176
|
+
}, {});
|
|
177
|
+
function J(e, t) {
|
|
178
|
+
e && b.flushSync(() => e.dispatchEvent(t));
|
|
179
|
+
}
|
|
180
|
+
var C = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
|
|
181
|
+
};
|
|
182
|
+
function D(e, t) {
|
|
183
|
+
return s.useReducer((n, o) => t[n][o] ?? n, e);
|
|
184
|
+
}
|
|
185
|
+
var U = (e) => {
|
|
186
|
+
const { present: t, children: n } = e, o = W(t), r = typeof n == "function" ? n({ present: o.isPresent }) : s.Children.only(n), i = A(o.ref, L(r));
|
|
187
|
+
return typeof n == "function" || o.isPresent ? s.cloneElement(r, { ref: i }) : null;
|
|
188
|
+
};
|
|
189
|
+
U.displayName = "Presence";
|
|
190
|
+
function W(e) {
|
|
191
|
+
const [t, n] = s.useState(), o = s.useRef(null), r = s.useRef(e), i = s.useRef("none"), u = e ? "mounted" : "unmounted", [c, a] = D(u, {
|
|
192
|
+
mounted: {
|
|
193
|
+
UNMOUNT: "unmounted",
|
|
194
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
195
|
+
},
|
|
196
|
+
unmountSuspended: {
|
|
197
|
+
MOUNT: "mounted",
|
|
198
|
+
ANIMATION_END: "unmounted"
|
|
199
|
+
},
|
|
200
|
+
unmounted: {
|
|
201
|
+
MOUNT: "mounted"
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
return s.useEffect(() => {
|
|
205
|
+
const l = h(o.current);
|
|
206
|
+
i.current = c === "mounted" ? l : "none";
|
|
207
|
+
}, [c]), C(() => {
|
|
208
|
+
const l = o.current, d = r.current;
|
|
209
|
+
if (d !== e) {
|
|
210
|
+
const m = i.current, p = h(l);
|
|
211
|
+
e ? a("MOUNT") : p === "none" || (l == null ? void 0 : l.display) === "none" ? a("UNMOUNT") : a(d && m !== p ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
|
|
212
|
+
}
|
|
213
|
+
}, [e, a]), C(() => {
|
|
214
|
+
if (t) {
|
|
215
|
+
let l;
|
|
216
|
+
const d = t.ownerDocument.defaultView ?? window, f = (p) => {
|
|
217
|
+
const N = h(o.current).includes(CSS.escape(p.animationName));
|
|
218
|
+
if (p.target === t && N && (a("ANIMATION_END"), !r.current)) {
|
|
219
|
+
const y = t.style.animationFillMode;
|
|
220
|
+
t.style.animationFillMode = "forwards", l = d.setTimeout(() => {
|
|
221
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = y);
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}, m = (p) => {
|
|
225
|
+
p.target === t && (i.current = h(o.current));
|
|
226
|
+
};
|
|
227
|
+
return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
|
|
228
|
+
d.clearTimeout(l), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
|
|
229
|
+
};
|
|
230
|
+
} else
|
|
231
|
+
a("ANIMATION_END");
|
|
232
|
+
}, [t, a]), {
|
|
233
|
+
isPresent: ["mounted", "unmountSuspended"].includes(c),
|
|
234
|
+
ref: s.useCallback((l) => {
|
|
235
|
+
o.current = l ? getComputedStyle(l) : null, n(l);
|
|
236
|
+
}, [])
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
function h(e) {
|
|
240
|
+
return (e == null ? void 0 : e.animationName) || "none";
|
|
241
|
+
}
|
|
242
|
+
function L(e) {
|
|
243
|
+
var o, r;
|
|
244
|
+
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
245
|
+
return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
246
|
+
}
|
|
247
|
+
var j = s[" useInsertionEffect ".trim().toString()] || C;
|
|
248
|
+
function K({
|
|
249
|
+
prop: e,
|
|
250
|
+
defaultProp: t,
|
|
251
|
+
onChange: n = () => {
|
|
252
|
+
},
|
|
253
|
+
caller: o
|
|
254
|
+
}) {
|
|
255
|
+
const [r, i, u] = F({
|
|
256
|
+
defaultProp: t,
|
|
257
|
+
onChange: n
|
|
258
|
+
}), c = e !== void 0, a = c ? e : r;
|
|
259
|
+
{
|
|
260
|
+
const d = s.useRef(e !== void 0);
|
|
261
|
+
s.useEffect(() => {
|
|
262
|
+
const f = d.current;
|
|
263
|
+
f !== c && console.warn(
|
|
264
|
+
`${o} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
265
|
+
), d.current = c;
|
|
266
|
+
}, [c, o]);
|
|
267
|
+
}
|
|
268
|
+
const l = s.useCallback(
|
|
269
|
+
(d) => {
|
|
270
|
+
var f;
|
|
271
|
+
if (c) {
|
|
272
|
+
const m = V(d) ? d(e) : d;
|
|
273
|
+
m !== e && ((f = u.current) == null || f.call(u, m));
|
|
274
|
+
} else
|
|
275
|
+
i(d);
|
|
276
|
+
},
|
|
277
|
+
[c, e, i, u]
|
|
278
|
+
);
|
|
279
|
+
return [a, l];
|
|
280
|
+
}
|
|
281
|
+
function F({
|
|
282
|
+
defaultProp: e,
|
|
283
|
+
onChange: t
|
|
284
|
+
}) {
|
|
285
|
+
const [n, o] = s.useState(e), r = s.useRef(n), i = s.useRef(t);
|
|
286
|
+
return j(() => {
|
|
287
|
+
i.current = t;
|
|
288
|
+
}, [t]), s.useEffect(() => {
|
|
289
|
+
var u;
|
|
290
|
+
r.current !== n && ((u = i.current) == null || u.call(i, n), r.current = n);
|
|
291
|
+
}, [n, r]), [n, o, i];
|
|
292
|
+
}
|
|
293
|
+
function V(e) {
|
|
294
|
+
return typeof e == "function";
|
|
295
|
+
}
|
|
296
|
+
export {
|
|
297
|
+
G as P,
|
|
298
|
+
A as a,
|
|
299
|
+
B as b,
|
|
300
|
+
q as c,
|
|
301
|
+
U as d,
|
|
302
|
+
Z as e,
|
|
303
|
+
K as f,
|
|
304
|
+
x as g,
|
|
305
|
+
J as h,
|
|
306
|
+
z as i,
|
|
307
|
+
w as j,
|
|
308
|
+
C as u
|
|
309
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { a as R, P as w, b as y, h as _, u as U } from "./index-c0faa594.js";
|
|
3
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
4
|
+
function b(t) {
|
|
5
|
+
const e = r.useRef(t);
|
|
6
|
+
return r.useEffect(() => {
|
|
7
|
+
e.current = t;
|
|
8
|
+
}), r.useMemo(() => (...n) => {
|
|
9
|
+
var s;
|
|
10
|
+
return (s = e.current) == null ? void 0 : s.call(e, ...n);
|
|
11
|
+
}, []);
|
|
12
|
+
}
|
|
13
|
+
function z(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
14
|
+
const n = b(t);
|
|
15
|
+
r.useEffect(() => {
|
|
16
|
+
const s = (i) => {
|
|
17
|
+
i.key === "Escape" && n(i);
|
|
18
|
+
};
|
|
19
|
+
return e.addEventListener("keydown", s, { capture: !0 }), () => e.removeEventListener("keydown", s, { capture: !0 });
|
|
20
|
+
}, [n, e]);
|
|
21
|
+
}
|
|
22
|
+
var H = "DismissableLayer", p = "dismissableLayer.update", M = "dismissableLayer.pointerDownOutside", K = "dismissableLayer.focusOutside", O, S = r.createContext({
|
|
23
|
+
layers: /* @__PURE__ */ new Set(),
|
|
24
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
25
|
+
branches: /* @__PURE__ */ new Set()
|
|
26
|
+
}), j = r.forwardRef(
|
|
27
|
+
(t, e) => {
|
|
28
|
+
const {
|
|
29
|
+
disableOutsidePointerEvents: n = !1,
|
|
30
|
+
onEscapeKeyDown: s,
|
|
31
|
+
onPointerDownOutside: i,
|
|
32
|
+
onFocusOutside: a,
|
|
33
|
+
onInteractOutside: l,
|
|
34
|
+
onDismiss: d,
|
|
35
|
+
...E
|
|
36
|
+
} = t, u = r.useContext(S), [c, B] = r.useState(null), f = (c == null ? void 0 : c.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, F] = r.useState({}), I = R(e, (o) => B(o)), m = Array.from(u.layers), [W] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), A = m.indexOf(W), P = c ? m.indexOf(c) : -1, N = u.layersWithOutsidePointerEventsDisabled.size > 0, D = P >= A, k = $((o) => {
|
|
37
|
+
const v = o.target, C = [...u.branches].some((h) => h.contains(v));
|
|
38
|
+
!D || C || (i == null || i(o), l == null || l(o), o.defaultPrevented || d == null || d());
|
|
39
|
+
}, f), L = q((o) => {
|
|
40
|
+
const v = o.target;
|
|
41
|
+
[...u.branches].some((h) => h.contains(v)) || (a == null || a(o), l == null || l(o), o.defaultPrevented || d == null || d());
|
|
42
|
+
}, f);
|
|
43
|
+
return z((o) => {
|
|
44
|
+
P === u.layers.size - 1 && (s == null || s(o), !o.defaultPrevented && d && (o.preventDefault(), d()));
|
|
45
|
+
}, f), r.useEffect(() => {
|
|
46
|
+
if (c)
|
|
47
|
+
return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (O = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(c)), u.layers.add(c), g(), () => {
|
|
48
|
+
n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = O);
|
|
49
|
+
};
|
|
50
|
+
}, [c, f, n, u]), r.useEffect(() => () => {
|
|
51
|
+
c && (u.layers.delete(c), u.layersWithOutsidePointerEventsDisabled.delete(c), g());
|
|
52
|
+
}, [c, u]), r.useEffect(() => {
|
|
53
|
+
const o = () => F({});
|
|
54
|
+
return document.addEventListener(p, o), () => document.removeEventListener(p, o);
|
|
55
|
+
}, []), /* @__PURE__ */ T(
|
|
56
|
+
w.div,
|
|
57
|
+
{
|
|
58
|
+
...E,
|
|
59
|
+
ref: I,
|
|
60
|
+
style: {
|
|
61
|
+
pointerEvents: N ? D ? "auto" : "none" : void 0,
|
|
62
|
+
...t.style
|
|
63
|
+
},
|
|
64
|
+
onFocusCapture: y(t.onFocusCapture, L.onFocusCapture),
|
|
65
|
+
onBlurCapture: y(t.onBlurCapture, L.onBlurCapture),
|
|
66
|
+
onPointerDownCapture: y(
|
|
67
|
+
t.onPointerDownCapture,
|
|
68
|
+
k.onPointerDownCapture
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
j.displayName = H;
|
|
75
|
+
var X = "DismissableLayerBranch", Y = r.forwardRef((t, e) => {
|
|
76
|
+
const n = r.useContext(S), s = r.useRef(null), i = R(e, s);
|
|
77
|
+
return r.useEffect(() => {
|
|
78
|
+
const a = s.current;
|
|
79
|
+
if (a)
|
|
80
|
+
return n.branches.add(a), () => {
|
|
81
|
+
n.branches.delete(a);
|
|
82
|
+
};
|
|
83
|
+
}, [n.branches]), /* @__PURE__ */ T(w.div, { ...t, ref: i });
|
|
84
|
+
});
|
|
85
|
+
Y.displayName = X;
|
|
86
|
+
function $(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
87
|
+
const n = b(t), s = r.useRef(!1), i = r.useRef(() => {
|
|
88
|
+
});
|
|
89
|
+
return r.useEffect(() => {
|
|
90
|
+
const a = (d) => {
|
|
91
|
+
if (d.target && !s.current) {
|
|
92
|
+
let E = function() {
|
|
93
|
+
x(
|
|
94
|
+
M,
|
|
95
|
+
n,
|
|
96
|
+
u,
|
|
97
|
+
{ discrete: !0 }
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
const u = { originalEvent: d };
|
|
101
|
+
d.pointerType === "touch" ? (e.removeEventListener("click", i.current), i.current = E, e.addEventListener("click", i.current, { once: !0 })) : E();
|
|
102
|
+
} else
|
|
103
|
+
e.removeEventListener("click", i.current);
|
|
104
|
+
s.current = !1;
|
|
105
|
+
}, l = window.setTimeout(() => {
|
|
106
|
+
e.addEventListener("pointerdown", a);
|
|
107
|
+
}, 0);
|
|
108
|
+
return () => {
|
|
109
|
+
window.clearTimeout(l), e.removeEventListener("pointerdown", a), e.removeEventListener("click", i.current);
|
|
110
|
+
};
|
|
111
|
+
}, [e, n]), {
|
|
112
|
+
// ensures we check React component tree (not just DOM tree)
|
|
113
|
+
onPointerDownCapture: () => s.current = !0
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function q(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
117
|
+
const n = b(t), s = r.useRef(!1);
|
|
118
|
+
return r.useEffect(() => {
|
|
119
|
+
const i = (a) => {
|
|
120
|
+
a.target && !s.current && x(K, n, { originalEvent: a }, {
|
|
121
|
+
discrete: !1
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
return e.addEventListener("focusin", i), () => e.removeEventListener("focusin", i);
|
|
125
|
+
}, [e, n]), {
|
|
126
|
+
onFocusCapture: () => s.current = !0,
|
|
127
|
+
onBlurCapture: () => s.current = !1
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function g() {
|
|
131
|
+
const t = new CustomEvent(p);
|
|
132
|
+
document.dispatchEvent(t);
|
|
133
|
+
}
|
|
134
|
+
function x(t, e, n, { discrete: s }) {
|
|
135
|
+
const i = n.originalEvent.target, a = new CustomEvent(t, { bubbles: !1, cancelable: !0, detail: n });
|
|
136
|
+
e && i.addEventListener(t, e, { once: !0 }), s ? _(i, a) : i.dispatchEvent(a);
|
|
137
|
+
}
|
|
138
|
+
var G = r[" useId ".trim().toString()] || (() => {
|
|
139
|
+
}), J = 0;
|
|
140
|
+
function Z(t) {
|
|
141
|
+
const [e, n] = r.useState(G());
|
|
142
|
+
return U(() => {
|
|
143
|
+
t || n((s) => s ?? String(J++));
|
|
144
|
+
}, [t]), t || (e ? `radix-${e}` : "");
|
|
145
|
+
}
|
|
146
|
+
export {
|
|
147
|
+
j as D,
|
|
148
|
+
b as a,
|
|
149
|
+
Z as u
|
|
150
|
+
};
|