@dnd-kit/sortable
Advanced tools
Comparing version 5.0.0-next-202162115243 to 5.0.0-next-2021621163226
# @dnd-kit/sortable | ||
## 5.0.0-next-202162115243 | ||
## 5.0.0-next-2021621163226 | ||
### Patch Changes | ||
- [#350](https://github.com/clauderic/dnd-kit/pull/350) [`a13dbb6`](https://github.com/clauderic/dnd-kit/commit/a13dbb66586edbf2998c7b251e236604255fd227) Thanks [@wmain](https://github.com/wmain)! - Breaking change: The `CollisionDetection` interface has been refactored. It now receives an object that contains the `active` draggable node, along with the `collisionRect` and an array of `droppableContainers`. | ||
If you've built custom collision detection algorithms, you'll need to update them. Refer to [this PR](https://github.com/clauderic/dnd-kit/pull/350) for examples of how to refactor collision detection functions to the new `CollisionDetection` interface. | ||
The `sortableKeyboardCoordinates` method has also been updated since it relies on the `closestCorners` collision detection algorithm. If you were using collision detection strategies in a custom `sortableKeyboardCoordinates` method, you'll need to update those as well. | ||
- [#341](https://github.com/clauderic/dnd-kit/pull/341) [`e02b737`](https://github.com/clauderic/dnd-kit/commit/e02b737a3ce94f57592ac2ffe67d5bc8fabe1d43) Thanks [@clauderic](https://github.com/clauderic)! - Return `undefined` instead of `null` for `transition` in `useSortable` | ||
- Updated dependencies [[`13be602`](https://github.com/clauderic/dnd-kit/commit/13be602229c6d5723b3ae98bca7b8f45f0773366), [`05d6a78`](https://github.com/clauderic/dnd-kit/commit/05d6a78a17cbaacd8dffed685dfea5a6ea3d38a8), [`7006464`](https://github.com/clauderic/dnd-kit/commit/700646468683e4820269534c6352cca93bb5a987), [`13be602`](https://github.com/clauderic/dnd-kit/commit/13be602229c6d5723b3ae98bca7b8f45f0773366)]: | ||
- @dnd-kit/core@4.0.0-next-202162115243 | ||
- @dnd-kit/utilities@2.1.0-next-202162115243 | ||
- Updated dependencies [[`13be602`](https://github.com/clauderic/dnd-kit/commit/13be602229c6d5723b3ae98bca7b8f45f0773366), [`05d6a78`](https://github.com/clauderic/dnd-kit/commit/05d6a78a17cbaacd8dffed685dfea5a6ea3d38a8), [`7006464`](https://github.com/clauderic/dnd-kit/commit/700646468683e4820269534c6352cca93bb5a987), [`13be602`](https://github.com/clauderic/dnd-kit/commit/13be602229c6d5723b3ae98bca7b8f45f0773366), [`a13dbb6`](https://github.com/clauderic/dnd-kit/commit/a13dbb66586edbf2998c7b251e236604255fd227)]: | ||
- @dnd-kit/core@4.0.0-next-2021621163226 | ||
- @dnd-kit/utilities@2.1.0-next-2021621163226 | ||
@@ -13,0 +19,0 @@ ## 4.0.0 |
@@ -523,2 +523,3 @@ 'use strict'; | ||
context: { | ||
active, | ||
droppableContainers, | ||
@@ -532,13 +533,13 @@ translatedRect, | ||
if (!translatedRect) { | ||
if (!active || !translatedRect) { | ||
return; | ||
} | ||
const layoutRects = []; | ||
Object.entries(droppableContainers).forEach(([id, container]) => { | ||
if (container == null ? void 0 : container.disabled) { | ||
const filteredContainers = []; | ||
Object.values(droppableContainers).forEach(entry => { | ||
if (!entry || (entry == null ? void 0 : entry.disabled)) { | ||
return; | ||
} | ||
const node = container == null ? void 0 : container.node.current; | ||
const node = entry == null ? void 0 : entry.node.current; | ||
@@ -550,2 +551,7 @@ if (!node) { | ||
const rect = core.getViewRect(node); | ||
const container = { ...entry, | ||
rect: { | ||
current: rect | ||
} | ||
}; | ||
@@ -555,3 +561,3 @@ switch (event.code) { | ||
if (translatedRect.top + translatedRect.height <= rect.top) { | ||
layoutRects.push([id, rect]); | ||
filteredContainers.push(container); | ||
} | ||
@@ -563,3 +569,3 @@ | ||
if (translatedRect.top >= rect.top + rect.height) { | ||
layoutRects.push([id, rect]); | ||
filteredContainers.push(container); | ||
} | ||
@@ -571,3 +577,3 @@ | ||
if (translatedRect.left >= rect.left + rect.width) { | ||
layoutRects.push([id, rect]); | ||
filteredContainers.push(container); | ||
} | ||
@@ -579,3 +585,3 @@ | ||
if (translatedRect.left + translatedRect.width <= rect.left) { | ||
layoutRects.push([id, rect]); | ||
filteredContainers.push(container); | ||
} | ||
@@ -586,3 +592,7 @@ | ||
}); | ||
const closestId = core.closestCorners(layoutRects, translatedRect); | ||
const closestId = core.closestCorners({ | ||
active, | ||
collisionRect: translatedRect, | ||
droppableContainers: filteredContainers | ||
}); | ||
@@ -589,0 +599,0 @@ if (closestId) { |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),o=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,r=require("@dnd-kit/core"),n=require("@dnd-kit/utilities");function s(e,t,o){const r=e.slice();return r.splice(o<0?r.length+o:o,0,r.splice(t,1)[0]),r}function i(e){return null!==e&&e>=0}const a={scaleX:1,scaleY:1},f=({layoutRects:e,activeIndex:t,overIndex:o,index:r})=>{const n=s(e,o,t),i=e[r],a=n[r];return a&&i?{x:a.offsetLeft-i.offsetLeft,y:a.offsetTop-i.offsetTop,scaleX:a.width/i.width,scaleY:a.height/i.height}:null},d={scaleX:1,scaleY:1},c=o.createContext({activeIndex:-1,containerId:"Sortable",disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:f,wasSorting:{current:!1}}),u=({isSorting:e,index:t,newIndex:o,transition:r})=>!(!r||!e&&o===t),l={duration:200,easing:"ease"},g=n.CSS.Transition.toString({property:"transform",duration:0,easing:"linear"}),h={roleDescription:"sortable"},x=[r.KeyboardCode.Down,r.KeyboardCode.Right,r.KeyboardCode.Up,r.KeyboardCode.Left];exports.SortableContext=function({children:e,id:s,items:i,strategy:a=f}){const{active:d,overlayNode:u,droppableRects:l,over:g,recomputeLayouts:h,willRecomputeLayouts:x}=r.useDndContext(),p=n.useUniqueId("Sortable",s),y=Boolean(null!==u.rect),v=t.useMemo(()=>i.map(e=>"string"==typeof e?e:e.id),[i]),b=d?v.indexOf(d.id):-1,w=-1!==b,R=t.useRef(w),m=g?v.indexOf(g.id):-1,L=t.useRef(v),S=function(e,t){return e.reduce((e,o,r)=>{const n=t.get(o);return n&&(e[r]=n),e},Array(e.length))}(v,l),I=(T=L.current,!(v.join()===T.join()));var T;const C=-1!==m&&-1===b||I;n.useIsomorphicLayoutEffect(()=>{I&&w&&!x&&h()},[I,w,h,x]),t.useEffect(()=>{L.current=v},[v]),t.useEffect(()=>{requestAnimationFrame(()=>{R.current=w})},[w]);const D=t.useMemo(()=>({activeIndex:b,containerId:p,disableTransforms:C,items:v,overIndex:m,useDragOverlay:y,sortedRects:S,strategy:a,wasSorting:R}),[b,p,C,v,m,S,y,a,R]);return o.createElement(c.Provider,{value:D},e)},exports.arrayMove=s,exports.defaultAnimateLayoutChanges=u,exports.horizontalListSortingStrategy=({layoutRects:e,activeNodeRect:t,activeIndex:o,overIndex:r,index:n})=>{var s;const i=null!=(s=e[o])?s:t;if(!i)return null;const f=function(e,t,o){const r=e[t],n=e[t-1],s=e[t+1];return n||s?o<t?n?r.offsetLeft-(n.offsetLeft+n.width):s.offsetLeft-(r.offsetLeft+r.width):s?s.offsetLeft-(r.offsetLeft+r.width):r.offsetLeft-(n.offsetLeft+n.width):0}(e,n,o);if(n===o){const t=e[r];return t?{x:o<r?t.offsetLeft+t.width-(i.offsetLeft+i.width):t.offsetLeft-i.offsetLeft,y:0,...a}:null}return n>o&&n<=r?{x:-i.width-f,y:0,...a}:n<o&&n>=r?{x:i.width+f,y:0,...a}:{x:0,y:0,...a}},exports.rectSortingStrategy=f,exports.rectSwappingStrategy=({activeIndex:e,index:t,layoutRects:o,overIndex:r})=>{let n,s;return t===e&&(n=o[t],s=o[r]),t===r&&(n=o[t],s=o[e]),s&&n?{x:s.offsetLeft-n.offsetLeft,y:s.offsetTop-n.offsetTop,scaleX:s.width/n.width,scaleY:s.height/n.height}:null},exports.sortableKeyboardCoordinates=(e,{context:{droppableContainers:t,translatedRect:o,scrollableAncestors:n}})=>{if(x.includes(e.code)){if(e.preventDefault(),!o)return;const i=[];Object.entries(t).forEach(([t,n])=>{if(null==n?void 0:n.disabled)return;const s=null==n?void 0:n.node.current;if(!s)return;const a=r.getViewRect(s);switch(e.code){case r.KeyboardCode.Down:o.top+o.height<=a.top&&i.push([t,a]);break;case r.KeyboardCode.Up:o.top>=a.top+a.height&&i.push([t,a]);break;case r.KeyboardCode.Left:o.left>=a.left+a.width&&i.push([t,a]);break;case r.KeyboardCode.Right:o.left+o.width<=a.left&&i.push([t,a])}});const a=r.closestCorners(i,o);if(a){var s;const e=null==(s=t[a])?void 0:s.node.current;if(e){const t=r.getScrollableAncestors(e).some((e,t)=>n[t]!==e),s=r.getViewRect(e),i=t?{x:0,y:0}:{x:o.width-s.width,y:o.height-s.height};return{x:s.left-i.x,y:s.top-i.y}}}}},exports.useSortable=function({animateLayoutChanges:e=u,attributes:o,disabled:a,data:f,id:d,strategy:x,transition:p=l}){const{items:y,containerId:v,activeIndex:b,disableTransforms:w,sortedRects:R,overIndex:m,useDragOverlay:L,strategy:S,wasSorting:I}=t.useContext(c),T=y.indexOf(d),C=t.useMemo(()=>({sortable:{containerId:v,index:T,items:y},...f}),[v,f,T,y]),{rect:D,node:E,setNodeRef:N}=r.useDroppable({id:d,data:C}),{active:K,activeNodeRect:O,activatorEvent:q,attributes:A,setNodeRef:j,listeners:k,isDragging:M,over:X,transform:Y}=r.useDraggable({id:d,data:C,attributes:{...h,...o},disabled:a}),B=n.useCombinedRefs(N,j),U=Boolean(K),F=U&&I.current&&!w&&i(b)&&i(m),P=!L&&M,V=P&&F?Y:null,_=F?null!=V?V:(null!=x?x:S)({layoutRects:R,activeNodeRect:O,activeIndex:b,overIndex:m,index:T}):null,z=i(b)&&i(m)?s(y,b,m).indexOf(d):T,G=t.useRef(z),H=e({active:K,isDragging:M,isSorting:U,id:d,index:T,items:y,newIndex:G.current,transition:p,wasSorting:I.current}),J=function({rect:e,disabled:o,index:n,node:s}){const[i,a]=t.useState(null),f=t.useRef(n);return t.useEffect(()=>{if(!o&&n!==f.current&&s.current){const t=e.current;if(t){const e=r.getBoundingClientRect(s.current),o={x:t.offsetLeft-e.offsetLeft,y:t.offsetTop-e.offsetTop,scaleX:t.width/e.width,scaleY:t.height/e.height};(o.x||o.y)&&a(o)}}n!==f.current&&(f.current=n)},[o,n,s,e]),t.useEffect(()=>{i&&requestAnimationFrame(()=>{a(null)})},[i]),i}({disabled:!H,index:T,node:E,rect:D});return t.useEffect(()=>{U&&(G.current=z)},[U,z]),{active:K,attributes:A,activatorEvent:q,rect:D,index:T,isSorting:U,isDragging:M,listeners:k,node:E,overIndex:m,over:X,setNodeRef:B,setDroppableNodeRef:N,setDraggableNodeRef:j,transform:null!=J?J:_,transition:J?g:!P&&p&&(U||H)?n.CSS.Transition.toString({...p,property:"transform"}):void 0}},exports.verticalListSortingStrategy=({activeIndex:e,activeNodeRect:t,index:o,layoutRects:r,overIndex:n})=>{var s;const i=null!=(s=r[e])?s:t;if(!i)return null;if(o===e){const t=r[n];return t?{x:0,y:e<n?t.offsetTop+t.height-(i.offsetTop+i.height):t.offsetTop-i.offsetTop,...d}:null}const a=function(e,t,o){const r=e[t],n=e[t-1],s=e[t+1];return r?o<t?n?r.offsetTop-(n.offsetTop+n.height):s?s.offsetTop-(r.offsetTop+r.height):0:s?s.offsetTop-(r.offsetTop+r.height):n?r.offsetTop-(n.offsetTop+n.height):0:0}(r,o,e);return o>e&&o<=n?{x:0,y:-i.height-a,...d}:o<e&&o>=n?{x:0,y:i.height+a,...d}:{x:0,y:0,...d}}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),o=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,r=require("@dnd-kit/core"),n=require("@dnd-kit/utilities");function s(e,t,o){const r=e.slice();return r.splice(o<0?r.length+o:o,0,r.splice(t,1)[0]),r}function i(e){return null!==e&&e>=0}const a={scaleX:1,scaleY:1},f=({layoutRects:e,activeIndex:t,overIndex:o,index:r})=>{const n=s(e,o,t),i=e[r],a=n[r];return a&&i?{x:a.offsetLeft-i.offsetLeft,y:a.offsetTop-i.offsetTop,scaleX:a.width/i.width,scaleY:a.height/i.height}:null},c={scaleX:1,scaleY:1},d=o.createContext({activeIndex:-1,containerId:"Sortable",disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:f,wasSorting:{current:!1}}),u=({isSorting:e,index:t,newIndex:o,transition:r})=>!(!r||!e&&o===t),l={duration:200,easing:"ease"},g=n.CSS.Transition.toString({property:"transform",duration:0,easing:"linear"}),h={roleDescription:"sortable"},p=[r.KeyboardCode.Down,r.KeyboardCode.Right,r.KeyboardCode.Up,r.KeyboardCode.Left];exports.SortableContext=function({children:e,id:s,items:i,strategy:a=f}){const{active:c,overlayNode:u,droppableRects:l,over:g,recomputeLayouts:h,willRecomputeLayouts:p}=r.useDndContext(),x=n.useUniqueId("Sortable",s),y=Boolean(null!==u.rect),v=t.useMemo(()=>i.map(e=>"string"==typeof e?e:e.id),[i]),b=c?v.indexOf(c.id):-1,w=-1!==b,R=t.useRef(w),m=g?v.indexOf(g.id):-1,L=t.useRef(v),S=function(e,t){return e.reduce((e,o,r)=>{const n=t.get(o);return n&&(e[r]=n),e},Array(e.length))}(v,l),I=(T=L.current,!(v.join()===T.join()));var T;const C=-1!==m&&-1===b||I;n.useIsomorphicLayoutEffect(()=>{I&&w&&!p&&h()},[I,w,h,p]),t.useEffect(()=>{L.current=v},[v]),t.useEffect(()=>{requestAnimationFrame(()=>{R.current=w})},[w]);const D=t.useMemo(()=>({activeIndex:b,containerId:x,disableTransforms:C,items:v,overIndex:m,useDragOverlay:y,sortedRects:S,strategy:a,wasSorting:R}),[b,x,C,v,m,S,y,a,R]);return o.createElement(d.Provider,{value:D},e)},exports.arrayMove=s,exports.defaultAnimateLayoutChanges=u,exports.horizontalListSortingStrategy=({layoutRects:e,activeNodeRect:t,activeIndex:o,overIndex:r,index:n})=>{var s;const i=null!=(s=e[o])?s:t;if(!i)return null;const f=function(e,t,o){const r=e[t],n=e[t-1],s=e[t+1];return n||s?o<t?n?r.offsetLeft-(n.offsetLeft+n.width):s.offsetLeft-(r.offsetLeft+r.width):s?s.offsetLeft-(r.offsetLeft+r.width):r.offsetLeft-(n.offsetLeft+n.width):0}(e,n,o);if(n===o){const t=e[r];return t?{x:o<r?t.offsetLeft+t.width-(i.offsetLeft+i.width):t.offsetLeft-i.offsetLeft,y:0,...a}:null}return n>o&&n<=r?{x:-i.width-f,y:0,...a}:n<o&&n>=r?{x:i.width+f,y:0,...a}:{x:0,y:0,...a}},exports.rectSortingStrategy=f,exports.rectSwappingStrategy=({activeIndex:e,index:t,layoutRects:o,overIndex:r})=>{let n,s;return t===e&&(n=o[t],s=o[r]),t===r&&(n=o[t],s=o[e]),s&&n?{x:s.offsetLeft-n.offsetLeft,y:s.offsetTop-n.offsetTop,scaleX:s.width/n.width,scaleY:s.height/n.height}:null},exports.sortableKeyboardCoordinates=(e,{context:{active:t,droppableContainers:o,translatedRect:n,scrollableAncestors:s}})=>{if(p.includes(e.code)){if(e.preventDefault(),!t||!n)return;const a=[];Object.values(o).forEach(t=>{if(!t||(null==t?void 0:t.disabled))return;const o=null==t?void 0:t.node.current;if(!o)return;const s=r.getViewRect(o),i={...t,rect:{current:s}};switch(e.code){case r.KeyboardCode.Down:n.top+n.height<=s.top&&a.push(i);break;case r.KeyboardCode.Up:n.top>=s.top+s.height&&a.push(i);break;case r.KeyboardCode.Left:n.left>=s.left+s.width&&a.push(i);break;case r.KeyboardCode.Right:n.left+n.width<=s.left&&a.push(i)}});const f=r.closestCorners({active:t,collisionRect:n,droppableContainers:a});if(f){var i;const e=null==(i=o[f])?void 0:i.node.current;if(e){const t=r.getScrollableAncestors(e).some((e,t)=>s[t]!==e),o=r.getViewRect(e),i=t?{x:0,y:0}:{x:n.width-o.width,y:n.height-o.height};return{x:o.left-i.x,y:o.top-i.y}}}}},exports.useSortable=function({animateLayoutChanges:e=u,attributes:o,disabled:a,data:f,id:c,strategy:p,transition:x=l}){const{items:y,containerId:v,activeIndex:b,disableTransforms:w,sortedRects:R,overIndex:m,useDragOverlay:L,strategy:S,wasSorting:I}=t.useContext(d),T=y.indexOf(c),C=t.useMemo(()=>({sortable:{containerId:v,index:T,items:y},...f}),[v,f,T,y]),{rect:D,node:E,setNodeRef:N}=r.useDroppable({id:c,data:C}),{active:K,activeNodeRect:O,activatorEvent:q,attributes:A,setNodeRef:j,listeners:k,isDragging:M,over:X,transform:Y}=r.useDraggable({id:c,data:C,attributes:{...h,...o},disabled:a}),B=n.useCombinedRefs(N,j),U=Boolean(K),F=U&&I.current&&!w&&i(b)&&i(m),P=!L&&M,V=P&&F?Y:null,_=F?null!=V?V:(null!=p?p:S)({layoutRects:R,activeNodeRect:O,activeIndex:b,overIndex:m,index:T}):null,z=i(b)&&i(m)?s(y,b,m).indexOf(c):T,G=t.useRef(z),H=e({active:K,isDragging:M,isSorting:U,id:c,index:T,items:y,newIndex:G.current,transition:x,wasSorting:I.current}),J=function({rect:e,disabled:o,index:n,node:s}){const[i,a]=t.useState(null),f=t.useRef(n);return t.useEffect(()=>{if(!o&&n!==f.current&&s.current){const t=e.current;if(t){const e=r.getBoundingClientRect(s.current),o={x:t.offsetLeft-e.offsetLeft,y:t.offsetTop-e.offsetTop,scaleX:t.width/e.width,scaleY:t.height/e.height};(o.x||o.y)&&a(o)}}n!==f.current&&(f.current=n)},[o,n,s,e]),t.useEffect(()=>{i&&requestAnimationFrame(()=>{a(null)})},[i]),i}({disabled:!H,index:T,node:E,rect:D});return t.useEffect(()=>{U&&(G.current=z)},[U,z]),{active:K,attributes:A,activatorEvent:q,rect:D,index:T,isSorting:U,isDragging:M,listeners:k,node:E,overIndex:m,over:X,setNodeRef:B,setDroppableNodeRef:N,setDraggableNodeRef:j,transform:null!=J?J:_,transition:J?g:!P&&x&&(U||H)?n.CSS.Transition.toString({...x,property:"transform"}):void 0}},exports.verticalListSortingStrategy=({activeIndex:e,activeNodeRect:t,index:o,layoutRects:r,overIndex:n})=>{var s;const i=null!=(s=r[e])?s:t;if(!i)return null;if(o===e){const t=r[n];return t?{x:0,y:e<n?t.offsetTop+t.height-(i.offsetTop+i.height):t.offsetTop-i.offsetTop,...c}:null}const a=function(e,t,o){const r=e[t],n=e[t-1],s=e[t+1];return r?o<t?n?r.offsetTop-(n.offsetTop+n.height):s?s.offsetTop-(r.offsetTop+r.height):0:s?s.offsetTop-(r.offsetTop+r.height):n?r.offsetTop-(n.offsetTop+n.height):0:0}(r,o,e);return o>e&&o<=n?{x:0,y:-i.height-a,...c}:o<e&&o>=n?{x:0,y:i.height+a,...c}:{x:0,y:0,...c}}; | ||
//# sourceMappingURL=sortable.cjs.production.min.js.map |
@@ -516,2 +516,3 @@ import React, { useMemo, useRef, useEffect, useState, useContext } from 'react'; | ||
context: { | ||
active, | ||
droppableContainers, | ||
@@ -525,13 +526,13 @@ translatedRect, | ||
if (!translatedRect) { | ||
if (!active || !translatedRect) { | ||
return; | ||
} | ||
const layoutRects = []; | ||
Object.entries(droppableContainers).forEach(([id, container]) => { | ||
if (container == null ? void 0 : container.disabled) { | ||
const filteredContainers = []; | ||
Object.values(droppableContainers).forEach(entry => { | ||
if (!entry || (entry == null ? void 0 : entry.disabled)) { | ||
return; | ||
} | ||
const node = container == null ? void 0 : container.node.current; | ||
const node = entry == null ? void 0 : entry.node.current; | ||
@@ -543,2 +544,7 @@ if (!node) { | ||
const rect = getViewRect(node); | ||
const container = { ...entry, | ||
rect: { | ||
current: rect | ||
} | ||
}; | ||
@@ -548,3 +554,3 @@ switch (event.code) { | ||
if (translatedRect.top + translatedRect.height <= rect.top) { | ||
layoutRects.push([id, rect]); | ||
filteredContainers.push(container); | ||
} | ||
@@ -556,3 +562,3 @@ | ||
if (translatedRect.top >= rect.top + rect.height) { | ||
layoutRects.push([id, rect]); | ||
filteredContainers.push(container); | ||
} | ||
@@ -564,3 +570,3 @@ | ||
if (translatedRect.left >= rect.left + rect.width) { | ||
layoutRects.push([id, rect]); | ||
filteredContainers.push(container); | ||
} | ||
@@ -572,3 +578,3 @@ | ||
if (translatedRect.left + translatedRect.width <= rect.left) { | ||
layoutRects.push([id, rect]); | ||
filteredContainers.push(container); | ||
} | ||
@@ -579,3 +585,7 @@ | ||
}); | ||
const closestId = closestCorners(layoutRects, translatedRect); | ||
const closestId = closestCorners({ | ||
active, | ||
collisionRect: translatedRect, | ||
droppableContainers: filteredContainers | ||
}); | ||
@@ -582,0 +592,0 @@ if (closestId) { |
{ | ||
"name": "@dnd-kit/sortable", | ||
"version": "5.0.0-next-202162115243", | ||
"version": "5.0.0-next-2021621163226", | ||
"description": "Official sortable preset and sensors for dnd kit", | ||
@@ -29,3 +29,3 @@ "author": "Claudéric Demers", | ||
"dependencies": { | ||
"@dnd-kit/utilities": "^2.1.0-next-202162115243", | ||
"@dnd-kit/utilities": "^2.1.0-next-2021621163226", | ||
"tslib": "^2.0.0" | ||
@@ -35,6 +35,6 @@ }, | ||
"react": ">=16.8.0", | ||
"@dnd-kit/core": "^4.0.0-next-202162115243" | ||
"@dnd-kit/core": "^4.0.0-next-2021621163226" | ||
}, | ||
"devDependencies": { | ||
"@dnd-kit/core": "^4.0.0-next-202162115243" | ||
"@dnd-kit/core": "^4.0.0-next-2021621163226" | ||
}, | ||
@@ -41,0 +41,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
166362
1261