@react-pdf-kit/viewer 0.0.0-experimental.0 → 0.0.0-experimental.2
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 +84 -49
- package/dist/{Combination-54a77a7a.js → Combination-17ab8af1.js} +184 -187
- package/dist/assets/style.css +1 -1
- package/dist/assets/style.js +8 -8
- package/dist/components/RPConfig.js +5 -7
- package/dist/components/RPController.js +76 -77
- package/dist/components/RPDropFileZone.js +4 -3
- package/dist/components/RPPages.js +577 -573
- package/dist/components/RPProvider.js +2 -2
- package/dist/components/layout/RPDefaultLayout.js +10 -9
- package/dist/components/layout/RPLayout.js +10 -9
- package/dist/components/layout/WrapperLayout.js +4 -3
- package/dist/components/layout/sidebar/RPSidebar.js +8 -7
- package/dist/components/layout/sidebar/Thumbnail.js +4 -3
- package/dist/components/layout/sidebar/Thumbnails.js +4 -3
- package/dist/components/layout/toolbar/DarkModeTool.js +4 -4
- package/dist/components/layout/toolbar/DocumentDialog.js +43 -34
- package/dist/components/layout/toolbar/DocumentProperties.js +6 -6
- package/dist/components/layout/toolbar/FileDownloadTool.js +10 -9
- package/dist/components/layout/toolbar/FileUploadTool.js +10 -9
- package/dist/components/layout/toolbar/FullScreenTool.js +6 -6
- package/dist/components/layout/toolbar/MenuItem.js +6 -6
- package/dist/components/layout/toolbar/MenuSeparator.js +6 -6
- package/dist/components/layout/toolbar/MostPageTool.js +10 -9
- package/dist/components/layout/toolbar/OtherTool.js +10 -9
- package/dist/components/layout/toolbar/Paginate.js +8 -7
- package/dist/components/layout/toolbar/PrintTool.js +10 -9
- package/dist/components/layout/toolbar/RPMenuItem.js +6 -6
- package/dist/components/layout/toolbar/RPMoreOptions.js +10 -9
- package/dist/components/layout/toolbar/RPToolbar.js +10 -9
- package/dist/components/layout/toolbar/RPToolbarEnd.js +10 -9
- package/dist/components/layout/toolbar/RotateTool.js +10 -9
- package/dist/components/layout/toolbar/ScrollModeTool.js +6 -6
- package/dist/components/layout/toolbar/SearchCloseButton.js +4 -4
- package/dist/components/layout/toolbar/SearchResultNavigator.js +23 -30
- package/dist/components/layout/toolbar/SearchTool.js +104 -100
- package/dist/components/layout/toolbar/SelectionModeTool.js +6 -6
- package/dist/components/layout/toolbar/ThumbnailTool.js +8 -7
- package/dist/components/layout/toolbar/ToolbarCustom.js +4 -3
- package/dist/components/layout/toolbar/ToolbarDefault.js +10 -9
- package/dist/components/layout/toolbar/ToolbarLayout.js +10 -9
- package/dist/components/layout/toolbar/ViewModeTool.js +6 -6
- package/dist/components/layout/toolbar/ZoomTool.js +10 -9
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +9 -8
- package/dist/components/layout/toolbar/tools/DualPageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +10 -11
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +8 -7
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +8 -7
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +10 -11
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +4 -4
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +4 -4
- package/dist/components/layout/toolbar/tools/InputPageTool.js +8 -7
- package/dist/components/layout/toolbar/tools/LastPageTool.js +10 -11
- package/dist/components/layout/toolbar/tools/NextPageTool.js +8 -7
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +4 -4
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +8 -7
- package/dist/components/layout/toolbar/tools/PrintTool.js +8 -7
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +8 -7
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +8 -7
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +4 -4
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +4 -4
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +8 -7
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +4 -4
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +8 -7
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +20 -19
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +8 -7
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +10 -9
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +8 -7
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +6 -6
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +10 -9
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +10 -9
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +6 -6
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +10 -9
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +10 -9
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +10 -9
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +6 -6
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +6 -6
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +6 -6
- package/dist/components/page/AnnotationLayer.js +25 -24
- package/dist/components/page/CanvasLayer.js +38 -54
- package/dist/components/page/CustomElement.js +4 -3
- package/dist/components/page/DualPage.js +2 -2
- package/dist/components/page/DualPageWithCover.js +2 -2
- package/dist/components/page/RPPage.js +35 -35
- package/dist/components/page/SinglePage.js +2 -2
- package/dist/components/page/TextHighlightLayer.js +16 -15
- package/dist/components/page/TextLayer.js +27 -28
- package/dist/components/ui/Checkbox.js +2 -2
- package/dist/components/ui/DropDown.js +6 -6
- package/dist/components/ui/Input.js +10 -10
- package/dist/components/ui/LoadingIndicator.js +8 -7
- package/dist/components/ui/RPTooltip.js +197 -411
- package/dist/contexts/DimensionPagesContext.js +28 -56
- package/dist/contexts/DropFileZoneContext.js +5 -4
- package/dist/contexts/ElementPageContext.js +6 -5
- package/dist/contexts/FileInputContext.js +6 -5
- package/dist/contexts/HighlightContext.js +6 -5
- package/dist/contexts/InitialStateContext.js +6 -8
- package/dist/contexts/PagesRotateContext.js +6 -5
- package/dist/contexts/PaginationContext.js +6 -5
- package/dist/contexts/PrintContext.js +17 -16
- package/dist/contexts/RPDocumentContext.js +14 -13
- package/dist/contexts/RenderQueueProvider.js +14 -13
- package/dist/contexts/RotationContext.js +9 -8
- package/dist/contexts/SearchContext.js +6 -5
- package/dist/contexts/ThumbnailsContext.js +5 -4
- package/dist/contexts/ZoomContext.js +6 -5
- package/dist/{index-c0faa594.js → index-113053cf.js} +2 -2
- package/dist/index-11f3cd64.js +983 -0
- package/dist/{index-e3ee9457.js → index-23911b43.js} +6 -6
- package/dist/{index-655864a7.js → index-ada501c4.js} +1 -1
- package/dist/index-d0f0aa9a.js +1542 -0
- package/dist/main.js +47 -47
- package/dist/types/components/layout/sidebar/Thumbnail.d.ts +2 -2
- package/dist/types/contexts/RPDocumentContext.d.ts +1 -1
- package/dist/types/contexts/RenderQueueProvider.d.ts +1 -2
- package/dist/types/contexts/RenderedPagesCache.d.ts +2 -2
- package/dist/types/main.d.ts +3 -1
- package/dist/types/utils/annotations.d.ts +2 -2
- package/dist/types/utils/getThumbnailViewport.d.ts +2 -2
- package/dist/types/utils/highlight.d.ts +5 -5
- package/dist/types/utils/hooks/useHighlight.d.ts +1 -1
- package/dist/types/utils/hooks/useLoadPdf.d.ts +2 -2
- package/dist/types/utils/hooks/useLoadWorker.d.ts +5 -1
- package/dist/types/utils/hooks/usePdfProperties.d.ts +1 -1
- package/dist/types/utils/hooks/useWatermark.d.ts +1 -1
- package/dist/types/utils/link_service.d.ts +2 -3
- package/dist/types/utils/renderPage.d.ts +2 -2
- package/dist/types/utils/types.d.ts +7 -8
- package/dist/utils/highlight.js +36 -36
- package/dist/utils/hooks/useFileDownload.js +6 -5
- package/dist/utils/hooks/useHighlight.js +78 -40
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLoadPdf.js +96 -70
- package/dist/utils/hooks/useLoadWorker.js +4 -14
- package/dist/utils/hooks/usePageRotateContext.js +8 -7
- package/dist/utils/hooks/usePaginate.js +4 -3
- package/dist/utils/hooks/usePinch.js +44 -90
- package/dist/utils/hooks/usePresentPage.js +4 -3
- package/dist/utils/hooks/usePrint.js +92 -100
- package/dist/utils/hooks/useRotate.js +4 -3
- package/dist/utils/hooks/useScrollToPage.js +4 -3
- package/dist/utils/hooks/useSearch.js +16 -15
- package/dist/utils/hooks/useThumbnail.js +18 -17
- package/dist/utils/hooks/useVirtualReactWindow.js +4 -3
- package/dist/utils/hooks/useWatermark.js +43 -61
- package/dist/utils/injectPrintCSS.js +4 -3
- package/dist/utils/link_service.js +18 -19
- package/dist/utils/renderPage.js +14 -14
- package/package.json +2 -3
- package/dist/contexts/SmoothScaleContext.js +0 -67
- package/dist/floating-ui.react-dom-5ec29bd6.js +0 -1327
- package/dist/index-4baea9b5.js +0 -1198
- package/dist/types/contexts/SmoothScaleContext.d.ts +0 -16
- package/dist/types/utils/hooks/useAccumulateFactor.d.ts +0 -9
- package/dist/utils/hooks/useAccumulateFactor.js +0 -17
|
@@ -5,7 +5,8 @@ import { useHighlightContext as V } from "../../contexts/HighlightContext.js";
|
|
|
5
5
|
import { normalizeSingleKeyword as Y, sortHighlightPosition as Z, unwrap as tt } from "./searchHighlight.js";
|
|
6
6
|
import { isMatchEntireWord as et } from "../../utils/highlight.js";
|
|
7
7
|
import "../../utils/hooks/useLoadPdf.js";
|
|
8
|
-
import "
|
|
8
|
+
import "@pdf-viewer/pdfium";
|
|
9
|
+
import "@pdf-viewer/pdfium/compat";
|
|
9
10
|
import "../../utils/types.js";
|
|
10
11
|
import "../../de_DE-a553b162.js";
|
|
11
12
|
import "../../utils/getThumbnailViewport.js";
|
|
@@ -20,8 +21,8 @@ import "../../utils/charators.js";
|
|
|
20
21
|
import "../../utils/const.js";
|
|
21
22
|
const nt = {
|
|
22
23
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
23
|
-
},
|
|
24
|
-
const [$, v] = A(), { pages: R } = U(), { highlightKeywords:
|
|
24
|
+
}, kt = ({ pageNumber: w, viewport: O }) => {
|
|
25
|
+
const [$, v] = A(), { pages: R } = U(), { highlightKeywords: p } = V(), M = !0, C = N(null), [P, q] = A(null), [_, b] = A([]);
|
|
25
26
|
H(() => {
|
|
26
27
|
C.current && q(C.current.parentElement);
|
|
27
28
|
}, [C]), H(() => {
|
|
@@ -33,13 +34,13 @@ const nt = {
|
|
|
33
34
|
v(n);
|
|
34
35
|
})();
|
|
35
36
|
}, [R, w]);
|
|
36
|
-
const j = Q(() =>
|
|
37
|
+
const j = Q(() => p ? p.map((t) => {
|
|
37
38
|
var e, n;
|
|
38
39
|
return {
|
|
39
40
|
...Y(t.keyword, (e = t.options) == null ? void 0 : e.matchCase, (n = t.options) == null ? void 0 : n.wholeWords),
|
|
40
41
|
color: t.highlightColor
|
|
41
42
|
};
|
|
42
|
-
}) : [], [
|
|
43
|
+
}) : [], [p]);
|
|
43
44
|
function D(t, e) {
|
|
44
45
|
if (!t)
|
|
45
46
|
return;
|
|
@@ -84,7 +85,7 @@ const nt = {
|
|
|
84
85
|
s.setStart(o, c), s.setEnd(o, l + 1);
|
|
85
86
|
const h = document.createElement("span");
|
|
86
87
|
h.style.width = "auto", s.surroundContents(h);
|
|
87
|
-
const a = h.getBoundingClientRect(), f = t.getBoundingClientRect(), m = f.height,
|
|
88
|
+
const a = h.getBoundingClientRect(), f = t.getBoundingClientRect(), m = f.height, d = f.width, x = 100 * (a.left - f.left) / d, E = 100 * (a.top - f.top) / m, S = 100 * a.height / m, g = 100 * a.width / d;
|
|
88
89
|
return tt(h), {
|
|
89
90
|
keywordStr: e,
|
|
90
91
|
left: x,
|
|
@@ -92,7 +93,7 @@ const nt = {
|
|
|
92
93
|
height: S,
|
|
93
94
|
width: g,
|
|
94
95
|
pageHeight: m,
|
|
95
|
-
pageWidth:
|
|
96
|
+
pageWidth: d
|
|
96
97
|
};
|
|
97
98
|
};
|
|
98
99
|
async function z(t, e) {
|
|
@@ -129,14 +130,14 @@ const nt = {
|
|
|
129
130
|
const { keyword: l, regExp: h, wholeWords: a, color: f } = c, m = l;
|
|
130
131
|
if (!m.trim())
|
|
131
132
|
return;
|
|
132
|
-
const
|
|
133
|
+
const d = h.flags.indexOf("g") === -1 ? new RegExp(h, `${h.flags}g`) : h;
|
|
133
134
|
let x;
|
|
134
135
|
const E = [];
|
|
135
|
-
for (; (x =
|
|
136
|
+
for (; (x = d.exec(i)) !== null; )
|
|
136
137
|
a && !et(i, x.index, x[0].length) || E.push({
|
|
137
|
-
keyword:
|
|
138
|
+
keyword: d,
|
|
138
139
|
startIndex: x.index,
|
|
139
|
-
endIndex:
|
|
140
|
+
endIndex: d.lastIndex
|
|
140
141
|
});
|
|
141
142
|
const S = E.map((g) => ({
|
|
142
143
|
keyword: g.keyword,
|
|
@@ -168,17 +169,17 @@ const nt = {
|
|
|
168
169
|
};
|
|
169
170
|
return H(() => {
|
|
170
171
|
(async () => {
|
|
171
|
-
if (!
|
|
172
|
+
if (!p || p.length === 0) {
|
|
172
173
|
b([]);
|
|
173
174
|
return;
|
|
174
175
|
}
|
|
175
176
|
try {
|
|
176
|
-
await z(w,
|
|
177
|
+
await z(w, p);
|
|
177
178
|
} catch (e) {
|
|
178
179
|
console.error(e);
|
|
179
180
|
}
|
|
180
181
|
})();
|
|
181
|
-
}, [M,
|
|
182
|
+
}, [M, p, w, $, O]), /* @__PURE__ */ k(J, { children: /* @__PURE__ */ k("div", { ref: C, "data-rp": `page-${w}-textHighlightLayer`, children: _.map((t, e) => /* @__PURE__ */ k(
|
|
182
183
|
"div",
|
|
183
184
|
{
|
|
184
185
|
className: nt["rp-text-highlight"],
|
|
@@ -194,5 +195,5 @@ const nt = {
|
|
|
194
195
|
)) }) });
|
|
195
196
|
};
|
|
196
197
|
export {
|
|
197
|
-
|
|
198
|
+
kt as TextHighlightLayer
|
|
198
199
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as g, useState as
|
|
3
|
-
import { useDocumentContext as
|
|
4
|
-
import
|
|
5
|
-
import { resetDivs as
|
|
6
|
-
import { useSearchContext as
|
|
7
|
-
import { useSmoothScaleContext as z } from "../../contexts/SmoothScaleContext.js";
|
|
1
|
+
import { jsx as I } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as g, useState as H, useMemo as P, useCallback as _, useEffect as w } from "react";
|
|
3
|
+
import { useDocumentContext as G } from "../../contexts/RPDocumentContext.js";
|
|
4
|
+
import { TextLayerBuilder as J } from "@pdf-viewer/pdfium/compat";
|
|
5
|
+
import { resetDivs as $, highlightMatches as U } from "../../utils/highlight.js";
|
|
6
|
+
import { useSearchContext as V } from "../../contexts/SearchContext.js";
|
|
8
7
|
import "../../utils/hooks/useLoadPdf.js";
|
|
8
|
+
import "@pdf-viewer/pdfium";
|
|
9
9
|
import "../../utils/types.js";
|
|
10
10
|
import "../../de_DE-a553b162.js";
|
|
11
11
|
import "../../utils/getThumbnailViewport.js";
|
|
@@ -38,31 +38,31 @@ import "../../contexts/SmoothScrollContext.js";
|
|
|
38
38
|
import "../../utils/getScrollDistance.js";
|
|
39
39
|
import "../../utils/calculatePage.js";
|
|
40
40
|
import "../../utils/getWordPositionInPage.js";
|
|
41
|
-
const
|
|
41
|
+
const X = "_selecting_1553j_14", z = "_markedContent_1553j_37", a = {
|
|
42
42
|
"rp-text-layer": "_rp-text-layer_1553j_1",
|
|
43
|
-
selecting:
|
|
44
|
-
markedContent:
|
|
43
|
+
selecting: X,
|
|
44
|
+
markedContent: z,
|
|
45
45
|
"rp-text-layer-text": "_rp-text-layer-text_1553j_61"
|
|
46
|
-
}, ke = (
|
|
47
|
-
const { pageNumber: d } =
|
|
46
|
+
}, ke = (j) => {
|
|
47
|
+
const { pageNumber: d } = j, { pages: R } = G(), i = g(null), { matches: O, currentMatch: v } = V(), [D, A] = H(
|
|
48
48
|
[]
|
|
49
|
-
), p = g(), h = g(), L = g([]), y =
|
|
49
|
+
), p = g(), h = g(), L = g([]), y = P(() => O.filter((r) => r.pageIndex === d - 1), [O, d]), T = _(
|
|
50
50
|
(r, t, e = !1) => {
|
|
51
|
-
if (e &&
|
|
51
|
+
if (e && $(r, t), !y.length) {
|
|
52
52
|
L.current = [], A([]);
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
const n =
|
|
55
|
+
const n = U(y, r, t);
|
|
56
56
|
A(n);
|
|
57
57
|
},
|
|
58
58
|
[y]
|
|
59
|
-
), x = g(), C = g(!1),
|
|
59
|
+
), x = g(), C = g(!1), E = _(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
60
60
|
w(() => ((() => {
|
|
61
61
|
if (x.current)
|
|
62
62
|
return;
|
|
63
63
|
x.current = new AbortController();
|
|
64
64
|
const { signal: t } = x.current, e = () => {
|
|
65
|
-
|
|
65
|
+
E().forEach((o) => {
|
|
66
66
|
const s = o.querySelector(".endOfContent");
|
|
67
67
|
s && (o.appendChild(s), s.style.width = "", s.style.height = "", o.classList.remove(a.selecting));
|
|
68
68
|
});
|
|
@@ -96,7 +96,7 @@ const F = "_selecting_1553j_14", K = "_markedContent_1553j_37", a = {
|
|
|
96
96
|
document.addEventListener(
|
|
97
97
|
"selectionchange",
|
|
98
98
|
() => {
|
|
99
|
-
var M,
|
|
99
|
+
var M, k;
|
|
100
100
|
const o = document.getSelection();
|
|
101
101
|
if (!o)
|
|
102
102
|
return;
|
|
@@ -107,11 +107,11 @@ const F = "_selecting_1553j_14", K = "_markedContent_1553j_37", a = {
|
|
|
107
107
|
const s = /* @__PURE__ */ new Set();
|
|
108
108
|
for (let c = 0; c < o.rangeCount; c++) {
|
|
109
109
|
const f = o.getRangeAt(c);
|
|
110
|
-
|
|
110
|
+
E().forEach((N) => {
|
|
111
111
|
f.intersectsNode(N) && !s.has(N) && s.add(N);
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
|
|
114
|
+
E().forEach((c) => {
|
|
115
115
|
if (s.has(c))
|
|
116
116
|
c.classList.add(a.selecting);
|
|
117
117
|
else {
|
|
@@ -124,16 +124,16 @@ const F = "_selecting_1553j_14", K = "_markedContent_1553j_37", a = {
|
|
|
124
124
|
u.nodeType === Node.TEXT_NODE && (u = u.parentNode);
|
|
125
125
|
const m = (M = u.parentElement) == null ? void 0 : M.closest(
|
|
126
126
|
a["rp-text-layer"]
|
|
127
|
-
),
|
|
128
|
-
|
|
127
|
+
), S = m == null ? void 0 : m.querySelector(".endOfContent");
|
|
128
|
+
S && m && (S.style.width = m.style.width, S.style.height = m.style.height, (k = u.parentElement) == null || k.insertBefore(S, u.nextSibling)), n = l.cloneRange();
|
|
129
129
|
},
|
|
130
130
|
{ signal: t }
|
|
131
131
|
);
|
|
132
132
|
})(), () => {
|
|
133
133
|
var t;
|
|
134
134
|
(t = x.current) == null || t.abort(), x.current = void 0;
|
|
135
|
-
}), [
|
|
136
|
-
const
|
|
135
|
+
}), [E]);
|
|
136
|
+
const q = _(() => {
|
|
137
137
|
i.current && i.current.classList.add(a.selecting);
|
|
138
138
|
}, []), B = _(() => {
|
|
139
139
|
i.current && i.current.classList.remove(a.selecting);
|
|
@@ -159,7 +159,7 @@ const F = "_selecting_1553j_14", K = "_markedContent_1553j_37", a = {
|
|
|
159
159
|
const t = i.current;
|
|
160
160
|
return p.current && p.current.cancel(), r.page.getTextContent().then((e) => {
|
|
161
161
|
const n = r.page.getViewport({ scale: 1 });
|
|
162
|
-
return p.current = new
|
|
162
|
+
return p.current = new J({
|
|
163
163
|
viewport: n,
|
|
164
164
|
textContentSource: e,
|
|
165
165
|
container: t
|
|
@@ -185,15 +185,14 @@ const F = "_selecting_1553j_14", K = "_markedContent_1553j_37", a = {
|
|
|
185
185
|
});
|
|
186
186
|
const t = (e = p.current) == null ? void 0 : e.textDivs;
|
|
187
187
|
t && h.current && T(h.current, t, !0);
|
|
188
|
-
}, [T]), /* @__PURE__ */
|
|
188
|
+
}, [T]), /* @__PURE__ */ I(
|
|
189
189
|
"div",
|
|
190
190
|
{
|
|
191
191
|
"data-rp-text-layer": !0,
|
|
192
192
|
"data-rp": `page-${d}-textLayer`,
|
|
193
193
|
className: a["rp-text-layer"],
|
|
194
194
|
ref: i,
|
|
195
|
-
|
|
196
|
-
onMouseDown: I,
|
|
195
|
+
onMouseDown: q,
|
|
197
196
|
onMouseUp: B
|
|
198
197
|
}
|
|
199
198
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i, jsxs as w, Fragment as U } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { c as z, a as B, P as y, b as S, d as G, f as K } from "../../index-
|
|
4
|
-
import { u as X } from "../../index-
|
|
3
|
+
import { c as z, a as B, P as y, b as S, d as G, f as K } from "../../index-113053cf.js";
|
|
4
|
+
import { u as X } from "../../index-ada501c4.js";
|
|
5
5
|
import { CheckIcon as J } from "../icons/CheckIcon.js";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
function Q(e) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as p, jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { R as l, T as c, P as _, C as m } from "../../index-
|
|
2
|
+
import { R as l, T as c, P as _, C as m } from "../../index-11f3cd64.js";
|
|
3
3
|
import { c as A } from "../../clsx-0c6e471a.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "../../index-
|
|
5
|
+
import "../../index-113053cf.js";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
import "../../index-
|
|
8
|
-
import "../../Combination-
|
|
9
|
-
import "../../
|
|
10
|
-
import "../../index-
|
|
7
|
+
import "../../index-23911b43.js";
|
|
8
|
+
import "../../Combination-17ab8af1.js";
|
|
9
|
+
import "../../index-d0f0aa9a.js";
|
|
10
|
+
import "../../index-ada501c4.js";
|
|
11
11
|
const F = "_slideDownAndFade_1vzkq_1", w = "_slideLeftAndFade_1vzkq_1", f = "_slideUpAndFade_1vzkq_1", g = "_slideRightAndFade_1vzkq_1", h = {
|
|
12
12
|
"rp-dropdown-content": "_rp-dropdown-content_1vzkq_1",
|
|
13
13
|
slideDownAndFade: F,
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { c as u } from "../../clsx-0c6e471a.js";
|
|
3
3
|
import { withRef as l } from "../../utils/withRef.js";
|
|
4
4
|
import "react";
|
|
5
5
|
const t = {
|
|
6
|
-
"rp-input": "_rp-
|
|
7
|
-
"rp-input-wrapper": "_rp-input-
|
|
8
|
-
"rp-input-icon": "_rp-input-
|
|
6
|
+
"rp-input": "_rp-input_5b7ag_1",
|
|
7
|
+
"rp-input-wrapper": "_rp-input-wrapper_5b7ag_28",
|
|
8
|
+
"rp-input-icon": "_rp-input-icon_5b7ag_32"
|
|
9
9
|
}, h = l((n, e) => {
|
|
10
|
-
const { className: o, icon:
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
const { className: o, icon: r, children: s, ...p } = n, a = p.role || (p.type === "text" || !p.type ? "textbox" : void 0);
|
|
11
|
+
return /* @__PURE__ */ c("div", { className: t["rp-input-wrapper"], children: [
|
|
12
12
|
/* @__PURE__ */ i(
|
|
13
13
|
"input",
|
|
14
14
|
{
|
|
15
|
-
...
|
|
16
|
-
role:
|
|
17
|
-
"data-icon": !!
|
|
15
|
+
...p,
|
|
16
|
+
role: a,
|
|
17
|
+
"data-icon": !!r,
|
|
18
18
|
ref: e,
|
|
19
19
|
className: u(o, t["rp-input"], "ignore-hover")
|
|
20
20
|
}
|
|
21
21
|
),
|
|
22
|
-
|
|
22
|
+
r && /* @__PURE__ */ i("span", { className: t["rp-input-icon"], "aria-hidden": "true", children: r }),
|
|
23
23
|
s
|
|
24
24
|
] });
|
|
25
25
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
1
|
+
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { c as o } from "../../clsx-0c6e471a.js";
|
|
3
3
|
import { usePrintContext as p } from "../../contexts/PrintContext.js";
|
|
4
4
|
import { useLocalizationContext as d } from "../../contexts/LocalizationContext.js";
|
|
@@ -6,7 +6,8 @@ import "react";
|
|
|
6
6
|
import "../../utils/hooks/usePrint.js";
|
|
7
7
|
import "../../contexts/RPDocumentContext.js";
|
|
8
8
|
import "../../utils/hooks/useLoadPdf.js";
|
|
9
|
-
import "
|
|
9
|
+
import "@pdf-viewer/pdfium";
|
|
10
|
+
import "@pdf-viewer/pdfium/compat";
|
|
10
11
|
import "../../utils/types.js";
|
|
11
12
|
import "../../de_DE-a553b162.js";
|
|
12
13
|
import "../../utils/getThumbnailViewport.js";
|
|
@@ -25,10 +26,10 @@ const s = "_loading_wazy2_1", i = {
|
|
|
25
26
|
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
|
|
26
27
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
|
|
27
28
|
loading: s
|
|
28
|
-
},
|
|
29
|
+
}, P = ({ percentage: t }) => {
|
|
29
30
|
const { cancel: l } = p(), { localeMessages: r } = d();
|
|
30
|
-
return
|
|
31
|
-
/* @__PURE__ */
|
|
31
|
+
return t < 1 ? null : /* @__PURE__ */ a("div", { className: o(i["rp-loading-overlay"]), children: /* @__PURE__ */ n("div", { className: o(i["rp-loading-modal"]), children: [
|
|
32
|
+
/* @__PURE__ */ n("div", { className: o(i["rp-loading-title"]), children: [
|
|
32
33
|
r == null ? void 0 : r.printLoadingMessage,
|
|
33
34
|
"..."
|
|
34
35
|
] }),
|
|
@@ -36,12 +37,12 @@ const s = "_loading_wazy2_1", i = {
|
|
|
36
37
|
"div",
|
|
37
38
|
{
|
|
38
39
|
className: o(i["rp-loading-progress"]),
|
|
39
|
-
style: { width: `${
|
|
40
|
+
style: { width: `${t}%` }
|
|
40
41
|
}
|
|
41
42
|
) }),
|
|
42
43
|
/* @__PURE__ */ a("button", { className: o(i["rp-loading-cancel-button"]), onClick: l, children: r == null ? void 0 : r.printCancelLabel })
|
|
43
44
|
] }) });
|
|
44
45
|
};
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
P as default
|
|
47
48
|
};
|