[d565449] | 1 | # @use-gesture/core
|
---|
| 2 |
|
---|
| 3 | ## 10.3.1
|
---|
| 4 |
|
---|
| 5 | ### Patch Changes
|
---|
| 6 |
|
---|
| 7 | - Updated dependencies [6f6f4a5b4]
|
---|
| 8 | - @use-gesture/core@10.3.1
|
---|
| 9 |
|
---|
| 10 | ## 10.3.0
|
---|
| 11 |
|
---|
| 12 | ### Patch Changes
|
---|
| 13 |
|
---|
| 14 | - Updated dependencies [c19ff0b24]
|
---|
| 15 | - Updated dependencies [1ee9f42e3]
|
---|
| 16 | - @use-gesture/core@10.3.0
|
---|
| 17 |
|
---|
| 18 | ## 10.2.27
|
---|
| 19 |
|
---|
| 20 | ### Patch Changes
|
---|
| 21 |
|
---|
| 22 | - Updated dependencies [0dce2216c]
|
---|
| 23 | - Updated dependencies [957aee8b5]
|
---|
| 24 | - Updated dependencies [51c6cfcf4]
|
---|
| 25 | - @use-gesture/core@10.2.27
|
---|
| 26 |
|
---|
| 27 | ## 10.2.26
|
---|
| 28 |
|
---|
| 29 | ### Patch Changes
|
---|
| 30 |
|
---|
| 31 | - Updated dependencies [db0d934eb]
|
---|
| 32 | - Updated dependencies [43e751a51]
|
---|
| 33 | - @use-gesture/core@10.2.26
|
---|
| 34 |
|
---|
| 35 | ## 10.2.25
|
---|
| 36 |
|
---|
| 37 | ### Patch Changes
|
---|
| 38 |
|
---|
| 39 | - Updated dependencies [3701753ea]
|
---|
| 40 | - @use-gesture/core@10.2.25
|
---|
| 41 |
|
---|
| 42 | ## 10.2.24
|
---|
| 43 |
|
---|
| 44 | ### Patch Changes
|
---|
| 45 |
|
---|
| 46 | - Updated dependencies [60aae2149]
|
---|
| 47 | - @use-gesture/core@10.2.24
|
---|
| 48 |
|
---|
| 49 | ## 10.2.23
|
---|
| 50 |
|
---|
| 51 | ### Patch Changes
|
---|
| 52 |
|
---|
| 53 | - Updated dependencies [79684a05f]
|
---|
| 54 | - @use-gesture/core@10.2.23
|
---|
| 55 |
|
---|
| 56 | ## 10.2.22
|
---|
| 57 |
|
---|
| 58 | ### Patch Changes
|
---|
| 59 |
|
---|
| 60 | - Updated dependencies [c6215e8ad]
|
---|
| 61 | - @use-gesture/core@10.2.22
|
---|
| 62 |
|
---|
| 63 | ## 10.2.21
|
---|
| 64 |
|
---|
| 65 | ### Patch Changes
|
---|
| 66 |
|
---|
| 67 | - Updated dependencies [6f4c09b55]
|
---|
| 68 | - Updated dependencies [854f4dfc1]
|
---|
| 69 | - @use-gesture/core@10.2.21
|
---|
| 70 |
|
---|
| 71 | ## 10.2.20
|
---|
| 72 |
|
---|
| 73 | ### Patch Changes
|
---|
| 74 |
|
---|
| 75 | - Updated dependencies [de807fddc]
|
---|
| 76 | - @use-gesture/core@10.2.20
|
---|
| 77 |
|
---|
| 78 | ## 10.2.19
|
---|
| 79 |
|
---|
| 80 | ### Patch Changes
|
---|
| 81 |
|
---|
| 82 | - Updated dependencies [c7cb407bd]
|
---|
| 83 | - @use-gesture/core@10.2.19
|
---|
| 84 |
|
---|
| 85 | ## 10.2.18
|
---|
| 86 |
|
---|
| 87 | ### Patch Changes
|
---|
| 88 |
|
---|
| 89 | - Updated dependencies [115ee1f59]
|
---|
| 90 | - @use-gesture/core@10.2.18
|
---|
| 91 |
|
---|
| 92 | ## 10.2.17
|
---|
| 93 |
|
---|
| 94 | ### Patch Changes
|
---|
| 95 |
|
---|
| 96 | - Updated dependencies [48dc6a102]
|
---|
| 97 | - Updated dependencies [d73ee4e34]
|
---|
| 98 | - @use-gesture/core@10.2.17
|
---|
| 99 |
|
---|
| 100 | ## 10.2.16
|
---|
| 101 |
|
---|
| 102 | ### Patch Changes
|
---|
| 103 |
|
---|
| 104 | - a521a171f: types: remove React types dependency on core package
|
---|
| 105 | - Updated dependencies [a521a171f]
|
---|
| 106 | - @use-gesture/core@10.2.16
|
---|
| 107 |
|
---|
| 108 | ## 10.2.15
|
---|
| 109 |
|
---|
| 110 | ### Patch Changes
|
---|
| 111 |
|
---|
| 112 | - Updated dependencies [be1703a6d]
|
---|
| 113 | - @use-gesture/core@10.2.15
|
---|
| 114 |
|
---|
| 115 | ## 10.2.14
|
---|
| 116 |
|
---|
| 117 | ### Patch Changes
|
---|
| 118 |
|
---|
| 119 | - Updated dependencies [e82f1c220]
|
---|
| 120 | - @use-gesture/core@10.2.14
|
---|
| 121 |
|
---|
| 122 | ## 10.2.13
|
---|
| 123 |
|
---|
| 124 | ### Patch Changes
|
---|
| 125 |
|
---|
| 126 | - Updated dependencies [6896094b3]
|
---|
| 127 | - Updated dependencies [15724eb5c]
|
---|
| 128 | - @use-gesture/core@10.2.13
|
---|
| 129 |
|
---|
| 130 | ## 10.2.12
|
---|
| 131 |
|
---|
| 132 | ### Patch Changes
|
---|
| 133 |
|
---|
| 134 | - 91651b202: Fix config types
|
---|
| 135 | - Updated dependencies [91651b202]
|
---|
| 136 | - @use-gesture/core@10.2.12
|
---|
| 137 |
|
---|
| 138 | ## 10.2.11
|
---|
| 139 |
|
---|
| 140 | ### Patch Changes
|
---|
| 141 |
|
---|
| 142 | - Updated dependencies [670e6e2db]
|
---|
| 143 | - Updated dependencies [5979b1add]
|
---|
| 144 | - @use-gesture/core@10.2.11
|
---|
| 145 |
|
---|
| 146 | ## 10.2.10
|
---|
| 147 |
|
---|
| 148 | ### Patch Changes
|
---|
| 149 |
|
---|
| 150 | - Updated dependencies [f593dbe09]
|
---|
| 151 | - @use-gesture/core@10.2.10
|
---|
| 152 |
|
---|
| 153 | ## 10.2.9
|
---|
| 154 |
|
---|
| 155 | ### Patch Changes
|
---|
| 156 |
|
---|
| 157 | - Updated dependencies [d86df73b9]
|
---|
| 158 | - @use-gesture/core@10.2.9
|
---|
| 159 |
|
---|
| 160 | ## 10.2.8
|
---|
| 161 |
|
---|
| 162 | ### Patch Changes
|
---|
| 163 |
|
---|
| 164 | - Updated dependencies [2c0fde118]
|
---|
| 165 | - @use-gesture/core@10.2.8
|
---|
| 166 |
|
---|
| 167 | ## 10.2.7
|
---|
| 168 |
|
---|
| 169 | ### Patch Changes
|
---|
| 170 |
|
---|
| 171 | - Updated dependencies [2d943428c]
|
---|
| 172 | - @use-gesture/core@10.2.7
|
---|
| 173 |
|
---|
| 174 | ## 10.2.6
|
---|
| 175 |
|
---|
| 176 | ### Patch Changes
|
---|
| 177 |
|
---|
| 178 | - Updated dependencies [916d178c6]
|
---|
| 179 | - @use-gesture/core@10.2.6
|
---|
| 180 |
|
---|
| 181 | ## 10.2.5
|
---|
| 182 |
|
---|
| 183 | ### Patch Changes
|
---|
| 184 |
|
---|
| 185 | - Updated dependencies [cd5533a4c]
|
---|
| 186 | - Updated dependencies [548a90985]
|
---|
| 187 | - Updated dependencies [c5067dce0]
|
---|
| 188 | - Updated dependencies [4eaabaf1a]
|
---|
| 189 | - @use-gesture/core@10.2.5
|
---|
| 190 |
|
---|
| 191 | ## 10.2.4
|
---|
| 192 |
|
---|
| 193 | ### Patch Changes
|
---|
| 194 |
|
---|
| 195 | - Updated dependencies [ae631004a]
|
---|
| 196 | - @use-gesture/core@10.2.4
|
---|
| 197 |
|
---|
| 198 | ## 10.2.3
|
---|
| 199 |
|
---|
| 200 | ### Patch Changes
|
---|
| 201 |
|
---|
| 202 | - Updated dependencies [8302c5bfd]
|
---|
| 203 | - @use-gesture/core@10.2.3
|
---|
| 204 |
|
---|
| 205 | ## 10.2.2
|
---|
| 206 |
|
---|
| 207 | ### Patch Changes
|
---|
| 208 |
|
---|
| 209 | - Updated dependencies [cffaba5ae]
|
---|
| 210 | - @use-gesture/core@10.2.2
|
---|
| 211 |
|
---|
| 212 | ## 10.2.1
|
---|
| 213 |
|
---|
| 214 | ### Patch Changes
|
---|
| 215 |
|
---|
| 216 | - Updated dependencies [2f0cd466b]
|
---|
| 217 | - @use-gesture/core@10.2.1
|
---|
| 218 |
|
---|
| 219 | ## 10.2.0
|
---|
| 220 |
|
---|
| 221 | ### Patch Changes
|
---|
| 222 |
|
---|
| 223 | - Updated dependencies [b4e6181e7]
|
---|
| 224 | - @use-gesture/core@10.2.0
|
---|
| 225 |
|
---|
| 226 | ## 10.1.6
|
---|
| 227 |
|
---|
| 228 | ### Patch Changes
|
---|
| 229 |
|
---|
| 230 | - Updated dependencies [9883b1c78]
|
---|
| 231 | - @use-gesture/core@10.1.6
|
---|
| 232 |
|
---|
| 233 | ## 10.1.5
|
---|
| 234 |
|
---|
| 235 | ### Patch Changes
|
---|
| 236 |
|
---|
| 237 | - Updated dependencies [55505c071]
|
---|
| 238 | - @use-gesture/core@10.1.5
|
---|
| 239 |
|
---|
| 240 | ## 10.1.4
|
---|
| 241 |
|
---|
| 242 | ### Patch Changes
|
---|
| 243 |
|
---|
| 244 | - Updated dependencies [090ba6b62]
|
---|
| 245 | - @use-gesture/core@10.1.4
|
---|
| 246 |
|
---|
| 247 | ## 10.1.3
|
---|
| 248 |
|
---|
| 249 | ### Patch Changes
|
---|
| 250 |
|
---|
| 251 | - Updated dependencies [a9f99ce3c]
|
---|
| 252 | - @use-gesture/core@10.1.3
|
---|
| 253 |
|
---|
| 254 | ## 10.1.2
|
---|
| 255 |
|
---|
| 256 | ### Patch Changes
|
---|
| 257 |
|
---|
| 258 | - Updated dependencies [ed0073543]
|
---|
| 259 | - @use-gesture/core@10.1.2
|
---|
| 260 |
|
---|
| 261 | ## 10.1.1
|
---|
| 262 |
|
---|
| 263 | ### Patch Changes
|
---|
| 264 |
|
---|
| 265 | - Updated dependencies [8a0bfacb0]
|
---|
| 266 | - Updated dependencies [8a0bfacb0]
|
---|
| 267 | - @use-gesture/core@10.1.1
|
---|
| 268 |
|
---|
| 269 | ## 10.1.0
|
---|
| 270 |
|
---|
| 271 | ### Patch Changes
|
---|
| 272 |
|
---|
| 273 | - Updated dependencies [b67543ff7]
|
---|
| 274 | - @use-gesture/core@10.1.0
|
---|
| 275 |
|
---|
| 276 | ## 10.0.3
|
---|
| 277 |
|
---|
| 278 | ### Patch Changes
|
---|
| 279 |
|
---|
| 280 | - Updated dependencies [de01d7dbb]
|
---|
| 281 | - @use-gesture/core@10.0.3
|
---|
| 282 |
|
---|
| 283 | ## 10.0.2
|
---|
| 284 |
|
---|
| 285 | ### Patch Changes
|
---|
| 286 |
|
---|
| 287 | - Updated dependencies [a219d3f69]
|
---|
| 288 | - @use-gesture/core@10.0.2
|
---|
| 289 |
|
---|
| 290 | ## 10.0.1
|
---|
| 291 |
|
---|
| 292 | ### Patch Changes
|
---|
| 293 |
|
---|
| 294 | - Updated dependencies [c00c7b1]
|
---|
| 295 | - @use-gesture/core@10.0.1
|
---|
| 296 |
|
---|
| 297 | ## 10.0.0
|
---|
| 298 |
|
---|
| 299 | - e5d1cac: ## General breaking changes
|
---|
| 300 |
|
---|
| 301 | - `config.domTarget` is renamed `config.target`
|
---|
| 302 | - `config.initial` is renamed `config.from`
|
---|
| 303 | - `config.from` accounts for `offset` and not for `movement` as it was the case for `config.initial`
|
---|
| 304 | - `config.bounds` accounts for `offset`
|
---|
| 305 | - `velocity` is now a Vector with absolute (use `direction` if you need relative velocity)
|
---|
| 306 | - `vxvy`, `previous`, `vdva` are gone
|
---|
| 307 | - `distance` is now a Vector with cumulative deltas
|
---|
| 308 | - `state.pressed` is an alias to `state.down`
|
---|
| 309 | - `config.transform` only transforms `movement` and `offset`. Raw values are no longer transformed.
|
---|
| 310 |
|
---|
| 311 | ## Features
|
---|
| 312 |
|
---|
| 313 | ### General
|
---|
| 314 |
|
---|
| 315 | - Types: Handlers have a better type inference
|
---|
| 316 | - Adds `preventDefault` option so that all events are prevented when `true`
|
---|
| 317 |
|
---|
| 318 | ### Drag
|
---|
| 319 |
|
---|
| 320 | - keyboard support when target has focus!
|
---|
| 321 | - shows warning when `touch-action` is not properly set in development mode
|
---|
| 322 | - `bounds` accepts an `HTMLElement` or a React Ref
|
---|
| 323 | - `config.experimental_preventWindowScrollY` is now `config.preventScroll`
|
---|
| 324 | - supports non capturing (uses mouse listeners instead)
|
---|
| 325 |
|
---|
| 326 | ```js
|
---|
| 327 | useDrag(handler, {
|
---|
| 328 | pointer: {
|
---|
| 329 | touch: true, // uses touch on mobile
|
---|
| 330 | capture: false, // don't use setPointerCapture (uses window)
|
---|
| 331 | lock: true // will perform a pointer lock when drag starts, and exit pointer lock when drag ends,
|
---|
| 332 | },
|
---|
| 333 | axis: undefined | 'x' | 'y' | 'lock',
|
---|
| 334 | swipe: {
|
---|
| 335 | distance: 50,
|
---|
| 336 | velocity: 0.5,
|
---|
| 337 | duration: 250
|
---|
| 338 | }
|
---|
| 339 | })
|
---|
| 340 | ```
|
---|
| 341 |
|
---|
| 342 | ### Pinch
|
---|
| 343 |
|
---|
| 344 | - `distanceBounds` is now `scaleBounds`
|
---|
| 345 | - `state.movement` and `state.offset` now reflect scale and not distance
|
---|
| 346 | - Use pointer events where it can
|
---|
| 347 | - Add `useTouch` option to use touch events if needed
|
---|
| 348 | - `config.axis` can be set to `'lock'`, which will either scale or rotate.
|
---|
| 349 |
|
---|
| 350 | ```js
|
---|
| 351 | usePinch(({ offset: [scale, angle] }) => {
|
---|
| 352 | api.start({ rotate: angle, scale })
|
---|
| 353 | })
|
---|
| 354 | ```
|
---|
| 355 |
|
---|
| 356 | ### Mouse and Hover
|
---|
| 357 |
|
---|
| 358 | - Add option `mouseOnly` that you can set to `false` to trigger events on non-mouse events.
|
---|