Releases: FormidableLabs/react-swipeable
Releases · FormidableLabs/react-swipeable
v7.0.2
v7.0.1
Patch Changes
- Adding GitHub release workflow (#328)
New Features: - add new
swipeDurationprop - "allowable duration of a swipe"- A swipe lasting more than
swipeDuration, in milliseconds, will not be considered a swipe.- Feature mimicked from
use-gestureswipe.duration
- Feature mimicked from
- Defaults to
Infinityfor backwards compatibility
- A swipe lasting more than
- add new
touchEventOptionsprop that can set the options for the touch event listeners- this provides users full control of if/when they want to set passive
- Defaults to
{ passive: true }
- add new
onTouchStartOrOnMouseDownprop that is called fortouchstartandmousedown. Before a swipe even starts.- combined with
touchEventOptionsallows users the ability to now callpreventDefaultontouchstart
- combined with
- add new
onTouchEndOrOnMouseUpprop that is called fortouchendandmouseup. - add react 18 to
peerDependencies
Breaking Changes:
- we have dropped support for
es5transpiled output- we target
es2015for our transpilation nowswipeableutilizes object/array spread & const/let natively
- we target
preventScrollOnSwipe- "new" prop. ReplacespreventDefaultTouchmoveEvent- same functionality but renamed to be more explicit on its intended use
- fixed bug - where toggling this prop did not re-attach event listeners
- update - we now only change the
passiveevent listener option fortouchmovedepending on this prop- see notes in README for more details readme#passive-listener
- Thank you @stefvhuynh
Bug fixes:
- fix bug where directional swiped check allowed
undefined/falsy values to setcancelablePageSwipe - fix bug when both
trackTouchandtrackMousewere present that triggered an erroneous swipe when the user clicked outside and above the swipeable area
Infrastructure:
- post
size-limit reportto PRs with bundle diff sizes - utilize
rollupfor build & output - upgrade lots of dev dependencies
- 🎉 upgrade to
typescriptv4.6.3
- 🎉 upgrade to
- export/outputs housekeeping and cleaning (mimicked from
react-redux)- removed/renamed exports from
package.json:browser,umd:main(renameddist),jsnext:main(usemodule),typings(usetypes)
- moved exports - old => new
"main": "./dist/react-swipeable.js"=>"main": "./lib/index.js""module": "./dist/react-swipeable.module.js"=>"module": "es/index.js""types": "./dist/index.d.ts"=>"types": "./es/index.d.ts"
- removed/renamed exports from
v6.2.2
- add react v18 to
peerDependencies
v6.2.1
- Fix issue with some config properties being set to
undefinedbreaking swipeable
v6.2.0
deltaprop can now be anobjectspecifying different values for each direction- Maintenance
- upgrade to latest version of
microbundle- remove comments from built files
- attempt to lower size to counter unnecessary increase from
microbundleupgrade due torollupoutput.interop
- attempt to lower size to counter unnecessary increase from
- include type updates influenced by PR #259
- Thank you @jaketodaro
- remove comments from built files
dependabot security updates
- upgrade to latest version of
v6.1.2
- Maintenance
- actually include dependabot security updates
- update badge links
v6.1.1
- Maintenance
dependabot security updates- Migrate to github actions, remove travis, update badges
- Update examples and provide link via codesandbox
v6.1.0
-
Add new event handler prop
onSwipeStart -
typescript updated to
v4.1.3and associated deps bumped to be compatible
v6.0.1
- Fix issue with
firstproperty onSwipeEventDataalways beingtrue.firstis now onlytruefor the first event, thenfalsefor subsequent events- issue #221 and PR #223
- Thank you @feketegy!
v6.0.0
New Features:
- include passive event listener option, by default, to internal uses of
addEventListener- solves issue with chrome and lighthouse - #167
- set
passivetofalseonly whenpreventDefaultTouchmoveEventistrue. - more details in readme#passive-listener-issue
- add new
onTapevent handler prop which executes its callback after a tap- Thank you @upatel32!
- add new
vxvyevent data property[ deltaX/time, deltaY/time]- velocity per axis- Thank you @upatel32!
Breaking Changes:
- remove
<Swipeable>component- see below for an example of how to make your own
- Swipeable component examples
- event data update correctly calculate
deltaXanddeltaY - drop support for ie11
- using
addEventListeneroptions object needs to be polyfilled, browser support
- using
- requires react >= 16.8.3, additionally supports new react v17
Bug fixes:
Infrastructure:
- typescript Converted entire code base, tests, and examples to typescript
- changed type
EventData->SwipeEventData- The event data provided for all swipe event callbacks - removed type
SwipeableOptions- useSwipeablePropsnow - removed types associated with
<Swipeable>component - new type
TapCallback- callback for the newonTapprop handler - new type
SwipeDirections-"Left" | "Right" | "Up" | "Down"
- changed type
- Converted tests to
@testing-library/react, react testing library - Build bundles with
microbundle. microbundle- export new "modern" build - via package.json
esmoduleproperty
- export new "modern" build - via package.json
Maintenance:
- Upgraded all dev dependencies,
jest,babel,webpack,eslint,prettier
5.5.0
- Add
firstproperty toeventDatathat istruefor first swipe event issue #160 and PR #162- Thank you @samanpwbb!
5.4.0
- Add
initialproperty toeventDatathat supplies the inital[x, y]swipe value coordinates issue #150 and PR #131
5.3.0
- Optimization for
useSwipeablehook. AddeduseMemofor handler internals issue #134 and PR #149- Thank you @FaberVitale!
5.2.3
- Add check for
event.cancelablefortouchmoveevents before callingevent.preventDefault(), issue #128 and PR #145- Thank you @maurispalletti!
5.2.2
- Fix typescript type...
v7.0.0
New Features:
- add new
swipeDurationprop - "allowable duration of a swipe"- A swipe lasting more than
swipeDuration, in milliseconds, will not be considered a swipe.- Feature mimicked from
use-gestureswipe.duration
- Feature mimicked from
- Defaults to
Infinityfor backwards compatibility
- A swipe lasting more than
- add new
touchEventOptionsprop that can set the options for the touch event listeners- this provides users full control of if/when they want to set passive
- Defaults to
{ passive: true }
- add new
onTouchStartOrOnMouseDownprop that is called fortouchstartandmousedown. Before a swipe even starts.- combined with
touchEventOptionsallows users the ability to now callpreventDefaultontouchstart
- combined with
- add new
onTouchEndOrOnMouseUpprop that is called fortouchendandmouseup. - add react 18 to
peerDependencies
Breaking Changes:
- we have dropped support for
es5transpiled output- we target
es2015for our transpilation nowswipeableutilizes object/array spread & const/let natively
- we target
preventScrollOnSwipe- "new" prop. ReplacespreventDefaultTouchmoveEvent- same functionality but renamed to be more explicit on its intended use
- fixed bug - where toggling this prop did not re-attach event listeners
- update - we now only change the
passiveevent listener option fortouchmovedepending on this prop- see notes in README for more details readme#passive-listener
- Thank you @stefvhuynh
Bug fixes:
- fix bug where directional swiped check allowed
undefined/falsy values to setcancelablePageSwipe - fix bug when both
trackTouchandtrackMousewere present that triggered an erroneous swipe when the user clicked outside and above the swipeable area
Infrastructure:
- post
size-limit reportto PRs with bundle diff sizes - utilize
rollupfor build & output - upgrade lots of dev dependencies
- 🎉 upgrade to
typescriptv4.6.3
- 🎉 upgrade to
- export/outputs housekeeping and cleaning (mimicked from
react-redux)- removed/renamed exports from
package.json:browser,umd:main(renameddist),jsnext:main(usemodule),typings(usetypes)
- moved exports - old => new
"main": "./dist/react-swipeable.js"=>"main": "./lib/index.js""module": "./dist/react-swipeable.module.js"=>"module": "es/index.js""types": "./dist/index.d.ts"=>"types": "./es/index.d.ts"
- removed/renamed exports from
v6.2.2
v6.2.1
v6.2.0
v6.2.0
deltaprop can now be anobjectspecifying different values for each direction- Maintenance
- upgrade to latest version of
microbundle- remove comments from built files
- attempt to lower size to counter unnecessary increase from
microbundleupgrade due torollupoutput.interop
- attempt to lower size to counter unnecessary increase from
- include type updates influenced by PR #259
- Thank you @jaketodaro
- remove comments from built files
dependabot security updates
- upgrade to latest version of
v6.1.0
-
Add new event handler prop
onSwipeStart -
typescript updated to
v4.1.3and associated deps bumped to be compatible
v6.0.1
v6.0.0
New Features:
- include passive event listener option, by default, to internal uses of
addEventListener- solves issue with chrome and lighthouse - #167
- set
passivetofalseonly whenpreventDefaultTouchmoveEventistrue. - more details in readme#passive-listener-issue
- add new
onTapevent handler prop which executes its callback after a tap- Thank you @upatel32!
- add new
vxvyevent data property[ deltaX/time, deltaY/time]- velocity per axis- Thank you @upatel32!
Breaking Changes:
- We have a migration guide available here: React Swipeable v6 changes and migration guide
- remove
<Swipeable>component- see below for an example of how to make your own
- Swipeable component examples
- event data update correctly calculate
deltaXanddeltaY - drop support for ie11
- using
addEventListeneroptions object needs to be polyfilled, browser support
- using
- requires react >= 16.8.3, additionally supports new react v17
Bug fixes:
Infrastructure:
- typescript Converted entire code base, tests, and examples to typescript
- changed type
EventData->SwipeEventData- The event data provided for all swipe event callbacks - removed type
SwipeableOptions- useSwipeablePropsnow - removed types associated with
<Swipeable>component - new type
TapCallback- callback for the newonTapprop handler - new type
SwipeDirections-"Left" | "Right" | "Up" | "Down"
- changed type
- Converted tests to
@testing-library/react, react testing library - Build bundles with
microbundle. microbundle- export new "modern" build - via package.json
esmoduleproperty
- export new "modern" build - via package.json
Maintenance:
- Upgraded all dev dependencies,
jest,babel,webpack,eslint,prettier
v5.5.0
- Add
firstproperty toeventDatathat istruefor first swipe event issue #160 and PR #162- Thank you @samanpwbb!