svelte-dnd-action 0.9.55 → 0.9.57

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 CHANGED
@@ -435,6 +435,10 @@ You can use generics to set the type of `items` you are expecting in `DndEvent`.
435
435
  </script>
436
436
  ```
437
437
 
438
+ ##### Svelte 5:
439
+
440
+ Svelte 5 prefers `onconsider` and `onfinalize` (over `on:consider` and `on:finalize`) but works both ways as long as it's consistent within a file.
441
+
438
442
  ### Nested Zones Optional Optimization (experimental)
439
443
 
440
444
  This is an experimental feature added in version 0.9.29. If you have multiple levels of nesting, the lib might do unnecessary work when dragging an element that has nested zones inside.
package/dist/index.js CHANGED
@@ -1810,7 +1810,7 @@
1810
1810
  originIndex = currentIdx;
1811
1811
  originDropZone = originalDragTarget.parentElement;
1812
1812
  /** @type {ShadowRoot | HTMLDocument | Element } */
1813
- var rootNode = originDropZone.closest("dialog") || originDropZone.getRootNode();
1813
+ var rootNode = originDropZone.closest("dialog") || originDropZone.closest("[popover]") || originDropZone.getRootNode();
1814
1814
  var originDropZoneRoot = rootNode.body || rootNode;
1815
1815
  var originalItems = config.items,
1816
1816
  type = config.type,
package/dist/index.mjs CHANGED
@@ -1804,7 +1804,7 @@ function dndzone$2(node, options) {
1804
1804
  originIndex = currentIdx;
1805
1805
  originDropZone = originalDragTarget.parentElement;
1806
1806
  /** @type {ShadowRoot | HTMLDocument | Element } */
1807
- var rootNode = originDropZone.closest("dialog") || originDropZone.getRootNode();
1807
+ var rootNode = originDropZone.closest("dialog") || originDropZone.closest("[popover]") || originDropZone.getRootNode();
1808
1808
  var originDropZoneRoot = rootNode.body || rootNode;
1809
1809
  var originalItems = config.items,
1810
1810
  type = config.type,
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.55",
4
+ "version": "0.9.57",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/isaacHagoel/svelte-dnd-action.git"
@@ -423,7 +423,7 @@ export function dndzone(node, options) {
423
423
  originIndex = currentIdx;
424
424
  originDropZone = originalDragTarget.parentElement;
425
425
  /** @type {ShadowRoot | HTMLDocument | Element } */
426
- const rootNode = originDropZone.closest("dialog") || originDropZone.getRootNode();
426
+ const rootNode = originDropZone.closest("dialog") || originDropZone.closest("[popover]") || originDropZone.getRootNode();
427
427
  const originDropZoneRoot = rootNode.body || rootNode;
428
428
  const {items: originalItems, type, centreDraggedOnCursor} = config;
429
429
  const items = [...originalItems];