Skip to content

Releases: clauderic/dnd-kit

@dnd-kit/state@0.2.1

15 Dec 17:17
080a8aa

Choose a tag to compare

@dnd-kit/state@0.2.1

@dnd-kit/state@0.2.0

15 Dec 17:05
dbb555a

Choose a tag to compare

@dnd-kit/state@0.2.0

@dnd-kit/react@0.2.1

15 Dec 17:17
080a8aa

Choose a tag to compare

Patch Changes

  • Updated dependencies [d7f4130]:
    • @dnd-kit/dom@0.2.1
    • @dnd-kit/abstract@0.2.1
    • @dnd-kit/state@0.2.1

@dnd-kit/react@0.2.0

15 Dec 17:05
dbb555a

Choose a tag to compare

Patch Changes

  • #1823 3058ede Thanks @github-actions! - Simplified instance management of manager to fix a bug where the manager returned by useDragDropManager was null on first mount.

  • Updated dependencies [e95a9c8, e95a9c8, 9849887]:

    • @dnd-kit/abstract@0.2.0
    • @dnd-kit/dom@0.2.0
    • @dnd-kit/state@0.2.0

@dnd-kit/helpers@0.2.1

15 Dec 17:17
080a8aa

Choose a tag to compare

Patch Changes

  • Updated dependencies []:
    • @dnd-kit/abstract@0.2.1

@dnd-kit/helpers@0.2.0

15 Dec 17:05
dbb555a

Choose a tag to compare

Patch Changes

  • Updated dependencies [e95a9c8]:
    • @dnd-kit/abstract@0.2.0

@dnd-kit/geometry@0.2.1

15 Dec 17:17
080a8aa

Choose a tag to compare

Patch Changes

  • Updated dependencies []:
    • @dnd-kit/state@0.2.1

@dnd-kit/geometry@0.2.0

15 Dec 17:05
dbb555a

Choose a tag to compare

Patch Changes

  • Updated dependencies []:
    • @dnd-kit/state@0.2.0

@dnd-kit/dom@0.2.1

15 Dec 17:17
080a8aa

Choose a tag to compare

Patch Changes

  • d7f4130 Thanks @clauderic! - - Fix a bug with PointerSensor.defaults.preventActivation not being applied if there are other sensor options provided.

  • Updated dependencies []:

    • @dnd-kit/abstract@0.2.1
    • @dnd-kit/collision@0.2.1
    • @dnd-kit/geometry@0.2.1
    • @dnd-kit/state@0.2.1

@dnd-kit/dom@0.2.0

15 Dec 17:05
dbb555a

Choose a tag to compare

Minor Changes

  • #1821 e95a9c8 Thanks @clauderic! - - Refactor PointerSensor to use the new activation primitives.

    • Add PointerActivationConstraints with composable constraints:
      • PointerActivationConstraints.Delay({value, tolerance})
      • PointerActivationConstraints.Distance({value, tolerance?})
    • Update PointerSensor.defaults.activationConstraints(...):
      • Mouse on handle: activates immediately.
      • Touch: Delay 250ms with 5px tolerance.
      • Text inputs: Delay 200ms with 0px tolerance.
      • Other pointer types: Delay 200ms with 10px tolerance + Distance 5px.
    • New utilities:
      • getDocuments() returns all same-origin documents (enables listening across iframes).
      • getEventCoordinates(event) returns {x, y} from a PointerEvent.
    • PointerSensor now binds listeners across same-origin documents and improves default prevention during drag.
    • Internal cleanups: remove internal sensors/pointer/index.ts and utilities/execution-context/index.ts (no public API impact).

    These changes are additive and should be non-breaking. If you were composing pointer activation constraints, migrate to the new PointerActivationConstraints classes if you were importing internal implementations.

  • #1823 9849887 Thanks @github-actions! - - Add preventActivation option to PointerSensor and KeyboardSensor to conditionally prevent sensor activation.

    • PointerSensor: The default preventActivation prevents activation when the pointer target is an interactive element (input, select, textarea, button, link, or contenteditable) that is not the source element or handle.
    • KeyboardSensor: Renamed shouldActivate to preventActivation with inverted logic—return true to prevent activation instead of returning true to allow it.
    • New utility: isInteractiveElement(element) checks if an element is an interactive form control or link.

Patch Changes

  • Updated dependencies [e95a9c8]:
    • @dnd-kit/abstract@0.2.0
    • @dnd-kit/collision@0.2.0
    • @dnd-kit/geometry@0.2.0
    • @dnd-kit/state@0.2.0