14 KiB
@dnd-kit/modifiers
6.0.1
Patch Changes
-
#823
b065c37Thanks @DaniGuardiola! - Add missing peer dependency to @dnd-kit/modifiers -
Updated dependencies [
da7c60d]:- @dnd-kit/core@6.0.6
- @dnd-kit/utilities@3.2.1
6.0.0
Patch Changes
- Updated dependencies [
4173087,59ca82b,7161f70,a52fba1,40707ce,a41e5b8,bf30718,a41e5b8,a41e5b8,035021a,77e3d44,5811986,e302bd4,188a450,59ca82b,750d726,5f3c700,035021a,e6e242c,035021a,33e6dd2,10f6836,c1b3b5a,035021a]:- @dnd-kit/core@6.0.0
- @dnd-kit/utilities@3.2.0
5.0.0
Minor Changes
-
#567
cd3adf3Thanks @clauderic! - Update modifiers to usedraggingNodeRectinstead ofactiveNodeRect. Modifiers should be based on the rect of the node being dragged, whether it is the draggable node or drag overlay node. -
#518
6310227Thanks @clauderic! - Major internal refactor of measuring and collision detection.Summary of changes
Previously, all collision detection algorithms were relative to the top and left points of the document. While this approach worked in most situations, it broke down in a number of different use-cases, such as fixed position droppable containers and trying to drag between containers that had different scroll positions.
This new approach changes the frame of comparison to be relative to the viewport. This is a major breaking change, and will need to be released under a new major version bump.
Breaking changes:
- By default,
@dnd-kitnow ignores only the transforms applied to the draggable / droppable node itself, but considers all the transforms applied to its ancestors. This should provide the right balance of flexibility for most consumers.- Transforms applied to the droppable and draggable nodes are ignored by default, because the recommended approach for moving items on the screen is to use the transform property, which can interfere with the calculation of collisions.
- Consumers can choose an alternate approach that does consider transforms for specific use-cases if needed by configuring the measuring prop of . Refer to the example.
- Reduced the number of concepts related to measuring from
ViewRect,LayoutRectto just a single concept ofClientRect.- The
ClientRectinterface no longer holds theoffsetTopandoffsetLeftproperties. For most use-cases, you can replaceoffsetTopwithtopandoffsetLeftwithleft. - Replaced the following exports from the
@dnd-kit/corepackage withgetClientRect:getBoundingClientRectgetViewRectgetLayoutRectgetViewportLayoutRect
- The
- Removed
translatedRectfrom theSensorContextinterface. Replace usage withcollisionRect. - Removed
activeNodeClientRecton theDndContextinterface. Replace withactiveNodeRect.
- By default,
Patch Changes
- Updated dependencies [
f3ad20d,02edd26,c6c67cb,6310227,e7ac3d4,528c67e,02edd26]:- @dnd-kit/core@5.0.0
- @dnd-kit/utilities@3.1.0
4.0.0
Minor Changes
- #334
13be602Thanks @trentmwillis! - AddsnapCenterToCursormodifier
Patch Changes
-
#437
0e628bcThanks @chestozo! - Added PointerEvent support to thegetEventCoordinatesmethod. This fixes testing the PointerSensor with Cypress (#436) -
Updated dependencies [
13be602,aede2cc,05d6a78,a32a4c5,f96cb5d,dea715c,dbc9601,46ec5e4,7006464,0e628bc,c447880,2ba6dfe,8d70540,13be602,422d083,c4b21b4,5a41340,a13dbb6,e2ee0dc,1fe9b5c,1fe9b5c,1f5ca27]:- @dnd-kit/core@4.0.0
- @dnd-kit/utilities@3.0.0
3.0.0
Patch Changes
- Updated dependencies [
d39ab11]:- @dnd-kit/core@3.1.0
2.1.0
Minor Changes
68960c4#295 Thanks @akhmadullin! -@dnd-kit/coreis now apeerDependencyrather than adependencyfor other@dnd-kitpackages that depend on it, such as@dnd-kit/sortableand@dnd-kit/modifiers. This is done to avoid issues with multiple versions of@dnd-kit/corebeing installed by some package managers such as Yarn 2.
Patch Changes
2.0.0
Major Changes
-
a9d92cf#174 Thanks @clauderic! - Distributed assets now only target modern browsers. Browserlist config:defaults last 2 version not IE 11 not deadIf you need to support older browsers, include the appropriate polyfills in your project's build process.
Patch Changes
1.0.5
Patch Changes
- Updated dependencies [
8583825]:- @dnd-kit/core@2.0.0
1.0.4
Patch Changes
-
6a5c8a1#154 Thanks @clauderic! - Update implementation of FirstArgument -
Updated dependencies [
6a5c8a1]:- @dnd-kit/utilities@1.0.3
1.0.3
Patch Changes
75bebf5#152 Thanks @clauderic! - Update dependencies of @dnd-kit/core to ^1.2.0
1.0.2
Patch Changes
-
423610c#56 Thanks @clauderic! - Add MIT license to package.json and distributed files -
Updated dependencies [
423610c,594a24e,fd25eaf]:- @dnd-kit/core@1.0.2
- @dnd-kit/utilities@1.0.2
1.0.1
Patch Changes
-
0b343c7#52 Thanks @clauderic! - Add repository entry to package.json files -
Updated dependencies [
0b343c7,5194696,310bbd6]:- @dnd-kit/utilities@1.0.1
- @dnd-kit/core@1.0.1
1.0.0
Major Changes
2912350Thanks @clauderic! - Initial public release.
Patch Changes
- Updated dependencies [
2912350]:- @dnd-kit/core@1.0.0
- @dnd-kit/utilities@1.0.0
0.1.0
Minor Changes
7bd4568#30 - Initial beta release, authored by @clauderic.
Patch Changes
- Updated dependencies [
7bd4568]:- @dnd-kit/core@0.1.0
- @dnd-kit/utilities@0.1.0