@pdf-viewer/react 1.4.2 → 1.4.3
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/Popover-b7402893.js +1445 -0
- package/dist/{RPDefaultLayout-e27ef121.js → RPDefaultLayout-f9017f0e.js} +606 -601
- package/dist/component-1da194e8.js +337 -0
- package/dist/components/RPConfig.js +270 -259
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +2 -2
- package/dist/components/RPProvider.js +12 -11
- package/dist/components/layout/LayoutContainer.js +3 -2
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +3 -2
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +4 -3
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/RotateTool.js +1 -1
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +4 -3
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +4 -3
- package/dist/components/page/AnnotationLayer.js +3 -2
- package/dist/components/page/CanvasLayer.js +3 -2
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +3 -2
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +3 -2
- package/dist/components/page/TextLayer.js +3 -2
- package/dist/components/ui/Checkbox.js +111 -94
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/Popover.js +1 -1
- package/dist/components/ui/RPTooltip.js +206 -205
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/floating-ui.react-dom-15b9b819.js +1310 -0
- package/dist/index-0f08882b.js +1561 -0
- package/dist/index-10ac1200.js +150 -0
- package/dist/index-271658fe.js +331 -0
- package/dist/main.js +1 -1
- package/dist/types/utils/hooks/useWatermark.d.ts +1 -1
- package/dist/utils/hooks/useFileDownload.js +3 -2
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +3 -2
- package/dist/utils/hooks/usePrint.js +3 -2
- package/dist/utils/hooks/useScrollToPage.js +3 -2
- package/dist/utils/hooks/useSearch.js +3 -2
- package/dist/utils/hooks/useThumbnail.js +3 -2
- package/dist/utils/hooks/useVirtualReactWindow.js +3 -2
- package/dist/utils/hooks/useWatermark.js +59 -28
- package/package.json +2 -2
- package/dist/Popover-d11ec15c.js +0 -3061
- package/dist/floating-ui.react-dom-88a86594.js +0 -1447
- package/dist/index-48ca3f30.js +0 -307
- package/dist/index-4ba3ab9a.js +0 -1877
|
@@ -1,141 +1,158 @@
|
|
|
1
|
-
import { jsxs as g, jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { c as
|
|
4
|
-
import { CheckIcon as
|
|
5
|
-
import '../../assets/Checkbox.css';function
|
|
6
|
-
const r =
|
|
7
|
-
return
|
|
1
|
+
import { jsxs as g, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { c as O, u as S, a as j, P, b as N, d as H, e as K } from "../../index-271658fe.js";
|
|
4
|
+
import { CheckIcon as T } from "../icons/CheckIcon.js";
|
|
5
|
+
import '../../assets/Checkbox.css';function U(e) {
|
|
6
|
+
const r = n.useRef({ value: e, previous: e });
|
|
7
|
+
return n.useMemo(() => (r.current.value !== e && (r.current.previous = r.current.value, r.current.value = e), r.current.previous), [e]);
|
|
8
8
|
}
|
|
9
|
-
var
|
|
9
|
+
var v = "Checkbox", [q, Y] = O(v), [z, F] = q(v), w = n.forwardRef(
|
|
10
10
|
(e, r) => {
|
|
11
11
|
const {
|
|
12
12
|
__scopeCheckbox: t,
|
|
13
|
-
name:
|
|
14
|
-
checked:
|
|
15
|
-
defaultChecked:
|
|
16
|
-
required:
|
|
13
|
+
name: i,
|
|
14
|
+
checked: p,
|
|
15
|
+
defaultChecked: c,
|
|
16
|
+
required: b,
|
|
17
17
|
disabled: u,
|
|
18
|
-
value:
|
|
18
|
+
value: m = "on",
|
|
19
19
|
onCheckedChange: C,
|
|
20
|
-
form:
|
|
21
|
-
...
|
|
22
|
-
} = e, [
|
|
23
|
-
prop:
|
|
24
|
-
defaultProp:
|
|
25
|
-
onChange: C
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
form: k,
|
|
21
|
+
...y
|
|
22
|
+
} = e, [o, R] = n.useState(null), I = S(r, (s) => R(s)), l = n.useRef(!1), x = o ? k || !!o.closest("form") : !0, [f, E] = j({
|
|
23
|
+
prop: p,
|
|
24
|
+
defaultProp: c ?? !1,
|
|
25
|
+
onChange: C,
|
|
26
|
+
caller: v
|
|
27
|
+
}), L = n.useRef(f);
|
|
28
|
+
return n.useEffect(() => {
|
|
29
|
+
const s = o == null ? void 0 : o.form;
|
|
30
|
+
if (s) {
|
|
31
|
+
const h = () => E(L.current);
|
|
32
|
+
return s.addEventListener("reset", h), () => s.removeEventListener("reset", h);
|
|
32
33
|
}
|
|
33
|
-
}, [
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
|
|
34
|
+
}, [o, E]), /* @__PURE__ */ g(z, { scope: t, state: f, disabled: u, children: [
|
|
35
|
+
/* @__PURE__ */ a(
|
|
36
|
+
P.button,
|
|
36
37
|
{
|
|
37
38
|
type: "button",
|
|
38
39
|
role: "checkbox",
|
|
39
|
-
"aria-checked": d(
|
|
40
|
-
"aria-required":
|
|
41
|
-
"data-state":
|
|
40
|
+
"aria-checked": d(f) ? "mixed" : f,
|
|
41
|
+
"aria-required": b,
|
|
42
|
+
"data-state": A(f),
|
|
42
43
|
"data-disabled": u ? "" : void 0,
|
|
43
44
|
disabled: u,
|
|
44
|
-
value:
|
|
45
|
-
...
|
|
46
|
-
ref:
|
|
47
|
-
onKeyDown:
|
|
48
|
-
|
|
45
|
+
value: m,
|
|
46
|
+
...y,
|
|
47
|
+
ref: I,
|
|
48
|
+
onKeyDown: N(e.onKeyDown, (s) => {
|
|
49
|
+
s.key === "Enter" && s.preventDefault();
|
|
49
50
|
}),
|
|
50
|
-
onClick:
|
|
51
|
-
|
|
51
|
+
onClick: N(e.onClick, (s) => {
|
|
52
|
+
E((h) => d(h) ? !0 : !h), x && (l.current = s.isPropagationStopped(), l.current || s.stopPropagation());
|
|
52
53
|
})
|
|
53
54
|
}
|
|
54
55
|
),
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
x && /* @__PURE__ */ a(
|
|
57
|
+
D,
|
|
57
58
|
{
|
|
58
|
-
control:
|
|
59
|
-
bubbles: !
|
|
60
|
-
name:
|
|
61
|
-
value:
|
|
62
|
-
checked:
|
|
63
|
-
required:
|
|
59
|
+
control: o,
|
|
60
|
+
bubbles: !l.current,
|
|
61
|
+
name: i,
|
|
62
|
+
value: m,
|
|
63
|
+
checked: f,
|
|
64
|
+
required: b,
|
|
64
65
|
disabled: u,
|
|
65
|
-
form:
|
|
66
|
+
form: k,
|
|
66
67
|
style: { transform: "translateX(-100%)" },
|
|
67
|
-
defaultChecked: d(
|
|
68
|
+
defaultChecked: d(c) ? !1 : c
|
|
68
69
|
}
|
|
69
70
|
)
|
|
70
71
|
] });
|
|
71
72
|
}
|
|
72
73
|
);
|
|
73
|
-
w.displayName =
|
|
74
|
-
var
|
|
74
|
+
w.displayName = v;
|
|
75
|
+
var B = "CheckboxIndicator", M = n.forwardRef(
|
|
75
76
|
(e, r) => {
|
|
76
|
-
const { __scopeCheckbox: t, forceMount:
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
|
|
77
|
+
const { __scopeCheckbox: t, forceMount: i, ...p } = e, c = F(B, t);
|
|
78
|
+
return /* @__PURE__ */ a(H, { present: i || d(c.state) || c.state === !0, children: /* @__PURE__ */ a(
|
|
79
|
+
P.span,
|
|
79
80
|
{
|
|
80
|
-
"data-state":
|
|
81
|
-
"data-disabled":
|
|
82
|
-
...
|
|
81
|
+
"data-state": A(c.state),
|
|
82
|
+
"data-disabled": c.disabled ? "" : void 0,
|
|
83
|
+
...p,
|
|
83
84
|
ref: r,
|
|
84
85
|
style: { pointerEvents: "none", ...e.style }
|
|
85
86
|
}
|
|
86
87
|
) });
|
|
87
88
|
}
|
|
88
89
|
);
|
|
89
|
-
|
|
90
|
-
var X =
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
...b,
|
|
112
|
-
position: "absolute",
|
|
113
|
-
pointerEvents: "none",
|
|
114
|
-
opacity: 0,
|
|
115
|
-
margin: 0
|
|
90
|
+
M.displayName = B;
|
|
91
|
+
var X = "CheckboxBubbleInput", D = n.forwardRef(
|
|
92
|
+
({
|
|
93
|
+
__scopeCheckbox: e,
|
|
94
|
+
control: r,
|
|
95
|
+
checked: t,
|
|
96
|
+
bubbles: i = !0,
|
|
97
|
+
defaultChecked: p,
|
|
98
|
+
...c
|
|
99
|
+
}, b) => {
|
|
100
|
+
const u = n.useRef(null), m = S(u, b), C = U(t), k = K(r);
|
|
101
|
+
n.useEffect(() => {
|
|
102
|
+
const o = u.current;
|
|
103
|
+
if (!o)
|
|
104
|
+
return;
|
|
105
|
+
const R = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(
|
|
106
|
+
R,
|
|
107
|
+
"checked"
|
|
108
|
+
).set;
|
|
109
|
+
if (C !== t && l) {
|
|
110
|
+
const x = new Event("click", { bubbles: i });
|
|
111
|
+
o.indeterminate = d(t), l.call(o, d(t) ? !1 : t), o.dispatchEvent(x);
|
|
116
112
|
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
113
|
+
}, [C, t, i]);
|
|
114
|
+
const y = n.useRef(d(t) ? !1 : t);
|
|
115
|
+
return /* @__PURE__ */ a(
|
|
116
|
+
P.input,
|
|
117
|
+
{
|
|
118
|
+
type: "checkbox",
|
|
119
|
+
"aria-hidden": !0,
|
|
120
|
+
defaultChecked: p ?? y.current,
|
|
121
|
+
...c,
|
|
122
|
+
tabIndex: -1,
|
|
123
|
+
ref: m,
|
|
124
|
+
style: {
|
|
125
|
+
...c.style,
|
|
126
|
+
...k,
|
|
127
|
+
position: "absolute",
|
|
128
|
+
pointerEvents: "none",
|
|
129
|
+
opacity: 0,
|
|
130
|
+
margin: 0
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
D.displayName = X;
|
|
120
137
|
function d(e) {
|
|
121
138
|
return e === "indeterminate";
|
|
122
139
|
}
|
|
123
|
-
function
|
|
140
|
+
function A(e) {
|
|
124
141
|
return d(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
125
142
|
}
|
|
126
|
-
var
|
|
127
|
-
const
|
|
143
|
+
var G = w, J = M;
|
|
144
|
+
const _ = {
|
|
128
145
|
"rp-checkbox": "_rp-checkbox_188mv_1",
|
|
129
146
|
"rp-checkbox-indicator": "_rp-checkbox-indicator_188mv_21"
|
|
130
|
-
},
|
|
147
|
+
}, Z = ({
|
|
131
148
|
children: e,
|
|
132
149
|
value: r,
|
|
133
150
|
name: t,
|
|
134
|
-
onChange:
|
|
151
|
+
onChange: i
|
|
135
152
|
}) => /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", position: "relative" }, children: [
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ a(G, { className: _["rp-checkbox"], checked: r, id: t, onCheckedChange: i, children: /* @__PURE__ */ a(J, { className: _["rp-checkbox-indicator"], children: /* @__PURE__ */ a(T, {}) }) }),
|
|
154
|
+
/* @__PURE__ */ a("label", { className: _["rp-checkbox-label"], htmlFor: t, children: e })
|
|
138
155
|
] });
|
|
139
156
|
export {
|
|
140
|
-
|
|
157
|
+
Z as UICheckbox
|
|
141
158
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as i, jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { R as l, T as c, P as p, C as _ } from "../../index-
|
|
2
|
+
import { R as l, T as c, P as p, C as _ } from "../../index-0f08882b.js";
|
|
3
3
|
import { c as m } from "../../clsx-0c6e471a.js";
|
|
4
4
|
import '../../assets/DropDown.css';const A = "_slideDownAndFade_d12em_1", F = "_slideLeftAndFade_d12em_1", w = "_slideUpAndFade_d12em_1", f = "_slideRightAndFade_d12em_1", g = {
|
|
5
5
|
"rp-dropdown-content": "_rp-dropdown-content_d12em_1",
|