@atlaskit/pragmatic-drag-and-drop 1.1.5 → 1.1.7

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/CHANGELOG.md CHANGED
@@ -1,493 +1,657 @@
1
1
  # @atlaskit/pragmatic-drag-and-drop
2
2
 
3
+ ## 1.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#95385](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/95385)
8
+ [`c8d2e32f5071`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c8d2e32f5071) -
9
+ Minor internal refactor of code concerning entering / leaving a window
10
+
11
+ ## 1.1.6
12
+
13
+ ### Patch Changes
14
+
15
+ - [#94759](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94759)
16
+ [`140fc0d20c02`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/140fc0d20c02) -
17
+ Fixing our Safari workaround in `setCustomNativeDragPreview()` for a
18
+ [Safari drag preview bug](https://bugs.webkit.org/show_bug.cgi?id=266025) so that it works
19
+ correctly for `react@18+` usage.
20
+
3
21
  ## 1.1.5
4
22
 
5
23
  ### Patch Changes
6
24
 
7
- - [#94316](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94316) [`35fd5ed8e1d7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/35fd5ed8e1d7) - Upgrading internal dependency `bind-event-listener` to `@^3.0.0`
25
+ - [#94316](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94316)
26
+ [`35fd5ed8e1d7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/35fd5ed8e1d7) -
27
+ Upgrading internal dependency `bind-event-listener` to `@^3.0.0`
8
28
 
9
29
  ## 1.1.4
10
30
 
11
31
  ### Patch Changes
12
32
 
13
- - [#94302](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94302) [`66ca9d1d1602`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/66ca9d1d1602) - Improving jsdoc for the drop target `canDrop` function
33
+ - [#94302](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94302)
34
+ [`66ca9d1d1602`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/66ca9d1d1602) -
35
+ Improving jsdoc for the drop target `canDrop` function
14
36
 
15
37
  ## 1.1.3
16
38
 
17
39
  ### Patch Changes
18
40
 
19
- - [#84398](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84398) [`77694db987fc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/77694db987fc) - Public release of Pragmatic drag and drop documentation
41
+ - [#84398](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84398)
42
+ [`77694db987fc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/77694db987fc) -
43
+ Public release of Pragmatic drag and drop documentation
20
44
 
21
45
  ## 1.1.2
22
46
 
23
47
  ### Patch Changes
24
48
 
25
- - [#84047](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84047) [`72a86ac4a940`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/72a86ac4a940) - Removing experimental `DropData` from `onDrop()`. Exposing the native `dropEffect` turned out to problematic, as you will always get a `"none"` drop effect if dropping externally if the original `draggable` was removed (a native `"dragend"` event is targetted at the original draggable). This made the weak signal of `dropEffect` for even weaker and more problematic. In order to not create footguns for folks, we have decided to remove this experimental API for now. We can explore adding the API back in the future if folks think it would be valuable.
49
+ - [#84047](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84047)
50
+ [`72a86ac4a940`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/72a86ac4a940) -
51
+ Removing experimental `DropData` from `onDrop()`. Exposing the native `dropEffect` turned out to
52
+ problematic, as you will always get a `"none"` drop effect if dropping externally if the
53
+ original `draggable` was removed (a native `"dragend"` event is targetted at the original
54
+ draggable). This made the weak signal of `dropEffect` for even weaker and more problematic. In
55
+ order to not create footguns for folks, we have decided to remove this experimental API for now.
56
+ We can explore adding the API back in the future if folks think it would be valuable.
26
57
 
27
58
  ## 1.1.1
28
59
 
29
60
  ### Patch Changes
30
61
 
31
- - [#83702](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83702) [`4d9e25ab4eaa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4d9e25ab4eaa) - Updating the descriptions of Pragmatic drag and drop packages, so they each provide a consistent description to various consumers, and so they are consistently formed amongst each other.
62
+ - [#83702](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83702)
63
+ [`4d9e25ab4eaa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4d9e25ab4eaa) -
64
+ Updating the descriptions of Pragmatic drag and drop packages, so they each provide a consistent
65
+ description to various consumers, and so they are consistently formed amongst each other.
32
66
 
33
- - `package.json` `description`
34
- - `README.md`
35
- - Website documentation
67
+ - `package.json` `description`
68
+ - `README.md`
69
+ - Website documentation
36
70
 
37
71
  ## 1.1.0
38
72
 
39
73
  ### Minor Changes
40
74
 
41
- - [#82653](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82653) [`136d8da5542d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/136d8da5542d) - _Experimental_: Adding additional information to `onDrop()` events to expose what the final `dropEffect` was for a drag operation (_now removed_)
75
+ - [#82653](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82653)
76
+ [`136d8da5542d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/136d8da5542d) -
77
+ _Experimental_: Adding additional information to `onDrop()` events to expose what the final
78
+ `dropEffect` was for a drag operation (_now removed_)
42
79
 
43
- Fixing a bug where `preventUnhandled.start()` would prevent unhandled drag operations forever. It now only prevents unhandled drag operations for the current drag operation. `preventUnhandled.stop()` is now optional, as `preventUnhandled.start()` now tidies up itself. You can still leverage `preventUnhandled.stop()` to stop preventing unhandled drag operations during a drag.
80
+ Fixing a bug where `preventUnhandled.start()` would prevent unhandled drag operations forever.
81
+ It now only prevents unhandled drag operations for the current drag operation.
82
+ `preventUnhandled.stop()` is now optional, as `preventUnhandled.start()` now tidies up itself.
83
+ You can still leverage `preventUnhandled.stop()` to stop preventing unhandled drag operations
84
+ during a drag.
44
85
 
45
- Tightening the `getDropEffect()` function on drop targets slightly so that `"none"` cannot be provided. Using `"none"` as the drop effect would break the expected behaviour for nested drop targets.
86
+ Tightening the `getDropEffect()` function on drop targets slightly so that `"none"` cannot be
87
+ provided. Using `"none"` as the drop effect would break the expected behaviour for nested drop
88
+ targets.
46
89
 
47
90
  ## 1.0.2
48
91
 
49
92
  ### Patch Changes
50
93
 
51
- - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
94
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
95
+ [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
96
+ Upgrade Typescript from `4.9.5` to `5.4.2`
52
97
 
53
98
  ## 1.0.1
54
99
 
55
100
  ### Patch Changes
56
101
 
57
- - [#76476](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/76476) [`35148e092790`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/35148e092790) - Adding warning for test environments to let people know if DragEvents have not been setup correctly.
102
+ - [#76476](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/76476)
103
+ [`35148e092790`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/35148e092790) -
104
+ Adding warning for test environments to let people know if DragEvents have not been setup
105
+ correctly.
58
106
 
59
107
  ## 1.0.0
60
108
 
61
109
  ### Major Changes
62
110
 
63
- - [#70616](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70616) [`42e57ea65fee`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/42e57ea65fee) - This is our first `major` release (`1.0`) for all Pragmatic drag and drop packages.
111
+ - [#70616](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70616)
112
+ [`42e57ea65fee`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/42e57ea65fee) -
113
+ This is our first `major` release (`1.0`) for all Pragmatic drag and drop packages.
64
114
 
65
- For a detailed explanation of these changes, and how to upgrade (automatically) to `1.0` please see our [1.0 upgrade guide](http://atlassian.design/components/pragmatic-drag-and-drop/core-package/upgrade-guides/upgrade-guide-for-1.0)
115
+ For a detailed explanation of these changes, and how to upgrade (automatically) to `1.0` please
116
+ see our
117
+ [1.0 upgrade guide](http://atlassian.design/components/pragmatic-drag-and-drop/core-package/upgrade-guides/upgrade-guide-for-1.0)
66
118
 
67
119
  ## 0.25.0
68
120
 
69
121
  ### Minor Changes
70
122
 
71
- - [#59458](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59458) [`7d6a69cfa61c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7d6a69cfa61c) - Adding workaround for Safari bug.
123
+ - [#59458](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59458)
124
+ [`7d6a69cfa61c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7d6a69cfa61c) -
125
+ Adding workaround for Safari bug.
72
126
 
73
- In Safari (and iOS) if the element used for generating a native drag preview has opacity applied, then the native drag preview can include elements underneath the drag preview element.
127
+ In Safari (and iOS) if the element used for generating a native drag preview has opacity
128
+ applied, then the native drag preview can include elements underneath the drag preview element.
74
129
 
75
- Pragmatic drag and drop now includes a workaround for this Safari bug.
130
+ Pragmatic drag and drop now includes a workaround for this Safari bug.
76
131
 
77
132
  ## 0.24.0
78
133
 
79
134
  ### Minor Changes
80
135
 
81
- - [#39935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39935) [`03b91562fec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/03b91562fec) - Exposing `AllDragTypes` type. This was previously an internal type, but it provided helpful to expose for our new auto scroller. `AllDragTypes` is helpful if you need a function to work with either `element` or `file` drag operations.
136
+ - [#39935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39935)
137
+ [`03b91562fec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/03b91562fec) -
138
+ Exposing `AllDragTypes` type. This was previously an internal type, but it provided helpful to
139
+ expose for our new auto scroller. `AllDragTypes` is helpful if you need a function to work with
140
+ either `element` or `file` drag operations.
82
141
 
83
142
  ## 0.23.0
84
143
 
85
144
  ### Minor Changes
86
145
 
87
- - [#38713](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38713) [`3da89e29dfc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3da89e29dfc) - We have renamed and tweaked the recently added `setCustomNativeDragPreview` `getOffset` utility `preserveOffsetFromPointer` to be a bit easier to understand what it is doing.
88
-
89
- ```diff
90
- - import { preserveOffsetFromPointer } from '@atlaskit/pragmatic-drag-and-drop/util/preserve-offset-from-pointer';
91
- + import { preserveOffsetOnSource } from '@atlaskit/pragmatic-drag-and-drop/util/preserve-offset-on-source';
92
-
93
- draggable({
94
- element: myElement,
95
- onGenerateDragPreview: ({ nativeSetDragImage, location, source }) => {
96
- setCustomNativeDragPreview({
97
- - getOffset: preserveOffsetFromPointer({
98
- + 'preserveOffsetOnSource' is a more accurate description of what is being achieved
99
- + getOffset: preserveOffsetOnSource({
100
- - sourceElement: source.element,
101
- + // no longer including 'source' in argument name
102
- + // as it is implied by the function name
103
- + element: source.element,
104
- input: location.current.input,
105
- }),
106
- render: function render({ container }) {
107
- /* ... */
108
- },
109
- nativeSetDragImage,
110
- });
111
- },
112
- });
113
- ```
146
+ - [#38713](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38713)
147
+ [`3da89e29dfc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3da89e29dfc) - We
148
+ have renamed and tweaked the recently added `setCustomNativeDragPreview` `getOffset` utility
149
+ `preserveOffsetFromPointer` to be a bit easier to understand what it is doing.
150
+
151
+ ```diff
152
+ - import { preserveOffsetFromPointer } from '@atlaskit/pragmatic-drag-and-drop/util/preserve-offset-from-pointer';
153
+ + import { preserveOffsetOnSource } from '@atlaskit/pragmatic-drag-and-drop/util/preserve-offset-on-source';
154
+
155
+ draggable({
156
+ element: myElement,
157
+ onGenerateDragPreview: ({ nativeSetDragImage, location, source }) => {
158
+ setCustomNativeDragPreview({
159
+ - getOffset: preserveOffsetFromPointer({
160
+ + 'preserveOffsetOnSource' is a more accurate description of what is being achieved
161
+ + getOffset: preserveOffsetOnSource({
162
+ - sourceElement: source.element,
163
+ + // no longer including 'source' in argument name
164
+ + // as it is implied by the function name
165
+ + element: source.element,
166
+ input: location.current.input,
167
+ }),
168
+ render: function render({ container }) {
169
+ /* ... */
170
+ },
171
+ nativeSetDragImage,
172
+ });
173
+ },
174
+ });
175
+ ```
114
176
 
115
177
  ## 0.22.0
116
178
 
117
179
  ### Minor Changes
118
180
 
119
- - [#38397](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38397) [`d644a68ddf6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d644a68ddf6) - Added a new `setCustomNativeDragPreview` `getOffset` utility: `preserveOffsetFromPointer`. `preserveOffsetFromPointer` mimics the default behaviour for non custom drag previews when starting a drag: the initial cursor position offset is preserved for a seamless drag and drop experience.
120
-
121
- ```ts
122
- import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview';
123
- import { preserveOffsetFromPointer } from '@atlaskit/pragmatic-drag-and-drop/util/preserve-offset-from-pointer';
124
-
125
- draggable({
126
- element: myElement,
127
- onGenerateDragPreview: ({ nativeSetDragImage, location, source }) => {
128
- setCustomNativeDragPreview({
129
- getOffset: preserveOffsetFromPointer({
130
- sourceElement: source.element,
131
- input: location.current.input,
132
- }),
133
- render: function render({ container }) {
134
- /* ... */
181
+ - [#38397](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38397)
182
+ [`d644a68ddf6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d644a68ddf6) - Added
183
+ a new `setCustomNativeDragPreview` `getOffset` utility: `preserveOffsetFromPointer`.
184
+ `preserveOffsetFromPointer` mimics the default behaviour for non custom drag previews when
185
+ starting a drag: the initial cursor position offset is preserved for a seamless drag and drop
186
+ experience.
187
+
188
+ ```ts
189
+ import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview';
190
+ import { preserveOffsetFromPointer } from '@atlaskit/pragmatic-drag-and-drop/util/preserve-offset-from-pointer';
191
+
192
+ draggable({
193
+ element: myElement,
194
+ onGenerateDragPreview: ({ nativeSetDragImage, location, source }) => {
195
+ setCustomNativeDragPreview({
196
+ getOffset: preserveOffsetFromPointer({
197
+ sourceElement: source.element,
198
+ input: location.current.input,
199
+ }),
200
+ render: function render({ container }) {
201
+ /* ... */
202
+ },
203
+ nativeSetDragImage,
204
+ });
135
205
  },
136
- nativeSetDragImage,
137
- });
138
- },
139
- });
140
- ```
206
+ });
207
+ ```
141
208
 
142
209
  ## 0.21.0
143
210
 
144
211
  ### Minor Changes
145
212
 
146
- - [#38525](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38525) [`de7463c7096`](https://bitbucket.org/atlassian/atlassian-frontend/commits/de7463c7096) - Exposing some additional TypeScript types. These can be helpful when creating helper packages.
213
+ - [#38525](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38525)
214
+ [`de7463c7096`](https://bitbucket.org/atlassian/atlassian-frontend/commits/de7463c7096) -
215
+ Exposing some additional TypeScript types. These can be helpful when creating helper packages.
147
216
 
148
- ```ts
149
- import type {
150
- // These types are not needed for consumers
151
- // They are mostly helpful for other packages
152
- AllDragTypes,
153
- MonitorArgs,
154
- BaseEventPayload,
155
- } from '@atlaskit/pragmatic-drag-and-drop/types';
156
- ```
217
+ ```ts
218
+ import type {
219
+ // These types are not needed for consumers
220
+ // They are mostly helpful for other packages
221
+ AllDragTypes,
222
+ MonitorArgs,
223
+ BaseEventPayload,
224
+ } from '@atlaskit/pragmatic-drag-and-drop/types';
225
+ ```
157
226
 
158
- - `AllDragTypes`: representation of all entities types in the system (eg element and file)
159
- - `MonitorArgs<DragType extends AllDragTypes>`: the arguments that can be passed to a monitor
160
- - `BaseEventPayload<DragType extends AllDragTypes>`: the shared properties in all events
227
+ - `AllDragTypes`: representation of all entities types in the system (eg element and file)
228
+ - `MonitorArgs<DragType extends AllDragTypes>`: the arguments that can be passed to a monitor
229
+ - `BaseEventPayload<DragType extends AllDragTypes>`: the shared properties in all events
161
230
 
162
231
  ## 0.20.0
163
232
 
164
233
  ### Minor Changes
165
234
 
166
- - [#38453](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38453) [`554a6d8cc34`](https://bitbucket.org/atlassian/atlassian-frontend/commits/554a6d8cc34) - ### Stickiness algorithm improvement
235
+ - [#38453](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38453)
236
+ [`554a6d8cc34`](https://bitbucket.org/atlassian/atlassian-frontend/commits/554a6d8cc34) - ###
237
+ Stickiness algorithm improvement
167
238
 
168
- We have made some improvements to the drop target stickiness algorithm to allow sticky drop targets that are no longer dragged over to cancel their stickiness.
239
+ We have made some improvements to the drop target stickiness algorithm to allow sticky drop
240
+ targets that are no longer dragged over to cancel their stickiness.
169
241
 
170
- Stickiness is no longer maintained when a sticky drop target states it cannot be dropped on
242
+ Stickiness is no longer maintained when a sticky drop target states it cannot be dropped on
171
243
 
172
- > Scenario: `[A(sticky)]` → `[]` + `A:canDrop()` returns `false`
173
- > Result: `[]`
244
+ > Scenario: `[A(sticky)]` → `[]` + `A:canDrop()` returns `false` Result: `[]`
174
245
 
175
- Stickiness is no longer maintained when a sticky drop start states it is no longer sticky
246
+ Stickiness is no longer maintained when a sticky drop start states it is no longer sticky
176
247
 
177
- > Scenario: `[A(sticky)]` → `[]` + `A:getIsSticky()` returns `false`
178
- > Result: `[]`
248
+ > Scenario: `[A(sticky)]` → `[]` + `A:getIsSticky()` returns `false` Result: `[]`
179
249
 
180
- Stickiness is no longer maintained when a sticky drop start is unmounted
250
+ Stickiness is no longer maintained when a sticky drop start is unmounted
181
251
 
182
- > Scenario: `[A(sticky)]` → `[]` + `A` is unmounted
183
- > Result: `[]`
252
+ > Scenario: `[A(sticky)]` → `[]` + `A` is unmounted Result: `[]`
184
253
 
185
- To help facilitate this change:
254
+ To help facilitate this change:
186
255
 
187
- - `getIsSticky()` is now only called when an _drop target_ is a potential candidate for stickiness (previously it was called repeatedly)
188
- - `getIsSticky()` and `canDrop()` are called on _drop targets_ that are no longer being dragged over, but are candidates for stickiness
256
+ - `getIsSticky()` is now only called when an _drop target_ is a potential candidate for
257
+ stickiness (previously it was called repeatedly)
258
+ - `getIsSticky()` and `canDrop()` are called on _drop targets_ that are no longer being
259
+ dragged over, but are candidates for stickiness
189
260
 
190
- ### Change to `DropTargetRecord` `type`
261
+ ### Change to `DropTargetRecord` `type`
191
262
 
192
- Previously, the `DropTargetRecord` type had a property called `sticky` which would represent whether the _drop target_ was registering itself as sticky via `getIsSticky()`. Knowing `sticky` is not overly helpful given that we now regularly recompute stickiness and a _drop target_ can change disable stickiness after it is applied.
263
+ Previously, the `DropTargetRecord` type had a property called `sticky` which would represent
264
+ whether the _drop target_ was registering itself as sticky via `getIsSticky()`. Knowing `sticky`
265
+ is not overly helpful given that we now regularly recompute stickiness and a _drop target_ can
266
+ change disable stickiness after it is applied.
193
267
 
194
- What is helpful, is knowing whether a _drop target_ is active _because_ of stickiness. So we have removed `sticky` and added `isActiveDueToStickiness` to the `DropTargetRecord` type.
268
+ What is helpful, is knowing whether a _drop target_ is active _because_ of stickiness. So we
269
+ have removed `sticky` and added `isActiveDueToStickiness` to the `DropTargetRecord` type.
195
270
 
196
- ```diff
197
- type DropTargetRecord = {
198
- element: Element;
199
- data: Record<string | symbol, unknown>;
200
- dropEffect: DataTransfer['dropEffect'];
201
- - sticky: boolean;
202
- + isActiveDueToStickiness: boolean;
203
- };
204
- ```
271
+ ```diff
272
+ type DropTargetRecord = {
273
+ element: Element;
274
+ data: Record<string | symbol, unknown>;
275
+ dropEffect: DataTransfer['dropEffect'];
276
+ - sticky: boolean;
277
+ + isActiveDueToStickiness: boolean;
278
+ };
279
+ ```
205
280
 
206
281
  ## 0.19.0
207
282
 
208
283
  ### Minor Changes
209
284
 
210
- - [#35574](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35574) [`8c301a251e4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8c301a251e4) - We have changed the API of `setCustomNativeDragPreview()` to allow increased control and slightly lower bundles as well.
211
-
212
- We have removed the `placement` argument, and replaced it with `getOffset()`.
213
-
214
- ```diff
215
- - placement: { type: 'center' } | { type: 'offset-from-pointer'; x: CSSValue; y: CSSValue };
216
- + getOffset: (args: { container: HTMLElement }) => {x: number, y: number}
217
- ```
218
-
219
- `getOffset()` allows unlimited control over how to place the custom native drag preview relative to the users pointer. Please see our updated documentation for detailed information about the new `getOffset()` API. Our new `getOffset()` approach means that we also no longer need to bake in all `placement` options into the bundle - consumers now only pay for what they use!
220
-
221
- `placement: { type: 'offset-from-pointer' }` has been replaced by `offsetFromPointer()`
222
-
223
- ```diff
224
- import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview';
225
- + import { offsetFromPointer } from '@atlaskit/pragmatic-drag-and-drop/util/offset-from-pointer;
226
-
227
- draggable({
228
- element: myElement,
229
- onGenerateDragPreview: ({ nativeSetDragImage }) => {
230
- setCustomNativeDragPreview({
231
- - placement: { type: 'offset-from-pointer', x: '16px', y: '8px' }
232
- + getOffset: offsetFromPointer({x: '16px', y: '8px'}),
233
- render: function render({ container }) {
234
- ReactDOM.render(<Preview item={item} />, container);
235
- return function cleanup() {
236
- ReactDOM.unmountComponentAtNode(container);
237
- };
238
- },
239
- nativeSetDragImage,
240
- });
241
- },
242
- });
243
- ```
244
-
245
- `placement: { type: 'center' }` has been replaced by `centerUnderPointer()`
246
-
247
- ```diff
248
- import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview';
249
- + import { centerUnderPointer } from '@atlaskit/pragmatic-drag-and-drop/util/center-under-pointer-pointer;
250
-
251
- draggable({
252
- element: myElement,
253
- onGenerateDragPreview: ({ nativeSetDragImage }) => {
254
- setCustomNativeDragPreview({
255
- - placement: { type: 'center' }
256
- + getOffset: centerUnderPointer,
257
- render: function render({ container }) {
258
- ReactDOM.render(<Preview item={item} />, container);
259
- return function cleanup() {
260
- ReactDOM.unmountComponentAtNode(container);
261
- };
262
- },
263
- nativeSetDragImage,
264
- });
265
- },
266
- });
267
- ```
285
+ - [#35574](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35574)
286
+ [`8c301a251e4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8c301a251e4) - We
287
+ have changed the API of `setCustomNativeDragPreview()` to allow increased control and slightly
288
+ lower bundles as well.
289
+
290
+ We have removed the `placement` argument, and replaced it with `getOffset()`.
291
+
292
+ ```diff
293
+ - placement: { type: 'center' } | { type: 'offset-from-pointer'; x: CSSValue; y: CSSValue };
294
+ + getOffset: (args: { container: HTMLElement }) => {x: number, y: number}
295
+ ```
296
+
297
+ `getOffset()` allows unlimited control over how to place the custom native drag preview relative
298
+ to the users pointer. Please see our updated documentation for detailed information about the
299
+ new `getOffset()` API. Our new `getOffset()` approach means that we also no longer need to bake
300
+ in all `placement` options into the bundle - consumers now only pay for what they use!
301
+
302
+ `placement: { type: 'offset-from-pointer' }` has been replaced by `offsetFromPointer()`
303
+
304
+ ```diff
305
+ import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview';
306
+ + import { offsetFromPointer } from '@atlaskit/pragmatic-drag-and-drop/util/offset-from-pointer;
307
+
308
+ draggable({
309
+ element: myElement,
310
+ onGenerateDragPreview: ({ nativeSetDragImage }) => {
311
+ setCustomNativeDragPreview({
312
+ - placement: { type: 'offset-from-pointer', x: '16px', y: '8px' }
313
+ + getOffset: offsetFromPointer({x: '16px', y: '8px'}),
314
+ render: function render({ container }) {
315
+ ReactDOM.render(<Preview item={item} />, container);
316
+ return function cleanup() {
317
+ ReactDOM.unmountComponentAtNode(container);
318
+ };
319
+ },
320
+ nativeSetDragImage,
321
+ });
322
+ },
323
+ });
324
+ ```
325
+
326
+ `placement: { type: 'center' }` has been replaced by `centerUnderPointer()`
327
+
328
+ ```diff
329
+ import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview';
330
+ + import { centerUnderPointer } from '@atlaskit/pragmatic-drag-and-drop/util/center-under-pointer-pointer;
331
+
332
+ draggable({
333
+ element: myElement,
334
+ onGenerateDragPreview: ({ nativeSetDragImage }) => {
335
+ setCustomNativeDragPreview({
336
+ - placement: { type: 'center' }
337
+ + getOffset: centerUnderPointer,
338
+ render: function render({ container }) {
339
+ ReactDOM.render(<Preview item={item} />, container);
340
+ return function cleanup() {
341
+ ReactDOM.unmountComponentAtNode(container);
342
+ };
343
+ },
344
+ nativeSetDragImage,
345
+ });
346
+ },
347
+ });
348
+ ```
268
349
 
269
350
  ## 0.18.2
270
351
 
271
352
  ### Patch Changes
272
353
 
273
- - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
354
+ - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793)
355
+ [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure
356
+ legacy types are published for TS 4.5-4.8
274
357
 
275
358
  ## 0.18.1
276
359
 
277
360
  ### Patch Changes
278
361
 
279
- - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
362
+ - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649)
363
+ [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) -
364
+ Upgrade Typescript from `4.5.5` to `4.9.5`
280
365
 
281
366
  ## 0.18.0
282
367
 
283
368
  ### Minor Changes
284
369
 
285
- - [#33344](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33344) [`9fd8556db17`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9fd8556db17) - Internal folder name structure change
370
+ - [#33344](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33344)
371
+ [`9fd8556db17`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9fd8556db17) -
372
+ Internal folder name structure change
286
373
 
287
374
  ## 0.17.0
288
375
 
289
376
  ### Minor Changes
290
377
 
291
- - [#33262](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33262) [`34ed7b2ec63`](https://bitbucket.org/atlassian/atlassian-frontend/commits/34ed7b2ec63) - We have changed the name of our drag and drop packages to align on the single name of "Pragmatic drag and drop"
378
+ - [#33262](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33262)
379
+ [`34ed7b2ec63`](https://bitbucket.org/atlassian/atlassian-frontend/commits/34ed7b2ec63) - We
380
+ have changed the name of our drag and drop packages to align on the single name of "Pragmatic
381
+ drag and drop"
292
382
 
293
- ```diff
294
- - @atlaskit/drag-and-drop
295
- + @atlaskit/pragmatic-drag-and-drop
383
+ ```diff
384
+ - @atlaskit/drag-and-drop
385
+ + @atlaskit/pragmatic-drag-and-drop
296
386
 
297
- - @atlaskit/drag-and-drop-autoscroll
298
- + @atlaskit/pragmatic-drag-and-drop-autoscroll
387
+ - @atlaskit/drag-and-drop-autoscroll
388
+ + @atlaskit/pragmatic-drag-and-drop-autoscroll
299
389
 
300
- - @atlaskit/drag-and-drop-hitbox
301
- + @atlaskit/pragmatic-drag-and-drop-hitbox
390
+ - @atlaskit/drag-and-drop-hitbox
391
+ + @atlaskit/pragmatic-drag-and-drop-hitbox
302
392
 
303
- - @atlaskit/drag-and-drop-indicator
304
- + @atlaskit/pragmatic-drag-and-drop-react-indicator
305
- # Note: `react` was added to this package name as our indicator package is designed for usage with `react`.
393
+ - @atlaskit/drag-and-drop-indicator
394
+ + @atlaskit/pragmatic-drag-and-drop-react-indicator
395
+ # Note: `react` was added to this package name as our indicator package is designed for usage with `react`.
306
396
 
307
- - @atlaskit/drag-and-drop-live-region
308
- + @atlaskit/pragmatic-drag-and-drop-live-region
397
+ - @atlaskit/drag-and-drop-live-region
398
+ + @atlaskit/pragmatic-drag-and-drop-live-region
309
399
 
310
- - @atlaskit/drag-and-drop-react-beautiful-dnd-migration
311
- + @atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration
400
+ - @atlaskit/drag-and-drop-react-beautiful-dnd-migration
401
+ + @atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration
312
402
 
313
- - @atlaskit/drag-and-drop-docs
314
- + @atlaskit/pragmatic-drag-and-drop-docs
315
- ```
403
+ - @atlaskit/drag-and-drop-docs
404
+ + @atlaskit/pragmatic-drag-and-drop-docs
405
+ ```
316
406
 
317
- The new `@atlaskit/pragmatic-drag-and-drop*` packages will start their initial versions from where the ``@atlaskit/drag-and-drop*` packages left off. Doing this will make it easier to look back on changelogs and see how the packages have progressed.
407
+ The new `@atlaskit/pragmatic-drag-and-drop*` packages will start their initial versions from
408
+ where the ``@atlaskit/drag-and-drop*` packages left off. Doing this will make it easier to look
409
+ back on changelogs and see how the packages have progressed.
318
410
 
319
411
  ## 0.16.0
320
412
 
321
413
  ### Minor Changes
322
414
 
323
- - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
415
+ - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258)
416
+ [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip
417
+ minor dependency bump
324
418
 
325
419
  ## 0.15.1
326
420
 
327
421
  ### Patch Changes
328
422
 
329
- - [#32424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32424) [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
423
+ - [#32424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32424)
424
+ [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY
425
+ remove before merging to master; dupe adf-schema via adf-utils
330
426
 
331
427
  ## 0.15.0
332
428
 
333
429
  ### Minor Changes
334
430
 
335
- - [#31909](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31909) [`ed028658f13`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ed028658f13) - Minor internal refactor and adding additional tests
431
+ - [#31909](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31909)
432
+ [`ed028658f13`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ed028658f13) - Minor
433
+ internal refactor and adding additional tests
336
434
 
337
435
  ## 0.14.0
338
436
 
339
437
  ### Minor Changes
340
438
 
341
- - [#31794](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31794) [`eab6d26451d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/eab6d26451d) - Improving the resilience of our workaround for a [Browser bug](https://bugs.chromium.org/p/chromium/issues/detail?id=410328) where after a drag finishes, an unrelated element can be entered into.
342
- - [`ba7ea570aee`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ba7ea570aee) - > Both of these changes should not impact most consumers as they are targeted at edge cases.
343
-
344
- - **Fix**: We no longer extract user input (eg `clientX`) from native `"dragleave"` events due to a [Bug with Chrome we discovered](https://bugs.chromium.org/p/chromium/issues/detail?id=1429937). Due to this bug, it was possible for `location.current.input` to be incorrectly set in `onDropTargetChange` and `onDrop` when a user was cancelling a drag or dropping or no drop targets.
345
-
346
- - **Fix**: `location.previous.dropTargets` _should_ always point to the `location.current.dropTargets` value from the previous event (exception: `onGenerateDragPreview` and `onDragStart` have the same `location.previous` and `location.current` values). Previously, the `location.previous.dropTargets` value did not match the last events `location.current.dropTargets` value in `onDrop`. `onDrop()` would incorrectly use the `location.current` and `location.previous` values from the last event rather than creating a new `location.current` entry. Now, `onDrop()`, `location.previous.dropTargets` points to the `location.current.dropTargets` from the last event (same as all other events) and `location.current.dropTargets` points to what the previous drop target was as well (no change)
439
+ - [#31794](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31794)
440
+ [`eab6d26451d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/eab6d26451d) -
441
+ Improving the resilience of our workaround for a
442
+ [Browser bug](https://bugs.chromium.org/p/chromium/issues/detail?id=410328) where after a drag
443
+ finishes, an unrelated element can be entered into.
444
+ - [`ba7ea570aee`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ba7ea570aee) - > Both
445
+ of these changes should not impact most consumers as they are targeted at edge cases.
446
+
447
+ - **Fix**: We no longer extract user input (eg `clientX`) from native `"dragleave"` events due
448
+ to a
449
+ [Bug with Chrome we discovered](https://bugs.chromium.org/p/chromium/issues/detail?id=1429937).
450
+ Due to this bug, it was possible for `location.current.input` to be incorrectly set in
451
+ `onDropTargetChange` and `onDrop` when a user was cancelling a drag or dropping or no drop
452
+ targets.
453
+
454
+ - **Fix**: `location.previous.dropTargets` _should_ always point to the
455
+ `location.current.dropTargets` value from the previous event (exception:
456
+ `onGenerateDragPreview` and `onDragStart` have the same `location.previous` and
457
+ `location.current` values). Previously, the `location.previous.dropTargets` value did not
458
+ match the last events `location.current.dropTargets` value in `onDrop`. `onDrop()` would
459
+ incorrectly use the `location.current` and `location.previous` values from the last event
460
+ rather than creating a new `location.current` entry. Now, `onDrop()`,
461
+ `location.previous.dropTargets` points to the `location.current.dropTargets` from the last
462
+ event (same as all other events) and `location.current.dropTargets` points to what the
463
+ previous drop target was as well (no change)
347
464
 
348
465
  ## 0.13.0
349
466
 
350
467
  ### Minor Changes
351
468
 
352
- - [#30879](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/30879) [`2582df26509`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2582df26509) - Fixing a browser bug where after a drag finishes, a unrelated element can be entered into by the browser
469
+ - [#30879](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/30879)
470
+ [`2582df26509`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2582df26509) - Fixing
471
+ a browser bug where after a drag finishes, a unrelated element can be entered into by the
472
+ browser
353
473
 
354
- - [Visual explanation of bug](https://twitter.com/alexandereardon/status/1633614212873465856)
355
- - [Chrome bug](https://bugs.chromium.org/p/chromium/issues/detail?id=410328)
474
+ - [Visual explanation of bug](https://twitter.com/alexandereardon/status/1633614212873465856)
475
+ - [Chrome bug](https://bugs.chromium.org/p/chromium/issues/detail?id=410328)
356
476
 
357
477
  ## 0.12.0
358
478
 
359
479
  ### Minor Changes
360
480
 
361
- - [#30953](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/30953) [`90901f5bbe0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/90901f5bbe0) - Replace default entry point of `undefined` with `{}`.
481
+ - [#30953](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/30953)
482
+ [`90901f5bbe0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/90901f5bbe0) -
483
+ Replace default entry point of `undefined` with `{}`.
362
484
 
363
- > **NOTE:** Importing from the default entry point isn't supported.
364
- > _Please use individual entry points in order to always obtain minimum kbs._
485
+ > **NOTE:** Importing from the default entry point isn't supported. _Please use individual entry
486
+ > points in order to always obtain minimum kbs._
365
487
 
366
488
  ## 0.11.0
367
489
 
368
490
  ### Minor Changes
369
491
 
370
- - [#30668](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/30668) [`1ecbb19d450`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1ecbb19d450) - Adding a new function to make creating _custom_ native drag previews safe and easy: `setCustomNativeDragPreview`
371
-
372
- ```tsx
373
- import { setCustomNativeDragPreview } from '@atlaskit/drag-and-drop/util/set-custom-native-drag-preview';
374
-
375
- draggable({
376
- element: myElement,
377
- onGenerateDragPreview: ({ nativeSetDragImage }) => {
378
- setCustomNativeDragPreview({
379
- render: function render({ container }) {
380
- ReactDOM.render(<Preview item={item} />, container);
381
- return function cleanup() {
382
- ReactDOM.unmountComponentAtNode(container);
383
- };
492
+ - [#30668](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/30668)
493
+ [`1ecbb19d450`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1ecbb19d450) - Adding
494
+ a new function to make creating _custom_ native drag previews safe and easy:
495
+ `setCustomNativeDragPreview`
496
+
497
+ ```tsx
498
+ import { setCustomNativeDragPreview } from '@atlaskit/drag-and-drop/util/set-custom-native-drag-preview';
499
+
500
+ draggable({
501
+ element: myElement,
502
+ onGenerateDragPreview: ({ nativeSetDragImage }) => {
503
+ setCustomNativeDragPreview({
504
+ render: function render({ container }) {
505
+ ReactDOM.render(<Preview item={item} />, container);
506
+ return function cleanup() {
507
+ ReactDOM.unmountComponentAtNode(container);
508
+ };
509
+ },
510
+ nativeSetDragImage,
511
+ });
384
512
  },
385
- nativeSetDragImage,
386
- });
387
- },
388
- });
389
- ```
513
+ });
514
+ ```
390
515
 
391
- Please see our element adapter documentation for more detailed usage information
516
+ Please see our element adapter documentation for more detailed usage information
392
517
 
393
518
  ## 0.10.0
394
519
 
395
520
  ### Minor Changes
396
521
 
397
- - [#29951](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29951) [`9c0975e2fab`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9c0975e2fab) - Bug fix: A _monitor_ should not be called after it is removed. Previously, if a _monitor_ (monitor 1) removed another _monitor_ (monitor 2) for the same event, then the second monitor (monitor 2) would still be called. This has been fixed
522
+ - [#29951](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29951)
523
+ [`9c0975e2fab`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9c0975e2fab) - Bug
524
+ fix: A _monitor_ should not be called after it is removed. Previously, if a _monitor_
525
+ (monitor 1) removed another _monitor_ (monitor 2) for the same event, then the second monitor
526
+ (monitor 2) would still be called. This has been fixed
398
527
 
399
- ```ts
400
- const cleanupMonitor1 = monitorForElements({
401
- onDragStart: () => {
402
- cleanupMonitor2();
403
- },
404
- });
405
- const cleanupMonitor2 = monitorForElements({
406
- // Previously this `onDragStart` would have been called during `onDragStart` even though it was unbound by the first monitor
407
- onDragStart: () => {},
408
- });
409
- ```
528
+ ```ts
529
+ const cleanupMonitor1 = monitorForElements({
530
+ onDragStart: () => {
531
+ cleanupMonitor2();
532
+ },
533
+ });
534
+ const cleanupMonitor2 = monitorForElements({
535
+ // Previously this `onDragStart` would have been called during `onDragStart` even though it was unbound by the first monitor
536
+ onDragStart: () => {},
537
+ });
538
+ ```
410
539
 
411
540
  ## 0.9.0
412
541
 
413
542
  ### Minor Changes
414
543
 
415
- - [#29651](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29651) [`03e0aa5ae85`](https://bitbucket.org/atlassian/atlassian-frontend/commits/03e0aa5ae85) - `@atlaskit/drag-and-drop` adds event listeners to the `window` during a drag operation. These drag operation event listeners were [`bubble` phase event listeners](https://domevents.dev/), but they are now `capture` phase event listeners to be more resliant against external code (incorrectly) stopping events.
544
+ - [#29651](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29651)
545
+ [`03e0aa5ae85`](https://bitbucket.org/atlassian/atlassian-frontend/commits/03e0aa5ae85) -
546
+ `@atlaskit/drag-and-drop` adds event listeners to the `window` during a drag operation. These
547
+ drag operation event listeners were [`bubble` phase event listeners](https://domevents.dev/),
548
+ but they are now `capture` phase event listeners to be more resliant against external code
549
+ (incorrectly) stopping events.
416
550
 
417
- This does not impact the ability of a consumer to have their own `draggable`s on a page not controlled by `@atlaskit/drag-and-drop`
551
+ This does not impact the ability of a consumer to have their own `draggable`s on a page not
552
+ controlled by `@atlaskit/drag-and-drop`
418
553
 
419
554
  ## 0.8.1
420
555
 
421
556
  ### Patch Changes
422
557
 
423
- - [#28324](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28324) [`6455cf006b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6455cf006b3) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving performance.
558
+ - [#28324](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28324)
559
+ [`6455cf006b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6455cf006b3) - Builds
560
+ for this package now pass through a tokens babel plugin, removing runtime invocations of the
561
+ tokens() function and improving performance.
424
562
 
425
563
  ## 0.8.0
426
564
 
427
565
  ### Minor Changes
428
566
 
429
- - [#26317](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26317) [`1e3f9743e57`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1e3f9743e57) - A _monitor_ that is added during an event (eg `onDragStart`) will no longer be called for the current event. This is to prevent the accidental creation of infinite loops. This behaviour matches native [`EventTargets`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) where an event listener cannot add another event listener during an active event to the same event target in the same event phase.
567
+ - [#26317](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26317)
568
+ [`1e3f9743e57`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1e3f9743e57) - A
569
+ _monitor_ that is added during an event (eg `onDragStart`) will no longer be called for the
570
+ current event. This is to prevent the accidental creation of infinite loops. This behaviour
571
+ matches native [`EventTargets`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget)
572
+ where an event listener cannot add another event listener during an active event to the same
573
+ event target in the same event phase.
430
574
 
431
575
  ## 0.7.1
432
576
 
433
577
  ### Patch Changes
434
578
 
435
- - [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874) [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
579
+ - [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874)
580
+ [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) -
581
+ Upgrade Typescript from `4.3.5` to `4.5.5`
436
582
 
437
583
  ## 0.7.0
438
584
 
439
585
  ### Minor Changes
440
586
 
441
- - [#25428](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/25428) [`f2a7931d609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f2a7931d609) - Adding jsdoc to DragLocation type for better autocomplete
587
+ - [#25428](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/25428)
588
+ [`f2a7931d609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f2a7931d609) - Adding
589
+ jsdoc to DragLocation type for better autocomplete
442
590
 
443
591
  ## 0.6.0
444
592
 
445
593
  ### Minor Changes
446
594
 
447
- - [#25002](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/25002) [`0f755214ee7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0f755214ee7) - Internal folder renaming. No API impact
595
+ - [#25002](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/25002)
596
+ [`0f755214ee7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0f755214ee7) -
597
+ Internal folder renaming. No API impact
448
598
 
449
599
  ## 0.5.0
450
600
 
451
601
  ### Minor Changes
452
602
 
453
- - [#25007](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/25007) [`17950433a70`](https://bitbucket.org/atlassian/atlassian-frontend/commits/17950433a70) - Touching package to release re-release previous version. The previous (now deprecated) version did not have it's entry points built correctly
603
+ - [#25007](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/25007)
604
+ [`17950433a70`](https://bitbucket.org/atlassian/atlassian-frontend/commits/17950433a70) -
605
+ Touching package to release re-release previous version. The previous (now deprecated) version
606
+ did not have it's entry points built correctly
454
607
 
455
608
  ## 0.4.0
456
609
 
457
610
  ### Minor Changes
458
611
 
459
- - [#24861](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24861) [`4d739042b04`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4d739042b04) - Improving jsdoc auto complete information for `GetFeedbackArgs`
612
+ - [#24861](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24861)
613
+ [`4d739042b04`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4d739042b04) -
614
+ Improving jsdoc auto complete information for `GetFeedbackArgs`
460
615
 
461
616
  ## 0.3.0
462
617
 
463
618
  ### Minor Changes
464
619
 
465
- - [#24810](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24810) [`52403a2c11f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/52403a2c11f) - Adding a `canMonitor()` function to _monitors_ to allow a _monitor_ to conditionally apply to a drag operation.
620
+ - [#24810](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24810)
621
+ [`52403a2c11f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/52403a2c11f) - Adding
622
+ a `canMonitor()` function to _monitors_ to allow a _monitor_ to conditionally apply to a drag
623
+ operation.
466
624
 
467
- ```ts
468
- monitorForElements({
469
- canMonitor: ({ source }) => source.data.type === 'card',
470
- onDragStart: () =>
471
- console.log('I will only be activated when dragging a card!'),
472
- });
473
- ```
625
+ ```ts
626
+ monitorForElements({
627
+ canMonitor: ({ source }) => source.data.type === 'card',
628
+ onDragStart: () => console.log('I will only be activated when dragging a card!'),
629
+ });
630
+ ```
474
631
 
475
632
  ## 0.2.0
476
633
 
477
634
  ### Minor Changes
478
635
 
479
- - [#24613](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24613) [`1cf9e484b4b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1cf9e484b4b) - We have improved our naming consistency across our drag and drop packages.
636
+ - [#24613](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24613)
637
+ [`1cf9e484b4b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1cf9e484b4b) - We
638
+ have improved our naming consistency across our drag and drop packages.
480
639
 
481
- - `@atlaskit/drag-and-drop/util/cancel-unhandled` has been renamed to `@atlaskit/drag-and-drop/addon/cancel-unhandled`
640
+ - `@atlaskit/drag-and-drop/util/cancel-unhandled` has been renamed to
641
+ `@atlaskit/drag-and-drop/addon/cancel-unhandled`
482
642
 
483
643
  ## 0.1.0
484
644
 
485
645
  ### Minor Changes
486
646
 
487
- - [#24532](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24532) [`73427c38077`](https://bitbucket.org/atlassian/atlassian-frontend/commits/73427c38077) - Initial release of `@atlaskit/drag-and-drop` packages 🎉
647
+ - [#24532](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24532)
648
+ [`73427c38077`](https://bitbucket.org/atlassian/atlassian-frontend/commits/73427c38077) -
649
+ Initial release of `@atlaskit/drag-and-drop` packages 🎉
488
650
 
489
651
  ## 0.0.1
490
652
 
491
653
  ### Patch Changes
492
654
 
493
- - [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492) [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
655
+ - [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492)
656
+ [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) -
657
+ Upgrade Typescript from `4.2.4` to `4.3.5`.