@react-pdf-kit/viewer 2.8.0-beta.1 → 2.8.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -30
- package/dist/{AnnotationLayer-C6UTOVmc.js → AnnotationLayer-CyOYh0Tw.js} +2 -2
- package/dist/CanvasLayer-CJqCJ30J.js +111 -0
- package/dist/{LoadingIndicator-Bzzf28Xv.js → LoadingIndicator-0E8WHnSN.js} +7 -7
- package/dist/MenuItem-lItnKNd5.js +31 -0
- package/dist/Paginate.module-DhE7N8AA.js +9 -0
- package/dist/PaginationContext-DIzsZhFd.js +194 -0
- package/dist/{PasswordModal-BeLyLUsu.js → PasswordModal-CxHFn0pB.js} +12 -12
- package/dist/RPLayout.module-BH5r8dDc.js +14 -0
- package/dist/RPPages-U8QNLlIa.js +686 -0
- package/dist/{RPTooltip-CXBVXusS.js → RPTooltip-QWwWh4HW.js} +123 -91
- package/dist/SearchTool.module-DY8Ucfb_.js +17 -0
- package/dist/{SkipLink-CdcjClGB.js → SkipLink-Dj83gZdk.js} +3 -3
- package/dist/{TextLayer-DWGFN9SF.js → TextLayer-D-V9kogG.js} +5 -5
- package/dist/{Thumbnail-BO3QHzxR.js → Thumbnail-BXMk0OWF.js} +6 -6
- package/dist/{Thumbnails-DyeBsQJT.js → Thumbnails-BIuN8LZ8.js} +2 -2
- package/dist/assets/AnnotationLayer.css +1 -1
- package/dist/assets/CanvasLayer.css +1 -0
- package/dist/assets/LoadingIndicator.css +1 -1
- package/dist/assets/MenuItem.css +1 -1
- package/dist/assets/Paginate.css +1 -1
- package/dist/assets/PasswordModal.css +1 -1
- package/dist/assets/RPLayout.css +1 -1
- package/dist/assets/RPPages.css +1 -1
- package/dist/assets/SearchTool.css +1 -1
- package/dist/assets/SkipLink.css +1 -1
- package/dist/assets/TextLayer.css +1 -1
- package/dist/assets/Thumbnail.css +1 -1
- package/dist/assets/style.js +1 -1
- package/dist/components/RPController.js +39 -39
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/LayoutContainer.js +6 -6
- package/dist/components/layout/LayoutWrapper.js +5 -5
- package/dist/components/layout/RPDefaultLayout.js +56 -55
- package/dist/components/layout/RPLayout.js +39 -38
- package/dist/components/layout/SkipLink.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +2 -2
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DarkModeTool.js +1 -1
- package/dist/components/layout/toolbar/DocumentProperties.js +6 -6
- package/dist/components/layout/toolbar/FileDownloadTool.js +6 -6
- package/dist/components/layout/toolbar/FileUploadTool.js +6 -6
- package/dist/components/layout/toolbar/FullScreenTool.js +9 -8
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +23 -29
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- package/dist/components/layout/toolbar/Paginate.js +18 -3
- package/dist/components/layout/toolbar/PrintTool.js +6 -6
- package/dist/components/layout/toolbar/RPMenuItem.js +2 -2
- package/dist/components/layout/toolbar/RPMoreOptions.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RotateTool.js +10 -10
- package/dist/components/layout/toolbar/ScrollModeTool.js +17 -17
- package/dist/components/layout/toolbar/SearchCloseButton.js +2 -2
- package/dist/components/layout/toolbar/SearchResultNavigator.js +2 -2
- package/dist/components/layout/toolbar/SearchTool.js +133 -121
- package/dist/components/layout/toolbar/SelectionModeTool.js +10 -10
- package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/ToolbarCustom.js +2 -2
- package/dist/components/layout/toolbar/ToolbarDefault.js +2 -2
- package/dist/components/layout/toolbar/ViewModeTool.js +16 -16
- package/dist/components/layout/toolbar/ZoomTool.js +82 -80
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +1 -1
- package/dist/components/layout/toolbar/tools/DualPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +1 -1
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +1 -1
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +3 -3
- package/dist/components/layout/toolbar/tools/InputPageTool.js +36 -25
- package/dist/components/layout/toolbar/tools/LastPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/NextPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +1 -1
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +1 -1
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +1 -1
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +25 -23
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +25 -23
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +7 -7
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +2 -2
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +2 -48
- package/dist/components/page/DualPage.js +2 -2
- package/dist/components/page/DualPageWithCover.js +2 -2
- package/dist/components/page/RPPage.js +94 -2
- package/dist/components/page/SinglePage.js +2 -2
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/PasswordModal.js +1 -1
- package/dist/components/ui/RPTooltip.js +1 -1
- package/dist/contexts/DimensionPagesContext.js +38 -22
- package/dist/contexts/ElementPageContext.js +46 -39
- package/dist/contexts/ElementThumbnailContext.js +1 -1
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +26 -18
- package/dist/contexts/RenderedPagesCache.js +32 -13
- package/dist/contexts/VirtualScrollContext.js +10 -13
- package/dist/contexts/ZoomContext.js +119 -61
- package/dist/{de_DE--0LF-SJR.js → de_DE-x4Z-jQrz.js} +54 -6
- package/dist/{main-0RC2E65p.js → main-DCzVrq0G.js} +2 -2
- package/dist/main.js +4 -4
- package/dist/style-CJtyyrJx.js +5 -0
- package/dist/types/components/page/CanvasLayer.d.ts +4 -1
- package/dist/types/components/ui/RPTooltip.d.ts +3 -2
- package/dist/types/contexts/RenderQueueProvider.d.ts +2 -0
- package/dist/types/contexts/RenderedPagesCache.d.ts +3 -0
- package/dist/types/contexts/VirtualScrollContext.d.ts +0 -3
- package/dist/types/locales/de_DE.json.d.ts +11 -2
- package/dist/types/locales/en_US.json.d.ts +11 -2
- package/dist/types/locales/it_IT.json.d.ts +11 -2
- package/dist/types/locales/pt_PT.json.d.ts +11 -2
- package/dist/types/locales/th_TH.json.d.ts +11 -2
- package/dist/types/locales/zh_CN.json.d.ts +11 -2
- package/dist/types/utils/Queue.d.ts +1 -0
- package/dist/types/utils/const.d.ts +3 -0
- package/dist/types/utils/constants.d.ts +9 -0
- package/dist/types/utils/documentLayout.d.ts +60 -0
- package/dist/types/utils/hooks/usePinch.d.ts +14 -1
- package/dist/types/utils/hooks/usePresentPage.d.ts +2 -2
- package/dist/types/utils/hooks/useZoomOrigin.d.ts +4 -0
- package/dist/types/utils/types.d.ts +24 -2
- package/dist/types/utils/zoom.d.ts +2 -0
- package/dist/utils/Queue.js +5 -0
- package/dist/utils/const.js +2 -2
- package/dist/utils/constants.js +2 -2
- package/dist/utils/documentLayout.js +141 -0
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLoadPdf.js +73 -63
- package/dist/utils/hooks/useLocalization.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePinch.js +109 -56
- package/dist/utils/hooks/usePresentPage.js +33 -57
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +66 -67
- package/dist/utils/hooks/useZoomOrigin.js +37 -0
- package/dist/utils/renderPage.js +21 -14
- package/dist/utils/types.js +3 -3
- package/dist/utils/zoom.js +8 -2
- package/package.json +1 -1
- package/dist/MenuItem-9kCH_GQ0.js +0 -15
- package/dist/Paginate.module-B0GMw-MB.js +0 -8
- package/dist/PaginationContext-C5CJiEW-.js +0 -242
- package/dist/RPLayout.module-Vc3h4xxS.js +0 -14
- package/dist/RPPage-BsDixmqF.js +0 -91
- package/dist/RPPages-Cf-FDd0a.js +0 -1007
- package/dist/SearchTool.module-DUkVXfOn.js +0 -16
- package/dist/assets/RPPage.css +0 -1
- package/dist/contexts/VirtualGridContext.js +0 -18
- package/dist/style-BPQRJJJ7.js +0 -5
- package/dist/types/contexts/VirtualGridContext.d.ts +0 -9
- package/dist/types/utils/calculatePage.d.ts +0 -12
- package/dist/types/utils/hooks/useVirtualReactWindow.d.ts +0 -17
- package/dist/utils/calculatePage.js +0 -30
- package/dist/utils/hooks/useVirtualReactWindow.js +0 -86
- /package/dist/{TextHighlightLayer-BSVgBxR3.js → TextHighlightLayer-3vIZbRyL.js} +0 -0
|
@@ -4,85 +4,91 @@ import { useLocalizationContext as n } from "../../../contexts/LocalizationConte
|
|
|
4
4
|
import { useToolbarComponentContext as r } from "../../../contexts/ToolbarComponentContext.js";
|
|
5
5
|
import { useToolComponentContext as i } from "../../../contexts/ToolComponentContext.js";
|
|
6
6
|
import { useSearchContext as ee } from "../../../contexts/SearchContext.js";
|
|
7
|
-
import { t as
|
|
8
|
-
import { useIconToolContext as
|
|
9
|
-
import { t as
|
|
7
|
+
import { t as a } from "../../../LoaderIcon-B3ddfd0D.js";
|
|
8
|
+
import { useIconToolContext as o } from "../../../contexts/IconToolContext.js";
|
|
9
|
+
import { t as te } from "../../../Button-DBu3SaMk.js";
|
|
10
10
|
import { t as s } from "../../../Input-Dpo1Xfxe.js";
|
|
11
11
|
import { useIconContext as c } from "../../../contexts/IconContext.js";
|
|
12
|
-
import { useViewportContext as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { InfoIcon as
|
|
16
|
-
import { SearchIcon as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { ClearIcon as
|
|
20
|
-
import { SearchResultNavigator as
|
|
21
|
-
import { SearchCloseButton as
|
|
22
|
-
import { useCallback as
|
|
23
|
-
import { Fragment as
|
|
12
|
+
import { useViewportContext as l } from "../../../contexts/ViewportContext.js";
|
|
13
|
+
import { t as u } from "../../../RPTooltip-QWwWh4HW.js";
|
|
14
|
+
import { t as ne } from "../../../DropDown-CM6xEwZC.js";
|
|
15
|
+
import { InfoIcon as d } from "../../icons/InfoIcon.js";
|
|
16
|
+
import { SearchIcon as f } from "../../icons/SearchIcon.js";
|
|
17
|
+
import { t as p } from "../../../SearchTool.module-DY8Ucfb_.js";
|
|
18
|
+
import { t as m } from "../../../Checkbox-CSIEUyO8.js";
|
|
19
|
+
import { ClearIcon as h } from "../../icons/ClearIcon.js";
|
|
20
|
+
import { SearchResultNavigator as g } from "./SearchResultNavigator.js";
|
|
21
|
+
import { SearchCloseButton as _ } from "./SearchCloseButton.js";
|
|
22
|
+
import { useCallback as v, useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
|
|
23
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
24
24
|
//#region lib/components/layout/toolbar/SearchTool.tsx
|
|
25
|
-
var
|
|
26
|
-
let { searchIcon: e } = c(), { searchIcon: t } =
|
|
27
|
-
return e ?? t ?? /* @__PURE__ */
|
|
28
|
-
},
|
|
29
|
-
let { searchClearIcon: e } = c(), { searchClearIcon: t } =
|
|
30
|
-
return e ?? t ?? /* @__PURE__ */
|
|
31
|
-
},
|
|
32
|
-
let { container: c } = t(), [
|
|
33
|
-
|
|
34
|
-
let { pdf:
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
var E = () => {
|
|
26
|
+
let { searchIcon: e } = c(), { searchIcon: t } = o();
|
|
27
|
+
return e ?? t ?? /* @__PURE__ */ w(f, {});
|
|
28
|
+
}, re = () => {
|
|
29
|
+
let { searchClearIcon: e } = c(), { searchClearIcon: t } = o();
|
|
30
|
+
return e ?? t ?? /* @__PURE__ */ w(h, {});
|
|
31
|
+
}, D = ({ icon: o }) => {
|
|
32
|
+
let { container: c } = t(), [h, D] = S(!1), O = x(null), k = x(h);
|
|
33
|
+
k.current = h;
|
|
34
|
+
let { pdf: A } = e(), [j, M] = S(null), { searchOptions: N, setSearchOptions: P, loading: F, setSearch: I, totalMatches: L, currentMatchPosition: R, nextMatch: z, prevMatch: B, search: V } = ee(), { searchTool: ie = !0 } = r(), { searchTool: ae = !0 } = i(), [H, U] = S(V), { localeMessages: W } = n(), { isSmallScreen: G } = l(), [K, q] = S(null), [oe, se] = S(!1), ce = v(() => {
|
|
35
|
+
k.current && (I(""), U("")), D((e) => !e);
|
|
36
|
+
}, [I]), J = v(() => {
|
|
37
|
+
I(""), U(""), D(!1), requestAnimationFrame(() => {
|
|
38
|
+
O.current?.focus();
|
|
39
39
|
});
|
|
40
|
-
}, [
|
|
40
|
+
}, [I]), Y = (e) => {
|
|
41
41
|
let t = e.key === "Enter", n = e.key === " ";
|
|
42
42
|
(t || n) && J();
|
|
43
|
-
}, X =
|
|
44
|
-
e.key === "Escape" &&
|
|
45
|
-
}, [
|
|
46
|
-
e.shiftKey && e.key === "Enter" ?
|
|
43
|
+
}, X = v((e) => {
|
|
44
|
+
e.key === "Escape" && h && J();
|
|
45
|
+
}, [h]), le = v((e) => {
|
|
46
|
+
e.shiftKey && e.key === "Enter" ? B() : e.key === "Enter" && V !== H ? I(H) : e.key === "Enter" && z();
|
|
47
47
|
}, [
|
|
48
48
|
H,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
B,
|
|
50
|
+
z,
|
|
51
|
+
I,
|
|
52
|
+
V
|
|
53
53
|
]);
|
|
54
|
-
|
|
55
|
-
U(
|
|
56
|
-
}, [
|
|
57
|
-
|
|
58
|
-
}, [
|
|
59
|
-
|
|
60
|
-
}, []),
|
|
54
|
+
y(() => {
|
|
55
|
+
U(V);
|
|
56
|
+
}, [V]), y(() => {
|
|
57
|
+
V && A && se(!0);
|
|
58
|
+
}, [V, A]), y(() => {
|
|
59
|
+
V && V.trim() !== "" && (U(V), I(V));
|
|
60
|
+
}, []), y(() => (window.addEventListener("keydown", X), () => {
|
|
61
61
|
window.removeEventListener("keydown", X);
|
|
62
|
-
}), [X]),
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
}), [X]), y(() => {
|
|
63
|
+
j && setTimeout(() => {
|
|
64
|
+
j.focus();
|
|
65
65
|
}, 0);
|
|
66
|
-
}, [
|
|
67
|
-
let
|
|
66
|
+
}, [j]);
|
|
67
|
+
let ue = v((e) => {
|
|
68
68
|
U(e.target.value);
|
|
69
|
-
}, []),
|
|
70
|
-
U(""),
|
|
71
|
-
}, [
|
|
72
|
-
|
|
69
|
+
}, []), Z = v(() => {
|
|
70
|
+
U(""), I("");
|
|
71
|
+
}, [I]), Q = b(() => `${R} / ${L}`, [R, L]), de = b(() => V.trim() ? F ? W?.searchLoadingMessage || "Searching" : L ? (W?.searchResultsMessage || "{current} of {total} matches").replace("{current}", String(R)).replace("{total}", String(L)) : W?.searchNoResultsMessage || "No matches found" : "", [
|
|
72
|
+
R,
|
|
73
|
+
F,
|
|
74
|
+
W,
|
|
75
|
+
V,
|
|
76
|
+
L
|
|
77
|
+
]), { wholeWords: fe, matchCase: pe } = b(() => N, [N]), me = v((e) => {
|
|
78
|
+
P((t) => ({
|
|
73
79
|
...t,
|
|
74
80
|
matchCase: e
|
|
75
81
|
}));
|
|
76
|
-
}, [
|
|
77
|
-
|
|
82
|
+
}, [P]), he = v((e) => {
|
|
83
|
+
P((t) => ({
|
|
78
84
|
...t,
|
|
79
85
|
wholeWords: e
|
|
80
86
|
}));
|
|
81
|
-
}, [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}, [
|
|
85
|
-
let $ =
|
|
87
|
+
}, [P]);
|
|
88
|
+
y(() => {
|
|
89
|
+
A && oe && J();
|
|
90
|
+
}, [A, J]);
|
|
91
|
+
let $ = b(() => K?.querySelectorAll("[tabindex]:not([tabindex=\"-1\"])") || [], [K]), ge = v((e) => {
|
|
86
92
|
if (e.key === "Tab") {
|
|
87
93
|
let t = document.activeElement, n = -1;
|
|
88
94
|
$.forEach((e, r) => {
|
|
@@ -101,47 +107,47 @@ var ie = () => {
|
|
|
101
107
|
}
|
|
102
108
|
}
|
|
103
109
|
}, [$]);
|
|
104
|
-
return !
|
|
105
|
-
open:
|
|
110
|
+
return !ie || !ae ? null : /* @__PURE__ */ w(C, { children: /* @__PURE__ */ w(ne, {
|
|
111
|
+
open: h,
|
|
106
112
|
container: c,
|
|
107
113
|
side: "bottom",
|
|
108
114
|
align: "start",
|
|
109
115
|
tabIndex: 0,
|
|
110
116
|
avoidCollisions: !1,
|
|
111
|
-
triggerComponent: /* @__PURE__ */
|
|
117
|
+
triggerComponent: /* @__PURE__ */ w(u, {
|
|
112
118
|
content: W?.searchButtonTooltip,
|
|
113
|
-
children: /* @__PURE__ */
|
|
114
|
-
ref:
|
|
115
|
-
active:
|
|
119
|
+
children: /* @__PURE__ */ w(te, {
|
|
120
|
+
ref: O,
|
|
121
|
+
active: h,
|
|
116
122
|
onClick: ce,
|
|
117
123
|
"aria-label": W?.searchButtonTooltip,
|
|
118
|
-
"aria-expanded":
|
|
124
|
+
"aria-expanded": h,
|
|
119
125
|
"aria-haspopup": "dialog",
|
|
120
|
-
children:
|
|
126
|
+
children: o || /* @__PURE__ */ w(E, {})
|
|
121
127
|
})
|
|
122
128
|
}),
|
|
123
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ T("div", {
|
|
124
130
|
ref: q,
|
|
125
|
-
className:
|
|
131
|
+
className: p["rp-search-tool-content"],
|
|
126
132
|
tabIndex: -1,
|
|
127
|
-
onKeyDown:
|
|
133
|
+
onKeyDown: ge,
|
|
128
134
|
role: "dialog",
|
|
129
135
|
"aria-label": W?.searchInputTooltip || "Search dialog",
|
|
130
|
-
children: [/* @__PURE__ */
|
|
131
|
-
className:
|
|
132
|
-
children: [/* @__PURE__ */
|
|
133
|
-
className:
|
|
136
|
+
children: [/* @__PURE__ */ T("div", {
|
|
137
|
+
className: p["rp-search-tool-input-wrapper"],
|
|
138
|
+
children: [/* @__PURE__ */ T("div", {
|
|
139
|
+
className: p["rp-search-tool-input"],
|
|
134
140
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ w(u, {
|
|
136
142
|
content: W?.searchInputTooltip,
|
|
137
|
-
children: /* @__PURE__ */
|
|
143
|
+
children: /* @__PURE__ */ w(s, {
|
|
138
144
|
value: H,
|
|
139
|
-
onKeyDown:
|
|
140
|
-
onChange:
|
|
141
|
-
icon: /* @__PURE__ */
|
|
145
|
+
onKeyDown: le,
|
|
146
|
+
onChange: ue,
|
|
147
|
+
icon: /* @__PURE__ */ w(f, {}),
|
|
142
148
|
placeholder: W?.searchInputPlaceholder,
|
|
143
|
-
className:
|
|
144
|
-
ref:
|
|
149
|
+
className: p["rp-search-input"],
|
|
150
|
+
ref: M,
|
|
145
151
|
id: "search-input",
|
|
146
152
|
name: "search-input",
|
|
147
153
|
label: W?.searchInputTooltip || "Search",
|
|
@@ -149,80 +155,86 @@ var ie = () => {
|
|
|
149
155
|
tabIndex: 0,
|
|
150
156
|
"aria-label": W?.searchInputTooltip || W?.searchInputPlaceholder,
|
|
151
157
|
"aria-describedby": "search-results-count",
|
|
152
|
-
children: !!H && /* @__PURE__ */
|
|
153
|
-
className:
|
|
154
|
-
onClick:
|
|
158
|
+
children: !!H && /* @__PURE__ */ w("span", {
|
|
159
|
+
className: p["rp-search-tool-input-clear"],
|
|
160
|
+
onClick: Z,
|
|
155
161
|
role: "button",
|
|
156
162
|
tabIndex: 0,
|
|
157
163
|
"aria-label": W?.searchCloseButtonTooltip || "Clear search",
|
|
158
164
|
onKeyDown: (e) => {
|
|
159
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
165
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), Z());
|
|
160
166
|
},
|
|
161
|
-
children: /* @__PURE__ */
|
|
167
|
+
children: /* @__PURE__ */ w(re, {})
|
|
162
168
|
})
|
|
163
169
|
})
|
|
164
170
|
}),
|
|
165
|
-
|
|
171
|
+
/* @__PURE__ */ w("span", {
|
|
172
|
+
className: p["rp-search-live-region"],
|
|
173
|
+
role: "status",
|
|
166
174
|
"aria-live": "polite",
|
|
167
|
-
"aria-
|
|
168
|
-
children:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
175
|
+
"aria-atomic": "true",
|
|
176
|
+
children: de
|
|
177
|
+
}),
|
|
178
|
+
F ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(a, {
|
|
179
|
+
className: p["rp-search-loader-icon"],
|
|
180
|
+
"aria-hidden": "true"
|
|
181
|
+
}), /* @__PURE__ */ w("span", {
|
|
173
182
|
id: "search-results-count",
|
|
174
|
-
"
|
|
175
|
-
children:
|
|
183
|
+
className: p["rp-search-live-region"],
|
|
184
|
+
children: Q
|
|
185
|
+
})] }) : /* @__PURE__ */ w("span", {
|
|
186
|
+
id: "search-results-count",
|
|
187
|
+
children: Q
|
|
176
188
|
}),
|
|
177
|
-
G && /* @__PURE__ */
|
|
178
|
-
className:
|
|
179
|
-
children: /* @__PURE__ */
|
|
189
|
+
G && /* @__PURE__ */ w("div", {
|
|
190
|
+
className: p["rp-search-tool-controls"],
|
|
191
|
+
children: /* @__PURE__ */ w(_, {
|
|
180
192
|
onKeyPress: Y,
|
|
181
193
|
handleClose: J
|
|
182
194
|
})
|
|
183
195
|
})
|
|
184
196
|
]
|
|
185
|
-
}), /* @__PURE__ */
|
|
186
|
-
className:
|
|
197
|
+
}), /* @__PURE__ */ T("div", {
|
|
198
|
+
className: p["rp-search-tool-input-checkboxes"],
|
|
187
199
|
children: [
|
|
188
|
-
G && /* @__PURE__ */
|
|
189
|
-
/* @__PURE__ */
|
|
200
|
+
G && /* @__PURE__ */ w(g, {}),
|
|
201
|
+
/* @__PURE__ */ w(m, {
|
|
190
202
|
tabIndex: 0,
|
|
191
203
|
name: "matchCase",
|
|
192
|
-
value:
|
|
193
|
-
onChange:
|
|
204
|
+
value: pe,
|
|
205
|
+
onChange: me,
|
|
194
206
|
"aria-label": W?.searchMatchCaseLabel,
|
|
195
207
|
children: W?.searchMatchCaseLabel
|
|
196
208
|
}),
|
|
197
|
-
!G && /* @__PURE__ */
|
|
209
|
+
!G && /* @__PURE__ */ w(u, {
|
|
198
210
|
content: W?.searchMatchCaseTooltip,
|
|
199
|
-
children: /* @__PURE__ */
|
|
200
|
-
className:
|
|
211
|
+
children: /* @__PURE__ */ w("div", {
|
|
212
|
+
className: p["rp-search-icon-info"],
|
|
201
213
|
tabIndex: 0,
|
|
202
|
-
children: /* @__PURE__ */
|
|
214
|
+
children: /* @__PURE__ */ w(d, {})
|
|
203
215
|
})
|
|
204
216
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ w(m, {
|
|
206
218
|
tabIndex: 0,
|
|
207
219
|
name: "wholeWord",
|
|
208
|
-
value:
|
|
209
|
-
onChange:
|
|
220
|
+
value: fe,
|
|
221
|
+
onChange: he,
|
|
210
222
|
"aria-label": W?.searchWholeWordsLabel,
|
|
211
223
|
children: W?.searchWholeWordsLabel
|
|
212
224
|
}),
|
|
213
|
-
!G && /* @__PURE__ */
|
|
225
|
+
!G && /* @__PURE__ */ w(u, {
|
|
214
226
|
content: W?.searchWholeWordsTooltip,
|
|
215
|
-
children: /* @__PURE__ */
|
|
227
|
+
children: /* @__PURE__ */ w("div", {
|
|
216
228
|
tabIndex: 0,
|
|
217
|
-
className:
|
|
218
|
-
children: /* @__PURE__ */
|
|
229
|
+
className: p["rp-search-icon-info"],
|
|
230
|
+
children: /* @__PURE__ */ w(d, {})
|
|
219
231
|
})
|
|
220
232
|
})
|
|
221
233
|
]
|
|
222
234
|
})]
|
|
223
|
-
}), !G && /* @__PURE__ */
|
|
224
|
-
className:
|
|
225
|
-
children: [/* @__PURE__ */
|
|
235
|
+
}), !G && /* @__PURE__ */ T("div", {
|
|
236
|
+
className: p["rp-search-tool-controls"],
|
|
237
|
+
children: [/* @__PURE__ */ w(g, {}), /* @__PURE__ */ w(_, {
|
|
226
238
|
onKeyPress: Y,
|
|
227
239
|
handleClose: J
|
|
228
240
|
})]
|
|
@@ -231,4 +243,4 @@ var ie = () => {
|
|
|
231
243
|
}) });
|
|
232
244
|
};
|
|
233
245
|
//#endregion
|
|
234
|
-
export {
|
|
246
|
+
export { D as SearchTool };
|
|
@@ -5,9 +5,9 @@ import { useToolbarComponentContext as r } from "../../../contexts/ToolbarCompon
|
|
|
5
5
|
import { useToolComponentContext as i } from "../../../contexts/ToolComponentContext.js";
|
|
6
6
|
import { useIconToolContext as a } from "../../../contexts/IconToolContext.js";
|
|
7
7
|
import { useIconContext as o } from "../../../contexts/IconContext.js";
|
|
8
|
-
import { t as s } from "../../../RPTooltip-
|
|
8
|
+
import { t as s } from "../../../RPTooltip-QWwWh4HW.js";
|
|
9
9
|
import { n as c } from "../../../dist-VbpVNBs6.js";
|
|
10
|
-
import { t as l } from "../../../MenuItem-
|
|
10
|
+
import { t as l } from "../../../MenuItem-lItnKNd5.js";
|
|
11
11
|
import { t as u } from "../../../MenuSeparator-CaFxd8b5.js";
|
|
12
12
|
import { CheckIcon as d } from "../../icons/CheckIcon.js";
|
|
13
13
|
import { TextSelectionDefaultIcon as f } from "../../icons/TextSelectionDefaultIcon.js";
|
|
@@ -23,11 +23,11 @@ var _ = () => {
|
|
|
23
23
|
}, y = () => {
|
|
24
24
|
let { selectionModeTool: a = !0 } = r(), { selectionModeTool: o = !0 } = i(), { selectionMode: f, setSelectionMode: p } = t(), { localeMessages: y } = n();
|
|
25
25
|
return !a || !o ? null : /* @__PURE__ */ h(m, { children: /* @__PURE__ */ g(c, { children: [
|
|
26
|
-
/* @__PURE__ */ h(
|
|
27
|
-
|
|
28
|
-
children: /* @__PURE__ */ g(
|
|
26
|
+
/* @__PURE__ */ h(s, {
|
|
27
|
+
content: y?.textSelectionTooltip,
|
|
28
|
+
children: /* @__PURE__ */ g(l, {
|
|
29
|
+
onClick: () => p(e.TEXT),
|
|
29
30
|
className: "rp-menu-item",
|
|
30
|
-
content: y?.textSelectionTooltip,
|
|
31
31
|
children: [
|
|
32
32
|
/* @__PURE__ */ h("div", {
|
|
33
33
|
className: "rp-menu-item-left",
|
|
@@ -38,11 +38,11 @@ var _ = () => {
|
|
|
38
38
|
]
|
|
39
39
|
})
|
|
40
40
|
}),
|
|
41
|
-
/* @__PURE__ */ h(
|
|
42
|
-
|
|
43
|
-
children: /* @__PURE__ */ g(
|
|
41
|
+
/* @__PURE__ */ h(s, {
|
|
42
|
+
content: y?.handToolTooltip,
|
|
43
|
+
children: /* @__PURE__ */ g(l, {
|
|
44
|
+
onClick: () => p(e.HAND),
|
|
44
45
|
className: "rp-menu-item",
|
|
45
|
-
content: y?.handToolTooltip,
|
|
46
46
|
children: [
|
|
47
47
|
/* @__PURE__ */ h("div", {
|
|
48
48
|
className: "rp-menu-item-left",
|
|
@@ -3,7 +3,7 @@ import { useToolComponentContext as t } from "../../../contexts/ToolComponentCon
|
|
|
3
3
|
import { useThumbnailContext as n } from "../../../contexts/ThumbnailsContext.js";
|
|
4
4
|
import { useIconToolContext as r } from "../../../contexts/IconToolContext.js";
|
|
5
5
|
import { t as i } from "../../../Button-DBu3SaMk.js";
|
|
6
|
-
import { t as a } from "../../../RPTooltip-
|
|
6
|
+
import { t as a } from "../../../RPTooltip-QWwWh4HW.js";
|
|
7
7
|
import { ThumbnailIcon as o } from "../../icons/Thumbnail.js";
|
|
8
8
|
import { Fragment as s, jsx as c } from "react/jsx-runtime";
|
|
9
9
|
//#region lib/components/layout/toolbar/ThumbnailTool.tsx
|
|
@@ -2,9 +2,9 @@ import "../../../utils/constants.js";
|
|
|
2
2
|
import { usePrintContext as e } from "../../../contexts/PrintContext.js";
|
|
3
3
|
import { useToolbarComponentContext as t } from "../../../contexts/ToolbarComponentContext.js";
|
|
4
4
|
import { useThumbnailContext as n } from "../../../contexts/ThumbnailsContext.js";
|
|
5
|
-
import { t as r } from "../../../LoadingIndicator-
|
|
5
|
+
import { t as r } from "../../../LoadingIndicator-0E8WHnSN.js";
|
|
6
6
|
import { t as i } from "../../../RPSplitter-C63X9M8w.js";
|
|
7
|
-
import { t as a } from "../../../Thumbnails-
|
|
7
|
+
import { t as a } from "../../../Thumbnails-BIuN8LZ8.js";
|
|
8
8
|
import { t as o } from "../../../ToolbarLayout.module-Zo715dbb.js";
|
|
9
9
|
import { useRef as s, useState as c } from "react";
|
|
10
10
|
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
@@ -2,9 +2,9 @@ import "../../../utils/constants.js";
|
|
|
2
2
|
import { usePrintContext as e } from "../../../contexts/PrintContext.js";
|
|
3
3
|
import { useToolbarComponentContext as t } from "../../../contexts/ToolbarComponentContext.js";
|
|
4
4
|
import { useThumbnailContext as n } from "../../../contexts/ThumbnailsContext.js";
|
|
5
|
-
import { t as r } from "../../../LoadingIndicator-
|
|
5
|
+
import { t as r } from "../../../LoadingIndicator-0E8WHnSN.js";
|
|
6
6
|
import { t as i } from "../../../RPSplitter-C63X9M8w.js";
|
|
7
|
-
import { t as a } from "../../../Thumbnails-
|
|
7
|
+
import { t as a } from "../../../Thumbnails-BIuN8LZ8.js";
|
|
8
8
|
import { t as o } from "../../../ToolbarLayout.module-Zo715dbb.js";
|
|
9
9
|
import { RPVerticalBar as s } from "./tools/defaults/RPVerticalBar.js";
|
|
10
10
|
import { RPHorizontalBar as c } from "./tools/defaults/RPHorizontalBar.js";
|
|
@@ -6,9 +6,9 @@ import { useToolbarComponentContext as a } from "../../../contexts/ToolbarCompon
|
|
|
6
6
|
import { useToolComponentContext as o } from "../../../contexts/ToolComponentContext.js";
|
|
7
7
|
import { useIconToolContext as s } from "../../../contexts/IconToolContext.js";
|
|
8
8
|
import { useIconContext as c } from "../../../contexts/IconContext.js";
|
|
9
|
-
import { t as l } from "../../../RPTooltip-
|
|
9
|
+
import { t as l } from "../../../RPTooltip-QWwWh4HW.js";
|
|
10
10
|
import { n as u } from "../../../dist-VbpVNBs6.js";
|
|
11
|
-
import { t as d } from "../../../MenuItem-
|
|
11
|
+
import { t as d } from "../../../MenuItem-lItnKNd5.js";
|
|
12
12
|
import { t as f } from "../../../MenuSeparator-CaFxd8b5.js";
|
|
13
13
|
import { DualPageIcon as p } from "../../icons/DualPageIcon.js";
|
|
14
14
|
import { DualPageWithCoverIcon as m } from "../../icons/DualPageWithCoverIcon.js";
|
|
@@ -29,11 +29,11 @@ var x = () => {
|
|
|
29
29
|
}, w = () => {
|
|
30
30
|
let { viewMode: s, setDualPage: c, setDualPageWithCover: p, setSinglePage: m } = r(), { viewModeTool: h = !0 } = a(), { viewModeTool: w = !0 } = o(), { scrollMode: T } = n(), { localeMessages: E } = i(), D = _(() => [e.HORIZONTAL_SCROLLING].includes(T), [T]);
|
|
31
31
|
return !h || !w ? null : /* @__PURE__ */ y(v, { children: /* @__PURE__ */ b(u, { children: [
|
|
32
|
-
/* @__PURE__ */ y(
|
|
33
|
-
|
|
34
|
-
children: /* @__PURE__ */ b(
|
|
32
|
+
/* @__PURE__ */ y(l, {
|
|
33
|
+
content: E?.singlePageTooltip,
|
|
34
|
+
children: /* @__PURE__ */ b(d, {
|
|
35
|
+
onClick: m,
|
|
35
36
|
className: "rp-menu-item",
|
|
36
|
-
content: E?.singlePageTooltip,
|
|
37
37
|
children: [
|
|
38
38
|
/* @__PURE__ */ y("div", {
|
|
39
39
|
className: "rp-menu-item-left",
|
|
@@ -44,12 +44,12 @@ var x = () => {
|
|
|
44
44
|
]
|
|
45
45
|
})
|
|
46
46
|
}),
|
|
47
|
-
/* @__PURE__ */ y(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
/* @__PURE__ */ y(l, {
|
|
48
|
+
content: E?.dualPageTooltip,
|
|
49
|
+
children: /* @__PURE__ */ b(d, {
|
|
50
|
+
disabled: D,
|
|
51
|
+
onClick: c,
|
|
51
52
|
className: "rp-menu-item",
|
|
52
|
-
content: E?.dualPageTooltip,
|
|
53
53
|
children: [
|
|
54
54
|
/* @__PURE__ */ y("div", {
|
|
55
55
|
className: "rp-menu-item-left",
|
|
@@ -60,12 +60,12 @@ var x = () => {
|
|
|
60
60
|
]
|
|
61
61
|
})
|
|
62
62
|
}),
|
|
63
|
-
/* @__PURE__ */ y(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
/* @__PURE__ */ y(l, {
|
|
64
|
+
content: E?.dualPageWithCoverTooltip,
|
|
65
|
+
children: /* @__PURE__ */ b(d, {
|
|
66
|
+
disabled: D,
|
|
67
|
+
onClick: p,
|
|
67
68
|
className: "rp-menu-item",
|
|
68
|
-
content: E?.dualPageWithCoverTooltip,
|
|
69
69
|
children: [
|
|
70
70
|
/* @__PURE__ */ y("div", {
|
|
71
71
|
className: "rp-menu-item-left",
|