@react-pdf-kit/viewer 2.0.0-beta.8 → 2.0.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/Combination-136ff99c.js +698 -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/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 -1
- package/dist/assets/style.js +32 -30
- package/dist/components/RPController.js +81 -152
- package/dist/components/RPDropFileZone.js +1 -1
- package/dist/components/RPPages.js +1028 -122
- package/dist/components/RPProvider.js +57 -113
- package/dist/components/icons/DualPageWithCoverIcon.js +22 -0
- package/dist/components/layout/LayoutContainer.js +31 -136
- package/dist/components/layout/LayoutWrapper.js +8 -4
- package/dist/components/layout/RPDefaultLayout.js +184 -86
- package/dist/components/layout/RPLayout.js +123 -105
- package/dist/components/layout/SkipLink.js +29 -0
- package/dist/components/layout/WrapperLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +79 -112
- package/dist/components/layout/sidebar/RPSplitter.js +6 -59
- package/dist/components/layout/sidebar/Thumbnail.js +130 -125
- package/dist/components/layout/sidebar/Thumbnails.js +56 -119
- package/dist/components/layout/toolbar/DarkModeTool.js +7 -5
- package/dist/components/layout/toolbar/DocumentDialog.js +305 -131
- package/dist/components/layout/toolbar/DocumentProperties.js +13 -10
- package/dist/components/layout/toolbar/FileDownloadTool.js +34 -124
- package/dist/components/layout/toolbar/FileUploadTool.js +9 -6
- package/dist/components/layout/toolbar/FullScreenTool.js +17 -14
- package/dist/components/layout/toolbar/MenuItem.js +11 -8
- package/dist/components/layout/toolbar/MenuSeparator.js +8 -5
- package/dist/components/layout/toolbar/MostPageTool.js +66 -125
- package/dist/components/layout/toolbar/OtherTool.js +171 -112
- package/dist/components/layout/toolbar/Paginate.js +121 -116
- package/dist/components/layout/toolbar/PrintTool.js +55 -123
- package/dist/components/layout/toolbar/RPMenuItem.js +14 -11
- package/dist/components/layout/toolbar/RPMoreOptions.js +102 -154
- package/dist/components/layout/toolbar/RPToolbar.js +90 -79
- package/dist/components/layout/toolbar/RPToolbarEnd.js +69 -88
- package/dist/components/layout/toolbar/RotateTool.js +13 -10
- package/dist/components/layout/toolbar/ScrollModeTool.js +42 -39
- package/dist/components/layout/toolbar/SearchCloseButton.js +24 -10
- package/dist/components/layout/toolbar/SearchResultNavigator.js +74 -105
- package/dist/components/layout/toolbar/SearchTool.js +245 -121
- package/dist/components/layout/toolbar/SelectionModeTool.js +9 -6
- package/dist/components/layout/toolbar/ThumbnailTool.js +15 -122
- package/dist/components/layout/toolbar/ToolbarCustom.js +75 -143
- package/dist/components/layout/toolbar/ToolbarDefault.js +135 -122
- package/dist/components/layout/toolbar/ToolbarLayout.js +86 -81
- package/dist/components/layout/toolbar/ViewModeTool.js +47 -35
- package/dist/components/layout/toolbar/ZoomTool.js +129 -119
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +18 -122
- package/dist/components/layout/toolbar/tools/DualPageTool.js +11 -129
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +202 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +14 -123
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +10 -8
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +197 -0
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +21 -18
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/InputPageTool.js +52 -136
- package/dist/components/layout/toolbar/tools/LastPageTool.js +197 -0
- package/dist/components/layout/toolbar/tools/NextPageTool.js +39 -129
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +28 -118
- package/dist/components/layout/toolbar/tools/PrintTool.js +14 -123
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +18 -9
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +15 -13
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +24 -14
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +11 -129
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +16 -6
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +23 -131
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +21 -18
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +23 -136
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +80 -141
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +18 -15
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +98 -105
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +16 -123
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +17 -14
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +29 -127
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +31 -130
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +28 -17
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +63 -134
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +33 -131
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +41 -24
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +58 -37
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +44 -25
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +56 -30
- package/dist/components/page/AnnotationLayer.js +130 -125
- package/dist/components/page/CanvasLayer.js +57 -126
- package/dist/components/page/CustomElement.js +1 -1
- package/dist/components/page/DualPage.js +69 -110
- package/dist/components/page/DualPageWithCover.js +131 -0
- package/dist/components/page/RPPage.js +126 -123
- package/dist/components/page/SinglePage.js +59 -110
- package/dist/components/page/TextHighlightLayer.js +187 -129
- package/dist/components/page/TextLayer.js +186 -125
- package/dist/components/ui/Button.js +14 -12
- package/dist/components/ui/Checkbox.js +78 -70
- package/dist/components/ui/DropDown.js +11 -8
- package/dist/components/ui/Input.js +12 -11
- package/dist/components/ui/LoadingIndicator.js +34 -127
- package/dist/components/ui/PasswordModal.js +44 -30
- package/dist/components/ui/RPTooltip.js +121 -135
- package/dist/contexts/DimensionPagesContext.js +1 -1
- package/dist/contexts/DropFileZoneContext.js +1 -1
- package/dist/contexts/ElementPageContext.js +1 -1
- package/dist/contexts/EventCallbackContext.js +12 -8
- package/dist/contexts/FileInputContext.js +1 -1
- package/dist/contexts/FullScreenContext.js +17 -10
- package/dist/contexts/HighlightContext.js +1 -1
- package/dist/contexts/LocalizationContext.js +25 -30
- package/dist/contexts/PagesRotateContext.js +1 -1
- package/dist/contexts/PaginationContext.js +15 -118
- package/dist/contexts/PrintContext.js +67 -131
- package/dist/contexts/RPDocumentContext.js +8 -8
- package/dist/contexts/RenderQueueProvider.js +48 -118
- package/dist/contexts/RotationContext.js +1 -1
- package/dist/contexts/ScrollModeContext.js +1 -1
- package/dist/contexts/SearchContext.js +66 -112
- package/dist/contexts/SelectionModeContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +32 -131
- package/dist/contexts/ViewModeContext.js +19 -15
- package/dist/contexts/ZoomContext.js +23 -23
- package/dist/de_DE-a553b162.js +489 -0
- package/dist/floating-ui.react-dom-5ec29bd6.js +1327 -0
- package/dist/index-61f59539.js +1198 -0
- package/dist/index-655864a7.js +27 -0
- package/dist/{index-c9a2990a.js → index-c0faa594.js} +64 -87
- package/dist/index-e3ee9457.js +150 -0
- package/dist/main.js +193 -130
- package/dist/types/components/icons/DualPageWithCoverIcon.d.ts +2 -0
- package/dist/types/components/layout/LayoutContainer.d.ts +1 -5
- package/dist/types/components/layout/LayoutWrapper.d.ts +1 -5
- package/dist/types/components/layout/SkipLink.d.ts +7 -0
- package/dist/types/components/layout/sidebar/Thumbnails.d.ts +1 -3
- package/dist/types/components/layout/toolbar/RPToolbar.d.ts +1 -3
- package/dist/types/components/layout/toolbar/tools/DualPageWithCoverTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FirstPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/HorizontalScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/LastPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/PageScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/VerticalScrollingTool.d.ts +3 -0
- package/dist/types/components/page/DualPageWithCover.d.ts +5 -0
- package/dist/types/components/page/RPPage.d.ts +1 -3
- package/dist/types/components/ui/Button.d.ts +1 -3
- package/dist/types/components/ui/Checkbox.d.ts +1 -0
- package/dist/types/components/ui/Input.d.ts +1 -3
- package/dist/types/components/ui/RPTooltip.d.ts +1 -3
- package/dist/types/locales/de_DE.json.d.ts +83 -0
- package/dist/types/locales/en_US.json.d.ts +2 -0
- package/dist/types/locales/it_IT.json.d.ts +2 -0
- package/dist/types/locales/pt_PT.json.d.ts +2 -0
- package/dist/types/locales/th_TH.json.d.ts +2 -0
- package/dist/types/locales/zh_CN.json.d.ts +2 -0
- package/dist/types/main.d.ts +8 -2
- package/dist/types/utils/annotations.d.ts +10 -1
- package/dist/types/utils/calculatePage.d.ts +3 -3
- package/dist/types/utils/hooks/usePresentPage.d.ts +2 -1
- package/dist/types/utils/hooks/useTextSelection.d.ts +7 -0
- package/dist/types/utils/types.d.ts +34 -3
- package/dist/types/utils/withRef.d.ts +5 -4
- package/dist/utils/annotations.js +145 -150
- package/dist/utils/calculatePage.js +17 -11
- package/dist/utils/getZoomLevel.js +9 -9
- package/dist/utils/highlight.js +139 -139
- package/dist/utils/hooks/useFileDownload.js +23 -130
- package/dist/utils/hooks/useHighlight.js +28 -28
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLoadPdf.js +1 -1
- package/dist/utils/hooks/useLocalization.js +17 -16
- package/dist/utils/hooks/usePageRotateContext.js +1 -1
- package/dist/utils/hooks/usePaginate.js +23 -126
- package/dist/utils/hooks/usePinch.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +79 -129
- package/dist/utils/hooks/usePrint.js +175 -130
- package/dist/utils/hooks/useRotate.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +18 -121
- package/dist/utils/hooks/useSearch.js +149 -127
- package/dist/utils/hooks/useTextSelection.js +76 -0
- package/dist/utils/hooks/useThumbnail.js +50 -131
- package/dist/utils/hooks/useVirtualReactWindow.js +84 -128
- package/dist/utils/types.js +14 -13
- package/dist/utils/withRef.js +5 -5
- package/package.json +5 -4
- package/dist/LayoutWrapper-6224491f.js +0 -19
- package/dist/SearchCloseButton-08d57275.js +0 -33
- package/dist/ToolbarLayout.module-0aa7a2aa.js +0 -3557
- package/dist/floating-ui.react-dom-d22a10b4.js +0 -1474
- package/dist/index-3bf64864.js +0 -1886
- package/dist/th_TH-d627cd51.js +0 -398
|
@@ -1,140 +1,314 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import "../../../
|
|
5
|
-
import "
|
|
6
|
-
import "../../../
|
|
7
|
-
import "../../../contexts/
|
|
8
|
-
import "
|
|
9
|
-
import "../../../
|
|
10
|
-
import "../../../contexts/
|
|
11
|
-
import "
|
|
12
|
-
import "../../../contexts/
|
|
13
|
-
import "../../../contexts/
|
|
14
|
-
import "
|
|
15
|
-
import "../../../
|
|
16
|
-
import "../../../contexts/VirtualGridContext.js";
|
|
17
|
-
import "../../../contexts/SelectionModeContext.js";
|
|
18
|
-
import "../../../contexts/InitialStateContext.js";
|
|
19
|
-
import "../../../contexts/FullScreenContext.js";
|
|
20
|
-
import "../../../contexts/FileInputContext.js";
|
|
21
|
-
import "../../../contexts/DropFileZoneContext.js";
|
|
22
|
-
import "../../../contexts/DimensionPagesContext.js";
|
|
23
|
-
import "../../../contexts/LocalizationContext.js";
|
|
24
|
-
import "../../../contexts/HighlightContext.js";
|
|
25
|
-
import "../../../contexts/LicenseContext.js";
|
|
26
|
-
import "../../../contexts/DownloadContext.js";
|
|
27
|
-
import "../../../contexts/SmoothScrollContext.js";
|
|
28
|
-
import "../../../contexts/ElementPageContext.js";
|
|
29
|
-
import "../../../contexts/PagesRotateContext.js";
|
|
30
|
-
import "../../../contexts/GlobalCurrentPage.js";
|
|
31
|
-
import "../../../contexts/LoaderContext.js";
|
|
32
|
-
import "../../../contexts/ToolComponentContext.js";
|
|
33
|
-
import "../../../contexts/IconToolContext.js";
|
|
34
|
-
import "../../../contexts/OtherToolContext.js";
|
|
35
|
-
import "../../../contexts/EventCallbackContext.js";
|
|
36
|
-
import "../../../contexts/ThemeContext.js";
|
|
37
|
-
import "../../../contexts/ConfigContext.js";
|
|
1
|
+
import { jsx as a, jsxs as C, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import { useMemo as J } from "react";
|
|
4
|
+
import { c as Q, a as P, P as D, b as v, d as y, e as X, f as M, g as ee } from "../../../index-c0faa594.js";
|
|
5
|
+
import { D as te, u as R } from "../../../index-e3ee9457.js";
|
|
6
|
+
import { R as oe, h as re, u as ne, F as ie, P as ae } from "../../../Combination-136ff99c.js";
|
|
7
|
+
import { useLayoutContainer as le } from "../../../contexts/LayoutContainerContext.js";
|
|
8
|
+
import { CloseIcon as ce } from "../../icons/CloseIcon.js";
|
|
9
|
+
import { dateFormatter as A } from "../../../utils/dateFormatter.js";
|
|
10
|
+
import { useDocumentContext as se } from "../../../contexts/RPDocumentContext.js";
|
|
11
|
+
import { PropertyItem as ue } from "./PropertyItem.js";
|
|
12
|
+
import { useOtherToolContext as de } from "../../../contexts/OtherToolContext.js";
|
|
13
|
+
import { useLocalizationContext as pe } from "../../../contexts/LocalizationContext.js";
|
|
14
|
+
import "react-dom";
|
|
15
|
+
import "../../../utils/hooks/useLoadPdf.js";
|
|
38
16
|
import "pdfjs-dist";
|
|
39
|
-
import "../Container.js";
|
|
40
|
-
import "../../../contexts/ViewportContext.js";
|
|
41
|
-
import "../../../contexts/ToolbarComponentContext.js";
|
|
42
|
-
import "../sidebar/RPSplitter.js";
|
|
43
|
-
import "../WrapperLayout.js";
|
|
44
|
-
import "../../RPDropFileZone.js";
|
|
45
|
-
import "../../../LayoutWrapper-6224491f.js";
|
|
46
|
-
import "../../ui/Button.js";
|
|
47
|
-
import "../../../SearchCloseButton-08d57275.js";
|
|
48
|
-
import "../../ui/Input.js";
|
|
49
|
-
import "../../ui/Checkbox.js";
|
|
50
|
-
import "../../icons/LoaderIcon.js";
|
|
51
|
-
import "../../../contexts/IconContext.js";
|
|
52
|
-
import "../../ui/RPTooltip.js";
|
|
53
|
-
import "../../ui/DropDown.js";
|
|
54
|
-
import "./MenuItem.js";
|
|
55
|
-
import "./MenuSeparator.js";
|
|
56
|
-
import "../../../RotateTool.module-67946714.js";
|
|
57
|
-
import "./PropertyItem.js";
|
|
58
|
-
import "../../icons/ChevronUpIcon.js";
|
|
59
17
|
import "../../../utils/types.js";
|
|
60
|
-
import "../../../
|
|
61
|
-
import "../../../utils/highlight.js";
|
|
62
|
-
import "../../../utils/charators.js";
|
|
63
|
-
import "../../../utils/Queue.js";
|
|
64
|
-
import "../../../utils/renderPage.js";
|
|
65
|
-
import "../../icons/Thumbnail.js";
|
|
66
|
-
import "../../../clsx-0c6e471a.js";
|
|
67
|
-
import "../../../utils/withRef.js";
|
|
68
|
-
import "../../../utils/hooks/useInfiniteScroll.js";
|
|
69
|
-
import "../../../utils/constants.js";
|
|
70
|
-
import "../../../utils/link_service.js";
|
|
71
|
-
import "../../../utils/annotations.js";
|
|
72
|
-
import "../../../utils/sanitizeExternalUrl.js";
|
|
73
|
-
import "../../page/searchHighlight.js";
|
|
74
|
-
import "../../../utils/const.js";
|
|
75
|
-
import "../../page/CustomElement.js";
|
|
76
|
-
import "../../../utils/appConsole.js";
|
|
77
|
-
import "../../../utils/hooks/useLoadPdf.js";
|
|
18
|
+
import "../../../de_DE-a553b162.js";
|
|
78
19
|
import "../../../utils/getThumbnailViewport.js";
|
|
20
|
+
import "../../../contexts/ConfigContext.js";
|
|
21
|
+
import "../../../contexts/DocumentPasswordContext.js";
|
|
22
|
+
import "../../../utils/appConsole.js";
|
|
79
23
|
import "../../../utils/hooks/usePdfProperties.js";
|
|
80
24
|
import "../../../utils/convertPdfDate.js";
|
|
81
25
|
import "../../../utils/formatFileSize.js";
|
|
82
|
-
import "../../../utils/getZoomLevel.js";
|
|
83
|
-
import "../../../utils/hooks/useDebounce.js";
|
|
84
|
-
import "../../../utils/hooks/useLicense.js";
|
|
85
|
-
import "../../../utils/getScrollDistance.js";
|
|
86
|
-
import "../../../utils/getElementPositionInPage.js";
|
|
87
|
-
import "../../../utils/calculatePage.js";
|
|
88
|
-
import "../../../utils/hooks/useMousePressed.js";
|
|
89
|
-
import "../../../utils/hooks/useGrabScroll.js";
|
|
90
|
-
import "../../../utils/hooks/usePinch.js";
|
|
91
|
-
import "../../ui/PasswordModal.js";
|
|
92
26
|
import "../../../utils/hooks/useLocalization.js";
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
27
|
+
var h = "Dialog", [T, tt] = Q(h), [fe, u] = T(h), L = (t) => {
|
|
28
|
+
const {
|
|
29
|
+
__scopeDialog: r,
|
|
30
|
+
children: n,
|
|
31
|
+
open: i,
|
|
32
|
+
defaultOpen: e,
|
|
33
|
+
onOpenChange: o,
|
|
34
|
+
modal: l = !0
|
|
35
|
+
} = t, s = c.useRef(null), d = c.useRef(null), [p, g] = M({
|
|
36
|
+
prop: i,
|
|
37
|
+
defaultProp: e ?? !1,
|
|
38
|
+
onChange: o,
|
|
39
|
+
caller: h
|
|
40
|
+
});
|
|
41
|
+
return /* @__PURE__ */ a(
|
|
42
|
+
fe,
|
|
43
|
+
{
|
|
44
|
+
scope: r,
|
|
45
|
+
triggerRef: s,
|
|
46
|
+
contentRef: d,
|
|
47
|
+
contentId: R(),
|
|
48
|
+
titleId: R(),
|
|
49
|
+
descriptionId: R(),
|
|
50
|
+
open: p,
|
|
51
|
+
onOpenChange: g,
|
|
52
|
+
onOpenToggle: c.useCallback(() => g((_) => !_), [g]),
|
|
53
|
+
modal: l,
|
|
54
|
+
children: n
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
L.displayName = h;
|
|
59
|
+
var w = "DialogTrigger", me = c.forwardRef(
|
|
60
|
+
(t, r) => {
|
|
61
|
+
const { __scopeDialog: n, ...i } = t, e = u(w, n), o = P(r, e.triggerRef);
|
|
62
|
+
return /* @__PURE__ */ a(
|
|
63
|
+
D.button,
|
|
64
|
+
{
|
|
65
|
+
type: "button",
|
|
66
|
+
"aria-haspopup": "dialog",
|
|
67
|
+
"aria-expanded": e.open,
|
|
68
|
+
"aria-controls": e.contentId,
|
|
69
|
+
"data-state": E(e.open),
|
|
70
|
+
...i,
|
|
71
|
+
ref: o,
|
|
72
|
+
onClick: v(t.onClick, e.onOpenToggle)
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
me.displayName = w;
|
|
78
|
+
var N = "DialogPortal", [ge, F] = T(N, {
|
|
79
|
+
forceMount: void 0
|
|
80
|
+
}), S = (t) => {
|
|
81
|
+
const { __scopeDialog: r, forceMount: n, children: i, container: e } = t, o = u(N, r);
|
|
82
|
+
return /* @__PURE__ */ a(ge, { scope: r, forceMount: n, children: c.Children.map(i, (l) => /* @__PURE__ */ a(y, { present: n || o.open, children: /* @__PURE__ */ a(ae, { asChild: !0, container: e, children: l }) })) });
|
|
83
|
+
};
|
|
84
|
+
S.displayName = N;
|
|
85
|
+
var b = "DialogOverlay", W = c.forwardRef(
|
|
86
|
+
(t, r) => {
|
|
87
|
+
const n = F(b, t.__scopeDialog), { forceMount: i = n.forceMount, ...e } = t, o = u(b, t.__scopeDialog);
|
|
88
|
+
return o.modal ? /* @__PURE__ */ a(y, { present: i || o.open, children: /* @__PURE__ */ a(De, { ...e, ref: r }) }) : null;
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
W.displayName = b;
|
|
92
|
+
var ve = ee("DialogOverlay.RemoveScroll"), De = c.forwardRef(
|
|
93
|
+
(t, r) => {
|
|
94
|
+
const { __scopeDialog: n, ...i } = t, e = u(b, n);
|
|
95
|
+
return (
|
|
96
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
97
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
98
|
+
/* @__PURE__ */ a(oe, { as: ve, allowPinchZoom: !0, shards: [e.contentRef], children: /* @__PURE__ */ a(
|
|
99
|
+
D.div,
|
|
100
|
+
{
|
|
101
|
+
"data-state": E(e.open),
|
|
102
|
+
...i,
|
|
103
|
+
ref: r,
|
|
104
|
+
style: { pointerEvents: "auto", ...i.style }
|
|
105
|
+
}
|
|
106
|
+
) })
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
), m = "DialogContent", k = c.forwardRef(
|
|
110
|
+
(t, r) => {
|
|
111
|
+
const n = F(m, t.__scopeDialog), { forceMount: i = n.forceMount, ...e } = t, o = u(m, t.__scopeDialog);
|
|
112
|
+
return /* @__PURE__ */ a(y, { present: i || o.open, children: o.modal ? /* @__PURE__ */ a(_e, { ...e, ref: r }) : /* @__PURE__ */ a(Ce, { ...e, ref: r }) });
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
k.displayName = m;
|
|
116
|
+
var _e = c.forwardRef(
|
|
117
|
+
(t, r) => {
|
|
118
|
+
const n = u(m, t.__scopeDialog), i = c.useRef(null), e = P(r, n.contentRef, i);
|
|
119
|
+
return c.useEffect(() => {
|
|
120
|
+
const o = i.current;
|
|
121
|
+
if (o)
|
|
122
|
+
return re(o);
|
|
123
|
+
}, []), /* @__PURE__ */ a(
|
|
124
|
+
q,
|
|
125
|
+
{
|
|
126
|
+
...t,
|
|
127
|
+
ref: e,
|
|
128
|
+
trapFocus: n.open,
|
|
129
|
+
disableOutsidePointerEvents: !0,
|
|
130
|
+
onCloseAutoFocus: v(t.onCloseAutoFocus, (o) => {
|
|
131
|
+
var l;
|
|
132
|
+
o.preventDefault(), (l = n.triggerRef.current) == null || l.focus();
|
|
133
|
+
}),
|
|
134
|
+
onPointerDownOutside: v(t.onPointerDownOutside, (o) => {
|
|
135
|
+
const l = o.detail.originalEvent, s = l.button === 0 && l.ctrlKey === !0;
|
|
136
|
+
(l.button === 2 || s) && o.preventDefault();
|
|
137
|
+
}),
|
|
138
|
+
onFocusOutside: v(
|
|
139
|
+
t.onFocusOutside,
|
|
140
|
+
(o) => o.preventDefault()
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
), Ce = c.forwardRef(
|
|
146
|
+
(t, r) => {
|
|
147
|
+
const n = u(m, t.__scopeDialog), i = c.useRef(!1), e = c.useRef(!1);
|
|
148
|
+
return /* @__PURE__ */ a(
|
|
149
|
+
q,
|
|
150
|
+
{
|
|
151
|
+
...t,
|
|
152
|
+
ref: r,
|
|
153
|
+
trapFocus: !1,
|
|
154
|
+
disableOutsidePointerEvents: !1,
|
|
155
|
+
onCloseAutoFocus: (o) => {
|
|
156
|
+
var l, s;
|
|
157
|
+
(l = t.onCloseAutoFocus) == null || l.call(t, o), o.defaultPrevented || (i.current || (s = n.triggerRef.current) == null || s.focus(), o.preventDefault()), i.current = !1, e.current = !1;
|
|
158
|
+
},
|
|
159
|
+
onInteractOutside: (o) => {
|
|
160
|
+
var d, p;
|
|
161
|
+
(d = t.onInteractOutside) == null || d.call(t, o), o.defaultPrevented || (i.current = !0, o.detail.originalEvent.type === "pointerdown" && (e.current = !0));
|
|
162
|
+
const l = o.target;
|
|
163
|
+
((p = n.triggerRef.current) == null ? void 0 : p.contains(l)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && e.current && o.preventDefault();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
), q = c.forwardRef(
|
|
169
|
+
(t, r) => {
|
|
170
|
+
const { __scopeDialog: n, trapFocus: i, onOpenAutoFocus: e, onCloseAutoFocus: o, ...l } = t, s = u(m, n), d = c.useRef(null), p = P(r, d);
|
|
171
|
+
return ne(), /* @__PURE__ */ C(x, { children: [
|
|
172
|
+
/* @__PURE__ */ a(
|
|
173
|
+
ie,
|
|
174
|
+
{
|
|
175
|
+
asChild: !0,
|
|
176
|
+
loop: !0,
|
|
177
|
+
trapped: i,
|
|
178
|
+
onMountAutoFocus: e,
|
|
179
|
+
onUnmountAutoFocus: o,
|
|
180
|
+
children: /* @__PURE__ */ a(
|
|
181
|
+
te,
|
|
182
|
+
{
|
|
183
|
+
role: "dialog",
|
|
184
|
+
id: s.contentId,
|
|
185
|
+
"aria-describedby": s.descriptionId,
|
|
186
|
+
"aria-labelledby": s.titleId,
|
|
187
|
+
"data-state": E(s.open),
|
|
188
|
+
...l,
|
|
189
|
+
ref: p,
|
|
190
|
+
onDismiss: () => s.onOpenChange(!1)
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
}
|
|
194
|
+
),
|
|
195
|
+
/* @__PURE__ */ C(x, { children: [
|
|
196
|
+
/* @__PURE__ */ a(he, { titleId: s.titleId }),
|
|
197
|
+
/* @__PURE__ */ a(Pe, { contentRef: d, descriptionId: s.descriptionId })
|
|
198
|
+
] })
|
|
199
|
+
] });
|
|
200
|
+
}
|
|
201
|
+
), O = "DialogTitle", G = c.forwardRef(
|
|
202
|
+
(t, r) => {
|
|
203
|
+
const { __scopeDialog: n, ...i } = t, e = u(O, n);
|
|
204
|
+
return /* @__PURE__ */ a(D.h2, { id: e.titleId, ...i, ref: r });
|
|
205
|
+
}
|
|
206
|
+
);
|
|
207
|
+
G.displayName = O;
|
|
208
|
+
var $ = "DialogDescription", be = c.forwardRef(
|
|
209
|
+
(t, r) => {
|
|
210
|
+
const { __scopeDialog: n, ...i } = t, e = u($, n);
|
|
211
|
+
return /* @__PURE__ */ a(D.p, { id: e.descriptionId, ...i, ref: r });
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
be.displayName = $;
|
|
215
|
+
var j = "DialogClose", z = c.forwardRef(
|
|
216
|
+
(t, r) => {
|
|
217
|
+
const { __scopeDialog: n, ...i } = t, e = u(j, n);
|
|
218
|
+
return /* @__PURE__ */ a(
|
|
219
|
+
D.button,
|
|
220
|
+
{
|
|
221
|
+
type: "button",
|
|
222
|
+
...i,
|
|
223
|
+
ref: r,
|
|
224
|
+
onClick: v(t.onClick, () => e.onOpenChange(!1))
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
z.displayName = j;
|
|
230
|
+
function E(t) {
|
|
231
|
+
return t ? "open" : "closed";
|
|
232
|
+
}
|
|
233
|
+
var B = "DialogTitleWarning", [ot, V] = X(B, {
|
|
234
|
+
contentName: m,
|
|
235
|
+
titleName: O,
|
|
236
|
+
docsSlug: "dialog"
|
|
237
|
+
}), he = ({ titleId: t }) => {
|
|
238
|
+
const r = V(B), n = `\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
239
|
+
|
|
240
|
+
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
241
|
+
|
|
242
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;
|
|
243
|
+
return c.useEffect(() => {
|
|
244
|
+
t && (document.getElementById(t) || console.error(n));
|
|
245
|
+
}, [n, t]), null;
|
|
246
|
+
}, Re = "DialogDescriptionWarning", Pe = ({ contentRef: t, descriptionId: r }) => {
|
|
247
|
+
const i = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${V(Re).contentName}}.`;
|
|
248
|
+
return c.useEffect(() => {
|
|
249
|
+
var o;
|
|
250
|
+
const e = (o = t.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
251
|
+
r && e && (document.getElementById(r) || console.warn(i));
|
|
252
|
+
}, [i, t, r]), null;
|
|
253
|
+
}, ye = L, Ne = S, Oe = W, Ee = k, Ie = G, xe = z;
|
|
254
|
+
const f = {
|
|
255
|
+
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
256
|
+
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
257
|
+
"rp-document-dialog": "_rp-document-dialog_slqo7_13",
|
|
258
|
+
"rp-document-properties": "_rp-document-properties_slqo7_35",
|
|
259
|
+
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
260
|
+
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
261
|
+
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
262
|
+
}, rt = () => {
|
|
263
|
+
const { pdfProperties: t } = se(), { container: r } = le(), { activeDocumentProperties: n, setActiveDocumentProperties: i } = de(), { localeMessages: e } = pe(), o = J(() => {
|
|
264
|
+
if (!t)
|
|
265
|
+
return [];
|
|
266
|
+
const {
|
|
267
|
+
fileSize: l,
|
|
268
|
+
filename: s,
|
|
269
|
+
title: d,
|
|
270
|
+
author: p,
|
|
271
|
+
subject: g,
|
|
272
|
+
createdOn: _,
|
|
273
|
+
creator: H,
|
|
274
|
+
keywords: K,
|
|
275
|
+
modifiedOn: I,
|
|
276
|
+
pdfProducer: U,
|
|
277
|
+
pdfVersion: Y,
|
|
278
|
+
pageCount: Z
|
|
279
|
+
} = t;
|
|
280
|
+
return [
|
|
281
|
+
{ label: e == null ? void 0 : e.propertiesFilenameLabel, value: s },
|
|
282
|
+
{ label: e == null ? void 0 : e.propertiesFileSizeLabel, value: l },
|
|
283
|
+
{ separate: !0 },
|
|
284
|
+
{ label: e == null ? void 0 : e.propertiesTitleLabel, value: d },
|
|
285
|
+
{ label: e == null ? void 0 : e.propertiesAuthorLabel, value: p },
|
|
286
|
+
{ label: e == null ? void 0 : e.propertiesSubjectLabel, value: g },
|
|
287
|
+
{ label: e == null ? void 0 : e.propertiesKeywordLabel, value: K },
|
|
288
|
+
{ label: e == null ? void 0 : e.propertiesCreatorLabel, value: H },
|
|
289
|
+
{
|
|
290
|
+
label: e == null ? void 0 : e.propertiesCreateOnLabel,
|
|
291
|
+
value: _ ? A(_) : ""
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
label: e == null ? void 0 : e.propertiesModifiedOnLabel,
|
|
295
|
+
value: I ? A(I) : ""
|
|
296
|
+
},
|
|
297
|
+
{ separate: !0 },
|
|
298
|
+
{ label: e == null ? void 0 : e.propertiesPDFProducerLabel, value: U },
|
|
299
|
+
{ label: e == null ? void 0 : e.propertiesPDFVersionLabel, value: Y },
|
|
300
|
+
{ label: e == null ? void 0 : e.propertiesPageCountLabel, value: Z }
|
|
301
|
+
];
|
|
302
|
+
}, [t, e]);
|
|
303
|
+
return /* @__PURE__ */ a(ye, { open: n, onOpenChange: i, children: /* @__PURE__ */ a(Ne, { container: r, children: /* @__PURE__ */ C("div", { className: f["rp-dialog-wrapper"], children: [
|
|
304
|
+
/* @__PURE__ */ a(Oe, { className: f["rp-dialog-overlay"] }),
|
|
305
|
+
/* @__PURE__ */ C(Ee, { className: f["rp-document-dialog"], "aria-labelledby": "document-properties-title", children: [
|
|
306
|
+
/* @__PURE__ */ a(Ie, { id: "document-properties-title", className: f["rp-dialog-title"], children: e == null ? void 0 : e.documentPropertiesLabel }),
|
|
307
|
+
/* @__PURE__ */ a("div", { className: f["rp-document-properties"], role: "region", "aria-labelledby": "document-properties-title", children: o.map((l, s) => /* @__PURE__ */ a("div", { children: l.separate ? /* @__PURE__ */ a("div", { className: f["rp-properties-divider"], role: "separator", "aria-orientation": "horizontal" }) : /* @__PURE__ */ a(ue, { label: l.label, value: l.value }) }, s)) }),
|
|
308
|
+
/* @__PURE__ */ a(xe, { asChild: !0, className: f["rp-dialog-close"], "aria-label": (e == null ? void 0 : e.searchCloseButtonTooltip) || "Close dialog", children: /* @__PURE__ */ a(ce, { "aria-hidden": "true" }) })
|
|
309
|
+
] })
|
|
310
|
+
] }) }) });
|
|
311
|
+
};
|
|
138
312
|
export {
|
|
139
|
-
|
|
313
|
+
rt as DocumentDialog
|
|
140
314
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as m, Fragment as c, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { MenuItem as u } from "./MenuItem.js";
|
|
3
3
|
import { InfoIcon as s } from "../../icons/InfoIcon.js";
|
|
4
4
|
import { useOtherToolContext as l } from "../../../contexts/OtherToolContext.js";
|
|
@@ -9,29 +9,32 @@ import { useLocalizationContext as x } from "../../../contexts/LocalizationConte
|
|
|
9
9
|
import { useIconToolContext as C } from "../../../contexts/IconToolContext.js";
|
|
10
10
|
import { useToolComponentContext as I } from "../../../contexts/ToolComponentContext.js";
|
|
11
11
|
import { MenuSeparator as T } from "./MenuSeparator.js";
|
|
12
|
-
import "../../../index-
|
|
12
|
+
import "../../../index-61f59539.js";
|
|
13
13
|
import "react";
|
|
14
|
-
import "../../../index-
|
|
14
|
+
import "../../../index-c0faa594.js";
|
|
15
15
|
import "react-dom";
|
|
16
|
-
import "../../../
|
|
16
|
+
import "../../../index-e3ee9457.js";
|
|
17
|
+
import "../../../Combination-136ff99c.js";
|
|
18
|
+
import "../../../floating-ui.react-dom-5ec29bd6.js";
|
|
19
|
+
import "../../../index-655864a7.js";
|
|
17
20
|
import "../../../clsx-0c6e471a.js";
|
|
18
21
|
import "../../../utils/withRef.js";
|
|
19
22
|
import "../../../utils/appConsole.js";
|
|
20
23
|
import "../../../utils/hooks/useLocalization.js";
|
|
21
|
-
import "../../../
|
|
24
|
+
import "../../../de_DE-a553b162.js";
|
|
22
25
|
const a = () => {
|
|
23
26
|
const { documentPropertiesIcon: r } = f(), { documentPropertiesIcon: e } = C();
|
|
24
27
|
return r || e || /* @__PURE__ */ t(s, {});
|
|
25
|
-
},
|
|
26
|
-
const { setActiveDocumentProperties: r } = l(), { documentProperties: e = !0 } = d(), { documentProperties:
|
|
27
|
-
return !e || !
|
|
28
|
+
}, Q = () => {
|
|
29
|
+
const { setActiveDocumentProperties: r } = l(), { documentProperties: e = !0 } = d(), { documentProperties: n = !0, scrollModeTool: i } = I(), { localeMessages: o } = x();
|
|
30
|
+
return !e || !n ? null : /* @__PURE__ */ m(c, { children: [
|
|
28
31
|
i && /* @__PURE__ */ t(T, {}),
|
|
29
|
-
/* @__PURE__ */ t(u, { onClick: () => r((p) => !p), children: /* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ t(u, { onClick: () => r((p) => !p), children: /* @__PURE__ */ m(P, { className: "rp-menu-item", content: o == null ? void 0 : o.documentPropertiesTooltip, children: [
|
|
30
33
|
/* @__PURE__ */ t("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ t(a, {}) }),
|
|
31
34
|
o == null ? void 0 : o.documentPropertiesLabel
|
|
32
35
|
] }) })
|
|
33
36
|
] });
|
|
34
37
|
};
|
|
35
38
|
export {
|
|
36
|
-
|
|
39
|
+
Q as DocumentProperties
|
|
37
40
|
};
|