svelte-dnd-action 0.9.64 → 0.9.66
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/README.md +3 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/src/pointerAction.js +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# SVELTE DND ACTION [](https://snyk.io/test/github/isaacHagoel/svelte-dnd-action?targetFile=package.json)
|
|
2
2
|
|
|
3
|
+
> Shameless plug: If you are making AI Apps check out my brand-new, open source [dev tool](https://github.com/pragmaticfish/sushify)
|
|
4
|
+
|
|
3
5
|
This is a feature-complete implementation of drag and drop for Svelte using a custom action. It supports almost every imaginable drag and drop use-case, any input device and is fully accessible. <br />
|
|
4
6
|
It requires very minimal configuration, while offering a rich set of primitives that allow overriding basically any of its default behaviours (using the handler functions). <br /><br />
|
|
5
7
|
See full features list below. <br />
|
|
@@ -262,7 +264,7 @@ Notes:
|
|
|
262
264
|
- [Unsortable lists with custom aria instructions](https://svelte.dev/playground/e020ea1051dc4ae3ac2b697064f234bc?version=3)
|
|
263
265
|
- [Crazy nesting](https://svelte.dev/playground/fe8c9eca04f9417a94a8b6041df77139?version=3), courtesy of @zahachtah
|
|
264
266
|
- [Generic List Component (Alternative to Slots)](https://svelte.dev/playground/028674733f67409c94bd52995d5906f1?version=3)
|
|
265
|
-
- [
|
|
267
|
+
- [Maintaining internal scroll poisition on scrollable dragabble](https://svelte.dev/playground/eb2f5988bd2f46488810606c1fb13392?version=3)
|
|
266
268
|
- [Scrabble like board using over a 100 single slot dnd-zones](https://svelte.dev/playground/ed2e138417094281be6db1aef23d7859?version=3)
|
|
267
269
|
- [Select multiple elements to drag (multi-drag) with mouse or keyboard](https://svelte.dev/playground/c4eb917bb8df42c4b17402a7dda54856?version=3)
|
|
268
270
|
|
package/dist/index.js
CHANGED
|
@@ -1493,9 +1493,9 @@
|
|
|
1493
1493
|
return;
|
|
1494
1494
|
}
|
|
1495
1495
|
isDraggedOutsideOfAnyDz = false;
|
|
1496
|
-
// this deals with another race condition.
|
|
1496
|
+
// this deals with another race condition. on some occasions (super rapid operations) the list hasn't updated yet
|
|
1497
1497
|
items = items.filter(function (item) {
|
|
1498
|
-
return item[ITEM_ID_KEY] !== shadowElData[ITEM_ID_KEY];
|
|
1498
|
+
return item[ITEM_ID_KEY] !== shadowElData[ITEM_ID_KEY] && item[ITEM_ID_KEY] !== SHADOW_PLACEHOLDER_ITEM_ID;
|
|
1499
1499
|
});
|
|
1500
1500
|
printDebug(function () {
|
|
1501
1501
|
return "dragged entered items ".concat(toString(items));
|
package/dist/index.mjs
CHANGED
|
@@ -1487,9 +1487,9 @@ function handleDraggedEntered(e) {
|
|
|
1487
1487
|
return;
|
|
1488
1488
|
}
|
|
1489
1489
|
isDraggedOutsideOfAnyDz = false;
|
|
1490
|
-
// this deals with another race condition.
|
|
1490
|
+
// this deals with another race condition. on some occasions (super rapid operations) the list hasn't updated yet
|
|
1491
1491
|
items = items.filter(function (item) {
|
|
1492
|
-
return item[ITEM_ID_KEY] !== shadowElData[ITEM_ID_KEY];
|
|
1492
|
+
return item[ITEM_ID_KEY] !== shadowElData[ITEM_ID_KEY] && item[ITEM_ID_KEY] !== SHADOW_PLACEHOLDER_ITEM_ID;
|
|
1493
1493
|
});
|
|
1494
1494
|
printDebug(function () {
|
|
1495
1495
|
return "dragged entered items ".concat(toString(items));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-dnd-action",
|
|
3
3
|
"description": "*An awesome drag and drop library for Svelte 3 and 4 (not using the browser's built-in dnd, thanks god): Rich animations, nested containers, touch support and more *",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.66",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/isaacHagoel/svelte-dnd-action.git"
|
package/src/pointerAction.js
CHANGED
|
@@ -141,8 +141,8 @@ function handleDraggedEntered(e) {
|
|
|
141
141
|
return;
|
|
142
142
|
}
|
|
143
143
|
isDraggedOutsideOfAnyDz = false;
|
|
144
|
-
// this deals with another race condition.
|
|
145
|
-
items = items.filter(item => item[ITEM_ID_KEY] !== shadowElData[ITEM_ID_KEY]);
|
|
144
|
+
// this deals with another race condition. on some occasions (super rapid operations) the list hasn't updated yet
|
|
145
|
+
items = items.filter(item => item[ITEM_ID_KEY] !== shadowElData[ITEM_ID_KEY] && item[ITEM_ID_KEY] !== SHADOW_PLACEHOLDER_ITEM_ID);
|
|
146
146
|
printDebug(() => `dragged entered items ${toString(items)}`);
|
|
147
147
|
|
|
148
148
|
if (originDropZone !== e.currentTarget) {
|