@vue-dnd-kit/core 2.0.12 → 2.1.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.
|
@@ -1,125 +1,125 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".dnd-kit-default-overlay{transform:translate3d(var(--position-x),var(--position-y),0)}.dnd-kit-overlay-container{position:fixed;top:0;left:0;pointer-events:none;cursor:grabbing;z-index:9999}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { ref as
|
|
3
|
-
const
|
|
2
|
+
import { ref as q, watch as ne, shallowRef as J, reactive as U, computed as b, onScopeDispose as qe, onMounted as V, onBeforeUnmount as Y, inject as Pe, defineComponent as Be, unref as N, openBlock as L, createElementBlock as W, normalizeStyle as Le, Fragment as me, renderList as We, createBlock as Q, resolveDynamicComponent as he, createCommentVNode as je, useTemplateRef as Je, provide as Qe, renderSlot as Ie, Teleport as et, createElementVNode as tt, mergeProps as nt } from "vue";
|
|
3
|
+
const k = {
|
|
4
4
|
SELECT_AREA: "data-dnd-kit-select-area",
|
|
5
5
|
DRAGGABLE: "data-dnd-kit-draggable",
|
|
6
6
|
DROPPABLE: "data-dnd-kit-droppable",
|
|
7
7
|
CONSTRAINT_AREA: "data-dnd-kit-constraint-area"
|
|
8
|
-
},
|
|
9
|
-
SELECT_AREA: `[${
|
|
10
|
-
DRAGGABLE: `[${
|
|
11
|
-
CONSTRAINT_AREA: `[${
|
|
12
|
-
}, Ae = "VueDnDKitProvider",
|
|
13
|
-
const
|
|
8
|
+
}, z = {
|
|
9
|
+
SELECT_AREA: `[${k.SELECT_AREA}]`,
|
|
10
|
+
DRAGGABLE: `[${k.DRAGGABLE}]`,
|
|
11
|
+
CONSTRAINT_AREA: `[${k.CONSTRAINT_AREA}]`
|
|
12
|
+
}, Ae = "VueDnDKitProvider", Ce = (e, t, n, s) => {
|
|
13
|
+
const a = /* @__PURE__ */ new Set();
|
|
14
14
|
return t.forEach((i) => {
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
17
|
-
const g =
|
|
15
|
+
const o = e.get(i), r = s ? s(i) : o?.disabled;
|
|
16
|
+
if (!o || r) return;
|
|
17
|
+
const g = o.modifier?.keys, c = o.modifier?.method;
|
|
18
18
|
if (!g || !c || g.length === 0) {
|
|
19
|
-
|
|
19
|
+
a.add(i);
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
g[c]((l) =>
|
|
23
|
-
}),
|
|
22
|
+
g[c]((l) => n.value.has(l)) && a.add(i);
|
|
23
|
+
}), a;
|
|
24
24
|
};
|
|
25
|
-
let
|
|
26
|
-
const
|
|
25
|
+
let Oe = "", st = "", at = "";
|
|
26
|
+
const S = (e) => e.value ? e.value instanceof HTMLElement ? e.value : e.value.$el : null, X = (e, t) => e !== t && e.contains(t), ot = (e, t) => !(e.right < t.left || e.left > t.right || e.bottom < t.top || e.top > t.bottom), be = () => {
|
|
27
27
|
const e = document.body;
|
|
28
|
-
|
|
29
|
-
},
|
|
28
|
+
Oe = e.style.userSelect, e.style.userSelect = "none", window.addEventListener("contextmenu", D), window.addEventListener("selectstart", D), window.addEventListener("touchstart", D), window.addEventListener("touchmove", D);
|
|
29
|
+
}, ye = () => {
|
|
30
30
|
const e = document.body;
|
|
31
|
-
e.style.userSelect =
|
|
32
|
-
},
|
|
31
|
+
e.style.userSelect = Oe, e.style.touchAction = st, e.style.overscrollBehavior = at, window.removeEventListener("contextmenu", D), window.removeEventListener("selectstart", D), window.removeEventListener("touchstart", D), window.removeEventListener("touchmove", D);
|
|
32
|
+
}, D = (e) => e.preventDefault(), xe = (e, t) => {
|
|
33
33
|
if (t.entities.draggableMap.get(e)?.disabled) return !0;
|
|
34
|
-
for (const
|
|
35
|
-
if (t.entities.draggableMap.get(
|
|
34
|
+
for (const s of t.entities.visibleDraggableSet)
|
|
35
|
+
if (t.entities.draggableMap.get(s)?.disabled && X(s, e)) return !0;
|
|
36
36
|
return !1;
|
|
37
|
-
},
|
|
37
|
+
}, F = (e, t) => {
|
|
38
38
|
if (t.entities.droppableMap.get(e)?.disabled) return !0;
|
|
39
|
-
for (const
|
|
40
|
-
if (t.entities.droppableMap.get(
|
|
39
|
+
for (const s of t.entities.visibleDroppableSet)
|
|
40
|
+
if (t.entities.droppableMap.get(s)?.disabled && X(s, e)) return !0;
|
|
41
41
|
return !1;
|
|
42
|
-
},
|
|
42
|
+
}, se = (e, t) => {
|
|
43
43
|
if (!e.length || !t.length) return !0;
|
|
44
|
-
const
|
|
45
|
-
return e.some((
|
|
44
|
+
const n = new Set(t);
|
|
45
|
+
return e.some((s) => n.has(s));
|
|
46
46
|
};
|
|
47
|
-
function
|
|
48
|
-
const
|
|
49
|
-
for (const
|
|
50
|
-
const r =
|
|
51
|
-
|
|
47
|
+
function it(e, t, n, s) {
|
|
48
|
+
const a = [];
|
|
49
|
+
for (const o of t.keys()) {
|
|
50
|
+
const r = n.get(o);
|
|
51
|
+
a.push({ groups: r?.groups ?? [] });
|
|
52
52
|
}
|
|
53
53
|
const i = /* @__PURE__ */ new Set();
|
|
54
|
-
for (const
|
|
55
|
-
const r =
|
|
56
|
-
(!
|
|
54
|
+
for (const o of e) {
|
|
55
|
+
const r = s.get(o), g = r?.groups ?? [], c = r?.groupMatch ?? "every";
|
|
56
|
+
(!a.length || a[c]((l) => se(l.groups, g))) && i.add(o);
|
|
57
57
|
}
|
|
58
58
|
return i;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
const
|
|
62
|
-
for (const
|
|
63
|
-
const r =
|
|
64
|
-
for (const g of r?.groups ?? [])
|
|
60
|
+
function rt(e, t, n) {
|
|
61
|
+
const s = /* @__PURE__ */ new Set();
|
|
62
|
+
for (const o of t.keys()) {
|
|
63
|
+
const r = n.get(o);
|
|
64
|
+
for (const g of r?.groups ?? []) s.add(g);
|
|
65
65
|
}
|
|
66
|
-
const
|
|
67
|
-
for (const
|
|
68
|
-
const g =
|
|
69
|
-
|
|
66
|
+
const a = [...s], i = /* @__PURE__ */ new Set();
|
|
67
|
+
for (const o of e) {
|
|
68
|
+
const g = n.get(o)?.groups ?? [];
|
|
69
|
+
se(a, g) && i.add(o);
|
|
70
70
|
}
|
|
71
71
|
return i;
|
|
72
72
|
}
|
|
73
|
-
const
|
|
74
|
-
const t = new IntersectionObserver((
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
e[
|
|
73
|
+
const re = (e) => {
|
|
74
|
+
const t = new IntersectionObserver((n) => {
|
|
75
|
+
n.forEach((s) => {
|
|
76
|
+
const a = s.target;
|
|
77
|
+
e[s.isIntersecting ? "add" : "delete"](a);
|
|
78
78
|
});
|
|
79
79
|
});
|
|
80
80
|
return {
|
|
81
|
-
observe: (
|
|
82
|
-
unobserve: (
|
|
81
|
+
observe: (n) => t.observe(n),
|
|
82
|
+
unobserve: (n) => t.unobserve(n),
|
|
83
83
|
disconnect: () => t.disconnect()
|
|
84
84
|
};
|
|
85
|
-
},
|
|
86
|
-
const t = new ResizeObserver((
|
|
87
|
-
const
|
|
88
|
-
if (!
|
|
89
|
-
const { width:
|
|
90
|
-
e.value = { width:
|
|
85
|
+
}, lt = (e) => {
|
|
86
|
+
const t = new ResizeObserver((n) => {
|
|
87
|
+
const s = n[0];
|
|
88
|
+
if (!s) return;
|
|
89
|
+
const { width: a, height: i } = s.contentRect;
|
|
90
|
+
e.value = { width: a, height: i };
|
|
91
91
|
});
|
|
92
92
|
return {
|
|
93
|
-
observe: (
|
|
94
|
-
unobserve: (
|
|
93
|
+
observe: (n) => t.observe(n),
|
|
94
|
+
unobserve: (n) => t.unobserve(n),
|
|
95
95
|
disconnect: () => t.disconnect()
|
|
96
96
|
};
|
|
97
|
-
},
|
|
98
|
-
const t =
|
|
97
|
+
}, ct = (e) => {
|
|
98
|
+
const t = q(null), n = lt(t), s = ne(
|
|
99
99
|
e,
|
|
100
100
|
(i) => {
|
|
101
|
-
|
|
101
|
+
n.disconnect(), i && n.observe(i);
|
|
102
102
|
},
|
|
103
103
|
{ immediate: !0 }
|
|
104
104
|
);
|
|
105
105
|
return { overlaySize: t, overlaySizeObserver: {
|
|
106
106
|
disconnect: () => {
|
|
107
|
-
|
|
107
|
+
s(), n.disconnect();
|
|
108
108
|
}
|
|
109
109
|
} };
|
|
110
110
|
};
|
|
111
|
-
function
|
|
111
|
+
function pe(e, t = 0, n = 0) {
|
|
112
112
|
return {
|
|
113
113
|
start: { x: e.clientX, y: e.clientY },
|
|
114
114
|
current: { x: e.clientX, y: e.clientY },
|
|
115
|
-
offset: { x: t, y:
|
|
115
|
+
offset: { x: t, y: n }
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
const
|
|
120
|
-
return { x:
|
|
118
|
+
function _e(e, t) {
|
|
119
|
+
const n = t.getBoundingClientRect(), s = n.width > 0 ? (e.clientX - n.left) / n.width : 0.5, a = n.height > 0 ? (e.clientY - n.top) / n.height : 0.5;
|
|
120
|
+
return { x: s, y: a };
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function ze(e, t) {
|
|
123
123
|
return {
|
|
124
124
|
...t,
|
|
125
125
|
initialHTML: e.innerHTML,
|
|
@@ -127,134 +127,134 @@ function Ge(e, t) {
|
|
|
127
127
|
initialOuterHTML: e.outerHTML
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
e.forEach((
|
|
132
|
-
const
|
|
133
|
-
|
|
130
|
+
function gt(e, t, n) {
|
|
131
|
+
e.forEach((s) => {
|
|
132
|
+
const a = t.get(s);
|
|
133
|
+
n.set(s, ze(s, a));
|
|
134
134
|
}), e.clear();
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
|
|
136
|
+
function ut(e, t, n) {
|
|
137
|
+
n.clear();
|
|
138
|
+
const s = t.get(e);
|
|
139
|
+
n.set(e, ze(e, s));
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
e.entities.initiatingDraggable && (e.state.value = "dragging",
|
|
141
|
+
function ee(e) {
|
|
142
|
+
e.entities.initiatingDraggable && (e.state.value = "dragging", ft(
|
|
143
143
|
e.entities.initiatingDraggable,
|
|
144
144
|
e.entities.selectedSet,
|
|
145
145
|
e.entities.draggableMap,
|
|
146
146
|
e.entities.draggingMap
|
|
147
147
|
));
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
t.has(e) ?
|
|
149
|
+
function ft(e, t, n, s) {
|
|
150
|
+
t.has(e) ? gt(t, n, s) : (t.clear(), ut(e, n, s));
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
if (
|
|
154
|
-
const
|
|
155
|
-
return
|
|
152
|
+
function Fe(e, t, n, s) {
|
|
153
|
+
if (s || !n) return !0;
|
|
154
|
+
const a = e.closest(n);
|
|
155
|
+
return a ? t.contains(a) : !1;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function dt(e, t) {
|
|
158
158
|
if (!e || !t) return 1;
|
|
159
|
-
const
|
|
159
|
+
const n = Math.abs(e.current.x - e.start.x), s = Math.abs(e.current.y - e.start.y);
|
|
160
160
|
if (typeof t == "number") {
|
|
161
|
-
const c = Math.sqrt(
|
|
161
|
+
const c = Math.sqrt(n * n + s * s);
|
|
162
162
|
return Math.min(c / t, 1);
|
|
163
163
|
}
|
|
164
164
|
const {
|
|
165
|
-
x:
|
|
165
|
+
x: a = 0,
|
|
166
166
|
y: i = 0,
|
|
167
|
-
condition:
|
|
167
|
+
condition: o = "any"
|
|
168
168
|
} = t;
|
|
169
|
-
if (
|
|
170
|
-
const r =
|
|
171
|
-
return
|
|
169
|
+
if (a === 0 && i === 0) return 1;
|
|
170
|
+
const r = a > 0 ? Math.min(n / a, 1) : 1, g = i > 0 ? Math.min(s / i, 1) : 1;
|
|
171
|
+
return o === "both" ? Math.min(r, g) : Math.max(r, g);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
if (!
|
|
175
|
-
const
|
|
176
|
-
return !
|
|
173
|
+
function He(e, t, n) {
|
|
174
|
+
if (!n) return !0;
|
|
175
|
+
const s = n.distance != null, a = n.delay != null;
|
|
176
|
+
return !s && !a ? !0 : s && !a ? e >= 1 : !s && a ? t >= 1 : (n.condition ?? "both") === "both" ? e >= 1 && t >= 1 : e >= 1 || t >= 1;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function mt(e) {
|
|
179
179
|
if (e.state.value !== "activating" || !e.entities.initiatingDraggable)
|
|
180
180
|
return !1;
|
|
181
181
|
const t = e.entities.draggableMap.get(
|
|
182
182
|
e.entities.initiatingDraggable
|
|
183
183
|
);
|
|
184
|
-
return
|
|
184
|
+
return He(
|
|
185
185
|
e.distanceProgress.value,
|
|
186
186
|
e.delay.progress,
|
|
187
187
|
t?.activation
|
|
188
|
-
) ? (
|
|
188
|
+
) ? (ee(e), !0) : !1;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
let
|
|
192
|
-
const
|
|
190
|
+
function ht(e, t) {
|
|
191
|
+
let n = null;
|
|
192
|
+
const s = () => {
|
|
193
193
|
if (e.state.value !== "activating" || !e.entities.initiatingDraggable) {
|
|
194
|
-
|
|
194
|
+
n = null;
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
|
-
const
|
|
197
|
+
const a = e.entities.draggableMap.get(
|
|
198
198
|
e.entities.initiatingDraggable
|
|
199
|
-
), i =
|
|
199
|
+
), i = a?.activation?.delay;
|
|
200
200
|
if (!i) {
|
|
201
|
-
|
|
201
|
+
n = null;
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
204
|
e.delay.progress = Math.min(
|
|
205
205
|
(Date.now() - e.delay.startTime) / (i * 1e3),
|
|
206
206
|
1
|
|
207
|
-
),
|
|
207
|
+
), He(
|
|
208
208
|
e.distanceProgress.value,
|
|
209
209
|
e.delay.progress,
|
|
210
|
-
|
|
211
|
-
) ? (t(),
|
|
210
|
+
a?.activation
|
|
211
|
+
) ? (t(), n = null) : n = requestAnimationFrame(s);
|
|
212
212
|
};
|
|
213
|
-
return
|
|
213
|
+
return n = requestAnimationFrame(s), {
|
|
214
214
|
cancel: () => {
|
|
215
|
-
|
|
215
|
+
n !== null && (cancelAnimationFrame(n), n = null);
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
const
|
|
221
|
-
|
|
219
|
+
function bt(e, t) {
|
|
220
|
+
const n = e.closest(
|
|
221
|
+
z.CONSTRAINT_AREA
|
|
222
222
|
);
|
|
223
|
-
return !
|
|
224
|
-
element:
|
|
225
|
-
entity: t.get(
|
|
223
|
+
return !n || !t.has(n) ? null : {
|
|
224
|
+
element: n,
|
|
225
|
+
entity: t.get(n)
|
|
226
226
|
};
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
return
|
|
228
|
+
function yt(e, t, n, s) {
|
|
229
|
+
return n === "x" ? { x: e, y: s.top } : n === "y" ? { x: s.left, y: t } : { x: e, y: t };
|
|
230
230
|
}
|
|
231
|
-
function
|
|
232
|
-
let i = e,
|
|
233
|
-
return
|
|
234
|
-
|
|
235
|
-
Math.min(
|
|
236
|
-
)),
|
|
237
|
-
|
|
238
|
-
Math.min(
|
|
239
|
-
)), { x: i, y:
|
|
231
|
+
function pt(e, t, n, s, a) {
|
|
232
|
+
let i = e, o = t;
|
|
233
|
+
return n !== "y" && (i = Math.max(
|
|
234
|
+
s.left,
|
|
235
|
+
Math.min(s.right - a.width, e)
|
|
236
|
+
)), n !== "x" && (o = Math.max(
|
|
237
|
+
s.top,
|
|
238
|
+
Math.min(s.bottom - a.height, t)
|
|
239
|
+
)), { x: i, y: o };
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function St(e, t, n, s, a) {
|
|
242
242
|
if (!e || !t)
|
|
243
243
|
return { x: 0, y: 0 };
|
|
244
|
-
const i = t.getBoundingClientRect(),
|
|
245
|
-
let g = e.current.x -
|
|
246
|
-
if (!
|
|
244
|
+
const i = t.getBoundingClientRect(), o = i.width || a?.width || 0, r = i.height || a?.height || 0;
|
|
245
|
+
let g = e.current.x - o * e.offset.x, c = e.current.y - r * e.offset.y;
|
|
246
|
+
if (!n)
|
|
247
247
|
return { x: g, y: c };
|
|
248
|
-
const u =
|
|
248
|
+
const u = bt(n, s);
|
|
249
249
|
if (!u)
|
|
250
250
|
return { x: g, y: c };
|
|
251
|
-
const { element: l, entity: f } = u, d = l.getBoundingClientRect(), m =
|
|
251
|
+
const { element: l, entity: f } = u, d = l.getBoundingClientRect(), m = n.getBoundingClientRect(), h = yt(
|
|
252
252
|
g,
|
|
253
253
|
c,
|
|
254
254
|
f.axis || "both",
|
|
255
255
|
m
|
|
256
256
|
);
|
|
257
|
-
return f.restrictToArea ?
|
|
257
|
+
return f.restrictToArea ? pt(
|
|
258
258
|
h.x,
|
|
259
259
|
h.y,
|
|
260
260
|
f.axis || "both",
|
|
@@ -278,10 +278,10 @@ const K = {
|
|
|
278
278
|
],
|
|
279
279
|
forMoveFaster: ["ShiftLeft", "ShiftRight"]
|
|
280
280
|
};
|
|
281
|
-
function
|
|
282
|
-
const
|
|
281
|
+
function Dt(e, t) {
|
|
282
|
+
const n = J(), s = q(), i = {
|
|
283
283
|
keys: {
|
|
284
|
-
pressedKeys:
|
|
284
|
+
pressedKeys: q(/* @__PURE__ */ new Set()),
|
|
285
285
|
forDrag: [...K.forDrag],
|
|
286
286
|
forCancel: [...K.forCancel],
|
|
287
287
|
forDrop: [...K.forDrop],
|
|
@@ -290,7 +290,7 @@ function vt(e, t) {
|
|
|
290
290
|
},
|
|
291
291
|
step: 8,
|
|
292
292
|
moveFaster: 4
|
|
293
|
-
},
|
|
293
|
+
}, o = U({
|
|
294
294
|
draggableMap: /* @__PURE__ */ new Map(),
|
|
295
295
|
droppableMap: /* @__PURE__ */ new Map(),
|
|
296
296
|
selectableAreaMap: /* @__PURE__ */ new Map(),
|
|
@@ -300,69 +300,69 @@ function vt(e, t) {
|
|
|
300
300
|
draggingMap: /* @__PURE__ */ new Map(),
|
|
301
301
|
selectedSet: /* @__PURE__ */ new Set(),
|
|
302
302
|
selectionBase: /* @__PURE__ */ new Set(),
|
|
303
|
-
allowedDroppableSet:
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
303
|
+
allowedDroppableSet: b(() => n.value ? it(
|
|
304
|
+
o.visibleDroppableSet,
|
|
305
|
+
o.draggingMap,
|
|
306
|
+
o.draggableMap,
|
|
307
|
+
o.droppableMap
|
|
308
308
|
) : /* @__PURE__ */ new Set()),
|
|
309
|
-
allowedDraggableSet:
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
309
|
+
allowedDraggableSet: b(() => n.value ? rt(
|
|
310
|
+
o.visibleDraggableSet,
|
|
311
|
+
o.draggingMap,
|
|
312
|
+
o.draggableMap
|
|
313
313
|
) : /* @__PURE__ */ new Set()),
|
|
314
|
-
modifiersSelectableAreaSet:
|
|
315
|
-
|
|
316
|
-
|
|
314
|
+
modifiersSelectableAreaSet: b(() => Ce(
|
|
315
|
+
o.selectableAreaMap,
|
|
316
|
+
o.visibleSelectableAreaSet,
|
|
317
317
|
i.keys.pressedKeys
|
|
318
318
|
)),
|
|
319
|
-
modifiersDraggableSet:
|
|
320
|
-
|
|
321
|
-
|
|
319
|
+
modifiersDraggableSet: b(() => Ce(
|
|
320
|
+
o.draggableMap,
|
|
321
|
+
o.visibleDraggableSet,
|
|
322
322
|
i.keys.pressedKeys,
|
|
323
|
-
(v) =>
|
|
323
|
+
(v) => xe(v, { entities: o })
|
|
324
324
|
)),
|
|
325
325
|
visibleDraggableSet: /* @__PURE__ */ new Set(),
|
|
326
326
|
visibleDroppableSet: /* @__PURE__ */ new Set(),
|
|
327
327
|
visibleSelectableAreaSet: /* @__PURE__ */ new Set()
|
|
328
|
-
}), r =
|
|
328
|
+
}), r = U({
|
|
329
329
|
draggable: /* @__PURE__ */ new Map(),
|
|
330
330
|
droppable: /* @__PURE__ */ new Map()
|
|
331
331
|
}), g = {
|
|
332
|
-
throttle:
|
|
333
|
-
}, c =
|
|
332
|
+
throttle: J(0)
|
|
333
|
+
}, c = U({
|
|
334
334
|
x: window.scrollX,
|
|
335
335
|
y: window.scrollY
|
|
336
|
-
}), u =
|
|
336
|
+
}), u = U({
|
|
337
337
|
progress: 0,
|
|
338
338
|
startTime: 0
|
|
339
|
-
}), l =
|
|
340
|
-
if (!
|
|
341
|
-
const v =
|
|
342
|
-
return v ?
|
|
343
|
-
}), f =
|
|
344
|
-
|
|
345
|
-
), d =
|
|
346
|
-
|
|
347
|
-
), m =
|
|
348
|
-
|
|
349
|
-
), { overlaySize: h, overlaySizeObserver:
|
|
350
|
-
const
|
|
351
|
-
return
|
|
352
|
-
|
|
339
|
+
}), l = b(() => {
|
|
340
|
+
if (!s.value || !o.initiatingDraggable) return 0;
|
|
341
|
+
const v = o.draggableMap.get(o.initiatingDraggable)?.activation?.distance;
|
|
342
|
+
return v ? dt(s.value, v) : 1;
|
|
343
|
+
}), f = re(
|
|
344
|
+
o.visibleDraggableSet
|
|
345
|
+
), d = re(
|
|
346
|
+
o.visibleDroppableSet
|
|
347
|
+
), m = re(
|
|
348
|
+
o.visibleSelectableAreaSet
|
|
349
|
+
), { overlaySize: h, overlaySizeObserver: w } = ct(e), y = q(), R = b(() => {
|
|
350
|
+
const p = o.initiatingDraggable;
|
|
351
|
+
return St(
|
|
352
|
+
s.value,
|
|
353
353
|
e.value,
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
p || null,
|
|
355
|
+
o.constraintsAreaMap,
|
|
356
356
|
h.value
|
|
357
357
|
);
|
|
358
|
-
}),
|
|
358
|
+
}), x = b({
|
|
359
359
|
get: () => t?.overlayTo,
|
|
360
|
-
set: (
|
|
361
|
-
}),
|
|
360
|
+
set: (p) => x.value = p
|
|
361
|
+
}), Z = b(() => t?.autoScrollViewport);
|
|
362
362
|
return {
|
|
363
|
-
state:
|
|
364
|
-
pointer:
|
|
365
|
-
entities:
|
|
363
|
+
state: n,
|
|
364
|
+
pointer: s,
|
|
365
|
+
entities: o,
|
|
366
366
|
keyboard: i,
|
|
367
367
|
scrollPosition: c,
|
|
368
368
|
delay: u,
|
|
@@ -371,40 +371,40 @@ function vt(e, t) {
|
|
|
371
371
|
collision: g,
|
|
372
372
|
overlay: {
|
|
373
373
|
size: h,
|
|
374
|
-
position:
|
|
375
|
-
render:
|
|
374
|
+
position: R,
|
|
375
|
+
render: y,
|
|
376
376
|
ref: e,
|
|
377
|
-
to:
|
|
377
|
+
to: x
|
|
378
378
|
},
|
|
379
379
|
lib: {
|
|
380
380
|
draggableObserver: f,
|
|
381
381
|
droppableObserver: d,
|
|
382
382
|
selectableAreaObserver: m,
|
|
383
|
-
overlaySizeObserver:
|
|
383
|
+
overlaySizeObserver: w,
|
|
384
384
|
rectCache: /* @__PURE__ */ new Map()
|
|
385
385
|
},
|
|
386
|
-
autoScrollViewport:
|
|
386
|
+
autoScrollViewport: Z
|
|
387
387
|
};
|
|
388
388
|
}
|
|
389
|
-
const
|
|
389
|
+
const te = (e) => {
|
|
390
390
|
const t = e.hovered.draggable.keys().next().value;
|
|
391
391
|
if (t) {
|
|
392
|
-
const
|
|
393
|
-
|
|
392
|
+
const s = e.entities.draggableMap.get(t);
|
|
393
|
+
s && (s.hoveredPlacement = void 0);
|
|
394
394
|
}
|
|
395
|
-
const
|
|
396
|
-
if (
|
|
397
|
-
const
|
|
398
|
-
|
|
395
|
+
const n = e.hovered.droppable.keys().next().value;
|
|
396
|
+
if (n) {
|
|
397
|
+
const s = e.entities.droppableMap.get(n);
|
|
398
|
+
s && (s.hoveredPlacement = void 0);
|
|
399
399
|
}
|
|
400
400
|
e.lib.rectCache.clear(), e.pointer.value = void 0, e.state.value = void 0, e.entities.selectingArea = void 0, e.entities.selectionBase.clear(), e.entities.initiatingDraggable = void 0, e.delay.progress = 0, e.delay.startTime = 0, e.entities.draggingMap.clear(), e.hovered.draggable.clear(), e.hovered.droppable.clear();
|
|
401
401
|
};
|
|
402
|
-
function
|
|
403
|
-
return e.parentElement?.closest(
|
|
402
|
+
function vt(e) {
|
|
403
|
+
return e.parentElement?.closest(z.SELECT_AREA) ?? null;
|
|
404
404
|
}
|
|
405
|
-
const
|
|
406
|
-
if (!
|
|
407
|
-
const
|
|
405
|
+
const Mt = (e, t, n) => {
|
|
406
|
+
if (!n) return {};
|
|
407
|
+
const s = n.getBoundingClientRect(), a = Math.max(s.left, Math.min(e.x, t.x)), i = Math.max(s.top, Math.min(e.y, t.y)), o = Math.min(s.right, Math.max(e.x, t.x)), r = Math.min(s.bottom, Math.max(e.y, t.y)), g = Math.max(0, o - a), c = Math.max(0, r - i), u = a - s.left + n.scrollLeft, l = i - s.top + n.scrollTop;
|
|
408
408
|
return {
|
|
409
409
|
position: "absolute",
|
|
410
410
|
left: `${u}px`,
|
|
@@ -415,231 +415,231 @@ const At = (e, t, s) => {
|
|
|
415
415
|
border: "1px solid #3b82f6",
|
|
416
416
|
backgroundColor: "#3b82f61a"
|
|
417
417
|
};
|
|
418
|
-
},
|
|
418
|
+
}, Ge = (e) => {
|
|
419
419
|
if (!e.pointer.value || !e.entities.selectingArea) return;
|
|
420
|
-
const { selectingArea: t } = e.entities,
|
|
420
|
+
const { selectingArea: t } = e.entities, n = wt(
|
|
421
421
|
e.pointer.value.start,
|
|
422
422
|
e.pointer.value.current
|
|
423
|
-
),
|
|
423
|
+
), s = e.entities.selectableAreaMap.get(t)?.groups ?? [], a = e.lib.rectCache;
|
|
424
424
|
e.entities.visibleDraggableSet.forEach((i) => {
|
|
425
425
|
if (i === t || !t.contains(i)) return;
|
|
426
|
-
const
|
|
427
|
-
if (
|
|
426
|
+
const o = vt(i);
|
|
427
|
+
if (o && o !== t) {
|
|
428
428
|
e.entities.selectedSet.delete(i);
|
|
429
429
|
return;
|
|
430
430
|
}
|
|
431
|
-
if (
|
|
431
|
+
if (xe(i, e)) {
|
|
432
432
|
e.entities.selectedSet.delete(i);
|
|
433
433
|
return;
|
|
434
434
|
}
|
|
435
435
|
const g = e.entities.draggableMap.get(i)?.groups ?? [];
|
|
436
|
-
if (!
|
|
436
|
+
if (!se(s, g)) {
|
|
437
437
|
e.entities.selectedSet.delete(i);
|
|
438
438
|
return;
|
|
439
439
|
}
|
|
440
|
-
let c =
|
|
441
|
-
c || (c = i.getBoundingClientRect(),
|
|
440
|
+
let c = a.get(i);
|
|
441
|
+
c || (c = i.getBoundingClientRect(), a.set(i, c));
|
|
442
442
|
const u = e.entities.selectionBase.has(i);
|
|
443
|
-
|
|
443
|
+
ot(n, c) ? u ? e.entities.selectedSet.delete(i) : e.entities.selectedSet.add(i) : u ? e.entities.selectedSet.add(i) : e.entities.selectedSet.delete(i);
|
|
444
444
|
});
|
|
445
|
-
},
|
|
446
|
-
const
|
|
447
|
-
return new DOMRect(
|
|
445
|
+
}, wt = (e, t) => {
|
|
446
|
+
const n = Math.min(e.x, t.x), s = Math.min(e.y, t.y), a = Math.max(e.x, t.x), i = Math.max(e.y, t.y), o = a - n, r = i - s;
|
|
447
|
+
return new DOMRect(n, s, o, r);
|
|
448
448
|
};
|
|
449
|
-
function I(e, t,
|
|
450
|
-
const
|
|
451
|
-
return [...e.slice(0,
|
|
449
|
+
function I(e, t, n) {
|
|
450
|
+
const s = Math.max(0, Math.min(t, e.length));
|
|
451
|
+
return [...e.slice(0, s), ...n, ...e.slice(s)];
|
|
452
452
|
}
|
|
453
|
-
function
|
|
454
|
-
const
|
|
455
|
-
return [...e.slice(0,
|
|
453
|
+
function Ee(e, t, n = 1) {
|
|
454
|
+
const s = Math.max(0, Math.min(t, e.length - 1)), a = Math.max(0, Math.min(n, e.length - s));
|
|
455
|
+
return [...e.slice(0, s), ...e.slice(s + a)];
|
|
456
456
|
}
|
|
457
|
-
function
|
|
458
|
-
const
|
|
459
|
-
let
|
|
460
|
-
for (const
|
|
461
|
-
return
|
|
457
|
+
function H(e, t) {
|
|
458
|
+
const n = [...new Set(t)].filter((a) => a >= 0 && a < e.length).sort((a, i) => i - a);
|
|
459
|
+
let s = e;
|
|
460
|
+
for (const a of n) s = Ee(s, a, 1);
|
|
461
|
+
return s;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
464
|
-
if (t ===
|
|
463
|
+
function Ke(e, t, n) {
|
|
464
|
+
if (t === n || t < 0 || n < 0 || t >= e.length || n >= e.length)
|
|
465
465
|
return e;
|
|
466
|
-
const
|
|
467
|
-
return [
|
|
466
|
+
const s = [...e];
|
|
467
|
+
return [s[t], s[n]] = [s[n], s[t]], s;
|
|
468
468
|
}
|
|
469
|
-
const
|
|
469
|
+
const C = {
|
|
470
470
|
getInsertSide(e, t) {
|
|
471
471
|
return e ? t === "vertical" ? e.top && !e.bottom ? "before" : e.bottom && !e.top ? "after" : e.top ? "before" : null : e.left && !e.right ? "before" : e.right && !e.left ? "after" : e.left ? "before" : null : null;
|
|
472
472
|
},
|
|
473
473
|
isAtZoneStart(e, t) {
|
|
474
|
-
return
|
|
474
|
+
return C.getInsertSide(e, t) === "before" && !e?.center;
|
|
475
475
|
},
|
|
476
476
|
isAtZoneEnd(e, t) {
|
|
477
|
-
return
|
|
477
|
+
return C.getInsertSide(e, t) === "after" && !e?.center;
|
|
478
478
|
}
|
|
479
479
|
};
|
|
480
|
-
function
|
|
481
|
-
const { draggedItems:
|
|
482
|
-
if (!
|
|
483
|
-
const i =
|
|
484
|
-
if (!
|
|
485
|
-
const r =
|
|
480
|
+
function Ne(e, t) {
|
|
481
|
+
const { draggedItems: n, dropZone: s, hoveredDraggable: a } = e;
|
|
482
|
+
if (!n.length) return null;
|
|
483
|
+
const i = a?.placement.center === !0 && s != null && s.items !== a.items, o = i ? s.items : a?.items ?? s?.items;
|
|
484
|
+
if (!o) return null;
|
|
485
|
+
const r = n[0].items, g = n.map((f) => f.index), c = o.length;
|
|
486
486
|
let u, l;
|
|
487
|
-
if (
|
|
488
|
-
const f =
|
|
489
|
-
if (f &&
|
|
490
|
-
const d =
|
|
487
|
+
if (a && !i) {
|
|
488
|
+
const f = a.items === r && g.includes(a.index);
|
|
489
|
+
if (f && n.length === 1) {
|
|
490
|
+
const d = C.isAtZoneStart(s?.placement, t);
|
|
491
491
|
u = d ? 0 : c, l = d ? "prepend" : "append";
|
|
492
492
|
} else {
|
|
493
493
|
if (f)
|
|
494
494
|
return null;
|
|
495
495
|
{
|
|
496
|
-
const d =
|
|
496
|
+
const d = C.getInsertSide(a.placement, t), m = a.index;
|
|
497
497
|
d === "before" ? (u = Math.max(0, m), l = "insert") : d === "after" ? (u = Math.min(c, m + 1), l = "insert") : (u = c, l = "append");
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
} else {
|
|
501
|
-
if (!
|
|
502
|
-
const f =
|
|
501
|
+
if (!s) return null;
|
|
502
|
+
const f = C.isAtZoneStart(s.placement, t);
|
|
503
503
|
u = f ? 0 : c, l = f ? "prepend" : "append";
|
|
504
504
|
}
|
|
505
|
-
return { targetIndex: u, mode: l, targetArr:
|
|
505
|
+
return { targetIndex: u, mode: l, targetArr: o };
|
|
506
506
|
}
|
|
507
|
-
function
|
|
508
|
-
const { draggedItems:
|
|
509
|
-
if (!
|
|
510
|
-
const
|
|
511
|
-
if (!
|
|
512
|
-
const { targetArr:
|
|
513
|
-
let { targetIndex:
|
|
514
|
-
const r =
|
|
515
|
-
if (c ===
|
|
516
|
-
const l = r.filter((d) => d <
|
|
517
|
-
|
|
518
|
-
const f = I(
|
|
519
|
-
return { sourceItems: f, targetItems: f, draggedItems: g, sourceIndexes: r, targetIndex:
|
|
507
|
+
function At(e, t = "vertical") {
|
|
508
|
+
const { draggedItems: n } = e;
|
|
509
|
+
if (!n.length) return null;
|
|
510
|
+
const s = Ne(e, t);
|
|
511
|
+
if (!s) return null;
|
|
512
|
+
const { targetArr: a, mode: i } = s;
|
|
513
|
+
let { targetIndex: o } = s;
|
|
514
|
+
const r = n.map((l) => l.index), g = n.map((l) => l.item), c = n[0].items;
|
|
515
|
+
if (c === a) {
|
|
516
|
+
const l = r.filter((d) => d < o).length;
|
|
517
|
+
o = Math.max(0, o - l);
|
|
518
|
+
const f = I(H(c, r), o, g);
|
|
519
|
+
return { sourceItems: f, targetItems: f, draggedItems: g, sourceIndexes: r, targetIndex: o, mode: i, sameList: !0 };
|
|
520
520
|
} else {
|
|
521
|
-
const l =
|
|
522
|
-
return { sourceItems: l, targetItems: f, draggedItems: g, sourceIndexes: r, targetIndex:
|
|
521
|
+
const l = H(c, r), f = I(a, o, g);
|
|
522
|
+
return { sourceItems: l, targetItems: f, draggedItems: g, sourceIndexes: r, targetIndex: o, mode: i, sameList: !1 };
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
function
|
|
526
|
-
const { draggedItems: t, hoveredDraggable:
|
|
527
|
-
if (!t.length || !
|
|
528
|
-
const
|
|
529
|
-
if (c &&
|
|
525
|
+
function xt(e) {
|
|
526
|
+
const { draggedItems: t, hoveredDraggable: n } = e;
|
|
527
|
+
if (!t.length || !n) return null;
|
|
528
|
+
const s = t.map((u) => u.index), a = n.index, i = t.map((u) => u.item), o = n.item, r = t[0].items, g = n.items, c = r === g;
|
|
529
|
+
if (c && s.includes(a)) return null;
|
|
530
530
|
if (t.length === 1) {
|
|
531
|
-
const u =
|
|
531
|
+
const u = s[0];
|
|
532
532
|
if (c) {
|
|
533
|
-
const l =
|
|
534
|
-
return { sourceItems: l, targetItems: l, sourceIndexes:
|
|
533
|
+
const l = Ke(r, u, a);
|
|
534
|
+
return { sourceItems: l, targetItems: l, sourceIndexes: s, targetIndex: a, sameList: !0 };
|
|
535
535
|
} else {
|
|
536
536
|
const l = [...r], f = [...g];
|
|
537
|
-
return l[u] = g[
|
|
537
|
+
return l[u] = g[a], f[a] = r[u], { sourceItems: l, targetItems: f, sourceIndexes: s, targetIndex: a, sameList: !1 };
|
|
538
538
|
}
|
|
539
539
|
} else {
|
|
540
|
-
const u = Math.min(...
|
|
540
|
+
const u = Math.min(...s);
|
|
541
541
|
if (c) {
|
|
542
|
-
const l =
|
|
543
|
-
let h =
|
|
542
|
+
const l = s.filter((y) => y < a).length, f = Math.max(0, a - l), d = s.filter((y) => y < u).length, m = Math.max(0, u - d);
|
|
543
|
+
let h = H(r, s);
|
|
544
544
|
h = I(h, f, i);
|
|
545
|
-
const
|
|
546
|
-
return h = I(h,
|
|
545
|
+
const w = m >= f ? m + i.length : m;
|
|
546
|
+
return h = I(h, w, [o]), { sourceItems: h, targetItems: h, sourceIndexes: s, targetIndex: f, sameList: !0 };
|
|
547
547
|
} else {
|
|
548
|
-
const l =
|
|
549
|
-
let d =
|
|
550
|
-
d = I(d, f, [
|
|
551
|
-
let m =
|
|
552
|
-
return m = I(m,
|
|
548
|
+
const l = s.filter((h) => h < u).length, f = Math.max(0, u - l);
|
|
549
|
+
let d = H(r, s);
|
|
550
|
+
d = I(d, f, [o]);
|
|
551
|
+
let m = Ee(g, a);
|
|
552
|
+
return m = I(m, a, i), { sourceItems: d, targetItems: m, sourceIndexes: s, targetIndex: a, sameList: !1 };
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
function
|
|
557
|
-
const { draggedItems:
|
|
558
|
-
if (!
|
|
559
|
-
const
|
|
560
|
-
if (!
|
|
561
|
-
const { targetArr:
|
|
562
|
-
return { targetItems: I(
|
|
556
|
+
function Et(e, t = "vertical") {
|
|
557
|
+
const { draggedItems: n } = e;
|
|
558
|
+
if (!n.length) return null;
|
|
559
|
+
const s = Ne(e, t);
|
|
560
|
+
if (!s) return null;
|
|
561
|
+
const { targetArr: a, targetIndex: i, mode: o } = s, r = n.map((c) => c.item);
|
|
562
|
+
return { targetItems: I(a, i, r), copiedItems: r, targetIndex: i, mode: o };
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function Lt(e) {
|
|
565
565
|
const { draggedItems: t } = e;
|
|
566
566
|
if (!t.length) return null;
|
|
567
|
-
const
|
|
568
|
-
return { sourceItems:
|
|
567
|
+
const n = t.map((o) => o.index), s = t.map((o) => o.item), a = t[0].items;
|
|
568
|
+
return { sourceItems: H(a, n), removedItems: s, sourceIndexes: n };
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function Ve(e) {
|
|
571
571
|
return {
|
|
572
572
|
// Low-level array ops
|
|
573
573
|
insertAt: I,
|
|
574
|
-
removeAt:
|
|
575
|
-
removeIndexes:
|
|
576
|
-
swapAt:
|
|
574
|
+
removeAt: Ee,
|
|
575
|
+
removeIndexes: H,
|
|
576
|
+
swapAt: Ke,
|
|
577
577
|
// Placement helpers
|
|
578
|
-
getInsertSide: (t,
|
|
579
|
-
isAtZoneStart: (t,
|
|
580
|
-
isAtZoneEnd: (t,
|
|
578
|
+
getInsertSide: (t, n) => C.getInsertSide(t, n),
|
|
579
|
+
isAtZoneStart: (t, n) => C.isAtZoneStart(t, n),
|
|
580
|
+
isAtZoneEnd: (t, n) => C.isAtZoneEnd(t, n),
|
|
581
581
|
// High-level (event-bound)
|
|
582
|
-
suggestSort: (t) =>
|
|
583
|
-
suggestSwap: () =>
|
|
584
|
-
suggestCopy: (t) =>
|
|
585
|
-
suggestRemove: () =>
|
|
582
|
+
suggestSort: (t) => At(e, t),
|
|
583
|
+
suggestSwap: () => xt(e),
|
|
584
|
+
suggestCopy: (t) => Et(e, t),
|
|
585
|
+
suggestRemove: () => Lt(e)
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
|
-
const
|
|
589
|
-
|
|
588
|
+
const T = (e) => e.keys().next().value, It = (e) => e.target.closest(
|
|
589
|
+
z.DRAGGABLE
|
|
590
590
|
);
|
|
591
|
-
function
|
|
591
|
+
function Ct(e) {
|
|
592
592
|
const t = e.entities.initiatingDraggable;
|
|
593
593
|
if (!t) return [];
|
|
594
|
-
const
|
|
595
|
-
if (!
|
|
596
|
-
return
|
|
597
|
-
const
|
|
598
|
-
if (!Array.isArray(
|
|
599
|
-
const [i,
|
|
594
|
+
const n = e.entities.draggingMap.get(t) ?? e.entities.draggableMap.get(t), s = n?.payload;
|
|
595
|
+
if (!s)
|
|
596
|
+
return n?.data ? [{ index: -1, item: void 0, items: [], data: n.data() }] : [];
|
|
597
|
+
const a = s();
|
|
598
|
+
if (!Array.isArray(a) || a.length < 2) return [];
|
|
599
|
+
const [i, o] = a, r = Number(i), g = o, c = /* @__PURE__ */ new Map();
|
|
600
600
|
return c.set(r, {
|
|
601
601
|
index: r,
|
|
602
602
|
item: g[r],
|
|
603
603
|
items: g,
|
|
604
|
-
data:
|
|
604
|
+
data: n?.data?.()
|
|
605
605
|
}), e.entities.draggingMap.forEach((u, l) => {
|
|
606
606
|
const f = e.entities.draggableMap.get(l), d = f?.payload;
|
|
607
607
|
if (!d) return;
|
|
608
608
|
const m = d();
|
|
609
609
|
if (!Array.isArray(m) || m.length < 2) return;
|
|
610
|
-
const [h,
|
|
611
|
-
if (
|
|
612
|
-
const
|
|
613
|
-
c.has(
|
|
614
|
-
index:
|
|
615
|
-
item: y
|
|
610
|
+
const [h, w] = m;
|
|
611
|
+
if (w !== g) return;
|
|
612
|
+
const y = Number(h);
|
|
613
|
+
c.has(y) || c.set(y, {
|
|
614
|
+
index: y,
|
|
615
|
+
item: w[y],
|
|
616
616
|
items: g,
|
|
617
617
|
data: f?.data?.()
|
|
618
618
|
});
|
|
619
619
|
}), [...c.values()].sort((u, l) => u.index - l.index);
|
|
620
620
|
}
|
|
621
621
|
const A = (e, t) => {
|
|
622
|
-
const
|
|
623
|
-
let
|
|
622
|
+
const n = Ct(e);
|
|
623
|
+
let s, a;
|
|
624
624
|
if (t) {
|
|
625
625
|
const i = e.entities.droppableMap.get(t);
|
|
626
626
|
if (i) {
|
|
627
627
|
const g = i.payload;
|
|
628
|
-
|
|
628
|
+
s = {
|
|
629
629
|
items: g ? g() : [],
|
|
630
630
|
placement: e.hovered.droppable.get(t),
|
|
631
631
|
data: i.data?.()
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
|
-
const
|
|
635
|
-
if (
|
|
636
|
-
const g = e.entities.draggableMap.get(
|
|
634
|
+
const o = T(e.hovered.draggable);
|
|
635
|
+
if (o && (o === t || t.contains(o)) && o) {
|
|
636
|
+
const g = e.entities.draggableMap.get(o), c = g?.payload, u = e.hovered.draggable.get(o), l = { top: !1, right: !1, bottom: !1, left: !1, center: !1 };
|
|
637
637
|
if (c) {
|
|
638
638
|
const f = c();
|
|
639
639
|
if (Array.isArray(f) && f.length >= 2) {
|
|
640
640
|
const [d, m] = f, h = Number(d);
|
|
641
|
-
|
|
642
|
-
element:
|
|
641
|
+
a = {
|
|
642
|
+
element: o,
|
|
643
643
|
placement: u ?? l,
|
|
644
644
|
index: h,
|
|
645
645
|
item: m[h],
|
|
@@ -647,8 +647,8 @@ const A = (e, t) => {
|
|
|
647
647
|
data: g?.data?.()
|
|
648
648
|
};
|
|
649
649
|
}
|
|
650
|
-
} else g?.data && (
|
|
651
|
-
element:
|
|
650
|
+
} else g?.data && (a = {
|
|
651
|
+
element: o,
|
|
652
652
|
placement: u ?? l,
|
|
653
653
|
index: -1,
|
|
654
654
|
item: void 0,
|
|
@@ -658,69 +658,69 @@ const A = (e, t) => {
|
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
660
|
return {
|
|
661
|
-
draggedItems:
|
|
662
|
-
dropZone:
|
|
663
|
-
hoveredDraggable:
|
|
661
|
+
draggedItems: n,
|
|
662
|
+
dropZone: s,
|
|
663
|
+
hoveredDraggable: a,
|
|
664
664
|
provider: e,
|
|
665
|
-
helpers:
|
|
665
|
+
helpers: Ve({ draggedItems: n, dropZone: s, hoveredDraggable: a })
|
|
666
666
|
};
|
|
667
|
-
},
|
|
667
|
+
}, P = (e, t, n) => {
|
|
668
668
|
if (!t) return;
|
|
669
|
-
const
|
|
670
|
-
!
|
|
671
|
-
},
|
|
672
|
-
const
|
|
673
|
-
e.entities.draggingMap.forEach((
|
|
674
|
-
|
|
669
|
+
const s = e.entities.draggingMap.get(t) ?? e.entities.draggableMap.get(t);
|
|
670
|
+
!s || s.disabled || s.events?.[n]?.(A(e));
|
|
671
|
+
}, M = (e, t) => {
|
|
672
|
+
const n = A(e);
|
|
673
|
+
e.entities.draggingMap.forEach((s) => {
|
|
674
|
+
s.disabled || s.events?.[t]?.(n);
|
|
675
675
|
});
|
|
676
|
-
},
|
|
677
|
-
if (t !==
|
|
678
|
-
if (t && !
|
|
679
|
-
const
|
|
680
|
-
e.entities.droppableMap.get(t)?.events?.onLeave?.(
|
|
676
|
+
}, Rt = (e, t, n) => {
|
|
677
|
+
if (t !== n) {
|
|
678
|
+
if (t && !F(t, e)) {
|
|
679
|
+
const s = A(e, t);
|
|
680
|
+
e.entities.droppableMap.get(t)?.events?.onLeave?.(s);
|
|
681
681
|
}
|
|
682
|
-
if (
|
|
683
|
-
const
|
|
684
|
-
e.entities.droppableMap.get(
|
|
682
|
+
if (n && !F(n, e)) {
|
|
683
|
+
const s = A(e, n);
|
|
684
|
+
e.entities.droppableMap.get(n)?.events?.onEnter?.(s);
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
},
|
|
688
|
-
if (t !==
|
|
689
|
-
const
|
|
687
|
+
}, Tt = (e, t, n) => {
|
|
688
|
+
if (t !== n) {
|
|
689
|
+
const s = A(e);
|
|
690
690
|
if (t) {
|
|
691
|
-
const
|
|
692
|
-
|
|
691
|
+
const a = e.entities.draggableMap.get(t);
|
|
692
|
+
a && !a.disabled && a.events?.onLeave?.(s);
|
|
693
693
|
}
|
|
694
|
-
if (
|
|
695
|
-
const
|
|
696
|
-
|
|
694
|
+
if (n) {
|
|
695
|
+
const a = e.entities.draggableMap.get(n);
|
|
696
|
+
a && !a.disabled && a.events?.onHover?.(s);
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
},
|
|
700
|
-
const
|
|
701
|
-
!
|
|
702
|
-
},
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
},
|
|
706
|
-
const
|
|
707
|
-
|
|
708
|
-
},
|
|
709
|
-
const
|
|
699
|
+
}, le = (e, t, n) => {
|
|
700
|
+
const s = It(t);
|
|
701
|
+
!s || !e.entities.draggingMap.has(s) || e.entities.draggingMap.get(s)?.events?.[n]?.(A(e));
|
|
702
|
+
}, kt = (e, t) => {
|
|
703
|
+
const n = T(t.droppable);
|
|
704
|
+
n && !F(n, e) && e.entities.droppableMap.get(n)?.events?.onLeave?.(A(e, n));
|
|
705
|
+
}, Se = (e, t) => {
|
|
706
|
+
const n = T(t.droppable);
|
|
707
|
+
n && !F(n, e) && e.entities.droppableMap.get(n)?.events?.onLeave?.(A(e, n));
|
|
708
|
+
}, Pt = (e, t, n = 5) => {
|
|
709
|
+
const s = n / 2;
|
|
710
710
|
return {
|
|
711
|
-
left: e -
|
|
712
|
-
top: t -
|
|
713
|
-
width:
|
|
714
|
-
height:
|
|
711
|
+
left: e - s,
|
|
712
|
+
top: t - s,
|
|
713
|
+
width: n,
|
|
714
|
+
height: n
|
|
715
715
|
};
|
|
716
|
-
},
|
|
717
|
-
const t = e.pointer.value?.current,
|
|
718
|
-
return
|
|
719
|
-
},
|
|
720
|
-
const
|
|
721
|
-
if (
|
|
722
|
-
const r =
|
|
723
|
-
if (l < f && d < m &&
|
|
716
|
+
}, Bt = (e) => {
|
|
717
|
+
const t = e.pointer.value?.current, n = t?.x ?? 0, s = t?.y ?? 0;
|
|
718
|
+
return Pt(n, s, 5);
|
|
719
|
+
}, O = (e, t, n) => {
|
|
720
|
+
const s = e.left + e.width / 2, a = e.top + e.height / 2;
|
|
721
|
+
if (n) {
|
|
722
|
+
const r = n.top ?? 0, g = n.right ?? 0, c = n.bottom ?? 0, u = n.left ?? 0, l = t.left + u, f = t.right - g, d = t.top + r, m = t.bottom - c;
|
|
723
|
+
if (l < f && d < m && s >= l && s <= f && a >= d && a <= m)
|
|
724
724
|
return {
|
|
725
725
|
top: !1,
|
|
726
726
|
right: !1,
|
|
@@ -729,66 +729,66 @@ const A = (e, t) => {
|
|
|
729
729
|
center: !0
|
|
730
730
|
};
|
|
731
731
|
}
|
|
732
|
-
const i = t.left + t.width / 2,
|
|
732
|
+
const i = t.left + t.width / 2, o = t.top + t.height / 2;
|
|
733
733
|
return {
|
|
734
|
-
top:
|
|
735
|
-
bottom:
|
|
736
|
-
left:
|
|
737
|
-
right:
|
|
734
|
+
top: a <= o,
|
|
735
|
+
bottom: a > o,
|
|
736
|
+
left: s <= i,
|
|
737
|
+
right: s > i,
|
|
738
738
|
center: !1
|
|
739
739
|
};
|
|
740
|
-
},
|
|
740
|
+
}, Ot = (e) => ({
|
|
741
741
|
x: e.left + e.width / 2,
|
|
742
742
|
y: e.top + e.height / 2
|
|
743
|
-
}),
|
|
744
|
-
const
|
|
745
|
-
return Math.hypot(e.x -
|
|
743
|
+
}), Re = (e, t) => {
|
|
744
|
+
const n = Ot(t);
|
|
745
|
+
return Math.hypot(e.x - n.x, e.y - n.y);
|
|
746
746
|
};
|
|
747
|
-
function
|
|
747
|
+
function _t(e, t) {
|
|
748
748
|
return e === t ? !0 : !e || !t ? !1 : e.top === t.top && e.right === t.right && e.bottom === t.bottom && e.left === t.left && e.center === t.center;
|
|
749
749
|
}
|
|
750
|
-
function
|
|
751
|
-
|
|
750
|
+
function $(e, t) {
|
|
751
|
+
_t(e.hoveredPlacement, t) || (e.hoveredPlacement = t);
|
|
752
752
|
}
|
|
753
|
-
const
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
const i =
|
|
757
|
-
if (
|
|
758
|
-
const l =
|
|
753
|
+
const zt = (e, t) => e.find((n) => n !== t && X(t, n)), De = (e, t, n) => {
|
|
754
|
+
const s = T(t.droppable), a = T(t.draggable);
|
|
755
|
+
a && t.draggable.delete(a), s && t.droppable.delete(s);
|
|
756
|
+
const i = Bt(e), o = n.zones[0], r = n.elements[0];
|
|
757
|
+
if (o && r && o === r && e.entities.droppableMap.has(o) && o) {
|
|
758
|
+
const l = o.getBoundingClientRect(), f = e.entities.draggableMap.get(o)?.placementMargins, d = O(i, l, f);
|
|
759
759
|
if (d.center) {
|
|
760
|
-
t.droppable.set(
|
|
761
|
-
const m =
|
|
760
|
+
t.droppable.set(o, d);
|
|
761
|
+
const m = zt(n.elements, o);
|
|
762
762
|
if (m) {
|
|
763
763
|
const h = m.getBoundingClientRect();
|
|
764
764
|
t.draggable.set(
|
|
765
765
|
m,
|
|
766
|
-
|
|
766
|
+
O(i, h, void 0)
|
|
767
767
|
);
|
|
768
768
|
}
|
|
769
769
|
} else
|
|
770
770
|
t.draggable.set(r, d);
|
|
771
771
|
} else {
|
|
772
|
-
if (
|
|
773
|
-
const l =
|
|
774
|
-
t.droppable.set(
|
|
772
|
+
if (o) {
|
|
773
|
+
const l = o.getBoundingClientRect();
|
|
774
|
+
t.droppable.set(o, O(i, l));
|
|
775
775
|
}
|
|
776
776
|
if (r)
|
|
777
|
-
if (
|
|
778
|
-
if (
|
|
777
|
+
if (o)
|
|
778
|
+
if (X(o, r)) {
|
|
779
779
|
const l = r.getBoundingClientRect(), f = e.entities.draggableMap.get(r)?.placementMargins;
|
|
780
780
|
t.draggable.set(
|
|
781
781
|
r,
|
|
782
|
-
|
|
782
|
+
O(i, l, f)
|
|
783
783
|
);
|
|
784
784
|
} else {
|
|
785
|
-
const l = e.pointer.value?.current ?? { x: 0, y: 0 }, f =
|
|
786
|
-
if (
|
|
785
|
+
const l = e.pointer.value?.current ?? { x: 0, y: 0 }, f = o.getBoundingClientRect(), d = r.getBoundingClientRect(), m = Re(l, f);
|
|
786
|
+
if (Re(l, d) < m) {
|
|
787
787
|
t.droppable.clear();
|
|
788
|
-
const
|
|
788
|
+
const w = e.entities.draggableMap.get(r)?.placementMargins;
|
|
789
789
|
t.draggable.set(
|
|
790
790
|
r,
|
|
791
|
-
|
|
791
|
+
O(i, d, w)
|
|
792
792
|
);
|
|
793
793
|
}
|
|
794
794
|
}
|
|
@@ -796,29 +796,29 @@ const Gt = (e, t) => e.find((s) => s !== t && G(t, s)), ae = (e, t, s) => {
|
|
|
796
796
|
const l = r.getBoundingClientRect(), f = e.entities.draggableMap.get(r)?.placementMargins;
|
|
797
797
|
t.draggable.set(
|
|
798
798
|
r,
|
|
799
|
-
|
|
799
|
+
O(i, l, f)
|
|
800
800
|
);
|
|
801
801
|
}
|
|
802
802
|
}
|
|
803
|
-
const c =
|
|
804
|
-
if (
|
|
805
|
-
const l = e.entities.draggableMap.get(
|
|
806
|
-
l &&
|
|
803
|
+
const c = T(t.droppable), u = T(t.draggable);
|
|
804
|
+
if (a && a !== u) {
|
|
805
|
+
const l = e.entities.draggableMap.get(a);
|
|
806
|
+
l && $(l, void 0);
|
|
807
807
|
}
|
|
808
|
-
if (
|
|
809
|
-
const l = e.entities.droppableMap.get(
|
|
810
|
-
l &&
|
|
808
|
+
if (s && s !== c) {
|
|
809
|
+
const l = e.entities.droppableMap.get(s);
|
|
810
|
+
l && $(l, void 0);
|
|
811
811
|
}
|
|
812
812
|
if (u) {
|
|
813
813
|
const l = e.entities.draggableMap.get(u);
|
|
814
|
-
l &&
|
|
814
|
+
l && $(l, t.draggable.get(u));
|
|
815
815
|
}
|
|
816
816
|
if (c) {
|
|
817
817
|
const l = e.entities.droppableMap.get(c);
|
|
818
|
-
l &&
|
|
818
|
+
l && $(l, t.droppable.get(c));
|
|
819
819
|
}
|
|
820
|
-
|
|
821
|
-
},
|
|
820
|
+
Rt(e, s, c), Tt(e, a, u);
|
|
821
|
+
}, ce = (e, t) => e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y, ge = (e) => {
|
|
822
822
|
if (!e)
|
|
823
823
|
return { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, right: 0, bottom: 0 };
|
|
824
824
|
const t = e.getBoundingClientRect();
|
|
@@ -832,154 +832,142 @@ const Gt = (e, t) => e.find((s) => s !== t && G(t, s)), ae = (e, t, s) => {
|
|
|
832
832
|
right: t.right,
|
|
833
833
|
bottom: t.bottom
|
|
834
834
|
};
|
|
835
|
-
},
|
|
836
|
-
|
|
837
|
-
y: e.y + e.height / 2
|
|
838
|
-
}), Ht = (e, t) => Math.hypot(t.x - e.x, t.y - e.y), Q = (e, t) => {
|
|
839
|
-
const s = Math.max(
|
|
835
|
+
}, ue = (e, t) => {
|
|
836
|
+
const n = Math.max(
|
|
840
837
|
0,
|
|
841
838
|
Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)
|
|
842
|
-
),
|
|
839
|
+
), s = Math.max(
|
|
843
840
|
0,
|
|
844
841
|
Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y)
|
|
845
|
-
),
|
|
846
|
-
return i === 0 ||
|
|
847
|
-
},
|
|
848
|
-
const t = e.overlay.position?.value ?? { x: 0, y: 0 }, { x:
|
|
849
|
-
let i,
|
|
850
|
-
if (
|
|
851
|
-
i =
|
|
842
|
+
), a = n * s, i = e.width * e.height, o = t.width * t.height;
|
|
843
|
+
return i === 0 || o === 0 ? 0 : (a / i * 100 + a / o * 100) / 2;
|
|
844
|
+
}, Ft = (e) => e.overlay.ref?.value ?? null, Te = (e) => {
|
|
845
|
+
const t = e.overlay.position?.value ?? { x: 0, y: 0 }, { x: n, y: s } = t, a = e.overlay.size?.value;
|
|
846
|
+
let i, o;
|
|
847
|
+
if (a)
|
|
848
|
+
i = a.width, o = a.height;
|
|
852
849
|
else {
|
|
853
850
|
const r = e.overlay.ref?.value?.getBoundingClientRect();
|
|
854
|
-
i = r?.width ?? 0,
|
|
851
|
+
i = r?.width ?? 0, o = r?.height ?? 0;
|
|
855
852
|
}
|
|
856
853
|
return {
|
|
857
|
-
x:
|
|
858
|
-
y:
|
|
854
|
+
x: n,
|
|
855
|
+
y: s,
|
|
859
856
|
width: i,
|
|
860
|
-
height:
|
|
861
|
-
top:
|
|
862
|
-
left:
|
|
863
|
-
right:
|
|
864
|
-
bottom:
|
|
857
|
+
height: o,
|
|
858
|
+
top: s,
|
|
859
|
+
left: n,
|
|
860
|
+
right: n + i,
|
|
861
|
+
bottom: s + o
|
|
865
862
|
};
|
|
866
|
-
},
|
|
867
|
-
(
|
|
868
|
-
),
|
|
869
|
-
function
|
|
863
|
+
}, ve = (e) => e.entities.allowedDraggableSet, Ye = (e) => e.entities.allowedDroppableSet, Ht = (e, t) => !t.entities.draggingMap.has(e), Gt = (e, t) => ![...t.entities.draggingMap.keys()].some(
|
|
864
|
+
(n) => X(n, e)
|
|
865
|
+
), Kt = (e, t) => t.entities.draggableMap.has(e) ? !xe(e, t) : t.entities.droppableMap.has(e) ? !F(e, t) : !0, j = (e, t) => Ht(e, t) && Gt(e, t) && Kt(e, t), fe = 10;
|
|
866
|
+
function _(e, t) {
|
|
870
867
|
return Math.hypot(
|
|
871
868
|
t.x - (e.x + e.width / 2),
|
|
872
869
|
t.y - (e.y + e.height / 2)
|
|
873
870
|
);
|
|
874
871
|
}
|
|
875
|
-
function
|
|
876
|
-
const t = e.pointer.value?.current ?? { x: 0, y: 0 },
|
|
877
|
-
if (!
|
|
878
|
-
const
|
|
879
|
-
let r =
|
|
872
|
+
function Nt(e) {
|
|
873
|
+
const t = e.pointer.value?.current ?? { x: 0, y: 0 }, n = document.elementFromPoint(t.x, t.y);
|
|
874
|
+
if (!n) return null;
|
|
875
|
+
const s = ve(e), a = Ye(e), i = [], o = [];
|
|
876
|
+
let r = n;
|
|
880
877
|
for (; r; )
|
|
881
|
-
(
|
|
882
|
-
return i.length === 0 &&
|
|
878
|
+
(s.has(r) || a.has(r)) && j(r, e) && (s.has(r) && i.push(r), a.has(r) && o.push(r)), r = r.parentElement;
|
|
879
|
+
return i.length === 0 && o.length === 0 ? null : { elements: i, zones: o };
|
|
883
880
|
}
|
|
884
|
-
const
|
|
885
|
-
if (!
|
|
886
|
-
const
|
|
887
|
-
if (
|
|
888
|
-
if (
|
|
889
|
-
const c =
|
|
890
|
-
if (!c) return
|
|
891
|
-
const u =
|
|
892
|
-
return { elements: [...
|
|
893
|
-
(d) => c.contains(d) &&
|
|
894
|
-
).map((d) => ({ el: d, box:
|
|
895
|
-
({ box: d }) =>
|
|
896
|
-
).sort((d, m) =>
|
|
881
|
+
const Me = (e) => {
|
|
882
|
+
if (!Ft(e)) return { elements: [], zones: [] };
|
|
883
|
+
const n = e.pointer.value?.current ?? { x: 0, y: 0 }, s = Nt(e);
|
|
884
|
+
if (s) {
|
|
885
|
+
if (s.elements.length > 0) return s;
|
|
886
|
+
const c = s.zones[0];
|
|
887
|
+
if (!c) return s;
|
|
888
|
+
const u = Te(e);
|
|
889
|
+
return { elements: [...ve(e)].filter(
|
|
890
|
+
(d) => c.contains(d) && j(d, e)
|
|
891
|
+
).map((d) => ({ el: d, box: ge(d) })).filter(
|
|
892
|
+
({ box: d }) => ce(d, u) && ue(d, u) >= fe
|
|
893
|
+
).sort((d, m) => _(d.box, n) - _(m.box, n)).map(({ el: d }) => d), zones: s.zones };
|
|
897
894
|
}
|
|
898
|
-
const
|
|
899
|
-
(c) =>
|
|
900
|
-
),
|
|
901
|
-
(c) =>
|
|
902
|
-
), r = i.map((c) => ({ n: c, box:
|
|
903
|
-
({ box: c }) =>
|
|
904
|
-
).sort((c, u) =>
|
|
905
|
-
({ box: c }) =>
|
|
906
|
-
).sort((c, u) =>
|
|
895
|
+
const a = Te(e), i = [...ve(e)].filter(
|
|
896
|
+
(c) => j(c, e)
|
|
897
|
+
), o = [...Ye(e)].filter(
|
|
898
|
+
(c) => j(c, e)
|
|
899
|
+
), r = i.map((c) => ({ n: c, box: ge(c) })).filter(
|
|
900
|
+
({ box: c }) => ce(c, a) && ue(c, a) >= fe
|
|
901
|
+
).sort((c, u) => _(c.box, n) - _(u.box, n)).map(({ n: c }) => c), g = o.map((c) => ({ n: c, box: ge(c) })).filter(
|
|
902
|
+
({ box: c }) => ce(c, a) && ue(c, a) >= fe
|
|
903
|
+
).sort((c, u) => _(c.box, n) - _(u.box, n)).map(({ n: c }) => c);
|
|
907
904
|
return { elements: r, zones: g };
|
|
908
905
|
};
|
|
909
|
-
function
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
ae(e, e.hovered, s);
|
|
913
|
-
return;
|
|
914
|
-
}
|
|
915
|
-
const t = ve(e);
|
|
916
|
-
ae(e, e.hovered, t);
|
|
906
|
+
function we(e) {
|
|
907
|
+
const t = Me(e);
|
|
908
|
+
De(e, e.hovered, t);
|
|
917
909
|
}
|
|
918
|
-
function
|
|
919
|
-
const
|
|
920
|
-
if (
|
|
921
|
-
|
|
910
|
+
function Vt(e, t) {
|
|
911
|
+
const n = e.collision?.throttle?.value ?? 0;
|
|
912
|
+
if (n <= 0) {
|
|
913
|
+
we(e);
|
|
922
914
|
return;
|
|
923
915
|
}
|
|
924
|
-
const
|
|
925
|
-
|
|
916
|
+
const s = Date.now();
|
|
917
|
+
s - t.value >= n && (t.value = s, we(e));
|
|
926
918
|
}
|
|
927
|
-
async function
|
|
919
|
+
async function Xe(e) {
|
|
928
920
|
const t = e.hovered.droppable.keys().next().value;
|
|
929
|
-
if (!t ||
|
|
930
|
-
const
|
|
931
|
-
let
|
|
932
|
-
if (
|
|
933
|
-
const r =
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
const c = n.draggedItems.filter(
|
|
943
|
-
(l) => re(g.get(l) ?? [], r)
|
|
944
|
-
), u = n.draggedItems.filter(
|
|
945
|
-
(l) => !c.includes(l)
|
|
921
|
+
if (!t || F(t, e)) return "accept";
|
|
922
|
+
const n = e.entities.droppableMap.get(t), s = A(e, t);
|
|
923
|
+
let a = s;
|
|
924
|
+
if (n?.groupMatch === "some" && (n.groups?.length ?? 0) > 0) {
|
|
925
|
+
const r = n.groups, g = s.draggedItems.filter((u) => {
|
|
926
|
+
for (const [, l] of e.entities.draggingMap) {
|
|
927
|
+
const f = l.payload?.();
|
|
928
|
+
if (!(!Array.isArray(f) || f.length < 2) && Number(f[0]) === u.index && f[1] === u.items)
|
|
929
|
+
return se(l.groups ?? [], r);
|
|
930
|
+
}
|
|
931
|
+
return !0;
|
|
932
|
+
}), c = s.draggedItems.filter(
|
|
933
|
+
(u) => !g.includes(u)
|
|
946
934
|
);
|
|
947
|
-
if (
|
|
948
|
-
const
|
|
949
|
-
...
|
|
950
|
-
draggedItems:
|
|
951
|
-
helpers:
|
|
935
|
+
if (c.length > 0) {
|
|
936
|
+
const u = (l) => ({
|
|
937
|
+
...s,
|
|
938
|
+
draggedItems: l,
|
|
939
|
+
helpers: Ve({ ...s, draggedItems: l })
|
|
952
940
|
});
|
|
953
|
-
if (
|
|
954
|
-
const
|
|
955
|
-
validItems:
|
|
956
|
-
invalidItems:
|
|
957
|
-
dropZone:
|
|
958
|
-
hoveredDraggable:
|
|
959
|
-
}),
|
|
960
|
-
let
|
|
961
|
-
if (
|
|
941
|
+
if (n.events?.onValidate) {
|
|
942
|
+
const l = n.events.onValidate({
|
|
943
|
+
validItems: g,
|
|
944
|
+
invalidItems: c,
|
|
945
|
+
dropZone: s.dropZone,
|
|
946
|
+
hoveredDraggable: s.hoveredDraggable
|
|
947
|
+
}), f = l != null && typeof l.then == "function";
|
|
948
|
+
let d;
|
|
949
|
+
if (f) {
|
|
962
950
|
e.state.value = "pending";
|
|
963
951
|
try {
|
|
964
|
-
|
|
952
|
+
d = await l;
|
|
965
953
|
} catch {
|
|
966
|
-
const
|
|
967
|
-
return
|
|
954
|
+
const h = e.entities.initiatingDraggable;
|
|
955
|
+
return P(e, h, "onSelfDragCancel"), M(e, "onDragCancel"), Se(e, e.hovered), "cancel";
|
|
968
956
|
}
|
|
969
957
|
} else
|
|
970
|
-
|
|
971
|
-
if (
|
|
958
|
+
d = l;
|
|
959
|
+
if (d === !1)
|
|
972
960
|
return e.state.value = "dragging", "decline";
|
|
973
|
-
const
|
|
974
|
-
if (
|
|
975
|
-
|
|
961
|
+
const m = Array.isArray(d) ? d : g;
|
|
962
|
+
if (m.length === 0) return "accept";
|
|
963
|
+
a = u(m);
|
|
976
964
|
} else {
|
|
977
|
-
if (
|
|
978
|
-
|
|
965
|
+
if (g.length === 0) return "accept";
|
|
966
|
+
a = u(g);
|
|
979
967
|
}
|
|
980
968
|
}
|
|
981
969
|
}
|
|
982
|
-
const i =
|
|
970
|
+
const i = n?.events?.onDrop?.(a);
|
|
983
971
|
if (i != null && typeof i.then == "function") {
|
|
984
972
|
e.state.value = "pending";
|
|
985
973
|
let r;
|
|
@@ -987,76 +975,76 @@ async function $e(e) {
|
|
|
987
975
|
r = await i;
|
|
988
976
|
} catch {
|
|
989
977
|
const g = e.entities.initiatingDraggable;
|
|
990
|
-
return
|
|
978
|
+
return P(e, g, "onSelfDragCancel"), M(e, "onDragCancel"), Se(e, e.hovered), "cancel";
|
|
991
979
|
}
|
|
992
980
|
return r === !1 ? (e.state.value = "dragging", "decline") : "accept";
|
|
993
981
|
}
|
|
994
982
|
return i === !1 ? "decline" : "accept";
|
|
995
983
|
}
|
|
996
|
-
function
|
|
984
|
+
function Ze(e) {
|
|
997
985
|
const t = e.entities.initiatingDraggable;
|
|
998
|
-
|
|
986
|
+
P(e, t, "onSelfDragEnd"), M(e, "onDragEnd"), kt(e, e.hovered);
|
|
999
987
|
}
|
|
1000
|
-
function
|
|
988
|
+
function Yt(e) {
|
|
1001
989
|
const t = e.entities.selectingArea;
|
|
1002
990
|
if (!t) return;
|
|
1003
|
-
const
|
|
1004
|
-
|
|
991
|
+
const n = e.entities.selectableAreaMap.get(t), s = [...e.entities.selectedSet];
|
|
992
|
+
n?.events?.onSelected?.(s);
|
|
1005
993
|
}
|
|
1006
|
-
const
|
|
994
|
+
const Xt = (e) => {
|
|
1007
995
|
const t = {
|
|
1008
996
|
current: null
|
|
1009
|
-
},
|
|
1010
|
-
|
|
997
|
+
}, n = { value: 0 }, s = async () => {
|
|
998
|
+
ye(), t.current?.cancel(), t.current = null;
|
|
1011
999
|
const r = e.state.value;
|
|
1012
1000
|
if (r === "dragging") {
|
|
1013
|
-
const g = await
|
|
1014
|
-
if (g === "accept" &&
|
|
1015
|
-
|
|
1001
|
+
const g = await Xe(e);
|
|
1002
|
+
if (g === "accept" && Ze(e), g === "accept" || g === "cancel") {
|
|
1003
|
+
te(e), document.removeEventListener("pointerup", s), document.removeEventListener("pointermove", a);
|
|
1016
1004
|
return;
|
|
1017
1005
|
}
|
|
1018
1006
|
return;
|
|
1019
|
-
} else r === "selecting" &&
|
|
1020
|
-
|
|
1021
|
-
},
|
|
1007
|
+
} else r === "selecting" && Yt(e);
|
|
1008
|
+
te(e), document.removeEventListener("pointerup", s), document.removeEventListener("pointermove", a);
|
|
1009
|
+
}, a = (r) => {
|
|
1022
1010
|
if (e.pointer.value && e.state.value !== "pending") {
|
|
1023
|
-
if (e.pointer.value.current = { x: r.clientX, y: r.clientY },
|
|
1024
|
-
|
|
1011
|
+
if (e.pointer.value.current = { x: r.clientX, y: r.clientY }, mt(e)) {
|
|
1012
|
+
le(e, r, "onSelfDragStart"), M(e, "onDragStart");
|
|
1025
1013
|
return;
|
|
1026
1014
|
}
|
|
1027
1015
|
if (e.state.value === "dragging") {
|
|
1028
|
-
|
|
1016
|
+
Vt(e, n);
|
|
1029
1017
|
const g = e.entities.initiatingDraggable;
|
|
1030
|
-
|
|
1018
|
+
P(e, g, "onSelfDragMove"), M(e, "onDragMove");
|
|
1031
1019
|
}
|
|
1032
|
-
e.state.value === "selecting" &&
|
|
1020
|
+
e.state.value === "selecting" && Ge(e);
|
|
1033
1021
|
}
|
|
1034
1022
|
};
|
|
1035
1023
|
return { pointerDown: (r) => {
|
|
1036
|
-
document.addEventListener("pointerup",
|
|
1024
|
+
document.addEventListener("pointerup", s), document.addEventListener("pointermove", a);
|
|
1037
1025
|
const g = r.target, c = g.closest(
|
|
1038
|
-
|
|
1026
|
+
z.SELECT_AREA
|
|
1039
1027
|
), u = g.closest(
|
|
1040
|
-
|
|
1028
|
+
z.DRAGGABLE
|
|
1041
1029
|
);
|
|
1042
1030
|
if (e.entities.modifiersSelectableAreaSet.size > 0 && e.entities.modifiersSelectableAreaSet.has(c)) {
|
|
1043
|
-
|
|
1031
|
+
be(), e.pointer.value = pe(r), e.state.value = "selecting", e.entities.selectingArea = c, e.entities.selectionBase = new Set(e.entities.selectedSet);
|
|
1044
1032
|
return;
|
|
1045
1033
|
}
|
|
1046
1034
|
if (e.entities.modifiersDraggableSet.size > 0 && e.entities.modifiersDraggableSet.has(u)) {
|
|
1047
1035
|
const l = e.entities.draggableMap.get(u);
|
|
1048
|
-
if (!
|
|
1036
|
+
if (!Fe(g, u, l?.dragHandle))
|
|
1049
1037
|
return;
|
|
1050
|
-
|
|
1051
|
-
const f =
|
|
1052
|
-
e.pointer.value =
|
|
1053
|
-
|
|
1054
|
-
}))) : (
|
|
1038
|
+
be(), e.entities.initiatingDraggable = u;
|
|
1039
|
+
const f = _e(r, u);
|
|
1040
|
+
e.pointer.value = pe(r, f.x, f.y), l?.activation?.distance || l?.activation?.delay ? (e.state.value = "activating", l?.activation?.delay && (e.delay.startTime = Date.now(), t.current = ht(e, () => {
|
|
1041
|
+
ee(e), le(e, r, "onSelfDragStart"), M(e, "onDragStart");
|
|
1042
|
+
}))) : (ee(e), le(e, r, "onSelfDragStart"), M(e, "onDragStart"));
|
|
1055
1043
|
}
|
|
1056
|
-
}, pointerUp:
|
|
1057
|
-
t.current?.cancel(), document.removeEventListener("pointerup",
|
|
1044
|
+
}, pointerUp: s, pointerMove: a, cleanup: () => {
|
|
1045
|
+
t.current?.cancel(), document.removeEventListener("pointerup", s), document.removeEventListener("pointermove", a), e.lib.draggableObserver.disconnect(), e.lib.droppableObserver.disconnect(), e.lib.selectableAreaObserver.disconnect(), e.lib.overlaySizeObserver.disconnect();
|
|
1058
1046
|
} };
|
|
1059
|
-
},
|
|
1047
|
+
}, Zt = {
|
|
1060
1048
|
ArrowUp: { dx: 0, dy: -1 },
|
|
1061
1049
|
ArrowDown: { dx: 0, dy: 1 },
|
|
1062
1050
|
ArrowLeft: { dx: -1, dy: 0 },
|
|
@@ -1065,139 +1053,139 @@ const Wt = (e) => {
|
|
|
1065
1053
|
KeyA: { dx: -1, dy: 0 },
|
|
1066
1054
|
KeyS: { dx: 0, dy: 1 },
|
|
1067
1055
|
KeyD: { dx: 1, dy: 0 }
|
|
1068
|
-
},
|
|
1069
|
-
const { keys:
|
|
1070
|
-
if (console.log(t.code),
|
|
1071
|
-
if (
|
|
1072
|
-
t.preventDefault(),
|
|
1056
|
+
}, Ut = (e) => (t) => {
|
|
1057
|
+
const { keys: n } = e.keyboard;
|
|
1058
|
+
if (console.log(t.code), n.pressedKeys.value.add(t.code), e.state.value === "dragging") {
|
|
1059
|
+
if (n.forCancel.includes(t.code)) {
|
|
1060
|
+
t.preventDefault(), ye(), P(
|
|
1073
1061
|
e,
|
|
1074
1062
|
e.entities.initiatingDraggable,
|
|
1075
1063
|
"onSelfDragCancel"
|
|
1076
|
-
),
|
|
1064
|
+
), M(e, "onDragCancel"), Se(e, e.hovered), te(e);
|
|
1077
1065
|
return;
|
|
1078
1066
|
}
|
|
1079
|
-
if (
|
|
1080
|
-
t.preventDefault(), (async () => (await
|
|
1067
|
+
if (n.forDrop.includes(t.code)) {
|
|
1068
|
+
t.preventDefault(), (async () => (await Xe(e) && Ze(e), ye(), te(e)))();
|
|
1081
1069
|
return;
|
|
1082
1070
|
}
|
|
1083
|
-
const
|
|
1084
|
-
if (
|
|
1071
|
+
const a = Zt[t.code];
|
|
1072
|
+
if (a && n.forMove.includes(t.code) && e.pointer.value) {
|
|
1085
1073
|
t.preventDefault();
|
|
1086
|
-
const i =
|
|
1087
|
-
(
|
|
1088
|
-
),
|
|
1074
|
+
const i = n.forMoveFaster.some(
|
|
1075
|
+
(g) => n.pressedKeys.value.has(g)
|
|
1076
|
+
), o = e.keyboard.step * (i ? e.keyboard.moveFaster : 1);
|
|
1089
1077
|
e.pointer.value.current = {
|
|
1090
|
-
x: e.pointer.value.current.x +
|
|
1091
|
-
y: e.pointer.value.current.y +
|
|
1078
|
+
x: e.pointer.value.current.x + a.dx * o,
|
|
1079
|
+
y: e.pointer.value.current.y + a.dy * o
|
|
1092
1080
|
};
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1081
|
+
const r = Me(e);
|
|
1082
|
+
De(e, e.hovered, r), P(
|
|
1095
1083
|
e,
|
|
1096
1084
|
e.entities.initiatingDraggable,
|
|
1097
1085
|
"onSelfDragMove"
|
|
1098
|
-
),
|
|
1086
|
+
), M(e, "onDragMove");
|
|
1099
1087
|
return;
|
|
1100
1088
|
}
|
|
1101
1089
|
return;
|
|
1102
1090
|
}
|
|
1103
|
-
if (
|
|
1104
|
-
const
|
|
1105
|
-
if (!
|
|
1106
|
-
const i =
|
|
1107
|
-
|
|
1091
|
+
if (n.forDrag.includes(t.code)) {
|
|
1092
|
+
const a = document.activeElement;
|
|
1093
|
+
if (!a) return;
|
|
1094
|
+
const i = a.closest(
|
|
1095
|
+
z.DRAGGABLE
|
|
1108
1096
|
);
|
|
1109
1097
|
if (!i || e.entities.modifiersDraggableSet.size === 0 || !e.entities.modifiersDraggableSet.has(i))
|
|
1110
1098
|
return;
|
|
1111
|
-
const
|
|
1112
|
-
if (!
|
|
1099
|
+
const o = e.entities.draggableMap.get(i);
|
|
1100
|
+
if (!Fe(a, i, o?.dragHandle, !0))
|
|
1113
1101
|
return;
|
|
1114
|
-
t.preventDefault(),
|
|
1102
|
+
t.preventDefault(), be();
|
|
1115
1103
|
const r = i.getBoundingClientRect(), g = r.left + r.width / 2, c = r.top + r.height / 2, u = {
|
|
1116
1104
|
clientX: g,
|
|
1117
1105
|
clientY: c
|
|
1118
1106
|
};
|
|
1119
1107
|
e.entities.initiatingDraggable = i;
|
|
1120
|
-
const l =
|
|
1121
|
-
e.pointer.value =
|
|
1108
|
+
const l = _e(u, i);
|
|
1109
|
+
e.pointer.value = pe(
|
|
1122
1110
|
u,
|
|
1123
1111
|
l.x,
|
|
1124
1112
|
l.y
|
|
1125
|
-
),
|
|
1126
|
-
const
|
|
1127
|
-
|
|
1113
|
+
), ee(e);
|
|
1114
|
+
const f = Me(e);
|
|
1115
|
+
De(e, e.hovered, f), P(e, i, "onSelfDragStart"), M(e, "onDragStart");
|
|
1128
1116
|
}
|
|
1129
|
-
},
|
|
1117
|
+
}, $t = (e) => (t) => {
|
|
1130
1118
|
e.keyboard.keys.pressedKeys.value.delete(t.code);
|
|
1131
|
-
},
|
|
1119
|
+
}, qt = (e) => () => {
|
|
1132
1120
|
e.keyboard.keys.pressedKeys.value.clear();
|
|
1133
|
-
},
|
|
1134
|
-
keyDown:
|
|
1135
|
-
keyUp:
|
|
1136
|
-
clear:
|
|
1137
|
-
},
|
|
1121
|
+
}, de = {
|
|
1122
|
+
keyDown: Ut,
|
|
1123
|
+
keyUp: $t,
|
|
1124
|
+
clear: qt
|
|
1125
|
+
}, Wt = (e) => () => {
|
|
1138
1126
|
if (!e.state.value) return;
|
|
1139
|
-
const t = e.scrollPosition.x,
|
|
1127
|
+
const t = e.scrollPosition.x, n = e.scrollPosition.y;
|
|
1140
1128
|
if (e.scrollPosition.x = window.scrollX, e.scrollPosition.y = window.scrollY, e.lib.rectCache.clear(), e.state.value === "dragging") {
|
|
1141
|
-
|
|
1129
|
+
we(e);
|
|
1142
1130
|
return;
|
|
1143
1131
|
}
|
|
1144
1132
|
if (e.state.value === "selecting" && e.pointer.value) {
|
|
1145
|
-
const
|
|
1146
|
-
e.pointer.value.start.x -=
|
|
1133
|
+
const s = window.scrollX - t, a = window.scrollY - n;
|
|
1134
|
+
e.pointer.value.start.x -= s, e.pointer.value.start.y -= a, Ge(e);
|
|
1147
1135
|
}
|
|
1148
|
-
},
|
|
1149
|
-
function
|
|
1136
|
+
}, E = 50, jt = 144, ke = 1e3 / jt;
|
|
1137
|
+
function Jt(e) {
|
|
1150
1138
|
return e == null ? {
|
|
1151
|
-
top:
|
|
1152
|
-
right:
|
|
1153
|
-
bottom:
|
|
1154
|
-
left:
|
|
1139
|
+
top: E,
|
|
1140
|
+
right: E,
|
|
1141
|
+
bottom: E,
|
|
1142
|
+
left: E
|
|
1155
1143
|
} : typeof e == "number" ? {
|
|
1156
1144
|
top: e,
|
|
1157
1145
|
right: e,
|
|
1158
1146
|
bottom: e,
|
|
1159
1147
|
left: e
|
|
1160
1148
|
} : {
|
|
1161
|
-
top: e.top ??
|
|
1162
|
-
right: e.right ??
|
|
1163
|
-
bottom: e.bottom ??
|
|
1164
|
-
left: e.left ??
|
|
1149
|
+
top: e.top ?? E,
|
|
1150
|
+
right: e.right ?? E,
|
|
1151
|
+
bottom: e.bottom ?? E,
|
|
1152
|
+
left: e.left ?? E
|
|
1165
1153
|
};
|
|
1166
1154
|
}
|
|
1167
|
-
const
|
|
1155
|
+
const Qt = {
|
|
1168
1156
|
getScrollState(e) {
|
|
1169
1157
|
return {
|
|
1170
1158
|
scrollTop: e.scrollTop,
|
|
1171
1159
|
scrollLeft: e.scrollLeft
|
|
1172
1160
|
};
|
|
1173
1161
|
},
|
|
1174
|
-
setScroll(e, t,
|
|
1175
|
-
e.scrollTop = t, e.scrollLeft =
|
|
1162
|
+
setScroll(e, t, n) {
|
|
1163
|
+
e.scrollTop = t, e.scrollLeft = n;
|
|
1176
1164
|
}
|
|
1177
1165
|
};
|
|
1178
|
-
function
|
|
1179
|
-
const { speed: i = 10, disabled:
|
|
1166
|
+
function Ue(e, t, n, s = Qt, a) {
|
|
1167
|
+
const { speed: i = 10, disabled: o = !1 } = t, r = Jt(t.threshold);
|
|
1180
1168
|
let g = null, c = null, u = null, l = 0, f = 0;
|
|
1181
|
-
const d = (
|
|
1182
|
-
|
|
1183
|
-
}, m = (
|
|
1184
|
-
const
|
|
1185
|
-
if (!
|
|
1169
|
+
const d = (y) => {
|
|
1170
|
+
a && (a.value = y);
|
|
1171
|
+
}, m = (y) => {
|
|
1172
|
+
const R = e.value, x = n();
|
|
1173
|
+
if (!R || !x || o) {
|
|
1186
1174
|
d(!1);
|
|
1187
1175
|
return;
|
|
1188
1176
|
}
|
|
1189
|
-
c || (c =
|
|
1190
|
-
const
|
|
1191
|
-
if (
|
|
1177
|
+
c || (c = y);
|
|
1178
|
+
const Z = y - c;
|
|
1179
|
+
if (Z < ke) {
|
|
1192
1180
|
g = requestAnimationFrame(m);
|
|
1193
1181
|
return;
|
|
1194
1182
|
}
|
|
1195
|
-
const
|
|
1196
|
-
c =
|
|
1197
|
-
const { scrollTop: v, scrollLeft:
|
|
1198
|
-
(!u || l !== v || f !==
|
|
1199
|
-
let
|
|
1200
|
-
r.top > 0 &&
|
|
1183
|
+
const p = i * (Z / ke);
|
|
1184
|
+
c = y;
|
|
1185
|
+
const { scrollTop: v, scrollLeft: G } = s.getScrollState(R);
|
|
1186
|
+
(!u || l !== v || f !== G) && (u = s.getRect ? s.getRect(R) : R.getBoundingClientRect(), l = v, f = G);
|
|
1187
|
+
let B = !1, oe = v, ie = G;
|
|
1188
|
+
r.top > 0 && x.y - u.top < r.top ? (oe = v - p, B = !0) : r.bottom > 0 && u.bottom - x.y < r.bottom && (oe = v + p, B = !0), r.left > 0 && x.x - u.left < r.left ? (ie = G - p, B = !0) : r.right > 0 && u.right - x.x < r.right && (ie = G + p, B = !0), B && s.setScroll(R, oe, ie), d(B), g = requestAnimationFrame(m);
|
|
1201
1189
|
};
|
|
1202
1190
|
return { run: () => {
|
|
1203
1191
|
c = null, g = requestAnimationFrame(m);
|
|
@@ -1205,27 +1193,27 @@ function We(e, t, s, n = on, o) {
|
|
|
1205
1193
|
g && (cancelAnimationFrame(g), g = null), u = null, l = 0, f = 0, c = null, d(!1);
|
|
1206
1194
|
} };
|
|
1207
1195
|
}
|
|
1208
|
-
const
|
|
1196
|
+
const en = {
|
|
1209
1197
|
getScrollState() {
|
|
1210
1198
|
return {
|
|
1211
1199
|
scrollTop: window.scrollY ?? document.documentElement.scrollTop,
|
|
1212
1200
|
scrollLeft: window.scrollX ?? document.documentElement.scrollLeft
|
|
1213
1201
|
};
|
|
1214
1202
|
},
|
|
1215
|
-
setScroll(e, t,
|
|
1216
|
-
window.scrollTo(
|
|
1203
|
+
setScroll(e, t, n) {
|
|
1204
|
+
window.scrollTo(n, t);
|
|
1217
1205
|
},
|
|
1218
1206
|
getRect() {
|
|
1219
1207
|
return new DOMRect(0, 0, window.innerWidth, window.innerHeight);
|
|
1220
1208
|
}
|
|
1221
|
-
},
|
|
1209
|
+
}, tn = {
|
|
1222
1210
|
get value() {
|
|
1223
1211
|
return typeof document < "u" ? document.documentElement : null;
|
|
1224
1212
|
}
|
|
1225
1213
|
};
|
|
1226
|
-
function
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1214
|
+
function nn(e, t) {
|
|
1215
|
+
const n = J(!1), a = Ue(
|
|
1216
|
+
tn,
|
|
1229
1217
|
t ?? {},
|
|
1230
1218
|
() => {
|
|
1231
1219
|
if (e.state.value !== "dragging") return null;
|
|
@@ -1235,41 +1223,41 @@ function ln(e, t) {
|
|
|
1235
1223
|
y: r.y + g.height / 2
|
|
1236
1224
|
} : r : null;
|
|
1237
1225
|
},
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
), i =
|
|
1226
|
+
en,
|
|
1227
|
+
n
|
|
1228
|
+
), i = ne(
|
|
1241
1229
|
() => e.state.value,
|
|
1242
1230
|
(r) => {
|
|
1243
|
-
r === "dragging" ?
|
|
1231
|
+
r === "dragging" ? a.run() : a.stop();
|
|
1244
1232
|
}
|
|
1245
|
-
),
|
|
1246
|
-
i(),
|
|
1233
|
+
), o = () => {
|
|
1234
|
+
i(), a.stop();
|
|
1247
1235
|
};
|
|
1248
|
-
return
|
|
1236
|
+
return qe(o), { isScrolling: n, stop: o };
|
|
1249
1237
|
}
|
|
1250
|
-
const
|
|
1251
|
-
const t =
|
|
1252
|
-
let
|
|
1253
|
-
|
|
1238
|
+
const sn = (e) => {
|
|
1239
|
+
const t = Xt(e), n = de.keyDown(e), s = de.keyUp(e), a = de.clear(e), i = Wt(e);
|
|
1240
|
+
let o = null;
|
|
1241
|
+
ne(
|
|
1254
1242
|
e.autoScrollViewport,
|
|
1255
1243
|
(r) => {
|
|
1256
|
-
|
|
1244
|
+
o?.(), o = null, (r === !0 || r && typeof r == "object") && (o = nn(
|
|
1257
1245
|
e,
|
|
1258
1246
|
r === !0 ? {} : r
|
|
1259
1247
|
).stop);
|
|
1260
1248
|
},
|
|
1261
1249
|
{ immediate: !0 }
|
|
1262
|
-
),
|
|
1263
|
-
document.addEventListener("pointerdown", t.pointerDown), document.addEventListener("keydown",
|
|
1264
|
-
}),
|
|
1265
|
-
document.removeEventListener("pointerdown", t.pointerDown), document.removeEventListener("pointerup", t.pointerUp), document.removeEventListener("pointermove", t.pointerMove), document.removeEventListener("keydown",
|
|
1250
|
+
), V(() => {
|
|
1251
|
+
document.addEventListener("pointerdown", t.pointerDown), document.addEventListener("keydown", n), document.addEventListener("keyup", s), document.addEventListener("blur", a), document.addEventListener("scroll", i, !0);
|
|
1252
|
+
}), Y(() => {
|
|
1253
|
+
document.removeEventListener("pointerdown", t.pointerDown), document.removeEventListener("pointerup", t.pointerUp), document.removeEventListener("pointermove", t.pointerMove), document.removeEventListener("keydown", n), document.removeEventListener("keyup", s), document.removeEventListener("blur", a), document.removeEventListener("scroll", i, !0), o?.(), t.cleanup();
|
|
1266
1254
|
});
|
|
1267
|
-
},
|
|
1268
|
-
const e =
|
|
1255
|
+
}, ae = () => {
|
|
1256
|
+
const e = Pe(Ae);
|
|
1269
1257
|
if (!e) throw Error("DnD provider not found");
|
|
1270
1258
|
return e;
|
|
1271
|
-
},
|
|
1272
|
-
const e =
|
|
1259
|
+
}, $e = () => {
|
|
1260
|
+
const e = ae();
|
|
1273
1261
|
return {
|
|
1274
1262
|
overlay: e.overlay,
|
|
1275
1263
|
delay: e.delay,
|
|
@@ -1283,31 +1271,31 @@ const cn = (e) => {
|
|
|
1283
1271
|
collision: e.collision,
|
|
1284
1272
|
autoScrollViewport: e.autoScrollViewport
|
|
1285
1273
|
};
|
|
1286
|
-
},
|
|
1274
|
+
}, an = /* @__PURE__ */ Be({
|
|
1287
1275
|
__name: "DefaultOverlay",
|
|
1288
1276
|
setup(e) {
|
|
1289
|
-
const { entities: t, state:
|
|
1290
|
-
return (
|
|
1277
|
+
const { entities: t, state: n, overlay: s } = $e();
|
|
1278
|
+
return (a, i) => N(n) === "dragging" ? (L(), W("div", {
|
|
1291
1279
|
key: 0,
|
|
1292
1280
|
class: "dnd-kit-default-overlay",
|
|
1293
|
-
style:
|
|
1294
|
-
"--position-x":
|
|
1295
|
-
"--position-y":
|
|
1281
|
+
style: Le({
|
|
1282
|
+
"--position-x": N(s).position.value.x + "px",
|
|
1283
|
+
"--position-y": N(s).position.value.y + "px"
|
|
1296
1284
|
})
|
|
1297
1285
|
}, [
|
|
1298
|
-
(
|
|
1299
|
-
r.render ? (
|
|
1286
|
+
(L(!0), W(me, null, We(N(t).draggingMap, ([o, r]) => (L(), W(me, null, [
|
|
1287
|
+
r.render ? (L(), Q(he(r.render), { key: 0 })) : (L(), Q(he(o.tagName), {
|
|
1300
1288
|
key: 1,
|
|
1301
1289
|
innerHTML: r.initialOuterHTML,
|
|
1302
|
-
style:
|
|
1290
|
+
style: Le({
|
|
1303
1291
|
width: r.initialRect.width + "px",
|
|
1304
1292
|
height: r.initialRect.height + "px"
|
|
1305
1293
|
})
|
|
1306
1294
|
}, null, 8, ["innerHTML", "style"]))
|
|
1307
1295
|
], 64))), 256))
|
|
1308
|
-
], 4)) :
|
|
1296
|
+
], 4)) : je("", !0);
|
|
1309
1297
|
}
|
|
1310
|
-
}),
|
|
1298
|
+
}), rn = /* @__PURE__ */ Be({
|
|
1311
1299
|
__name: "DnDProvider",
|
|
1312
1300
|
props: {
|
|
1313
1301
|
autoScrollViewport: { type: [Object, Boolean, null] },
|
|
@@ -1316,69 +1304,69 @@ const cn = (e) => {
|
|
|
1316
1304
|
class: {}
|
|
1317
1305
|
},
|
|
1318
1306
|
setup(e) {
|
|
1319
|
-
const t = e,
|
|
1320
|
-
|
|
1321
|
-
const
|
|
1322
|
-
() =>
|
|
1307
|
+
const t = e, n = Je("overlayRef"), s = Dt(n, t);
|
|
1308
|
+
sn(s);
|
|
1309
|
+
const a = b(
|
|
1310
|
+
() => s.overlay.render.value ?? an
|
|
1323
1311
|
);
|
|
1324
|
-
return
|
|
1312
|
+
return Qe(Ae, s), (i, o) => (L(), W(me, null, [
|
|
1325
1313
|
Ie(i.$slots, "default"),
|
|
1326
|
-
(
|
|
1327
|
-
to:
|
|
1314
|
+
(L(), Q(et, {
|
|
1315
|
+
to: N(s).overlay.to.value || "body"
|
|
1328
1316
|
}, [
|
|
1329
|
-
|
|
1317
|
+
tt("div", nt({
|
|
1330
1318
|
ref_key: "overlayRef",
|
|
1331
|
-
ref:
|
|
1319
|
+
ref: n,
|
|
1332
1320
|
class: "dnd-kit-overlay-container"
|
|
1333
1321
|
}, t), [
|
|
1334
|
-
Ie(i.$slots, "overlay", { overlay:
|
|
1335
|
-
(
|
|
1322
|
+
Ie(i.$slots, "overlay", { overlay: a.value }, () => [
|
|
1323
|
+
(L(), Q(he(a.value)))
|
|
1336
1324
|
])
|
|
1337
1325
|
], 16)
|
|
1338
1326
|
], 8, ["to"]))
|
|
1339
1327
|
], 64));
|
|
1340
1328
|
}
|
|
1341
1329
|
});
|
|
1342
|
-
function
|
|
1343
|
-
const
|
|
1344
|
-
let
|
|
1345
|
-
typeof t == "function" ? (
|
|
1346
|
-
const r =
|
|
1330
|
+
function ln(e, t, n) {
|
|
1331
|
+
const s = ae();
|
|
1332
|
+
let a, i, o;
|
|
1333
|
+
typeof t == "function" ? (a = {}, i = t) : (a = t ?? {}, i = n);
|
|
1334
|
+
const r = b({
|
|
1347
1335
|
get() {
|
|
1348
|
-
const l =
|
|
1349
|
-
return l ?
|
|
1336
|
+
const l = S(e);
|
|
1337
|
+
return l ? s.entities.selectedSet.has(l) : !1;
|
|
1350
1338
|
},
|
|
1351
1339
|
set(l) {
|
|
1352
|
-
const f =
|
|
1353
|
-
f &&
|
|
1340
|
+
const f = S(e);
|
|
1341
|
+
f && s.entities.selectedSet[l ? "add" : "delete"](f);
|
|
1354
1342
|
}
|
|
1355
|
-
}), g =
|
|
1356
|
-
const l =
|
|
1357
|
-
return l ?
|
|
1358
|
-
}), c =
|
|
1359
|
-
const l =
|
|
1360
|
-
return l ?
|
|
1361
|
-
}), u =
|
|
1362
|
-
const l =
|
|
1343
|
+
}), g = b(() => {
|
|
1344
|
+
const l = S(e);
|
|
1345
|
+
return l ? s.entities.draggingMap.has(l) : !1;
|
|
1346
|
+
}), c = b(() => {
|
|
1347
|
+
const l = S(e);
|
|
1348
|
+
return l ? s.entities.allowedDraggableSet.has(l) : !1;
|
|
1349
|
+
}), u = b(() => {
|
|
1350
|
+
const l = S(e);
|
|
1363
1351
|
if (l)
|
|
1364
|
-
return
|
|
1352
|
+
return s.entities.draggableMap.get(l)?.hoveredPlacement;
|
|
1365
1353
|
});
|
|
1366
|
-
return
|
|
1367
|
-
|
|
1368
|
-
render:
|
|
1369
|
-
disabled:
|
|
1370
|
-
groups:
|
|
1371
|
-
modifier:
|
|
1372
|
-
events:
|
|
1354
|
+
return V(() => {
|
|
1355
|
+
o = S(e), o && (o.addEventListener("dragstart", D), o.addEventListener("drag", D), o.addEventListener("dragend", D), o.setAttribute(k.DRAGGABLE, ""), s.lib.draggableObserver.observe(o), s.entities.draggableMap.set(o, {
|
|
1356
|
+
render: a.render,
|
|
1357
|
+
disabled: a.disabled ?? !1,
|
|
1358
|
+
groups: a.groups ?? [],
|
|
1359
|
+
modifier: a.modifier,
|
|
1360
|
+
events: a.events,
|
|
1373
1361
|
payload: i,
|
|
1374
|
-
data:
|
|
1375
|
-
dragHandle:
|
|
1376
|
-
activation:
|
|
1377
|
-
placementMargins:
|
|
1362
|
+
data: a.data,
|
|
1363
|
+
dragHandle: a.dragHandle,
|
|
1364
|
+
activation: a.activation,
|
|
1365
|
+
placementMargins: a.placementMargins,
|
|
1378
1366
|
hoveredPlacement: void 0
|
|
1379
1367
|
}));
|
|
1380
|
-
}),
|
|
1381
|
-
|
|
1368
|
+
}), Y(() => {
|
|
1369
|
+
o && (s.lib.draggableObserver.unobserve(o), s.entities.visibleDraggableSet.delete(o), s.entities.draggableMap.delete(o), s.entities.modifiersDraggableSet.delete(o));
|
|
1382
1370
|
}), {
|
|
1383
1371
|
selected: r,
|
|
1384
1372
|
isDragging: g,
|
|
@@ -1386,11 +1374,11 @@ function hn(e, t, s) {
|
|
|
1386
1374
|
isDragOver: u
|
|
1387
1375
|
};
|
|
1388
1376
|
}
|
|
1389
|
-
const
|
|
1390
|
-
const
|
|
1391
|
-
let
|
|
1392
|
-
|
|
1393
|
-
|
|
1377
|
+
const cn = (e, t) => {
|
|
1378
|
+
const n = ae(), s = b(() => e.value === n.entities.selectingArea);
|
|
1379
|
+
let a = null;
|
|
1380
|
+
V(() => {
|
|
1381
|
+
a = S(e), a && (a.setAttribute(k.SELECT_AREA, ""), n.lib.selectableAreaObserver.observe(a), n.entities.selectableAreaMap.set(a, {
|
|
1394
1382
|
modifier: t?.modifier ?? {
|
|
1395
1383
|
keys: ["ControlLeft"],
|
|
1396
1384
|
method: "every"
|
|
@@ -1399,234 +1387,90 @@ const bn = (e, t) => {
|
|
|
1399
1387
|
disabled: t?.disabled ?? !1,
|
|
1400
1388
|
groups: t?.groups ?? []
|
|
1401
1389
|
}));
|
|
1402
|
-
}),
|
|
1403
|
-
|
|
1390
|
+
}), Y(() => {
|
|
1391
|
+
a && (n.lib.selectableAreaObserver.unobserve(a), n.entities.visibleSelectableAreaSet.delete(a), n.entities.modifiersSelectableAreaSet.delete(a), n.entities.selectableAreaMap.delete(a));
|
|
1404
1392
|
});
|
|
1405
|
-
const i =
|
|
1406
|
-
|
|
1407
|
-
const
|
|
1408
|
-
return !
|
|
1393
|
+
const i = b(() => {
|
|
1394
|
+
n.scrollPosition.x, n.scrollPosition.y;
|
|
1395
|
+
const o = n.pointer.value;
|
|
1396
|
+
return !o || n.state.value !== "selecting" || !a || !s.value ? {} : Mt(o.start, o.current, a);
|
|
1409
1397
|
});
|
|
1410
1398
|
return {
|
|
1411
|
-
isSelecting:
|
|
1399
|
+
isSelecting: s,
|
|
1412
1400
|
style: i
|
|
1413
1401
|
};
|
|
1414
1402
|
};
|
|
1415
|
-
function
|
|
1416
|
-
const
|
|
1417
|
-
if (!
|
|
1418
|
-
let
|
|
1419
|
-
return
|
|
1420
|
-
|
|
1403
|
+
function gn(e, t) {
|
|
1404
|
+
const n = Pe(Ae);
|
|
1405
|
+
if (!n) throw Error("DnD provider not found");
|
|
1406
|
+
let s = null;
|
|
1407
|
+
return V(() => {
|
|
1408
|
+
s = S(e), s && (s.setAttribute(k.CONSTRAINT_AREA, ""), n.entities.constraintsAreaMap.set(s, {
|
|
1421
1409
|
axis: t?.axis || "both",
|
|
1422
1410
|
restrictToArea: t?.restrictToArea || !1
|
|
1423
1411
|
}));
|
|
1424
|
-
}),
|
|
1425
|
-
|
|
1412
|
+
}), Y(() => {
|
|
1413
|
+
s && n.entities.constraintsAreaMap.delete(s);
|
|
1426
1414
|
}), {};
|
|
1427
1415
|
}
|
|
1428
|
-
function
|
|
1429
|
-
const
|
|
1430
|
-
let
|
|
1431
|
-
typeof t == "function" ? (i = {},
|
|
1432
|
-
const r =
|
|
1433
|
-
const c =
|
|
1434
|
-
return c ?
|
|
1435
|
-
}), g =
|
|
1436
|
-
const c =
|
|
1416
|
+
function un(e, t, n) {
|
|
1417
|
+
const s = ae();
|
|
1418
|
+
let a = null, i, o;
|
|
1419
|
+
typeof t == "function" ? (i = {}, o = t) : (i = t ?? {}, o = n);
|
|
1420
|
+
const r = b(() => {
|
|
1421
|
+
const c = S(e);
|
|
1422
|
+
return c ? s.entities.allowedDroppableSet.has(c) : !1;
|
|
1423
|
+
}), g = b(() => {
|
|
1424
|
+
const c = S(e);
|
|
1437
1425
|
if (c)
|
|
1438
|
-
return
|
|
1426
|
+
return s.entities.droppableMap.get(c)?.hoveredPlacement;
|
|
1439
1427
|
});
|
|
1440
|
-
return
|
|
1441
|
-
|
|
1428
|
+
return V(() => {
|
|
1429
|
+
a = S(e), a && (a.setAttribute(k.DROPPABLE, ""), s.lib.droppableObserver.observe(a), s.entities.droppableMap.set(a, {
|
|
1442
1430
|
disabled: i.disabled ?? !1,
|
|
1443
1431
|
groups: i.groups ?? [],
|
|
1444
1432
|
groupMatch: i.groupMatch ?? "every",
|
|
1445
1433
|
events: i.events,
|
|
1446
|
-
payload:
|
|
1434
|
+
payload: o,
|
|
1447
1435
|
data: i.data,
|
|
1448
1436
|
hoveredPlacement: void 0
|
|
1449
1437
|
}));
|
|
1450
|
-
}),
|
|
1451
|
-
|
|
1438
|
+
}), Y(() => {
|
|
1439
|
+
a && (s.lib.droppableObserver.unobserve(a), s.entities.visibleDroppableSet.delete(a), s.entities.droppableMap.delete(a));
|
|
1452
1440
|
}), {
|
|
1453
1441
|
isAllowed: r,
|
|
1454
1442
|
isDragOver: g
|
|
1455
1443
|
};
|
|
1456
1444
|
}
|
|
1457
|
-
const
|
|
1458
|
-
const
|
|
1445
|
+
const fn = (e, t) => {
|
|
1446
|
+
const n = $e(), s = J(!1), i = Ue(
|
|
1459
1447
|
e,
|
|
1460
1448
|
t ?? {},
|
|
1461
1449
|
() => {
|
|
1462
|
-
if (
|
|
1463
|
-
const
|
|
1464
|
-
return
|
|
1465
|
-
x:
|
|
1466
|
-
y:
|
|
1467
|
-
} :
|
|
1450
|
+
if (n.state.value !== "dragging") return null;
|
|
1451
|
+
const o = n.overlay.position.value, r = n.overlay.size.value;
|
|
1452
|
+
return o ? r?.width && r?.height ? {
|
|
1453
|
+
x: o.x + r.width / 2,
|
|
1454
|
+
y: o.y + r.height / 2
|
|
1455
|
+
} : o : null;
|
|
1468
1456
|
},
|
|
1469
1457
|
void 0,
|
|
1470
|
-
|
|
1458
|
+
s
|
|
1471
1459
|
);
|
|
1472
|
-
return
|
|
1473
|
-
() =>
|
|
1474
|
-
(
|
|
1475
|
-
|
|
1476
|
-
}
|
|
1477
|
-
), { isScrolling: n };
|
|
1478
|
-
}, ze = () => !0, Be = () => 0, un = "separate", fn = () => {
|
|
1479
|
-
const e = {
|
|
1480
|
-
filterElements: ze,
|
|
1481
|
-
filterZones: ze,
|
|
1482
|
-
sortElements: Be,
|
|
1483
|
-
sortZones: Be,
|
|
1484
|
-
mergeStrategy: un,
|
|
1485
|
-
pickClosestBetweenFirst: !1
|
|
1486
|
-
}, t = (n, o, i, a, r, g, c) => {
|
|
1487
|
-
const u = a instanceof Set ? a : new Set(a), l = { containerBox: o, pointer: i }, f = e.minOverlapPercent, d = [];
|
|
1488
|
-
for (const m of u) {
|
|
1489
|
-
if (!r(m, n)) continue;
|
|
1490
|
-
const h = Y(m);
|
|
1491
|
-
if (!c(h, l)) continue;
|
|
1492
|
-
const y = Q(h, o);
|
|
1493
|
-
if (f !== void 0 && y < f) continue;
|
|
1494
|
-
let b = 0;
|
|
1495
|
-
for (const w of u)
|
|
1496
|
-
w !== m && G(w, m) && b++;
|
|
1497
|
-
d.push({
|
|
1498
|
-
node: m,
|
|
1499
|
-
box: h,
|
|
1500
|
-
meta: {
|
|
1501
|
-
isPointerInElement: Kt(h, i.x, i.y),
|
|
1502
|
-
overlapPercent: y,
|
|
1503
|
-
depth: b,
|
|
1504
|
-
centerDistance: Ht(
|
|
1505
|
-
N(o),
|
|
1506
|
-
N(h)
|
|
1507
|
-
)
|
|
1508
|
-
}
|
|
1509
|
-
});
|
|
1510
|
-
}
|
|
1511
|
-
return d.sort((m, h) => g(m, h, l)), d;
|
|
1512
|
-
}, s = {
|
|
1513
|
-
container(n) {
|
|
1514
|
-
return e.container = n, s;
|
|
1515
|
-
},
|
|
1516
|
-
containerBox(n) {
|
|
1517
|
-
return e.containerBox = n, s;
|
|
1518
|
-
},
|
|
1519
|
-
elements(n) {
|
|
1520
|
-
return e.elements = n, s;
|
|
1521
|
-
},
|
|
1522
|
-
zones(n) {
|
|
1523
|
-
return e.zones = n, s;
|
|
1524
|
-
},
|
|
1525
|
-
filterElements(n) {
|
|
1526
|
-
return e.filterElements = n, s;
|
|
1527
|
-
},
|
|
1528
|
-
filterZones(n) {
|
|
1529
|
-
return e.filterZones = n, s;
|
|
1530
|
-
},
|
|
1531
|
-
collision(n) {
|
|
1532
|
-
return e.collision = n, s;
|
|
1533
|
-
},
|
|
1534
|
-
sortElements(n) {
|
|
1535
|
-
return e.sortElements = n, s;
|
|
1536
|
-
},
|
|
1537
|
-
sortZones(n) {
|
|
1538
|
-
return e.sortZones = n, s;
|
|
1539
|
-
},
|
|
1540
|
-
mergeStrategy(n) {
|
|
1541
|
-
return e.mergeStrategy = n, s;
|
|
1542
|
-
},
|
|
1543
|
-
pickClosestBetweenFirst(n) {
|
|
1544
|
-
return e.pickClosestBetweenFirst = n, s;
|
|
1545
|
-
},
|
|
1546
|
-
minOverlapPercent(n) {
|
|
1547
|
-
return e.minOverlapPercent = n, s;
|
|
1548
|
-
},
|
|
1549
|
-
build() {
|
|
1550
|
-
const n = e;
|
|
1551
|
-
if (!n.container || !n.elements || !n.zones || !n.collision)
|
|
1552
|
-
throw new Error(
|
|
1553
|
-
"sensor: container, elements, zones, collision are required"
|
|
1554
|
-
);
|
|
1555
|
-
return (o) => {
|
|
1556
|
-
const i = n.container(o);
|
|
1557
|
-
if (!i) return { elements: [], zones: [] };
|
|
1558
|
-
const a = n.containerBox ? n.containerBox(o) : Y(i), r = o.pointer.value?.current ?? { x: 0, y: 0 }, g = t(
|
|
1559
|
-
o,
|
|
1560
|
-
a,
|
|
1561
|
-
r,
|
|
1562
|
-
n.elements(o),
|
|
1563
|
-
n.filterElements,
|
|
1564
|
-
n.sortElements,
|
|
1565
|
-
n.collision
|
|
1566
|
-
), c = t(
|
|
1567
|
-
o,
|
|
1568
|
-
a,
|
|
1569
|
-
r,
|
|
1570
|
-
n.zones(o),
|
|
1571
|
-
n.filterZones,
|
|
1572
|
-
n.sortZones,
|
|
1573
|
-
n.collision
|
|
1574
|
-
);
|
|
1575
|
-
if (n.mergeStrategy === "unified-closest") {
|
|
1576
|
-
const u = [
|
|
1577
|
-
...g.map((f) => ({
|
|
1578
|
-
node: f.node,
|
|
1579
|
-
box: f.box,
|
|
1580
|
-
isZone: !1,
|
|
1581
|
-
distance: 0
|
|
1582
|
-
})),
|
|
1583
|
-
...c.map((f) => ({
|
|
1584
|
-
node: f.node,
|
|
1585
|
-
box: f.box,
|
|
1586
|
-
isZone: !0,
|
|
1587
|
-
distance: 0
|
|
1588
|
-
}))
|
|
1589
|
-
];
|
|
1590
|
-
if (u.length === 0) return { elements: [], zones: [] };
|
|
1591
|
-
for (const f of u) {
|
|
1592
|
-
const d = N(f.box);
|
|
1593
|
-
f.distance = Math.hypot(
|
|
1594
|
-
r.x - d.x,
|
|
1595
|
-
r.y - d.y
|
|
1596
|
-
);
|
|
1597
|
-
}
|
|
1598
|
-
const l = u.reduce(
|
|
1599
|
-
(f, d) => d.distance < f.distance ? d : f
|
|
1600
|
-
);
|
|
1601
|
-
return l.isZone ? { elements: [], zones: [l.node] } : { elements: [l.node], zones: [] };
|
|
1602
|
-
}
|
|
1603
|
-
if (n.pickClosestBetweenFirst && g[0] && c[0]) {
|
|
1604
|
-
const u = N(c[0].box), l = N(g[0].box), f = Math.hypot(
|
|
1605
|
-
r.x - u.x,
|
|
1606
|
-
r.y - u.y
|
|
1607
|
-
);
|
|
1608
|
-
return Math.hypot(
|
|
1609
|
-
r.x - l.x,
|
|
1610
|
-
r.y - l.y
|
|
1611
|
-
) < f ? { elements: g.map((m) => m.node), zones: [] } : { elements: [], zones: c.map((m) => m.node) };
|
|
1612
|
-
}
|
|
1613
|
-
return {
|
|
1614
|
-
elements: g.map((u) => u.node),
|
|
1615
|
-
zones: c.map((u) => u.node)
|
|
1616
|
-
};
|
|
1617
|
-
};
|
|
1460
|
+
return ne(
|
|
1461
|
+
() => n.state.value,
|
|
1462
|
+
(o) => {
|
|
1463
|
+
o === "dragging" ? i.run() : i.stop();
|
|
1618
1464
|
}
|
|
1619
|
-
};
|
|
1620
|
-
|
|
1621
|
-
}, Dn = () => fn();
|
|
1465
|
+
), { isScrolling: s };
|
|
1466
|
+
};
|
|
1622
1467
|
export {
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
je as useDnDProvider
|
|
1468
|
+
rn as DnDProvider,
|
|
1469
|
+
Me as defaultCollisionDetection,
|
|
1470
|
+
fn as makeAutoScroll,
|
|
1471
|
+
gn as makeConstraintArea,
|
|
1472
|
+
ln as makeDraggable,
|
|
1473
|
+
un as makeDroppable,
|
|
1474
|
+
cn as makeSelectionArea,
|
|
1475
|
+
$e as useDnDProvider
|
|
1632
1476
|
};
|