@annotorious/react 3.3.6 → 3.4.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/annotorious-react.css +1 -1
- package/dist/annotorious-react.es12.js.map +1 -1
- package/dist/annotorious-react.es14.js +10 -6
- package/dist/annotorious-react.es14.js.map +1 -1
- package/dist/annotorious-react.es17.js.map +1 -1
- package/dist/annotorious-react.es23.js +159 -155
- package/dist/annotorious-react.es23.js.map +1 -1
- package/package.json +11 -11
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { evaluate as
|
|
2
|
-
function
|
|
1
|
+
import { evaluate as X, rectToClientRect as I, getPaddingObject as W, getSide as Y, getSideAxis as F, getOppositePlacement as U, getExpandedPlacements as Z, getOppositeAxisPlacements as tt, getAlignmentSides as et, clamp as z, min as $, max as H, getAlignment as _, getOppositeAxis as nt, getAlignmentAxis as G, getAxisLength as J } from "./annotorious-react.es22.js";
|
|
2
|
+
function q(o, c, l) {
|
|
3
3
|
let {
|
|
4
4
|
reference: e,
|
|
5
5
|
floating: s
|
|
6
6
|
} = o;
|
|
7
|
-
const t =
|
|
8
|
-
let
|
|
7
|
+
const t = F(c), a = G(c), r = J(a), d = Y(c), g = t === "y", u = e.x + e.width / 2 - s.width / 2, n = e.y + e.height / 2 - s.height / 2, m = e[r] / 2 - s[r] / 2;
|
|
8
|
+
let i;
|
|
9
9
|
switch (d) {
|
|
10
10
|
case "top":
|
|
11
|
-
|
|
11
|
+
i = {
|
|
12
12
|
x: u,
|
|
13
13
|
y: e.y - s.height
|
|
14
14
|
};
|
|
15
15
|
break;
|
|
16
16
|
case "bottom":
|
|
17
|
-
|
|
17
|
+
i = {
|
|
18
18
|
x: u,
|
|
19
19
|
y: e.y + e.height
|
|
20
20
|
};
|
|
21
21
|
break;
|
|
22
22
|
case "right":
|
|
23
|
-
|
|
23
|
+
i = {
|
|
24
24
|
x: e.x + e.width,
|
|
25
|
-
y:
|
|
25
|
+
y: n
|
|
26
26
|
};
|
|
27
27
|
break;
|
|
28
28
|
case "left":
|
|
29
|
-
|
|
29
|
+
i = {
|
|
30
30
|
x: e.x - s.width,
|
|
31
|
-
y:
|
|
31
|
+
y: n
|
|
32
32
|
};
|
|
33
33
|
break;
|
|
34
34
|
default:
|
|
35
|
-
|
|
35
|
+
i = {
|
|
36
36
|
x: e.x,
|
|
37
37
|
y: e.y
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
switch (
|
|
40
|
+
switch (_(c)) {
|
|
41
41
|
case "start":
|
|
42
|
-
|
|
42
|
+
i[a] -= m * (l && g ? -1 : 1);
|
|
43
43
|
break;
|
|
44
44
|
case "end":
|
|
45
|
-
|
|
45
|
+
i[a] += m * (l && g ? -1 : 1);
|
|
46
46
|
break;
|
|
47
47
|
}
|
|
48
|
-
return
|
|
48
|
+
return i;
|
|
49
49
|
}
|
|
50
|
-
const
|
|
50
|
+
const ct = async (o, c, l) => {
|
|
51
51
|
const {
|
|
52
52
|
placement: e = "bottom",
|
|
53
53
|
strategy: s = "absolute",
|
|
@@ -60,24 +60,24 @@ const st = async (o, c, l) => {
|
|
|
60
60
|
strategy: s
|
|
61
61
|
}), {
|
|
62
62
|
x: u,
|
|
63
|
-
y:
|
|
64
|
-
} =
|
|
63
|
+
y: n
|
|
64
|
+
} = q(g, e, d), m = e, i = {}, f = 0;
|
|
65
65
|
for (let h = 0; h < r.length; h++) {
|
|
66
66
|
const {
|
|
67
67
|
name: x,
|
|
68
|
-
fn:
|
|
68
|
+
fn: y
|
|
69
69
|
} = r[h], {
|
|
70
|
-
x:
|
|
71
|
-
y,
|
|
72
|
-
data:
|
|
70
|
+
x: v,
|
|
71
|
+
y: A,
|
|
72
|
+
data: b,
|
|
73
73
|
reset: p
|
|
74
|
-
} = await
|
|
74
|
+
} = await y({
|
|
75
75
|
x: u,
|
|
76
|
-
y:
|
|
76
|
+
y: n,
|
|
77
77
|
initialPlacement: e,
|
|
78
78
|
placement: m,
|
|
79
79
|
strategy: s,
|
|
80
|
-
middlewareData:
|
|
80
|
+
middlewareData: i,
|
|
81
81
|
rects: g,
|
|
82
82
|
platform: a,
|
|
83
83
|
elements: {
|
|
@@ -85,11 +85,11 @@ const st = async (o, c, l) => {
|
|
|
85
85
|
floating: c
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
|
-
u =
|
|
89
|
-
...
|
|
88
|
+
u = v ?? u, n = A ?? n, i = {
|
|
89
|
+
...i,
|
|
90
90
|
[x]: {
|
|
91
|
-
...
|
|
92
|
-
...
|
|
91
|
+
...i[x],
|
|
92
|
+
...b
|
|
93
93
|
}
|
|
94
94
|
}, p && f <= 50 && (f++, typeof p == "object" && (p.placement && (m = p.placement), p.rects && (g = p.rects === !0 ? await a.getElementRects({
|
|
95
95
|
reference: o,
|
|
@@ -97,18 +97,18 @@ const st = async (o, c, l) => {
|
|
|
97
97
|
strategy: s
|
|
98
98
|
}) : p.rects), {
|
|
99
99
|
x: u,
|
|
100
|
-
y:
|
|
101
|
-
} =
|
|
100
|
+
y: n
|
|
101
|
+
} = q(g, m, d)), h = -1);
|
|
102
102
|
}
|
|
103
103
|
return {
|
|
104
104
|
x: u,
|
|
105
|
-
y:
|
|
105
|
+
y: n,
|
|
106
106
|
placement: m,
|
|
107
107
|
strategy: s,
|
|
108
|
-
middlewareData:
|
|
108
|
+
middlewareData: i
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
|
-
async function
|
|
111
|
+
async function K(o, c) {
|
|
112
112
|
var l;
|
|
113
113
|
c === void 0 && (c = {});
|
|
114
114
|
const {
|
|
@@ -121,39 +121,39 @@ async function J(o, c) {
|
|
|
121
121
|
} = o, {
|
|
122
122
|
boundary: g = "clippingAncestors",
|
|
123
123
|
rootBoundary: u = "viewport",
|
|
124
|
-
elementContext:
|
|
124
|
+
elementContext: n = "floating",
|
|
125
125
|
altBoundary: m = !1,
|
|
126
|
-
padding:
|
|
127
|
-
} =
|
|
126
|
+
padding: i = 0
|
|
127
|
+
} = X(c, o), f = W(i), x = r[m ? n === "floating" ? "reference" : "floating" : n], y = I(await t.getClippingRect({
|
|
128
128
|
element: (l = await (t.isElement == null ? void 0 : t.isElement(x))) == null || l ? x : x.contextElement || await (t.getDocumentElement == null ? void 0 : t.getDocumentElement(r.floating)),
|
|
129
129
|
boundary: g,
|
|
130
130
|
rootBoundary: u,
|
|
131
131
|
strategy: d
|
|
132
|
-
})),
|
|
132
|
+
})), v = n === "floating" ? {
|
|
133
133
|
x: e,
|
|
134
134
|
y: s,
|
|
135
135
|
width: a.floating.width,
|
|
136
136
|
height: a.floating.height
|
|
137
|
-
} : a.reference,
|
|
137
|
+
} : a.reference, A = await (t.getOffsetParent == null ? void 0 : t.getOffsetParent(r.floating)), b = await (t.isElement == null ? void 0 : t.isElement(A)) ? await (t.getScale == null ? void 0 : t.getScale(A)) || {
|
|
138
138
|
x: 1,
|
|
139
139
|
y: 1
|
|
140
140
|
} : {
|
|
141
141
|
x: 1,
|
|
142
142
|
y: 1
|
|
143
|
-
}, p =
|
|
143
|
+
}, p = I(t.convertOffsetParentRelativeRectToViewportRelativeRect ? await t.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
144
144
|
elements: r,
|
|
145
|
-
rect:
|
|
146
|
-
offsetParent:
|
|
145
|
+
rect: v,
|
|
146
|
+
offsetParent: A,
|
|
147
147
|
strategy: d
|
|
148
|
-
}) :
|
|
148
|
+
}) : v);
|
|
149
149
|
return {
|
|
150
|
-
top: (
|
|
151
|
-
bottom: (p.bottom -
|
|
152
|
-
left: (
|
|
153
|
-
right: (p.right -
|
|
150
|
+
top: (y.top - p.top + f.top) / b.y,
|
|
151
|
+
bottom: (p.bottom - y.bottom + f.bottom) / b.y,
|
|
152
|
+
left: (y.left - p.left + f.left) / b.x,
|
|
153
|
+
right: (p.right - y.right + f.right) / b.x
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const lt = (o) => ({
|
|
157
157
|
name: "arrow",
|
|
158
158
|
options: o,
|
|
159
159
|
async fn(c) {
|
|
@@ -168,29 +168,29 @@ const ct = (o) => ({
|
|
|
168
168
|
} = c, {
|
|
169
169
|
element: g,
|
|
170
170
|
padding: u = 0
|
|
171
|
-
} =
|
|
171
|
+
} = X(o, c) || {};
|
|
172
172
|
if (g == null)
|
|
173
173
|
return {};
|
|
174
|
-
const
|
|
174
|
+
const n = W(u), m = {
|
|
175
175
|
x: l,
|
|
176
176
|
y: e
|
|
177
|
-
},
|
|
178
|
-
let k = C ? C[
|
|
179
|
-
(!k || !await (a.isElement == null ? void 0 : a.isElement(C))) && (k = r.floating[
|
|
180
|
-
const j =
|
|
177
|
+
}, i = G(s), f = J(i), h = await a.getDimensions(g), x = i === "y", y = x ? "top" : "left", v = x ? "bottom" : "right", A = x ? "clientHeight" : "clientWidth", b = t.reference[f] + t.reference[i] - m[i] - t.floating[f], p = m[i] - t.reference[i], C = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(g));
|
|
178
|
+
let k = C ? C[A] : 0;
|
|
179
|
+
(!k || !await (a.isElement == null ? void 0 : a.isElement(C))) && (k = r.floating[A] || t.floating[f]);
|
|
180
|
+
const j = b / 2 - p / 2, L = k / 2 - h[f] / 2 - 1, w = $(n[y], L), B = $(n[v], L), S = w, M = k - h[f] - B, P = k / 2 - h[f] / 2 + j, R = z(S, P, M), E = !d.arrow && _(s) != null && P !== R && t.reference[f] / 2 - (P < S ? w : B) - h[f] / 2 < 0, O = E ? P < S ? P - S : P - M : 0;
|
|
181
181
|
return {
|
|
182
|
-
[
|
|
182
|
+
[i]: m[i] + O,
|
|
183
183
|
data: {
|
|
184
|
-
[
|
|
185
|
-
centerOffset:
|
|
186
|
-
...
|
|
184
|
+
[i]: R,
|
|
185
|
+
centerOffset: P - R - O,
|
|
186
|
+
...E && {
|
|
187
187
|
alignmentOffset: O
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
|
-
reset:
|
|
190
|
+
reset: E
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
}),
|
|
193
|
+
}), at = function(o) {
|
|
194
194
|
return o === void 0 && (o = {}), {
|
|
195
195
|
name: "flip",
|
|
196
196
|
options: o,
|
|
@@ -205,64 +205,68 @@ const ct = (o) => ({
|
|
|
205
205
|
elements: g
|
|
206
206
|
} = c, {
|
|
207
207
|
mainAxis: u = !0,
|
|
208
|
-
crossAxis:
|
|
208
|
+
crossAxis: n = !0,
|
|
209
209
|
fallbackPlacements: m,
|
|
210
|
-
fallbackStrategy:
|
|
210
|
+
fallbackStrategy: i = "bestFit",
|
|
211
211
|
fallbackAxisSideDirection: f = "none",
|
|
212
212
|
flipAlignment: h = !0,
|
|
213
213
|
...x
|
|
214
|
-
} =
|
|
214
|
+
} = X(o, c);
|
|
215
215
|
if ((l = t.arrow) != null && l.alignmentOffset)
|
|
216
216
|
return {};
|
|
217
|
-
const
|
|
218
|
-
!m && C && p.push(...
|
|
219
|
-
const k = [r, ...p], j = await
|
|
220
|
-
let
|
|
221
|
-
if (u &&
|
|
222
|
-
const
|
|
223
|
-
|
|
217
|
+
const y = Y(s), v = F(r), A = Y(r) === r, b = await (d.isRTL == null ? void 0 : d.isRTL(g.floating)), p = m || (A || !h ? [U(r)] : Z(r)), C = f !== "none";
|
|
218
|
+
!m && C && p.push(...tt(r, h, f, b));
|
|
219
|
+
const k = [r, ...p], j = await K(c, x), L = [];
|
|
220
|
+
let w = ((e = t.flip) == null ? void 0 : e.overflows) || [];
|
|
221
|
+
if (u && L.push(j[y]), n) {
|
|
222
|
+
const R = et(s, a, b);
|
|
223
|
+
L.push(j[R[0]], j[R[1]]);
|
|
224
224
|
}
|
|
225
|
-
if (
|
|
225
|
+
if (w = [...w, {
|
|
226
226
|
placement: s,
|
|
227
|
-
overflows:
|
|
228
|
-
}], !
|
|
229
|
-
var
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
227
|
+
overflows: L
|
|
228
|
+
}], !L.every((R) => R <= 0)) {
|
|
229
|
+
var B, S;
|
|
230
|
+
const R = (((B = t.flip) == null ? void 0 : B.index) || 0) + 1, E = k[R];
|
|
231
|
+
if (E) {
|
|
232
|
+
var M;
|
|
233
|
+
const D = n === "alignment" ? v !== F(E) : !1, T = ((M = w[0]) == null ? void 0 : M.overflows[0]) > 0;
|
|
234
|
+
if (!D || T)
|
|
235
|
+
return {
|
|
236
|
+
data: {
|
|
237
|
+
index: R,
|
|
238
|
+
overflows: w
|
|
239
|
+
},
|
|
240
|
+
reset: {
|
|
241
|
+
placement: E
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
let O = (S = w.filter((D) => D.overflows[0] <= 0).sort((D, T) => D.overflows[1] - T.overflows[1])[0]) == null ? void 0 : S.placement;
|
|
246
|
+
if (!O)
|
|
247
|
+
switch (i) {
|
|
244
248
|
case "bestFit": {
|
|
245
|
-
var
|
|
246
|
-
const
|
|
249
|
+
var P;
|
|
250
|
+
const D = (P = w.filter((T) => {
|
|
247
251
|
if (C) {
|
|
248
|
-
const V =
|
|
249
|
-
return V ===
|
|
252
|
+
const V = F(T.placement);
|
|
253
|
+
return V === v || // Create a bias to the `y` side axis due to horizontal
|
|
250
254
|
// reading directions favoring greater width.
|
|
251
255
|
V === "y";
|
|
252
256
|
}
|
|
253
257
|
return !0;
|
|
254
|
-
}).map((
|
|
255
|
-
|
|
258
|
+
}).map((T) => [T.placement, T.overflows.filter((V) => V > 0).reduce((V, Q) => V + Q, 0)]).sort((T, V) => T[1] - V[1])[0]) == null ? void 0 : P[0];
|
|
259
|
+
D && (O = D);
|
|
256
260
|
break;
|
|
257
261
|
}
|
|
258
262
|
case "initialPlacement":
|
|
259
|
-
|
|
263
|
+
O = r;
|
|
260
264
|
break;
|
|
261
265
|
}
|
|
262
|
-
if (s !==
|
|
266
|
+
if (s !== O)
|
|
263
267
|
return {
|
|
264
268
|
reset: {
|
|
265
|
-
placement:
|
|
269
|
+
placement: O
|
|
266
270
|
}
|
|
267
271
|
};
|
|
268
272
|
}
|
|
@@ -270,8 +274,8 @@ const ct = (o) => ({
|
|
|
270
274
|
}
|
|
271
275
|
};
|
|
272
276
|
};
|
|
273
|
-
function
|
|
274
|
-
const c =
|
|
277
|
+
function N(o) {
|
|
278
|
+
const c = $(...o.map((t) => t.left)), l = $(...o.map((t) => t.top)), e = H(...o.map((t) => t.right)), s = H(...o.map((t) => t.bottom));
|
|
275
279
|
return {
|
|
276
280
|
x: c,
|
|
277
281
|
y: l,
|
|
@@ -279,16 +283,16 @@ function K(o) {
|
|
|
279
283
|
height: s - l
|
|
280
284
|
};
|
|
281
285
|
}
|
|
282
|
-
function
|
|
286
|
+
function it(o) {
|
|
283
287
|
const c = o.slice().sort((s, t) => s.y - t.y), l = [];
|
|
284
288
|
let e = null;
|
|
285
289
|
for (let s = 0; s < c.length; s++) {
|
|
286
290
|
const t = c[s];
|
|
287
291
|
!e || t.y - e.y > e.height / 2 ? l.push([t]) : l[l.length - 1].push(t), e = t;
|
|
288
292
|
}
|
|
289
|
-
return l.map((s) =>
|
|
293
|
+
return l.map((s) => I(N(s)));
|
|
290
294
|
}
|
|
291
|
-
const
|
|
295
|
+
const rt = function(o) {
|
|
292
296
|
return o === void 0 && (o = {}), {
|
|
293
297
|
name: "inline",
|
|
294
298
|
options: o,
|
|
@@ -303,34 +307,34 @@ const at = function(o) {
|
|
|
303
307
|
padding: r = 2,
|
|
304
308
|
x: d,
|
|
305
309
|
y: g
|
|
306
|
-
} =
|
|
310
|
+
} = X(o, c), u = Array.from(await (t.getClientRects == null ? void 0 : t.getClientRects(e.reference)) || []), n = it(u), m = I(N(u)), i = W(r);
|
|
307
311
|
function f() {
|
|
308
|
-
if (
|
|
309
|
-
return
|
|
310
|
-
if (
|
|
311
|
-
if (
|
|
312
|
-
const
|
|
312
|
+
if (n.length === 2 && n[0].left > n[1].right && d != null && g != null)
|
|
313
|
+
return n.find((x) => d > x.left - i.left && d < x.right + i.right && g > x.top - i.top && g < x.bottom + i.bottom) || m;
|
|
314
|
+
if (n.length >= 2) {
|
|
315
|
+
if (F(l) === "y") {
|
|
316
|
+
const w = n[0], B = n[n.length - 1], S = Y(l) === "top", M = w.top, P = B.bottom, R = S ? w.left : B.left, E = S ? w.right : B.right, O = E - R, D = P - M;
|
|
313
317
|
return {
|
|
314
|
-
top:
|
|
315
|
-
bottom:
|
|
316
|
-
left:
|
|
317
|
-
right:
|
|
318
|
+
top: M,
|
|
319
|
+
bottom: P,
|
|
320
|
+
left: R,
|
|
321
|
+
right: E,
|
|
318
322
|
width: O,
|
|
319
|
-
height:
|
|
320
|
-
x:
|
|
321
|
-
y:
|
|
323
|
+
height: D,
|
|
324
|
+
x: R,
|
|
325
|
+
y: M
|
|
322
326
|
};
|
|
323
327
|
}
|
|
324
|
-
const x =
|
|
328
|
+
const x = Y(l) === "left", y = H(...n.map((w) => w.right)), v = $(...n.map((w) => w.left)), A = n.filter((w) => x ? w.left === v : w.right === y), b = A[0].top, p = A[A.length - 1].bottom, C = v, k = y, j = k - C, L = p - b;
|
|
325
329
|
return {
|
|
326
|
-
top:
|
|
330
|
+
top: b,
|
|
327
331
|
bottom: p,
|
|
328
332
|
left: C,
|
|
329
333
|
right: k,
|
|
330
334
|
width: j,
|
|
331
|
-
height:
|
|
335
|
+
height: L,
|
|
332
336
|
x: C,
|
|
333
|
-
y:
|
|
337
|
+
y: b
|
|
334
338
|
};
|
|
335
339
|
}
|
|
336
340
|
return m;
|
|
@@ -350,34 +354,34 @@ const at = function(o) {
|
|
|
350
354
|
}
|
|
351
355
|
};
|
|
352
356
|
};
|
|
353
|
-
async function
|
|
357
|
+
async function ot(o, c) {
|
|
354
358
|
const {
|
|
355
359
|
placement: l,
|
|
356
360
|
platform: e,
|
|
357
361
|
elements: s
|
|
358
|
-
} = o, t = await (e.isRTL == null ? void 0 : e.isRTL(s.floating)), a =
|
|
362
|
+
} = o, t = await (e.isRTL == null ? void 0 : e.isRTL(s.floating)), a = Y(l), r = _(l), d = F(l) === "y", g = ["left", "top"].includes(a) ? -1 : 1, u = t && d ? -1 : 1, n = X(c, o);
|
|
359
363
|
let {
|
|
360
364
|
mainAxis: m,
|
|
361
|
-
crossAxis:
|
|
365
|
+
crossAxis: i,
|
|
362
366
|
alignmentAxis: f
|
|
363
|
-
} = typeof
|
|
364
|
-
mainAxis:
|
|
367
|
+
} = typeof n == "number" ? {
|
|
368
|
+
mainAxis: n,
|
|
365
369
|
crossAxis: 0,
|
|
366
370
|
alignmentAxis: null
|
|
367
371
|
} : {
|
|
368
|
-
mainAxis:
|
|
369
|
-
crossAxis:
|
|
370
|
-
alignmentAxis:
|
|
372
|
+
mainAxis: n.mainAxis || 0,
|
|
373
|
+
crossAxis: n.crossAxis || 0,
|
|
374
|
+
alignmentAxis: n.alignmentAxis
|
|
371
375
|
};
|
|
372
|
-
return r && typeof f == "number" && (
|
|
373
|
-
x:
|
|
376
|
+
return r && typeof f == "number" && (i = r === "end" ? f * -1 : f), d ? {
|
|
377
|
+
x: i * u,
|
|
374
378
|
y: m * g
|
|
375
379
|
} : {
|
|
376
380
|
x: m * g,
|
|
377
|
-
y:
|
|
381
|
+
y: i * u
|
|
378
382
|
};
|
|
379
383
|
}
|
|
380
|
-
const
|
|
384
|
+
const ft = function(o) {
|
|
381
385
|
return o === void 0 && (o = 0), {
|
|
382
386
|
name: "offset",
|
|
383
387
|
options: o,
|
|
@@ -388,7 +392,7 @@ const rt = function(o) {
|
|
|
388
392
|
y: t,
|
|
389
393
|
placement: a,
|
|
390
394
|
middlewareData: r
|
|
391
|
-
} = c, d = await
|
|
395
|
+
} = c, d = await ot(c, o);
|
|
392
396
|
return a === ((l = r.offset) == null ? void 0 : l.placement) && (e = r.arrow) != null && e.alignmentOffset ? {} : {
|
|
393
397
|
x: s + d.x,
|
|
394
398
|
y: t + d.y,
|
|
@@ -399,7 +403,7 @@ const rt = function(o) {
|
|
|
399
403
|
};
|
|
400
404
|
}
|
|
401
405
|
};
|
|
402
|
-
},
|
|
406
|
+
}, mt = function(o) {
|
|
403
407
|
return o === void 0 && (o = {}), {
|
|
404
408
|
name: "shift",
|
|
405
409
|
options: o,
|
|
@@ -414,33 +418,33 @@ const rt = function(o) {
|
|
|
414
418
|
limiter: r = {
|
|
415
419
|
fn: (x) => {
|
|
416
420
|
let {
|
|
417
|
-
x:
|
|
418
|
-
y:
|
|
421
|
+
x: y,
|
|
422
|
+
y: v
|
|
419
423
|
} = x;
|
|
420
424
|
return {
|
|
421
|
-
x:
|
|
422
|
-
y:
|
|
425
|
+
x: y,
|
|
426
|
+
y: v
|
|
423
427
|
};
|
|
424
428
|
}
|
|
425
429
|
},
|
|
426
430
|
...d
|
|
427
|
-
} =
|
|
431
|
+
} = X(o, c), g = {
|
|
428
432
|
x: l,
|
|
429
433
|
y: e
|
|
430
|
-
}, u = await
|
|
431
|
-
let
|
|
434
|
+
}, u = await K(c, d), n = F(Y(s)), m = nt(n);
|
|
435
|
+
let i = g[m], f = g[n];
|
|
432
436
|
if (t) {
|
|
433
|
-
const x = m === "y" ? "top" : "left",
|
|
434
|
-
|
|
437
|
+
const x = m === "y" ? "top" : "left", y = m === "y" ? "bottom" : "right", v = i + u[x], A = i - u[y];
|
|
438
|
+
i = z(v, i, A);
|
|
435
439
|
}
|
|
436
440
|
if (a) {
|
|
437
|
-
const x =
|
|
438
|
-
f =
|
|
441
|
+
const x = n === "y" ? "top" : "left", y = n === "y" ? "bottom" : "right", v = f + u[x], A = f - u[y];
|
|
442
|
+
f = z(v, f, A);
|
|
439
443
|
}
|
|
440
444
|
const h = r.fn({
|
|
441
445
|
...c,
|
|
442
|
-
[m]:
|
|
443
|
-
[
|
|
446
|
+
[m]: i,
|
|
447
|
+
[n]: f
|
|
444
448
|
});
|
|
445
449
|
return {
|
|
446
450
|
...h,
|
|
@@ -449,7 +453,7 @@ const rt = function(o) {
|
|
|
449
453
|
y: h.y - e,
|
|
450
454
|
enabled: {
|
|
451
455
|
[m]: t,
|
|
452
|
-
[
|
|
456
|
+
[n]: a
|
|
453
457
|
}
|
|
454
458
|
}
|
|
455
459
|
};
|
|
@@ -457,13 +461,13 @@ const rt = function(o) {
|
|
|
457
461
|
};
|
|
458
462
|
};
|
|
459
463
|
export {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
464
|
+
lt as arrow,
|
|
465
|
+
ct as computePosition,
|
|
466
|
+
K as detectOverflow,
|
|
467
|
+
at as flip,
|
|
468
|
+
rt as inline,
|
|
469
|
+
ft as offset,
|
|
470
|
+
I as rectToClientRect,
|
|
471
|
+
mt as shift
|
|
468
472
|
};
|
|
469
473
|
//# sourceMappingURL=annotorious-react.es23.js.map
|