@pdf-viewer/react 1.15.0-beta.1 → 1.15.0-beta.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/dist/{ToolbarLayout.module-5b9624f8.js → ToolbarLayout.module-ffef94eb.js} +1035 -988
- package/dist/components/RPController.js +4 -4
- package/dist/components/RPPages.js +4 -4
- package/dist/components/RPProvider.js +4 -4
- package/dist/components/layout/LayoutContainer.js +4 -4
- package/dist/components/layout/RPDefaultLayout.js +4 -4
- package/dist/components/layout/RPLayout.js +4 -4
- package/dist/components/layout/sidebar/RPSidebar.js +4 -4
- package/dist/components/layout/sidebar/Thumbnail.js +4 -4
- package/dist/components/layout/sidebar/Thumbnails.js +4 -4
- package/dist/components/layout/toolbar/DarkModeTool.js +2 -2
- package/dist/components/layout/toolbar/DocumentDialog.js +4 -4
- package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/FileDownloadTool.js +4 -4
- package/dist/components/layout/toolbar/FileUploadTool.js +3 -3
- package/dist/components/layout/toolbar/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/MenuItem.js +3 -3
- package/dist/components/layout/toolbar/MenuSeparator.js +3 -3
- package/dist/components/layout/toolbar/MostPageTool.js +4 -4
- package/dist/components/layout/toolbar/OtherTool.js +4 -4
- package/dist/components/layout/toolbar/Paginate.js +4 -4
- package/dist/components/layout/toolbar/PrintTool.js +4 -4
- package/dist/components/layout/toolbar/RPMenuItem.js +3 -3
- package/dist/components/layout/toolbar/RPMoreOptions.js +4 -4
- package/dist/components/layout/toolbar/RPToolbar.js +4 -4
- package/dist/components/layout/toolbar/RPToolbarEnd.js +4 -4
- package/dist/components/layout/toolbar/RotateTool.js +3 -3
- package/dist/components/layout/toolbar/ScrollModeTool.js +3 -3
- package/dist/components/layout/toolbar/SearchCloseButton.js +2 -2
- package/dist/components/layout/toolbar/SearchResultNavigator.js +4 -4
- package/dist/components/layout/toolbar/SearchTool.js +4 -4
- package/dist/components/layout/toolbar/SelectionModeTool.js +3 -3
- package/dist/components/layout/toolbar/ThumbnailTool.js +4 -4
- package/dist/components/layout/toolbar/ToolbarCustom.js +4 -4
- package/dist/components/layout/toolbar/ToolbarDefault.js +4 -4
- package/dist/components/layout/toolbar/ToolbarLayout.js +4 -4
- package/dist/components/layout/toolbar/ViewModeTool.js +3 -3
- package/dist/components/layout/toolbar/ZoomTool.js +4 -4
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +4 -4
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +4 -4
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +2 -2
- package/dist/components/layout/toolbar/tools/InputPageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/NextPageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/PrintTool.js +4 -4
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +2 -2
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +2 -2
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +4 -4
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +4 -4
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +4 -4
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +2 -2
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +4 -4
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +4 -4
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +3 -3
- package/dist/components/page/AnnotationLayer.js +4 -4
- package/dist/components/page/CanvasLayer.js +4 -4
- package/dist/components/page/DualPage.js +4 -4
- package/dist/components/page/RPPage.js +4 -4
- package/dist/components/page/SinglePage.js +4 -4
- package/dist/components/page/TextHighlightLayer.js +4 -4
- package/dist/components/page/TextLayer.js +4 -4
- package/dist/components/ui/Checkbox.js +1 -1
- package/dist/components/ui/DropDown.js +3 -3
- package/dist/components/ui/LoadingIndicator.js +4 -4
- package/dist/components/ui/RPTooltip.js +118 -102
- package/dist/contexts/PaginationContext.js +4 -4
- package/dist/contexts/PrintContext.js +4 -4
- package/dist/contexts/RenderQueueProvider.js +4 -4
- package/dist/contexts/SearchContext.js +4 -4
- package/dist/contexts/ThumbnailsContext.js +4 -4
- package/dist/{floating-ui.react-dom-6b2fe0df.js → floating-ui.react-dom-d22a10b4.js} +3 -3
- package/dist/{index-f563c6f0.js → index-27c30844.js} +2 -2
- package/dist/{index-35c7f4a2.js → index-c9a2990a.js} +3 -3
- package/dist/main.js +4 -4
- package/dist/utils/hooks/useFileDownload.js +4 -4
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +4 -4
- package/dist/utils/hooks/usePresentPage.js +4 -4
- package/dist/utils/hooks/usePrint.js +4 -4
- package/dist/utils/hooks/useScrollToPage.js +4 -4
- package/dist/utils/hooks/useSearch.js +4 -4
- package/dist/utils/hooks/useThumbnail.js +4 -4
- package/dist/utils/hooks/useVirtualReactWindow.js +4 -4
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as d, jsxs as Y } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { useRef as Fe, useEffect as Be, useMemo as We, useLayoutEffect as Ge } from "react";
|
|
4
|
+
import { P as S, c as ae, u as k, d as Xe, e as Ve, a as E, b as Ue, f as ze } from "../../index-c9a2990a.js";
|
|
5
|
+
import { u as qe, a as Ze, o as Ke, s as Je, f as Qe, b as et, c as tt, h as rt, l as ot, d as nt, D as at } from "../../floating-ui.react-dom-d22a10b4.js";
|
|
6
|
+
import { withRef as st } from "../../utils/withRef.js";
|
|
6
7
|
import "react-dom";
|
|
7
|
-
var
|
|
8
|
+
var it = "Arrow", se = a.forwardRef((e, r) => {
|
|
8
9
|
const { children: t, width: o = 10, height: n = 5, ...i } = e;
|
|
9
10
|
return /* @__PURE__ */ d(
|
|
10
11
|
S.svg,
|
|
@@ -19,12 +20,27 @@ var nt = "Arrow", se = a.forwardRef((e, r) => {
|
|
|
19
20
|
}
|
|
20
21
|
);
|
|
21
22
|
});
|
|
22
|
-
se.displayName =
|
|
23
|
-
var
|
|
23
|
+
se.displayName = it;
|
|
24
|
+
var lt = se;
|
|
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
40
|
const { __scopePopper: r, children: t } = e, [o, n] = a.useState(null);
|
|
25
|
-
return /* @__PURE__ */ d(
|
|
41
|
+
return /* @__PURE__ */ d(dt, { scope: r, anchor: o, onAnchorChange: n, children: t });
|
|
26
42
|
};
|
|
27
|
-
de.displayName =
|
|
43
|
+
de.displayName = W;
|
|
28
44
|
var pe = "PopperAnchor", ue = a.forwardRef(
|
|
29
45
|
(e, r) => {
|
|
30
46
|
const { __scopePopper: t, virtualRef: o, ...n } = e, i = ce(pe, t), l = a.useRef(null), h = k(r, l), s = a.useRef(null);
|
|
@@ -35,7 +51,7 @@ var pe = "PopperAnchor", ue = a.forwardRef(
|
|
|
35
51
|
}
|
|
36
52
|
);
|
|
37
53
|
ue.displayName = pe;
|
|
38
|
-
var G = "PopperContent", [
|
|
54
|
+
var G = "PopperContent", [pt, ut] = ie(G), fe = a.forwardRef(
|
|
39
55
|
(e, r) => {
|
|
40
56
|
var Z, K, J, Q, ee, te;
|
|
41
57
|
const {
|
|
@@ -52,43 +68,43 @@ var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
|
|
|
52
68
|
hideWhenDetached: g = !1,
|
|
53
69
|
updatePositionStrategy: u = "optimized",
|
|
54
70
|
onPlaced: v,
|
|
55
|
-
...
|
|
56
|
-
} = e,
|
|
71
|
+
...m
|
|
72
|
+
} = e, y = ce(G, t), [w, x] = a.useState(null), b = k(r, (_) => x(_)), [C, T] = a.useState(null), P = Xe(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(p) ? p : [p], _e = U.length > 0, D = {
|
|
57
73
|
padding: Re,
|
|
58
|
-
boundary: U.filter(
|
|
74
|
+
boundary: U.filter(ht),
|
|
59
75
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
60
76
|
altBoundary: _e
|
|
61
|
-
}, { refs: Oe, floatingStyles: z, placement: Se, isPositioned: H, middlewareData: A } =
|
|
77
|
+
}, { refs: Oe, floatingStyles: z, placement: Se, isPositioned: H, middlewareData: A } = qe({
|
|
62
78
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
63
79
|
strategy: "fixed",
|
|
64
80
|
placement: Ee,
|
|
65
|
-
whileElementsMounted: (..._) =>
|
|
81
|
+
whileElementsMounted: (..._) => Ze(..._, {
|
|
66
82
|
animationFrame: u === "always"
|
|
67
83
|
}),
|
|
68
84
|
elements: {
|
|
69
|
-
reference:
|
|
85
|
+
reference: y.anchor
|
|
70
86
|
},
|
|
71
87
|
middleware: [
|
|
72
|
-
|
|
73
|
-
s &&
|
|
88
|
+
Ke({ mainAxis: n + V, alignmentAxis: l }),
|
|
89
|
+
s && Je({
|
|
74
90
|
mainAxis: !0,
|
|
75
91
|
crossAxis: !1,
|
|
76
|
-
limiter: f === "partial" ?
|
|
92
|
+
limiter: f === "partial" ? ot() : void 0,
|
|
77
93
|
...D
|
|
78
94
|
}),
|
|
79
|
-
s &&
|
|
80
|
-
|
|
95
|
+
s && Qe({ ...D }),
|
|
96
|
+
et({
|
|
81
97
|
...D,
|
|
82
98
|
apply: ({ elements: _, rects: re, availableWidth: Me, availableHeight: $e }) => {
|
|
83
99
|
const { width: je, height: Ye } = re.reference, L = _.floating.style;
|
|
84
100
|
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`);
|
|
85
101
|
}
|
|
86
102
|
}),
|
|
87
|
-
C &&
|
|
88
|
-
|
|
89
|
-
g &&
|
|
103
|
+
C && tt({ element: C, padding: h }),
|
|
104
|
+
vt({ arrowWidth: N, arrowHeight: V }),
|
|
105
|
+
g && rt({ strategy: "referenceHidden", ...D })
|
|
90
106
|
]
|
|
91
|
-
}), [q, Ne] = ge(Se), I =
|
|
107
|
+
}), [q, Ne] = ge(Se), I = ct(v);
|
|
92
108
|
oe(() => {
|
|
93
109
|
H && (I == null || I());
|
|
94
110
|
}, [H, I]);
|
|
@@ -120,11 +136,11 @@ var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
|
|
|
120
136
|
},
|
|
121
137
|
dir: e.dir,
|
|
122
138
|
children: /* @__PURE__ */ d(
|
|
123
|
-
|
|
139
|
+
pt,
|
|
124
140
|
{
|
|
125
141
|
scope: t,
|
|
126
142
|
placedSide: q,
|
|
127
|
-
onArrowChange:
|
|
143
|
+
onArrowChange: T,
|
|
128
144
|
arrowX: De,
|
|
129
145
|
arrowY: He,
|
|
130
146
|
shouldHideArrow: Ie,
|
|
@@ -133,10 +149,10 @@ var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
|
|
|
133
149
|
{
|
|
134
150
|
"data-side": q,
|
|
135
151
|
"data-align": Ne,
|
|
136
|
-
...
|
|
137
|
-
ref:
|
|
152
|
+
...m,
|
|
153
|
+
ref: b,
|
|
138
154
|
style: {
|
|
139
|
-
...
|
|
155
|
+
...m.style,
|
|
140
156
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
141
157
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
142
158
|
animation: H ? void 0 : "none"
|
|
@@ -150,13 +166,13 @@ var G = "PopperContent", [it, lt] = ie(G), fe = a.forwardRef(
|
|
|
150
166
|
}
|
|
151
167
|
);
|
|
152
168
|
fe.displayName = G;
|
|
153
|
-
var he = "PopperArrow",
|
|
169
|
+
var he = "PopperArrow", ft = {
|
|
154
170
|
top: "bottom",
|
|
155
171
|
right: "left",
|
|
156
172
|
bottom: "top",
|
|
157
173
|
left: "right"
|
|
158
174
|
}, ve = a.forwardRef(function(r, t) {
|
|
159
|
-
const { __scopePopper: o, ...n } = r, i =
|
|
175
|
+
const { __scopePopper: o, ...n } = r, i = ut(he, o), l = ft[i.placedSide];
|
|
160
176
|
return (
|
|
161
177
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
162
178
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -185,7 +201,7 @@ var he = "PopperArrow", ct = {
|
|
|
185
201
|
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
186
202
|
},
|
|
187
203
|
children: /* @__PURE__ */ d(
|
|
188
|
-
|
|
204
|
+
lt,
|
|
189
205
|
{
|
|
190
206
|
...n,
|
|
191
207
|
ref: t,
|
|
@@ -201,24 +217,24 @@ var he = "PopperArrow", ct = {
|
|
|
201
217
|
);
|
|
202
218
|
});
|
|
203
219
|
ve.displayName = he;
|
|
204
|
-
function
|
|
220
|
+
function ht(e) {
|
|
205
221
|
return e !== null;
|
|
206
222
|
}
|
|
207
|
-
var
|
|
223
|
+
var vt = (e) => ({
|
|
208
224
|
name: "transformOrigin",
|
|
209
225
|
options: e,
|
|
210
226
|
fn(r) {
|
|
211
|
-
var
|
|
212
|
-
const { placement: t, rects: o, middlewareData: n } = r, l = ((
|
|
213
|
-
let v = "",
|
|
214
|
-
return p === "bottom" ? (v = l ? f : `${g}px`,
|
|
227
|
+
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, [p, 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
|
+
let v = "", m = "";
|
|
230
|
+
return p === "bottom" ? (v = l ? f : `${g}px`, m = `${-s}px`) : p === "top" ? (v = l ? f : `${g}px`, m = `${o.floating.height + s}px`) : p === "right" ? (v = `${-s}px`, m = l ? f : `${u}px`) : p === "left" && (v = `${o.floating.width + s}px`, m = l ? f : `${u}px`), { data: { x: v, y: m } };
|
|
215
231
|
}
|
|
216
232
|
});
|
|
217
233
|
function ge(e) {
|
|
218
234
|
const [r, t = "center"] = e.split("-");
|
|
219
235
|
return [r, t];
|
|
220
236
|
}
|
|
221
|
-
var
|
|
237
|
+
var gt = de, mt = ue, yt = fe, wt = ve, xt = Object.freeze({
|
|
222
238
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
223
239
|
position: "absolute",
|
|
224
240
|
border: 0,
|
|
@@ -230,23 +246,23 @@ var ut = de, ft = ue, ht = fe, vt = ve, gt = Object.freeze({
|
|
|
230
246
|
clip: "rect(0, 0, 0, 0)",
|
|
231
247
|
whiteSpace: "nowrap",
|
|
232
248
|
wordWrap: "normal"
|
|
233
|
-
}),
|
|
249
|
+
}), Ct = "VisuallyHidden", me = a.forwardRef(
|
|
234
250
|
(e, r) => /* @__PURE__ */ d(
|
|
235
251
|
S.span,
|
|
236
252
|
{
|
|
237
253
|
...e,
|
|
238
254
|
ref: r,
|
|
239
|
-
style: { ...
|
|
255
|
+
style: { ...xt, ...e.style }
|
|
240
256
|
}
|
|
241
257
|
)
|
|
242
258
|
);
|
|
243
|
-
|
|
244
|
-
var
|
|
259
|
+
me.displayName = Ct;
|
|
260
|
+
var Pt = me, [M, Ut] = ae("Tooltip", [
|
|
245
261
|
le
|
|
246
|
-
]), $ = le(),
|
|
262
|
+
]), $ = le(), ye = "TooltipProvider", bt = 700, F = "tooltip.open", [Tt, X] = M(ye), we = (e) => {
|
|
247
263
|
const {
|
|
248
264
|
__scopeTooltip: r,
|
|
249
|
-
delayDuration: t =
|
|
265
|
+
delayDuration: t = bt,
|
|
250
266
|
skipDelayDuration: o = 300,
|
|
251
267
|
disableHoverableContent: n = !1,
|
|
252
268
|
children: i
|
|
@@ -255,7 +271,7 @@ var mt = ye, [M, Wt] = ae("Tooltip", [
|
|
|
255
271
|
const p = s.current;
|
|
256
272
|
return () => window.clearTimeout(p);
|
|
257
273
|
}, []), /* @__PURE__ */ d(
|
|
258
|
-
|
|
274
|
+
Tt,
|
|
259
275
|
{
|
|
260
276
|
scope: r,
|
|
261
277
|
isOpenDelayedRef: l,
|
|
@@ -278,8 +294,8 @@ var mt = ye, [M, Wt] = ae("Tooltip", [
|
|
|
278
294
|
}
|
|
279
295
|
);
|
|
280
296
|
};
|
|
281
|
-
we.displayName =
|
|
282
|
-
var O = "Tooltip", [
|
|
297
|
+
we.displayName = ye;
|
|
298
|
+
var O = "Tooltip", [At, j] = M(O), xe = (e) => {
|
|
283
299
|
const {
|
|
284
300
|
__scopeTooltip: r,
|
|
285
301
|
children: t,
|
|
@@ -288,51 +304,51 @@ var O = "Tooltip", [Ct, j] = M(O), xe = (e) => {
|
|
|
288
304
|
onOpenChange: i,
|
|
289
305
|
disableHoverableContent: l,
|
|
290
306
|
delayDuration: h
|
|
291
|
-
} = e, s = X(O, e.__scopeTooltip), p = $(r), [c, f] = a.useState(null), g =
|
|
307
|
+
} = e, s = X(O, e.__scopeTooltip), p = $(r), [c, f] = a.useState(null), g = nt(), u = a.useRef(0), v = l ?? s.disableHoverableContent, m = h ?? s.delayDuration, y = a.useRef(!1), [w, x] = Ve({
|
|
292
308
|
prop: o,
|
|
293
309
|
defaultProp: n ?? !1,
|
|
294
310
|
onChange: (N) => {
|
|
295
311
|
N ? (s.onOpen(), document.dispatchEvent(new CustomEvent(F))) : s.onClose(), i == null || i(N);
|
|
296
312
|
},
|
|
297
313
|
caller: O
|
|
298
|
-
}),
|
|
299
|
-
window.clearTimeout(u.current), u.current = 0,
|
|
300
|
-
}, [x]),
|
|
314
|
+
}), b = a.useMemo(() => w ? y.current ? "delayed-open" : "instant-open" : "closed", [w]), C = a.useCallback(() => {
|
|
315
|
+
window.clearTimeout(u.current), u.current = 0, y.current = !1, x(!0);
|
|
316
|
+
}, [x]), T = a.useCallback(() => {
|
|
301
317
|
window.clearTimeout(u.current), u.current = 0, x(!1);
|
|
302
318
|
}, [x]), P = a.useCallback(() => {
|
|
303
319
|
window.clearTimeout(u.current), u.current = window.setTimeout(() => {
|
|
304
|
-
|
|
305
|
-
},
|
|
306
|
-
}, [
|
|
320
|
+
y.current = !0, x(!0), u.current = 0;
|
|
321
|
+
}, m);
|
|
322
|
+
}, [m, x]);
|
|
307
323
|
return a.useEffect(() => () => {
|
|
308
324
|
u.current && (window.clearTimeout(u.current), u.current = 0);
|
|
309
|
-
}, []), /* @__PURE__ */ d(
|
|
310
|
-
|
|
325
|
+
}, []), /* @__PURE__ */ d(gt, { ...p, children: /* @__PURE__ */ d(
|
|
326
|
+
At,
|
|
311
327
|
{
|
|
312
328
|
scope: r,
|
|
313
329
|
contentId: g,
|
|
314
330
|
open: w,
|
|
315
|
-
stateAttribute:
|
|
331
|
+
stateAttribute: b,
|
|
316
332
|
trigger: c,
|
|
317
333
|
onTriggerChange: f,
|
|
318
334
|
onTriggerEnter: a.useCallback(() => {
|
|
319
335
|
s.isOpenDelayedRef.current ? P() : C();
|
|
320
336
|
}, [s.isOpenDelayedRef, P, C]),
|
|
321
337
|
onTriggerLeave: a.useCallback(() => {
|
|
322
|
-
v ?
|
|
323
|
-
}, [
|
|
338
|
+
v ? T() : (window.clearTimeout(u.current), u.current = 0);
|
|
339
|
+
}, [T, v]),
|
|
324
340
|
onOpen: C,
|
|
325
|
-
onClose:
|
|
341
|
+
onClose: T,
|
|
326
342
|
disableHoverableContent: v,
|
|
327
343
|
children: t
|
|
328
344
|
}
|
|
329
345
|
) });
|
|
330
346
|
};
|
|
331
347
|
xe.displayName = O;
|
|
332
|
-
var
|
|
348
|
+
var B = "TooltipTrigger", Ce = a.forwardRef(
|
|
333
349
|
(e, r) => {
|
|
334
|
-
const { __scopeTooltip: t, ...o } = e, n = j(
|
|
335
|
-
return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ d(
|
|
350
|
+
const { __scopeTooltip: t, ...o } = e, n = j(B, t), i = X(B, t), l = $(t), h = a.useRef(null), s = k(r, h, n.onTriggerChange), p = a.useRef(!1), c = a.useRef(!1), f = a.useCallback(() => p.current = !1, []);
|
|
351
|
+
return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ d(mt, { asChild: !0, ...l, children: /* @__PURE__ */ d(
|
|
336
352
|
S.button,
|
|
337
353
|
{
|
|
338
354
|
"aria-describedby": n.open ? n.contentId : void 0,
|
|
@@ -357,41 +373,41 @@ var W = "TooltipTrigger", Ce = a.forwardRef(
|
|
|
357
373
|
) });
|
|
358
374
|
}
|
|
359
375
|
);
|
|
360
|
-
Ce.displayName =
|
|
361
|
-
var
|
|
376
|
+
Ce.displayName = B;
|
|
377
|
+
var Et = "TooltipPortal", [zt, Rt] = M(Et, {
|
|
362
378
|
forceMount: void 0
|
|
363
379
|
}), R = "TooltipContent", Pe = a.forwardRef(
|
|
364
380
|
(e, r) => {
|
|
365
|
-
const t =
|
|
366
|
-
return /* @__PURE__ */ d(
|
|
381
|
+
const t = Rt(R, e.__scopeTooltip), { forceMount: o = t.forceMount, side: n = "top", ...i } = e, l = j(R, e.__scopeTooltip);
|
|
382
|
+
return /* @__PURE__ */ d(Ue, { present: o || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ d(be, { side: n, ...i, ref: r }) : /* @__PURE__ */ d(_t, { side: n, ...i, ref: r }) });
|
|
367
383
|
}
|
|
368
|
-
),
|
|
384
|
+
), _t = a.forwardRef((e, r) => {
|
|
369
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: p } = t, c = n.current, { onPointerInTransitChange: f } = o, g = a.useCallback(() => {
|
|
370
386
|
h(null), f(!1);
|
|
371
387
|
}, [f]), u = a.useCallback(
|
|
372
|
-
(v,
|
|
373
|
-
const
|
|
374
|
-
h(
|
|
388
|
+
(v, m) => {
|
|
389
|
+
const y = v.currentTarget, w = { x: v.clientX, y: v.clientY }, x = Dt(w, y.getBoundingClientRect()), b = Ht(w, x), C = It(m.getBoundingClientRect()), T = kt([...b, ...C]);
|
|
390
|
+
h(T), f(!0);
|
|
375
391
|
},
|
|
376
392
|
[f]
|
|
377
393
|
);
|
|
378
394
|
return a.useEffect(() => () => g(), [g]), a.useEffect(() => {
|
|
379
395
|
if (s && c) {
|
|
380
|
-
const v = (
|
|
381
|
-
return s.addEventListener("pointerleave", v), c.addEventListener("pointerleave",
|
|
382
|
-
s.removeEventListener("pointerleave", v), c.removeEventListener("pointerleave",
|
|
396
|
+
const v = (y) => u(y, c), m = (y) => u(y, s);
|
|
397
|
+
return s.addEventListener("pointerleave", v), c.addEventListener("pointerleave", m), () => {
|
|
398
|
+
s.removeEventListener("pointerleave", v), c.removeEventListener("pointerleave", m);
|
|
383
399
|
};
|
|
384
400
|
}
|
|
385
401
|
}, [s, c, u, g]), a.useEffect(() => {
|
|
386
402
|
if (l) {
|
|
387
|
-
const v = (
|
|
388
|
-
const
|
|
389
|
-
x ? g() :
|
|
403
|
+
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)), b = !Lt(w, l);
|
|
405
|
+
x ? g() : b && (g(), p());
|
|
390
406
|
};
|
|
391
407
|
return document.addEventListener("pointermove", v), () => document.removeEventListener("pointermove", v);
|
|
392
408
|
}
|
|
393
|
-
}, [s, c, l, p, g]), /* @__PURE__ */ d(
|
|
394
|
-
}), [
|
|
409
|
+
}, [s, c, l, p, g]), /* @__PURE__ */ d(be, { ...e, ref: i });
|
|
410
|
+
}), [Ot, St] = M(O, { isInside: !1 }), Nt = ze("TooltipContent"), be = a.forwardRef(
|
|
395
411
|
(e, r) => {
|
|
396
412
|
const {
|
|
397
413
|
__scopeTooltip: t,
|
|
@@ -410,7 +426,7 @@ var Pt = "TooltipPortal", [Bt, Tt] = M(Pt, {
|
|
|
410
426
|
return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
|
|
411
427
|
}
|
|
412
428
|
}, [s.trigger, c]), /* @__PURE__ */ d(
|
|
413
|
-
|
|
429
|
+
at,
|
|
414
430
|
{
|
|
415
431
|
asChild: !0,
|
|
416
432
|
disableOutsidePointerEvents: !1,
|
|
@@ -419,7 +435,7 @@ var Pt = "TooltipPortal", [Bt, Tt] = M(Pt, {
|
|
|
419
435
|
onFocusOutside: (f) => f.preventDefault(),
|
|
420
436
|
onDismiss: c,
|
|
421
437
|
children: /* @__PURE__ */ Y(
|
|
422
|
-
|
|
438
|
+
yt,
|
|
423
439
|
{
|
|
424
440
|
"data-state": s.stateAttribute,
|
|
425
441
|
...p,
|
|
@@ -434,8 +450,8 @@ var Pt = "TooltipPortal", [Bt, Tt] = M(Pt, {
|
|
|
434
450
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
435
451
|
},
|
|
436
452
|
children: [
|
|
437
|
-
/* @__PURE__ */ d(
|
|
438
|
-
/* @__PURE__ */ d(
|
|
453
|
+
/* @__PURE__ */ d(Nt, { children: o }),
|
|
454
|
+
/* @__PURE__ */ d(Ot, { scope: t, isInside: !0, children: /* @__PURE__ */ d(Pt, { id: s.contentId, role: "tooltip", children: n || o }) })
|
|
439
455
|
]
|
|
440
456
|
}
|
|
441
457
|
)
|
|
@@ -444,17 +460,17 @@ var Pt = "TooltipPortal", [Bt, Tt] = M(Pt, {
|
|
|
444
460
|
}
|
|
445
461
|
);
|
|
446
462
|
Pe.displayName = R;
|
|
447
|
-
var
|
|
463
|
+
var Te = "TooltipArrow", Ae = a.forwardRef(
|
|
448
464
|
(e, r) => {
|
|
449
465
|
const { __scopeTooltip: t, ...o } = e, n = $(t);
|
|
450
|
-
return
|
|
451
|
-
|
|
466
|
+
return St(
|
|
467
|
+
Te,
|
|
452
468
|
t
|
|
453
|
-
).isInside ? null : /* @__PURE__ */ d(
|
|
469
|
+
).isInside ? null : /* @__PURE__ */ d(wt, { ...n, ...o, ref: r });
|
|
454
470
|
}
|
|
455
471
|
);
|
|
456
|
-
Ae.displayName =
|
|
457
|
-
function
|
|
472
|
+
Ae.displayName = Te;
|
|
473
|
+
function Dt(e, r) {
|
|
458
474
|
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);
|
|
459
475
|
switch (Math.min(t, o, n, i)) {
|
|
460
476
|
case i:
|
|
@@ -469,7 +485,7 @@ function _t(e, r) {
|
|
|
469
485
|
throw new Error("unreachable");
|
|
470
486
|
}
|
|
471
487
|
}
|
|
472
|
-
function
|
|
488
|
+
function Ht(e, r, t = 5) {
|
|
473
489
|
const o = [];
|
|
474
490
|
switch (r) {
|
|
475
491
|
case "top":
|
|
@@ -499,7 +515,7 @@ function Ot(e, r, t = 5) {
|
|
|
499
515
|
}
|
|
500
516
|
return o;
|
|
501
517
|
}
|
|
502
|
-
function
|
|
518
|
+
function It(e) {
|
|
503
519
|
const { top: r, right: t, bottom: o, left: n } = e;
|
|
504
520
|
return [
|
|
505
521
|
{ x: n, y: r },
|
|
@@ -508,7 +524,7 @@ function St(e) {
|
|
|
508
524
|
{ x: n, y: o }
|
|
509
525
|
];
|
|
510
526
|
}
|
|
511
|
-
function
|
|
527
|
+
function Lt(e, r) {
|
|
512
528
|
const { x: t, y: o } = e;
|
|
513
529
|
let n = !1;
|
|
514
530
|
for (let i = 0, l = r.length - 1; i < r.length; l = i++) {
|
|
@@ -517,11 +533,11 @@ function Nt(e, r) {
|
|
|
517
533
|
}
|
|
518
534
|
return n;
|
|
519
535
|
}
|
|
520
|
-
function
|
|
536
|
+
function kt(e) {
|
|
521
537
|
const r = e.slice();
|
|
522
|
-
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),
|
|
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), Mt(r);
|
|
523
539
|
}
|
|
524
|
-
function
|
|
540
|
+
function Mt(e) {
|
|
525
541
|
if (e.length <= 1)
|
|
526
542
|
return e.slice();
|
|
527
543
|
const r = [];
|
|
@@ -551,11 +567,11 @@ function Ht(e) {
|
|
|
551
567
|
}
|
|
552
568
|
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);
|
|
553
569
|
}
|
|
554
|
-
const
|
|
555
|
-
tooltipContent:
|
|
556
|
-
tooltipArrow:
|
|
557
|
-
fadeIn:
|
|
558
|
-
},
|
|
570
|
+
const $t = "_tooltipContent_12gjy_1", jt = "_tooltipArrow_12gjy_8", Yt = "_fadeIn_12gjy_1", ne = {
|
|
571
|
+
tooltipContent: $t,
|
|
572
|
+
tooltipArrow: jt,
|
|
573
|
+
fadeIn: Yt
|
|
574
|
+
}, qt = st(
|
|
559
575
|
({ children: e, content: r, className: t, style: o }, n) => /* @__PURE__ */ d(we, { children: /* @__PURE__ */ Y(xe, { delayDuration: 1e3, children: [
|
|
560
576
|
/* @__PURE__ */ d(Ce, { asChild: !0, children: /* @__PURE__ */ d("div", { ref: n, className: t, style: o, children: e }) }),
|
|
561
577
|
/* @__PURE__ */ Y(Pe, { className: ne.tooltipContent, sideOffset: 5, children: [
|
|
@@ -565,5 +581,5 @@ const It = "_tooltipContent_12gjy_1", Lt = "_tooltipArrow_12gjy_8", kt = "_fadeI
|
|
|
565
581
|
] }) })
|
|
566
582
|
);
|
|
567
583
|
export {
|
|
568
|
-
|
|
584
|
+
qt as default
|
|
569
585
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { w as Bt, P as Dt, u as Et } from "../ToolbarLayout.module-
|
|
3
|
+
import { w as Bt, P as Dt, u as Et } from "../ToolbarLayout.module-ffef94eb.js";
|
|
4
4
|
import "./RPDocumentContext.js";
|
|
5
5
|
import "../utils/appConsole.js";
|
|
6
6
|
import "./GlobalCurrentPage.js";
|
|
@@ -75,15 +75,15 @@ import "../components/icons/LightPdfIcon.js";
|
|
|
75
75
|
import "../components/icons/DarkPdfIcon.js";
|
|
76
76
|
import "../SearchCloseButton-08d57275.js";
|
|
77
77
|
import "../components/ui/RPTooltip.js";
|
|
78
|
-
import "../index-
|
|
78
|
+
import "../index-c9a2990a.js";
|
|
79
79
|
import "react-dom";
|
|
80
|
-
import "../floating-ui.react-dom-
|
|
80
|
+
import "../floating-ui.react-dom-d22a10b4.js";
|
|
81
81
|
import "../components/icons/CloseIcon.js";
|
|
82
82
|
import "../components/ui/Checkbox.js";
|
|
83
83
|
import "../components/icons/CheckIcon.js";
|
|
84
84
|
import "./IconContext.js";
|
|
85
85
|
import "../components/ui/DropDown.js";
|
|
86
|
-
import "../index-
|
|
86
|
+
import "../index-27c30844.js";
|
|
87
87
|
import "../components/layout/toolbar/MenuItem.js";
|
|
88
88
|
import "../components/layout/toolbar/MenuSeparator.js";
|
|
89
89
|
import "../utils/dateFormatter.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { y as Ar, g as Br, c as Dr } from "../ToolbarLayout.module-
|
|
3
|
+
import { y as Ar, g as Br, c as Dr } from "../ToolbarLayout.module-ffef94eb.js";
|
|
4
4
|
import "../components/icons/ChevronUpIcon.js";
|
|
5
5
|
import "../components/ui/Button.js";
|
|
6
6
|
import "../clsx-0c6e471a.js";
|
|
@@ -75,15 +75,15 @@ import "../components/icons/LightPdfIcon.js";
|
|
|
75
75
|
import "../components/icons/DarkPdfIcon.js";
|
|
76
76
|
import "../SearchCloseButton-08d57275.js";
|
|
77
77
|
import "../components/ui/RPTooltip.js";
|
|
78
|
-
import "../index-
|
|
78
|
+
import "../index-c9a2990a.js";
|
|
79
79
|
import "react-dom";
|
|
80
|
-
import "../floating-ui.react-dom-
|
|
80
|
+
import "../floating-ui.react-dom-d22a10b4.js";
|
|
81
81
|
import "../components/icons/CloseIcon.js";
|
|
82
82
|
import "../components/ui/Checkbox.js";
|
|
83
83
|
import "../components/icons/CheckIcon.js";
|
|
84
84
|
import "./IconContext.js";
|
|
85
85
|
import "../components/ui/DropDown.js";
|
|
86
|
-
import "../index-
|
|
86
|
+
import "../index-27c30844.js";
|
|
87
87
|
import "../components/layout/toolbar/MenuItem.js";
|
|
88
88
|
import "../components/layout/toolbar/MenuSeparator.js";
|
|
89
89
|
import "../utils/dateFormatter.js";
|
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "../utils/Queue.js";
|
|
4
4
|
import "../utils/renderPage.js";
|
|
5
|
-
import { E as wo, f as yo, F as zo } from "../ToolbarLayout.module-
|
|
5
|
+
import { E as wo, f as yo, F as zo } from "../ToolbarLayout.module-ffef94eb.js";
|
|
6
6
|
import "pdfjs-dist";
|
|
7
7
|
import "../components/icons/ChevronUpIcon.js";
|
|
8
8
|
import "../components/ui/Button.js";
|
|
@@ -75,15 +75,15 @@ import "../components/icons/LightPdfIcon.js";
|
|
|
75
75
|
import "../components/icons/DarkPdfIcon.js";
|
|
76
76
|
import "../SearchCloseButton-08d57275.js";
|
|
77
77
|
import "../components/ui/RPTooltip.js";
|
|
78
|
-
import "../index-
|
|
78
|
+
import "../index-c9a2990a.js";
|
|
79
79
|
import "react-dom";
|
|
80
|
-
import "../floating-ui.react-dom-
|
|
80
|
+
import "../floating-ui.react-dom-d22a10b4.js";
|
|
81
81
|
import "../components/icons/CloseIcon.js";
|
|
82
82
|
import "../components/ui/Checkbox.js";
|
|
83
83
|
import "../components/icons/CheckIcon.js";
|
|
84
84
|
import "./IconContext.js";
|
|
85
85
|
import "../components/ui/DropDown.js";
|
|
86
|
-
import "../index-
|
|
86
|
+
import "../index-27c30844.js";
|
|
87
87
|
import "../components/layout/toolbar/MenuItem.js";
|
|
88
88
|
import "../components/layout/toolbar/MenuSeparator.js";
|
|
89
89
|
import "../utils/dateFormatter.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { C as Ao, e as Bo, d as Do } from "../ToolbarLayout.module-
|
|
3
|
+
import { C as Ao, e as Bo, d as Do } from "../ToolbarLayout.module-ffef94eb.js";
|
|
4
4
|
import "../components/icons/ChevronUpIcon.js";
|
|
5
5
|
import "../components/ui/Button.js";
|
|
6
6
|
import "../clsx-0c6e471a.js";
|
|
@@ -75,15 +75,15 @@ import "../components/icons/LightPdfIcon.js";
|
|
|
75
75
|
import "../components/icons/DarkPdfIcon.js";
|
|
76
76
|
import "../SearchCloseButton-08d57275.js";
|
|
77
77
|
import "../components/ui/RPTooltip.js";
|
|
78
|
-
import "../index-
|
|
78
|
+
import "../index-c9a2990a.js";
|
|
79
79
|
import "react-dom";
|
|
80
|
-
import "../floating-ui.react-dom-
|
|
80
|
+
import "../floating-ui.react-dom-d22a10b4.js";
|
|
81
81
|
import "../components/icons/CloseIcon.js";
|
|
82
82
|
import "../components/ui/Checkbox.js";
|
|
83
83
|
import "../components/icons/CheckIcon.js";
|
|
84
84
|
import "./IconContext.js";
|
|
85
85
|
import "../components/ui/DropDown.js";
|
|
86
|
-
import "../index-
|
|
86
|
+
import "../index-27c30844.js";
|
|
87
87
|
import "../components/layout/toolbar/MenuItem.js";
|
|
88
88
|
import "../components/layout/toolbar/MenuSeparator.js";
|
|
89
89
|
import "../utils/dateFormatter.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { A as zt, T as Bt, h as Dt } from "../ToolbarLayout.module-
|
|
3
|
+
import { A as zt, T as Bt, h as Dt } from "../ToolbarLayout.module-ffef94eb.js";
|
|
4
4
|
import "../components/icons/ChevronUpIcon.js";
|
|
5
5
|
import "../components/ui/Button.js";
|
|
6
6
|
import "../clsx-0c6e471a.js";
|
|
@@ -75,15 +75,15 @@ import "../components/icons/LightPdfIcon.js";
|
|
|
75
75
|
import "../components/icons/DarkPdfIcon.js";
|
|
76
76
|
import "../SearchCloseButton-08d57275.js";
|
|
77
77
|
import "../components/ui/RPTooltip.js";
|
|
78
|
-
import "../index-
|
|
78
|
+
import "../index-c9a2990a.js";
|
|
79
79
|
import "react-dom";
|
|
80
|
-
import "../floating-ui.react-dom-
|
|
80
|
+
import "../floating-ui.react-dom-d22a10b4.js";
|
|
81
81
|
import "../components/icons/CloseIcon.js";
|
|
82
82
|
import "../components/ui/Checkbox.js";
|
|
83
83
|
import "../components/icons/CheckIcon.js";
|
|
84
84
|
import "./IconContext.js";
|
|
85
85
|
import "../components/ui/DropDown.js";
|
|
86
|
-
import "../index-
|
|
86
|
+
import "../index-27c30844.js";
|
|
87
87
|
import "../components/layout/toolbar/MenuItem.js";
|
|
88
88
|
import "../components/layout/toolbar/MenuSeparator.js";
|
|
89
89
|
import "../utils/dateFormatter.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as v from "react";
|
|
2
2
|
import { useLayoutEffect as oe } from "react";
|
|
3
|
-
import { u as Vt, P as It, a as ht,
|
|
3
|
+
import { u as Vt, P as It, a as ht, g as ie, h as se } from "./index-c9a2990a.js";
|
|
4
4
|
import { jsx as zt } from "react/jsx-runtime";
|
|
5
5
|
import * as re from "react-dom";
|
|
6
6
|
function bt(t) {
|
|
@@ -1463,8 +1463,8 @@ export {
|
|
|
1463
1463
|
On as a,
|
|
1464
1464
|
Dn as b,
|
|
1465
1465
|
Mn as c,
|
|
1466
|
-
|
|
1467
|
-
|
|
1466
|
+
Rn as d,
|
|
1467
|
+
bt as e,
|
|
1468
1468
|
Pn as f,
|
|
1469
1469
|
Tn as h,
|
|
1470
1470
|
Ln as l,
|