@pdf-viewer/react 1.9.0-beta.6 → 1.9.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/SearchCloseButton-cbf182aa.js +33 -0
- package/dist/ToolbarLayout.module-201969d2.js +3453 -0
- package/dist/assets/ToolbarLayout.css +1 -1
- package/dist/components/RPController.js +8 -8
- package/dist/components/RPDropFileZone.js +23 -21
- package/dist/components/RPPages.js +17 -18
- package/dist/components/RPProvider.js +14 -15
- package/dist/components/layout/Container.js +11 -10
- package/dist/components/layout/LayoutContainer.js +15 -16
- package/dist/components/layout/RPDefaultLayout.js +14 -76
- package/dist/components/layout/RPLayout.js +22 -22
- package/dist/components/layout/WrapperLayout.js +8 -7
- package/dist/components/layout/sidebar/RPSidebar.js +12 -51
- package/dist/components/layout/sidebar/RPSplitter.js +9 -7
- package/dist/components/layout/sidebar/Thumbnail.js +15 -16
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +24 -305
- package/dist/components/layout/toolbar/FileDownloadTool.js +13 -23
- package/dist/components/layout/toolbar/MenuItem.js +7 -6
- package/dist/components/layout/toolbar/MenuSeparator.js +5 -4
- package/dist/components/layout/toolbar/MostPageTool.js +25 -50
- package/dist/components/layout/toolbar/OtherTool.js +22 -115
- package/dist/components/layout/toolbar/Paginate.js +17 -99
- package/dist/components/layout/toolbar/PrintTool.js +13 -43
- package/dist/components/layout/toolbar/PropertyItem.js +8 -5
- package/dist/components/layout/toolbar/RPToolbar.js +7 -28
- package/dist/components/layout/toolbar/RPToolbarEnd.js +7 -22
- package/dist/components/layout/toolbar/RotateTool.js +21 -20
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchCloseButton.js +7 -19
- package/dist/components/layout/toolbar/SearchResultNavigator.js +8 -42
- package/dist/components/layout/toolbar/SearchTool.js +30 -197
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ThumbnailTool.js +3 -3
- package/dist/components/layout/toolbar/ToolbarCustom.js +22 -24
- package/dist/components/layout/toolbar/ToolbarDefault.js +19 -24
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +28 -140
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/InputPageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/NextPageTool.js +17 -18
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PrintTool.js +3 -3
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +7 -7
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +20 -26
- package/dist/components/page/AnnotationLayer.js +16 -17
- package/dist/components/page/CanvasLayer.js +16 -17
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +16 -17
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +16 -17
- package/dist/components/page/TextLayer.js +16 -17
- package/dist/components/ui/Checkbox.js +51 -49
- package/dist/components/ui/DropDown.js +19 -13
- package/dist/components/ui/LoadingIndicator.js +5 -22
- package/dist/components/ui/RPTooltip.js +33 -33
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +1 -1
- package/dist/contexts/SearchContext.js +3 -3
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/{index-492f99d0.js → index-18b0454c.js} +1 -1
- package/dist/{index-2160dd99.js → index-5908484b.js} +11 -11
- package/dist/index-f4a9ae4d.js +1664 -0
- package/dist/main.js +48 -50
- package/dist/types/components/layout/RPDefaultLayout.d.ts +1 -2
- package/dist/types/components/layout/toolbar/RPToolbar.d.ts +3 -2
- package/dist/utils/hooks/useFileDownload.js +16 -17
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +16 -17
- package/dist/utils/hooks/usePresentPage.js +16 -17
- package/dist/utils/hooks/usePrint.js +16 -17
- package/dist/utils/hooks/useScrollToPage.js +16 -17
- package/dist/utils/hooks/useSearch.js +16 -17
- package/dist/utils/hooks/useThumbnail.js +16 -17
- package/dist/utils/hooks/useVirtualReactWindow.js +16 -17
- package/package.json +1 -1
- package/dist/Checkbox.module-3edaacbb.js +0 -7
- package/dist/Combination-9a0a3e65.js +0 -693
- package/dist/Container.module-f8b5c306.js +0 -6
- package/dist/DropDown.module-a78567cb.js +0 -11
- package/dist/MenuItem.module-bc11d0d3.js +0 -6
- package/dist/MenuSeparator.module-89b2ff7f.js +0 -6
- package/dist/PropertyItem.module-db0150cc.js +0 -8
- package/dist/RPSplitter.module-13d612c4.js +0 -7
- package/dist/RPTheme.module-bd9038da.js +0 -8
- package/dist/RotateTool.module-03987eba.js +0 -6
- package/dist/SearchTool.module-016f3a8d.js +0 -16
- package/dist/ToolbarLayout.module-88476995.js +0 -2464
- package/dist/WrapperLayout.module-147bc943.js +0 -6
- package/dist/index-49b9a615.js +0 -978
- /package/dist/assets/{RPTheme.css → RPDropFileZone.css} +0 -0
- /package/dist/assets/{SearchTool.css → SearchCloseButton.css} +0 -0
|
@@ -1,53 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const j = () => {
|
|
13
|
-
const { thumbnailIcon: o } = S(), { thumbnailIcon: r } = P();
|
|
14
|
-
return o || r || /* @__PURE__ */ t(x, {});
|
|
15
|
-
}, q = () => {
|
|
16
|
-
const { active: o, setActive: r } = k(), [s, c] = d(200), l = f(null), { thumbnailTool: i, sidebarEnable: u } = R(), { localeMessages: n } = N(), e = T(() => {
|
|
17
|
-
r((p) => !p);
|
|
18
|
-
}, []), h = C(() => typeof i != "boolean" && i ? /* @__PURE__ */ t(i, { onClick: e, active: o }) : i ? /* @__PURE__ */ t(y, { content: n == null ? void 0 : n.thumbnailTooltip, children: /* @__PURE__ */ t(
|
|
19
|
-
I,
|
|
20
|
-
{
|
|
21
|
-
onClick: e,
|
|
22
|
-
active: o,
|
|
23
|
-
"aria-label": n == null ? void 0 : n.thumbnailTooltip,
|
|
24
|
-
children: /* @__PURE__ */ t(j, {})
|
|
25
|
-
}
|
|
26
|
-
) }) : null, [i, o, e, n]);
|
|
27
|
-
return /* @__PURE__ */ t(b, { children: u && /* @__PURE__ */ m(
|
|
28
|
-
"div",
|
|
29
|
-
{
|
|
30
|
-
style: { "--rp-thumbnail-width": `${s}px` },
|
|
31
|
-
className: a["rp-sidebar-content-wrapper"],
|
|
32
|
-
"data-rp": "sidebar",
|
|
33
|
-
children: [
|
|
34
|
-
/* @__PURE__ */ t("div", { className: a["rp-sidebar-content"], children: h }),
|
|
35
|
-
/* @__PURE__ */ m(
|
|
36
|
-
"div",
|
|
37
|
-
{
|
|
38
|
-
"data-rp": "thumbnailSidebar",
|
|
39
|
-
hidden: !o,
|
|
40
|
-
className: a["rp-thumbnails-wrapper"],
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ t(v, { show: o, ref: l }),
|
|
43
|
-
/* @__PURE__ */ t(w, { onWidthChange: c, thumbnailRef: l })
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
) });
|
|
50
|
-
};
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../../icons/Thumbnail.js";
|
|
4
|
+
import "../../ui/Button.js";
|
|
5
|
+
import { _ as x } from "../../../ToolbarLayout.module-201969d2.js";
|
|
6
|
+
import "./RPSplitter.js";
|
|
7
|
+
import "../../../contexts/ToolbarComponentContext.js";
|
|
8
|
+
import "../../../contexts/IconContext.js";
|
|
9
|
+
import "../../ui/RPTooltip.js";
|
|
10
|
+
import "../../../contexts/LocalizationContext.js";
|
|
11
|
+
import "../../../contexts/IconToolContext.js";
|
|
51
12
|
export {
|
|
52
|
-
|
|
13
|
+
x as RPSidebar
|
|
53
14
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as a } from "react";
|
|
3
|
+
import '../../../assets/RPSplitter.css';const e = {
|
|
4
|
+
"rp-thumbnail-dragger": "_rp-thumbnail-dragger_1sd13_1",
|
|
5
|
+
"rp-thumbnail-dragger-dragging": "_rp-thumbnail-dragger-dragging_1sd13_11"
|
|
6
|
+
}, s = () => {
|
|
7
|
+
const r = a(null);
|
|
8
|
+
return /* @__PURE__ */ g("div", { ref: r, className: e["rp-thumbnail-dragger"] });
|
|
7
9
|
};
|
|
8
10
|
export {
|
|
9
|
-
|
|
11
|
+
s as RPSplitter
|
|
10
12
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Y as $ } from "../../../ToolbarLayout.module-201969d2.js";
|
|
4
4
|
import "../../../clsx-0c6e471a.js";
|
|
5
5
|
import "../../icons/LoaderIcon.js";
|
|
6
6
|
import "../../../contexts/PagesRotateContext.js";
|
|
@@ -32,25 +32,24 @@ import "../../../contexts/ToolComponentContext.js";
|
|
|
32
32
|
import "../../../contexts/IconToolContext.js";
|
|
33
33
|
import "../../../contexts/OtherToolContext.js";
|
|
34
34
|
import "../../RPConfig.js";
|
|
35
|
+
import "../Container.js";
|
|
36
|
+
import "../../../contexts/ViewportContext.js";
|
|
37
|
+
import "../../../contexts/ToolbarComponentContext.js";
|
|
38
|
+
import "../WrapperLayout.js";
|
|
39
|
+
import "../../../contexts/ThemeContext.js";
|
|
40
|
+
import "../../RPDropFileZone.js";
|
|
35
41
|
import "../../ui/Button.js";
|
|
42
|
+
import "../../../SearchCloseButton-cbf182aa.js";
|
|
36
43
|
import "../../ui/Input.js";
|
|
44
|
+
import "../../ui/Checkbox.js";
|
|
37
45
|
import "../../../contexts/IconContext.js";
|
|
38
|
-
import "../../../contexts/ToolbarComponentContext.js";
|
|
39
|
-
import "../../../contexts/ViewportContext.js";
|
|
40
46
|
import "../../ui/RPTooltip.js";
|
|
41
|
-
import "
|
|
42
|
-
import "
|
|
47
|
+
import "../../ui/DropDown.js";
|
|
48
|
+
import "../toolbar/MenuItem.js";
|
|
49
|
+
import "../toolbar/MenuSeparator.js";
|
|
43
50
|
import "../../../utils/dateFormatter.js";
|
|
44
|
-
import "
|
|
45
|
-
import "
|
|
46
|
-
import "../../../RotateTool.module-03987eba.js";
|
|
47
|
-
import "../../../SearchTool.module-016f3a8d.js";
|
|
48
|
-
import "../../../Checkbox.module-3edaacbb.js";
|
|
49
|
-
import "../../../RPSplitter.module-13d612c4.js";
|
|
50
|
-
import "../../../Container.module-f8b5c306.js";
|
|
51
|
-
import "../../../WrapperLayout.module-147bc943.js";
|
|
52
|
-
import "../../../RPTheme.module-bd9038da.js";
|
|
53
|
-
import "../../../contexts/ThemeContext.js";
|
|
51
|
+
import "../toolbar/PropertyItem.js";
|
|
52
|
+
import "../toolbar/RotateTool.js";
|
|
54
53
|
export {
|
|
55
|
-
|
|
54
|
+
$ as Thumbnail
|
|
56
55
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
3
|
+
import { p as a } from "../../../ToolbarLayout.module-201969d2.js";
|
|
4
4
|
import "../../../utils/hooks/useInfiniteScroll.js";
|
|
5
5
|
import "../../../utils/withRef.js";
|
|
6
6
|
export {
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { q as m } from "../../../ToolbarLayout.module-88476995.js";
|
|
9
|
-
import { CloseIcon as ce } from "../../icons/CloseIcon.js";
|
|
10
|
-
import { dateFormatter as A } from "../../../utils/dateFormatter.js";
|
|
11
|
-
import { useDocumentContext as se } from "../../../contexts/RPDocumentContext.js";
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { N as $ } from "../../../ToolbarLayout.module-201969d2.js";
|
|
4
|
+
import "../../../contexts/LayoutContainerContext.js";
|
|
5
|
+
import "../../icons/CloseIcon.js";
|
|
6
|
+
import "../../../utils/dateFormatter.js";
|
|
7
|
+
import "../../../contexts/RPDocumentContext.js";
|
|
12
8
|
import "../../../contexts/DocumentPasswordContext.js";
|
|
13
9
|
import "../../../contexts/DarkModeContext.js";
|
|
14
10
|
import "../../../contexts/RotationContext.js";
|
|
@@ -24,7 +20,7 @@ import "../../../contexts/FullScreenContext.js";
|
|
|
24
20
|
import "../../../contexts/FileInputContext.js";
|
|
25
21
|
import "../../../contexts/DropFileZoneContext.js";
|
|
26
22
|
import "../../../contexts/DimensionPagesContext.js";
|
|
27
|
-
import
|
|
23
|
+
import "../../../contexts/LocalizationContext.js";
|
|
28
24
|
import "../../../contexts/HighlightContext.js";
|
|
29
25
|
import "../../../contexts/LicenseContext.js";
|
|
30
26
|
import "../../../contexts/DownloadContext.js";
|
|
@@ -34,303 +30,26 @@ import "../../../contexts/PagesRotateContext.js";
|
|
|
34
30
|
import "../../../contexts/LoaderContext.js";
|
|
35
31
|
import "../../../contexts/ToolComponentContext.js";
|
|
36
32
|
import "../../../contexts/IconToolContext.js";
|
|
37
|
-
import
|
|
33
|
+
import "../../../contexts/OtherToolContext.js";
|
|
38
34
|
import "../../RPConfig.js";
|
|
35
|
+
import "../Container.js";
|
|
36
|
+
import "../../../contexts/ViewportContext.js";
|
|
37
|
+
import "../../../contexts/ToolbarComponentContext.js";
|
|
38
|
+
import "../WrapperLayout.js";
|
|
39
|
+
import "../../../contexts/ThemeContext.js";
|
|
40
|
+
import "../../RPDropFileZone.js";
|
|
39
41
|
import "../../ui/Button.js";
|
|
42
|
+
import "../../../SearchCloseButton-cbf182aa.js";
|
|
40
43
|
import "../../ui/Input.js";
|
|
44
|
+
import "../../ui/Checkbox.js";
|
|
45
|
+
import "../../icons/LoaderIcon.js";
|
|
41
46
|
import "../../../contexts/IconContext.js";
|
|
42
|
-
import "../../../contexts/ToolbarComponentContext.js";
|
|
43
|
-
import "../../../contexts/ViewportContext.js";
|
|
44
47
|
import "../../ui/RPTooltip.js";
|
|
45
|
-
import "
|
|
46
|
-
import "
|
|
47
|
-
import "
|
|
48
|
-
import "
|
|
49
|
-
import "
|
|
50
|
-
import "../../../Checkbox.module-3edaacbb.js";
|
|
51
|
-
import "../../icons/LoaderIcon.js";
|
|
52
|
-
import "../../../RPSplitter.module-13d612c4.js";
|
|
53
|
-
import "../../../Container.module-f8b5c306.js";
|
|
54
|
-
import "../../../WrapperLayout.module-147bc943.js";
|
|
55
|
-
import "../../../RPTheme.module-bd9038da.js";
|
|
56
|
-
import "../../../contexts/ThemeContext.js";
|
|
57
|
-
import { PropertyItem as de } from "./PropertyItem.js";
|
|
58
|
-
var _ = "Dialog", [T, Tt] = Q(_), [me, p] = T(_), L = (t) => {
|
|
59
|
-
const {
|
|
60
|
-
__scopeDialog: r,
|
|
61
|
-
children: n,
|
|
62
|
-
open: i,
|
|
63
|
-
defaultOpen: e,
|
|
64
|
-
onOpenChange: o,
|
|
65
|
-
modal: l = !0
|
|
66
|
-
} = t, s = c.useRef(null), u = c.useRef(null), [d = !1, g] = ee({
|
|
67
|
-
prop: i,
|
|
68
|
-
defaultProp: e,
|
|
69
|
-
onChange: o
|
|
70
|
-
});
|
|
71
|
-
return /* @__PURE__ */ a(
|
|
72
|
-
me,
|
|
73
|
-
{
|
|
74
|
-
scope: r,
|
|
75
|
-
triggerRef: s,
|
|
76
|
-
contentRef: u,
|
|
77
|
-
contentId: P(),
|
|
78
|
-
titleId: P(),
|
|
79
|
-
descriptionId: P(),
|
|
80
|
-
open: d,
|
|
81
|
-
onOpenChange: g,
|
|
82
|
-
onOpenToggle: c.useCallback(() => g((C) => !C), [g]),
|
|
83
|
-
modal: l,
|
|
84
|
-
children: n
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
L.displayName = _;
|
|
89
|
-
var F = "DialogTrigger", fe = c.forwardRef(
|
|
90
|
-
(t, r) => {
|
|
91
|
-
const { __scopeDialog: n, ...i } = t, e = p(F, n), o = R(r, e.triggerRef);
|
|
92
|
-
return /* @__PURE__ */ a(
|
|
93
|
-
D.button,
|
|
94
|
-
{
|
|
95
|
-
type: "button",
|
|
96
|
-
"aria-haspopup": "dialog",
|
|
97
|
-
"aria-expanded": e.open,
|
|
98
|
-
"aria-controls": e.contentId,
|
|
99
|
-
"data-state": E(e.open),
|
|
100
|
-
...i,
|
|
101
|
-
ref: o,
|
|
102
|
-
onClick: v(t.onClick, e.onOpenToggle)
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
fe.displayName = F;
|
|
108
|
-
var y = "DialogPortal", [ge, w] = T(y, {
|
|
109
|
-
forceMount: void 0
|
|
110
|
-
}), S = (t) => {
|
|
111
|
-
const { __scopeDialog: r, forceMount: n, children: i, container: e } = t, o = p(y, r);
|
|
112
|
-
return /* @__PURE__ */ a(ge, { scope: r, forceMount: n, children: c.Children.map(i, (l) => /* @__PURE__ */ a(N, { present: n || o.open, children: /* @__PURE__ */ a(ae, { asChild: !0, container: e, children: l }) })) });
|
|
113
|
-
};
|
|
114
|
-
S.displayName = y;
|
|
115
|
-
var h = "DialogOverlay", W = c.forwardRef(
|
|
116
|
-
(t, r) => {
|
|
117
|
-
const n = w(h, t.__scopeDialog), { forceMount: i = n.forceMount, ...e } = t, o = p(h, t.__scopeDialog);
|
|
118
|
-
return o.modal ? /* @__PURE__ */ a(N, { present: i || o.open, children: /* @__PURE__ */ a(ve, { ...e, ref: r }) }) : null;
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
W.displayName = h;
|
|
122
|
-
var ve = c.forwardRef(
|
|
123
|
-
(t, r) => {
|
|
124
|
-
const { __scopeDialog: n, ...i } = t, e = p(h, n);
|
|
125
|
-
return (
|
|
126
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
127
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
128
|
-
/* @__PURE__ */ a(oe, { as: X, allowPinchZoom: !0, shards: [e.contentRef], children: /* @__PURE__ */ a(
|
|
129
|
-
D.div,
|
|
130
|
-
{
|
|
131
|
-
"data-state": E(e.open),
|
|
132
|
-
...i,
|
|
133
|
-
ref: r,
|
|
134
|
-
style: { pointerEvents: "auto", ...i.style }
|
|
135
|
-
}
|
|
136
|
-
) })
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
), f = "DialogContent", k = c.forwardRef(
|
|
140
|
-
(t, r) => {
|
|
141
|
-
const n = w(f, t.__scopeDialog), { forceMount: i = n.forceMount, ...e } = t, o = p(f, t.__scopeDialog);
|
|
142
|
-
return /* @__PURE__ */ a(N, { present: i || o.open, children: o.modal ? /* @__PURE__ */ a(De, { ...e, ref: r }) : /* @__PURE__ */ a(Ce, { ...e, ref: r }) });
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
k.displayName = f;
|
|
146
|
-
var De = c.forwardRef(
|
|
147
|
-
(t, r) => {
|
|
148
|
-
const n = p(f, t.__scopeDialog), i = c.useRef(null), e = R(r, n.contentRef, i);
|
|
149
|
-
return c.useEffect(() => {
|
|
150
|
-
const o = i.current;
|
|
151
|
-
if (o)
|
|
152
|
-
return re(o);
|
|
153
|
-
}, []), /* @__PURE__ */ a(
|
|
154
|
-
G,
|
|
155
|
-
{
|
|
156
|
-
...t,
|
|
157
|
-
ref: e,
|
|
158
|
-
trapFocus: n.open,
|
|
159
|
-
disableOutsidePointerEvents: !0,
|
|
160
|
-
onCloseAutoFocus: v(t.onCloseAutoFocus, (o) => {
|
|
161
|
-
var l;
|
|
162
|
-
o.preventDefault(), (l = n.triggerRef.current) == null || l.focus();
|
|
163
|
-
}),
|
|
164
|
-
onPointerDownOutside: v(t.onPointerDownOutside, (o) => {
|
|
165
|
-
const l = o.detail.originalEvent, s = l.button === 0 && l.ctrlKey === !0;
|
|
166
|
-
(l.button === 2 || s) && o.preventDefault();
|
|
167
|
-
}),
|
|
168
|
-
onFocusOutside: v(
|
|
169
|
-
t.onFocusOutside,
|
|
170
|
-
(o) => o.preventDefault()
|
|
171
|
-
)
|
|
172
|
-
}
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
), Ce = c.forwardRef(
|
|
176
|
-
(t, r) => {
|
|
177
|
-
const n = p(f, t.__scopeDialog), i = c.useRef(!1), e = c.useRef(!1);
|
|
178
|
-
return /* @__PURE__ */ a(
|
|
179
|
-
G,
|
|
180
|
-
{
|
|
181
|
-
...t,
|
|
182
|
-
ref: r,
|
|
183
|
-
trapFocus: !1,
|
|
184
|
-
disableOutsidePointerEvents: !1,
|
|
185
|
-
onCloseAutoFocus: (o) => {
|
|
186
|
-
var l, s;
|
|
187
|
-
(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;
|
|
188
|
-
},
|
|
189
|
-
onInteractOutside: (o) => {
|
|
190
|
-
var u, d;
|
|
191
|
-
(u = t.onInteractOutside) == null || u.call(t, o), o.defaultPrevented || (i.current = !0, o.detail.originalEvent.type === "pointerdown" && (e.current = !0));
|
|
192
|
-
const l = o.target;
|
|
193
|
-
((d = n.triggerRef.current) == null ? void 0 : d.contains(l)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && e.current && o.preventDefault();
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
), G = c.forwardRef(
|
|
199
|
-
(t, r) => {
|
|
200
|
-
const { __scopeDialog: n, trapFocus: i, onOpenAutoFocus: e, onCloseAutoFocus: o, ...l } = t, s = p(f, n), u = c.useRef(null), d = R(r, u);
|
|
201
|
-
return ne(), /* @__PURE__ */ b(x, { children: [
|
|
202
|
-
/* @__PURE__ */ a(
|
|
203
|
-
ie,
|
|
204
|
-
{
|
|
205
|
-
asChild: !0,
|
|
206
|
-
loop: !0,
|
|
207
|
-
trapped: i,
|
|
208
|
-
onMountAutoFocus: e,
|
|
209
|
-
onUnmountAutoFocus: o,
|
|
210
|
-
children: /* @__PURE__ */ a(
|
|
211
|
-
te,
|
|
212
|
-
{
|
|
213
|
-
role: "dialog",
|
|
214
|
-
id: s.contentId,
|
|
215
|
-
"aria-describedby": s.descriptionId,
|
|
216
|
-
"aria-labelledby": s.titleId,
|
|
217
|
-
"data-state": E(s.open),
|
|
218
|
-
...l,
|
|
219
|
-
ref: d,
|
|
220
|
-
onDismiss: () => s.onOpenChange(!1)
|
|
221
|
-
}
|
|
222
|
-
)
|
|
223
|
-
}
|
|
224
|
-
),
|
|
225
|
-
/* @__PURE__ */ b(x, { children: [
|
|
226
|
-
/* @__PURE__ */ a(he, { titleId: s.titleId }),
|
|
227
|
-
/* @__PURE__ */ a(Re, { contentRef: u, descriptionId: s.descriptionId })
|
|
228
|
-
] })
|
|
229
|
-
] });
|
|
230
|
-
}
|
|
231
|
-
), O = "DialogTitle", $ = c.forwardRef(
|
|
232
|
-
(t, r) => {
|
|
233
|
-
const { __scopeDialog: n, ...i } = t, e = p(O, n);
|
|
234
|
-
return /* @__PURE__ */ a(D.h2, { id: e.titleId, ...i, ref: r });
|
|
235
|
-
}
|
|
236
|
-
);
|
|
237
|
-
$.displayName = O;
|
|
238
|
-
var j = "DialogDescription", be = c.forwardRef(
|
|
239
|
-
(t, r) => {
|
|
240
|
-
const { __scopeDialog: n, ...i } = t, e = p(j, n);
|
|
241
|
-
return /* @__PURE__ */ a(D.p, { id: e.descriptionId, ...i, ref: r });
|
|
242
|
-
}
|
|
243
|
-
);
|
|
244
|
-
be.displayName = j;
|
|
245
|
-
var V = "DialogClose", z = c.forwardRef(
|
|
246
|
-
(t, r) => {
|
|
247
|
-
const { __scopeDialog: n, ...i } = t, e = p(V, n);
|
|
248
|
-
return /* @__PURE__ */ a(
|
|
249
|
-
D.button,
|
|
250
|
-
{
|
|
251
|
-
type: "button",
|
|
252
|
-
...i,
|
|
253
|
-
ref: r,
|
|
254
|
-
onClick: v(t.onClick, () => e.onOpenChange(!1))
|
|
255
|
-
}
|
|
256
|
-
);
|
|
257
|
-
}
|
|
258
|
-
);
|
|
259
|
-
z.displayName = V;
|
|
260
|
-
function E(t) {
|
|
261
|
-
return t ? "open" : "closed";
|
|
262
|
-
}
|
|
263
|
-
var B = "DialogTitleWarning", [Lt, q] = M(B, {
|
|
264
|
-
contentName: f,
|
|
265
|
-
titleName: O,
|
|
266
|
-
docsSlug: "dialog"
|
|
267
|
-
}), he = ({ titleId: t }) => {
|
|
268
|
-
const r = q(B), n = `\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
269
|
-
|
|
270
|
-
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
271
|
-
|
|
272
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;
|
|
273
|
-
return c.useEffect(() => {
|
|
274
|
-
t && (document.getElementById(t) || console.error(n));
|
|
275
|
-
}, [n, t]), null;
|
|
276
|
-
}, Pe = "DialogDescriptionWarning", Re = ({ contentRef: t, descriptionId: r }) => {
|
|
277
|
-
const i = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${q(Pe).contentName}}.`;
|
|
278
|
-
return c.useEffect(() => {
|
|
279
|
-
var o;
|
|
280
|
-
const e = (o = t.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
281
|
-
r && e && (document.getElementById(r) || console.warn(i));
|
|
282
|
-
}, [i, t, r]), null;
|
|
283
|
-
}, Ne = L, _e = S, ye = W, Oe = k, Ee = $, Ie = z;
|
|
284
|
-
const Ft = () => {
|
|
285
|
-
const { pdfProperties: t } = se(), { container: r } = le(), { activeDocumentProperties: n, setActiveDocumentProperties: i } = ue(), { localeMessages: e } = pe(), o = J(() => {
|
|
286
|
-
if (!t)
|
|
287
|
-
return [];
|
|
288
|
-
const {
|
|
289
|
-
fileSize: l,
|
|
290
|
-
filename: s,
|
|
291
|
-
title: u,
|
|
292
|
-
author: d,
|
|
293
|
-
subject: g,
|
|
294
|
-
createdOn: C,
|
|
295
|
-
creator: H,
|
|
296
|
-
keywords: K,
|
|
297
|
-
modifiedOn: I,
|
|
298
|
-
pdfProducer: U,
|
|
299
|
-
pdfVersion: Y,
|
|
300
|
-
pageCount: Z
|
|
301
|
-
} = t;
|
|
302
|
-
return [
|
|
303
|
-
{ label: e == null ? void 0 : e.propertiesFilenameLabel, value: s },
|
|
304
|
-
{ label: e == null ? void 0 : e.propertiesFileSizeLabel, value: l },
|
|
305
|
-
{ separate: !0 },
|
|
306
|
-
{ label: e == null ? void 0 : e.propertiesTitleLabel, value: u },
|
|
307
|
-
{ label: e == null ? void 0 : e.propertiesAuthorLabel, value: d },
|
|
308
|
-
{ label: e == null ? void 0 : e.propertiesSubjectLabel, value: g },
|
|
309
|
-
{ label: e == null ? void 0 : e.propertiesKeywordLabel, value: K },
|
|
310
|
-
{ label: e == null ? void 0 : e.propertiesCreatorLabel, value: H },
|
|
311
|
-
{
|
|
312
|
-
label: e == null ? void 0 : e.propertiesCreateOnLabel,
|
|
313
|
-
value: C ? A(C) : ""
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
label: e == null ? void 0 : e.propertiesModifiedOnLabel,
|
|
317
|
-
value: I ? A(I) : ""
|
|
318
|
-
},
|
|
319
|
-
{ separate: !0 },
|
|
320
|
-
{ label: e == null ? void 0 : e.propertiesPDFProducerLabel, value: U },
|
|
321
|
-
{ label: e == null ? void 0 : e.propertiesPDFVersionLabel, value: Y },
|
|
322
|
-
{ label: e == null ? void 0 : e.propertiesPageCountLabel, value: Z }
|
|
323
|
-
];
|
|
324
|
-
}, [t, e]);
|
|
325
|
-
return /* @__PURE__ */ a(Ne, { open: n, onOpenChange: i, children: /* @__PURE__ */ a(_e, { container: r, children: /* @__PURE__ */ b("div", { className: m["rp-dialog-wrapper"], children: [
|
|
326
|
-
/* @__PURE__ */ a(ye, { className: m["rp-dialog-overlay"] }),
|
|
327
|
-
/* @__PURE__ */ b(Oe, { className: m["rp-document-dialog"], children: [
|
|
328
|
-
/* @__PURE__ */ a(Ee, { className: m["rp-dialog-title"], children: e == null ? void 0 : e.documentPropertiesLabel }),
|
|
329
|
-
/* @__PURE__ */ a("div", { className: m["rp-document-properties"], children: o.map((l, s) => /* @__PURE__ */ a("div", { children: l.separate ? /* @__PURE__ */ a("div", { className: m["rp-properties-divider"] }) : /* @__PURE__ */ a(de, { label: l.label, value: l.value }) }, s)) }),
|
|
330
|
-
/* @__PURE__ */ a(Ie, { asChild: !0, className: m["rp-dialog-close"], children: /* @__PURE__ */ a(ce, {}) })
|
|
331
|
-
] })
|
|
332
|
-
] }) }) });
|
|
333
|
-
};
|
|
48
|
+
import "../../ui/DropDown.js";
|
|
49
|
+
import "./MenuItem.js";
|
|
50
|
+
import "./MenuSeparator.js";
|
|
51
|
+
import "./RotateTool.js";
|
|
52
|
+
import "./PropertyItem.js";
|
|
334
53
|
export {
|
|
335
|
-
|
|
54
|
+
$ as DocumentDialog
|
|
336
55
|
};
|
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const m = () => {
|
|
14
|
-
const { downloadIcon: t } = e(), { downloadIcon: o } = I();
|
|
15
|
-
return t || o || /* @__PURE__ */ n(f, {});
|
|
16
|
-
}, p = ({ children: t, className: o, localeMessages: r }) => /* @__PURE__ */ n(d, { className: o, content: r == null ? void 0 : r.downloadFileTooltip, children: t }), a = ({ download: t, localeMessages: o }) => /* @__PURE__ */ n(p, { localeMessages: o, children: /* @__PURE__ */ n(T, { onClick: t, "aria-label": o == null ? void 0 : o.downloadFileTooltip, children: /* @__PURE__ */ n(m, {}) }) }), b = ({ download: t, localeMessages: o }) => /* @__PURE__ */ n(C, { onClick: t, children: /* @__PURE__ */ u(p, { className: "rp-menu-item", localeMessages: o, children: [
|
|
17
|
-
/* @__PURE__ */ n("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ n(m, {}) }),
|
|
18
|
-
o == null ? void 0 : o.downloadFileLabel
|
|
19
|
-
] }) }), U = () => {
|
|
20
|
-
const { download: t } = D(), { downloadTool: o = !0 } = w(), { downloadTool: r = !0 } = h(), { isSmallScreen: c } = x(), { localeMessages: i } = F(), l = i == null ? void 0 : i.downloadFileTooltip;
|
|
21
|
-
return !o || !r ? null : c ? /* @__PURE__ */ n(b, { download: t, localeMessages: i }) : typeof o == "function" ? /* @__PURE__ */ n(d, { content: l, children: /* @__PURE__ */ n(o, { download: t }) }) : typeof r == "function" ? /* @__PURE__ */ n(d, { content: l, children: /* @__PURE__ */ n(r, { download: t }) }) : /* @__PURE__ */ n(a, { download: t, localeMessages: i });
|
|
22
|
-
};
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../../icons/FileDownloadDefaultIcon.js";
|
|
3
|
+
import "../../../contexts/ToolbarComponentContext.js";
|
|
4
|
+
import "../../../contexts/IconContext.js";
|
|
5
|
+
import "../../ui/Button.js";
|
|
6
|
+
import { O as w } from "../../../ToolbarLayout.module-201969d2.js";
|
|
7
|
+
import "./MenuItem.js";
|
|
8
|
+
import "../../../contexts/ViewportContext.js";
|
|
9
|
+
import "../../ui/RPTooltip.js";
|
|
10
|
+
import "../../../contexts/LocalizationContext.js";
|
|
11
|
+
import "../../../contexts/IconToolContext.js";
|
|
12
|
+
import "../../../contexts/ToolComponentContext.js";
|
|
23
13
|
export {
|
|
24
|
-
|
|
14
|
+
w as FileDownloadTool
|
|
25
15
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { I as o } from "../../../index-
|
|
3
|
-
import { c as a } from "../../../MenuItem.module-bc11d0d3.js";
|
|
2
|
+
import { I as o } from "../../../index-f4a9ae4d.js";
|
|
4
3
|
import { c } from "../../../clsx-0c6e471a.js";
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import '../../../assets/MenuItem.css';const n = {
|
|
5
|
+
"rp-menu-item": "_rp-menu-item_cu12j_1"
|
|
6
|
+
}, u = (e) => {
|
|
7
|
+
const { children: m, className: s, ...r } = e;
|
|
8
|
+
return /* @__PURE__ */ t(o, { ...r, tabIndex: 0, className: c(n["rp-menu-item"], s), children: m });
|
|
8
9
|
};
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
u as MenuItem
|
|
11
12
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { S as a } from "../../../index-
|
|
3
|
-
import
|
|
4
|
-
|
|
2
|
+
import { S as a } from "../../../index-f4a9ae4d.js";
|
|
3
|
+
import '../../../assets/MenuSeparator.css';const e = {
|
|
4
|
+
"rp-menu-separator": "_rp-menu-separator_17dlz_1"
|
|
5
|
+
}, p = () => /* @__PURE__ */ r(a, { className: e["rp-menu-separator"] });
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
p as MenuSeparator
|
|
7
8
|
};
|