@react-pdf-kit/viewer 2.6.0-beta.1 → 2.6.0-rc.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/dist/AnnotationLayer-D6BfL976.js +113 -0
- package/dist/Button-jStpvb3T.js +21 -0
- package/dist/Checkbox-Brta-YKG.js +195 -0
- package/dist/Combination-DqNkTtir.js +695 -0
- package/dist/Container-DTWaZzc7.js +16 -0
- package/dist/CustomThumbnailElement-C2quEICO.js +19 -0
- package/dist/DarkPdfIcon-B5ehd9CV.js +9 -0
- package/dist/DocumentDialog-DHAWcYIz.js +324 -0
- package/dist/DropDown-DikL-krI.js +33 -0
- package/dist/Input-Bb_-ljl1.js +31 -0
- package/dist/LightPdfIcon-DL8MYtWQ.js +9 -0
- package/dist/LoaderIcon-D9YjinGf.js +14 -0
- package/dist/LoadingIndicator-MWrbKa6X.js +45 -0
- package/dist/MenuItem-BJDWfzAw.js +15 -0
- package/dist/MenuSeparator-D1H5l8Ej.js +6 -0
- package/dist/MostPageTool.module-BRVv-sGz.js +4 -0
- package/dist/OtherTool.module-BQY9Nfqz.js +4 -0
- package/dist/Paginate.module-B0GMw-MB.js +8 -0
- package/dist/PaginationContext--n91mIJ4.js +232 -0
- package/dist/PasswordModal-BDHdSpxf.js +76 -0
- package/dist/PropertyItem-evJWWmWZ.js +18 -0
- package/dist/RPDropFileZone-BunRfzst.js +35 -0
- package/dist/RPLayout.module-Vc3h4xxS.js +14 -0
- package/dist/RPPage-BuSGUFzw.js +91 -0
- package/dist/RPPages-V5CNUXFD.js +1007 -0
- package/dist/RPSplitter-C63X9M8w.js +121 -0
- package/dist/RPToolbar.module-BwqWLviy.js +10 -0
- package/dist/RPTooltip-ZZoFqP7C.js +381 -0
- package/dist/RotateTool.module-DH5yWbvM.js +4 -0
- package/dist/SearchTool.module-DUkVXfOn.js +16 -0
- package/dist/SkipLink-Bvbn3miT.js +18 -0
- package/dist/TextHighlightLayer-BSVgBxR3.js +157 -0
- package/dist/TextLayer-DWGFN9SF.js +125 -0
- package/dist/Thumbnail-Dwo2-4Ki.js +97 -0
- package/dist/Thumbnails-ComClyJJ.js +52 -0
- package/dist/ToolbarLayout.module-Zo715dbb.js +12 -0
- package/dist/WrapperLayout-Dcd9l9xH.js +13 -0
- package/dist/ZoomTool.module-BrIPy8pO.js +11 -0
- package/dist/assets/AnnotationLayer.css +1 -0
- package/dist/assets/Button.css +1 -0
- package/dist/assets/Checkbox.css +1 -0
- package/dist/assets/Container.css +1 -0
- package/dist/assets/CustomThumbnailElement.css +1 -0
- package/dist/assets/DocumentDialog.css +1 -0
- package/dist/assets/DropDown.css +1 -0
- package/dist/assets/Input.css +1 -0
- package/dist/assets/LoaderIcon.css +1 -0
- package/dist/assets/LoadingIndicator.css +1 -0
- package/dist/assets/MenuItem.css +1 -0
- package/dist/assets/MenuSeparator.css +1 -0
- package/dist/assets/MostPageTool.css +1 -0
- package/dist/assets/OtherTool.css +1 -0
- package/dist/assets/Paginate.css +1 -0
- package/dist/assets/PasswordModal.css +1 -0
- package/dist/assets/PropertyItem.css +1 -0
- package/dist/assets/RPDropFileZone.css +1 -0
- package/dist/assets/RPLayout.css +1 -0
- package/dist/assets/RPPage.css +1 -0
- package/dist/assets/RPPages.css +1 -0
- package/dist/assets/RPSplitter.css +1 -0
- package/dist/assets/RPToolbar.css +1 -0
- package/dist/assets/RPTooltip.css +1 -0
- package/dist/assets/RotateTool.css +1 -0
- package/dist/assets/SearchTool.css +1 -0
- package/dist/assets/SkipLink.css +1 -0
- package/dist/assets/TextHighlightLayer.css +1 -0
- package/dist/assets/TextLayer.css +1 -0
- package/dist/assets/Thumbnail.css +1 -0
- package/dist/assets/Thumbnails.css +1 -0
- package/dist/assets/ToolbarLayout.css +1 -0
- package/dist/assets/WrapperLayout.css +1 -0
- package/dist/assets/ZoomTool.css +1 -0
- package/dist/assets/style.js +2 -77
- package/dist/chunk-C_CI6nMA.js +13 -0
- package/dist/clsx-B7LyVm5O.js +16 -0
- package/dist/components/RPConfig.js +24 -26
- package/dist/components/RPController.js +85 -135
- package/dist/components/RPDropFileZone.js +3 -61
- package/dist/components/RPPages.js +3 -1082
- package/dist/components/RPProvider.js +50 -131
- package/dist/components/RPTheme.js +20 -21
- package/dist/components/icons/CheckIcon.js +16 -22
- package/dist/components/icons/ChevronDownIcon.js +17 -23
- package/dist/components/icons/ChevronUpIcon.js +16 -22
- package/dist/components/icons/ClearIcon.js +26 -25
- package/dist/components/icons/ClockwiseIcon.js +16 -22
- package/dist/components/icons/CloseIcon.js +16 -22
- package/dist/components/icons/DarkPdfIcon.js +2 -15
- package/dist/components/icons/DualPageIcon.js +16 -22
- package/dist/components/icons/DualPageWithCoverIcon.js +16 -22
- package/dist/components/icons/FileDownloadDefaultIcon.js +20 -23
- package/dist/components/icons/FileUploadDefaultIcon.js +20 -23
- package/dist/components/icons/FullScreenIcon.js +16 -22
- package/dist/components/icons/GoToDownIcon.js +16 -22
- package/dist/components/icons/HandModeDefaultIcon.js +16 -22
- package/dist/components/icons/HorizontalScrollingIcon.js +18 -24
- package/dist/components/icons/InfoIcon.js +16 -22
- package/dist/components/icons/LightPdfIcon.js +2 -15
- package/dist/components/icons/LoaderIcon.js +2 -17
- package/dist/components/icons/MoonIcon.js +16 -22
- package/dist/components/icons/PageScrollingIcon.js +18 -24
- package/dist/components/icons/PrintDefaultIcon.js +20 -23
- package/dist/components/icons/SearchIcon.js +16 -22
- package/dist/components/icons/SinglePageIcon.js +15 -21
- package/dist/components/icons/SunIcon.js +26 -25
- package/dist/components/icons/TextSelectionDefaultIcon.js +20 -23
- package/dist/components/icons/ThreeDotIcon.js +16 -22
- package/dist/components/icons/Thumbnail.js +39 -54
- package/dist/components/icons/VerticalScrollingIcon.js +18 -24
- package/dist/components/icons/WrappedScrollingIcon.js +18 -24
- package/dist/components/icons/ZoomInIcon.js +16 -22
- package/dist/components/icons/ZoomOutIcon.js +16 -22
- package/dist/components/layout/Container.js +2 -21
- package/dist/components/layout/LayoutContainer.js +23 -34
- package/dist/components/layout/LayoutWrapper.js +14 -10
- package/dist/components/layout/RPDefaultLayout.js +99 -244
- package/dist/components/layout/RPLayout.js +70 -220
- package/dist/components/layout/SkipLink.js +3 -29
- package/dist/components/layout/WrapperLayout.js +2 -27
- package/dist/components/layout/sidebar/CustomThumbnailElement.js +2 -68
- package/dist/components/layout/sidebar/RPSidebar.js +61 -112
- package/dist/components/layout/sidebar/RPSplitter.js +2 -9
- package/dist/components/layout/sidebar/Thumbnail.js +3 -155
- package/dist/components/layout/sidebar/Thumbnails.js +2 -82
- package/dist/components/layout/toolbar/DarkModeTool.js +44 -36
- package/dist/components/layout/toolbar/DocumentDialog.js +2 -322
- package/dist/components/layout/toolbar/DocumentProperties.js +30 -39
- package/dist/components/layout/toolbar/FileDownloadTool.js +54 -50
- package/dist/components/layout/toolbar/FileUploadTool.js +54 -49
- package/dist/components/layout/toolbar/FullScreenTool.js +62 -72
- package/dist/components/layout/toolbar/MenuItem.js +2 -19
- package/dist/components/layout/toolbar/MenuSeparator.js +2 -15
- package/dist/components/layout/toolbar/MostPageTool.js +62 -81
- package/dist/components/layout/toolbar/OtherTool.js +97 -198
- package/dist/components/layout/toolbar/Paginate.js +111 -145
- package/dist/components/layout/toolbar/PrintTool.js +70 -72
- package/dist/components/layout/toolbar/PropertyItem.js +2 -12
- package/dist/components/layout/toolbar/RPMenuItem.js +22 -31
- package/dist/components/layout/toolbar/RPMoreOptions.js +140 -220
- package/dist/components/layout/toolbar/RPToolbar.js +45 -151
- package/dist/components/layout/toolbar/RPToolbarEnd.js +23 -121
- package/dist/components/layout/toolbar/RotateTool.js +49 -60
- package/dist/components/layout/toolbar/ScrollModeTool.js +79 -67
- package/dist/components/layout/toolbar/SearchCloseButton.js +23 -31
- package/dist/components/layout/toolbar/SearchResultNavigator.js +39 -100
- package/dist/components/layout/toolbar/SearchTool.js +226 -267
- package/dist/components/layout/toolbar/SelectionModeTool.js +59 -51
- package/dist/components/layout/toolbar/ThumbnailTool.js +30 -39
- package/dist/components/layout/toolbar/ToolbarCustom.js +56 -113
- package/dist/components/layout/toolbar/ToolbarDefault.js +58 -196
- package/dist/components/layout/toolbar/ToolbarLayout.js +12 -158
- package/dist/components/layout/toolbar/ViewModeTool.js +82 -62
- package/dist/components/layout/toolbar/ZoomTool.js +139 -150
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +24 -54
- package/dist/components/layout/toolbar/tools/DualPageTool.js +23 -25
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +2 -206
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +23 -35
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +23 -34
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +2 -201
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +25 -33
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +24 -36
- package/dist/components/layout/toolbar/tools/InputPageTool.js +51 -92
- package/dist/components/layout/toolbar/tools/LastPageTool.js +2 -201
- package/dist/components/layout/toolbar/tools/NextPageTool.js +32 -61
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +24 -36
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +21 -62
- package/dist/components/layout/toolbar/tools/PrintTool.js +23 -35
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +23 -47
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +26 -47
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +29 -38
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +22 -24
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +24 -35
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +24 -46
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +24 -36
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +29 -58
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +26 -26
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +94 -133
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +29 -58
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +60 -148
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +31 -42
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +23 -28
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +25 -52
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +25 -51
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +26 -42
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +57 -87
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +25 -52
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +44 -64
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +80 -71
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +59 -57
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +79 -66
- package/dist/components/page/AnnotationLayer.js +2 -146
- package/dist/components/page/CanvasLayer.js +47 -71
- package/dist/components/page/CustomElement.js +18 -53
- package/dist/components/page/DualPage.js +43 -98
- package/dist/components/page/DualPageWithCover.js +66 -130
- package/dist/components/page/RPPage.js +2 -143
- package/dist/components/page/SinglePage.js +27 -88
- package/dist/components/page/TextHighlightLayer.js +2 -198
- package/dist/components/page/TextLayer.js +2 -202
- package/dist/components/page/searchHighlight.js +32 -37
- package/dist/components/ui/Button.js +2 -25
- package/dist/components/ui/Checkbox.js +2 -273
- package/dist/components/ui/DropDown.js +2 -36
- package/dist/components/ui/Input.js +2 -28
- package/dist/components/ui/LoadingIndicator.js +2 -59
- package/dist/components/ui/PasswordModal.js +2 -75
- package/dist/components/ui/RPTooltip.js +2 -357
- package/dist/contexts/ConfigContext.js +13 -12
- package/dist/contexts/DarkModeContext.js +26 -27
- package/dist/contexts/DimensionPagesContext.js +49 -60
- package/dist/contexts/DocumentPasswordContext.js +37 -39
- package/dist/contexts/DownloadContext.js +13 -21
- package/dist/contexts/DropFileZoneContext.js +35 -62
- package/dist/contexts/ElementPageContext.js +114 -139
- package/dist/contexts/ElementThumbnailContext.js +132 -195
- package/dist/contexts/EventCallbackContext.js +19 -34
- package/dist/contexts/FileInputContext.js +30 -49
- package/dist/contexts/FullScreenContext.js +31 -24
- package/dist/contexts/GlobalCurrentPage.js +21 -18
- package/dist/contexts/HighlightContext.js +22 -31
- package/dist/contexts/IconContext.js +9 -11
- package/dist/contexts/IconToolContext.js +14 -11
- package/dist/contexts/InitialStateContext.js +9 -11
- package/dist/contexts/LayerContext.js +9 -8
- package/dist/contexts/LayoutContainerContext.js +12 -16
- package/dist/contexts/LayoutDropFileZoneContext.js +8 -11
- package/dist/contexts/LicenseContext.js +12 -17
- package/dist/contexts/LoaderContext.js +14 -27
- package/dist/contexts/LocalizationContext.js +22 -33
- package/dist/contexts/OtherToolContext.js +17 -17
- package/dist/contexts/PageViewportContext.js +9 -8
- package/dist/contexts/PagesRotateContext.js +42 -43
- package/dist/contexts/PaginationContext.js +2 -40
- package/dist/contexts/PrintContext.js +67 -78
- package/dist/contexts/RPDocumentContext.js +60 -73
- package/dist/contexts/RenderQueueProvider.js +43 -72
- package/dist/contexts/RenderedPagesCache.js +17 -13
- package/dist/contexts/RotationContext.js +27 -38
- package/dist/contexts/ScrollModeContext.js +22 -20
- package/dist/contexts/SearchContext.js +39 -97
- package/dist/contexts/SelectionModeContext.js +22 -23
- package/dist/contexts/SmoothScrollContext.js +18 -16
- package/dist/contexts/ThemeContext.js +5 -7
- package/dist/contexts/ThumbnailsContext.js +26 -43
- package/dist/contexts/ToolComponentContext.js +54 -51
- package/dist/contexts/ToolbarComponentContext.js +48 -47
- package/dist/contexts/ViewModeContext.js +34 -31
- package/dist/contexts/ViewportContext.js +91 -85
- package/dist/contexts/VirtualGridContext.js +17 -14
- package/dist/contexts/VirtualScrollContext.js +42 -52
- package/dist/contexts/ZoomContext.js +95 -107
- package/dist/de_DE--0LF-SJR.js +483 -0
- package/dist/dist-7FA4Do6I.js +1286 -0
- package/dist/dist-BRVqFn7R.js +144 -0
- package/dist/dist-C3WNMuW2.js +29 -0
- package/dist/dist-CKteKPPA.js +947 -0
- package/dist/dist-bK-AHWLF.js +314 -0
- package/dist/lib-BiapEtK1.js +10261 -0
- package/dist/libInjectCss.js +7 -8
- package/dist/main-CHO5p1qM.js +60 -0
- package/dist/main.js +53 -296
- package/dist/style-9n_QpMZt.js +5 -0
- package/dist/useWatermark-CvAAf66v.js +67 -0
- package/dist/utils/Queue.js +40 -46
- package/dist/utils/annotations.js +227 -261
- package/dist/utils/appConsole.js +24 -42
- package/dist/utils/approximateFragtion.js +16 -21
- package/dist/utils/calculatePage.js +29 -20
- package/dist/utils/charators.js +39 -48
- package/dist/utils/const.js +8 -11
- package/dist/utils/constants.js +4 -8
- package/dist/utils/convertPdfDate.js +20 -24
- package/dist/utils/dateFormatter.js +7 -7
- package/dist/utils/elementPagePosition.js +10 -10
- package/dist/utils/formatFileSize.js +17 -8
- package/dist/utils/getElementPositionInPage.js +44 -82
- package/dist/utils/getScrollDistance.js +4 -4
- package/dist/utils/getThumbnailViewport.js +12 -6
- package/dist/utils/getWordPositionInPage.js +24 -24
- package/dist/utils/getZoomLevel.js +16 -23
- package/dist/utils/highlight.js +195 -212
- package/dist/utils/hooks/useCopyText.js +23 -33
- package/dist/utils/hooks/useDarkMode.js +10 -10
- package/dist/utils/hooks/useDarkModeProps.js +9 -10
- package/dist/utils/hooks/useDebounce.js +22 -18
- package/dist/utils/hooks/useDropFileZone.js +13 -11
- package/dist/utils/hooks/useElementSize.js +24 -20
- package/dist/utils/hooks/useFileDownload.js +16 -33
- package/dist/utils/hooks/useFlickerSelectText.js +19 -24
- package/dist/utils/hooks/useFullScreen.js +31 -28
- package/dist/utils/hooks/useGrabScroll.js +52 -51
- package/dist/utils/hooks/useHighlight.js +92 -92
- package/dist/utils/hooks/useInfiniteScroll.js +17 -18
- package/dist/utils/hooks/useLicense.js +113 -135
- package/dist/utils/hooks/useLoadPdf.js +107 -96
- package/dist/utils/hooks/useLoadWorker.js +13 -15
- package/dist/utils/hooks/useLocalization.js +25 -25
- package/dist/utils/hooks/useMousePressed.js +25 -19
- package/dist/utils/hooks/usePageRotateContext.js +25 -41
- package/dist/utils/hooks/usePaginate.js +2 -38
- package/dist/utils/hooks/usePdfProperties.js +38 -36
- package/dist/utils/hooks/usePinch.js +65 -100
- package/dist/utils/hooks/usePresentPage.js +69 -92
- package/dist/utils/hooks/usePrint.js +167 -178
- package/dist/utils/hooks/useRequestAnimationFrame.js +16 -16
- package/dist/utils/hooks/useResizeObserver.js +18 -21
- package/dist/utils/hooks/useRotate.js +15 -27
- package/dist/utils/hooks/useScrollToPage.js +2 -38
- package/dist/utils/hooks/useSearch.js +125 -163
- package/dist/utils/hooks/useTextSelection.js +69 -75
- package/dist/utils/hooks/useThumbnail.js +42 -59
- package/dist/utils/hooks/useVirtualReactWindow.js +85 -96
- package/dist/utils/hooks/useWatermark.js +2 -78
- package/dist/utils/injectPrintCSS.js +6 -21
- package/dist/utils/link_service.js +59 -137
- package/dist/utils/renderPage.js +20 -19
- package/dist/utils/sanitizeExternalUrl.js +12 -15
- package/dist/utils/smoothScrollTo.js +8 -5
- package/dist/utils/types.js +29 -21
- package/dist/utils/withRef.js +7 -7
- package/dist/utils/zoom.js +5 -6
- package/package.json +7 -7
- package/dist/Combination-17ab8af1.js +0 -698
- package/dist/MostPageTool.module-13578ad6.js +0 -6
- package/dist/OtherTool.module-a4be5f1f.js +0 -6
- package/dist/Paginate.module-4eef00aa.js +0 -8
- package/dist/PaginationContext-87f832f2.js +0 -233
- package/dist/RPLayout.module-92fa19f7.js +0 -14
- package/dist/RPSplitter-b62772f9.js +0 -122
- package/dist/RPToolbar.module-27d7fe77.js +0 -10
- package/dist/RotateTool.module-67946714.js +0 -6
- package/dist/SearchTool.module-99f60dc7.js +0 -16
- package/dist/ToolbarLayout.module-6e339802.js +0 -12
- package/dist/ZoomTool.module-7082af8c.js +0 -12
- package/dist/assets/style.css +0 -1
- package/dist/clsx-0c6e471a.js +0 -22
- package/dist/de_DE-8145915f.js +0 -489
- package/dist/index-113053cf.js +0 -309
- package/dist/index-11f3cd64.js +0 -983
- package/dist/index-23911b43.js +0 -150
- package/dist/index-ada501c4.js +0 -27
- package/dist/index-d0f0aa9a.js +0 -1542
- package/dist/index-e04c91b1.js +0 -11671
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { Fragment as t, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import * as r from "react-dom";
|
|
4
|
+
typeof window < "u" && window.document && window.document.createElement;
|
|
5
|
+
function i(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
6
|
+
return function(r) {
|
|
7
|
+
if (e?.(r), n === !1 || !r.defaultPrevented) return t?.(r);
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
12
|
+
function a(e, t) {
|
|
13
|
+
if (typeof e == "function") return e(t);
|
|
14
|
+
e != null && (e.current = t);
|
|
15
|
+
}
|
|
16
|
+
function o(...e) {
|
|
17
|
+
return (t) => {
|
|
18
|
+
let n = !1, r = e.map((e) => {
|
|
19
|
+
let r = a(e, t);
|
|
20
|
+
return !n && typeof r == "function" && (n = !0), r;
|
|
21
|
+
});
|
|
22
|
+
if (n) return () => {
|
|
23
|
+
for (let t = 0; t < r.length; t++) {
|
|
24
|
+
let n = r[t];
|
|
25
|
+
typeof n == "function" ? n() : a(e[t], null);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function s(...t) {
|
|
31
|
+
return e.useCallback(o(...t), t);
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
35
|
+
function c(t, r) {
|
|
36
|
+
let i = e.createContext(r), a = (t) => {
|
|
37
|
+
let { children: r, ...a } = t, o = e.useMemo(() => a, Object.values(a));
|
|
38
|
+
return /* @__PURE__ */ n(i.Provider, {
|
|
39
|
+
value: o,
|
|
40
|
+
children: r
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
a.displayName = t + "Provider";
|
|
44
|
+
function o(n) {
|
|
45
|
+
let a = e.useContext(i);
|
|
46
|
+
if (a) return a;
|
|
47
|
+
if (r !== void 0) return r;
|
|
48
|
+
throw Error(`\`${n}\` must be used within \`${t}\``);
|
|
49
|
+
}
|
|
50
|
+
return [a, o];
|
|
51
|
+
}
|
|
52
|
+
function l(t, r = []) {
|
|
53
|
+
let i = [];
|
|
54
|
+
function a(r, a) {
|
|
55
|
+
let o = e.createContext(a), s = i.length;
|
|
56
|
+
i = [...i, a];
|
|
57
|
+
let c = (r) => {
|
|
58
|
+
let { scope: i, children: a, ...c } = r, l = i?.[t]?.[s] || o, u = e.useMemo(() => c, Object.values(c));
|
|
59
|
+
return /* @__PURE__ */ n(l.Provider, {
|
|
60
|
+
value: u,
|
|
61
|
+
children: a
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
c.displayName = r + "Provider";
|
|
65
|
+
function l(n, i) {
|
|
66
|
+
let c = i?.[t]?.[s] || o, l = e.useContext(c);
|
|
67
|
+
if (l) return l;
|
|
68
|
+
if (a !== void 0) return a;
|
|
69
|
+
throw Error(`\`${n}\` must be used within \`${r}\``);
|
|
70
|
+
}
|
|
71
|
+
return [c, l];
|
|
72
|
+
}
|
|
73
|
+
let o = () => {
|
|
74
|
+
let n = i.map((t) => e.createContext(t));
|
|
75
|
+
return function(r) {
|
|
76
|
+
let i = r?.[t] || n;
|
|
77
|
+
return e.useMemo(() => ({ [`__scope${t}`]: {
|
|
78
|
+
...r,
|
|
79
|
+
[t]: i
|
|
80
|
+
} }), [r, i]);
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
return o.scopeName = t, [a, u(o, ...r)];
|
|
84
|
+
}
|
|
85
|
+
function u(...t) {
|
|
86
|
+
let n = t[0];
|
|
87
|
+
if (t.length === 1) return n;
|
|
88
|
+
let r = () => {
|
|
89
|
+
let r = t.map((e) => ({
|
|
90
|
+
useScope: e(),
|
|
91
|
+
scopeName: e.scopeName
|
|
92
|
+
}));
|
|
93
|
+
return function(t) {
|
|
94
|
+
let i = r.reduce((e, { useScope: n, scopeName: r }) => {
|
|
95
|
+
let i = n(t)[`__scope${r}`];
|
|
96
|
+
return {
|
|
97
|
+
...e,
|
|
98
|
+
...i
|
|
99
|
+
};
|
|
100
|
+
}, {});
|
|
101
|
+
return e.useMemo(() => ({ [`__scope${n.scopeName}`]: i }), [i]);
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
return r.scopeName = n.scopeName, r;
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
108
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
109
|
+
function d(t) {
|
|
110
|
+
let r = /* @__PURE__ */ f(t), i = e.forwardRef((t, i) => {
|
|
111
|
+
let { children: a, ...o } = t, s = e.Children.toArray(a), c = s.find(h);
|
|
112
|
+
if (c) {
|
|
113
|
+
let t = c.props.children, a = s.map((n) => n === c ? e.Children.count(t) > 1 ? e.Children.only(null) : e.isValidElement(t) ? t.props.children : null : n);
|
|
114
|
+
return /* @__PURE__ */ n(r, {
|
|
115
|
+
...o,
|
|
116
|
+
ref: i,
|
|
117
|
+
children: e.isValidElement(t) ? e.cloneElement(t, void 0, a) : null
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
return /* @__PURE__ */ n(r, {
|
|
121
|
+
...o,
|
|
122
|
+
ref: i,
|
|
123
|
+
children: a
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
return i.displayName = `${t}.Slot`, i;
|
|
127
|
+
}
|
|
128
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
129
|
+
function f(t) {
|
|
130
|
+
let n = e.forwardRef((t, n) => {
|
|
131
|
+
let { children: r, ...i } = t;
|
|
132
|
+
if (e.isValidElement(r)) {
|
|
133
|
+
let t = _(r), a = g(i, r.props);
|
|
134
|
+
return r.type !== e.Fragment && (a.ref = n ? o(n, t) : t), e.cloneElement(r, a);
|
|
135
|
+
}
|
|
136
|
+
return e.Children.count(r) > 1 ? e.Children.only(null) : null;
|
|
137
|
+
});
|
|
138
|
+
return n.displayName = `${t}.SlotClone`, n;
|
|
139
|
+
}
|
|
140
|
+
var p = Symbol("radix.slottable");
|
|
141
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
142
|
+
function m(e) {
|
|
143
|
+
let r = ({ children: e }) => /* @__PURE__ */ n(t, { children: e });
|
|
144
|
+
return r.displayName = `${e}.Slottable`, r.__radixId = p, r;
|
|
145
|
+
}
|
|
146
|
+
function h(t) {
|
|
147
|
+
return e.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === p;
|
|
148
|
+
}
|
|
149
|
+
function g(e, t) {
|
|
150
|
+
let n = { ...t };
|
|
151
|
+
for (let r in t) {
|
|
152
|
+
let i = e[r], a = t[r];
|
|
153
|
+
/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
|
|
154
|
+
let t = a(...e);
|
|
155
|
+
return i(...e), t;
|
|
156
|
+
} : i && (n[r] = i) : r === "style" ? n[r] = {
|
|
157
|
+
...i,
|
|
158
|
+
...a
|
|
159
|
+
} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
...e,
|
|
163
|
+
...n
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
function _(e) {
|
|
167
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
168
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
169
|
+
}
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@18.3.7_@types+react@18.3.27__@types+re_8fc36fddadfc5720002d5ad7c1f55b49/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
172
|
+
var v = [
|
|
173
|
+
"a",
|
|
174
|
+
"button",
|
|
175
|
+
"div",
|
|
176
|
+
"form",
|
|
177
|
+
"h2",
|
|
178
|
+
"h3",
|
|
179
|
+
"img",
|
|
180
|
+
"input",
|
|
181
|
+
"label",
|
|
182
|
+
"li",
|
|
183
|
+
"nav",
|
|
184
|
+
"ol",
|
|
185
|
+
"p",
|
|
186
|
+
"select",
|
|
187
|
+
"span",
|
|
188
|
+
"svg",
|
|
189
|
+
"ul"
|
|
190
|
+
].reduce((t, r) => {
|
|
191
|
+
let i = /* @__PURE__ */ d(`Primitive.${r}`), a = e.forwardRef((e, t) => {
|
|
192
|
+
let { asChild: a, ...o } = e, s = a ? i : r;
|
|
193
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ n(s, {
|
|
194
|
+
...o,
|
|
195
|
+
ref: t
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
return a.displayName = `Primitive.${r}`, {
|
|
199
|
+
...t,
|
|
200
|
+
[r]: a
|
|
201
|
+
};
|
|
202
|
+
}, {});
|
|
203
|
+
function y(e, t) {
|
|
204
|
+
e && r.flushSync(() => e.dispatchEvent(t));
|
|
205
|
+
}
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
208
|
+
var b = globalThis?.document ? e.useLayoutEffect : () => {};
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@18.3.7_@types+react@18.3.27__@types+rea_3fd5045f6b2ce13867beb3cd4d530871/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
211
|
+
function x(t, n) {
|
|
212
|
+
return e.useReducer((e, t) => n[e][t] ?? e, t);
|
|
213
|
+
}
|
|
214
|
+
var S = (t) => {
|
|
215
|
+
let { present: n, children: r } = t, i = C(n), a = typeof r == "function" ? r({ present: i.isPresent }) : e.Children.only(r), o = s(i.ref, T(a));
|
|
216
|
+
return typeof r == "function" || i.isPresent ? e.cloneElement(a, { ref: o }) : null;
|
|
217
|
+
};
|
|
218
|
+
S.displayName = "Presence";
|
|
219
|
+
function C(t) {
|
|
220
|
+
let [n, r] = e.useState(), i = e.useRef(null), a = e.useRef(t), o = e.useRef("none"), [s, c] = x(t ? "mounted" : "unmounted", {
|
|
221
|
+
mounted: {
|
|
222
|
+
UNMOUNT: "unmounted",
|
|
223
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
224
|
+
},
|
|
225
|
+
unmountSuspended: {
|
|
226
|
+
MOUNT: "mounted",
|
|
227
|
+
ANIMATION_END: "unmounted"
|
|
228
|
+
},
|
|
229
|
+
unmounted: { MOUNT: "mounted" }
|
|
230
|
+
});
|
|
231
|
+
return e.useEffect(() => {
|
|
232
|
+
let e = w(i.current);
|
|
233
|
+
o.current = s === "mounted" ? e : "none";
|
|
234
|
+
}, [s]), b(() => {
|
|
235
|
+
let e = i.current, n = a.current;
|
|
236
|
+
if (n !== t) {
|
|
237
|
+
let r = o.current, i = w(e);
|
|
238
|
+
t ? c("MOUNT") : i === "none" || e?.display === "none" ? c("UNMOUNT") : c(n && r !== i ? "ANIMATION_OUT" : "UNMOUNT"), a.current = t;
|
|
239
|
+
}
|
|
240
|
+
}, [t, c]), b(() => {
|
|
241
|
+
if (n) {
|
|
242
|
+
let e, t = n.ownerDocument.defaultView ?? window, r = (r) => {
|
|
243
|
+
let o = w(i.current).includes(CSS.escape(r.animationName));
|
|
244
|
+
if (r.target === n && o && (c("ANIMATION_END"), !a.current)) {
|
|
245
|
+
let r = n.style.animationFillMode;
|
|
246
|
+
n.style.animationFillMode = "forwards", e = t.setTimeout(() => {
|
|
247
|
+
n.style.animationFillMode === "forwards" && (n.style.animationFillMode = r);
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}, s = (e) => {
|
|
251
|
+
e.target === n && (o.current = w(i.current));
|
|
252
|
+
};
|
|
253
|
+
return n.addEventListener("animationstart", s), n.addEventListener("animationcancel", r), n.addEventListener("animationend", r), () => {
|
|
254
|
+
t.clearTimeout(e), n.removeEventListener("animationstart", s), n.removeEventListener("animationcancel", r), n.removeEventListener("animationend", r);
|
|
255
|
+
};
|
|
256
|
+
} else c("ANIMATION_END");
|
|
257
|
+
}, [n, c]), {
|
|
258
|
+
isPresent: ["mounted", "unmountSuspended"].includes(s),
|
|
259
|
+
ref: e.useCallback((e) => {
|
|
260
|
+
i.current = e ? getComputedStyle(e) : null, r(e);
|
|
261
|
+
}, [])
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
function w(e) {
|
|
265
|
+
return e?.animationName || "none";
|
|
266
|
+
}
|
|
267
|
+
function T(e) {
|
|
268
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
269
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
270
|
+
}
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@18.3.27_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
273
|
+
var E = e.useInsertionEffect || b;
|
|
274
|
+
function D({ prop: t, defaultProp: n, onChange: r = () => {}, caller: i }) {
|
|
275
|
+
let [a, o, s] = O({
|
|
276
|
+
defaultProp: n,
|
|
277
|
+
onChange: r
|
|
278
|
+
}), c = t !== void 0, l = c ? t : a;
|
|
279
|
+
{
|
|
280
|
+
let n = e.useRef(t !== void 0);
|
|
281
|
+
e.useEffect(() => {
|
|
282
|
+
let e = n.current;
|
|
283
|
+
e !== c && console.warn(`${i} is changing from ${e ? "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.`), n.current = c;
|
|
284
|
+
}, [c, i]);
|
|
285
|
+
}
|
|
286
|
+
return [l, e.useCallback((e) => {
|
|
287
|
+
if (c) {
|
|
288
|
+
let n = k(e) ? e(t) : e;
|
|
289
|
+
n !== t && s.current?.(n);
|
|
290
|
+
} else o(e);
|
|
291
|
+
}, [
|
|
292
|
+
c,
|
|
293
|
+
t,
|
|
294
|
+
o,
|
|
295
|
+
s
|
|
296
|
+
])];
|
|
297
|
+
}
|
|
298
|
+
function O({ defaultProp: t, onChange: n }) {
|
|
299
|
+
let [r, i] = e.useState(t), a = e.useRef(r), o = e.useRef(n);
|
|
300
|
+
return E(() => {
|
|
301
|
+
o.current = n;
|
|
302
|
+
}, [n]), e.useEffect(() => {
|
|
303
|
+
a.current !== r && (o.current?.(r), a.current = r);
|
|
304
|
+
}, [r, a]), [
|
|
305
|
+
r,
|
|
306
|
+
i,
|
|
307
|
+
o
|
|
308
|
+
];
|
|
309
|
+
}
|
|
310
|
+
function k(e) {
|
|
311
|
+
return typeof e == "function";
|
|
312
|
+
}
|
|
313
|
+
//#endregion
|
|
314
|
+
export { y as a, c, s as d, i as f, v as i, l, S as n, d as o, b as r, m as s, D as t, o as u };
|