@react-pdf-kit/viewer 2.7.0-rc.1 → 2.7.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AnnotationLayer-D6BfL976.js → AnnotationLayer-CAIvKf_O.js} +1 -1
- package/dist/{Button-jStpvb3T.js → Button-BNlmxWrV.js} +2 -2
- package/dist/Container-BxNZX82X.js +18 -0
- package/dist/{DocumentDialog-DHAWcYIz.js → DocumentDialog-C9G7lVTh.js} +6 -6
- package/dist/{Input-DGJSVFE8.js → Input-DjSWOjCI.js} +4 -4
- package/dist/Paginate.module-DhE7N8AA.js +9 -0
- package/dist/{PaginationContext--n91mIJ4.js → PaginationContext-Cwf8sCpK.js} +77 -67
- package/dist/{PasswordModal-CA6x2l7v.js → PasswordModal-CB9Rd2zJ.js} +12 -11
- package/dist/{RPPage-BuSGUFzw.js → RPPage-C_r8aeTc.js} +1 -1
- package/dist/{RPPages-CQsmCbyj.js → RPPages-CmXHTAqF.js} +3 -3
- package/dist/{SkipLink-Bvbn3miT.js → SkipLink-CdcjClGB.js} +1 -1
- package/dist/{Thumbnail-Dwo2-4Ki.js → Thumbnail-CzclS3h_.js} +1 -1
- package/dist/{Thumbnails-ComClyJJ.js → Thumbnails-DnAsrttK.js} +2 -2
- package/dist/assets/Button.css +1 -1
- package/dist/assets/DocumentDialog.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/Paginate.css +1 -1
- package/dist/assets/PasswordModal.css +1 -1
- package/dist/assets/SkipLink.css +1 -1
- package/dist/assets/style.js +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/Container.js +1 -1
- 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/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/FileUploadTool.js +1 -1
- package/dist/components/layout/toolbar/FullScreenTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- package/dist/components/layout/toolbar/Paginate.js +19 -4
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPMoreOptions.js +2 -2
- package/dist/components/layout/toolbar/SearchCloseButton.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +3 -2
- package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/ToolbarCustom.js +1 -1
- package/dist/components/layout/toolbar/ToolbarDefault.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +2 -2
- 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 +1 -1
- package/dist/components/layout/toolbar/tools/InputPageTool.js +36 -24
- 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 +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/DualPage.js +2 -2
- package/dist/components/page/DualPageWithCover.js +2 -2
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +2 -2
- package/dist/components/ui/Button.js +1 -1
- package/dist/components/ui/Input.js +1 -1
- package/dist/components/ui/PasswordModal.js +1 -1
- package/dist/contexts/ElementThumbnailContext.js +1 -1
- package/dist/contexts/LocalizationContext.js +12 -6
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +1 -1
- package/dist/{de_DE--0LF-SJR.js → de_DE-DwUvXUWH.js} +24 -6
- package/dist/{lib-BiapEtK1.js → lib-CSInlR9T.js} +142 -237
- package/dist/{main-CHO5p1qM.js → main-CKr9unOk.js} +2 -2
- package/dist/main.js +4 -4
- package/dist/style-C8T5x1fE.js +5 -0
- package/dist/types/locales/de_DE.json.d.ts +6 -2
- package/dist/types/locales/en_US.json.d.ts +6 -2
- package/dist/types/locales/it_IT.json.d.ts +6 -2
- package/dist/types/locales/pt_PT.json.d.ts +6 -2
- package/dist/types/locales/th_TH.json.d.ts +6 -2
- package/dist/types/locales/zh_CN.json.d.ts +6 -2
- package/dist/types/utils/types.d.ts +4 -0
- package/dist/utils/hooks/useLicense.js +2 -2
- package/dist/utils/hooks/useLocalization.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/types.js +1 -1
- package/package.json +1 -1
- package/dist/Container-DTWaZzc7.js +0 -16
- package/dist/Paginate.module-B0GMw-MB.js +0 -8
- package/dist/style-DKH7g1Kh.js +0 -5
|
@@ -2,7 +2,7 @@ import { AnnotationSubType as e } from "./utils/types.js";
|
|
|
2
2
|
import { useDocumentContext as t } from "./contexts/RPDocumentContext.js";
|
|
3
3
|
import { useInitialStateContext as n } from "./contexts/InitialStateContext.js";
|
|
4
4
|
import { useScrollModeContext as r } from "./contexts/ScrollModeContext.js";
|
|
5
|
-
import { r as i } from "./PaginationContext
|
|
5
|
+
import { r as i } from "./PaginationContext-Cwf8sCpK.js";
|
|
6
6
|
import { usePrintContext as a } from "./contexts/PrintContext.js";
|
|
7
7
|
import { SimpleLinkService as o } from "./utils/link_service.js";
|
|
8
8
|
import { annotationEventsHandler as s, bindLayerEvents as c, enhanceLinkAccessibility as l, fixTabIndexAccessibility as u, handleAnnotationWidget as d, insertDateText as f, unbindLayerEvents as p } from "./utils/annotations.js";
|
|
@@ -3,8 +3,8 @@ import { withRef as t } from "./utils/withRef.js";
|
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
import './assets/Button.css';//#region lib/components/ui/Button.module.css
|
|
5
5
|
var r = {
|
|
6
|
-
"rp-button": "_rp-
|
|
7
|
-
"rp-button-active": "_rp-button-
|
|
6
|
+
"rp-button": "_rp-button_xxds9_1",
|
|
7
|
+
"rp-button-active": "_rp-button-active_xxds9_20"
|
|
8
8
|
}, i = t((t, i) => {
|
|
9
9
|
let { children: a, active: o, className: s, role: c, ...l } = t;
|
|
10
10
|
return /* @__PURE__ */ n("button", {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useLocalizationContext as e } from "./contexts/LocalizationContext.js";
|
|
2
|
+
import { t } from "./clsx-B7LyVm5O.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import './assets/Container.css';//#region lib/components/layout/Container.module.css
|
|
5
|
+
var r = { "rp-container": "_rp-container_f63gc_1" }, i = (e) => e.replace(/_/g, "-"), a = (a) => {
|
|
6
|
+
let { children: o, getContainerRef: s, style: c, className: l } = a, { locale: u } = e();
|
|
7
|
+
return /* @__PURE__ */ n("div", {
|
|
8
|
+
tabIndex: 0,
|
|
9
|
+
ref: s,
|
|
10
|
+
"data-rp": "container",
|
|
11
|
+
lang: u ? i(u) : void 0,
|
|
12
|
+
className: t(r["rp-container"], l),
|
|
13
|
+
style: c,
|
|
14
|
+
children: o
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { a as t };
|
|
@@ -217,12 +217,12 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
217
217
|
t
|
|
218
218
|
]), null;
|
|
219
219
|
}, ce = k, le = F, ue = L, de = z, fe = W, pe = J, $ = {
|
|
220
|
-
"rp-dialog-wrapper": "_rp-dialog-
|
|
221
|
-
"rp-dialog-overlay": "_rp-dialog-
|
|
222
|
-
"rp-document-dialog": "_rp-document-
|
|
223
|
-
"rp-dialog-title": "_rp-dialog-
|
|
224
|
-
"rp-dialog-close": "_rp-dialog-
|
|
225
|
-
"rp-properties-divider": "_rp-properties-
|
|
220
|
+
"rp-dialog-wrapper": "_rp-dialog-wrapper_39boz_1",
|
|
221
|
+
"rp-dialog-overlay": "_rp-dialog-overlay_39boz_7",
|
|
222
|
+
"rp-document-dialog": "_rp-document-dialog_39boz_13",
|
|
223
|
+
"rp-dialog-title": "_rp-dialog-title_39boz_35",
|
|
224
|
+
"rp-dialog-close": "_rp-dialog-close_39boz_44",
|
|
225
|
+
"rp-properties-divider": "_rp-properties-divider_39boz_52"
|
|
226
226
|
}, me = () => {
|
|
227
227
|
let { pdfProperties: a } = e(), { container: o } = t(), { activeDocumentProperties: s, setActiveDocumentProperties: c } = r(), { localeMessages: l } = n(), u = x(() => {
|
|
228
228
|
if (!a) return [];
|
|
@@ -4,10 +4,10 @@ import { useId as n } from "react";
|
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
import './assets/Input.css';//#region lib/components/ui/Input.module.css
|
|
6
6
|
var a = {
|
|
7
|
-
"rp-input": "_rp-
|
|
8
|
-
"rp-input-wrapper": "_rp-input-
|
|
9
|
-
"rp-input-label": "_rp-input-
|
|
10
|
-
"rp-input-icon": "_rp-input-
|
|
7
|
+
"rp-input": "_rp-input_dun7b_1",
|
|
8
|
+
"rp-input-wrapper": "_rp-input-wrapper_dun7b_28",
|
|
9
|
+
"rp-input-label": "_rp-input-label_dun7b_32",
|
|
10
|
+
"rp-input-icon": "_rp-input-icon_dun7b_44"
|
|
11
11
|
}, o = t((t, o) => {
|
|
12
12
|
let { className: s, icon: c, children: l, id: u, label: d, ...f } = t, p = n(), m = u || p, h = f.role || (f.type === "text" || !f.type ? "textbox" : void 0);
|
|
13
13
|
return /* @__PURE__ */ i("div", {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './assets/Paginate.css';//#region lib/components/layout/toolbar/Paginate.module.css
|
|
2
|
+
var e = {
|
|
3
|
+
"rp-paginate": "_rp-paginate_3amlb_1",
|
|
4
|
+
"rp-page-input": "_rp-page-input_3amlb_6",
|
|
5
|
+
"rp-total-page": "_rp-total-page_3amlb_29",
|
|
6
|
+
"rp-sr-only": "_rp-sr-only_3amlb_36"
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as t };
|
|
@@ -13,23 +13,23 @@ import { useDebounce as f } from "./utils/hooks/useDebounce.js";
|
|
|
13
13
|
import { useDimensionPagesContext as p } from "./contexts/DimensionPagesContext.js";
|
|
14
14
|
import { useSmoothScrollContext as m } from "./contexts/SmoothScrollContext.js";
|
|
15
15
|
import { getScrollDistance as h } from "./utils/getScrollDistance.js";
|
|
16
|
-
import { getGridDimension as g } from "./utils/calculatePage.js";
|
|
17
|
-
import { createContext as
|
|
18
|
-
import { jsx as
|
|
16
|
+
import { getGridDimension as g, getPositionFromPage as _ } from "./utils/calculatePage.js";
|
|
17
|
+
import { createContext as v, useCallback as y, useContext as b, useEffect as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
18
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
19
19
|
//#region lib/utils/hooks/useScrollToPage.ts
|
|
20
|
-
var
|
|
21
|
-
let { viewMode: n } = o(), { scrollMode: r } = a(), { virtualScrollRef: i, virtualScrollableElementRef: u, pageScrollElementRef: d } = s(), { setFocusedPage: f } =
|
|
22
|
-
|
|
23
|
-
i?.scrollToItem && (
|
|
24
|
-
}, [i]),
|
|
25
|
-
|
|
20
|
+
var E = () => {
|
|
21
|
+
let { viewMode: n } = o(), { scrollMode: r } = a(), { virtualScrollRef: i, virtualScrollableElementRef: u, pageScrollElementRef: d } = s(), { setFocusedPage: f } = k(), v = C(), { columnCount: b } = c(), { widths: S, heights: w } = p(), T = C(r), E = C(n), D = C(b), { targetScrollPage: O, scrollBehavior: A } = m(), j = C(null);
|
|
22
|
+
x(() => {
|
|
23
|
+
i?.scrollToItem && (v.current = i);
|
|
24
|
+
}, [i]), x(() => {
|
|
25
|
+
T.current = r, E.current = n;
|
|
26
26
|
}, [r, n]);
|
|
27
|
-
let
|
|
27
|
+
let M = y((e, t) => {
|
|
28
28
|
if (!d) return;
|
|
29
29
|
let n = Math.ceil(e / 2) * 2 - 1;
|
|
30
30
|
if (e === n + 1) {
|
|
31
31
|
let e = {
|
|
32
|
-
left:
|
|
32
|
+
left: S[n],
|
|
33
33
|
top: 0
|
|
34
34
|
};
|
|
35
35
|
return new Promise((t) => l(d, e, t));
|
|
@@ -41,42 +41,42 @@ var T = () => {
|
|
|
41
41
|
});
|
|
42
42
|
}, [
|
|
43
43
|
d,
|
|
44
|
-
|
|
44
|
+
S,
|
|
45
45
|
l
|
|
46
46
|
]);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, [r, n]),
|
|
50
|
-
|
|
51
|
-
}, [
|
|
52
|
-
let
|
|
47
|
+
x(() => {
|
|
48
|
+
T.current = r, E.current = n;
|
|
49
|
+
}, [r, n]), x(() => {
|
|
50
|
+
D.current = b;
|
|
51
|
+
}, [b]);
|
|
52
|
+
let N = y((n, r = A) => {
|
|
53
53
|
f(n);
|
|
54
54
|
let i = n - 1, a = i, o = 0;
|
|
55
|
-
if (
|
|
56
|
-
|
|
55
|
+
if (E.current === t.DUAL_PAGE && T.current === e.PAGE_SCROLLING) {
|
|
56
|
+
M(n, r);
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
|
-
if (
|
|
59
|
+
if (T.current === e.PAGE_SCROLLING) {
|
|
60
60
|
f(n);
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
if (!
|
|
64
|
-
|
|
63
|
+
if (!v.current || !u) {
|
|
64
|
+
j.current = {
|
|
65
65
|
page: n,
|
|
66
66
|
behavior: r
|
|
67
67
|
};
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
j.current = null;
|
|
71
71
|
let s = u;
|
|
72
|
-
r === "smooth" && (
|
|
73
|
-
let { columnsWidth:
|
|
74
|
-
widths:
|
|
75
|
-
heights:
|
|
76
|
-
},
|
|
77
|
-
if (
|
|
72
|
+
r === "smooth" && (O.current = n);
|
|
73
|
+
let c = E.current === t.DUAL_PAGE_WITH_COVER, { columnsWidth: l, rowsHeight: d } = g({
|
|
74
|
+
widths: S,
|
|
75
|
+
heights: w
|
|
76
|
+
}, b, c);
|
|
77
|
+
if (T.current === e.HORIZONTAL_SCROLLING) {
|
|
78
78
|
o = i;
|
|
79
|
-
let e = h(
|
|
79
|
+
let e = h(l, o), t = {
|
|
80
80
|
left: Math.floor(e),
|
|
81
81
|
top: 0
|
|
82
82
|
};
|
|
@@ -85,9 +85,19 @@ var T = () => {
|
|
|
85
85
|
behavior: r
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
if (
|
|
88
|
+
if (E.current === t.DUAL_PAGE_WITH_COVER) {
|
|
89
|
+
let { rowIndex: e, columnIndex: t } = _(n, b, !0), i = h(l, t), a = h(d, e), o = {
|
|
90
|
+
left: Math.floor(i),
|
|
91
|
+
top: Math.floor(a)
|
|
92
|
+
};
|
|
93
|
+
return s.scrollTo({
|
|
94
|
+
...o,
|
|
95
|
+
behavior: r
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
if (E.current === t.DUAL_PAGE) {
|
|
89
99
|
o = i % 2, a = Math.floor(i / 2);
|
|
90
|
-
let e = h(
|
|
100
|
+
let e = h(l, o), t = h(d, a), n = {
|
|
91
101
|
left: Math.floor(e),
|
|
92
102
|
top: Math.floor(t)
|
|
93
103
|
};
|
|
@@ -96,49 +106,49 @@ var T = () => {
|
|
|
96
106
|
behavior: r
|
|
97
107
|
});
|
|
98
108
|
}
|
|
99
|
-
let
|
|
109
|
+
let p = h(d, a), m = {
|
|
100
110
|
left: 0,
|
|
101
|
-
top: Math.floor(
|
|
111
|
+
top: Math.floor(p)
|
|
102
112
|
};
|
|
103
113
|
return s.scrollTo({
|
|
104
|
-
...
|
|
114
|
+
...m,
|
|
105
115
|
behavior: r
|
|
106
116
|
});
|
|
107
117
|
}, [
|
|
108
118
|
u,
|
|
109
|
-
|
|
110
|
-
|
|
119
|
+
b,
|
|
120
|
+
M,
|
|
111
121
|
f,
|
|
112
122
|
l,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
123
|
+
w,
|
|
124
|
+
S,
|
|
125
|
+
A
|
|
116
126
|
]);
|
|
117
|
-
return
|
|
118
|
-
if (!u || !
|
|
119
|
-
let { page: e, behavior: t } =
|
|
120
|
-
|
|
121
|
-
}, [u,
|
|
122
|
-
},
|
|
123
|
-
let [r, i] =
|
|
127
|
+
return x(() => {
|
|
128
|
+
if (!u || !j.current) return;
|
|
129
|
+
let { page: e, behavior: t } = j.current;
|
|
130
|
+
j.current = null, N(e, t);
|
|
131
|
+
}, [u, N]), { scrollToPage: N };
|
|
132
|
+
}, D = (n = 1) => {
|
|
133
|
+
let [r, i] = w(n), [s, c] = w(0), { scrollToPage: l } = E(), d = C(n), { viewMode: m } = o(), { scrollMode: h } = a(), { widths: g } = p(), { pagesRef: _ } = u(), v = f(r, 100), b = y((e) => {
|
|
124
134
|
if (!/^[0-9]*$/g.test(e.toString()) || !e) return {
|
|
125
135
|
success: !1,
|
|
126
136
|
currentPage: d.current
|
|
127
137
|
};
|
|
128
138
|
let t = +e;
|
|
129
|
-
return t
|
|
139
|
+
return t <= 0 || t > s ? {
|
|
130
140
|
success: !1,
|
|
131
141
|
currentPage: d.current
|
|
132
142
|
} : (i(t), d.current = t, {
|
|
133
143
|
success: !0,
|
|
134
144
|
currentPage: +e
|
|
135
145
|
});
|
|
136
|
-
}, [s]),
|
|
146
|
+
}, [s]), x = y(b, [b]), T = y((e) => {
|
|
137
147
|
i(e), d.current = e;
|
|
138
|
-
}, []), D =
|
|
148
|
+
}, []), D = y((e, t) => {
|
|
139
149
|
let n = b(e);
|
|
140
150
|
return n.success && l(n.currentPage, t), n;
|
|
141
|
-
}, [b, l]), O =
|
|
151
|
+
}, [b, l]), O = y((e) => {
|
|
142
152
|
let n = e % 2 == 1;
|
|
143
153
|
if (!_ || n) return !1;
|
|
144
154
|
let r = n ? g[e] : g[e - 1], i = n ? g[e + 1] : g[e];
|
|
@@ -148,7 +158,7 @@ var T = () => {
|
|
|
148
158
|
g,
|
|
149
159
|
_,
|
|
150
160
|
s
|
|
151
|
-
]), k =
|
|
161
|
+
]), k = y(() => {
|
|
152
162
|
let e = r - 1;
|
|
153
163
|
O(e) && (e = r - 2), D(e);
|
|
154
164
|
}, [
|
|
@@ -157,19 +167,19 @@ var T = () => {
|
|
|
157
167
|
m,
|
|
158
168
|
h,
|
|
159
169
|
O
|
|
160
|
-
]), A =
|
|
170
|
+
]), A = S(() => m === t.DUAL_PAGE && h === e.PAGE_SCROLLING ? r === s - 1 : r === s, [
|
|
161
171
|
r,
|
|
162
172
|
s,
|
|
163
173
|
m,
|
|
164
174
|
h
|
|
165
175
|
]);
|
|
166
176
|
return {
|
|
167
|
-
focusedPage:
|
|
177
|
+
focusedPage: v,
|
|
168
178
|
totalPages: s,
|
|
169
|
-
setFocusedPage:
|
|
170
|
-
resetPage:
|
|
179
|
+
setFocusedPage: x,
|
|
180
|
+
resetPage: T,
|
|
171
181
|
setTotalPages: c,
|
|
172
|
-
nextPage:
|
|
182
|
+
nextPage: y(() => {
|
|
173
183
|
if (A) return;
|
|
174
184
|
let e = r + 1;
|
|
175
185
|
O(e) && (e = r + 2), D(e);
|
|
@@ -184,7 +194,7 @@ var T = () => {
|
|
|
184
194
|
prevPage: k,
|
|
185
195
|
goToPage: D
|
|
186
196
|
};
|
|
187
|
-
},
|
|
197
|
+
}, O = v({
|
|
188
198
|
focusedPage: 0,
|
|
189
199
|
setFocusedPage: (e) => {},
|
|
190
200
|
goToPage: (e, t) => ({
|
|
@@ -195,12 +205,12 @@ var T = () => {
|
|
|
195
205
|
setTotalPages: (e) => {},
|
|
196
206
|
prevPage: () => {},
|
|
197
207
|
nextPage: () => {}
|
|
198
|
-
}),
|
|
199
|
-
let e =
|
|
208
|
+
}), k = () => {
|
|
209
|
+
let e = b(O);
|
|
200
210
|
return e?.focusedPage === void 0 && n.error("Please use this hooks inside children component of RPProvider"), e;
|
|
201
|
-
},
|
|
202
|
-
let { pdf: t } = r(), { setCurrentPage: n } = d(), { initialPage: a = 1 } = i(), { focusedPage: o, totalPages: s, setFocusedPage: c, resetPage: l, setTotalPages: u, goToPage: f, nextPage: p, prevPage: m } =
|
|
203
|
-
return
|
|
211
|
+
}, A = ({ children: e }) => {
|
|
212
|
+
let { pdf: t } = r(), { setCurrentPage: n } = d(), { initialPage: a = 1 } = i(), { focusedPage: o, totalPages: s, setFocusedPage: c, resetPage: l, setTotalPages: u, goToPage: f, nextPage: p, prevPage: m } = D(a), h = C(!0);
|
|
213
|
+
return x(() => {
|
|
204
214
|
if (!t) {
|
|
205
215
|
h.current || (u(0), l(1));
|
|
206
216
|
return;
|
|
@@ -213,9 +223,9 @@ var T = () => {
|
|
|
213
223
|
t,
|
|
214
224
|
u,
|
|
215
225
|
l
|
|
216
|
-
]),
|
|
226
|
+
]), x(() => {
|
|
217
227
|
n(o);
|
|
218
|
-
}, [o, n]), /* @__PURE__ */
|
|
228
|
+
}, [o, n]), /* @__PURE__ */ T(O.Provider, {
|
|
219
229
|
value: {
|
|
220
230
|
focusedPage: o,
|
|
221
231
|
totalPages: s,
|
|
@@ -229,4 +239,4 @@ var T = () => {
|
|
|
229
239
|
});
|
|
230
240
|
};
|
|
231
241
|
//#endregion
|
|
232
|
-
export {
|
|
242
|
+
export { E as a, D as i, A as n, k as r, O as t };
|
|
@@ -5,16 +5,16 @@ import { useState as r } from "react";
|
|
|
5
5
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
6
|
import './assets/PasswordModal.css';//#region lib/components/ui/PasswordModal.module.css
|
|
7
7
|
var o = {
|
|
8
|
-
"rp-password-overlay": "_rp-password-
|
|
9
|
-
"rp-password-modal": "_rp-password-
|
|
10
|
-
"rp-password-title": "_rp-password-
|
|
11
|
-
"rp-password-content": "_rp-password-
|
|
12
|
-
"rp-password-form": "_rp-password-
|
|
13
|
-
"rp-password-label": "_rp-password-
|
|
14
|
-
"rp-password-input": "_rp-password-
|
|
15
|
-
"rp-password-input-invalid": "_rp-password-input-
|
|
16
|
-
"rp-password-message-invalid": "_rp-password-message-
|
|
17
|
-
"rp-password-submit-button": "_rp-password-submit-
|
|
8
|
+
"rp-password-overlay": "_rp-password-overlay_9cdbk_1",
|
|
9
|
+
"rp-password-modal": "_rp-password-modal_9cdbk_13",
|
|
10
|
+
"rp-password-title": "_rp-password-title_9cdbk_27",
|
|
11
|
+
"rp-password-content": "_rp-password-content_9cdbk_35",
|
|
12
|
+
"rp-password-form": "_rp-password-form_9cdbk_41",
|
|
13
|
+
"rp-password-label": "_rp-password-label_9cdbk_45",
|
|
14
|
+
"rp-password-input": "_rp-password-input_9cdbk_57",
|
|
15
|
+
"rp-password-input-invalid": "_rp-password-input-invalid_9cdbk_74",
|
|
16
|
+
"rp-password-message-invalid": "_rp-password-message-invalid_9cdbk_78",
|
|
17
|
+
"rp-password-submit-button": "_rp-password-submit-button_9cdbk_84"
|
|
18
18
|
}, s = () => {
|
|
19
19
|
let [s, c] = r(""), { localeMessages: l } = t(), { setPassword: u, setPasswordError: d, invalidPassword: f } = e(), p = (e) => {
|
|
20
20
|
c(e.target.value), f && d(void 0);
|
|
@@ -57,7 +57,8 @@ var o = {
|
|
|
57
57
|
onChange: p,
|
|
58
58
|
className: n(o["rp-password-input"], f && o["rp-password-input-invalid"]),
|
|
59
59
|
placeholder: l?.passwordPlaceholder,
|
|
60
|
-
autoComplete: "
|
|
60
|
+
autoComplete: "current-password",
|
|
61
|
+
"aria-label": l?.passwordPlaceholder,
|
|
61
62
|
"aria-required": "true",
|
|
62
63
|
"aria-invalid": f,
|
|
63
64
|
"aria-describedby": f ? "password-modal-message password-error" : "password-modal-message"
|
|
@@ -5,7 +5,7 @@ import { useLayerContext as r } from "./contexts/LayerContext.js";
|
|
|
5
5
|
import { useLoaderContext as i } from "./contexts/LoaderContext.js";
|
|
6
6
|
import { CanvasLayer as a } from "./components/page/CanvasLayer.js";
|
|
7
7
|
import { t as o } from "./TextLayer-DWGFN9SF.js";
|
|
8
|
-
import { t as s } from "./AnnotationLayer-
|
|
8
|
+
import { t as s } from "./AnnotationLayer-CAIvKf_O.js";
|
|
9
9
|
import { t as c } from "./TextHighlightLayer-BSVgBxR3.js";
|
|
10
10
|
import { CustomElement as l } from "./components/page/CustomElement.js";
|
|
11
11
|
import { withRef as u } from "./utils/withRef.js";
|
|
@@ -9,12 +9,12 @@ import { useLayoutContainer as u } from "./contexts/LayoutContainerContext.js";
|
|
|
9
9
|
import { useEventCallbackContext as d } from "./contexts/EventCallbackContext.js";
|
|
10
10
|
import { useDebounce as f } from "./utils/hooks/useDebounce.js";
|
|
11
11
|
import { getPageFromPosition as p } from "./utils/calculatePage.js";
|
|
12
|
-
import { a as m, r as h } from "./PaginationContext
|
|
12
|
+
import { a as m, r as h } from "./PaginationContext-Cwf8sCpK.js";
|
|
13
13
|
import { useSelectionModeContext as g } from "./contexts/SelectionModeContext.js";
|
|
14
14
|
import { useFullScreenContext as _ } from "./contexts/FullScreenContext.js";
|
|
15
15
|
import { t as v } from "./clsx-B7LyVm5O.js";
|
|
16
16
|
import { useLoaderContext as ee } from "./contexts/LoaderContext.js";
|
|
17
|
-
import { t as y } from "./RPPage-
|
|
17
|
+
import { t as y } from "./RPPage-C_r8aeTc.js";
|
|
18
18
|
import { useVirtualReactWindow as te } from "./utils/hooks/useVirtualReactWindow.js";
|
|
19
19
|
import { DualPage as ne } from "./components/page/DualPage.js";
|
|
20
20
|
import { DualPageWithCover as re } from "./components/page/DualPageWithCover.js";
|
|
@@ -22,7 +22,7 @@ import { SinglePage as ie } from "./components/page/SinglePage.js";
|
|
|
22
22
|
import { useMousePressed as ae } from "./utils/hooks/useMousePressed.js";
|
|
23
23
|
import { useGrabScroll as oe } from "./utils/hooks/useGrabScroll.js";
|
|
24
24
|
import { usePinch as se } from "./utils/hooks/usePinch.js";
|
|
25
|
-
import { t as b } from "./PasswordModal-
|
|
25
|
+
import { t as b } from "./PasswordModal-CB9Rd2zJ.js";
|
|
26
26
|
import { usePresentPage as x } from "./utils/hooks/usePresentPage.js";
|
|
27
27
|
import { LayoutContainer as ce } from "./components/layout/LayoutContainer.js";
|
|
28
28
|
import { LayoutWrapper as le } from "./components/layout/LayoutWrapper.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import './assets/SkipLink.css';//#region lib/components/layout/SkipLink.module.css
|
|
3
|
-
var t = { "rp-skip-link": "_rp-skip-
|
|
3
|
+
var t = { "rp-skip-link": "_rp-skip-link_12ssl_1" }, n = ({ href: n, label: r }) => /* @__PURE__ */ e("a", {
|
|
4
4
|
href: n,
|
|
5
5
|
className: t["rp-skip-link"],
|
|
6
6
|
onClick: (e) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useDocumentContext as e } from "./contexts/RPDocumentContext.js";
|
|
2
2
|
import { usePagesRotateContext as t } from "./contexts/PagesRotateContext.js";
|
|
3
|
-
import { r as n } from "./PaginationContext
|
|
3
|
+
import { r as n } from "./PaginationContext-Cwf8sCpK.js";
|
|
4
4
|
import { useRenderQueue as r } from "./contexts/RenderQueueProvider.js";
|
|
5
5
|
import { t as i } from "./clsx-B7LyVm5O.js";
|
|
6
6
|
import { t as a } from "./LoaderIcon-D9YjinGf.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as e } from "./PaginationContext
|
|
1
|
+
import { r as e } from "./PaginationContext-Cwf8sCpK.js";
|
|
2
2
|
import { useThumbnailContext as t } from "./contexts/ThumbnailsContext.js";
|
|
3
3
|
import { useThumbnailContainerRegister as n } from "./contexts/ElementThumbnailContext.js";
|
|
4
4
|
import { withRef as r } from "./utils/withRef.js";
|
|
5
|
-
import { t as i } from "./Thumbnail-
|
|
5
|
+
import { t as i } from "./Thumbnail-CzclS3h_.js";
|
|
6
6
|
import { useInfiniteScroll as a } from "./utils/hooks/useInfiniteScroll.js";
|
|
7
7
|
import { useCallback as o, useEffect as s, useImperativeHandle as c, useMemo as l, useRef as u } from "react";
|
|
8
8
|
import { jsx as d } from "react/jsx-runtime";
|
package/dist/assets/Button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._rp-
|
|
1
|
+
._rp-button_xxds9_1{border-radius:var(--rp-button-border-radius);padding:var(--rp-button-padding);color:var(--rp-text-color);cursor:pointer;font-size:var(--rp-icon-font-size);background:0 0;border:none;justify-content:center;align-items:center;display:inline-flex}._rp-button_xxds9_1[aria-disabled=true]{opacity:.5;cursor:not-allowed}._rp-button_xxds9_1:hover:not(:disabled),._rp-button-active_xxds9_20:not(:disabled){background:var(--rp-button-hover-background)}._rp-button_xxds9_1:disabled{cursor:not-allowed;color:var(--rp-icon-disabled)}._rp-button_xxds9_1:focus-visible{outline-color:var(--rp-outline-color,-webkit-focus-ring-color);outline-offset:0;outline-style:solid;transition:none}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._rp-dialog-
|
|
1
|
+
._rp-dialog-wrapper_39boz_1{z-index:9999;position:fixed;inset:0}._rp-dialog-overlay_39boz_7{background:var(--rp-overlay-background-color);position:fixed;inset:0}._rp-document-dialog_39boz_13{background:var(--rp-dialog-background-color);border-radius:var(--rp-border-radius);border:none;max-width:420px;padding:16px;line-height:1.5;position:relative;top:50%;left:50%;transform:translate(-50%,-50%)}._rp-document-dialog_39boz_13:focus-visible{outline:none}@media screen and (width<=640px){._rp-document-dialog_39boz_13{width:85%}}._rp-dialog-title_39boz_35{font-size:var(--rp-dialog-title-font-size);font-weight:var(--rp-dialog-title-font-weight);color:var(--rp-dialog-title-color);margin-top:0;margin-bottom:12px;line-height:normal}._rp-dialog-close_39boz_44{font-size:var(--rp-property-close-icon-size);cursor:pointer;position:absolute;top:16px;right:11px}._rp-properties-divider_39boz_52{background:var(--rp-properties-divider-color);width:100%;height:1px;margin-top:var(--rp-properties-divider-margin);margin-bottom:var(--rp-properties-divider-margin)}
|
package/dist/assets/Input.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._rp-
|
|
1
|
+
._rp-input_dun7b_1{font-family:var(--rp-font-family);border-width:1px;border-color:var(--rp-input-border-color,transparent);border-radius:var(--rp-input-border-radius);min-height:2rem;color:var(--rp-text-color);background:var(--rp-input-background-color);padding:var(--rp-input-padding);box-sizing:border-box;border-style:solid;outline:none}._rp-input_dun7b_1::placeholder{color:var(--rp-input-placeholder-color)}._rp-input_dun7b_1[data-icon=true]{padding-left:calc(1rem + 14px)}._rp-input_dun7b_1:focus,._rp-input_dun7b_1:focus-visible{border-color:var(--rp-outline-color,var(--rp-primary-color))}._rp-input-wrapper_dun7b_28{position:relative}._rp-input-label_dun7b_32{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}._rp-input-icon_dun7b_44{color:var(--rp-input-placeholder-color);justify-content:center;align-items:center;padding-left:.5rem;padding-right:.5rem;display:flex;position:absolute;top:0;bottom:0}
|
package/dist/assets/Paginate.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._rp-
|
|
1
|
+
._rp-paginate_3amlb_1{align-items:center;display:flex}._rp-page-input_3amlb_6{box-sizing:border-box;appearance:none;flex-shrink:0;width:3.5em;min-width:calc(4ch + 1rem);max-width:calc(4ch + 1rem);margin:1px .25rem;padding:.25rem .5rem}._rp-page-input_3amlb_6::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}._rp-page-input_3amlb_6::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._rp-page-input_3amlb_6[type=number]{-moz-appearance:textfield}._rp-total-page_3amlb_29{color:var(--rp-text-color);margin-right:4px;font-size:14px;font-weight:400}._rp-sr-only_3amlb_36{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._rp-password-
|
|
1
|
+
._rp-password-overlay_9cdbk_1{z-index:100;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}._rp-password-modal_9cdbk_13{background:var(--rp-password-background-color);border:1px solid var(--rp-password-border-color);border-radius:8px;flex-direction:column;justify-content:start;max-width:360px;margin-left:10px;margin-right:10px;padding:24px;display:flex;box-shadow:0 2px 12px #00000026}._rp-password-title_9cdbk_27{font-family:var(--rp-font-family);color:var(--rp-password-title-font-color);margin-bottom:16px;font-size:16px;font-weight:500}._rp-password-content_9cdbk_35{font-size:14px;font-family:var(--rp-font-family);color:var(--rp-password-content-font-color)}._rp-password-form_9cdbk_41{margin-top:32px}._rp-password-label_9cdbk_45{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}._rp-password-input_9cdbk_57{border:1px solid var(--rp-password-input-border-color);border-radius:var(--rp-input-border-radius);box-sizing:border-box;background-color:var(--rp-password-background-color);width:100%;min-height:32px;caret-color:var(--rp-password-input-color);color:var(--rp-password-input-font-color);padding:7.5px;font-size:14px}._rp-password-input_9cdbk_57::placeholder{color:var(--rp-password-input-placeholder-color)}._rp-password-input-invalid_9cdbk_74{border-color:#ff2f61}._rp-password-message-invalid_9cdbk_78{color:#ff2f61;min-height:20px;margin-top:4px}._rp-password-submit-button_9cdbk_84{text-align:center;border-radius:var(--rp-password-button-border-radius);background-color:var(--rp-password-button-background-color);width:100%;min-height:35px;color:var(--rp-password-button-font-color);cursor:pointer;font-family:var(--rp-font-family);border:1px solid var(--rp-password-button-border-color);justify-content:center;align-items:center;margin-top:8px;padding:8px;transition:background-color .2s;display:flex}
|
package/dist/assets/SkipLink.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._rp-skip-
|
|
1
|
+
._rp-skip-link_12ssl_1{z-index:10000;border:1px solid var(--rp-skip-link-border-color);border-radius:var(--rp-border-radius);background:var(--rp-skip-link-background-color);min-width:200px;min-height:36px;color:var(--rp-skip-link-color);font-size:var(--rp-skip-link-font-size);white-space:normal;text-align:center;clip:rect(0, 0, 0, 0);clip-path:inset(50%);justify-content:center;align-items:center;padding-inline:6px;font-weight:600;text-decoration:none;display:flex;position:absolute;top:6px;left:6px;overflow:hidden}._rp-skip-link_12ssl_1:focus{clip:auto;clip-path:none;overflow:visible}._rp-skip-link_12ssl_1:focus:not(:focus-visible),._rp-skip-link_12ssl_1:focus-visible{outline:none}._rp-skip-link_12ssl_1:hover{background:var(--rp-skip-link-border-color);border-color:var(--rp-skip-link-border-color)}
|
package/dist/assets/style.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../style-
|
|
1
|
+
import { t as e } from "../style-C8T5x1fE.js";
|
|
2
2
|
export { e as combinedCSS };
|
|
@@ -11,7 +11,7 @@ import { ZoomProvider as u } from "../contexts/ZoomContext.js";
|
|
|
11
11
|
import { PagesRotateProvider as d } from "../contexts/PagesRotateContext.js";
|
|
12
12
|
import { DimensionPagesProvider as f } from "../contexts/DimensionPagesContext.js";
|
|
13
13
|
import { SmoothScrollProvider as p } from "../contexts/SmoothScrollContext.js";
|
|
14
|
-
import { n as m } from "../PaginationContext
|
|
14
|
+
import { n as m } from "../PaginationContext-Cwf8sCpK.js";
|
|
15
15
|
import { DarkModeProvider as h } from "../contexts/DarkModeContext.js";
|
|
16
16
|
import { LayerProvider as g } from "../contexts/LayerContext.js";
|
|
17
17
|
import { SelectionModeProvider as _ } from "../contexts/SelectionModeContext.js";
|
|
@@ -8,7 +8,7 @@ import { LoaderProvider as a } from "../contexts/LoaderContext.js";
|
|
|
8
8
|
import { IconToolProvider as o } from "../contexts/IconToolContext.js";
|
|
9
9
|
import { OtherToolProvider as s } from "../contexts/OtherToolContext.js";
|
|
10
10
|
import { useFlickerSelectText as c } from "../utils/hooks/useFlickerSelectText.js";
|
|
11
|
-
import { t as l } from "../style-
|
|
11
|
+
import { t as l } from "../style-C8T5x1fE.js";
|
|
12
12
|
import { injectGlobalCSS as u } from "../libInjectCss.js";
|
|
13
13
|
import { injectPrintCSS as d } from "../utils/injectPrintCSS.js";
|
|
14
14
|
import { useEffect as f, useMemo as p, useRef as m } from "react";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../Container-
|
|
1
|
+
import { t as e } from "../../Container-BxNZX82X.js";
|
|
2
2
|
export { e as Container };
|