|
| 1 | +# v6.0.0 |
| 2 | +**New Features:** |
| 3 | +- include passive event listener option, by default, to internal uses of `addEventListener` |
| 4 | + - solves issue with chrome and lighthouse - [#167](https://github.com/FormidableLabs/react-swipeable/issues/167) |
| 5 | + - set `passive` to `false` only when `preventDefaultTouchmoveEvent` is `true`. |
| 6 | + - more details in [readme#passive-listener-issue](https://github.com/FormidableLabs/react-swipeable#passive-listener) |
| 7 | +- add new `onTap` event handler prop which executes its callback after a tap |
| 8 | + - Thank you [@upatel32](https://github.com/upatel32)! |
| 9 | +- add new `vxvy` event data property |
| 10 | + - `[ deltaX/time, deltaY/time]` - velocity per axis |
| 11 | + - Thank you [@upatel32](https://github.com/upatel32)! |
| 12 | + |
| 13 | +**Breaking Changes:** |
| 14 | +- **remove** `<Swipeable>` component |
| 15 | + - see below for an example of how to make your own |
| 16 | + - [Swipeable component examples](https://github.com/FormidableLabs/react-swipeable/blob/main/migration.md#swipeable-component-examples) |
| 17 | +- **event data update** correctly calculate `deltaX` and `deltaY` |
| 18 | + - from `initial - current` **to** `current - initial` |
| 19 | + - fixes issue [#157](https://github.com/FormidableLabs/react-swipeable/issues/157) |
| 20 | + - Thank you [@upatel32](https://github.com/upatel32)! |
| 21 | +- **drop support for ie11** |
| 22 | + - using `addEventListener` options object needs to be polyfilled, [browser support](https://github.com/FormidableLabs/react-swipeable#browser-support) |
| 23 | +- **requires** react >= 16.8.3, additionally supports new react v17 |
| 24 | + |
| 25 | +**Bug fixes:** |
| 26 | +- Swipes can now start at edges (x or y === 0) |
| 27 | + - fixes [#182](https://github.com/FormidableLabs/react-swipeable/issues/182) |
| 28 | + - Thank you [@upatel32](https://github.com/upatel32)! |
| 29 | + |
| 30 | +**Infrastructure:** |
| 31 | +- **typescript** Converted entire code base, tests, and examples to typescript |
| 32 | + - **changed type** `EventData` -> `SwipeEventData` - The event data provided for all swipe event callbacks |
| 33 | + - **removed type** `SwipeableOptions` - use `SwipeableProps` now |
| 34 | + - **removed types** associated with `<Swipeable>` component |
| 35 | + - **new type** `TapCallback` - callback for the new `onTap` prop handler |
| 36 | + - **new type** `SwipeDirections` - `"Left" | "Right" | "Up" | "Down"` |
| 37 | +- Converted tests to `@testing-library/react`, [react testing library](https://github.com/testing-library/react-testing-library) |
| 38 | +- Build bundles with `microbundle`. [microbundle](https://github.com/developit/microbundle) |
| 39 | + - export new "modern" build - via package.json `esmodule` property |
| 40 | + - [microbundle modern mode](https://github.com/developit/microbundle#-modern-mode-) |
| 41 | + |
| 42 | +**Maintenance:** |
| 43 | +- Upgraded all dev dependencies, `jest`, `babel`, `webpack`, `eslint`, `prettier` |
| 44 | + |
1 | 45 | # 5.5.0
|
2 | 46 | * Add `first` property to `eventData` that is `true` for first swipe event [issue #160](https://github.com/formidablelabs/react-swipeable/issues/160) and [PR #162](https://github.com/formidablelabs/react-swipeable/pull/162)
|
3 | 47 | * Thank you [@samanpwbb](https://github.com/samanpwbb)!
|
|
0 commit comments