@pdf-viewer/react 1.9.0-beta.5 → 1.9.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Combination-da8647d4.js → Combination-9a0a3e65.js} +14 -14
- package/dist/ToolbarLayout.module-88476995.js +2464 -0
- package/dist/assets/ToolbarLayout.css +1 -1
- package/dist/components/RPController.js +35 -35
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.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 +11 -11
- package/dist/components/layout/sidebar/Thumbnail.js +49 -2
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +11 -11
- 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 +6 -6
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +3 -3
- 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 +6 -6
- package/dist/components/layout/toolbar/ToolbarCustom.js +3 -3
- package/dist/components/layout/toolbar/ToolbarDefault.js +7 -7
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +8 -8
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/InputPageTool.js +5 -5
- 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 +7 -7
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +2 -3
- 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 +1 -1
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +6 -6
- package/dist/components/ui/RPTooltip.js +197 -410
- package/dist/contexts/ElementPageContext.js +37 -37
- package/dist/contexts/FileInputContext.js +18 -20
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +2 -2
- package/dist/contexts/RenderQueueProvider.js +10 -0
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/{index-8547fbc6.js → index-2160dd99.js} +5 -5
- package/dist/index-492f99d0.js +1657 -0
- package/dist/index-49b9a615.js +978 -0
- package/dist/main.js +1 -1
- package/dist/types/components/layout/sidebar/Thumbnail.d.ts +0 -1
- package/dist/types/contexts/RenderQueueProvider.d.ts +16 -0
- package/dist/types/utils/Queue.d.ts +18 -0
- package/dist/types/utils/renderPage.d.ts +1 -6
- package/dist/types/utils/types.d.ts +5 -0
- package/dist/utils/Queue.js +47 -0
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePageRotateContext.js +14 -14
- package/dist/utils/hooks/usePaginate.js +2 -2
- 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 +2 -3
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
- package/dist/ToolbarLayout.module-60c3d6e8.js +0 -2434
- package/dist/floating-ui.react-dom-f3f380e0.js +0 -1447
- package/dist/index-473557b1.js +0 -1191
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as u from "react";
|
|
2
2
|
import { useState as ye } from "react";
|
|
3
3
|
import be from "react-dom";
|
|
4
|
-
import {
|
|
4
|
+
import { k as Ee, P as ce, h as G, u as Se } from "./index-2160dd99.js";
|
|
5
5
|
import { jsx as ue } from "react/jsx-runtime";
|
|
6
6
|
var we = "Portal", Ce = u.forwardRef((e, t) => {
|
|
7
7
|
var a;
|
|
@@ -69,7 +69,7 @@ var U = "focusScope.autoFocusOnMount", j = "focusScope.autoFocusOnUnmount", q =
|
|
|
69
69
|
const o = document.activeElement;
|
|
70
70
|
if (!a.contains(o)) {
|
|
71
71
|
const d = new CustomEvent(U, q);
|
|
72
|
-
a.addEventListener(U, y), a.dispatchEvent(d), d.defaultPrevented || (
|
|
72
|
+
a.addEventListener(U, y), a.dispatchEvent(d), d.defaultPrevented || (ke(Fe(ie(a)), { select: !0 }), document.activeElement === o && R(a));
|
|
73
73
|
}
|
|
74
74
|
return () => {
|
|
75
75
|
a.removeEventListener(U, y), setTimeout(() => {
|
|
@@ -85,7 +85,7 @@ var U = "focusScope.autoFocusOnMount", j = "focusScope.autoFocusOnUnmount", q =
|
|
|
85
85
|
return;
|
|
86
86
|
const s = o.key === "Tab" && !o.altKey && !o.ctrlKey && !o.metaKey, d = document.activeElement;
|
|
87
87
|
if (s && d) {
|
|
88
|
-
const E = o.currentTarget, [m, g] =
|
|
88
|
+
const E = o.currentTarget, [m, g] = Pe(E);
|
|
89
89
|
m && g ? !o.shiftKey && d === g ? (o.preventDefault(), r && R(m, { select: !0 })) : o.shiftKey && d === m && (o.preventDefault(), r && R(g, { select: !0 })) : d === E && o.preventDefault();
|
|
90
90
|
}
|
|
91
91
|
},
|
|
@@ -94,13 +94,13 @@ var U = "focusScope.autoFocusOnMount", j = "focusScope.autoFocusOnUnmount", q =
|
|
|
94
94
|
return /* @__PURE__ */ ue(ce.div, { tabIndex: -1, ...l, ref: v, onKeyDown: w });
|
|
95
95
|
});
|
|
96
96
|
Ae.displayName = Re;
|
|
97
|
-
function
|
|
97
|
+
function ke(e, { select: t = !1 } = {}) {
|
|
98
98
|
const r = document.activeElement;
|
|
99
99
|
for (const n of e)
|
|
100
100
|
if (R(n, { select: t }), document.activeElement !== r)
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function Pe(e) {
|
|
104
104
|
const t = ie(e), r = Q(t, e), n = Q(t.reverse(), e);
|
|
105
105
|
return [r, n];
|
|
106
106
|
}
|
|
@@ -167,7 +167,7 @@ var Le = function(e) {
|
|
|
167
167
|
return null;
|
|
168
168
|
var t = Array.isArray(e) ? e[0] : e;
|
|
169
169
|
return t.ownerDocument.body;
|
|
170
|
-
},
|
|
170
|
+
}, k = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), O = {}, K = 0, le = function(e) {
|
|
171
171
|
return e && (e.host || le(e.parentNode));
|
|
172
172
|
}, Oe = function(e, t) {
|
|
173
173
|
return t.map(function(r) {
|
|
@@ -191,8 +191,8 @@ var Le = function(e) {
|
|
|
191
191
|
p(v);
|
|
192
192
|
else
|
|
193
193
|
try {
|
|
194
|
-
var h = v.getAttribute(n), w = h !== null && h !== "false", o = (
|
|
195
|
-
|
|
194
|
+
var h = v.getAttribute(n), w = h !== null && h !== "false", o = (k.get(v) || 0) + 1, s = (i.get(v) || 0) + 1;
|
|
195
|
+
k.set(v, o), i.set(v, s), l.push(v), o === 1 && w && L.set(v, !0), s === 1 && v.setAttribute(r, "true"), w || v.setAttribute(n, "true");
|
|
196
196
|
} catch (d) {
|
|
197
197
|
console.error("aria-hidden: cannot operate on ", v, d);
|
|
198
198
|
}
|
|
@@ -200,9 +200,9 @@ var Le = function(e) {
|
|
|
200
200
|
};
|
|
201
201
|
return p(t), a.clear(), K++, function() {
|
|
202
202
|
l.forEach(function(f) {
|
|
203
|
-
var v =
|
|
204
|
-
|
|
205
|
-
}), K--, K || (
|
|
203
|
+
var v = k.get(f) - 1, h = i.get(f) - 1;
|
|
204
|
+
k.set(f, v), i.set(f, h), v || (L.has(f) || f.removeAttribute(n), L.delete(f)), h || f.removeAttribute(r);
|
|
205
|
+
}), K--, K || (k = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), O = {});
|
|
206
206
|
};
|
|
207
207
|
}, wt = function(e, t, r) {
|
|
208
208
|
r === void 0 && (r = "data-aria-hidden");
|
|
@@ -518,7 +518,7 @@ if (typeof window < "u")
|
|
|
518
518
|
} catch {
|
|
519
519
|
Y = !1;
|
|
520
520
|
}
|
|
521
|
-
var
|
|
521
|
+
var P = Y ? { passive: !1 } : !1, at = function(e) {
|
|
522
522
|
return e.tagName === "TEXTAREA";
|
|
523
523
|
}, he = function(e, t) {
|
|
524
524
|
if (!(e instanceof Element))
|
|
@@ -659,10 +659,10 @@ function ht(e) {
|
|
|
659
659
|
onScrollCapture: f,
|
|
660
660
|
onWheelCapture: f,
|
|
661
661
|
onTouchMoveCapture: v
|
|
662
|
-
}), document.addEventListener("wheel", S,
|
|
662
|
+
}), document.addEventListener("wheel", S, P), document.addEventListener("touchmove", S, P), document.addEventListener("touchstart", p, P), function() {
|
|
663
663
|
T = T.filter(function(o) {
|
|
664
664
|
return o !== i;
|
|
665
|
-
}), document.removeEventListener("wheel", S,
|
|
665
|
+
}), document.removeEventListener("wheel", S, P), document.removeEventListener("touchmove", S, P), document.removeEventListener("touchstart", p, P);
|
|
666
666
|
};
|
|
667
667
|
}, []);
|
|
668
668
|
var h = e.removeScrollBar, w = e.inert;
|