Skip to content

Commit 8d25736

Browse files
Update dnd-kit (main) (#235569)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@dnd-kit/core](https://redirect.github.com/clauderic/dnd-kit) ([source](https://redirect.github.com/clauderic/dnd-kit/tree/HEAD/packages/core)) | dependencies | minor | [`^6.1.0` -> `^6.3.1`](https://renovatebot.com/diffs/npm/@dnd-kit%2fcore/6.1.0/6.3.1) | | [@dnd-kit/sortable](https://redirect.github.com/clauderic/dnd-kit) ([source](https://redirect.github.com/clauderic/dnd-kit/tree/HEAD/packages/sortable)) | dependencies | major | [`^8.0.0` -> `^10.0.0`](https://renovatebot.com/diffs/npm/@dnd-kit%2fsortable/8.0.0/10.0.0) | --- ### Release Notes <details> <summary>clauderic/dnd-kit (@&#8203;dnd-kit/core)</summary> ### [`v6.3.1`](https://redirect.github.com/clauderic/dnd-kit/blob/HEAD/packages/core/CHANGELOG.md#631) [Compare Source](https://redirect.github.com/clauderic/dnd-kit/compare/@dnd-kit/core@6.3.0...@dnd-kit/core@6.3.1) ##### Patch Changes - [#&#8203;1555](https://redirect.github.com/clauderic/dnd-kit/pull/1555) [`62f632a`](https://redirect.github.com/clauderic/dnd-kit/commit/62f632a0c8f06ff020eb90d98770a374c705001d) Thanks [@&#8203;clauderic](https://redirect.github.com/clauderic)! - Added `Tab` to the list of default key codes that end a drag and drop operation. Can be customized by passing in a custom list of `keyCodes` to the KeyboardSensor options. ### [`v6.3.0`](https://redirect.github.com/clauderic/dnd-kit/blob/HEAD/packages/core/CHANGELOG.md#630) [Compare Source](https://redirect.github.com/clauderic/dnd-kit/compare/@dnd-kit/core@6.2.0...@dnd-kit/core@6.3.0) ##### Minor Changes - [#&#8203;1539](https://redirect.github.com/clauderic/dnd-kit/pull/1539) [`0c6a28d`](https://redirect.github.com/clauderic/dnd-kit/commit/0c6a28d1b32c72cfbc6e103c9f430a1e8ebe7301) Thanks [@&#8203;irobot](https://redirect.github.com/irobot)! - Make it possible to add visual cues when using activation constraints. ##### Context Activation constraints are used when we want to prevent accidental dragging or when pointer press can mean more than "start dragging". A typical use case is a button that needs to respond to both "click" and "drag" gestures. Clicks can be distinguished from drags based on how long the pointer was held pressed. ##### The problem A control that responds differently to a pointer press based on duration or distance can be confusing to use -- the user has to guess how long to keep holding or how far to keep dragging until their intent is acknowledged. Implementing such cues is currently possible by attaching extra event listeners so that we know when a drag is pending. Furthermore, the listener needs to have access to the same constraints that were applied to the sensor initiating the drag. This can be made to work in simple cases, but it becomes error-prone and difficult to maintain in complex scenarios. ##### Solution This changeset proposes the addition of two new events: `onDragPending` and `onDragAbort`. ##### `onDragPending` A drag is considered to be pending when the pointer has been pressed and there are activation constraints that need to be satisfied before a drag can start. This event is initially fired on pointer press. At this time `offset` (see below) will be `undefined`. It will subsequently be fired every time the pointer is moved. This is to enable visual cues for distance-based activation. The event's payload contains all the information necessary for providing visual feedback: ```typescript export interface DragPendingEvent { id: UniqueIdentifier; constraint: PointerActivationConstraint; initialCoordinates: Coordinates; offset?: Coordinates | undefined; } ``` ##### `onDragAbort` A drag is considered aborted when an activation constraint for a pending drag was violated. Useful as a prompt to cancel any visual cue animations currently in progress. Note that this event will *not* be fired when dragging ends or is canceled. ### [`v6.2.0`](https://redirect.github.com/clauderic/dnd-kit/blob/HEAD/packages/core/CHANGELOG.md#620) [Compare Source](https://redirect.github.com/clauderic/dnd-kit/compare/@dnd-kit/core@6.1.0...@dnd-kit/core@6.2.0) ##### Minor Changes - [#&#8203;1140](https://redirect.github.com/clauderic/dnd-kit/pull/1140) [`545a41c`](https://redirect.github.com/clauderic/dnd-kit/commit/545a41c27c6919e4ca22a58a67f3fa02a7caab8a) Thanks [@&#8203;anilanar](https://redirect.github.com/anilanar)! - Add `activatorEvent` to `DragStartEvent` ##### Patch Changes - [#&#8203;1494](https://redirect.github.com/clauderic/dnd-kit/pull/1494) [`00ec286`](https://redirect.github.com/clauderic/dnd-kit/commit/00ec286ab2fc7969549a4b19ffd42a09b5171dbe) Thanks [@&#8203;dinkinflickaa](https://redirect.github.com/dinkinflickaa)! - Improves performance by eliminating wasteful re-renders on every child item on click - [#&#8203;1400](https://redirect.github.com/clauderic/dnd-kit/pull/1400) [`995dc23`](https://redirect.github.com/clauderic/dnd-kit/commit/995dc23b7cd9019f3a920676cbe4e141e917e82c) Thanks [@&#8203;12joan](https://redirect.github.com/12joan)! - Export `defaultKeyboardCoordinateGetter` - [#&#8203;1542](https://redirect.github.com/clauderic/dnd-kit/pull/1542) [`f629ec6`](https://redirect.github.com/clauderic/dnd-kit/commit/f629ec6a9c3c25b749561fac31741046d96c28dc) Thanks [@&#8203;clauderic](https://redirect.github.com/clauderic)! - Fix bug with draggable and sortable elements with an `id` equal to `0`. - [#&#8203;1541](https://redirect.github.com/clauderic/dnd-kit/pull/1541) [`99643f6`](https://redirect.github.com/clauderic/dnd-kit/commit/99643f634cd55fa0bf0898365883507b28637659) Thanks [@&#8203;clauderic](https://redirect.github.com/clauderic)! - Handle `touchcancel` and `pointercancel` events. - [#&#8203;1435](https://redirect.github.com/clauderic/dnd-kit/pull/1435) [`6bbe39b`](https://redirect.github.com/clauderic/dnd-kit/commit/6bbe39bba6ad9afd0bc6db1c345ad4e6b58f5e5e) Thanks [@&#8203;knaveenkumar3576](https://redirect.github.com/knaveenkumar3576)! - Faster Paint with delayed flush of Effects - [#&#8203;1543](https://redirect.github.com/clauderic/dnd-kit/pull/1543) [`bcaf7c4`](https://redirect.github.com/clauderic/dnd-kit/commit/bcaf7c4e57b34dfc8ff9c4eea7a01c6e525e7874) Thanks [@&#8203;clauderic](https://redirect.github.com/clauderic)! - Fix a bug with auto-scroller continuing to observe stale elements, causing them to be considered as scrollable. - Updated dependencies \[[`93602df`](https://redirect.github.com/clauderic/dnd-kit/commit/93602df08498b28749e8146e0f6143ab987bc178)]: - [@&#8203;dnd-kit/accessibility](https://redirect.github.com/dnd-kit/accessibility)[@&#8203;3](https://redirect.github.com/3).1.1 </details> <details> <summary>clauderic/dnd-kit (@&#8203;dnd-kit/sortable)</summary> ### [`v10.0.0`](https://redirect.github.com/clauderic/dnd-kit/blob/HEAD/packages/sortable/CHANGELOG.md#1000) [Compare Source](https://redirect.github.com/clauderic/dnd-kit/compare/@dnd-kit/sortable@9.0.0...@dnd-kit/sortable@10.0.0) ##### Patch Changes - Updated dependencies \[[`0c6a28d`](https://redirect.github.com/clauderic/dnd-kit/commit/0c6a28d1b32c72cfbc6e103c9f430a1e8ebe7301)]: - [@&#8203;dnd-kit/core](https://redirect.github.com/dnd-kit/core)[@&#8203;6](https://redirect.github.com/6).3.0 ### [`v9.0.0`](https://redirect.github.com/clauderic/dnd-kit/blob/HEAD/packages/sortable/CHANGELOG.md#900) [Compare Source](https://redirect.github.com/clauderic/dnd-kit/compare/@dnd-kit/sortable@8.0.0...@dnd-kit/sortable@9.0.0) ##### Patch Changes - [#&#8203;1542](https://redirect.github.com/clauderic/dnd-kit/pull/1542) [`f629ec6`](https://redirect.github.com/clauderic/dnd-kit/commit/f629ec6a9c3c25b749561fac31741046d96c28dc) Thanks [@&#8203;clauderic](https://redirect.github.com/clauderic)! - Fix bug with draggable and sortable elements with an `id` equal to `0`. - Updated dependencies \[[`00ec286`](https://redirect.github.com/clauderic/dnd-kit/commit/00ec286ab2fc7969549a4b19ffd42a09b5171dbe), [`995dc23`](https://redirect.github.com/clauderic/dnd-kit/commit/995dc23b7cd9019f3a920676cbe4e141e917e82c), [`f629ec6`](https://redirect.github.com/clauderic/dnd-kit/commit/f629ec6a9c3c25b749561fac31741046d96c28dc), [`99643f6`](https://redirect.github.com/clauderic/dnd-kit/commit/99643f634cd55fa0bf0898365883507b28637659), [`6bbe39b`](https://redirect.github.com/clauderic/dnd-kit/commit/6bbe39bba6ad9afd0bc6db1c345ad4e6b58f5e5e), [`545a41c`](https://redirect.github.com/clauderic/dnd-kit/commit/545a41c27c6919e4ca22a58a67f3fa02a7caab8a), [`bcaf7c4`](https://redirect.github.com/clauderic/dnd-kit/commit/bcaf7c4e57b34dfc8ff9c4eea7a01c6e525e7874)]: - [@&#8203;dnd-kit/core](https://redirect.github.com/dnd-kit/core)[@&#8203;6](https://redirect.github.com/6).2.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://elastic.slack.com/archives/C07AMD4CNUR) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOlByZXNlbnRhdGlvbiIsImJhY2twb3J0OmFsbC1vcGVuIiwicmVsZWFzZV9ub3RlOnNraXAiXX0=--> Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com> (cherry picked from commit bd0cc54)
1 parent 8c1a400 commit 8d25736

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108
"@aws-sdk/client-bedrock-runtime": "^3.744.0",
109109
"@babel/runtime": "^7.24.7",
110110
"@dagrejs/dagre": "^1.1.5",
111-
"@dnd-kit/core": "^6.1.0",
112-
"@dnd-kit/sortable": "^8.0.0",
111+
"@dnd-kit/core": "^6.3.1",
112+
"@dnd-kit/sortable": "^10.0.0",
113113
"@dnd-kit/utilities": "^3.2.2",
114114
"@elastic/apm-rum": "^5.16.3",
115115
"@elastic/apm-rum-core": "^5.22.1",

yarn.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2138,26 +2138,26 @@
21382138
resolved "https://registry.yarnpkg.com/@discoveryjs/natural-compare/-/natural-compare-1.1.0.tgz#75f0642ad64701ffa9d42f1d7ada3b83f4e67cf3"
21392139
integrity sha512-yuctPJs5lRXoI8LkpVZGAV6n+DKOuEsfpfcIDQ8ZjWHwazqk1QjBc4jMlof0UlZHyUqv4dwsOTooMiAmtzvwXA==
21402140

2141-
"@dnd-kit/accessibility@^3.1.0":
2142-
version "3.1.0"
2143-
resolved "https://registry.yarnpkg.com/@dnd-kit/accessibility/-/accessibility-3.1.0.tgz#1054e19be276b5f1154ced7947fc0cb5d99192e0"
2144-
integrity sha512-ea7IkhKvlJUv9iSHJOnxinBcoOI3ppGnnL+VDJ75O45Nss6HtZd8IdN8touXPDtASfeI2T2LImb8VOZcL47wjQ==
2141+
"@dnd-kit/accessibility@^3.1.1":
2142+
version "3.1.1"
2143+
resolved "https://registry.yarnpkg.com/@dnd-kit/accessibility/-/accessibility-3.1.1.tgz#3b4202bd6bb370a0730f6734867785919beac6af"
2144+
integrity sha512-2P+YgaXF+gRsIihwwY1gCsQSYnu9Zyj2py8kY5fFvUM1qm2WA2u639R6YNVfU4GWr+ZM5mqEsfHZZLoRONbemw==
21452145
dependencies:
21462146
tslib "^2.0.0"
21472147

2148-
"@dnd-kit/core@^6.1.0":
2149-
version "6.1.0"
2150-
resolved "https://registry.yarnpkg.com/@dnd-kit/core/-/core-6.1.0.tgz#e81a3d10d9eca5d3b01cbf054171273a3fe01def"
2151-
integrity sha512-J3cQBClB4TVxwGo3KEjssGEXNJqGVWx17aRTZ1ob0FliR5IjYgTxl5YJbKTzA6IzrtelotH19v6y7uoIRUZPSg==
2148+
"@dnd-kit/core@^6.3.1":
2149+
version "6.3.1"
2150+
resolved "https://registry.yarnpkg.com/@dnd-kit/core/-/core-6.3.1.tgz#4c36406a62c7baac499726f899935f93f0e6d003"
2151+
integrity sha512-xkGBRQQab4RLwgXxoqETICr6S5JlogafbhNsidmrkVv2YRs5MLwpjoF2qpiGjQt8S9AoxtIV603s0GIUpY5eYQ==
21522152
dependencies:
2153-
"@dnd-kit/accessibility" "^3.1.0"
2153+
"@dnd-kit/accessibility" "^3.1.1"
21542154
"@dnd-kit/utilities" "^3.2.2"
21552155
tslib "^2.0.0"
21562156

2157-
"@dnd-kit/sortable@^8.0.0":
2158-
version "8.0.0"
2159-
resolved "https://registry.yarnpkg.com/@dnd-kit/sortable/-/sortable-8.0.0.tgz#086b7ac6723d4618a4ccb6f0227406d8a8862a96"
2160-
integrity sha512-U3jk5ebVXe1Lr7c2wU7SBZjcWdQP+j7peHJfCspnA81enlu88Mgd7CC8Q+pub9ubP7eKVETzJW+IBAhsqbSu/g==
2157+
"@dnd-kit/sortable@^10.0.0":
2158+
version "10.0.0"
2159+
resolved "https://registry.yarnpkg.com/@dnd-kit/sortable/-/sortable-10.0.0.tgz#1f9382b90d835cd5c65d92824fa9dafb78c4c3e8"
2160+
integrity sha512-+xqhmIIzvAYMGfBYYnbKuNicfSsk4RksY2XdmJhT+HAC01nix6fHCztU68jooFiMUB01Ky3F0FyOvhG/BZrWkg==
21612161
dependencies:
21622162
"@dnd-kit/utilities" "^3.2.2"
21632163
tslib "^2.0.0"

0 commit comments

Comments
 (0)