@react-pdf-kit/viewer 2.0.0-beta.10 → 2.0.0-beta.12
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-54a77a7a.js → Combination-136ff99c.js} +184 -187
- package/dist/Paginate.module-4eef00aa.js +8 -0
- package/dist/RPLayout.module-b4b23e29.js +14 -0
- package/dist/RPSplitter-f6acf13b.js +71 -0
- package/dist/ToolbarLayout.module-6e339802.js +12 -0
- package/dist/assets/style.css +1 -1
- package/dist/assets/style.js +32 -30
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPDropFileZone.js +1 -1
- package/dist/components/RPPages.js +544 -497
- package/dist/components/RPProvider.js +32 -22
- package/dist/components/icons/DualPageWithCoverIcon.js +22 -0
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/LayoutWrapper.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +58 -36
- package/dist/components/layout/RPLayout.js +32 -28
- package/dist/components/layout/SkipLink.js +29 -0
- package/dist/components/layout/WrapperLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +32 -37
- package/dist/components/layout/sidebar/RPSplitter.js +6 -59
- package/dist/components/layout/sidebar/Thumbnail.js +57 -48
- package/dist/components/layout/sidebar/Thumbnails.js +9 -9
- package/dist/components/layout/toolbar/DarkModeTool.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +28 -28
- package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/FileDownloadTool.js +3 -3
- package/dist/components/layout/toolbar/FileUploadTool.js +3 -3
- package/dist/components/layout/toolbar/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/MenuItem.js +2 -2
- package/dist/components/layout/toolbar/MenuSeparator.js +2 -2
- package/dist/components/layout/toolbar/MostPageTool.js +3 -3
- package/dist/components/layout/toolbar/OtherTool.js +43 -34
- package/dist/components/layout/toolbar/Paginate.js +53 -46
- package/dist/components/layout/toolbar/PrintTool.js +3 -3
- package/dist/components/layout/toolbar/RPMenuItem.js +2 -2
- package/dist/components/layout/toolbar/RPMoreOptions.js +45 -44
- package/dist/components/layout/toolbar/RPToolbar.js +7 -6
- package/dist/components/layout/toolbar/RPToolbarEnd.js +6 -5
- package/dist/components/layout/toolbar/RotateTool.js +3 -3
- package/dist/components/layout/toolbar/ScrollModeTool.js +37 -37
- package/dist/components/layout/toolbar/SearchCloseButton.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +44 -24
- package/dist/components/layout/toolbar/SearchTool.js +138 -117
- package/dist/components/layout/toolbar/SelectionModeTool.js +3 -3
- package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/ToolbarCustom.js +43 -27
- package/dist/components/layout/toolbar/ToolbarDefault.js +42 -33
- package/dist/components/layout/toolbar/ToolbarLayout.js +9 -8
- package/dist/components/layout/toolbar/ViewModeTool.js +43 -34
- package/dist/components/layout/toolbar/ZoomTool.js +3 -3
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +2 -2
- package/dist/components/layout/toolbar/tools/DualPageTool.js +3 -3
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +202 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +6 -6
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +5 -5
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +197 -0
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +16 -15
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/InputPageTool.js +35 -28
- package/dist/components/layout/toolbar/tools/LastPageTool.js +197 -0
- package/dist/components/layout/toolbar/tools/NextPageTool.js +9 -8
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +15 -14
- package/dist/components/layout/toolbar/tools/PrintTool.js +4 -4
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +12 -5
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +9 -9
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +18 -10
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +10 -2
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +13 -12
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +15 -14
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +75 -41
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +12 -11
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +7 -6
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +11 -11
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +22 -15
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +20 -13
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +22 -14
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +35 -19
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +21 -14
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +33 -19
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +54 -36
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +39 -23
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +52 -29
- package/dist/components/page/AnnotationLayer.js +76 -69
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/CustomElement.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/DualPageWithCover.js +131 -0
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/Button.js +14 -12
- package/dist/components/ui/Checkbox.js +84 -77
- package/dist/components/ui/DropDown.js +2 -2
- package/dist/components/ui/Input.js +12 -11
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/PasswordModal.js +44 -30
- 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/HighlightContext.js +1 -1
- package/dist/contexts/LocalizationContext.js +1 -1
- package/dist/contexts/PagesRotateContext.js +1 -1
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/RPDocumentContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +1 -1
- package/dist/contexts/RotationContext.js +1 -1
- package/dist/contexts/ScrollModeContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/SelectionModeContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/contexts/ViewModeContext.js +19 -15
- package/dist/contexts/ZoomContext.js +1 -1
- package/dist/de_DE-a553b162.js +489 -0
- package/dist/{index-4baea9b5.js → index-61f59539.js} +1 -1
- package/dist/main.js +115 -99
- 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 +7 -1
- 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 +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLoadPdf.js +1 -1
- package/dist/utils/hooks/useLocalization.js +12 -11
- package/dist/utils/hooks/usePageRotateContext.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePinch.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +45 -45
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useRotate.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +76 -62
- package/dist/utils/hooks/useTextSelection.js +76 -0
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +60 -42
- package/dist/utils/types.js +14 -13
- package/dist/utils/withRef.js +5 -5
- package/package.json +5 -6
- package/dist/Paginate.module-206a7d7d.js +0 -8
- package/dist/RPLayout.module-967bf4bc.js +0 -13
- package/dist/ToolbarLayout.module-1fee0a18.js +0 -11
- package/dist/th_TH-d627cd51.js +0 -398
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { LoaderIcon as
|
|
5
|
-
import { u as
|
|
6
|
-
import { usePagesRotateContext as
|
|
7
|
-
import { useRenderQueue as
|
|
8
|
-
import { useDocumentContext as
|
|
1
|
+
import { jsxs as k, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as h, useState as N, useMemo as _, useCallback as S, useEffect as w } from "react";
|
|
3
|
+
import { c as I } from "../../../clsx-0c6e471a.js";
|
|
4
|
+
import { LoaderIcon as L } from "../../icons/LoaderIcon.js";
|
|
5
|
+
import { u as j } from "../../../PaginationContext-9217cab4.js";
|
|
6
|
+
import { usePagesRotateContext as q } from "../../../contexts/PagesRotateContext.js";
|
|
7
|
+
import { useRenderQueue as D } from "../../../contexts/RenderQueueProvider.js";
|
|
8
|
+
import { useDocumentContext as M } from "../../../contexts/RPDocumentContext.js";
|
|
9
9
|
import "../../../utils/types.js";
|
|
10
|
-
import "../../../
|
|
10
|
+
import "../../../de_DE-a553b162.js";
|
|
11
11
|
import "../../../contexts/ScrollModeContext.js";
|
|
12
12
|
import "../../../utils/appConsole.js";
|
|
13
13
|
import "../../../contexts/InitialStateContext.js";
|
|
@@ -43,42 +43,42 @@ const i = {
|
|
|
43
43
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
44
44
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
45
45
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
46
|
-
},
|
|
47
|
-
const { pageNumber: t, isFocused:
|
|
46
|
+
}, $t = ($) => {
|
|
47
|
+
const { pageNumber: t, isFocused: p, viewport: s } = $, { goToPage: d } = j(), { pageRotate: P } = q(), o = h(null), n = D(), { pages: a } = M(), [m, b] = N(null), c = h(!1), f = h(), R = _(() => p ? i["rp-thumbnail-active"] : "", [p]), u = _(() => ({
|
|
48
48
|
width: Math.round(s.width),
|
|
49
49
|
height: Math.round(s.height)
|
|
50
|
-
}), [s]),
|
|
51
|
-
t &&
|
|
52
|
-
}, [
|
|
53
|
-
return
|
|
54
|
-
const e =
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
-
const e =
|
|
58
|
-
if (!o.current || !t || !e ||
|
|
50
|
+
}), [s]), g = S(() => {
|
|
51
|
+
t && d(t);
|
|
52
|
+
}, [d, t]);
|
|
53
|
+
return w(() => {
|
|
54
|
+
const e = a.get(t);
|
|
55
|
+
f.current === e || (b(null), f.current = e);
|
|
56
|
+
}, [a, t]), w(() => {
|
|
57
|
+
const e = a.get(t);
|
|
58
|
+
if (!o.current || !t || !e || m)
|
|
59
59
|
return;
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
if (
|
|
63
|
-
|
|
60
|
+
const l = new IntersectionObserver((y) => {
|
|
61
|
+
y.forEach((C) => {
|
|
62
|
+
if (c.current) {
|
|
63
|
+
c.current = !1, n.removeQueue(`thumbnail-${t}`);
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
if (
|
|
67
|
-
const
|
|
68
|
-
|
|
66
|
+
if (C.isIntersecting) {
|
|
67
|
+
const v = document.createElement("canvas");
|
|
68
|
+
c.current = !0, n.enqueue(
|
|
69
69
|
`thumbnail-${t}`,
|
|
70
70
|
{
|
|
71
71
|
page: e.page,
|
|
72
|
-
canvasElem:
|
|
72
|
+
canvasElem: v,
|
|
73
73
|
options: {
|
|
74
74
|
scale: 1
|
|
75
75
|
},
|
|
76
76
|
onLoaded: () => {
|
|
77
|
-
|
|
78
|
-
if (!
|
|
77
|
+
v.toBlob((x) => {
|
|
78
|
+
if (!x)
|
|
79
79
|
return;
|
|
80
|
-
const
|
|
81
|
-
|
|
80
|
+
const E = URL.createObjectURL(x);
|
|
81
|
+
b(E);
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
},
|
|
@@ -87,50 +87,59 @@ const i = {
|
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
|
-
return o.current &&
|
|
91
|
-
|
|
90
|
+
return o.current && l.observe(o.current), () => {
|
|
91
|
+
l.disconnect(), n.removeQueue(`thumbnail-${t}`);
|
|
92
92
|
};
|
|
93
|
-
}, [n, t,
|
|
93
|
+
}, [n, t, a, m]), /* @__PURE__ */ k(
|
|
94
94
|
"div",
|
|
95
95
|
{
|
|
96
|
-
onClick:
|
|
96
|
+
onClick: g,
|
|
97
|
+
onKeyDown: (e) => {
|
|
98
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), g());
|
|
99
|
+
},
|
|
97
100
|
id: `page-${t}`,
|
|
98
101
|
className: i["rp-thumbnail-wrapper"],
|
|
99
102
|
ref: o,
|
|
103
|
+
role: "button",
|
|
104
|
+
tabIndex: 0,
|
|
105
|
+
"aria-label": `Go to page ${t}`,
|
|
106
|
+
"aria-current": p ? "page" : void 0,
|
|
100
107
|
children: [
|
|
101
108
|
/* @__PURE__ */ r(
|
|
102
109
|
"div",
|
|
103
110
|
{
|
|
104
111
|
style: {
|
|
105
|
-
transform: `rotate(${
|
|
112
|
+
transform: `rotate(${P[t || 0]}deg)`
|
|
106
113
|
},
|
|
107
|
-
className:
|
|
108
|
-
|
|
114
|
+
className: I(R, i["rp-thumbnail"]),
|
|
115
|
+
"aria-hidden": "true",
|
|
116
|
+
children: m ? /* @__PURE__ */ r(
|
|
109
117
|
"img",
|
|
110
118
|
{
|
|
111
|
-
src:
|
|
112
|
-
width:
|
|
113
|
-
height:
|
|
114
|
-
alt:
|
|
119
|
+
src: m,
|
|
120
|
+
width: u.width,
|
|
121
|
+
height: u.height,
|
|
122
|
+
alt: `Page ${t} thumbnail`,
|
|
123
|
+
"aria-hidden": "true"
|
|
115
124
|
}
|
|
116
125
|
) : /* @__PURE__ */ r(
|
|
117
126
|
"div",
|
|
118
127
|
{
|
|
119
128
|
className: i["rp-thumbnail-loader"],
|
|
120
129
|
style: {
|
|
121
|
-
width: `${
|
|
122
|
-
height: `${
|
|
130
|
+
width: `${u.width}px`,
|
|
131
|
+
height: `${u.height}px`
|
|
123
132
|
},
|
|
124
|
-
children: /* @__PURE__ */ r(
|
|
133
|
+
children: /* @__PURE__ */ r(L, { "aria-hidden": "true" })
|
|
125
134
|
}
|
|
126
135
|
)
|
|
127
136
|
}
|
|
128
137
|
),
|
|
129
|
-
/* @__PURE__ */ r("div", { className: i["rp-thumbnail-text"], children: t })
|
|
138
|
+
/* @__PURE__ */ r("div", { className: i["rp-thumbnail-text"], "aria-hidden": "true", children: t })
|
|
130
139
|
]
|
|
131
140
|
}
|
|
132
141
|
);
|
|
133
142
|
};
|
|
134
143
|
export {
|
|
135
|
-
|
|
144
|
+
$t as Thumbnail
|
|
136
145
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as b, useImperativeHandle as
|
|
3
|
-
import { Thumbnail as
|
|
2
|
+
import { useRef as b, useImperativeHandle as v, useMemo as N, useCallback as x, useEffect as R } from "react";
|
|
3
|
+
import { Thumbnail as k } from "./Thumbnail.js";
|
|
4
4
|
import { useThumbnailContext as y } from "../../../contexts/ThumbnailsContext.js";
|
|
5
5
|
import { useInfiniteScroll as C } from "../../../utils/hooks/useInfiniteScroll.js";
|
|
6
6
|
import { u as I } from "../../../PaginationContext-9217cab4.js";
|
|
@@ -12,7 +12,7 @@ import "../../../contexts/RPDocumentContext.js";
|
|
|
12
12
|
import "../../../utils/hooks/useLoadPdf.js";
|
|
13
13
|
import "pdfjs-dist";
|
|
14
14
|
import "../../../utils/types.js";
|
|
15
|
-
import "../../../
|
|
15
|
+
import "../../../de_DE-a553b162.js";
|
|
16
16
|
import "../../../utils/getThumbnailViewport.js";
|
|
17
17
|
import "../../../contexts/ConfigContext.js";
|
|
18
18
|
import "../../../contexts/DocumentPasswordContext.js";
|
|
@@ -43,24 +43,24 @@ import "../../../utils/getScrollDistance.js";
|
|
|
43
43
|
import "../../../utils/calculatePage.js";
|
|
44
44
|
import "../../../utils/hooks/useThumbnail.js";
|
|
45
45
|
const d = {
|
|
46
|
-
"rp-thumbnails-container": "_rp-thumbnails-
|
|
47
|
-
"rp-thumbnails": "_rp-
|
|
46
|
+
"rp-thumbnails-container": "_rp-thumbnails-container_70k68_1",
|
|
47
|
+
"rp-thumbnails": "_rp-thumbnails_70k68_1"
|
|
48
48
|
}, j = 16, D = (r, n) => {
|
|
49
49
|
const t = r == null ? void 0 : r.querySelector(`#page-${n}`);
|
|
50
50
|
r && (t != null && t.offsetTop) && (r.scrollTop = (t == null ? void 0 : t.offsetTop) - j);
|
|
51
51
|
}, Nt = S((r, n) => {
|
|
52
52
|
const { show: t, width: T } = r, { focusedPage: i, totalPages: a } = I(), { thumbnailPages: e, addPage: u, thumbnailLength: m, addToPage: c } = y(), p = b(null), l = b(1);
|
|
53
|
-
|
|
53
|
+
v(n, () => p.current);
|
|
54
54
|
const f = N(() => Object.values(e), [e]), P = x(() => {
|
|
55
55
|
const o = m + 1;
|
|
56
56
|
o <= a && u(o);
|
|
57
57
|
}, [u, a, m]);
|
|
58
58
|
return R(() => {
|
|
59
59
|
i > m && a > m ? c(i) : t && l.current !== i && (D(p.current, i), l.current = i);
|
|
60
|
-
}, [i, m, c, t, f]), C(p.current, P), /* @__PURE__ */ s("div", { ref: p, className: d["rp-thumbnails-container"], style: { width: T }, children: /* @__PURE__ */ s("div", { className: d["rp-thumbnails"], children: t ? f.map((o,
|
|
60
|
+
}, [i, m, c, t, f]), C(p.current, P), /* @__PURE__ */ s("div", { ref: p, className: d["rp-thumbnails-container"], style: { width: T }, children: /* @__PURE__ */ s("div", { className: d["rp-thumbnails"], children: t ? f.map((o, _) => {
|
|
61
61
|
var g, h;
|
|
62
62
|
return /* @__PURE__ */ s(
|
|
63
|
-
|
|
63
|
+
k,
|
|
64
64
|
{
|
|
65
65
|
isFocused: i === ((g = o.page) == null ? void 0 : g.pageNumber),
|
|
66
66
|
pageNumber: (h = o.page) == null ? void 0 : h.pageNumber,
|
|
@@ -68,7 +68,7 @@ const d = {
|
|
|
68
68
|
viewport: o.viewport,
|
|
69
69
|
defaultRotation: o.defaultRotation
|
|
70
70
|
},
|
|
71
|
-
|
|
71
|
+
_
|
|
72
72
|
);
|
|
73
73
|
}) : null }) });
|
|
74
74
|
});
|
|
@@ -20,7 +20,7 @@ import "../../../index-e3ee9457.js";
|
|
|
20
20
|
import "../../../floating-ui.react-dom-5ec29bd6.js";
|
|
21
21
|
import "../../../index-655864a7.js";
|
|
22
22
|
import "../../../utils/hooks/useLocalization.js";
|
|
23
|
-
import "../../../
|
|
23
|
+
import "../../../de_DE-a553b162.js";
|
|
24
24
|
const M = () => {
|
|
25
25
|
const { lightModeIcon: t } = p(), { lightModeIcon: r } = l();
|
|
26
26
|
return t || r || /* @__PURE__ */ o(f, {});
|
|
@@ -3,19 +3,19 @@ import * as c from "react";
|
|
|
3
3
|
import { useMemo as J } from "react";
|
|
4
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
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-
|
|
6
|
+
import { R as oe, h as re, u as ne, F as ie, P as ae } from "../../../Combination-136ff99c.js";
|
|
7
7
|
import { useLayoutContainer as le } from "../../../contexts/LayoutContainerContext.js";
|
|
8
8
|
import { CloseIcon as ce } from "../../icons/CloseIcon.js";
|
|
9
9
|
import { dateFormatter as A } from "../../../utils/dateFormatter.js";
|
|
10
10
|
import { useDocumentContext as se } from "../../../contexts/RPDocumentContext.js";
|
|
11
11
|
import { PropertyItem as ue } from "./PropertyItem.js";
|
|
12
|
-
import { useOtherToolContext as
|
|
13
|
-
import { useLocalizationContext as
|
|
12
|
+
import { useOtherToolContext as de } from "../../../contexts/OtherToolContext.js";
|
|
13
|
+
import { useLocalizationContext as pe } from "../../../contexts/LocalizationContext.js";
|
|
14
14
|
import "react-dom";
|
|
15
15
|
import "../../../utils/hooks/useLoadPdf.js";
|
|
16
16
|
import "pdfjs-dist";
|
|
17
17
|
import "../../../utils/types.js";
|
|
18
|
-
import "../../../
|
|
18
|
+
import "../../../de_DE-a553b162.js";
|
|
19
19
|
import "../../../utils/getThumbnailViewport.js";
|
|
20
20
|
import "../../../contexts/ConfigContext.js";
|
|
21
21
|
import "../../../contexts/DocumentPasswordContext.js";
|
|
@@ -32,7 +32,7 @@ var h = "Dialog", [T, tt] = Q(h), [fe, u] = T(h), L = (t) => {
|
|
|
32
32
|
defaultOpen: e,
|
|
33
33
|
onOpenChange: o,
|
|
34
34
|
modal: l = !0
|
|
35
|
-
} = t, s = c.useRef(null),
|
|
35
|
+
} = t, s = c.useRef(null), d = c.useRef(null), [p, g] = M({
|
|
36
36
|
prop: i,
|
|
37
37
|
defaultProp: e ?? !1,
|
|
38
38
|
onChange: o,
|
|
@@ -43,11 +43,11 @@ var h = "Dialog", [T, tt] = Q(h), [fe, u] = T(h), L = (t) => {
|
|
|
43
43
|
{
|
|
44
44
|
scope: r,
|
|
45
45
|
triggerRef: s,
|
|
46
|
-
contentRef:
|
|
46
|
+
contentRef: d,
|
|
47
47
|
contentId: R(),
|
|
48
48
|
titleId: R(),
|
|
49
49
|
descriptionId: R(),
|
|
50
|
-
open:
|
|
50
|
+
open: p,
|
|
51
51
|
onOpenChange: g,
|
|
52
52
|
onOpenToggle: c.useCallback(() => g((_) => !_), [g]),
|
|
53
53
|
modal: l,
|
|
@@ -157,17 +157,17 @@ var _e = c.forwardRef(
|
|
|
157
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
158
|
},
|
|
159
159
|
onInteractOutside: (o) => {
|
|
160
|
-
var
|
|
161
|
-
(
|
|
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
162
|
const l = o.target;
|
|
163
|
-
((
|
|
163
|
+
((p = n.triggerRef.current) == null ? void 0 : p.contains(l)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && e.current && o.preventDefault();
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
);
|
|
167
167
|
}
|
|
168
168
|
), q = c.forwardRef(
|
|
169
169
|
(t, r) => {
|
|
170
|
-
const { __scopeDialog: n, trapFocus: i, onOpenAutoFocus: e, onCloseAutoFocus: o, ...l } = t, s = u(m, n),
|
|
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
171
|
return ne(), /* @__PURE__ */ C(x, { children: [
|
|
172
172
|
/* @__PURE__ */ a(
|
|
173
173
|
ie,
|
|
@@ -186,7 +186,7 @@ var _e = c.forwardRef(
|
|
|
186
186
|
"aria-labelledby": s.titleId,
|
|
187
187
|
"data-state": E(s.open),
|
|
188
188
|
...l,
|
|
189
|
-
ref:
|
|
189
|
+
ref: p,
|
|
190
190
|
onDismiss: () => s.onOpenChange(!1)
|
|
191
191
|
}
|
|
192
192
|
)
|
|
@@ -194,7 +194,7 @@ var _e = c.forwardRef(
|
|
|
194
194
|
),
|
|
195
195
|
/* @__PURE__ */ C(x, { children: [
|
|
196
196
|
/* @__PURE__ */ a(he, { titleId: s.titleId }),
|
|
197
|
-
/* @__PURE__ */ a(Pe, { contentRef:
|
|
197
|
+
/* @__PURE__ */ a(Pe, { contentRef: d, descriptionId: s.descriptionId })
|
|
198
198
|
] })
|
|
199
199
|
] });
|
|
200
200
|
}
|
|
@@ -212,7 +212,7 @@ var $ = "DialogDescription", be = c.forwardRef(
|
|
|
212
212
|
}
|
|
213
213
|
);
|
|
214
214
|
be.displayName = $;
|
|
215
|
-
var j = "DialogClose",
|
|
215
|
+
var j = "DialogClose", z = c.forwardRef(
|
|
216
216
|
(t, r) => {
|
|
217
217
|
const { __scopeDialog: n, ...i } = t, e = u(j, n);
|
|
218
218
|
return /* @__PURE__ */ a(
|
|
@@ -226,16 +226,16 @@ var j = "DialogClose", V = c.forwardRef(
|
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
|
-
|
|
229
|
+
z.displayName = j;
|
|
230
230
|
function E(t) {
|
|
231
231
|
return t ? "open" : "closed";
|
|
232
232
|
}
|
|
233
|
-
var
|
|
233
|
+
var B = "DialogTitleWarning", [ot, V] = X(B, {
|
|
234
234
|
contentName: m,
|
|
235
235
|
titleName: O,
|
|
236
236
|
docsSlug: "dialog"
|
|
237
237
|
}), he = ({ titleId: t }) => {
|
|
238
|
-
const r = B
|
|
238
|
+
const r = V(B), n = `\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
239
239
|
|
|
240
240
|
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
241
241
|
|
|
@@ -244,13 +244,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/${r.do
|
|
|
244
244
|
t && (document.getElementById(t) || console.error(n));
|
|
245
245
|
}, [n, t]), null;
|
|
246
246
|
}, Re = "DialogDescriptionWarning", Pe = ({ contentRef: t, descriptionId: r }) => {
|
|
247
|
-
const i = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
247
|
+
const i = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${V(Re).contentName}}.`;
|
|
248
248
|
return c.useEffect(() => {
|
|
249
249
|
var o;
|
|
250
250
|
const e = (o = t.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
251
251
|
r && e && (document.getElementById(r) || console.warn(i));
|
|
252
252
|
}, [i, t, r]), null;
|
|
253
|
-
}, ye = L, Ne = S, Oe = W, Ee = k, Ie = G, xe =
|
|
253
|
+
}, ye = L, Ne = S, Oe = W, Ee = k, Ie = G, xe = z;
|
|
254
254
|
const f = {
|
|
255
255
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
256
256
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -260,14 +260,14 @@ const f = {
|
|
|
260
260
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
261
261
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
262
262
|
}, rt = () => {
|
|
263
|
-
const { pdfProperties: t } = se(), { container: r } = le(), { activeDocumentProperties: n, setActiveDocumentProperties: i } =
|
|
263
|
+
const { pdfProperties: t } = se(), { container: r } = le(), { activeDocumentProperties: n, setActiveDocumentProperties: i } = de(), { localeMessages: e } = pe(), o = J(() => {
|
|
264
264
|
if (!t)
|
|
265
265
|
return [];
|
|
266
266
|
const {
|
|
267
267
|
fileSize: l,
|
|
268
268
|
filename: s,
|
|
269
|
-
title:
|
|
270
|
-
author:
|
|
269
|
+
title: d,
|
|
270
|
+
author: p,
|
|
271
271
|
subject: g,
|
|
272
272
|
createdOn: _,
|
|
273
273
|
creator: H,
|
|
@@ -281,8 +281,8 @@ const f = {
|
|
|
281
281
|
{ label: e == null ? void 0 : e.propertiesFilenameLabel, value: s },
|
|
282
282
|
{ label: e == null ? void 0 : e.propertiesFileSizeLabel, value: l },
|
|
283
283
|
{ separate: !0 },
|
|
284
|
-
{ label: e == null ? void 0 : e.propertiesTitleLabel, value:
|
|
285
|
-
{ label: e == null ? void 0 : e.propertiesAuthorLabel, value:
|
|
284
|
+
{ label: e == null ? void 0 : e.propertiesTitleLabel, value: d },
|
|
285
|
+
{ label: e == null ? void 0 : e.propertiesAuthorLabel, value: p },
|
|
286
286
|
{ label: e == null ? void 0 : e.propertiesSubjectLabel, value: g },
|
|
287
287
|
{ label: e == null ? void 0 : e.propertiesKeywordLabel, value: K },
|
|
288
288
|
{ label: e == null ? void 0 : e.propertiesCreatorLabel, value: H },
|
|
@@ -302,10 +302,10 @@ const f = {
|
|
|
302
302
|
}, [t, e]);
|
|
303
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
304
|
/* @__PURE__ */ a(Oe, { className: f["rp-dialog-overlay"] }),
|
|
305
|
-
/* @__PURE__ */ C(Ee, { className: f["rp-document-dialog"], children: [
|
|
306
|
-
/* @__PURE__ */ a(Ie, { className: f["rp-dialog-title"], children: e == null ? void 0 : e.documentPropertiesLabel }),
|
|
307
|
-
/* @__PURE__ */ a("div", { className: f["rp-document-properties"], children: o.map((l, s) => /* @__PURE__ */ a("div", { children: l.separate ? /* @__PURE__ */ a("div", { className: f["rp-properties-divider"] }) : /* @__PURE__ */ a(ue, { label: l.label, value: l.value }) }, s)) }),
|
|
308
|
-
/* @__PURE__ */ a(xe, { asChild: !0, className: f["rp-dialog-close"], children: /* @__PURE__ */ a(ce, {}) })
|
|
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
309
|
] })
|
|
310
310
|
] }) }) });
|
|
311
311
|
};
|
|
@@ -9,19 +9,19 @@ 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
14
|
import "../../../index-c0faa594.js";
|
|
15
15
|
import "react-dom";
|
|
16
16
|
import "../../../index-e3ee9457.js";
|
|
17
|
-
import "../../../Combination-
|
|
17
|
+
import "../../../Combination-136ff99c.js";
|
|
18
18
|
import "../../../floating-ui.react-dom-5ec29bd6.js";
|
|
19
19
|
import "../../../index-655864a7.js";
|
|
20
20
|
import "../../../clsx-0c6e471a.js";
|
|
21
21
|
import "../../../utils/withRef.js";
|
|
22
22
|
import "../../../utils/appConsole.js";
|
|
23
23
|
import "../../../utils/hooks/useLocalization.js";
|
|
24
|
-
import "../../../
|
|
24
|
+
import "../../../de_DE-a553b162.js";
|
|
25
25
|
const a = () => {
|
|
26
26
|
const { documentPropertiesIcon: r } = f(), { documentPropertiesIcon: e } = C();
|
|
27
27
|
return r || e || /* @__PURE__ */ t(s, {});
|
|
@@ -17,7 +17,7 @@ import "../../../contexts/RPDocumentContext.js";
|
|
|
17
17
|
import "../../../utils/hooks/useLoadPdf.js";
|
|
18
18
|
import "pdfjs-dist";
|
|
19
19
|
import "../../../utils/types.js";
|
|
20
|
-
import "../../../
|
|
20
|
+
import "../../../de_DE-a553b162.js";
|
|
21
21
|
import "../../../utils/getThumbnailViewport.js";
|
|
22
22
|
import "../../../contexts/ConfigContext.js";
|
|
23
23
|
import "../../../contexts/DocumentPasswordContext.js";
|
|
@@ -26,11 +26,11 @@ import "../../../utils/hooks/usePdfProperties.js";
|
|
|
26
26
|
import "../../../utils/convertPdfDate.js";
|
|
27
27
|
import "../../../utils/formatFileSize.js";
|
|
28
28
|
import "../../../contexts/DownloadContext.js";
|
|
29
|
-
import "../../../index-
|
|
29
|
+
import "../../../index-61f59539.js";
|
|
30
30
|
import "../../../index-c0faa594.js";
|
|
31
31
|
import "react-dom";
|
|
32
32
|
import "../../../index-e3ee9457.js";
|
|
33
|
-
import "../../../Combination-
|
|
33
|
+
import "../../../Combination-136ff99c.js";
|
|
34
34
|
import "../../../floating-ui.react-dom-5ec29bd6.js";
|
|
35
35
|
import "../../../index-655864a7.js";
|
|
36
36
|
import "../../../contexts/LayoutContainerContext.js";
|
|
@@ -13,11 +13,11 @@ import { useToolComponentContext as U } from "../../../contexts/ToolComponentCon
|
|
|
13
13
|
import "react";
|
|
14
14
|
import "../../../clsx-0c6e471a.js";
|
|
15
15
|
import "../../../utils/withRef.js";
|
|
16
|
-
import "../../../index-
|
|
16
|
+
import "../../../index-61f59539.js";
|
|
17
17
|
import "../../../index-c0faa594.js";
|
|
18
18
|
import "react-dom";
|
|
19
19
|
import "../../../index-e3ee9457.js";
|
|
20
|
-
import "../../../Combination-
|
|
20
|
+
import "../../../Combination-136ff99c.js";
|
|
21
21
|
import "../../../floating-ui.react-dom-5ec29bd6.js";
|
|
22
22
|
import "../../../index-655864a7.js";
|
|
23
23
|
import "../../../contexts/LayoutContainerContext.js";
|
|
@@ -25,7 +25,7 @@ import "../../../contexts/RPDocumentContext.js";
|
|
|
25
25
|
import "../../../utils/hooks/useLoadPdf.js";
|
|
26
26
|
import "pdfjs-dist";
|
|
27
27
|
import "../../../utils/types.js";
|
|
28
|
-
import "../../../
|
|
28
|
+
import "../../../de_DE-a553b162.js";
|
|
29
29
|
import "../../../utils/getThumbnailViewport.js";
|
|
30
30
|
import "../../../contexts/ConfigContext.js";
|
|
31
31
|
import "../../../contexts/DocumentPasswordContext.js";
|
|
@@ -15,16 +15,16 @@ import "../../../utils/hooks/useFullScreen.js";
|
|
|
15
15
|
import "../../../clsx-0c6e471a.js";
|
|
16
16
|
import "../../../utils/withRef.js";
|
|
17
17
|
import "../../../contexts/LayoutContainerContext.js";
|
|
18
|
-
import "../../../index-
|
|
18
|
+
import "../../../index-61f59539.js";
|
|
19
19
|
import "../../../index-c0faa594.js";
|
|
20
20
|
import "react-dom";
|
|
21
21
|
import "../../../index-e3ee9457.js";
|
|
22
|
-
import "../../../Combination-
|
|
22
|
+
import "../../../Combination-136ff99c.js";
|
|
23
23
|
import "../../../floating-ui.react-dom-5ec29bd6.js";
|
|
24
24
|
import "../../../index-655864a7.js";
|
|
25
25
|
import "../../../utils/appConsole.js";
|
|
26
26
|
import "../../../utils/hooks/useLocalization.js";
|
|
27
|
-
import "../../../
|
|
27
|
+
import "../../../de_DE-a553b162.js";
|
|
28
28
|
const j = () => {
|
|
29
29
|
const { fullScreenIcon: r } = C(), { fullScreenIcon: n } = s();
|
|
30
30
|
return r || n || /* @__PURE__ */ t(u, {});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { I as s } from "../../../index-
|
|
2
|
+
import { I as s } from "../../../index-61f59539.js";
|
|
3
3
|
import { c as p } from "../../../clsx-0c6e471a.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../../index-c0faa594.js";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
import "../../../index-e3ee9457.js";
|
|
8
|
-
import "../../../Combination-
|
|
8
|
+
import "../../../Combination-136ff99c.js";
|
|
9
9
|
import "../../../floating-ui.react-dom-5ec29bd6.js";
|
|
10
10
|
import "../../../index-655864a7.js";
|
|
11
11
|
const i = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { S as o } from "../../../index-
|
|
2
|
+
import { S as o } from "../../../index-61f59539.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../../index-c0faa594.js";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
import "../../../index-e3ee9457.js";
|
|
7
|
-
import "../../../Combination-
|
|
7
|
+
import "../../../Combination-136ff99c.js";
|
|
8
8
|
import "../../../floating-ui.react-dom-5ec29bd6.js";
|
|
9
9
|
import "../../../index-655864a7.js";
|
|
10
10
|
const p = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { G as C } from "../../../index-
|
|
2
|
+
import { G as C } from "../../../index-61f59539.js";
|
|
3
3
|
import { MenuItem as p } from "./MenuItem.js";
|
|
4
4
|
import { u as x } from "../../../PaginationContext-9217cab4.js";
|
|
5
5
|
import { useMemo as e, useCallback as a } from "react";
|
|
@@ -15,12 +15,12 @@ import { useToolComponentContext as F } from "../../../contexts/ToolComponentCon
|
|
|
15
15
|
import "../../../index-c0faa594.js";
|
|
16
16
|
import "react-dom";
|
|
17
17
|
import "../../../index-e3ee9457.js";
|
|
18
|
-
import "../../../Combination-
|
|
18
|
+
import "../../../Combination-136ff99c.js";
|
|
19
19
|
import "../../../floating-ui.react-dom-5ec29bd6.js";
|
|
20
20
|
import "../../../index-655864a7.js";
|
|
21
21
|
import "../../../clsx-0c6e471a.js";
|
|
22
22
|
import "../../../utils/types.js";
|
|
23
|
-
import "../../../
|
|
23
|
+
import "../../../de_DE-a553b162.js";
|
|
24
24
|
import "../../../contexts/ScrollModeContext.js";
|
|
25
25
|
import "../../../utils/appConsole.js";
|
|
26
26
|
import "../../../contexts/InitialStateContext.js";
|