@pdf-viewer/react 1.11.0-beta.2 → 1.11.0-rc.1
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-082ff242.js → ToolbarLayout.module-e774f3e1.js} +979 -973
- package/dist/assets/ToolbarLayout.css +1 -1
- package/dist/components/RPConfig.js +962 -843
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/RPLayout.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 +1 -1
- 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 +2 -2
- 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/RPMoreOptions.js +2 -2
- 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/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/ToolbarCustom.js +1 -1
- package/dist/components/layout/toolbar/ToolbarDefault.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +1 -1
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/NextPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +1 -1
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/Checkbox.js +237 -125
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/RPTooltip.js +211 -424
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/index-808ea7bf.js +1685 -0
- package/dist/index-a48ec088.js +1672 -0
- package/dist/index-c9a2990a.js +332 -0
- package/dist/main.js +1 -1
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
- 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,152 +1,264 @@
|
|
|
1
|
-
import { jsxs 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 { jsx as i, jsxs as w, Fragment as U } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { c as z, u as B, P as E, a as S, b as G, d as K, e as X } from "../../index-c9a2990a.js";
|
|
4
|
+
import { CheckIcon as J } from "../icons/CheckIcon.js";
|
|
5
|
+
import '../../assets/Checkbox.css';function Q(e) {
|
|
6
|
+
const r = s.useRef({ value: e, previous: e });
|
|
7
|
+
return s.useMemo(() => (r.current.value !== e && (r.current.previous = r.current.value, r.current.value = e), r.current.previous), [e]);
|
|
8
8
|
}
|
|
9
|
-
var
|
|
10
|
-
|
|
9
|
+
var g = "Checkbox", [V, re] = z(g), [W, P] = V(g);
|
|
10
|
+
function Y(e) {
|
|
11
|
+
const {
|
|
12
|
+
__scopeCheckbox: r,
|
|
13
|
+
checked: o,
|
|
14
|
+
children: d,
|
|
15
|
+
defaultChecked: n,
|
|
16
|
+
disabled: t,
|
|
17
|
+
form: h,
|
|
18
|
+
name: f,
|
|
19
|
+
onCheckedChange: u,
|
|
20
|
+
required: k,
|
|
21
|
+
value: C = "on",
|
|
22
|
+
// @ts-expect-error
|
|
23
|
+
internal_do_not_use_render: l
|
|
24
|
+
} = e, [p, v] = X({
|
|
25
|
+
prop: o,
|
|
26
|
+
defaultProp: n ?? !1,
|
|
27
|
+
onChange: u,
|
|
28
|
+
caller: g
|
|
29
|
+
}), [m, x] = s.useState(null), [_, c] = s.useState(null), a = s.useRef(!1), I = m ? !!h || !!m.closest("form") : (
|
|
30
|
+
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
31
|
+
!0
|
|
32
|
+
), R = {
|
|
33
|
+
checked: p,
|
|
34
|
+
disabled: t,
|
|
35
|
+
setChecked: v,
|
|
36
|
+
control: m,
|
|
37
|
+
setControl: x,
|
|
38
|
+
name: f,
|
|
39
|
+
form: h,
|
|
40
|
+
value: C,
|
|
41
|
+
hasConsumerStoppedPropagationRef: a,
|
|
42
|
+
required: k,
|
|
43
|
+
defaultChecked: b(n) ? !1 : n,
|
|
44
|
+
isFormControl: I,
|
|
45
|
+
bubbleInput: _,
|
|
46
|
+
setBubbleInput: c
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ i(
|
|
49
|
+
W,
|
|
50
|
+
{
|
|
51
|
+
scope: r,
|
|
52
|
+
...R,
|
|
53
|
+
children: Z(l) ? l(R) : d
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
var M = "CheckboxTrigger", T = s.forwardRef(
|
|
58
|
+
({ __scopeCheckbox: e, onKeyDown: r, onClick: o, ...d }, n) => {
|
|
11
59
|
const {
|
|
12
|
-
|
|
13
|
-
|
|
60
|
+
control: t,
|
|
61
|
+
value: h,
|
|
62
|
+
disabled: f,
|
|
14
63
|
checked: u,
|
|
15
|
-
|
|
64
|
+
required: k,
|
|
65
|
+
setControl: C,
|
|
66
|
+
setChecked: l,
|
|
67
|
+
hasConsumerStoppedPropagationRef: p,
|
|
68
|
+
isFormControl: v,
|
|
69
|
+
bubbleInput: m
|
|
70
|
+
} = P(M, e), x = B(n, C), _ = s.useRef(u);
|
|
71
|
+
return s.useEffect(() => {
|
|
72
|
+
const c = t == null ? void 0 : t.form;
|
|
73
|
+
if (c) {
|
|
74
|
+
const a = () => l(_.current);
|
|
75
|
+
return c.addEventListener("reset", a), () => c.removeEventListener("reset", a);
|
|
76
|
+
}
|
|
77
|
+
}, [t, l]), /* @__PURE__ */ i(
|
|
78
|
+
E.button,
|
|
79
|
+
{
|
|
80
|
+
type: "button",
|
|
81
|
+
role: "checkbox",
|
|
82
|
+
"aria-checked": b(u) ? "mixed" : u,
|
|
83
|
+
"aria-required": k,
|
|
84
|
+
"data-state": O(u),
|
|
85
|
+
"data-disabled": f ? "" : void 0,
|
|
86
|
+
disabled: f,
|
|
87
|
+
value: h,
|
|
88
|
+
...d,
|
|
89
|
+
ref: x,
|
|
90
|
+
onKeyDown: S(r, (c) => {
|
|
91
|
+
c.key === "Enter" && c.preventDefault();
|
|
92
|
+
}),
|
|
93
|
+
onClick: S(o, (c) => {
|
|
94
|
+
l((a) => b(a) ? !0 : !a), m && v && (p.current = c.isPropagationStopped(), p.current || c.stopPropagation());
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
T.displayName = M;
|
|
101
|
+
var q = s.forwardRef(
|
|
102
|
+
(e, r) => {
|
|
103
|
+
const {
|
|
104
|
+
__scopeCheckbox: o,
|
|
105
|
+
name: d,
|
|
106
|
+
checked: n,
|
|
107
|
+
defaultChecked: t,
|
|
16
108
|
required: h,
|
|
17
|
-
disabled:
|
|
18
|
-
value:
|
|
19
|
-
onCheckedChange:
|
|
20
|
-
form:
|
|
21
|
-
...
|
|
22
|
-
} = e
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
109
|
+
disabled: f,
|
|
110
|
+
value: u,
|
|
111
|
+
onCheckedChange: k,
|
|
112
|
+
form: C,
|
|
113
|
+
...l
|
|
114
|
+
} = e;
|
|
115
|
+
return /* @__PURE__ */ i(
|
|
116
|
+
Y,
|
|
117
|
+
{
|
|
118
|
+
__scopeCheckbox: o,
|
|
119
|
+
checked: n,
|
|
120
|
+
defaultChecked: t,
|
|
121
|
+
disabled: f,
|
|
122
|
+
required: h,
|
|
123
|
+
onCheckedChange: k,
|
|
124
|
+
name: d,
|
|
125
|
+
form: C,
|
|
126
|
+
value: u,
|
|
127
|
+
internal_do_not_use_render: ({ isFormControl: p }) => /* @__PURE__ */ w(U, { children: [
|
|
128
|
+
/* @__PURE__ */ i(
|
|
129
|
+
T,
|
|
130
|
+
{
|
|
131
|
+
...l,
|
|
132
|
+
ref: r,
|
|
133
|
+
__scopeCheckbox: o
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
p && /* @__PURE__ */ i(
|
|
137
|
+
L,
|
|
138
|
+
{
|
|
139
|
+
__scopeCheckbox: o
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
] })
|
|
32
143
|
}
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */ s(
|
|
35
|
-
w.button,
|
|
36
|
-
{
|
|
37
|
-
type: "button",
|
|
38
|
-
role: "checkbox",
|
|
39
|
-
"aria-checked": d(f) ? "mixed" : f,
|
|
40
|
-
"aria-required": h,
|
|
41
|
-
"data-state": M(f),
|
|
42
|
-
"data-disabled": l ? "" : void 0,
|
|
43
|
-
disabled: l,
|
|
44
|
-
value: b,
|
|
45
|
-
...x,
|
|
46
|
-
ref: v,
|
|
47
|
-
onKeyDown: I(e.onKeyDown, (o) => {
|
|
48
|
-
o.key === "Enter" && o.preventDefault();
|
|
49
|
-
}),
|
|
50
|
-
onClick: I(e.onClick, (o) => {
|
|
51
|
-
P((k) => d(k) ? !0 : !k), g && (y.current = o.isPropagationStopped(), y.current || o.stopPropagation());
|
|
52
|
-
})
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
|
-
g && /* @__PURE__ */ s(
|
|
56
|
-
X,
|
|
57
|
-
{
|
|
58
|
-
control: i,
|
|
59
|
-
bubbles: !y.current,
|
|
60
|
-
name: a,
|
|
61
|
-
value: b,
|
|
62
|
-
checked: f,
|
|
63
|
-
required: h,
|
|
64
|
-
disabled: l,
|
|
65
|
-
form: p,
|
|
66
|
-
style: { transform: "translateX(-100%)" },
|
|
67
|
-
defaultChecked: d(n) ? !1 : n
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
] });
|
|
144
|
+
);
|
|
71
145
|
}
|
|
72
146
|
);
|
|
73
|
-
|
|
74
|
-
var
|
|
147
|
+
q.displayName = g;
|
|
148
|
+
var A = "CheckboxIndicator", F = s.forwardRef(
|
|
75
149
|
(e, r) => {
|
|
76
|
-
const { __scopeCheckbox:
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
|
|
150
|
+
const { __scopeCheckbox: o, forceMount: d, ...n } = e, t = P(A, o);
|
|
151
|
+
return /* @__PURE__ */ i(
|
|
152
|
+
G,
|
|
79
153
|
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
154
|
+
present: d || b(t.checked) || t.checked === !0,
|
|
155
|
+
children: /* @__PURE__ */ i(
|
|
156
|
+
E.span,
|
|
157
|
+
{
|
|
158
|
+
"data-state": O(t.checked),
|
|
159
|
+
"data-disabled": t.disabled ? "" : void 0,
|
|
160
|
+
...n,
|
|
161
|
+
ref: r,
|
|
162
|
+
style: { pointerEvents: "none", ...e.style }
|
|
163
|
+
}
|
|
164
|
+
)
|
|
85
165
|
}
|
|
86
|
-
)
|
|
166
|
+
);
|
|
87
167
|
}
|
|
88
168
|
);
|
|
89
|
-
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
169
|
+
F.displayName = A;
|
|
170
|
+
var D = "CheckboxBubbleInput", L = s.forwardRef(
|
|
171
|
+
({ __scopeCheckbox: e, ...r }, o) => {
|
|
172
|
+
const {
|
|
173
|
+
control: d,
|
|
174
|
+
hasConsumerStoppedPropagationRef: n,
|
|
175
|
+
checked: t,
|
|
176
|
+
defaultChecked: h,
|
|
177
|
+
required: f,
|
|
178
|
+
disabled: u,
|
|
179
|
+
name: k,
|
|
180
|
+
value: C,
|
|
181
|
+
form: l,
|
|
182
|
+
bubbleInput: p,
|
|
183
|
+
setBubbleInput: v
|
|
184
|
+
} = P(D, e), m = B(o, v), x = Q(t), _ = K(d);
|
|
185
|
+
s.useEffect(() => {
|
|
186
|
+
const a = p;
|
|
187
|
+
if (!a)
|
|
188
|
+
return;
|
|
189
|
+
const I = window.HTMLInputElement.prototype, N = Object.getOwnPropertyDescriptor(
|
|
190
|
+
I,
|
|
191
|
+
"checked"
|
|
192
|
+
).set, j = !n.current;
|
|
193
|
+
if (x !== t && N) {
|
|
194
|
+
const H = new Event("click", { bubbles: j });
|
|
195
|
+
a.indeterminate = b(t), N.call(a, b(t) ? !1 : t), a.dispatchEvent(H);
|
|
116
196
|
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
197
|
+
}, [p, x, t, n]);
|
|
198
|
+
const c = s.useRef(b(t) ? !1 : t);
|
|
199
|
+
return /* @__PURE__ */ i(
|
|
200
|
+
E.input,
|
|
201
|
+
{
|
|
202
|
+
type: "checkbox",
|
|
203
|
+
"aria-hidden": !0,
|
|
204
|
+
defaultChecked: h ?? c.current,
|
|
205
|
+
required: f,
|
|
206
|
+
disabled: u,
|
|
207
|
+
name: k,
|
|
208
|
+
value: C,
|
|
209
|
+
form: l,
|
|
210
|
+
...r,
|
|
211
|
+
tabIndex: -1,
|
|
212
|
+
ref: m,
|
|
213
|
+
style: {
|
|
214
|
+
...r.style,
|
|
215
|
+
..._,
|
|
216
|
+
position: "absolute",
|
|
217
|
+
pointerEvents: "none",
|
|
218
|
+
opacity: 0,
|
|
219
|
+
margin: 0,
|
|
220
|
+
// We transform because the input is absolutely positioned but we have
|
|
221
|
+
// rendered it **after** the button. This pulls it back to sit on top
|
|
222
|
+
// of the button.
|
|
223
|
+
transform: "translateX(-100%)"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
L.displayName = D;
|
|
230
|
+
function Z(e) {
|
|
231
|
+
return typeof e == "function";
|
|
232
|
+
}
|
|
233
|
+
function b(e) {
|
|
121
234
|
return e === "indeterminate";
|
|
122
235
|
}
|
|
123
|
-
function
|
|
124
|
-
return
|
|
236
|
+
function O(e) {
|
|
237
|
+
return b(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
125
238
|
}
|
|
126
|
-
|
|
127
|
-
const R = {
|
|
239
|
+
const y = {
|
|
128
240
|
"rp-checkbox": "_rp-checkbox_1vwg8_1",
|
|
129
241
|
"rp-checkbox-indicator": "_rp-checkbox-indicator_1vwg8_25"
|
|
130
|
-
},
|
|
242
|
+
}, oe = ({
|
|
131
243
|
children: e,
|
|
132
244
|
value: r,
|
|
133
|
-
name:
|
|
134
|
-
onChange:
|
|
135
|
-
tabIndex:
|
|
136
|
-
}) => /* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
|
|
245
|
+
name: o,
|
|
246
|
+
onChange: d,
|
|
247
|
+
tabIndex: n
|
|
248
|
+
}) => /* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", position: "relative" }, children: [
|
|
249
|
+
/* @__PURE__ */ i(
|
|
250
|
+
q,
|
|
139
251
|
{
|
|
140
|
-
tabIndex:
|
|
141
|
-
className:
|
|
252
|
+
tabIndex: n,
|
|
253
|
+
className: y["rp-checkbox"],
|
|
142
254
|
checked: r,
|
|
143
|
-
id:
|
|
144
|
-
onCheckedChange:
|
|
145
|
-
children: /* @__PURE__ */
|
|
255
|
+
id: o,
|
|
256
|
+
onCheckedChange: d,
|
|
257
|
+
children: /* @__PURE__ */ i(F, { className: y["rp-checkbox-indicator"], children: /* @__PURE__ */ i(J, {}) })
|
|
146
258
|
}
|
|
147
259
|
),
|
|
148
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ i("label", { className: y["rp-checkbox-label"], htmlFor: o, children: e })
|
|
149
261
|
] });
|
|
150
262
|
export {
|
|
151
|
-
|
|
263
|
+
oe as UICheckbox
|
|
152
264
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as l, jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { R as p, T as c, P as _, C as A } from "../../index-
|
|
2
|
+
import { R as p, T as c, P as _, C as A } from "../../index-a48ec088.js";
|
|
3
3
|
import { c as F } from "../../clsx-0c6e471a.js";
|
|
4
4
|
import '../../assets/DropDown.css';const w = "_slideDownAndFade_1vzkq_1", m = "_slideLeftAndFade_1vzkq_1", f = "_slideUpAndFade_1vzkq_1", g = "_slideRightAndFade_1vzkq_1", h = {
|
|
5
5
|
"rp-dropdown-content": "_rp-dropdown-content_1vzkq_1",
|