@pdf-viewer/react 1.9.0-beta.2 → 1.9.0-beta.4

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.
Files changed (98) hide show
  1. package/dist/RPLayout-5892502c.js +3494 -0
  2. package/dist/{SearchCloseButton-ddb9877e.js → SearchCloseButton-cbf182aa.js} +7 -6
  3. package/dist/assets/Checkbox.css +1 -1
  4. package/dist/assets/RPLayout.css +1 -1
  5. package/dist/components/RPConfig.js +691 -673
  6. package/dist/components/RPController.js +1 -1
  7. package/dist/components/RPPages.js +4 -5
  8. package/dist/components/layout/LayoutContainer.js +5 -5
  9. package/dist/components/layout/RPDefaultLayout.js +1 -1
  10. package/dist/components/layout/RPLayout.js +4 -5
  11. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  12. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  13. package/dist/components/layout/sidebar/Thumbnails.js +3 -2
  14. package/dist/components/layout/toolbar/DocumentDialog.js +4 -5
  15. package/dist/components/layout/toolbar/DocumentProperties.js +23 -19
  16. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  17. package/dist/components/layout/toolbar/MenuItem.js +1 -1
  18. package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
  19. package/dist/components/layout/toolbar/MostPageTool.js +5 -6
  20. package/dist/components/layout/toolbar/OtherTool.js +2 -2
  21. package/dist/components/layout/toolbar/Paginate.js +1 -1
  22. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  23. package/dist/components/layout/toolbar/RPToolbar.js +2 -2
  24. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  25. package/dist/components/layout/toolbar/RotateTool.js +1 -1
  26. package/dist/components/layout/toolbar/ScrollModeTool.js +35 -37
  27. package/dist/components/layout/toolbar/SearchCloseButton.js +1 -1
  28. package/dist/components/layout/toolbar/SearchResultNavigator.js +2 -2
  29. package/dist/components/layout/toolbar/SearchTool.js +3 -4
  30. package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
  31. package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
  32. package/dist/components/layout/toolbar/ToolbarCustom.js +4 -5
  33. package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
  34. package/dist/components/layout/toolbar/ZoomTool.js +4 -3
  35. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
  36. package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
  37. package/dist/components/layout/toolbar/tools/NextPageTool.js +5 -6
  38. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
  39. package/dist/components/layout/toolbar/tools/PrintTool.js +1 -1
  40. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
  41. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +2 -2
  42. package/dist/components/layout/toolbar/tools/defaults/TopbarDefaultTools.js +1 -1
  43. package/dist/components/page/AnnotationLayer.js +4 -5
  44. package/dist/components/page/CanvasLayer.js +4 -5
  45. package/dist/components/page/DualPage.js +1 -1
  46. package/dist/components/page/RPPage.js +4 -4
  47. package/dist/components/page/SinglePage.js +1 -1
  48. package/dist/components/page/TextHighlightLayer.js +4 -5
  49. package/dist/components/page/TextLayer.js +4 -5
  50. package/dist/components/ui/Button.js +8 -8
  51. package/dist/components/ui/Checkbox.js +243 -120
  52. package/dist/components/ui/DropDown.js +16 -16
  53. package/dist/components/ui/Input.js +11 -11
  54. package/dist/components/ui/LoadingIndicator.js +1 -1
  55. package/dist/components/ui/RPTooltip.js +211 -426
  56. package/dist/contexts/ElementPageContext.js +54 -43
  57. package/dist/contexts/PaginationContext.js +1 -1
  58. package/dist/contexts/PrintContext.js +1 -1
  59. package/dist/contexts/SearchContext.js +1 -1
  60. package/dist/contexts/ThumbnailsContext.js +1 -1
  61. package/dist/index-00f8683a.js +1672 -0
  62. package/dist/index-5f66a29f.js +1681 -0
  63. package/dist/index-6b37f504.js +332 -0
  64. package/dist/main.js +1 -1
  65. package/dist/types/components/layout/LayoutContainer.d.ts +5 -1
  66. package/dist/types/components/layout/sidebar/Thumbnails.d.ts +3 -1
  67. package/dist/types/components/layout/toolbar/RPToolbar.d.ts +3 -1
  68. package/dist/types/components/page/RPPage.d.ts +3 -1
  69. package/dist/types/components/ui/Button.d.ts +3 -1
  70. package/dist/types/components/ui/Checkbox.d.ts +1 -0
  71. package/dist/types/components/ui/DropDown.d.ts +2 -1
  72. package/dist/types/components/ui/Input.d.ts +3 -1
  73. package/dist/types/components/ui/RPTooltip.d.ts +3 -1
  74. package/dist/types/utils/types.d.ts +3 -1
  75. package/dist/types/utils/withRef.d.ts +4 -0
  76. package/dist/utils/hooks/useFileDownload.js +4 -5
  77. package/dist/utils/hooks/useLicense.js +26 -24
  78. package/dist/utils/hooks/usePageRotateContext.js +19 -20
  79. package/dist/utils/hooks/usePaginate.js +4 -5
  80. package/dist/utils/hooks/usePresentPage.js +4 -5
  81. package/dist/utils/hooks/usePrint.js +4 -5
  82. package/dist/utils/hooks/useScrollToPage.js +4 -5
  83. package/dist/utils/hooks/useSearch.js +4 -5
  84. package/dist/utils/hooks/useThumbnail.js +4 -5
  85. package/dist/utils/hooks/useVirtualReactWindow.js +4 -5
  86. package/dist/utils/types.js +6 -6
  87. package/dist/utils/withRef.js +8 -0
  88. package/package.json +1 -1
  89. package/dist/Popover-1faa77f6.js +0 -1445
  90. package/dist/RPLayout-81cd4970.js +0 -3393
  91. package/dist/assets/Popover.css +0 -1
  92. package/dist/component-1da194e8.js +0 -337
  93. package/dist/components/ui/Popover.js +0 -6
  94. package/dist/floating-ui.react-dom-15b9b819.js +0 -1310
  95. package/dist/index-1cb41342.js +0 -307
  96. package/dist/index-7279fb4e.js +0 -1557
  97. package/dist/index-aa2d3884.js +0 -140
  98. package/dist/types/components/ui/Popover.d.ts +0 -9
@@ -0,0 +1,332 @@
1
+ import * as s from "react";
2
+ import { jsx as v, Fragment as A } from "react/jsx-runtime";
3
+ import * as E from "react-dom";
4
+ function k(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
5
+ return function(r) {
6
+ if (e == null || e(r), n === !1 || !r.defaultPrevented)
7
+ return t == null ? void 0 : t(r);
8
+ };
9
+ }
10
+ function C(e, t) {
11
+ if (typeof e == "function")
12
+ return e(t);
13
+ e != null && (e.current = t);
14
+ }
15
+ function P(...e) {
16
+ return (t) => {
17
+ let n = !1;
18
+ const o = e.map((r) => {
19
+ const i = C(r, t);
20
+ return !n && typeof i == "function" && (n = !0), i;
21
+ });
22
+ if (n)
23
+ return () => {
24
+ for (let r = 0; r < o.length; r++) {
25
+ const i = o[r];
26
+ typeof i == "function" ? i() : C(e[r], null);
27
+ }
28
+ };
29
+ };
30
+ }
31
+ function x(...e) {
32
+ return s.useCallback(P(...e), e);
33
+ }
34
+ function B(e, t) {
35
+ const n = s.createContext(t), o = (i) => {
36
+ const { children: u, ...c } = i, a = s.useMemo(() => c, Object.values(c));
37
+ return /* @__PURE__ */ v(n.Provider, { value: a, children: u });
38
+ };
39
+ o.displayName = e + "Provider";
40
+ function r(i) {
41
+ const u = s.useContext(n);
42
+ if (u)
43
+ return u;
44
+ if (t !== void 0)
45
+ return t;
46
+ throw new Error(`\`${i}\` must be used within \`${e}\``);
47
+ }
48
+ return [o, r];
49
+ }
50
+ function Z(e, t = []) {
51
+ let n = [];
52
+ function o(i, u) {
53
+ const c = s.createContext(u), a = n.length;
54
+ n = [...n, u];
55
+ const l = (f) => {
56
+ var g;
57
+ const { scope: m, children: p, ...h } = f, S = ((g = m == null ? void 0 : m[e]) == null ? void 0 : g[a]) || c, b = s.useMemo(() => h, Object.values(h));
58
+ return /* @__PURE__ */ v(S.Provider, { value: b, children: p });
59
+ };
60
+ l.displayName = i + "Provider";
61
+ function d(f, m) {
62
+ var S;
63
+ const p = ((S = m == null ? void 0 : m[e]) == null ? void 0 : S[a]) || c, h = s.useContext(p);
64
+ if (h)
65
+ return h;
66
+ if (u !== void 0)
67
+ return u;
68
+ throw new Error(`\`${f}\` must be used within \`${i}\``);
69
+ }
70
+ return [l, d];
71
+ }
72
+ const r = () => {
73
+ const i = n.map((u) => s.createContext(u));
74
+ return function(c) {
75
+ const a = (c == null ? void 0 : c[e]) || i;
76
+ return s.useMemo(
77
+ () => ({ [`__scope${e}`]: { ...c, [e]: a } }),
78
+ [c, a]
79
+ );
80
+ };
81
+ };
82
+ return r.scopeName = e, [o, R(r, ...t)];
83
+ }
84
+ function R(...e) {
85
+ const t = e[0];
86
+ if (e.length === 1)
87
+ return t;
88
+ const n = () => {
89
+ const o = e.map((r) => ({
90
+ useScope: r(),
91
+ scopeName: r.scopeName
92
+ }));
93
+ return function(i) {
94
+ const u = o.reduce((c, { useScope: a, scopeName: l }) => {
95
+ const f = a(i)[`__scope${l}`];
96
+ return { ...c, ...f };
97
+ }, {});
98
+ return s.useMemo(() => ({ [`__scope${t.scopeName}`]: u }), [u]);
99
+ };
100
+ };
101
+ return n.scopeName = t.scopeName, n;
102
+ }
103
+ // @__NO_SIDE_EFFECTS__
104
+ function O(e) {
105
+ const t = /* @__PURE__ */ M(e), n = s.forwardRef((o, r) => {
106
+ const { children: i, ...u } = o, c = s.Children.toArray(i), a = c.find(I);
107
+ if (a) {
108
+ const l = a.props.children, d = c.map((f) => f === a ? s.Children.count(l) > 1 ? s.Children.only(null) : s.isValidElement(l) ? l.props.children : null : f);
109
+ return /* @__PURE__ */ v(t, { ...u, ref: r, children: s.isValidElement(l) ? s.cloneElement(l, void 0, d) : null });
110
+ }
111
+ return /* @__PURE__ */ v(t, { ...u, ref: r, children: i });
112
+ });
113
+ return n.displayName = `${e}.Slot`, n;
114
+ }
115
+ // @__NO_SIDE_EFFECTS__
116
+ function M(e) {
117
+ const t = s.forwardRef((n, o) => {
118
+ const { children: r, ...i } = n;
119
+ if (s.isValidElement(r)) {
120
+ const u = _(r), c = T(i, r.props);
121
+ return r.type !== s.Fragment && (c.ref = o ? P(o, u) : u), s.cloneElement(r, c);
122
+ }
123
+ return s.Children.count(r) > 1 ? s.Children.only(null) : null;
124
+ });
125
+ return t.displayName = `${e}.SlotClone`, t;
126
+ }
127
+ var w = Symbol("radix.slottable");
128
+ // @__NO_SIDE_EFFECTS__
129
+ function q(e) {
130
+ const t = ({ children: n }) => /* @__PURE__ */ v(A, { children: n });
131
+ return t.displayName = `${e}.Slottable`, t.__radixId = w, t;
132
+ }
133
+ function I(e) {
134
+ return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === w;
135
+ }
136
+ function T(e, t) {
137
+ const n = { ...t };
138
+ for (const o in t) {
139
+ const r = e[o], i = t[o];
140
+ /^on[A-Z]/.test(o) ? r && i ? n[o] = (...c) => {
141
+ const a = i(...c);
142
+ return r(...c), a;
143
+ } : r && (n[o] = r) : o === "style" ? n[o] = { ...r, ...i } : o === "className" && (n[o] = [r, i].filter(Boolean).join(" "));
144
+ }
145
+ return { ...e, ...n };
146
+ }
147
+ function _(e) {
148
+ var o, r;
149
+ let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
150
+ return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
151
+ }
152
+ var $ = [
153
+ "a",
154
+ "button",
155
+ "div",
156
+ "form",
157
+ "h2",
158
+ "h3",
159
+ "img",
160
+ "input",
161
+ "label",
162
+ "li",
163
+ "nav",
164
+ "ol",
165
+ "p",
166
+ "select",
167
+ "span",
168
+ "svg",
169
+ "ul"
170
+ ], G = $.reduce((e, t) => {
171
+ const n = /* @__PURE__ */ O(`Primitive.${t}`), o = s.forwardRef((r, i) => {
172
+ const { asChild: u, ...c } = r, a = u ? n : t;
173
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(a, { ...c, ref: i });
174
+ });
175
+ return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
176
+ }, {});
177
+ function J(e, t) {
178
+ e && E.flushSync(() => e.dispatchEvent(t));
179
+ }
180
+ var N = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
181
+ };
182
+ function K(e) {
183
+ const [t, n] = s.useState(void 0);
184
+ return N(() => {
185
+ if (e) {
186
+ n({ width: e.offsetWidth, height: e.offsetHeight });
187
+ const o = new ResizeObserver((r) => {
188
+ if (!Array.isArray(r) || !r.length)
189
+ return;
190
+ const i = r[0];
191
+ let u, c;
192
+ if ("borderBoxSize" in i) {
193
+ const a = i.borderBoxSize, l = Array.isArray(a) ? a[0] : a;
194
+ u = l.inlineSize, c = l.blockSize;
195
+ } else
196
+ u = e.offsetWidth, c = e.offsetHeight;
197
+ n({ width: u, height: c });
198
+ });
199
+ return o.observe(e, { box: "border-box" }), () => o.unobserve(e);
200
+ } else
201
+ n(void 0);
202
+ }, [e]), t;
203
+ }
204
+ function D(e, t) {
205
+ return s.useReducer((n, o) => t[n][o] ?? n, e);
206
+ }
207
+ var U = (e) => {
208
+ const { present: t, children: n } = e, o = W(t), r = typeof n == "function" ? n({ present: o.isPresent }) : s.Children.only(n), i = x(o.ref, z(r));
209
+ return typeof n == "function" || o.isPresent ? s.cloneElement(r, { ref: i }) : null;
210
+ };
211
+ U.displayName = "Presence";
212
+ function W(e) {
213
+ const [t, n] = s.useState(), o = s.useRef(null), r = s.useRef(e), i = s.useRef("none"), u = e ? "mounted" : "unmounted", [c, a] = D(u, {
214
+ mounted: {
215
+ UNMOUNT: "unmounted",
216
+ ANIMATION_OUT: "unmountSuspended"
217
+ },
218
+ unmountSuspended: {
219
+ MOUNT: "mounted",
220
+ ANIMATION_END: "unmounted"
221
+ },
222
+ unmounted: {
223
+ MOUNT: "mounted"
224
+ }
225
+ });
226
+ return s.useEffect(() => {
227
+ const l = y(o.current);
228
+ i.current = c === "mounted" ? l : "none";
229
+ }, [c]), N(() => {
230
+ const l = o.current, d = r.current;
231
+ if (d !== e) {
232
+ const m = i.current, p = y(l);
233
+ e ? a("MOUNT") : p === "none" || (l == null ? void 0 : l.display) === "none" ? a("UNMOUNT") : a(d && m !== p ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
234
+ }
235
+ }, [e, a]), N(() => {
236
+ if (t) {
237
+ let l;
238
+ const d = t.ownerDocument.defaultView ?? window, f = (p) => {
239
+ const S = y(o.current).includes(p.animationName);
240
+ if (p.target === t && S && (a("ANIMATION_END"), !r.current)) {
241
+ const b = t.style.animationFillMode;
242
+ t.style.animationFillMode = "forwards", l = d.setTimeout(() => {
243
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = b);
244
+ });
245
+ }
246
+ }, m = (p) => {
247
+ p.target === t && (i.current = y(o.current));
248
+ };
249
+ return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
250
+ d.clearTimeout(l), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
251
+ };
252
+ } else
253
+ a("ANIMATION_END");
254
+ }, [t, a]), {
255
+ isPresent: ["mounted", "unmountSuspended"].includes(c),
256
+ ref: s.useCallback((l) => {
257
+ o.current = l ? getComputedStyle(l) : null, n(l);
258
+ }, [])
259
+ };
260
+ }
261
+ function y(e) {
262
+ return (e == null ? void 0 : e.animationName) || "none";
263
+ }
264
+ function z(e) {
265
+ var o, r;
266
+ let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
267
+ return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
268
+ }
269
+ var L = s[" useInsertionEffect ".trim().toString()] || N;
270
+ function Q({
271
+ prop: e,
272
+ defaultProp: t,
273
+ onChange: n = () => {
274
+ },
275
+ caller: o
276
+ }) {
277
+ const [r, i, u] = j({
278
+ defaultProp: t,
279
+ onChange: n
280
+ }), c = e !== void 0, a = c ? e : r;
281
+ {
282
+ const d = s.useRef(e !== void 0);
283
+ s.useEffect(() => {
284
+ const f = d.current;
285
+ f !== c && console.warn(
286
+ `${o} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
287
+ ), d.current = c;
288
+ }, [c, o]);
289
+ }
290
+ const l = s.useCallback(
291
+ (d) => {
292
+ var f;
293
+ if (c) {
294
+ const m = F(d) ? d(e) : d;
295
+ m !== e && ((f = u.current) == null || f.call(u, m));
296
+ } else
297
+ i(d);
298
+ },
299
+ [c, e, i, u]
300
+ );
301
+ return [a, l];
302
+ }
303
+ function j({
304
+ defaultProp: e,
305
+ onChange: t
306
+ }) {
307
+ const [n, o] = s.useState(e), r = s.useRef(n), i = s.useRef(t);
308
+ return L(() => {
309
+ i.current = t;
310
+ }, [t]), s.useEffect(() => {
311
+ var u;
312
+ r.current !== n && ((u = i.current) == null || u.call(i, n), r.current = n);
313
+ }, [n, r]), [n, o, i];
314
+ }
315
+ function F(e) {
316
+ return typeof e == "function";
317
+ }
318
+ export {
319
+ G as P,
320
+ k as a,
321
+ U as b,
322
+ Z as c,
323
+ K as d,
324
+ Q as e,
325
+ q as f,
326
+ J as g,
327
+ N as h,
328
+ O as i,
329
+ P as j,
330
+ B as k,
331
+ x as u
332
+ };
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RPProvider as r } from "./components/RPProvider.js";
2
- import { a as x, b as m, R as l, S as p, c as f, u as a, d as n, e as s } from "./RPLayout-81cd4970.js";
2
+ import { a as x, b as m, R as l, S as p, c as f, u as a, d as n, e as s } from "./RPLayout-5892502c.js";
3
3
  import { RPConfig as i } from "./components/RPConfig.js";
4
4
  import { RPController as T } from "./components/RPController.js";
5
5
  import { RPTheme as d } from "./components/RPTheme.js";
@@ -6,5 +6,9 @@ interface Props extends HTMLAttributes<HTMLDivElement> {
6
6
  }
7
7
  export declare const LayoutContainer: import('react').ForwardRefExoticComponent<Props & {
8
8
  children?: import('react').ReactNode | undefined;
9
- } & import('react').RefAttributes<HTMLDivElement>>;
9
+ } & import('react').RefAttributes<HTMLDivElement>> | ((props: Props & {
10
+ children?: import('react').ReactNode | undefined;
11
+ } & {
12
+ ref?: import('react').Ref<HTMLDivElement> | undefined;
13
+ }) => import('react').ReactNode);
10
14
  export {};
@@ -1,5 +1,7 @@
1
1
  interface Props {
2
2
  show: boolean;
3
3
  }
4
- export declare const Thumbnails: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLDivElement>>;
4
+ export declare const Thumbnails: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLDivElement>> | ((props: Props & {
5
+ ref?: import('react').Ref<HTMLDivElement> | undefined;
6
+ }) => import('react').ReactNode);
5
7
  export {};
@@ -1 +1,3 @@
1
- export declare const RPToolbar: import('react').ForwardRefExoticComponent<import('react').RefAttributes<HTMLDivElement>>;
1
+ export declare const RPToolbar: import('react').ForwardRefExoticComponent<object & import('react').RefAttributes<HTMLDivElement>> | ((props: object & {
2
+ ref?: import('react').Ref<HTMLDivElement> | undefined;
3
+ }) => import('react').ReactNode);
@@ -1,5 +1,7 @@
1
1
  interface Props extends React.HTMLAttributes<HTMLDivElement> {
2
2
  pageNumber: number;
3
3
  }
4
- export declare const RPPage: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLDivElement>>;
4
+ export declare const RPPage: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLDivElement>> | ((props: Props & {
5
+ ref?: import('react').Ref<HTMLDivElement> | undefined;
6
+ }) => import('react').ReactNode);
5
7
  export {};
@@ -2,5 +2,7 @@ import { ButtonHTMLAttributes, PropsWithChildren } from 'react';
2
2
  interface Props extends PropsWithChildren, ButtonHTMLAttributes<{}> {
3
3
  active?: boolean;
4
4
  }
5
- export declare const UIButton: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLButtonElement>>;
5
+ export declare const UIButton: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLButtonElement>> | ((props: Props & {
6
+ ref?: import('react').Ref<HTMLButtonElement> | undefined;
7
+ }) => import('react').ReactNode);
6
8
  export {};
@@ -3,6 +3,7 @@ interface UICheckboxProps {
3
3
  value?: boolean;
4
4
  onChange?: (value: boolean) => void;
5
5
  name: string;
6
+ tabIndex?: number;
6
7
  }
7
8
  export declare const UICheckbox: FC<PropsWithChildren<UICheckboxProps>>;
8
9
  export {};
@@ -1,9 +1,10 @@
1
1
  import { DropdownMenuContentProps } from '@radix-ui/react-dropdown-menu';
2
- import { FC, PropsWithChildren } from 'react';
2
+ import { FC, PropsWithChildren, Dispatch, SetStateAction } from 'react';
3
3
  interface Props extends PropsWithChildren, DropdownMenuContentProps {
4
4
  triggerComponent: React.ReactElement;
5
5
  container: HTMLDivElement | null;
6
6
  open?: boolean;
7
+ onOpenChange?: Dispatch<SetStateAction<boolean>>;
7
8
  }
8
9
  export declare const UIDropDown: FC<Props>;
9
10
  export {};
@@ -2,5 +2,7 @@ import { InputHTMLAttributes, PropsWithChildren, ReactNode } from 'react';
2
2
  interface Props extends InputHTMLAttributes<HTMLInputElement>, PropsWithChildren {
3
3
  icon?: ReactNode;
4
4
  }
5
- export declare const UIInput: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLInputElement>>;
5
+ export declare const UIInput: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLInputElement>> | ((props: Props & {
6
+ ref?: import('react').Ref<HTMLInputElement> | undefined;
7
+ }) => ReactNode);
6
8
  export {};
@@ -5,5 +5,7 @@ interface TooltipProps {
5
5
  className?: string;
6
6
  style?: CSSProperties;
7
7
  }
8
- declare const RPTooltip: import('react').ForwardRefExoticComponent<TooltipProps & import('react').RefAttributes<HTMLDivElement>>;
8
+ declare const RPTooltip: import('react').ForwardRefExoticComponent<TooltipProps & import('react').RefAttributes<HTMLDivElement>> | ((props: TooltipProps & {
9
+ ref?: import('react').Ref<HTMLDivElement> | undefined;
10
+ }) => ReactNode);
9
11
  export default RPTooltip;
@@ -221,13 +221,15 @@ export interface DarkMode extends DarkModeProps {
221
221
  onDarkModeChange: (value: boolean) => void;
222
222
  }
223
223
  export interface License {
224
+ validating?: boolean;
224
225
  isValid: boolean;
225
226
  invalidatedMessage?: string;
226
227
  type?: LicenseType;
227
228
  }
228
229
  export declare enum LicenseType {
229
230
  Organization = "organization",
230
- Developer = "developer"
231
+ Developer = "developer",
232
+ FreeTrial = "free-trial"
231
233
  }
232
234
  export type DecryptedLicense = {
233
235
  exp: number;
@@ -0,0 +1,4 @@
1
+ import { ForwardRefRenderFunction, PropsWithoutRef, Ref } from 'react';
2
+ export declare const withRef: <R extends HTMLElement, P = object>(render: ForwardRefRenderFunction<R, PropsWithoutRef<P>>) => import('react').ForwardRefExoticComponent<PropsWithoutRef<P> & import('react').RefAttributes<R>> | ((props: PropsWithoutRef<P> & {
3
+ ref?: Ref<R>;
4
+ }) => import('react').ReactNode);
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { c as Z } from "../../RPLayout-81cd4970.js";
5
+ import { c as Y } from "../../RPLayout-5892502c.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -32,16 +32,15 @@ import "../../components/RPDropFileZone.js";
32
32
  import "../../contexts/ToolbarComponentContext.js";
33
33
  import "../../contexts/ToolComponentContext.js";
34
34
  import "../../components/ui/Button.js";
35
- import "../../SearchCloseButton-ddb9877e.js";
35
+ import "../../SearchCloseButton-cbf182aa.js";
36
36
  import "../../components/ui/Input.js";
37
37
  import "../../components/ui/Checkbox.js";
38
38
  import "../../components/icons/LoaderIcon.js";
39
39
  import "../../contexts/IconContext.js";
40
40
  import "../../components/ui/RPTooltip.js";
41
- import "../../Popover-1faa77f6.js";
42
41
  import "../../contexts/ViewportContext.js";
43
- import "../../contexts/IconToolContext.js";
44
42
  import "../../components/ui/DropDown.js";
43
+ import "../../contexts/IconToolContext.js";
45
44
  import "../../components/layout/toolbar/MenuItem.js";
46
45
  import "../../components/layout/toolbar/MenuSeparator.js";
47
46
  import "../dateFormatter.js";
@@ -49,5 +48,5 @@ import "../../components/layout/toolbar/PropertyItem.js";
49
48
  import "../../contexts/OtherToolContext.js";
50
49
  import "../../components/layout/toolbar/RotateTool.js";
51
50
  export {
52
- Z as useFileDownload
51
+ Y as useFileDownload
53
52
  };
@@ -1,9 +1,9 @@
1
- import { useState as g, useCallback as h, useEffect as A } from "react";
2
- import { appConsole as c } from "../appConsole.js";
3
- const b = /* @__PURE__ */ new Date("2025-08-04T03:09:32.567Z"), l = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
4
- invalidLicense: `You are currently using without a valid license. ${l}`,
5
- mismatchedDomain: `Your license key is not valid for the current domain / IP. ${l}`,
6
- expired: `Your license key has expired. ${l}`,
1
+ import { useState as E, useCallback as h, useEffect as A } from "react";
2
+ import { appConsole as l } from "../appConsole.js";
3
+ const b = /* @__PURE__ */ new Date("2025-08-20T05:15:16.558Z"), d = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
4
+ invalidLicense: `You are currently using without a valid license. ${d}`,
5
+ mismatchedDomain: `Your license key is not valid for the current domain / IP. ${d}`,
6
+ expired: `Your license key has expired. ${d}`,
7
7
  exceededVersion: "Your license does not support the current version of React PDF. The library version you are using exceeds the supported range of your license.",
8
8
  invalidSignature: "Invalid license key: Signature mismatch"
9
9
  };
@@ -50,41 +50,41 @@ kwIDAQAB
50
50
  throw new Error(s.invalidLicense);
51
51
  }
52
52
  }
53
- const y = (r, t) => r === "specific" ? t === window.location.host : window.location.host.includes(t), d = {
53
+ const y = (r, t) => r === "specific" ? t === window.location.host : window.location.host.includes(t), u = {
54
54
  isValid: !0,
55
55
  invalidatedMessage: s.invalidLicense,
56
56
  type: void 0
57
57
  }, x = (r) => {
58
- const [t, e] = g(d), n = h(async () => {
59
- if (!r)
60
- throw e(d), new Error(s.invalidLicense);
58
+ const [t, e] = E(u), n = h(async () => {
59
+ if (e((c) => ({ ...c, validating: !0 })), !r)
60
+ throw e({ ...u, validating: !1 }), new Error(s.invalidLicense);
61
61
  let i;
62
62
  try {
63
63
  i = await I(r);
64
- } catch (m) {
65
- throw c.warn(m.message), new Error(m.message);
64
+ } catch (c) {
65
+ throw l.warn(c.message), new Error(c.message);
66
66
  }
67
- c.debug(">>> validatedLicense", i);
68
- const { avu: a, exp: o, dmt: w, dm: p, t: v } = i;
67
+ l.debug(">>> validatedLicense", i);
68
+ const { avu: a, exp: o, dmt: m, dm: w, t: f } = i;
69
69
  if (!o)
70
70
  throw new Error("License is missing expiration timestamp");
71
71
  if (o > Number.MAX_SAFE_INTEGER / 1e3)
72
72
  throw new Error("Invalid expiration timestamp: value too large");
73
- const f = new Date(o * 1e3), E = (/* @__PURE__ */ new Date()).getTime();
74
- if (f.getTime() < E)
73
+ const p = new Date(o * 1e3), g = (/* @__PURE__ */ new Date()).getTime();
74
+ if (p.getTime() < g)
75
75
  throw new Error(s.expired);
76
76
  if (!a)
77
77
  throw new Error("License is missing available until version timestamp");
78
78
  if (a > Number.MAX_SAFE_INTEGER / 1e3)
79
79
  throw new Error("Invalid available until version timestamp: value too large");
80
- const u = new Date(a * 1e3);
81
- if (c.debug("availableUntilTimestamp", u), u.getTime() < b.getTime())
80
+ const v = new Date(a * 1e3);
81
+ if (l.debug("availableUntilTimestamp", v), v.getTime() < b.getTime())
82
82
  throw new Error(s.exceededVersion);
83
- if (!y(w, p))
83
+ if (!y(m, w))
84
84
  throw new Error(s.mismatchedDomain);
85
85
  return {
86
86
  isValid: !0,
87
- type: v,
87
+ type: f,
88
88
  invalidatedMessage: void 0
89
89
  };
90
90
  }, [r]);
@@ -93,13 +93,15 @@ const y = (r, t) => r === "specific" ? t === window.location.host : window.locat
93
93
  e({
94
94
  isValid: i,
95
95
  type: a,
96
- invalidatedMessage: o
96
+ invalidatedMessage: o,
97
+ validating: !1
97
98
  });
98
99
  }).catch((i) => {
99
100
  e({
100
- ...d,
101
- isValid: !1
102
- }), c.warn(i.message);
101
+ ...u,
102
+ isValid: !1,
103
+ validating: !1
104
+ }), l.warn(i.message);
103
105
  });
104
106
  }, [n]), t;
105
107
  };
@@ -1,27 +1,26 @@
1
- import { useCallback as a } from "react";
2
- import { usePagesRotateContext as c } from "../../contexts/PagesRotateContext.js";
3
- import { useLicenseContext as m } from "../../contexts/LicenseContext.js";
4
- import { LicenseType as f } from "../types.js";
5
- import { ORGANIZATION_ALLOWED_FEATURES_MESSAGE as u } from "../const.js";
6
- const E = () => {
7
- const { setSinglePageRotate: n } = c(), { type: s } = m(), i = a(
8
- (r, t) => {
9
- n((e) => {
10
- const o = typeof t == "function" ? t(e[r] || 0) : t;
11
- return o % 90 !== 0 ? (console.warn("rotationDegree must be a multiple of 90 got", o), e) : {
12
- ...e,
13
- [r]: o
1
+ import { useMemo as c, useCallback as f } from "react";
2
+ import { usePagesRotateContext as m } from "../../contexts/PagesRotateContext.js";
3
+ import { useLicenseContext as p } from "../../contexts/LicenseContext.js";
4
+ import { LicenseType as u } from "../types.js";
5
+ import { ORGANIZATION_ALLOWED_FEATURES_MESSAGE as R } from "../const.js";
6
+ const d = () => {
7
+ const { setSinglePageRotate: r } = m(), { type: e, validating: s } = p(), a = c(() => e ? [u.Organization, u.FreeTrial].includes(e) : !1, [e]), i = f(
8
+ (l, t) => {
9
+ r((o) => {
10
+ const n = typeof t == "function" ? t(o[l] || 0) : t;
11
+ return n % 90 !== 0 ? (console.warn("rotationDegree must be a multiple of 90 got", n), o) : {
12
+ ...o,
13
+ [l]: n
14
14
  };
15
15
  });
16
16
  },
17
- [n]
17
+ [r]
18
18
  );
19
- return s !== f.Organization ? {
20
- rotate: () => {
21
- console.error(u);
22
- }
23
- } : { rotate: i };
19
+ return { rotate: c(() => s !== !1 ? () => {
20
+ } : a ? i : () => {
21
+ console.error(R);
22
+ }, [s, a, i]) };
24
23
  };
25
24
  export {
26
- E as usePageRotateContext
25
+ d as usePageRotateContext
27
26
  };
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "../types.js";
3
- import { o as $ } from "../../RPLayout-81cd4970.js";
3
+ import { o as _ } from "../../RPLayout-5892502c.js";
4
4
  import "react/jsx-runtime";
5
5
  import "../../contexts/RPDocumentContext.js";
6
6
  import "../../contexts/DocumentPasswordContext.js";
@@ -33,16 +33,15 @@ import "../../components/RPDropFileZone.js";
33
33
  import "../../contexts/ToolbarComponentContext.js";
34
34
  import "../../contexts/ToolComponentContext.js";
35
35
  import "../../components/ui/Button.js";
36
- import "../../SearchCloseButton-ddb9877e.js";
36
+ import "../../SearchCloseButton-cbf182aa.js";
37
37
  import "../../components/ui/Input.js";
38
38
  import "../../components/ui/Checkbox.js";
39
39
  import "../../components/icons/LoaderIcon.js";
40
40
  import "../../contexts/IconContext.js";
41
41
  import "../../components/ui/RPTooltip.js";
42
- import "../../Popover-1faa77f6.js";
43
42
  import "../../contexts/ViewportContext.js";
44
- import "../../contexts/IconToolContext.js";
45
43
  import "../../components/ui/DropDown.js";
44
+ import "../../contexts/IconToolContext.js";
46
45
  import "../../components/layout/toolbar/MenuItem.js";
47
46
  import "../../components/layout/toolbar/MenuSeparator.js";
48
47
  import "../dateFormatter.js";
@@ -51,5 +50,5 @@ import "../../contexts/OtherToolContext.js";
51
50
  import "../../components/layout/toolbar/RotateTool.js";
52
51
  import "./useDebounce.js";
53
52
  export {
54
- $ as usePaginate
53
+ _ as usePaginate
55
54
  };