@pdf-viewer/react 1.14.0-beta.4 → 1.14.0-rc.0
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-f62490d8.js → ToolbarLayout.module-07c61141.js} +4 -4
- package/dist/components/RPController.js +2 -2
- package/dist/components/RPPages.js +2 -2
- package/dist/components/RPProvider.js +2 -2
- package/dist/components/layout/LayoutContainer.js +2 -2
- package/dist/components/layout/RPDefaultLayout.js +2 -2
- package/dist/components/layout/RPLayout.js +2 -2
- package/dist/components/layout/sidebar/RPSidebar.js +2 -2
- package/dist/components/layout/sidebar/Thumbnail.js +2 -2
- package/dist/components/layout/sidebar/Thumbnails.js +2 -2
- package/dist/components/layout/toolbar/DocumentDialog.js +2 -2
- package/dist/components/layout/toolbar/DocumentProperties.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/FileUploadTool.js +1 -1
- package/dist/components/layout/toolbar/FullScreenTool.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 +2 -2
- package/dist/components/layout/toolbar/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/RPMenuItem.js +1 -1
- package/dist/components/layout/toolbar/RPMoreOptions.js +2 -2
- package/dist/components/layout/toolbar/RPToolbar.js +2 -2
- package/dist/components/layout/toolbar/RPToolbarEnd.js +2 -2
- 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 +2 -2
- package/dist/components/layout/toolbar/SearchTool.js +2 -2
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ThumbnailTool.js +2 -2
- package/dist/components/layout/toolbar/ToolbarCustom.js +2 -2
- package/dist/components/layout/toolbar/ToolbarDefault.js +2 -2
- package/dist/components/layout/toolbar/ToolbarLayout.js +2 -2
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +2 -2
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +2 -2
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/InputPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/NextPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PrintTool.js +3 -3
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +2 -2
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +2 -2
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.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 +3 -3
- 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 +2 -2
- package/dist/components/page/CanvasLayer.js +2 -2
- package/dist/components/page/DualPage.js +2 -2
- package/dist/components/page/RPPage.js +2 -2
- package/dist/components/page/SinglePage.js +2 -2
- package/dist/components/page/TextHighlightLayer.js +2 -2
- package/dist/components/page/TextLayer.js +2 -2
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +2 -2
- package/dist/contexts/PaginationContext.js +2 -2
- package/dist/contexts/PrintContext.js +2 -2
- package/dist/contexts/RenderQueueProvider.js +2 -2
- package/dist/contexts/SearchContext.js +2 -2
- package/dist/contexts/ThumbnailsContext.js +2 -2
- package/dist/{index-3bf64864.js → index-27c30844.js} +99 -96
- package/dist/main.js +2 -2
- package/dist/types/main.d.ts +1 -1
- package/dist/types/utils/hooks/usePrint.d.ts +2 -2
- package/dist/types/utils/types.d.ts +3 -3
- package/dist/utils/hooks/useFileDownload.js +2 -2
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +2 -2
- package/dist/utils/hooks/usePresentPage.js +2 -2
- package/dist/utils/hooks/usePrint.js +2 -2
- package/dist/utils/hooks/useScrollToPage.js +2 -2
- package/dist/utils/hooks/useSearch.js +2 -2
- package/dist/utils/hooks/useThumbnail.js +2 -2
- package/dist/utils/hooks/useVirtualReactWindow.js +2 -2
- package/dist/utils/injectPrintCSS.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as a from "react";
|
|
2
2
|
import j, { useState as Dn } from "react";
|
|
3
|
-
import { h as $e, P as
|
|
3
|
+
import { h as $e, P as O, c as pe, u as $, i as Ue, d as On, e as ht, a as S, b as _e, j as gt, g as Fn } from "./index-c9a2990a.js";
|
|
4
4
|
import { jsx as d } from "react/jsx-runtime";
|
|
5
5
|
import { e as oe, u as kn, a as Ln, o as Gn, s as Kn, l as $n, f as Un, b as Bn, c as Wn, h as Hn, d as Be, D as Yn } from "./floating-ui.react-dom-d22a10b4.js";
|
|
6
6
|
import Vn from "react-dom";
|
|
@@ -9,7 +9,7 @@ var Xn = "Portal", wt = a.forwardRef((e, t) => {
|
|
|
9
9
|
const { container: n, ...r } = e, [o, c] = a.useState(!1);
|
|
10
10
|
$e(() => c(!0), []);
|
|
11
11
|
const u = n || o && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
12
|
-
return u ? Vn.createPortal(/* @__PURE__ */ d(
|
|
12
|
+
return u ? Vn.createPortal(/* @__PURE__ */ d(O.div, { ...r, ref: t }), u) : null;
|
|
13
13
|
});
|
|
14
14
|
wt.displayName = Xn;
|
|
15
15
|
function yt(e) {
|
|
@@ -23,14 +23,14 @@ function yt(e) {
|
|
|
23
23
|
u.displayName = t;
|
|
24
24
|
const i = e + "CollectionSlot", h = Ue(i), m = j.forwardRef(
|
|
25
25
|
(l, v) => {
|
|
26
|
-
const { scope: g, children: b } = l, y = c(i, g), E =
|
|
26
|
+
const { scope: g, children: b } = l, y = c(i, g), E = $(v, y.collectionRef);
|
|
27
27
|
return /* @__PURE__ */ d(h, { ref: E, children: b });
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
m.displayName = i;
|
|
31
31
|
const f = e + "CollectionItemSlot", s = "data-radix-collection-item", p = Ue(f), w = j.forwardRef(
|
|
32
32
|
(l, v) => {
|
|
33
|
-
const { scope: g, children: b, ...y } = l, E = j.useRef(null), R =
|
|
33
|
+
const { scope: g, children: b, ...y } = l, E = j.useRef(null), R = $(v, E), P = c(f, g);
|
|
34
34
|
return j.useEffect(() => (P.itemMap.set(E, { ref: E, ...y }), () => void P.itemMap.delete(E))), /* @__PURE__ */ d(p, { [s]: "", ref: R, children: b });
|
|
35
35
|
}
|
|
36
36
|
);
|
|
@@ -78,7 +78,7 @@ var De = "focusScope.autoFocusOnMount", Oe = "focusScope.autoFocusOnUnmount", at
|
|
|
78
78
|
onMountAutoFocus: o,
|
|
79
79
|
onUnmountAutoFocus: c,
|
|
80
80
|
...u
|
|
81
|
-
} = e, [i, h] = a.useState(null), m = oe(o), f = oe(c), s = a.useRef(null), p =
|
|
81
|
+
} = e, [i, h] = a.useState(null), m = oe(o), f = oe(c), s = a.useRef(null), p = $(t, (l) => h(l)), w = a.useRef({
|
|
82
82
|
paused: !1,
|
|
83
83
|
pause() {
|
|
84
84
|
this.paused = !0;
|
|
@@ -93,16 +93,16 @@ var De = "focusScope.autoFocusOnMount", Oe = "focusScope.autoFocusOnUnmount", at
|
|
|
93
93
|
if (w.paused || !i)
|
|
94
94
|
return;
|
|
95
95
|
const E = y.target;
|
|
96
|
-
i.contains(E) ? s.current = E :
|
|
96
|
+
i.contains(E) ? s.current = E : V(s.current, { select: !0 });
|
|
97
97
|
}, v = function(y) {
|
|
98
98
|
if (w.paused || !i)
|
|
99
99
|
return;
|
|
100
100
|
const E = y.relatedTarget;
|
|
101
|
-
E !== null && (i.contains(E) ||
|
|
101
|
+
E !== null && (i.contains(E) || V(s.current, { select: !0 }));
|
|
102
102
|
}, g = function(y) {
|
|
103
103
|
if (document.activeElement === document.body)
|
|
104
104
|
for (const R of y)
|
|
105
|
-
R.removedNodes.length > 0 &&
|
|
105
|
+
R.removedNodes.length > 0 && V(i);
|
|
106
106
|
};
|
|
107
107
|
document.addEventListener("focusin", l), document.addEventListener("focusout", v);
|
|
108
108
|
const b = new MutationObserver(g);
|
|
@@ -116,12 +116,12 @@ var De = "focusScope.autoFocusOnMount", Oe = "focusScope.autoFocusOnUnmount", at
|
|
|
116
116
|
const l = document.activeElement;
|
|
117
117
|
if (!i.contains(l)) {
|
|
118
118
|
const g = new CustomEvent(De, at);
|
|
119
|
-
i.addEventListener(De, m), i.dispatchEvent(g), g.defaultPrevented || (qn(nr(Et(i)), { select: !0 }), document.activeElement === l &&
|
|
119
|
+
i.addEventListener(De, m), i.dispatchEvent(g), g.defaultPrevented || (qn(nr(Et(i)), { select: !0 }), document.activeElement === l && V(i));
|
|
120
120
|
}
|
|
121
121
|
return () => {
|
|
122
122
|
i.removeEventListener(De, m), setTimeout(() => {
|
|
123
123
|
const g = new CustomEvent(Oe, at);
|
|
124
|
-
i.addEventListener(Oe, f), i.dispatchEvent(g), g.defaultPrevented ||
|
|
124
|
+
i.addEventListener(Oe, f), i.dispatchEvent(g), g.defaultPrevented || V(l ?? document.body, { select: !0 }), i.removeEventListener(Oe, f), it.remove(w);
|
|
125
125
|
}, 0);
|
|
126
126
|
};
|
|
127
127
|
}
|
|
@@ -133,18 +133,18 @@ var De = "focusScope.autoFocusOnMount", Oe = "focusScope.autoFocusOnUnmount", at
|
|
|
133
133
|
const v = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, g = document.activeElement;
|
|
134
134
|
if (v && g) {
|
|
135
135
|
const b = l.currentTarget, [y, E] = Qn(b);
|
|
136
|
-
y && E ? !l.shiftKey && g === E ? (l.preventDefault(), n &&
|
|
136
|
+
y && E ? !l.shiftKey && g === E ? (l.preventDefault(), n && V(y, { select: !0 })) : l.shiftKey && g === y && (l.preventDefault(), n && V(E, { select: !0 })) : g === b && l.preventDefault();
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
139
|
[n, r, w.paused]
|
|
140
140
|
);
|
|
141
|
-
return /* @__PURE__ */ d(
|
|
141
|
+
return /* @__PURE__ */ d(O.div, { tabIndex: -1, ...u, ref: p, onKeyDown: C });
|
|
142
142
|
});
|
|
143
143
|
bt.displayName = Zn;
|
|
144
144
|
function qn(e, { select: t = !1 } = {}) {
|
|
145
145
|
const n = document.activeElement;
|
|
146
146
|
for (const r of e)
|
|
147
|
-
if (
|
|
147
|
+
if (V(r, { select: t }), document.activeElement !== n)
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
function Qn(e) {
|
|
@@ -182,7 +182,7 @@ function Jn(e, { upTo: t }) {
|
|
|
182
182
|
function er(e) {
|
|
183
183
|
return e instanceof HTMLInputElement && "select" in e;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function V(e, { select: t = !1 } = {}) {
|
|
186
186
|
if (e && e.focus) {
|
|
187
187
|
const n = document.activeElement;
|
|
188
188
|
e.focus({ preventScroll: !0 }), e !== n && er(e) && t && e.select();
|
|
@@ -212,7 +212,7 @@ function nr(e) {
|
|
|
212
212
|
var rr = "Arrow", Mt = a.forwardRef((e, t) => {
|
|
213
213
|
const { children: n, width: r = 10, height: o = 5, ...c } = e;
|
|
214
214
|
return /* @__PURE__ */ d(
|
|
215
|
-
|
|
215
|
+
O.svg,
|
|
216
216
|
{
|
|
217
217
|
...c,
|
|
218
218
|
ref: t,
|
|
@@ -232,17 +232,17 @@ var or = Mt, Ve = "Popper", [St, Rt] = pe(Ve), [ar, Pt] = St(Ve), _t = (e) => {
|
|
|
232
232
|
_t.displayName = Ve;
|
|
233
233
|
var It = "PopperAnchor", At = a.forwardRef(
|
|
234
234
|
(e, t) => {
|
|
235
|
-
const { __scopePopper: n, virtualRef: r, ...o } = e, c = Pt(It, n), u = a.useRef(null), i =
|
|
235
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, c = Pt(It, n), u = a.useRef(null), i = $(t, u), h = a.useRef(null);
|
|
236
236
|
return a.useEffect(() => {
|
|
237
237
|
const m = h.current;
|
|
238
238
|
h.current = (r == null ? void 0 : r.current) || u.current, m !== h.current && c.onAnchorChange(h.current);
|
|
239
|
-
}), r ? null : /* @__PURE__ */ d(
|
|
239
|
+
}), r ? null : /* @__PURE__ */ d(O.div, { ...o, ref: i });
|
|
240
240
|
}
|
|
241
241
|
);
|
|
242
242
|
At.displayName = It;
|
|
243
243
|
var Xe = "PopperContent", [cr, ir] = St(Xe), xt = a.forwardRef(
|
|
244
244
|
(e, t) => {
|
|
245
|
-
var
|
|
245
|
+
var Y, ie, k, ue, tt, nt;
|
|
246
246
|
const {
|
|
247
247
|
__scopePopper: n,
|
|
248
248
|
side: r = "bottom",
|
|
@@ -258,15 +258,15 @@ var Xe = "PopperContent", [cr, ir] = St(Xe), xt = a.forwardRef(
|
|
|
258
258
|
updatePositionStrategy: w = "optimized",
|
|
259
259
|
onPlaced: C,
|
|
260
260
|
...l
|
|
261
|
-
} = e, v = Pt(Xe, n), [g, b] = a.useState(null), y =
|
|
262
|
-
padding:
|
|
263
|
-
boundary:
|
|
261
|
+
} = e, v = Pt(Xe, n), [g, b] = a.useState(null), y = $(t, (se) => b(se)), [E, R] = a.useState(null), P = On(E), I = (P == null ? void 0 : P.width) ?? 0, _ = (P == null ? void 0 : P.height) ?? 0, F = r + (c !== "center" ? "-" + c : ""), G = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, N = Array.isArray(m) ? m : [m], U = N.length > 0, H = {
|
|
262
|
+
padding: G,
|
|
263
|
+
boundary: N.filter(sr),
|
|
264
264
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
265
|
-
altBoundary:
|
|
266
|
-
}, { refs: q, floatingStyles: Q, placement:
|
|
265
|
+
altBoundary: U
|
|
266
|
+
}, { refs: q, floatingStyles: Q, placement: K, isPositioned: J, middlewareData: D } = kn({
|
|
267
267
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
268
268
|
strategy: "fixed",
|
|
269
|
-
placement:
|
|
269
|
+
placement: F,
|
|
270
270
|
whileElementsMounted: (...se) => Ln(...se, {
|
|
271
271
|
animationFrame: w === "always"
|
|
272
272
|
}),
|
|
@@ -279,11 +279,11 @@ var Xe = "PopperContent", [cr, ir] = St(Xe), xt = a.forwardRef(
|
|
|
279
279
|
mainAxis: !0,
|
|
280
280
|
crossAxis: !1,
|
|
281
281
|
limiter: s === "partial" ? $n() : void 0,
|
|
282
|
-
...
|
|
282
|
+
...H
|
|
283
283
|
}),
|
|
284
|
-
h && Un({ ...
|
|
284
|
+
h && Un({ ...H }),
|
|
285
285
|
Bn({
|
|
286
|
-
...
|
|
286
|
+
...H,
|
|
287
287
|
apply: ({ elements: se, rects: rt, availableWidth: An, availableHeight: xn }) => {
|
|
288
288
|
const { width: Tn, height: Nn } = rt.reference, we = se.floating.style;
|
|
289
289
|
we.setProperty("--radix-popper-available-width", `${An}px`), we.setProperty("--radix-popper-available-height", `${xn}px`), we.setProperty("--radix-popper-anchor-width", `${Tn}px`), we.setProperty("--radix-popper-anchor-height", `${Nn}px`);
|
|
@@ -291,13 +291,13 @@ var Xe = "PopperContent", [cr, ir] = St(Xe), xt = a.forwardRef(
|
|
|
291
291
|
}),
|
|
292
292
|
E && Wn({ element: E, padding: i }),
|
|
293
293
|
lr({ arrowWidth: I, arrowHeight: _ }),
|
|
294
|
-
p && Hn({ strategy: "referenceHidden", ...
|
|
294
|
+
p && Hn({ strategy: "referenceHidden", ...H })
|
|
295
295
|
]
|
|
296
|
-
}), [M, T] = Dt(
|
|
296
|
+
}), [M, T] = Dt(K), A = oe(C);
|
|
297
297
|
$e(() => {
|
|
298
298
|
J && (A == null || A());
|
|
299
299
|
}, [J, A]);
|
|
300
|
-
const
|
|
300
|
+
const B = (Y = D.arrow) == null ? void 0 : Y.x, ae = (ie = D.arrow) == null ? void 0 : ie.y, ce = ((k = D.arrow) == null ? void 0 : k.centerOffset) !== 0, [ge, X] = a.useState();
|
|
301
301
|
return $e(() => {
|
|
302
302
|
g && X(window.getComputedStyle(g).zIndex);
|
|
303
303
|
}, [g]), /* @__PURE__ */ d(
|
|
@@ -312,13 +312,13 @@ var Xe = "PopperContent", [cr, ir] = St(Xe), xt = a.forwardRef(
|
|
|
312
312
|
minWidth: "max-content",
|
|
313
313
|
zIndex: ge,
|
|
314
314
|
"--radix-popper-transform-origin": [
|
|
315
|
-
(ue =
|
|
316
|
-
(tt =
|
|
315
|
+
(ue = D.transformOrigin) == null ? void 0 : ue.x,
|
|
316
|
+
(tt = D.transformOrigin) == null ? void 0 : tt.y
|
|
317
317
|
].join(" "),
|
|
318
318
|
// hide the content if using the hide middleware and should be hidden
|
|
319
319
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
320
320
|
// as if the PopperContent isn't there at all
|
|
321
|
-
...((nt =
|
|
321
|
+
...((nt = D.hide) == null ? void 0 : nt.referenceHidden) && {
|
|
322
322
|
visibility: "hidden",
|
|
323
323
|
pointerEvents: "none"
|
|
324
324
|
}
|
|
@@ -330,11 +330,11 @@ var Xe = "PopperContent", [cr, ir] = St(Xe), xt = a.forwardRef(
|
|
|
330
330
|
scope: n,
|
|
331
331
|
placedSide: M,
|
|
332
332
|
onArrowChange: R,
|
|
333
|
-
arrowX:
|
|
333
|
+
arrowX: B,
|
|
334
334
|
arrowY: ae,
|
|
335
335
|
shouldHideArrow: ce,
|
|
336
336
|
children: /* @__PURE__ */ d(
|
|
337
|
-
|
|
337
|
+
O.div,
|
|
338
338
|
{
|
|
339
339
|
"data-side": M,
|
|
340
340
|
"data-align": T,
|
|
@@ -442,7 +442,7 @@ var Cr = a.forwardRef((e, t) => {
|
|
|
442
442
|
onEntryFocus: m,
|
|
443
443
|
preventScrollOnEntryFocus: f = !1,
|
|
444
444
|
...s
|
|
445
|
-
} = e, p = a.useRef(null), w =
|
|
445
|
+
} = e, p = a.useRef(null), w = $(t, p), C = Ct(c), [l, v] = ht({
|
|
446
446
|
prop: u,
|
|
447
447
|
defaultProp: i ?? null,
|
|
448
448
|
onChange: h,
|
|
@@ -474,7 +474,7 @@ var Cr = a.forwardRef((e, t) => {
|
|
|
474
474
|
[]
|
|
475
475
|
),
|
|
476
476
|
children: /* @__PURE__ */ d(
|
|
477
|
-
|
|
477
|
+
O.div,
|
|
478
478
|
{
|
|
479
479
|
tabIndex: g || P === 0 ? -1 : 0,
|
|
480
480
|
"data-orientation": r,
|
|
@@ -485,13 +485,13 @@ var Cr = a.forwardRef((e, t) => {
|
|
|
485
485
|
R.current = !0;
|
|
486
486
|
}),
|
|
487
487
|
onFocus: S(e.onFocus, (_) => {
|
|
488
|
-
const
|
|
489
|
-
if (_.target === _.currentTarget &&
|
|
490
|
-
const
|
|
491
|
-
if (_.currentTarget.dispatchEvent(
|
|
492
|
-
const
|
|
488
|
+
const F = !R.current;
|
|
489
|
+
if (_.target === _.currentTarget && F && !g) {
|
|
490
|
+
const G = new CustomEvent(Fe, mr);
|
|
491
|
+
if (_.currentTarget.dispatchEvent(G), !G.defaultPrevented) {
|
|
492
|
+
const N = E().filter((K) => K.focusable), U = N.find((K) => K.active), H = N.find((K) => K.id === l), Q = [U, H, ...N].filter(
|
|
493
493
|
Boolean
|
|
494
|
-
).map((
|
|
494
|
+
).map((K) => K.ref.current);
|
|
495
495
|
Kt(Q, f);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
@@ -523,7 +523,7 @@ var Cr = a.forwardRef((e, t) => {
|
|
|
523
523
|
focusable: r,
|
|
524
524
|
active: o,
|
|
525
525
|
children: /* @__PURE__ */ d(
|
|
526
|
-
|
|
526
|
+
O.span,
|
|
527
527
|
{
|
|
528
528
|
tabIndex: s ? 0 : -1,
|
|
529
529
|
"data-orientation": f.orientation,
|
|
@@ -639,15 +639,15 @@ var Rr = kt, Pr = Gt, _r = function(e) {
|
|
|
639
639
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Ar(r, o, n, "aria-hidden")) : function() {
|
|
640
640
|
return null;
|
|
641
641
|
};
|
|
642
|
-
},
|
|
643
|
-
return
|
|
642
|
+
}, W = function() {
|
|
643
|
+
return W = Object.assign || function(t) {
|
|
644
644
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
645
645
|
n = arguments[r];
|
|
646
646
|
for (var c in n)
|
|
647
647
|
Object.prototype.hasOwnProperty.call(n, c) && (t[c] = n[c]);
|
|
648
648
|
}
|
|
649
649
|
return t;
|
|
650
|
-
},
|
|
650
|
+
}, W.apply(this, arguments);
|
|
651
651
|
};
|
|
652
652
|
function Ut(e, t) {
|
|
653
653
|
var n = {};
|
|
@@ -770,7 +770,7 @@ function Gr(e, t) {
|
|
|
770
770
|
function Kr(e) {
|
|
771
771
|
e === void 0 && (e = {});
|
|
772
772
|
var t = Gr(null);
|
|
773
|
-
return t.options =
|
|
773
|
+
return t.options = W({ async: !0, ssr: !1 }, e), t;
|
|
774
774
|
}
|
|
775
775
|
var Bt = function(e) {
|
|
776
776
|
var t = e.sideCar, n = Ut(e, ["sideCar"]);
|
|
@@ -779,7 +779,7 @@ var Bt = function(e) {
|
|
|
779
779
|
var r = t.read();
|
|
780
780
|
if (!r)
|
|
781
781
|
throw new Error("Sidecar medium not found");
|
|
782
|
-
return a.createElement(r,
|
|
782
|
+
return a.createElement(r, W({}, n));
|
|
783
783
|
};
|
|
784
784
|
Bt.isSideCarExport = !0;
|
|
785
785
|
function $r(e, t) {
|
|
@@ -791,12 +791,12 @@ var Wt = Kr(), Ge = function() {
|
|
|
791
791
|
onScrollCapture: Ge,
|
|
792
792
|
onWheelCapture: Ge,
|
|
793
793
|
onTouchMoveCapture: Ge
|
|
794
|
-
}), o = r[0], c = r[1], u = e.forwardProps, i = e.children, h = e.className, m = e.removeScrollBar, f = e.enabled, s = e.shards, p = e.sideCar, w = e.noRelative, C = e.noIsolation, l = e.inert, v = e.allowPinchZoom, g = e.as, b = g === void 0 ? "div" : g, y = e.gapMode, E = Ut(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = p, P = kr([n, t]), I =
|
|
794
|
+
}), o = r[0], c = r[1], u = e.forwardProps, i = e.children, h = e.className, m = e.removeScrollBar, f = e.enabled, s = e.shards, p = e.sideCar, w = e.noRelative, C = e.noIsolation, l = e.inert, v = e.allowPinchZoom, g = e.as, b = g === void 0 ? "div" : g, y = e.gapMode, E = Ut(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = p, P = kr([n, t]), I = W(W({}, E), o);
|
|
795
795
|
return a.createElement(
|
|
796
796
|
a.Fragment,
|
|
797
797
|
null,
|
|
798
798
|
f && a.createElement(R, { sideCar: Wt, removeScrollBar: m, shards: s, noRelative: w, noIsolation: C, inert: l, setCallbacks: c, allowPinchZoom: !!v, lockRef: n, gapMode: y }),
|
|
799
|
-
u ? a.cloneElement(a.Children.only(i),
|
|
799
|
+
u ? a.cloneElement(a.Children.only(i), W(W({}, I), { ref: P })) : a.createElement(b, W({}, I, { className: h, ref: P }), i)
|
|
800
800
|
);
|
|
801
801
|
});
|
|
802
802
|
Ie.defaultProps = {
|
|
@@ -1047,15 +1047,18 @@ function lo(e) {
|
|
|
1047
1047
|
var g = Ee(l), b = n.current, y = "deltaX" in l ? l.deltaX : b[0] - g[0], E = "deltaY" in l ? l.deltaY : b[1] - g[1], R, P = l.target, I = Math.abs(y) > Math.abs(E) ? "h" : "v";
|
|
1048
1048
|
if ("touches" in l && I === "h" && P.type === "range")
|
|
1049
1049
|
return !1;
|
|
1050
|
-
var _ =
|
|
1051
|
-
if (
|
|
1050
|
+
var _ = window.getSelection(), F = _ && _.anchorNode, G = F ? F === P || F.contains(P) : !1;
|
|
1051
|
+
if (G)
|
|
1052
|
+
return !1;
|
|
1053
|
+
var N = ft(I, P);
|
|
1054
|
+
if (!N)
|
|
1052
1055
|
return !0;
|
|
1053
|
-
if (
|
|
1056
|
+
if (N ? R = I : (R = I === "v" ? "h" : "v", N = ft(I, P)), !N)
|
|
1054
1057
|
return !1;
|
|
1055
1058
|
if (!r.current && "changedTouches" in l && (y || E) && (r.current = R), !R)
|
|
1056
1059
|
return !0;
|
|
1057
|
-
var
|
|
1058
|
-
return co(
|
|
1060
|
+
var U = r.current || R;
|
|
1061
|
+
return co(U, v, l, U === "h" ? y : E, !0);
|
|
1059
1062
|
}, []), h = a.useCallback(function(l) {
|
|
1060
1063
|
var v = l;
|
|
1061
1064
|
if (!(!ne.length || ne[ne.length - 1] !== c)) {
|
|
@@ -1113,7 +1116,7 @@ function fo(e) {
|
|
|
1113
1116
|
}
|
|
1114
1117
|
const po = $r(Wt, lo);
|
|
1115
1118
|
var jt = a.forwardRef(function(e, t) {
|
|
1116
|
-
return a.createElement(Ie,
|
|
1119
|
+
return a.createElement(Ie, W({}, e, { ref: t, sideCar: po }));
|
|
1117
1120
|
});
|
|
1118
1121
|
jt.classNames = Ie.classNames;
|
|
1119
1122
|
const vo = jt;
|
|
@@ -1173,14 +1176,14 @@ var ze = "MenuPortal", [So, Jt] = z(ze, {
|
|
|
1173
1176
|
return /* @__PURE__ */ d(So, { scope: t, forceMount: n, children: /* @__PURE__ */ d(_e, { present: n || c.open, children: /* @__PURE__ */ d(wt, { asChild: !0, container: o, children: r }) }) });
|
|
1174
1177
|
};
|
|
1175
1178
|
en.displayName = ze;
|
|
1176
|
-
var
|
|
1179
|
+
var L = "MenuContent", [Ro, Ze] = z(L), tn = a.forwardRef(
|
|
1177
1180
|
(e, t) => {
|
|
1178
|
-
const n = Jt(
|
|
1181
|
+
const n = Jt(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, c = Z(L, e.__scopeMenu), u = he(L, e.__scopeMenu);
|
|
1179
1182
|
return /* @__PURE__ */ d(de.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(_e, { present: r || c.open, children: /* @__PURE__ */ d(de.Slot, { scope: e.__scopeMenu, children: u.modal ? /* @__PURE__ */ d(Po, { ...o, ref: t }) : /* @__PURE__ */ d(_o, { ...o, ref: t }) }) }) });
|
|
1180
1183
|
}
|
|
1181
1184
|
), Po = a.forwardRef(
|
|
1182
1185
|
(e, t) => {
|
|
1183
|
-
const n = Z(
|
|
1186
|
+
const n = Z(L, e.__scopeMenu), r = a.useRef(null), o = $(t, r);
|
|
1184
1187
|
return a.useEffect(() => {
|
|
1185
1188
|
const c = r.current;
|
|
1186
1189
|
if (c)
|
|
@@ -1203,7 +1206,7 @@ var F = "MenuContent", [Ro, Ze] = z(F), tn = a.forwardRef(
|
|
|
1203
1206
|
);
|
|
1204
1207
|
}
|
|
1205
1208
|
), _o = a.forwardRef((e, t) => {
|
|
1206
|
-
const n = Z(
|
|
1209
|
+
const n = Z(L, e.__scopeMenu);
|
|
1207
1210
|
return /* @__PURE__ */ d(
|
|
1208
1211
|
qe,
|
|
1209
1212
|
{
|
|
@@ -1232,47 +1235,47 @@ var F = "MenuContent", [Ro, Ze] = z(F), tn = a.forwardRef(
|
|
|
1232
1235
|
onDismiss: w,
|
|
1233
1236
|
disableOutsideScroll: C,
|
|
1234
1237
|
...l
|
|
1235
|
-
} = e, v = Z(
|
|
1236
|
-
var
|
|
1237
|
-
const T =
|
|
1238
|
-
(function
|
|
1239
|
-
|
|
1238
|
+
} = e, v = Z(L, n), g = he(L, n), b = Ae(n), y = qt(n), E = yo(n), [R, P] = a.useState(null), I = a.useRef(null), _ = $(t, I, v.onContentChange), F = a.useRef(0), G = a.useRef(""), N = a.useRef(0), U = a.useRef(null), H = a.useRef("right"), q = a.useRef(0), Q = C ? vo : a.Fragment, K = C ? { as: Io, allowPinchZoom: !0 } : void 0, J = (M) => {
|
|
1239
|
+
var Y, ie;
|
|
1240
|
+
const T = G.current + M, A = E().filter((k) => !k.disabled), B = document.activeElement, ae = (Y = A.find((k) => k.ref.current === B)) == null ? void 0 : Y.textValue, ce = A.map((k) => k.textValue), ge = $o(ce, T, ae), X = (ie = A.find((k) => k.textValue === ge)) == null ? void 0 : ie.ref.current;
|
|
1241
|
+
(function k(ue) {
|
|
1242
|
+
G.current = ue, window.clearTimeout(F.current), ue !== "" && (F.current = window.setTimeout(() => k(""), 1e3));
|
|
1240
1243
|
})(T), X && setTimeout(() => X.focus());
|
|
1241
1244
|
};
|
|
1242
|
-
a.useEffect(() => () => window.clearTimeout(
|
|
1243
|
-
const
|
|
1244
|
-
var A,
|
|
1245
|
-
return
|
|
1245
|
+
a.useEffect(() => () => window.clearTimeout(F.current), []), zn();
|
|
1246
|
+
const D = a.useCallback((M) => {
|
|
1247
|
+
var A, B;
|
|
1248
|
+
return H.current === ((A = U.current) == null ? void 0 : A.side) && Bo(M, (B = U.current) == null ? void 0 : B.area);
|
|
1246
1249
|
}, []);
|
|
1247
1250
|
return /* @__PURE__ */ d(
|
|
1248
1251
|
Ro,
|
|
1249
1252
|
{
|
|
1250
1253
|
scope: n,
|
|
1251
|
-
searchRef:
|
|
1254
|
+
searchRef: G,
|
|
1252
1255
|
onItemEnter: a.useCallback(
|
|
1253
1256
|
(M) => {
|
|
1254
|
-
|
|
1257
|
+
D(M) && M.preventDefault();
|
|
1255
1258
|
},
|
|
1256
|
-
[
|
|
1259
|
+
[D]
|
|
1257
1260
|
),
|
|
1258
1261
|
onItemLeave: a.useCallback(
|
|
1259
1262
|
(M) => {
|
|
1260
1263
|
var T;
|
|
1261
|
-
|
|
1264
|
+
D(M) || ((T = I.current) == null || T.focus(), P(null));
|
|
1262
1265
|
},
|
|
1263
|
-
[
|
|
1266
|
+
[D]
|
|
1264
1267
|
),
|
|
1265
1268
|
onTriggerLeave: a.useCallback(
|
|
1266
1269
|
(M) => {
|
|
1267
|
-
|
|
1270
|
+
D(M) && M.preventDefault();
|
|
1268
1271
|
},
|
|
1269
|
-
[
|
|
1272
|
+
[D]
|
|
1270
1273
|
),
|
|
1271
|
-
pointerGraceTimerRef:
|
|
1274
|
+
pointerGraceTimerRef: N,
|
|
1272
1275
|
onPointerGraceIntentChange: a.useCallback((M) => {
|
|
1273
|
-
|
|
1276
|
+
U.current = M;
|
|
1274
1277
|
}, []),
|
|
1275
|
-
children: /* @__PURE__ */ d(Q, { ...
|
|
1278
|
+
children: /* @__PURE__ */ d(Q, { ...K, children: /* @__PURE__ */ d(
|
|
1276
1279
|
bt,
|
|
1277
1280
|
{
|
|
1278
1281
|
asChild: !0,
|
|
@@ -1319,25 +1322,25 @@ var F = "MenuContent", [Ro, Ze] = z(F), tn = a.forwardRef(
|
|
|
1319
1322
|
ref: _,
|
|
1320
1323
|
style: { outline: "none", ...l.style },
|
|
1321
1324
|
onKeyDown: S(l.onKeyDown, (M) => {
|
|
1322
|
-
const A = M.target.closest("[data-radix-menu-content]") === M.currentTarget,
|
|
1323
|
-
A && (M.key === "Tab" && M.preventDefault(), !
|
|
1325
|
+
const A = M.target.closest("[data-radix-menu-content]") === M.currentTarget, B = M.ctrlKey || M.altKey || M.metaKey, ae = M.key.length === 1;
|
|
1326
|
+
A && (M.key === "Tab" && M.preventDefault(), !B && ae && J(M.key));
|
|
1324
1327
|
const ce = I.current;
|
|
1325
1328
|
if (M.target !== ce || !ho.includes(M.key))
|
|
1326
1329
|
return;
|
|
1327
1330
|
M.preventDefault();
|
|
1328
|
-
const X = E().filter((
|
|
1331
|
+
const X = E().filter((Y) => !Y.disabled).map((Y) => Y.ref.current);
|
|
1329
1332
|
zt.includes(M.key) && X.reverse(), Go(X);
|
|
1330
1333
|
}),
|
|
1331
1334
|
onBlur: S(e.onBlur, (M) => {
|
|
1332
|
-
M.currentTarget.contains(M.target) || (window.clearTimeout(
|
|
1335
|
+
M.currentTarget.contains(M.target) || (window.clearTimeout(F.current), G.current = "");
|
|
1333
1336
|
}),
|
|
1334
1337
|
onPointerMove: S(
|
|
1335
1338
|
e.onPointerMove,
|
|
1336
1339
|
fe((M) => {
|
|
1337
1340
|
const T = M.target, A = q.current !== M.clientX;
|
|
1338
1341
|
if (M.currentTarget.contains(T) && A) {
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1342
|
+
const B = M.clientX > q.current ? "right" : "left";
|
|
1343
|
+
H.current = B, q.current = M.clientX;
|
|
1341
1344
|
}
|
|
1342
1345
|
})
|
|
1343
1346
|
)
|
|
@@ -1353,24 +1356,24 @@ var F = "MenuContent", [Ro, Ze] = z(F), tn = a.forwardRef(
|
|
|
1353
1356
|
);
|
|
1354
1357
|
}
|
|
1355
1358
|
);
|
|
1356
|
-
tn.displayName =
|
|
1359
|
+
tn.displayName = L;
|
|
1357
1360
|
var Ao = "MenuGroup", Qe = a.forwardRef(
|
|
1358
1361
|
(e, t) => {
|
|
1359
1362
|
const { __scopeMenu: n, ...r } = e;
|
|
1360
|
-
return /* @__PURE__ */ d(
|
|
1363
|
+
return /* @__PURE__ */ d(O.div, { role: "group", ...r, ref: t });
|
|
1361
1364
|
}
|
|
1362
1365
|
);
|
|
1363
1366
|
Qe.displayName = Ao;
|
|
1364
1367
|
var xo = "MenuLabel", nn = a.forwardRef(
|
|
1365
1368
|
(e, t) => {
|
|
1366
1369
|
const { __scopeMenu: n, ...r } = e;
|
|
1367
|
-
return /* @__PURE__ */ d(
|
|
1370
|
+
return /* @__PURE__ */ d(O.div, { ...r, ref: t });
|
|
1368
1371
|
}
|
|
1369
1372
|
);
|
|
1370
1373
|
nn.displayName = xo;
|
|
1371
1374
|
var Re = "MenuItem", mt = "menu.itemSelect", xe = a.forwardRef(
|
|
1372
1375
|
(e, t) => {
|
|
1373
|
-
const { disabled: n = !1, onSelect: r, ...o } = e, c = a.useRef(null), u = he(Re, e.__scopeMenu), i = Ze(Re, e.__scopeMenu), h =
|
|
1376
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, c = a.useRef(null), u = he(Re, e.__scopeMenu), i = Ze(Re, e.__scopeMenu), h = $(t, c), m = a.useRef(!1), f = () => {
|
|
1374
1377
|
const s = c.current;
|
|
1375
1378
|
if (!n && s) {
|
|
1376
1379
|
const p = new CustomEvent(mt, { bubbles: !0, cancelable: !0 });
|
|
@@ -1403,7 +1406,7 @@ var Re = "MenuItem", mt = "menu.itemSelect", xe = a.forwardRef(
|
|
|
1403
1406
|
xe.displayName = Re;
|
|
1404
1407
|
var rn = a.forwardRef(
|
|
1405
1408
|
(e, t) => {
|
|
1406
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...c } = e, u = Ze(Re, n), i = qt(n), h = a.useRef(null), m =
|
|
1409
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...c } = e, u = Ze(Re, n), i = qt(n), h = a.useRef(null), m = $(t, h), [f, s] = a.useState(!1), [p, w] = a.useState("");
|
|
1407
1410
|
return a.useEffect(() => {
|
|
1408
1411
|
const C = h.current;
|
|
1409
1412
|
C && w((C.textContent ?? "").trim());
|
|
@@ -1414,7 +1417,7 @@ var rn = a.forwardRef(
|
|
|
1414
1417
|
disabled: r,
|
|
1415
1418
|
textValue: o ?? p,
|
|
1416
1419
|
children: /* @__PURE__ */ d(Pr, { asChild: !0, ...i, focusable: !r, children: /* @__PURE__ */ d(
|
|
1417
|
-
|
|
1420
|
+
O.div,
|
|
1418
1421
|
{
|
|
1419
1422
|
role: "menuitem",
|
|
1420
1423
|
"data-highlighted": f ? "" : void 0,
|
|
@@ -1506,7 +1509,7 @@ var Je = "MenuItemIndicator", [ln, Oo] = z(
|
|
|
1506
1509
|
{
|
|
1507
1510
|
present: r || Pe(c.checked) || c.checked === !0,
|
|
1508
1511
|
children: /* @__PURE__ */ d(
|
|
1509
|
-
|
|
1512
|
+
O.span,
|
|
1510
1513
|
{
|
|
1511
1514
|
...o,
|
|
1512
1515
|
ref: t,
|
|
@@ -1522,7 +1525,7 @@ var Fo = "MenuSeparator", fn = a.forwardRef(
|
|
|
1522
1525
|
(e, t) => {
|
|
1523
1526
|
const { __scopeMenu: n, ...r } = e;
|
|
1524
1527
|
return /* @__PURE__ */ d(
|
|
1525
|
-
|
|
1528
|
+
O.div,
|
|
1526
1529
|
{
|
|
1527
1530
|
role: "separator",
|
|
1528
1531
|
"aria-orientation": "horizontal",
|
|
@@ -1614,7 +1617,7 @@ var Lo = "MenuSub", [Ta, vn] = z(Lo), le = "MenuSubTrigger", mn = a.forwardRef(
|
|
|
1614
1617
|
mn.displayName = le;
|
|
1615
1618
|
var hn = "MenuSubContent", gn = a.forwardRef(
|
|
1616
1619
|
(e, t) => {
|
|
1617
|
-
const n = Jt(
|
|
1620
|
+
const n = Jt(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, c = Z(L, e.__scopeMenu), u = he(L, e.__scopeMenu), i = vn(hn, e.__scopeMenu), h = a.useRef(null), m = $(t, h);
|
|
1618
1621
|
return /* @__PURE__ */ d(de.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(_e, { present: r || c.open, children: /* @__PURE__ */ d(de.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(
|
|
1619
1622
|
qe,
|
|
1620
1623
|
{
|
|
@@ -1731,7 +1734,7 @@ var bn = "DropdownMenuTrigger", En = a.forwardRef(
|
|
|
1731
1734
|
(e, t) => {
|
|
1732
1735
|
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, c = yn(bn, n), u = x(n);
|
|
1733
1736
|
return /* @__PURE__ */ d(Ho, { asChild: !0, ...u, children: /* @__PURE__ */ d(
|
|
1734
|
-
|
|
1737
|
+
O.button,
|
|
1735
1738
|
{
|
|
1736
1739
|
type: "button",
|
|
1737
1740
|
id: c.triggerId,
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RPProvider as Mr } from "./components/RPProvider.js";
|
|
2
|
-
import { a as vr, R as Vr, S as br, b as kr, u as yr, c as Br, d as Hr } from "./ToolbarLayout.module-
|
|
2
|
+
import { a as vr, R as Vr, S as br, b as kr, u as yr, c as Br, d as Hr } from "./ToolbarLayout.module-07c61141.js";
|
|
3
3
|
import { RPConfig as Or } from "./components/RPConfig.js";
|
|
4
4
|
import { RPLayout as Er } from "./components/layout/RPLayout.js";
|
|
5
5
|
import { RPController as Ur } from "./components/RPController.js";
|
|
@@ -97,7 +97,7 @@ import "./components/ui/Checkbox.js";
|
|
|
97
97
|
import "./components/icons/CheckIcon.js";
|
|
98
98
|
import "./contexts/IconContext.js";
|
|
99
99
|
import "./components/ui/DropDown.js";
|
|
100
|
-
import "./index-
|
|
100
|
+
import "./index-27c30844.js";
|
|
101
101
|
import "./components/layout/toolbar/MenuItem.js";
|
|
102
102
|
import "./components/layout/toolbar/MenuSeparator.js";
|
|
103
103
|
import "./utils/dateFormatter.js";
|
package/dist/types/main.d.ts
CHANGED
|
@@ -42,5 +42,5 @@ export { RotateCounterclockwiseTool } from './components/layout/toolbar/tools/Ro
|
|
|
42
42
|
export { RPHorizontalBar } from './components/layout/toolbar/tools/defaults/RPHorizontalBar';
|
|
43
43
|
export { RPVerticalBar } from './components/layout/toolbar/tools/defaults/RPVerticalBar';
|
|
44
44
|
export { SelectionModeSwitcherTool } from './components/layout/toolbar/tools/SelectionModeSwitcherTool';
|
|
45
|
-
export type { CharacterMap, DarkModeProps, DownloadToolProps, FullScreenToolProps, Localization, MatchValue, OpenFileToolProps, PageNavigationToolProps, PdfPage, PdfProperties, PreparePrintProgress, PrintOptions,
|
|
45
|
+
export type { CharacterMap, DarkModeProps, DownloadToolProps, FullScreenToolProps, Localization, MatchValue, OpenFileToolProps, PageNavigationToolProps, PdfPage, PdfProperties, PreparePrintProgress, PrintOptions, PrintToolProps, RPConfigProps, RPThemeProps, RPProviderProps, RPDefaultLayoutProps, RPLayoutProps, RPIcons, RPSlots, SearchOptions, SetPageResult, ScrollModeInitialProps, ThumbnailToolProps, ViewModeInitialProps, ZoomProps, RPHorizontalBarProps, RPHorizontalBarSlots, RPHorizontalBarIcons, RPVerticalBarProps, RPVerticalBarSlots, RPVerticalBarIcons, TextHighlight, MatchHighlight, RectPosition, ThemeSwitcherIcons, ThemeSwitcherToolProps, ToolProps, ToolbarSection, ToolbarProps, SelectionModeSwitcherToolProps, SelectionModeSwitcherIcons } from './utils/types';
|
|
46
46
|
export { ViewMode, ScrollMode, ZoomLevel, Locales, ThemeVariables, SelectionMode } from './utils/types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PreparePrintProgress,
|
|
1
|
+
import { PreparePrintProgress, PrintOptions } from '../types';
|
|
2
2
|
interface PrintHookResult {
|
|
3
|
-
print: (options?:
|
|
3
|
+
print: (options?: PrintOptions) => Promise<void>;
|
|
4
4
|
cancel: () => void;
|
|
5
5
|
progress: PreparePrintProgress;
|
|
6
6
|
isComplete: boolean;
|
|
@@ -321,12 +321,12 @@ export interface PreparePrintProgress {
|
|
|
321
321
|
totalPages: number;
|
|
322
322
|
percentage: number;
|
|
323
323
|
}
|
|
324
|
-
export interface
|
|
324
|
+
export interface PrintConfiguration {
|
|
325
325
|
visibleDefaultProgress?: boolean;
|
|
326
326
|
}
|
|
327
|
-
export type
|
|
327
|
+
export type PrintOptions = PrintConfiguration | React.MouseEvent<{}>;
|
|
328
328
|
export interface PrintToolProps {
|
|
329
|
-
print: (options?:
|
|
329
|
+
print: (options?: PrintOptions) => Promise<void>;
|
|
330
330
|
cancel: () => void;
|
|
331
331
|
setOnProgress: (callback: (progress: PreparePrintProgress) => void) => void;
|
|
332
332
|
setOnComplete: (callback: () => void) => void;
|
|
@@ -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 { b as Br } from "../../ToolbarLayout.module-
|
|
5
|
+
import { b as Br } from "../../ToolbarLayout.module-07c61141.js";
|
|
6
6
|
import "../../contexts/DarkModeContext.js";
|
|
7
7
|
import "../../contexts/RotationContext.js";
|
|
8
8
|
import "../../contexts/LayerContext.js";
|
|
@@ -93,7 +93,7 @@ import "../getWordPositionInPage.js";
|
|
|
93
93
|
import "../smoothScrollTo.js";
|
|
94
94
|
import "../../components/layout/toolbar/FileUploadTool.js";
|
|
95
95
|
import "../../components/icons/FileUploadDefaultIcon.js";
|
|
96
|
-
import "../../index-
|
|
96
|
+
import "../../index-27c30844.js";
|
|
97
97
|
import "../../index-c9a2990a.js";
|
|
98
98
|
import "react-dom";
|
|
99
99
|
import "../../floating-ui.react-dom-d22a10b4.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState as E, useCallback as h, useEffect as A } from "react";
|
|
2
2
|
import { appConsole as l } from "../appConsole.js";
|
|
3
|
-
const b = /* @__PURE__ */ new Date("2025-12-
|
|
3
|
+
const b = /* @__PURE__ */ new Date("2025-12-09T09:10:54.668Z"), d = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
|
|
4
4
|
invalidLicense: `You are currently using without a valid license. ${d}`,
|
|
5
5
|
mismatchedDomain: `Your license key is not valid for the current domain / IP. ${d}`,
|
|
6
6
|
expired: `Your license key has expired. ${d}`,
|