@zyzgroup/core-web 0.1.8 → 0.1.9
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/zyzgroup_core_web.iife.js +1 -1
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +20 -16
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +1 -1
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/hooks/useDragDrop.d.ts +6 -1
- package/types/hooks/useDragDrop.d.ts.map +1 -1
|
@@ -7865,30 +7865,30 @@ function Hu(n, t) {
|
|
|
7865
7865
|
s != "" && n.removeAttribute(s);
|
|
7866
7866
|
});
|
|
7867
7867
|
}
|
|
7868
|
-
function $u(n) {
|
|
7868
|
+
function $u(n, t) {
|
|
7869
7869
|
zn(n, "draggable", "true");
|
|
7870
|
-
const
|
|
7871
|
-
return
|
|
7870
|
+
const e = [];
|
|
7871
|
+
return e.push(
|
|
7872
7872
|
K(
|
|
7873
7873
|
n,
|
|
7874
7874
|
"dragstart",
|
|
7875
|
-
(
|
|
7876
|
-
ue(
|
|
7877
|
-
const
|
|
7878
|
-
|
|
7875
|
+
(s) => {
|
|
7876
|
+
ue(s), Ac(s);
|
|
7877
|
+
const i = s.dataTransfer;
|
|
7878
|
+
i && (i.effectAllowed = "move", i.setData("text/plain", "some-data")), t?.onStart?.(s);
|
|
7879
7879
|
},
|
|
7880
7880
|
!0
|
|
7881
7881
|
)
|
|
7882
|
-
),
|
|
7883
|
-
K(n, "drag", (
|
|
7884
|
-
ue(
|
|
7882
|
+
), e.push(
|
|
7883
|
+
K(n, "drag", (s) => {
|
|
7884
|
+
ue(s), t?.onDrag?.(s);
|
|
7885
7885
|
})
|
|
7886
|
-
),
|
|
7887
|
-
K(n, "dragend", (
|
|
7888
|
-
ue(
|
|
7886
|
+
), e.push(
|
|
7887
|
+
K(n, "dragend", (s) => {
|
|
7888
|
+
ue(s), t?.onEnd?.(s);
|
|
7889
7889
|
})
|
|
7890
7890
|
), () => {
|
|
7891
|
-
|
|
7891
|
+
e.forEach((s) => s());
|
|
7892
7892
|
};
|
|
7893
7893
|
}
|
|
7894
7894
|
function Wu(n, t) {
|
|
@@ -7901,7 +7901,7 @@ function Wu(n, t) {
|
|
|
7901
7901
|
K(n, "dragover", (s) => {
|
|
7902
7902
|
ue(s);
|
|
7903
7903
|
const i = s.dataTransfer;
|
|
7904
|
-
i && (i.dropEffect = "move");
|
|
7904
|
+
i && (i.dropEffect = "move"), t?.onOver?.(s);
|
|
7905
7905
|
})
|
|
7906
7906
|
), e.push(
|
|
7907
7907
|
K(n, "dragleave", (s) => {
|
|
@@ -7911,7 +7911,11 @@ function Wu(n, t) {
|
|
|
7911
7911
|
K(n, "drop", (s) => {
|
|
7912
7912
|
ue(s);
|
|
7913
7913
|
const i = s.dataTransfer;
|
|
7914
|
-
|
|
7914
|
+
if (!i) {
|
|
7915
|
+
t?.onDrop?.(s, []);
|
|
7916
|
+
return;
|
|
7917
|
+
}
|
|
7918
|
+
t?.onDrop?.(s, [...i.files]);
|
|
7915
7919
|
})
|
|
7916
7920
|
), () => {
|
|
7917
7921
|
e.forEach((s) => s());
|