@pdf-viewer/react 1.11.0-beta.0 → 1.11.0-beta.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/RotateTool.module-03987eba.js +6 -0
- package/dist/ToolbarLayout.module-9d258526.js +3394 -0
- package/dist/assets/ToolbarLayout.css +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +2 -2
- package/dist/components/layout/LayoutContainer.js +2 -2
- package/dist/components/layout/RPDefaultLayout.js +2 -3
- package/dist/components/layout/RPLayout.js +2 -2
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +2 -2
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +2 -2
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +3 -3
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/RPMenuItem.js +23 -0
- package/dist/components/layout/toolbar/RPMoreOptions.js +147 -0
- 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 +20 -21
- 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 +3 -3
- 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 +2 -2
- package/dist/components/layout/toolbar/ToolbarDefault.js +6 -3
- 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 +28 -0
- 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 +2 -2
- 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/RotateClockwiseTool.js +17 -0
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +25 -0
- 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 +6 -3
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +16 -0
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +20 -0
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +69 -0
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +20 -0
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +78 -0
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +20 -0
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +26 -0
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +43 -0
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +30 -0
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +32 -0
- package/dist/components/page/AnnotationLayer.js +2 -2
- package/dist/components/page/CanvasLayer.js +2 -2
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +2 -2
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +2 -2
- package/dist/components/page/TextLayer.js +2 -2
- package/dist/components/ui/Checkbox.js +13 -14
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/RPTooltip.js +329 -687
- 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/floating-ui.react-dom-88a86594.js +1447 -0
- package/dist/index-48ca3f30.js +307 -0
- package/dist/index-4ba3ab9a.js +1877 -0
- package/dist/main.js +29 -23
- package/dist/types/components/layout/toolbar/RPMenuItem.d.ts +11 -0
- package/dist/types/components/layout/toolbar/RPMoreOptions.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/DocumentPropertiesTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/RotateClockwiseTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/RotateCounterclockwiseTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/DocumentProperties.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FileDownloadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FileUploadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FullScreenTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/MostPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/PrintTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/RotateTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/ScrollModeTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/SelectionModeTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/ViewModeTool.d.ts +3 -0
- package/dist/types/contexts/SelectionModeContext.d.ts +2 -2
- package/dist/types/main.d.ts +4 -1
- package/dist/types/utils/calculatePage.d.ts +7 -0
- package/dist/types/utils/elementPagePosition.d.ts +17 -0
- package/dist/types/utils/getWordPositionInPage.d.ts +2 -2
- package/dist/types/utils/hooks/useVirtualReactWindow.d.ts +8 -0
- package/dist/types/utils/types.d.ts +85 -7
- package/dist/utils/calculatePage.js +12 -5
- package/dist/utils/elementPagePosition.js +11 -0
- package/dist/utils/getScrollDistance.js +2 -2
- package/dist/utils/getZoomLevel.js +7 -7
- 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 +4 -3
- package/dist/utils/hooks/useSearch.js +2 -2
- package/dist/utils/hooks/useThumbnail.js +2 -2
- package/dist/utils/hooks/useVirtualReactWindow.js +4 -3
- package/package.json +1 -1
- package/dist/ToolbarLayout.module-310f3470.js +0 -3368
- package/dist/floating-ui.react-dom-bbd2b1a7.js +0 -1330
- package/dist/index-54351a14.js +0 -1995
- package/dist/index-94df4e25.js +0 -139
- package/dist/index-e620205e.js +0 -172
package/dist/index-94df4e25.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { jsx as C } from "react/jsx-runtime";
|
|
3
|
-
function m(e, n) {
|
|
4
|
-
const t = i.createContext(n), r = (s) => {
|
|
5
|
-
const { children: o, ...c } = s, a = i.useMemo(() => c, Object.values(c));
|
|
6
|
-
return /* @__PURE__ */ C(t.Provider, { value: a, children: o });
|
|
7
|
-
};
|
|
8
|
-
r.displayName = e + "Provider";
|
|
9
|
-
function u(s) {
|
|
10
|
-
const o = i.useContext(t);
|
|
11
|
-
if (o)
|
|
12
|
-
return o;
|
|
13
|
-
if (n !== void 0)
|
|
14
|
-
return n;
|
|
15
|
-
throw new Error(`\`${s}\` must be used within \`${e}\``);
|
|
16
|
-
}
|
|
17
|
-
return [r, u];
|
|
18
|
-
}
|
|
19
|
-
function E(e, n = []) {
|
|
20
|
-
let t = [];
|
|
21
|
-
function r(s, o) {
|
|
22
|
-
const c = i.createContext(o), a = t.length;
|
|
23
|
-
t = [...t, o];
|
|
24
|
-
const f = (d) => {
|
|
25
|
-
var b;
|
|
26
|
-
const { scope: l, children: S, ...v } = d, h = ((b = l == null ? void 0 : l[e]) == null ? void 0 : b[a]) || c, z = i.useMemo(() => v, Object.values(v));
|
|
27
|
-
return /* @__PURE__ */ C(h.Provider, { value: z, children: S });
|
|
28
|
-
};
|
|
29
|
-
f.displayName = s + "Provider";
|
|
30
|
-
function x(d, l) {
|
|
31
|
-
var h;
|
|
32
|
-
const S = ((h = l == null ? void 0 : l[e]) == null ? void 0 : h[a]) || c, v = i.useContext(S);
|
|
33
|
-
if (v)
|
|
34
|
-
return v;
|
|
35
|
-
if (o !== void 0)
|
|
36
|
-
return o;
|
|
37
|
-
throw new Error(`\`${d}\` must be used within \`${s}\``);
|
|
38
|
-
}
|
|
39
|
-
return [f, x];
|
|
40
|
-
}
|
|
41
|
-
const u = () => {
|
|
42
|
-
const s = t.map((o) => i.createContext(o));
|
|
43
|
-
return function(c) {
|
|
44
|
-
const a = (c == null ? void 0 : c[e]) || s;
|
|
45
|
-
return i.useMemo(
|
|
46
|
-
() => ({ [`__scope${e}`]: { ...c, [e]: a } }),
|
|
47
|
-
[c, a]
|
|
48
|
-
);
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
return u.scopeName = e, [r, P(u, ...n)];
|
|
52
|
-
}
|
|
53
|
-
function P(...e) {
|
|
54
|
-
const n = e[0];
|
|
55
|
-
if (e.length === 1)
|
|
56
|
-
return n;
|
|
57
|
-
const t = () => {
|
|
58
|
-
const r = e.map((u) => ({
|
|
59
|
-
useScope: u(),
|
|
60
|
-
scopeName: u.scopeName
|
|
61
|
-
}));
|
|
62
|
-
return function(s) {
|
|
63
|
-
const o = r.reduce((c, { useScope: a, scopeName: f }) => {
|
|
64
|
-
const d = a(s)[`__scope${f}`];
|
|
65
|
-
return { ...c, ...d };
|
|
66
|
-
}, {});
|
|
67
|
-
return i.useMemo(() => ({ [`__scope${n.scopeName}`]: o }), [o]);
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
return t.scopeName = n.scopeName, t;
|
|
71
|
-
}
|
|
72
|
-
function y(e) {
|
|
73
|
-
const n = i.useRef(e);
|
|
74
|
-
return i.useEffect(() => {
|
|
75
|
-
n.current = e;
|
|
76
|
-
}), i.useMemo(() => (...t) => {
|
|
77
|
-
var r;
|
|
78
|
-
return (r = n.current) == null ? void 0 : r.call(n, ...t);
|
|
79
|
-
}, []);
|
|
80
|
-
}
|
|
81
|
-
var g = globalThis != null && globalThis.document ? i.useLayoutEffect : () => {
|
|
82
|
-
};
|
|
83
|
-
function $(e) {
|
|
84
|
-
const [n, t] = i.useState(void 0);
|
|
85
|
-
return g(() => {
|
|
86
|
-
if (e) {
|
|
87
|
-
t({ width: e.offsetWidth, height: e.offsetHeight });
|
|
88
|
-
const r = new ResizeObserver((u) => {
|
|
89
|
-
if (!Array.isArray(u) || !u.length)
|
|
90
|
-
return;
|
|
91
|
-
const s = u[0];
|
|
92
|
-
let o, c;
|
|
93
|
-
if ("borderBoxSize" in s) {
|
|
94
|
-
const a = s.borderBoxSize, f = Array.isArray(a) ? a[0] : a;
|
|
95
|
-
o = f.inlineSize, c = f.blockSize;
|
|
96
|
-
} else
|
|
97
|
-
o = e.offsetWidth, c = e.offsetHeight;
|
|
98
|
-
t({ width: o, height: c });
|
|
99
|
-
});
|
|
100
|
-
return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
|
|
101
|
-
} else
|
|
102
|
-
t(void 0);
|
|
103
|
-
}, [e]), n;
|
|
104
|
-
}
|
|
105
|
-
function _({
|
|
106
|
-
prop: e,
|
|
107
|
-
defaultProp: n,
|
|
108
|
-
onChange: t = () => {
|
|
109
|
-
}
|
|
110
|
-
}) {
|
|
111
|
-
const [r, u] = p({ defaultProp: n, onChange: t }), s = e !== void 0, o = s ? e : r, c = y(t), a = i.useCallback(
|
|
112
|
-
(f) => {
|
|
113
|
-
if (s) {
|
|
114
|
-
const d = typeof f == "function" ? f(e) : f;
|
|
115
|
-
d !== e && c(d);
|
|
116
|
-
} else
|
|
117
|
-
u(f);
|
|
118
|
-
},
|
|
119
|
-
[s, e, u, c]
|
|
120
|
-
);
|
|
121
|
-
return [o, a];
|
|
122
|
-
}
|
|
123
|
-
function p({
|
|
124
|
-
defaultProp: e,
|
|
125
|
-
onChange: n
|
|
126
|
-
}) {
|
|
127
|
-
const t = i.useState(e), [r] = t, u = i.useRef(r), s = y(n);
|
|
128
|
-
return i.useEffect(() => {
|
|
129
|
-
u.current !== r && (s(r), u.current = r);
|
|
130
|
-
}, [r, u, s]), t;
|
|
131
|
-
}
|
|
132
|
-
export {
|
|
133
|
-
$ as a,
|
|
134
|
-
g as b,
|
|
135
|
-
E as c,
|
|
136
|
-
y as d,
|
|
137
|
-
m as e,
|
|
138
|
-
_ as u
|
|
139
|
-
};
|
package/dist/index-e620205e.js
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import * as s from "react";
|
|
2
|
-
import * as C from "react-dom";
|
|
3
|
-
import { jsx as h, Fragment as M } from "react/jsx-runtime";
|
|
4
|
-
import { b as g } from "./index-94df4e25.js";
|
|
5
|
-
function x(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
6
|
-
return function(r) {
|
|
7
|
-
if (e == null || e(r), t === !1 || !r.defaultPrevented)
|
|
8
|
-
return n == null ? void 0 : n(r);
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
function A(e, n) {
|
|
12
|
-
if (typeof e == "function")
|
|
13
|
-
return e(n);
|
|
14
|
-
e != null && (e.current = n);
|
|
15
|
-
}
|
|
16
|
-
function R(...e) {
|
|
17
|
-
return (n) => {
|
|
18
|
-
let t = !1;
|
|
19
|
-
const i = e.map((r) => {
|
|
20
|
-
const o = A(r, n);
|
|
21
|
-
return !t && typeof o == "function" && (t = !0), o;
|
|
22
|
-
});
|
|
23
|
-
if (t)
|
|
24
|
-
return () => {
|
|
25
|
-
for (let r = 0; r < i.length; r++) {
|
|
26
|
-
const o = i[r];
|
|
27
|
-
typeof o == "function" ? o() : A(e[r], null);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function S(...e) {
|
|
33
|
-
return s.useCallback(R(...e), e);
|
|
34
|
-
}
|
|
35
|
-
var O = s.forwardRef((e, n) => {
|
|
36
|
-
const { children: t, ...i } = e, r = s.Children.toArray(t), o = r.find(T);
|
|
37
|
-
if (o) {
|
|
38
|
-
const c = o.props.children, l = r.map((u) => u === o ? s.Children.count(c) > 1 ? s.Children.only(null) : s.isValidElement(c) ? c.props.children : null : u);
|
|
39
|
-
return /* @__PURE__ */ h(y, { ...i, ref: n, children: s.isValidElement(c) ? s.cloneElement(c, void 0, l) : null });
|
|
40
|
-
}
|
|
41
|
-
return /* @__PURE__ */ h(y, { ...i, ref: n, children: t });
|
|
42
|
-
});
|
|
43
|
-
O.displayName = "Slot";
|
|
44
|
-
var y = s.forwardRef((e, n) => {
|
|
45
|
-
const { children: t, ...i } = e;
|
|
46
|
-
if (s.isValidElement(t)) {
|
|
47
|
-
const r = D(t), o = b(i, t.props);
|
|
48
|
-
return t.type !== s.Fragment && (o.ref = n ? R(n, r) : r), s.cloneElement(t, o);
|
|
49
|
-
}
|
|
50
|
-
return s.Children.count(t) > 1 ? s.Children.only(null) : null;
|
|
51
|
-
});
|
|
52
|
-
y.displayName = "SlotClone";
|
|
53
|
-
var E = ({ children: e }) => /* @__PURE__ */ h(M, { children: e });
|
|
54
|
-
function T(e) {
|
|
55
|
-
return s.isValidElement(e) && e.type === E;
|
|
56
|
-
}
|
|
57
|
-
function b(e, n) {
|
|
58
|
-
const t = { ...n };
|
|
59
|
-
for (const i in n) {
|
|
60
|
-
const r = e[i], o = n[i];
|
|
61
|
-
/^on[A-Z]/.test(i) ? r && o ? t[i] = (...l) => {
|
|
62
|
-
o(...l), r(...l);
|
|
63
|
-
} : r && (t[i] = r) : i === "style" ? t[i] = { ...r, ...o } : i === "className" && (t[i] = [r, o].filter(Boolean).join(" "));
|
|
64
|
-
}
|
|
65
|
-
return { ...e, ...t };
|
|
66
|
-
}
|
|
67
|
-
function D(e) {
|
|
68
|
-
var i, r;
|
|
69
|
-
let n = (i = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : i.get, t = n && "isReactWarning" in n && n.isReactWarning;
|
|
70
|
-
return t ? e.ref : (n = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, t = n && "isReactWarning" in n && n.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
|
|
71
|
-
}
|
|
72
|
-
var I = [
|
|
73
|
-
"a",
|
|
74
|
-
"button",
|
|
75
|
-
"div",
|
|
76
|
-
"form",
|
|
77
|
-
"h2",
|
|
78
|
-
"h3",
|
|
79
|
-
"img",
|
|
80
|
-
"input",
|
|
81
|
-
"label",
|
|
82
|
-
"li",
|
|
83
|
-
"nav",
|
|
84
|
-
"ol",
|
|
85
|
-
"p",
|
|
86
|
-
"span",
|
|
87
|
-
"svg",
|
|
88
|
-
"ul"
|
|
89
|
-
], _ = I.reduce((e, n) => {
|
|
90
|
-
const t = s.forwardRef((i, r) => {
|
|
91
|
-
const { asChild: o, ...c } = i, l = o ? O : n;
|
|
92
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ h(l, { ...c, ref: r });
|
|
93
|
-
});
|
|
94
|
-
return t.displayName = `Primitive.${n}`, { ...e, [n]: t };
|
|
95
|
-
}, {});
|
|
96
|
-
function k(e, n) {
|
|
97
|
-
e && C.flushSync(() => e.dispatchEvent(n));
|
|
98
|
-
}
|
|
99
|
-
function U(e, n) {
|
|
100
|
-
return s.useReducer((t, i) => n[t][i] ?? t, e);
|
|
101
|
-
}
|
|
102
|
-
var W = (e) => {
|
|
103
|
-
const { present: n, children: t } = e, i = F(n), r = typeof t == "function" ? t({ present: i.isPresent }) : s.Children.only(t), o = S(i.ref, L(r));
|
|
104
|
-
return typeof t == "function" || i.isPresent ? s.cloneElement(r, { ref: o }) : null;
|
|
105
|
-
};
|
|
106
|
-
W.displayName = "Presence";
|
|
107
|
-
function F(e) {
|
|
108
|
-
const [n, t] = s.useState(), i = s.useRef({}), r = s.useRef(e), o = s.useRef("none"), c = e ? "mounted" : "unmounted", [l, u] = U(c, {
|
|
109
|
-
mounted: {
|
|
110
|
-
UNMOUNT: "unmounted",
|
|
111
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
112
|
-
},
|
|
113
|
-
unmountSuspended: {
|
|
114
|
-
MOUNT: "mounted",
|
|
115
|
-
ANIMATION_END: "unmounted"
|
|
116
|
-
},
|
|
117
|
-
unmounted: {
|
|
118
|
-
MOUNT: "mounted"
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
return s.useEffect(() => {
|
|
122
|
-
const a = N(i.current);
|
|
123
|
-
o.current = l === "mounted" ? a : "none";
|
|
124
|
-
}, [l]), g(() => {
|
|
125
|
-
const a = i.current, m = r.current;
|
|
126
|
-
if (m !== e) {
|
|
127
|
-
const p = o.current, f = N(a);
|
|
128
|
-
e ? u("MOUNT") : f === "none" || (a == null ? void 0 : a.display) === "none" ? u("UNMOUNT") : u(m && p !== f ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
|
|
129
|
-
}
|
|
130
|
-
}, [e, u]), g(() => {
|
|
131
|
-
if (n) {
|
|
132
|
-
let a;
|
|
133
|
-
const m = n.ownerDocument.defaultView ?? window, d = (f) => {
|
|
134
|
-
const v = N(i.current).includes(f.animationName);
|
|
135
|
-
if (f.target === n && v && (u("ANIMATION_END"), !r.current)) {
|
|
136
|
-
const w = n.style.animationFillMode;
|
|
137
|
-
n.style.animationFillMode = "forwards", a = m.setTimeout(() => {
|
|
138
|
-
n.style.animationFillMode === "forwards" && (n.style.animationFillMode = w);
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
}, p = (f) => {
|
|
142
|
-
f.target === n && (o.current = N(i.current));
|
|
143
|
-
};
|
|
144
|
-
return n.addEventListener("animationstart", p), n.addEventListener("animationcancel", d), n.addEventListener("animationend", d), () => {
|
|
145
|
-
m.clearTimeout(a), n.removeEventListener("animationstart", p), n.removeEventListener("animationcancel", d), n.removeEventListener("animationend", d);
|
|
146
|
-
};
|
|
147
|
-
} else
|
|
148
|
-
u("ANIMATION_END");
|
|
149
|
-
}, [n, u]), {
|
|
150
|
-
isPresent: ["mounted", "unmountSuspended"].includes(l),
|
|
151
|
-
ref: s.useCallback((a) => {
|
|
152
|
-
a && (i.current = getComputedStyle(a)), t(a);
|
|
153
|
-
}, [])
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
function N(e) {
|
|
157
|
-
return (e == null ? void 0 : e.animationName) || "none";
|
|
158
|
-
}
|
|
159
|
-
function L(e) {
|
|
160
|
-
var i, r;
|
|
161
|
-
let n = (i = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : i.get, t = n && "isReactWarning" in n && n.isReactWarning;
|
|
162
|
-
return t ? e.ref : (n = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, t = n && "isReactWarning" in n && n.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
|
|
163
|
-
}
|
|
164
|
-
export {
|
|
165
|
-
_ as P,
|
|
166
|
-
O as S,
|
|
167
|
-
W as a,
|
|
168
|
-
R as b,
|
|
169
|
-
x as c,
|
|
170
|
-
k as d,
|
|
171
|
-
S as u
|
|
172
|
-
};
|