@annotorious/react 3.0.22 → 3.1.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/annotorious-react.es11.js +3 -6
- package/dist/annotorious-react.es11.js.map +1 -1
- package/dist/annotorious-react.es12.js +7 -7
- package/dist/annotorious-react.es12.js.map +1 -1
- package/dist/annotorious-react.es13.js +154 -160
- package/dist/annotorious-react.es13.js.map +1 -1
- package/dist/annotorious-react.es16.js +3 -3
- package/dist/annotorious-react.es17.js +3 -3
- package/dist/annotorious-react.es17.js.map +1 -1
- package/dist/annotorious-react.es18.js +8 -2
- package/dist/annotorious-react.es18.js.map +1 -1
- package/dist/annotorious-react.es19.js +2 -33
- package/dist/annotorious-react.es19.js.map +1 -1
- package/dist/annotorious-react.es20.js +23 -396
- package/dist/annotorious-react.es20.js.map +1 -1
- package/dist/annotorious-react.es21.js +404 -127
- package/dist/annotorious-react.es21.js.map +1 -1
- package/dist/annotorious-react.es22.js +129 -2
- package/dist/annotorious-react.es22.js.map +1 -1
- package/dist/annotorious-react.es23.js +2 -2
- package/dist/annotorious-react.es24.js +2 -7
- package/dist/annotorious-react.es24.js.map +1 -1
- package/dist/annotorious-react.es25.js +7 -2
- package/dist/annotorious-react.es25.js.map +1 -1
- package/dist/annotorious-react.es26.js +2 -11
- package/dist/annotorious-react.es26.js.map +1 -1
- package/dist/annotorious-react.es27.js +9 -124
- package/dist/annotorious-react.es27.js.map +1 -1
- package/dist/annotorious-react.es28.js +112 -452
- package/dist/annotorious-react.es28.js.map +1 -1
- package/dist/annotorious-react.es29.js +469 -0
- package/dist/annotorious-react.es29.js.map +1 -0
- package/package.json +15 -15
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { __require as o } from "./annotorious-react.es20.js";
|
|
4
|
-
process.env.NODE_ENV === "production" ? e.exports = r() : e.exports = o();
|
|
5
|
-
var m = e.exports;
|
|
1
|
+
import { __require as r } from "./annotorious-react.es18.js";
|
|
2
|
+
var i = r();
|
|
6
3
|
export {
|
|
7
|
-
|
|
4
|
+
i as j
|
|
8
5
|
};
|
|
9
6
|
//# sourceMappingURL=annotorious-react.es11.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es11.js","sources":[
|
|
1
|
+
{"version":3,"file":"annotorious-react.es11.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
const
|
|
3
|
-
const [
|
|
4
|
-
return s(() => (
|
|
5
|
-
clearTimeout(
|
|
6
|
-
}), [e, t]),
|
|
1
|
+
import { useState as o, useRef as c, useEffect as s } from "react";
|
|
2
|
+
const i = (e, t) => {
|
|
3
|
+
const [r, n] = o(e), u = c(void 0);
|
|
4
|
+
return s(() => (u.current = setTimeout(() => n(e), t), () => {
|
|
5
|
+
clearTimeout(u.current);
|
|
6
|
+
}), [e, t]), r;
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
i as useDebounce
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=annotorious-react.es12.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es12.js","sources":["../src/useDebounce.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nexport const useDebounce = (value: any, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState<any>(value);\n\n const timerRef = useRef<ReturnType<typeof setTimeout>>();\n\n useEffect(() => {\n timerRef.current = \n setTimeout(() => setDebouncedValue(value), delay);\n\n return () => {\n clearTimeout(timerRef.current);\n };\n }, [value, delay]);\n\n return debouncedValue;\n}"],"names":["useDebounce","value","delay","debouncedValue","setDebouncedValue","useState","timerRef","useRef","useEffect"],"mappings":";AAEa,MAAAA,IAAc,CAACC,GAAYC,MAAkB;AACxD,QAAM,CAACC,GAAgBC,CAAiB,IAAIC,EAAcJ,CAAK,GAEzDK,IAAWC,EAAsC;
|
|
1
|
+
{"version":3,"file":"annotorious-react.es12.js","sources":["../src/useDebounce.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nexport const useDebounce = (value: any, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState<any>(value);\n\n const timerRef = useRef<ReturnType<typeof setTimeout>>(undefined);\n\n useEffect(() => {\n timerRef.current = \n setTimeout(() => setDebouncedValue(value), delay);\n\n return () => {\n clearTimeout(timerRef.current);\n };\n }, [value, delay]);\n\n return debouncedValue;\n}"],"names":["useDebounce","value","delay","debouncedValue","setDebouncedValue","useState","timerRef","useRef","useEffect"],"mappings":";AAEa,MAAAA,IAAc,CAACC,GAAYC,MAAkB;AACxD,QAAM,CAACC,GAAgBC,CAAiB,IAAIC,EAAcJ,CAAK,GAEzDK,IAAWC,EAAsC,MAAS;AAEhE,SAAAC,EAAU,OACRF,EAAS,UACP,WAAW,MAAMF,EAAkBH,CAAK,GAAGC,CAAK,GAE3C,MAAM;AACX,iBAAaI,EAAS,OAAO;AAAA,EAC/B,IACC,CAACL,GAAOC,CAAK,CAAC,GAEVC;AACT;"}
|
|
@@ -1,275 +1,269 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { useLayoutEffect as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import * as s from "react";
|
|
2
|
+
import { useLayoutEffect as k, useEffect as q } from "react";
|
|
3
|
+
import { j as F } from "./annotorious-react.es11.js";
|
|
4
|
+
import { getComputedStyle as Q, isElement as P } from "./annotorious-react.es22.js";
|
|
5
|
+
import { getOverflowAncestors as xe } from "./annotorious-react.es22.js";
|
|
5
6
|
import "react-dom";
|
|
6
|
-
import { useFloating as
|
|
7
|
-
import { arrow as
|
|
7
|
+
import { useFloating as Z } from "./annotorious-react.es15.js";
|
|
8
|
+
import { arrow as ve, flip as we, inline as Ee, offset as Se, shift as Ie } from "./annotorious-react.es15.js";
|
|
8
9
|
const $ = {
|
|
9
|
-
...
|
|
10
|
-
},
|
|
11
|
-
function
|
|
12
|
-
const n =
|
|
10
|
+
...s
|
|
11
|
+
}, z = $.useInsertionEffect, G = z || ((t) => t());
|
|
12
|
+
function J(t) {
|
|
13
|
+
const n = s.useRef(() => {
|
|
13
14
|
if (process.env.NODE_ENV !== "production")
|
|
14
15
|
throw new Error("Cannot call an event handler while rendering.");
|
|
15
16
|
});
|
|
16
|
-
return
|
|
17
|
+
return G(() => {
|
|
17
18
|
n.current = t;
|
|
18
|
-
}),
|
|
19
|
-
for (var
|
|
20
|
-
e[
|
|
19
|
+
}), s.useCallback(function() {
|
|
20
|
+
for (var c = arguments.length, e = new Array(c), o = 0; o < c; o++)
|
|
21
|
+
e[o] = arguments[o];
|
|
21
22
|
return n.current == null ? void 0 : n.current(...e);
|
|
22
23
|
}, []);
|
|
23
24
|
}
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
return D = Object.assign ? Object.assign.bind() : function(t) {
|
|
27
|
-
for (var n = 1; n < arguments.length; n++) {
|
|
28
|
-
var s = arguments[n];
|
|
29
|
-
for (var e in s)
|
|
30
|
-
Object.prototype.hasOwnProperty.call(s, e) && (t[e] = s[e]);
|
|
31
|
-
}
|
|
32
|
-
return t;
|
|
33
|
-
}, D.apply(this, arguments);
|
|
34
|
-
}
|
|
35
|
-
let V = !1, k = 0;
|
|
25
|
+
var M = typeof document < "u" ? k : q;
|
|
26
|
+
let y = !1, K = 0;
|
|
36
27
|
const W = () => (
|
|
37
28
|
// Ensure the id is unique with multiple independent versions of Floating UI
|
|
38
29
|
// on <React 18
|
|
39
|
-
"floating-ui-" + Math.random().toString(36).slice(2, 6) +
|
|
30
|
+
"floating-ui-" + Math.random().toString(36).slice(2, 6) + K++
|
|
40
31
|
);
|
|
41
32
|
function _() {
|
|
42
|
-
const [t, n] =
|
|
43
|
-
return
|
|
33
|
+
const [t, n] = s.useState(() => y ? W() : void 0);
|
|
34
|
+
return M(() => {
|
|
44
35
|
t == null && n(W());
|
|
45
|
-
}, []),
|
|
46
|
-
|
|
36
|
+
}, []), s.useEffect(() => {
|
|
37
|
+
y = !0;
|
|
47
38
|
}, []), t;
|
|
48
39
|
}
|
|
49
40
|
const ee = $.useId, B = ee || _;
|
|
50
|
-
let
|
|
51
|
-
process.env.NODE_ENV !== "production" && (
|
|
41
|
+
let O;
|
|
42
|
+
process.env.NODE_ENV !== "production" && (O = /* @__PURE__ */ new Set());
|
|
52
43
|
function te() {
|
|
53
|
-
for (var t, n = arguments.length,
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
if (!((t =
|
|
57
|
-
var
|
|
58
|
-
(
|
|
44
|
+
for (var t, n = arguments.length, c = new Array(n), e = 0; e < n; e++)
|
|
45
|
+
c[e] = arguments[e];
|
|
46
|
+
const o = "Floating UI: " + c.join(" ");
|
|
47
|
+
if (!((t = O) != null && t.has(o))) {
|
|
48
|
+
var i;
|
|
49
|
+
(i = O) == null || i.add(o), console.warn(o);
|
|
59
50
|
}
|
|
60
51
|
}
|
|
61
52
|
function ne() {
|
|
62
|
-
for (var t, n = arguments.length,
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
if (!((t =
|
|
66
|
-
var
|
|
67
|
-
(
|
|
53
|
+
for (var t, n = arguments.length, c = new Array(n), e = 0; e < n; e++)
|
|
54
|
+
c[e] = arguments[e];
|
|
55
|
+
const o = "Floating UI: " + c.join(" ");
|
|
56
|
+
if (!((t = O) != null && t.has(o))) {
|
|
57
|
+
var i;
|
|
58
|
+
(i = O) == null || i.add(o), console.error(o);
|
|
68
59
|
}
|
|
69
60
|
}
|
|
70
|
-
const
|
|
61
|
+
const ge = /* @__PURE__ */ s.forwardRef(function(n, c) {
|
|
71
62
|
const {
|
|
72
63
|
context: {
|
|
73
64
|
placement: e,
|
|
74
65
|
elements: {
|
|
75
|
-
floating:
|
|
66
|
+
floating: o
|
|
76
67
|
},
|
|
77
68
|
middlewareData: {
|
|
78
|
-
arrow:
|
|
79
|
-
shift:
|
|
69
|
+
arrow: i,
|
|
70
|
+
shift: a
|
|
80
71
|
}
|
|
81
72
|
},
|
|
82
|
-
width:
|
|
83
|
-
height:
|
|
84
|
-
tipRadius:
|
|
73
|
+
width: l = 14,
|
|
74
|
+
height: u = 7,
|
|
75
|
+
tipRadius: I = 0,
|
|
85
76
|
strokeWidth: d = 0,
|
|
86
77
|
staticOffset: g,
|
|
87
78
|
stroke: h,
|
|
88
|
-
d:
|
|
79
|
+
d: r,
|
|
89
80
|
style: {
|
|
90
81
|
transform: p,
|
|
91
82
|
...R
|
|
92
83
|
} = {},
|
|
93
84
|
...x
|
|
94
85
|
} = n;
|
|
95
|
-
process.env.NODE_ENV !== "production" && (
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
98
|
-
if (!
|
|
99
|
-
|
|
100
|
-
}, [
|
|
86
|
+
process.env.NODE_ENV !== "production" && (c || te("The `ref` prop is required for `FloatingArrow`."));
|
|
87
|
+
const C = B(), [E, f] = s.useState(!1);
|
|
88
|
+
if (M(() => {
|
|
89
|
+
if (!o) return;
|
|
90
|
+
Q(o).direction === "rtl" && f(!0);
|
|
91
|
+
}, [o]), !o)
|
|
101
92
|
return null;
|
|
102
|
-
const [m,
|
|
93
|
+
const [m, b] = e.split("-"), j = m === "top" || m === "bottom";
|
|
103
94
|
let S = g;
|
|
104
|
-
(
|
|
105
|
-
const v = d * 2,
|
|
106
|
-
let
|
|
107
|
-
S &&
|
|
108
|
-
const H = (
|
|
95
|
+
(j && a != null && a.x || !j && a != null && a.y) && (S = null);
|
|
96
|
+
const v = d * 2, D = v / 2, N = l / 2 * (I / -8 + 1), A = u / 2 * I / 4, w = !!r, U = S && b === "end" ? "bottom" : "top";
|
|
97
|
+
let T = S && b === "end" ? "right" : "left";
|
|
98
|
+
S && E && (T = b === "end" ? "left" : "right");
|
|
99
|
+
const H = (i == null ? void 0 : i.x) != null ? S || i.x : "", X = (i == null ? void 0 : i.y) != null ? S || i.y : "", L = r || "M0,0" + (" H" + l) + (" L" + (l - N) + "," + (u - A)) + (" Q" + l / 2 + "," + u + " " + N + "," + (u - A)) + " Z", Y = {
|
|
109
100
|
top: w ? "rotate(180deg)" : "",
|
|
110
101
|
left: w ? "rotate(90deg)" : "rotate(-90deg)",
|
|
111
102
|
bottom: w ? "" : "rotate(180deg)",
|
|
112
103
|
right: w ? "rotate(-90deg)" : "rotate(90deg)"
|
|
113
104
|
}[m];
|
|
114
|
-
return /* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ F.jsxs("svg", {
|
|
106
|
+
...x,
|
|
115
107
|
"aria-hidden": !0,
|
|
116
|
-
ref:
|
|
117
|
-
width: w ?
|
|
118
|
-
height:
|
|
119
|
-
viewBox: "0 0 " +
|
|
108
|
+
ref: c,
|
|
109
|
+
width: w ? l : l + v,
|
|
110
|
+
height: l,
|
|
111
|
+
viewBox: "0 0 " + l + " " + (u > l ? u : l),
|
|
120
112
|
style: {
|
|
121
113
|
position: "absolute",
|
|
122
114
|
pointerEvents: "none",
|
|
123
|
-
[
|
|
115
|
+
[T]: H,
|
|
124
116
|
[U]: X,
|
|
125
|
-
[m]:
|
|
126
|
-
transform: [Y, p].filter((
|
|
117
|
+
[m]: j || w ? "100%" : "calc(100% - " + v / 2 + "px)",
|
|
118
|
+
transform: [Y, p].filter((V) => !!V).join(" "),
|
|
127
119
|
...R
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
120
|
+
},
|
|
121
|
+
children: [v > 0 && /* @__PURE__ */ F.jsx("path", {
|
|
122
|
+
clipPath: "url(#" + C + ")",
|
|
123
|
+
fill: "none",
|
|
124
|
+
stroke: h,
|
|
125
|
+
strokeWidth: v + (r ? 0 : 1),
|
|
126
|
+
d: L
|
|
127
|
+
}), /* @__PURE__ */ F.jsx("path", {
|
|
128
|
+
stroke: v && !r ? x.fill : "none",
|
|
129
|
+
d: L
|
|
130
|
+
}), /* @__PURE__ */ F.jsx("clipPath", {
|
|
131
|
+
id: C,
|
|
132
|
+
children: /* @__PURE__ */ F.jsx("rect", {
|
|
133
|
+
x: -D,
|
|
134
|
+
y: D * (w ? -1 : 1),
|
|
135
|
+
width: l + v,
|
|
136
|
+
height: l
|
|
137
|
+
})
|
|
138
|
+
})]
|
|
139
|
+
});
|
|
146
140
|
});
|
|
147
141
|
function oe() {
|
|
148
142
|
const t = /* @__PURE__ */ new Map();
|
|
149
143
|
return {
|
|
150
|
-
emit(n,
|
|
144
|
+
emit(n, c) {
|
|
151
145
|
var e;
|
|
152
|
-
(e = t.get(n)) == null || e.forEach((
|
|
146
|
+
(e = t.get(n)) == null || e.forEach((o) => o(c));
|
|
153
147
|
},
|
|
154
|
-
on(n,
|
|
155
|
-
t.set(n, [...t.get(n) || [],
|
|
148
|
+
on(n, c) {
|
|
149
|
+
t.set(n, [...t.get(n) || [], c]);
|
|
156
150
|
},
|
|
157
|
-
off(n,
|
|
151
|
+
off(n, c) {
|
|
158
152
|
var e;
|
|
159
|
-
t.set(n, ((e = t.get(n)) == null ? void 0 : e.filter((
|
|
153
|
+
t.set(n, ((e = t.get(n)) == null ? void 0 : e.filter((o) => o !== c)) || []);
|
|
160
154
|
}
|
|
161
155
|
};
|
|
162
156
|
}
|
|
163
|
-
const re = /* @__PURE__ */
|
|
157
|
+
const re = /* @__PURE__ */ s.createContext(null), se = /* @__PURE__ */ s.createContext(null), ce = () => {
|
|
164
158
|
var t;
|
|
165
|
-
return ((t =
|
|
166
|
-
},
|
|
167
|
-
function
|
|
159
|
+
return ((t = s.useContext(re)) == null ? void 0 : t.id) || null;
|
|
160
|
+
}, ie = () => s.useContext(se);
|
|
161
|
+
function le(t) {
|
|
168
162
|
const {
|
|
169
163
|
open: n = !1,
|
|
170
|
-
onOpenChange:
|
|
164
|
+
onOpenChange: c,
|
|
171
165
|
elements: e
|
|
172
|
-
} = t,
|
|
166
|
+
} = t, o = B(), i = s.useRef({}), [a] = s.useState(() => oe()), l = ce() != null;
|
|
173
167
|
if (process.env.NODE_ENV !== "production") {
|
|
174
|
-
const
|
|
175
|
-
|
|
168
|
+
const r = e.reference;
|
|
169
|
+
r && !P(r) && ne("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
176
170
|
}
|
|
177
|
-
const [
|
|
178
|
-
|
|
179
|
-
open:
|
|
171
|
+
const [u, I] = s.useState(e.reference), d = J((r, p, R) => {
|
|
172
|
+
i.current.openEvent = r ? p : void 0, a.emit("openchange", {
|
|
173
|
+
open: r,
|
|
180
174
|
event: p,
|
|
181
175
|
reason: R,
|
|
182
|
-
nested:
|
|
183
|
-
}),
|
|
184
|
-
}), g =
|
|
185
|
-
setPositionReference:
|
|
186
|
-
}), []), h =
|
|
187
|
-
reference:
|
|
176
|
+
nested: l
|
|
177
|
+
}), c == null || c(r, p, R);
|
|
178
|
+
}), g = s.useMemo(() => ({
|
|
179
|
+
setPositionReference: I
|
|
180
|
+
}), []), h = s.useMemo(() => ({
|
|
181
|
+
reference: u || e.reference || null,
|
|
188
182
|
floating: e.floating || null,
|
|
189
183
|
domReference: e.reference
|
|
190
|
-
}), [
|
|
191
|
-
return
|
|
192
|
-
dataRef:
|
|
184
|
+
}), [u, e.reference, e.floating]);
|
|
185
|
+
return s.useMemo(() => ({
|
|
186
|
+
dataRef: i,
|
|
193
187
|
open: n,
|
|
194
188
|
onOpenChange: d,
|
|
195
189
|
elements: h,
|
|
196
|
-
events:
|
|
197
|
-
floatingId:
|
|
190
|
+
events: a,
|
|
191
|
+
floatingId: o,
|
|
198
192
|
refs: g
|
|
199
|
-
}), [n, d, h,
|
|
193
|
+
}), [n, d, h, a, o, g]);
|
|
200
194
|
}
|
|
201
|
-
function
|
|
195
|
+
function pe(t) {
|
|
202
196
|
t === void 0 && (t = {});
|
|
203
197
|
const {
|
|
204
198
|
nodeId: n
|
|
205
|
-
} = t,
|
|
199
|
+
} = t, c = le({
|
|
206
200
|
...t,
|
|
207
201
|
elements: {
|
|
208
202
|
reference: null,
|
|
209
203
|
floating: null,
|
|
210
204
|
...t.elements
|
|
211
205
|
}
|
|
212
|
-
}), e = t.rootContext ||
|
|
213
|
-
|
|
206
|
+
}), e = t.rootContext || c, o = e.elements, [i, a] = s.useState(null), [l, u] = s.useState(null), d = (o == null ? void 0 : o.domReference) || i, g = s.useRef(null), h = ie();
|
|
207
|
+
M(() => {
|
|
214
208
|
d && (g.current = d);
|
|
215
209
|
}, [d]);
|
|
216
|
-
const
|
|
210
|
+
const r = Z({
|
|
217
211
|
...t,
|
|
218
212
|
elements: {
|
|
219
|
-
...
|
|
220
|
-
...
|
|
221
|
-
reference:
|
|
213
|
+
...o,
|
|
214
|
+
...l && {
|
|
215
|
+
reference: l
|
|
222
216
|
}
|
|
223
217
|
}
|
|
224
|
-
}), p =
|
|
225
|
-
const m =
|
|
218
|
+
}), p = s.useCallback((f) => {
|
|
219
|
+
const m = P(f) ? {
|
|
226
220
|
getBoundingClientRect: () => f.getBoundingClientRect(),
|
|
227
221
|
contextElement: f
|
|
228
222
|
} : f;
|
|
229
|
-
|
|
230
|
-
}, [
|
|
231
|
-
(
|
|
223
|
+
u(m), r.refs.setReference(m);
|
|
224
|
+
}, [r.refs]), R = s.useCallback((f) => {
|
|
225
|
+
(P(f) || f === null) && (g.current = f, a(f)), (P(r.refs.reference.current) || r.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
232
226
|
// `null` to support `positionReference` + an unstable `reference`
|
|
233
227
|
// callback ref.
|
|
234
|
-
f !== null && !
|
|
235
|
-
}, [
|
|
236
|
-
...
|
|
228
|
+
f !== null && !P(f)) && r.refs.setReference(f);
|
|
229
|
+
}, [r.refs]), x = s.useMemo(() => ({
|
|
230
|
+
...r.refs,
|
|
237
231
|
setReference: R,
|
|
238
232
|
setPositionReference: p,
|
|
239
233
|
domReference: g
|
|
240
|
-
}), [
|
|
241
|
-
...
|
|
234
|
+
}), [r.refs, R, p]), C = s.useMemo(() => ({
|
|
235
|
+
...r.elements,
|
|
242
236
|
domReference: d
|
|
243
|
-
}), [
|
|
244
|
-
...
|
|
237
|
+
}), [r.elements, d]), E = s.useMemo(() => ({
|
|
238
|
+
...r,
|
|
245
239
|
...e,
|
|
246
240
|
refs: x,
|
|
247
|
-
elements:
|
|
241
|
+
elements: C,
|
|
248
242
|
nodeId: n
|
|
249
|
-
}), [
|
|
250
|
-
return
|
|
251
|
-
e.dataRef.current.floatingContext =
|
|
243
|
+
}), [r, x, C, n, e]);
|
|
244
|
+
return M(() => {
|
|
245
|
+
e.dataRef.current.floatingContext = E;
|
|
252
246
|
const f = h == null ? void 0 : h.nodesRef.current.find((m) => m.id === n);
|
|
253
|
-
f && (f.context =
|
|
254
|
-
}),
|
|
255
|
-
...
|
|
256
|
-
context:
|
|
247
|
+
f && (f.context = E);
|
|
248
|
+
}), s.useMemo(() => ({
|
|
249
|
+
...r,
|
|
250
|
+
context: E,
|
|
257
251
|
refs: x,
|
|
258
|
-
elements:
|
|
259
|
-
}), [
|
|
252
|
+
elements: C
|
|
253
|
+
}), [r, x, C, E]);
|
|
260
254
|
}
|
|
261
255
|
export {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
256
|
+
ge as FloatingArrow,
|
|
257
|
+
ve as arrow,
|
|
258
|
+
we as flip,
|
|
259
|
+
xe as getOverflowAncestors,
|
|
260
|
+
Ee as inline,
|
|
261
|
+
Se as offset,
|
|
262
|
+
Ie as shift,
|
|
263
|
+
pe as useFloating,
|
|
270
264
|
ce as useFloatingParentNodeId,
|
|
271
|
-
|
|
272
|
-
|
|
265
|
+
le as useFloatingRootContext,
|
|
266
|
+
ie as useFloatingTree,
|
|
273
267
|
B as useId
|
|
274
268
|
};
|
|
275
269
|
//# sourceMappingURL=annotorious-react.es13.js.map
|