@react-pdf-kit/viewer 2.0.0-beta.9 → 2.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Combination-136ff99c.js +698 -0
- package/dist/MostPageTool.module-13578ad6.js +6 -0
- package/dist/OtherTool.module-a4be5f1f.js +6 -0
- package/dist/Paginate.module-4eef00aa.js +8 -0
- package/dist/PaginationContext-9217cab4.js +201 -0
- package/dist/RPLayout.module-b4b23e29.js +14 -0
- package/dist/RPSplitter-f6acf13b.js +71 -0
- package/dist/RPToolbar.module-27d7fe77.js +10 -0
- package/dist/SearchTool.module-99f60dc7.js +16 -0
- package/dist/ToolbarLayout.module-6e339802.js +12 -0
- package/dist/ZoomTool.module-7082af8c.js +12 -0
- package/dist/assets/style.css +1 -1
- package/dist/assets/style.js +32 -30
- package/dist/components/RPController.js +81 -152
- package/dist/components/RPDropFileZone.js +1 -1
- package/dist/components/RPPages.js +1028 -122
- package/dist/components/RPProvider.js +57 -113
- package/dist/components/icons/DualPageWithCoverIcon.js +22 -0
- package/dist/components/layout/LayoutContainer.js +31 -136
- package/dist/components/layout/LayoutWrapper.js +8 -4
- package/dist/components/layout/RPDefaultLayout.js +184 -86
- package/dist/components/layout/RPLayout.js +123 -105
- package/dist/components/layout/SkipLink.js +29 -0
- package/dist/components/layout/WrapperLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +79 -112
- package/dist/components/layout/sidebar/RPSplitter.js +6 -59
- package/dist/components/layout/sidebar/Thumbnail.js +130 -125
- package/dist/components/layout/sidebar/Thumbnails.js +56 -119
- package/dist/components/layout/toolbar/DarkModeTool.js +7 -5
- package/dist/components/layout/toolbar/DocumentDialog.js +305 -131
- package/dist/components/layout/toolbar/DocumentProperties.js +13 -10
- package/dist/components/layout/toolbar/FileDownloadTool.js +34 -124
- package/dist/components/layout/toolbar/FileUploadTool.js +9 -6
- package/dist/components/layout/toolbar/FullScreenTool.js +17 -14
- package/dist/components/layout/toolbar/MenuItem.js +11 -8
- package/dist/components/layout/toolbar/MenuSeparator.js +8 -5
- package/dist/components/layout/toolbar/MostPageTool.js +66 -125
- package/dist/components/layout/toolbar/OtherTool.js +171 -112
- package/dist/components/layout/toolbar/Paginate.js +121 -116
- package/dist/components/layout/toolbar/PrintTool.js +55 -123
- package/dist/components/layout/toolbar/RPMenuItem.js +14 -11
- package/dist/components/layout/toolbar/RPMoreOptions.js +102 -154
- package/dist/components/layout/toolbar/RPToolbar.js +90 -79
- package/dist/components/layout/toolbar/RPToolbarEnd.js +69 -88
- package/dist/components/layout/toolbar/RotateTool.js +13 -10
- package/dist/components/layout/toolbar/ScrollModeTool.js +42 -39
- package/dist/components/layout/toolbar/SearchCloseButton.js +24 -10
- package/dist/components/layout/toolbar/SearchResultNavigator.js +74 -105
- package/dist/components/layout/toolbar/SearchTool.js +245 -121
- package/dist/components/layout/toolbar/SelectionModeTool.js +9 -6
- package/dist/components/layout/toolbar/ThumbnailTool.js +15 -122
- package/dist/components/layout/toolbar/ToolbarCustom.js +75 -143
- package/dist/components/layout/toolbar/ToolbarDefault.js +135 -122
- package/dist/components/layout/toolbar/ToolbarLayout.js +86 -81
- package/dist/components/layout/toolbar/ViewModeTool.js +47 -35
- package/dist/components/layout/toolbar/ZoomTool.js +129 -119
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +18 -122
- package/dist/components/layout/toolbar/tools/DualPageTool.js +11 -129
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +202 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +14 -123
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +10 -8
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +197 -0
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +21 -18
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/InputPageTool.js +52 -136
- package/dist/components/layout/toolbar/tools/LastPageTool.js +197 -0
- package/dist/components/layout/toolbar/tools/NextPageTool.js +39 -129
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +28 -118
- package/dist/components/layout/toolbar/tools/PrintTool.js +14 -123
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +18 -9
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +15 -13
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +24 -14
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +11 -129
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +16 -6
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +23 -131
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +21 -18
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +23 -136
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +80 -141
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +18 -15
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +98 -105
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +16 -123
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +17 -14
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +29 -127
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +31 -130
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +28 -17
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +63 -134
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +33 -131
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +41 -24
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +58 -37
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +44 -25
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +56 -30
- package/dist/components/page/AnnotationLayer.js +130 -125
- package/dist/components/page/CanvasLayer.js +57 -126
- package/dist/components/page/CustomElement.js +1 -1
- package/dist/components/page/DualPage.js +69 -110
- package/dist/components/page/DualPageWithCover.js +131 -0
- package/dist/components/page/RPPage.js +126 -123
- package/dist/components/page/SinglePage.js +59 -110
- package/dist/components/page/TextHighlightLayer.js +187 -129
- package/dist/components/page/TextLayer.js +186 -125
- package/dist/components/ui/Button.js +14 -12
- package/dist/components/ui/Checkbox.js +78 -70
- package/dist/components/ui/DropDown.js +11 -8
- package/dist/components/ui/Input.js +12 -11
- package/dist/components/ui/LoadingIndicator.js +34 -127
- package/dist/components/ui/PasswordModal.js +44 -30
- package/dist/components/ui/RPTooltip.js +121 -135
- 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 +15 -118
- package/dist/contexts/PrintContext.js +67 -131
- package/dist/contexts/RPDocumentContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +48 -118
- package/dist/contexts/RotationContext.js +1 -1
- package/dist/contexts/ScrollModeContext.js +1 -1
- package/dist/contexts/SearchContext.js +66 -112
- package/dist/contexts/SelectionModeContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +32 -131
- package/dist/contexts/ViewModeContext.js +19 -15
- package/dist/contexts/ZoomContext.js +1 -1
- package/dist/de_DE-a553b162.js +489 -0
- package/dist/floating-ui.react-dom-5ec29bd6.js +1327 -0
- package/dist/index-61f59539.js +1198 -0
- package/dist/index-655864a7.js +27 -0
- package/dist/{index-c9a2990a.js → index-c0faa594.js} +64 -87
- package/dist/index-e3ee9457.js +150 -0
- package/dist/main.js +193 -130
- 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 +8 -2
- 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 +23 -130
- 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 +23 -126
- package/dist/utils/hooks/usePinch.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +79 -129
- package/dist/utils/hooks/usePrint.js +175 -130
- package/dist/utils/hooks/useRotate.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +18 -121
- package/dist/utils/hooks/useSearch.js +149 -127
- package/dist/utils/hooks/useTextSelection.js +76 -0
- package/dist/utils/hooks/useThumbnail.js +50 -131
- package/dist/utils/hooks/useVirtualReactWindow.js +84 -128
- package/dist/utils/types.js +14 -13
- package/dist/utils/withRef.js +5 -5
- package/package.json +5 -4
- package/dist/LayoutWrapper-6224491f.js +0 -19
- package/dist/SearchCloseButton-08d57275.js +0 -33
- package/dist/ToolbarLayout.module-8d56d12b.js +0 -3560
- package/dist/floating-ui.react-dom-d22a10b4.js +0 -1474
- package/dist/index-3bf64864.js +0 -1886
- package/dist/th_TH-d627cd51.js +0 -398
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as p, jsxs as Y } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
6
|
-
import {
|
|
3
|
+
import { P as S, c as ae, a as k, u as oe, f as Fe, b as E, d as We, i as Be } from "../../index-c0faa594.js";
|
|
4
|
+
import { a as Ge, u as Xe, D as Ve } from "../../index-e3ee9457.js";
|
|
5
|
+
import { u as Ue, a as ze, o as qe, s as Ze, f as Ke, b as Je, c as Qe, h as et, l as tt } from "../../floating-ui.react-dom-5ec29bd6.js";
|
|
6
|
+
import { u as rt } from "../../index-655864a7.js";
|
|
7
|
+
import { withRef as ot } from "../../utils/withRef.js";
|
|
7
8
|
import "react-dom";
|
|
8
|
-
var
|
|
9
|
+
var nt = "Arrow", se = a.forwardRef((e, r) => {
|
|
9
10
|
const { children: t, width: o = 10, height: n = 5, ...i } = e;
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ p(
|
|
11
12
|
S.svg,
|
|
12
13
|
{
|
|
13
14
|
...i,
|
|
@@ -16,42 +17,27 @@ var it = "Arrow", se = a.forwardRef((e, r) => {
|
|
|
16
17
|
height: n,
|
|
17
18
|
viewBox: "0 0 30 10",
|
|
18
19
|
preserveAspectRatio: "none",
|
|
19
|
-
children: e.asChild ? t : /* @__PURE__ */
|
|
20
|
+
children: e.asChild ? t : /* @__PURE__ */ p("polygon", { points: "0,0 30,0 15,10" })
|
|
20
21
|
}
|
|
21
22
|
);
|
|
22
23
|
});
|
|
23
|
-
se.displayName =
|
|
24
|
-
var
|
|
25
|
-
function ct(e) {
|
|
26
|
-
const r = Fe(e);
|
|
27
|
-
return Be(() => {
|
|
28
|
-
r.current = e;
|
|
29
|
-
}), We(
|
|
30
|
-
() => (...t) => {
|
|
31
|
-
var o;
|
|
32
|
-
return (o = r.current) === null || o === void 0 ? void 0 : o.call(r, ...t);
|
|
33
|
-
},
|
|
34
|
-
[]
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
const oe = globalThis != null && globalThis.document ? Ge : () => {
|
|
38
|
-
};
|
|
39
|
-
var W = "Popper", [ie, le] = ae(W), [dt, ce] = ie(W), de = (e) => {
|
|
24
|
+
se.displayName = nt;
|
|
25
|
+
var at = se, B = "Popper", [ie, le] = ae(B), [st, ce] = ie(B), pe = (e) => {
|
|
40
26
|
const { __scopePopper: r, children: t } = e, [o, n] = a.useState(null);
|
|
41
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ p(st, { scope: r, anchor: o, onAnchorChange: n, children: t });
|
|
42
28
|
};
|
|
43
|
-
|
|
44
|
-
var
|
|
29
|
+
pe.displayName = B;
|
|
30
|
+
var de = "PopperAnchor", ue = a.forwardRef(
|
|
45
31
|
(e, r) => {
|
|
46
|
-
const { __scopePopper: t, virtualRef: o, ...n } = e, i = ce(
|
|
32
|
+
const { __scopePopper: t, virtualRef: o, ...n } = e, i = ce(de, t), l = a.useRef(null), h = k(r, l), s = a.useRef(null);
|
|
47
33
|
return a.useEffect(() => {
|
|
48
|
-
const
|
|
49
|
-
s.current = (o == null ? void 0 : o.current) || l.current,
|
|
50
|
-
}), o ? null : /* @__PURE__ */
|
|
34
|
+
const d = s.current;
|
|
35
|
+
s.current = (o == null ? void 0 : o.current) || l.current, d !== s.current && i.onAnchorChange(s.current);
|
|
36
|
+
}), o ? null : /* @__PURE__ */ p(S.div, { ...n, ref: h });
|
|
51
37
|
}
|
|
52
38
|
);
|
|
53
|
-
ue.displayName =
|
|
54
|
-
var G = "PopperContent", [
|
|
39
|
+
ue.displayName = de;
|
|
40
|
+
var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
|
|
55
41
|
(e, r) => {
|
|
56
42
|
var Z, K, J, Q, ee, te;
|
|
57
43
|
const {
|
|
@@ -62,56 +48,56 @@ var G = "PopperContent", [pt, ut] = ie(G), fe = a.forwardRef(
|
|
|
62
48
|
alignOffset: l = 0,
|
|
63
49
|
arrowPadding: h = 0,
|
|
64
50
|
avoidCollisions: s = !0,
|
|
65
|
-
collisionBoundary:
|
|
51
|
+
collisionBoundary: d = [],
|
|
66
52
|
collisionPadding: c = 0,
|
|
67
53
|
sticky: f = "partial",
|
|
68
54
|
hideWhenDetached: g = !1,
|
|
69
55
|
updatePositionStrategy: u = "optimized",
|
|
70
56
|
onPlaced: v,
|
|
71
57
|
...m
|
|
72
|
-
} = e, y = ce(G, t), [w, x] = a.useState(null),
|
|
58
|
+
} = e, y = ce(G, t), [w, x] = a.useState(null), T = k(r, (_) => x(_)), [C, b] = a.useState(null), P = rt(C), N = (P == null ? void 0 : P.width) ?? 0, V = (P == null ? void 0 : P.height) ?? 0, Ee = o + (i !== "center" ? "-" + i : ""), Re = typeof c == "number" ? c : { top: 0, right: 0, bottom: 0, left: 0, ...c }, U = Array.isArray(d) ? d : [d], _e = U.length > 0, D = {
|
|
73
59
|
padding: Re,
|
|
74
|
-
boundary: U.filter(
|
|
60
|
+
boundary: U.filter(pt),
|
|
75
61
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
76
62
|
altBoundary: _e
|
|
77
|
-
}, { refs: Oe, floatingStyles: z, placement: Se, isPositioned: H, middlewareData: A } =
|
|
63
|
+
}, { refs: Oe, floatingStyles: z, placement: Se, isPositioned: H, middlewareData: A } = Ue({
|
|
78
64
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
79
65
|
strategy: "fixed",
|
|
80
66
|
placement: Ee,
|
|
81
|
-
whileElementsMounted: (..._) =>
|
|
67
|
+
whileElementsMounted: (..._) => ze(..._, {
|
|
82
68
|
animationFrame: u === "always"
|
|
83
69
|
}),
|
|
84
70
|
elements: {
|
|
85
71
|
reference: y.anchor
|
|
86
72
|
},
|
|
87
73
|
middleware: [
|
|
88
|
-
|
|
89
|
-
s &&
|
|
74
|
+
qe({ mainAxis: n + V, alignmentAxis: l }),
|
|
75
|
+
s && Ze({
|
|
90
76
|
mainAxis: !0,
|
|
91
77
|
crossAxis: !1,
|
|
92
|
-
limiter: f === "partial" ?
|
|
78
|
+
limiter: f === "partial" ? tt() : void 0,
|
|
93
79
|
...D
|
|
94
80
|
}),
|
|
95
|
-
s &&
|
|
96
|
-
|
|
81
|
+
s && Ke({ ...D }),
|
|
82
|
+
Je({
|
|
97
83
|
...D,
|
|
98
84
|
apply: ({ elements: _, rects: re, availableWidth: Me, availableHeight: $e }) => {
|
|
99
85
|
const { width: je, height: Ye } = re.reference, L = _.floating.style;
|
|
100
86
|
L.setProperty("--radix-popper-available-width", `${Me}px`), L.setProperty("--radix-popper-available-height", `${$e}px`), L.setProperty("--radix-popper-anchor-width", `${je}px`), L.setProperty("--radix-popper-anchor-height", `${Ye}px`);
|
|
101
87
|
}
|
|
102
88
|
}),
|
|
103
|
-
C &&
|
|
104
|
-
|
|
105
|
-
g &&
|
|
89
|
+
C && Qe({ element: C, padding: h }),
|
|
90
|
+
dt({ arrowWidth: N, arrowHeight: V }),
|
|
91
|
+
g && et({ strategy: "referenceHidden", ...D })
|
|
106
92
|
]
|
|
107
|
-
}), [q, Ne] = ge(Se), I =
|
|
93
|
+
}), [q, Ne] = ge(Se), I = Ge(v);
|
|
108
94
|
oe(() => {
|
|
109
95
|
H && (I == null || I());
|
|
110
96
|
}, [H, I]);
|
|
111
97
|
const De = (Z = A.arrow) == null ? void 0 : Z.x, He = (K = A.arrow) == null ? void 0 : K.y, Ie = ((J = A.arrow) == null ? void 0 : J.centerOffset) !== 0, [Le, ke] = a.useState();
|
|
112
98
|
return oe(() => {
|
|
113
99
|
w && ke(window.getComputedStyle(w).zIndex);
|
|
114
|
-
}, [w]), /* @__PURE__ */
|
|
100
|
+
}, [w]), /* @__PURE__ */ p(
|
|
115
101
|
"div",
|
|
116
102
|
{
|
|
117
103
|
ref: Oe.setFloating,
|
|
@@ -135,22 +121,22 @@ var G = "PopperContent", [pt, ut] = ie(G), fe = a.forwardRef(
|
|
|
135
121
|
}
|
|
136
122
|
},
|
|
137
123
|
dir: e.dir,
|
|
138
|
-
children: /* @__PURE__ */
|
|
139
|
-
|
|
124
|
+
children: /* @__PURE__ */ p(
|
|
125
|
+
it,
|
|
140
126
|
{
|
|
141
127
|
scope: t,
|
|
142
128
|
placedSide: q,
|
|
143
|
-
onArrowChange:
|
|
129
|
+
onArrowChange: b,
|
|
144
130
|
arrowX: De,
|
|
145
131
|
arrowY: He,
|
|
146
132
|
shouldHideArrow: Ie,
|
|
147
|
-
children: /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ p(
|
|
148
134
|
S.div,
|
|
149
135
|
{
|
|
150
136
|
"data-side": q,
|
|
151
137
|
"data-align": Ne,
|
|
152
138
|
...m,
|
|
153
|
-
ref:
|
|
139
|
+
ref: T,
|
|
154
140
|
style: {
|
|
155
141
|
...m.style,
|
|
156
142
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
@@ -166,18 +152,18 @@ var G = "PopperContent", [pt, ut] = ie(G), fe = a.forwardRef(
|
|
|
166
152
|
}
|
|
167
153
|
);
|
|
168
154
|
fe.displayName = G;
|
|
169
|
-
var he = "PopperArrow",
|
|
155
|
+
var he = "PopperArrow", ct = {
|
|
170
156
|
top: "bottom",
|
|
171
157
|
right: "left",
|
|
172
158
|
bottom: "top",
|
|
173
159
|
left: "right"
|
|
174
160
|
}, ve = a.forwardRef(function(r, t) {
|
|
175
|
-
const { __scopePopper: o, ...n } = r, i =
|
|
161
|
+
const { __scopePopper: o, ...n } = r, i = lt(he, o), l = ct[i.placedSide];
|
|
176
162
|
return (
|
|
177
163
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
178
164
|
// doesn't report size as we'd expect on SVG elements.
|
|
179
165
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
180
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ p(
|
|
181
167
|
"span",
|
|
182
168
|
{
|
|
183
169
|
ref: i.onArrowChange,
|
|
@@ -200,8 +186,8 @@ var he = "PopperArrow", ft = {
|
|
|
200
186
|
}[i.placedSide],
|
|
201
187
|
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
202
188
|
},
|
|
203
|
-
children: /* @__PURE__ */
|
|
204
|
-
|
|
189
|
+
children: /* @__PURE__ */ p(
|
|
190
|
+
at,
|
|
205
191
|
{
|
|
206
192
|
...n,
|
|
207
193
|
ref: t,
|
|
@@ -217,24 +203,24 @@ var he = "PopperArrow", ft = {
|
|
|
217
203
|
);
|
|
218
204
|
});
|
|
219
205
|
ve.displayName = he;
|
|
220
|
-
function
|
|
206
|
+
function pt(e) {
|
|
221
207
|
return e !== null;
|
|
222
208
|
}
|
|
223
|
-
var
|
|
209
|
+
var dt = (e) => ({
|
|
224
210
|
name: "transformOrigin",
|
|
225
211
|
options: e,
|
|
226
212
|
fn(r) {
|
|
227
213
|
var y, w, x;
|
|
228
|
-
const { placement: t, rects: o, middlewareData: n } = r, l = ((y = n.arrow) == null ? void 0 : y.centerOffset) !== 0, h = l ? 0 : e.arrowWidth, s = l ? 0 : e.arrowHeight, [
|
|
214
|
+
const { placement: t, rects: o, middlewareData: n } = r, l = ((y = n.arrow) == null ? void 0 : y.centerOffset) !== 0, h = l ? 0 : e.arrowWidth, s = l ? 0 : e.arrowHeight, [d, c] = ge(t), f = { start: "0%", center: "50%", end: "100%" }[c], g = (((w = n.arrow) == null ? void 0 : w.x) ?? 0) + h / 2, u = (((x = n.arrow) == null ? void 0 : x.y) ?? 0) + s / 2;
|
|
229
215
|
let v = "", m = "";
|
|
230
|
-
return
|
|
216
|
+
return d === "bottom" ? (v = l ? f : `${g}px`, m = `${-s}px`) : d === "top" ? (v = l ? f : `${g}px`, m = `${o.floating.height + s}px`) : d === "right" ? (v = `${-s}px`, m = l ? f : `${u}px`) : d === "left" && (v = `${o.floating.width + s}px`, m = l ? f : `${u}px`), { data: { x: v, y: m } };
|
|
231
217
|
}
|
|
232
218
|
});
|
|
233
219
|
function ge(e) {
|
|
234
220
|
const [r, t = "center"] = e.split("-");
|
|
235
221
|
return [r, t];
|
|
236
222
|
}
|
|
237
|
-
var
|
|
223
|
+
var ut = pe, ft = ue, ht = fe, vt = ve, gt = Object.freeze({
|
|
238
224
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
239
225
|
position: "absolute",
|
|
240
226
|
border: 0,
|
|
@@ -246,32 +232,32 @@ var gt = de, mt = ue, yt = fe, wt = ve, xt = Object.freeze({
|
|
|
246
232
|
clip: "rect(0, 0, 0, 0)",
|
|
247
233
|
whiteSpace: "nowrap",
|
|
248
234
|
wordWrap: "normal"
|
|
249
|
-
}),
|
|
250
|
-
(e, r) => /* @__PURE__ */
|
|
235
|
+
}), mt = "VisuallyHidden", me = a.forwardRef(
|
|
236
|
+
(e, r) => /* @__PURE__ */ p(
|
|
251
237
|
S.span,
|
|
252
238
|
{
|
|
253
239
|
...e,
|
|
254
240
|
ref: r,
|
|
255
|
-
style: { ...
|
|
241
|
+
style: { ...gt, ...e.style }
|
|
256
242
|
}
|
|
257
243
|
)
|
|
258
244
|
);
|
|
259
|
-
me.displayName =
|
|
260
|
-
var
|
|
245
|
+
me.displayName = mt;
|
|
246
|
+
var yt = me, [M, Gt] = ae("Tooltip", [
|
|
261
247
|
le
|
|
262
|
-
]), $ = le(), ye = "TooltipProvider",
|
|
248
|
+
]), $ = le(), ye = "TooltipProvider", wt = 700, F = "tooltip.open", [xt, X] = M(ye), we = (e) => {
|
|
263
249
|
const {
|
|
264
250
|
__scopeTooltip: r,
|
|
265
|
-
delayDuration: t =
|
|
251
|
+
delayDuration: t = wt,
|
|
266
252
|
skipDelayDuration: o = 300,
|
|
267
253
|
disableHoverableContent: n = !1,
|
|
268
254
|
children: i
|
|
269
255
|
} = e, l = a.useRef(!0), h = a.useRef(!1), s = a.useRef(0);
|
|
270
256
|
return a.useEffect(() => {
|
|
271
|
-
const
|
|
272
|
-
return () => window.clearTimeout(
|
|
273
|
-
}, []), /* @__PURE__ */
|
|
274
|
-
|
|
257
|
+
const d = s.current;
|
|
258
|
+
return () => window.clearTimeout(d);
|
|
259
|
+
}, []), /* @__PURE__ */ p(
|
|
260
|
+
xt,
|
|
275
261
|
{
|
|
276
262
|
scope: r,
|
|
277
263
|
isOpenDelayedRef: l,
|
|
@@ -286,8 +272,8 @@ var Pt = me, [M, Ut] = ae("Tooltip", [
|
|
|
286
272
|
);
|
|
287
273
|
}, [o]),
|
|
288
274
|
isPointerInTransitRef: h,
|
|
289
|
-
onPointerInTransitChange: a.useCallback((
|
|
290
|
-
h.current =
|
|
275
|
+
onPointerInTransitChange: a.useCallback((d) => {
|
|
276
|
+
h.current = d;
|
|
291
277
|
}, []),
|
|
292
278
|
disableHoverableContent: n,
|
|
293
279
|
children: i
|
|
@@ -295,7 +281,7 @@ var Pt = me, [M, Ut] = ae("Tooltip", [
|
|
|
295
281
|
);
|
|
296
282
|
};
|
|
297
283
|
we.displayName = ye;
|
|
298
|
-
var O = "Tooltip", [
|
|
284
|
+
var O = "Tooltip", [Ct, j] = M(O), xe = (e) => {
|
|
299
285
|
const {
|
|
300
286
|
__scopeTooltip: r,
|
|
301
287
|
children: t,
|
|
@@ -304,16 +290,16 @@ var O = "Tooltip", [At, j] = M(O), xe = (e) => {
|
|
|
304
290
|
onOpenChange: i,
|
|
305
291
|
disableHoverableContent: l,
|
|
306
292
|
delayDuration: h
|
|
307
|
-
} = e, s = X(O, e.__scopeTooltip),
|
|
293
|
+
} = e, s = X(O, e.__scopeTooltip), d = $(r), [c, f] = a.useState(null), g = Xe(), u = a.useRef(0), v = l ?? s.disableHoverableContent, m = h ?? s.delayDuration, y = a.useRef(!1), [w, x] = Fe({
|
|
308
294
|
prop: o,
|
|
309
295
|
defaultProp: n ?? !1,
|
|
310
296
|
onChange: (N) => {
|
|
311
297
|
N ? (s.onOpen(), document.dispatchEvent(new CustomEvent(F))) : s.onClose(), i == null || i(N);
|
|
312
298
|
},
|
|
313
299
|
caller: O
|
|
314
|
-
}),
|
|
300
|
+
}), T = a.useMemo(() => w ? y.current ? "delayed-open" : "instant-open" : "closed", [w]), C = a.useCallback(() => {
|
|
315
301
|
window.clearTimeout(u.current), u.current = 0, y.current = !1, x(!0);
|
|
316
|
-
}, [x]),
|
|
302
|
+
}, [x]), b = a.useCallback(() => {
|
|
317
303
|
window.clearTimeout(u.current), u.current = 0, x(!1);
|
|
318
304
|
}, [x]), P = a.useCallback(() => {
|
|
319
305
|
window.clearTimeout(u.current), u.current = window.setTimeout(() => {
|
|
@@ -322,33 +308,33 @@ var O = "Tooltip", [At, j] = M(O), xe = (e) => {
|
|
|
322
308
|
}, [m, x]);
|
|
323
309
|
return a.useEffect(() => () => {
|
|
324
310
|
u.current && (window.clearTimeout(u.current), u.current = 0);
|
|
325
|
-
}, []), /* @__PURE__ */
|
|
326
|
-
|
|
311
|
+
}, []), /* @__PURE__ */ p(ut, { ...d, children: /* @__PURE__ */ p(
|
|
312
|
+
Ct,
|
|
327
313
|
{
|
|
328
314
|
scope: r,
|
|
329
315
|
contentId: g,
|
|
330
316
|
open: w,
|
|
331
|
-
stateAttribute:
|
|
317
|
+
stateAttribute: T,
|
|
332
318
|
trigger: c,
|
|
333
319
|
onTriggerChange: f,
|
|
334
320
|
onTriggerEnter: a.useCallback(() => {
|
|
335
321
|
s.isOpenDelayedRef.current ? P() : C();
|
|
336
322
|
}, [s.isOpenDelayedRef, P, C]),
|
|
337
323
|
onTriggerLeave: a.useCallback(() => {
|
|
338
|
-
v ?
|
|
339
|
-
}, [
|
|
324
|
+
v ? b() : (window.clearTimeout(u.current), u.current = 0);
|
|
325
|
+
}, [b, v]),
|
|
340
326
|
onOpen: C,
|
|
341
|
-
onClose:
|
|
327
|
+
onClose: b,
|
|
342
328
|
disableHoverableContent: v,
|
|
343
329
|
children: t
|
|
344
330
|
}
|
|
345
331
|
) });
|
|
346
332
|
};
|
|
347
333
|
xe.displayName = O;
|
|
348
|
-
var
|
|
334
|
+
var W = "TooltipTrigger", Ce = a.forwardRef(
|
|
349
335
|
(e, r) => {
|
|
350
|
-
const { __scopeTooltip: t, ...o } = e, n = j(
|
|
351
|
-
return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */
|
|
336
|
+
const { __scopeTooltip: t, ...o } = e, n = j(W, t), i = X(W, t), l = $(t), h = a.useRef(null), s = k(r, h, n.onTriggerChange), d = a.useRef(!1), c = a.useRef(!1), f = a.useCallback(() => d.current = !1, []);
|
|
337
|
+
return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ p(ft, { asChild: !0, ...l, children: /* @__PURE__ */ p(
|
|
352
338
|
S.button,
|
|
353
339
|
{
|
|
354
340
|
"aria-describedby": n.open ? n.contentId : void 0,
|
|
@@ -362,10 +348,10 @@ var B = "TooltipTrigger", Ce = a.forwardRef(
|
|
|
362
348
|
n.onTriggerLeave(), c.current = !1;
|
|
363
349
|
}),
|
|
364
350
|
onPointerDown: E(e.onPointerDown, () => {
|
|
365
|
-
n.open && n.onClose(),
|
|
351
|
+
n.open && n.onClose(), d.current = !0, document.addEventListener("pointerup", f, { once: !0 });
|
|
366
352
|
}),
|
|
367
353
|
onFocus: E(e.onFocus, () => {
|
|
368
|
-
|
|
354
|
+
d.current || n.onOpen();
|
|
369
355
|
}),
|
|
370
356
|
onBlur: E(e.onBlur, n.onClose),
|
|
371
357
|
onClick: E(e.onClick, n.onClose)
|
|
@@ -373,21 +359,21 @@ var B = "TooltipTrigger", Ce = a.forwardRef(
|
|
|
373
359
|
) });
|
|
374
360
|
}
|
|
375
361
|
);
|
|
376
|
-
Ce.displayName =
|
|
377
|
-
var
|
|
362
|
+
Ce.displayName = W;
|
|
363
|
+
var Pt = "TooltipPortal", [Xt, Tt] = M(Pt, {
|
|
378
364
|
forceMount: void 0
|
|
379
365
|
}), R = "TooltipContent", Pe = a.forwardRef(
|
|
380
366
|
(e, r) => {
|
|
381
|
-
const t =
|
|
382
|
-
return /* @__PURE__ */
|
|
367
|
+
const t = Tt(R, e.__scopeTooltip), { forceMount: o = t.forceMount, side: n = "top", ...i } = e, l = j(R, e.__scopeTooltip);
|
|
368
|
+
return /* @__PURE__ */ p(We, { present: o || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ p(Te, { side: n, ...i, ref: r }) : /* @__PURE__ */ p(bt, { side: n, ...i, ref: r }) });
|
|
383
369
|
}
|
|
384
|
-
),
|
|
385
|
-
const t = j(R, e.__scopeTooltip), o = X(R, e.__scopeTooltip), n = a.useRef(null), i = k(r, n), [l, h] = a.useState(null), { trigger: s, onClose:
|
|
370
|
+
), bt = a.forwardRef((e, r) => {
|
|
371
|
+
const t = j(R, e.__scopeTooltip), o = X(R, e.__scopeTooltip), n = a.useRef(null), i = k(r, n), [l, h] = a.useState(null), { trigger: s, onClose: d } = t, c = n.current, { onPointerInTransitChange: f } = o, g = a.useCallback(() => {
|
|
386
372
|
h(null), f(!1);
|
|
387
373
|
}, [f]), u = a.useCallback(
|
|
388
374
|
(v, m) => {
|
|
389
|
-
const y = v.currentTarget, w = { x: v.clientX, y: v.clientY }, x =
|
|
390
|
-
h(
|
|
375
|
+
const y = v.currentTarget, w = { x: v.clientX, y: v.clientY }, x = _t(w, y.getBoundingClientRect()), T = Ot(w, x), C = St(m.getBoundingClientRect()), b = Dt([...T, ...C]);
|
|
376
|
+
h(b), f(!0);
|
|
391
377
|
},
|
|
392
378
|
[f]
|
|
393
379
|
);
|
|
@@ -401,13 +387,13 @@ var Et = "TooltipPortal", [zt, Rt] = M(Et, {
|
|
|
401
387
|
}, [s, c, u, g]), a.useEffect(() => {
|
|
402
388
|
if (l) {
|
|
403
389
|
const v = (m) => {
|
|
404
|
-
const y = m.target, w = { x: m.clientX, y: m.clientY }, x = (s == null ? void 0 : s.contains(y)) || (c == null ? void 0 : c.contains(y)),
|
|
405
|
-
x ? g() :
|
|
390
|
+
const y = m.target, w = { x: m.clientX, y: m.clientY }, x = (s == null ? void 0 : s.contains(y)) || (c == null ? void 0 : c.contains(y)), T = !Nt(w, l);
|
|
391
|
+
x ? g() : T && (g(), d());
|
|
406
392
|
};
|
|
407
393
|
return document.addEventListener("pointermove", v), () => document.removeEventListener("pointermove", v);
|
|
408
394
|
}
|
|
409
|
-
}, [s, c, l,
|
|
410
|
-
}), [
|
|
395
|
+
}, [s, c, l, d, g]), /* @__PURE__ */ p(Te, { ...e, ref: i });
|
|
396
|
+
}), [At, Et] = M(O, { isInside: !1 }), Rt = Be("TooltipContent"), Te = a.forwardRef(
|
|
411
397
|
(e, r) => {
|
|
412
398
|
const {
|
|
413
399
|
__scopeTooltip: t,
|
|
@@ -416,7 +402,7 @@ var Et = "TooltipPortal", [zt, Rt] = M(Et, {
|
|
|
416
402
|
onEscapeKeyDown: i,
|
|
417
403
|
onPointerDownOutside: l,
|
|
418
404
|
...h
|
|
419
|
-
} = e, s = j(R, t),
|
|
405
|
+
} = e, s = j(R, t), d = $(t), { onClose: c } = s;
|
|
420
406
|
return a.useEffect(() => (document.addEventListener(F, c), () => document.removeEventListener(F, c)), [c]), a.useEffect(() => {
|
|
421
407
|
if (s.trigger) {
|
|
422
408
|
const f = (g) => {
|
|
@@ -425,8 +411,8 @@ var Et = "TooltipPortal", [zt, Rt] = M(Et, {
|
|
|
425
411
|
};
|
|
426
412
|
return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
|
|
427
413
|
}
|
|
428
|
-
}, [s.trigger, c]), /* @__PURE__ */
|
|
429
|
-
|
|
414
|
+
}, [s.trigger, c]), /* @__PURE__ */ p(
|
|
415
|
+
Ve,
|
|
430
416
|
{
|
|
431
417
|
asChild: !0,
|
|
432
418
|
disableOutsidePointerEvents: !1,
|
|
@@ -435,10 +421,10 @@ var Et = "TooltipPortal", [zt, Rt] = M(Et, {
|
|
|
435
421
|
onFocusOutside: (f) => f.preventDefault(),
|
|
436
422
|
onDismiss: c,
|
|
437
423
|
children: /* @__PURE__ */ Y(
|
|
438
|
-
|
|
424
|
+
ht,
|
|
439
425
|
{
|
|
440
426
|
"data-state": s.stateAttribute,
|
|
441
|
-
...
|
|
427
|
+
...d,
|
|
442
428
|
...h,
|
|
443
429
|
ref: r,
|
|
444
430
|
style: {
|
|
@@ -450,8 +436,8 @@ var Et = "TooltipPortal", [zt, Rt] = M(Et, {
|
|
|
450
436
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
451
437
|
},
|
|
452
438
|
children: [
|
|
453
|
-
/* @__PURE__ */
|
|
454
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ p(Rt, { children: o }),
|
|
440
|
+
/* @__PURE__ */ p(At, { scope: t, isInside: !0, children: /* @__PURE__ */ p(yt, { id: s.contentId, role: "tooltip", children: n || o }) })
|
|
455
441
|
]
|
|
456
442
|
}
|
|
457
443
|
)
|
|
@@ -460,17 +446,17 @@ var Et = "TooltipPortal", [zt, Rt] = M(Et, {
|
|
|
460
446
|
}
|
|
461
447
|
);
|
|
462
448
|
Pe.displayName = R;
|
|
463
|
-
var
|
|
449
|
+
var be = "TooltipArrow", Ae = a.forwardRef(
|
|
464
450
|
(e, r) => {
|
|
465
451
|
const { __scopeTooltip: t, ...o } = e, n = $(t);
|
|
466
|
-
return
|
|
467
|
-
|
|
452
|
+
return Et(
|
|
453
|
+
be,
|
|
468
454
|
t
|
|
469
|
-
).isInside ? null : /* @__PURE__ */
|
|
455
|
+
).isInside ? null : /* @__PURE__ */ p(vt, { ...n, ...o, ref: r });
|
|
470
456
|
}
|
|
471
457
|
);
|
|
472
|
-
Ae.displayName =
|
|
473
|
-
function
|
|
458
|
+
Ae.displayName = be;
|
|
459
|
+
function _t(e, r) {
|
|
474
460
|
const t = Math.abs(r.top - e.y), o = Math.abs(r.bottom - e.y), n = Math.abs(r.right - e.x), i = Math.abs(r.left - e.x);
|
|
475
461
|
switch (Math.min(t, o, n, i)) {
|
|
476
462
|
case i:
|
|
@@ -485,7 +471,7 @@ function Dt(e, r) {
|
|
|
485
471
|
throw new Error("unreachable");
|
|
486
472
|
}
|
|
487
473
|
}
|
|
488
|
-
function
|
|
474
|
+
function Ot(e, r, t = 5) {
|
|
489
475
|
const o = [];
|
|
490
476
|
switch (r) {
|
|
491
477
|
case "top":
|
|
@@ -515,7 +501,7 @@ function Ht(e, r, t = 5) {
|
|
|
515
501
|
}
|
|
516
502
|
return o;
|
|
517
503
|
}
|
|
518
|
-
function
|
|
504
|
+
function St(e) {
|
|
519
505
|
const { top: r, right: t, bottom: o, left: n } = e;
|
|
520
506
|
return [
|
|
521
507
|
{ x: n, y: r },
|
|
@@ -524,20 +510,20 @@ function It(e) {
|
|
|
524
510
|
{ x: n, y: o }
|
|
525
511
|
];
|
|
526
512
|
}
|
|
527
|
-
function
|
|
513
|
+
function Nt(e, r) {
|
|
528
514
|
const { x: t, y: o } = e;
|
|
529
515
|
let n = !1;
|
|
530
516
|
for (let i = 0, l = r.length - 1; i < r.length; l = i++) {
|
|
531
|
-
const h = r[i], s = r[l],
|
|
532
|
-
c > o != g > o && t < (f -
|
|
517
|
+
const h = r[i], s = r[l], d = h.x, c = h.y, f = s.x, g = s.y;
|
|
518
|
+
c > o != g > o && t < (f - d) * (o - c) / (g - c) + d && (n = !n);
|
|
533
519
|
}
|
|
534
520
|
return n;
|
|
535
521
|
}
|
|
536
|
-
function
|
|
522
|
+
function Dt(e) {
|
|
537
523
|
const r = e.slice();
|
|
538
|
-
return r.sort((t, o) => t.x < o.x ? -1 : t.x > o.x ? 1 : t.y < o.y ? -1 : t.y > o.y ? 1 : 0),
|
|
524
|
+
return r.sort((t, o) => t.x < o.x ? -1 : t.x > o.x ? 1 : t.y < o.y ? -1 : t.y > o.y ? 1 : 0), Ht(r);
|
|
539
525
|
}
|
|
540
|
-
function
|
|
526
|
+
function Ht(e) {
|
|
541
527
|
if (e.length <= 1)
|
|
542
528
|
return e.slice();
|
|
543
529
|
const r = [];
|
|
@@ -567,19 +553,19 @@ function Mt(e) {
|
|
|
567
553
|
}
|
|
568
554
|
return t.pop(), r.length === 1 && t.length === 1 && r[0].x === t[0].x && r[0].y === t[0].y ? r : r.concat(t);
|
|
569
555
|
}
|
|
570
|
-
const
|
|
571
|
-
tooltipContent:
|
|
572
|
-
tooltipArrow:
|
|
573
|
-
fadeIn:
|
|
574
|
-
},
|
|
575
|
-
({ children: e, content: r, className: t, style: o }, n) => /* @__PURE__ */
|
|
576
|
-
/* @__PURE__ */
|
|
556
|
+
const It = "_tooltipContent_12gjy_1", Lt = "_tooltipArrow_12gjy_8", kt = "_fadeIn_12gjy_1", ne = {
|
|
557
|
+
tooltipContent: It,
|
|
558
|
+
tooltipArrow: Lt,
|
|
559
|
+
fadeIn: kt
|
|
560
|
+
}, Vt = ot(
|
|
561
|
+
({ children: e, content: r, className: t, style: o }, n) => /* @__PURE__ */ p(we, { children: /* @__PURE__ */ Y(xe, { delayDuration: 1e3, children: [
|
|
562
|
+
/* @__PURE__ */ p(Ce, { asChild: !0, children: /* @__PURE__ */ p("div", { ref: n, className: t, style: o, children: e }) }),
|
|
577
563
|
/* @__PURE__ */ Y(Pe, { className: ne.tooltipContent, sideOffset: 5, children: [
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ p(Ae, { className: ne.tooltipArrow }),
|
|
565
|
+
/* @__PURE__ */ p("span", { children: r })
|
|
580
566
|
] })
|
|
581
567
|
] }) })
|
|
582
568
|
);
|
|
583
569
|
export {
|
|
584
|
-
|
|
570
|
+
Vt as default
|
|
585
571
|
};
|
|
@@ -8,7 +8,7 @@ import { usePagesRotateContext as D } from "./PagesRotateContext.js";
|
|
|
8
8
|
import "../utils/hooks/useLoadPdf.js";
|
|
9
9
|
import "pdfjs-dist";
|
|
10
10
|
import "../utils/types.js";
|
|
11
|
-
import "../
|
|
11
|
+
import "../de_DE-a553b162.js";
|
|
12
12
|
import "../utils/getThumbnailViewport.js";
|
|
13
13
|
import "./ConfigContext.js";
|
|
14
14
|
import "./DocumentPasswordContext.js";
|
|
@@ -7,7 +7,7 @@ import { useToolComponentContext as L } from "./ToolComponentContext.js";
|
|
|
7
7
|
import "../utils/hooks/useLoadPdf.js";
|
|
8
8
|
import "pdfjs-dist";
|
|
9
9
|
import "../utils/types.js";
|
|
10
|
-
import "../
|
|
10
|
+
import "../de_DE-a553b162.js";
|
|
11
11
|
import "../utils/getThumbnailViewport.js";
|
|
12
12
|
import "./ConfigContext.js";
|
|
13
13
|
import "../utils/hooks/usePdfProperties.js";
|
|
@@ -12,7 +12,7 @@ import { useScrollModeContext as $ } from "./ScrollModeContext.js";
|
|
|
12
12
|
import { getElementPagePosition as ee } from "../utils/getElementPositionInPage.js";
|
|
13
13
|
import { useViewModeContext as te } from "./ViewModeContext.js";
|
|
14
14
|
import { useVirtualScrollContext as oe } from "./VirtualScrollContext.js";
|
|
15
|
-
import "../
|
|
15
|
+
import "../de_DE-a553b162.js";
|
|
16
16
|
import "../utils/appConsole.js";
|
|
17
17
|
import "./RPDocumentContext.js";
|
|
18
18
|
import "../utils/hooks/useLoadPdf.js";
|
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
const t =
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as c, useContext as C } from "react";
|
|
3
|
+
const t = c({
|
|
4
4
|
onPageChange: () => {
|
|
5
5
|
},
|
|
6
6
|
onRotate: () => {
|
|
7
7
|
},
|
|
8
8
|
onScroll: () => {
|
|
9
|
+
},
|
|
10
|
+
onTextSelect: () => {
|
|
9
11
|
}
|
|
10
|
-
}), v = () =>
|
|
12
|
+
}), v = () => C(t), u = ({
|
|
11
13
|
children: e,
|
|
12
14
|
onPageChange: o,
|
|
13
15
|
onRotate: n,
|
|
14
|
-
onScroll: r
|
|
15
|
-
|
|
16
|
+
onScroll: r,
|
|
17
|
+
onTextSelect: a
|
|
18
|
+
}) => /* @__PURE__ */ l(
|
|
16
19
|
t.Provider,
|
|
17
20
|
{
|
|
18
21
|
value: {
|
|
19
22
|
onPageChange: o,
|
|
20
23
|
onRotate: n,
|
|
21
|
-
onScroll: r
|
|
24
|
+
onScroll: r,
|
|
25
|
+
onTextSelect: a
|
|
22
26
|
},
|
|
23
27
|
children: e
|
|
24
28
|
}
|
|
25
29
|
);
|
|
26
30
|
export {
|
|
27
31
|
t as EventCallbackContext,
|
|
28
|
-
|
|
32
|
+
u as EventCallbackProvider,
|
|
29
33
|
v as useEventCallbackContext
|
|
30
34
|
};
|
|
@@ -5,7 +5,7 @@ import { useDocumentPasswordContext as P } from "./DocumentPasswordContext.js";
|
|
|
5
5
|
import "../utils/hooks/useLoadPdf.js";
|
|
6
6
|
import "pdfjs-dist";
|
|
7
7
|
import "../utils/types.js";
|
|
8
|
-
import "../
|
|
8
|
+
import "../de_DE-a553b162.js";
|
|
9
9
|
import "../utils/getThumbnailViewport.js";
|
|
10
10
|
import "./ConfigContext.js";
|
|
11
11
|
import "../utils/hooks/usePdfProperties.js";
|
|
@@ -5,7 +5,7 @@ import { useHighlight as c } from "../utils/hooks/useHighlight.js";
|
|
|
5
5
|
import "../utils/hooks/useLoadPdf.js";
|
|
6
6
|
import "pdfjs-dist";
|
|
7
7
|
import "../utils/types.js";
|
|
8
|
-
import "../
|
|
8
|
+
import "../de_DE-a553b162.js";
|
|
9
9
|
import "../utils/getThumbnailViewport.js";
|
|
10
10
|
import "./ConfigContext.js";
|
|
11
11
|
import "./DocumentPasswordContext.js";
|