Skip to content

Releases: FormidableLabs/react-swipeable

v7.0.2

04 Nov 16:48
9cf9e4a
Compare
Choose a tag to compare

Patch Changes

  • Add react v19 to peer deps (#357)

v7.0.1

01 Jun 19:29
07eced3
Compare
Choose a tag to compare

Patch Changes

  • Adding GitHub release workflow (#328)
    New Features:
  • add new swipeDuration prop - "allowable duration of a swipe"
    • A swipe lasting more than swipeDuration, in milliseconds, will not be considered a swipe.
    • Defaults to Infinity for backwards compatibility
  • add new touchEventOptions prop 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 onTouchStartOrOnMouseDown prop that is called for touchstart and mousedown. Before a swipe even starts.
    • combined with touchEventOptions allows users the ability to now call preventDefault on touchstart
  • add new onTouchEndOrOnMouseUp prop that is called for touchend and mouseup.
  • add react 18 to peerDependencies

Breaking Changes:

  • we have dropped support for es5 transpiled output
    • we target es2015 for our transpilation now
      • swipeable utilizes object/array spread & const/let natively
  • preventScrollOnSwipe - "new" prop. Replaces preventDefaultTouchmoveEvent
    • 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 passive event listener option for touchmove depending on this prop
    • Thank you @stefvhuynh

Bug fixes:

  • fix bug where directional swiped check allowed undefined/falsy values to set cancelablePageSwipe
  • fix bug when both trackTouch and trackMouse were present that triggered an erroneous swipe when the user clicked outside and above the swipeable area

Infrastructure:

  • post size-limit report to PRs with bundle diff sizes
  • utilize rollup for build & output
    • remove dependency on microbundle
    • remove interop injected code - pull/260
    • Thank you @binoy14
  • upgrade lots of dev dependencies
    • πŸŽ‰ upgrade to typescript v4.6.3
  • export/outputs housekeeping and cleaning (mimicked from react-redux)
    • removed/renamed exports from package.json:
      • browser, umd:main(renamed dist), jsnext:main(use module), typings(use types)
    • 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"

v6.2.2

  • add react v18 to peerDependencies

v6.2.1

  • Fix issue with some config properties being set to undefined breaking swipeable
    • PR #296
    • explicitly set undefined config props to config defaults
    • Thank you @simonflk

v6.2.0

  • delta prop can now be an object specifying 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 microbundle upgrade due to rollup output.interop
      • include type updates influenced by PR #259
    • dependabot security updates

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

    • called only once per swipe at the start and before the first onSwiping callback
      • The first property of the SwipeEventData will be true
    • PR #226
    • Thank you @feketegy for the idea!
  • typescript updated to v4.1.3 and associated deps bumped to be compatible

v6.0.1

  • Fix issue with first property on SwipeEventData always being true.

v6.0.0

New Features:

  • include passive event listener option, by default, to internal uses of addEventListener
  • add new onTap event handler prop which executes its callback after a tap
  • add new vxvy event data property
    • [ deltaX/time, deltaY/time] - velocity per axis
    • Thank you @upatel32!

Breaking Changes:

  • remove <Swipeable> component
  • event data update correctly calculate deltaX and deltaY
    • from initial - current to current - initial
    • fixes issue #157
    • Thank you @upatel32!
  • drop support for ie11
    • using addEventListener options object needs to be polyfilled, browser support
  • requires react >= 16.8.3, additionally supports new react v17

Bug fixes:

  • Swipes can now start at edges (x or y === 0)

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 - use SwipeableProps now
    • removed types associated with <Swipeable> component
    • new type TapCallback - callback for the new onTap prop handler
    • new type SwipeDirections - "Left" | "Right" | "Up" | "Down"
  • Converted tests to @testing-library/react, react testing library
  • Build bundles with microbundle. microbundle

Maintenance:

  • Upgraded all dev dependencies, jest, babel, webpack, eslint, prettier

5.5.0

5.4.0

  • Add initial property to eventData that supplies the inital [x, y] swipe value coordinates issue #150 and PR #131

5.3.0

5.2.3

5.2.2

  • Fix typescript type...
Read more

v7.0.0

27 Apr 04:47
Compare
Choose a tag to compare

New Features:

  • add new swipeDuration prop - "allowable duration of a swipe"
    • A swipe lasting more than swipeDuration, in milliseconds, will not be considered a swipe.
    • Defaults to Infinity for backwards compatibility
  • add new touchEventOptions prop 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 onTouchStartOrOnMouseDown prop that is called for touchstart and mousedown. Before a swipe even starts.
    • combined with touchEventOptions allows users the ability to now call preventDefault on touchstart
  • add new onTouchEndOrOnMouseUp prop that is called for touchend and mouseup.
  • add react 18 to peerDependencies

Breaking Changes:

  • we have dropped support for es5 transpiled output
    • we target es2015 for our transpilation now
      • swipeable utilizes object/array spread & const/let natively
  • preventScrollOnSwipe - "new" prop. Replaces preventDefaultTouchmoveEvent
    • 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 passive event listener option for touchmove depending on this prop
    • Thank you @stefvhuynh

Bug fixes:

  • fix bug where directional swiped check allowed undefined/falsy values to set cancelablePageSwipe
  • fix bug when both trackTouch and trackMouse were present that triggered an erroneous swipe when the user clicked outside and above the swipeable area

Infrastructure:

  • post size-limit report to PRs with bundle diff sizes
  • utilize rollup for build & output
    • remove dependency on microbundle
    • remove interop injected code - pull/260
    • Thank you @binoy14
  • upgrade lots of dev dependencies
    • πŸŽ‰ upgrade to typescript v4.6.3
  • export/outputs housekeeping and cleaning (mimicked from react-redux)
    • removed/renamed exports from package.json:
      • browser, umd:main(renamed dist), jsnext:main(use module), typings(use types)
    • 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"

v6.2.2

27 Apr 04:20
Compare
Choose a tag to compare
  • add react v18 to peerDependencies

v6.2.1

18 Mar 15:49
Compare
Choose a tag to compare
  • Fix issue with some config properties being set to undefined breaking swipeable
    • PR #296
    • explicitly set undefined config props to config defaults
    • Thank you @simonflk

v6.2.0

13 Aug 22:11
Compare
Choose a tag to compare

v6.2.0

  • delta prop can now be an object specifying 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 microbundle upgrade due to rollup output.interop
      • include type updates influenced by PR #259
    • dependabot security updates

v6.1.0

04 Mar 23:03
Compare
Choose a tag to compare
  • Add new event handler prop onSwipeStart

    • called only once per swipe at the start and before the first onSwiping callback
      • The first property of the SwipeEventData will be true
    • PR #226
    • Thank you @feketegy for the idea!
  • typescript updated to v4.1.3 and associated deps bumped to be compatible

v6.0.1

04 Dec 21:23
Compare
Choose a tag to compare
  • Fix issue with first property on SwipeEventData always being true.

v6.0.0

06 Nov 19:59
Compare
Choose a tag to compare

New Features:

  • include passive event listener option, by default, to internal uses of addEventListener
  • add new onTap event handler prop which executes its callback after a tap
  • add new vxvy event data property
    • [ deltaX/time, deltaY/time] - velocity per axis
    • Thank you @upatel32!

Breaking Changes:

Bug fixes:

  • Swipes can now start at edges (x or y === 0)

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 - use SwipeableProps now
    • removed types associated with <Swipeable> component
    • new type TapCallback - callback for the new onTap prop handler
    • new type SwipeDirections - "Left" | "Right" | "Up" | "Down"
  • Converted tests to @testing-library/react, react testing library
  • Build bundles with microbundle. microbundle

Maintenance:

  • Upgraded all dev dependencies, jest, babel, webpack, eslint, prettier

v5.5.0

29 Nov 21:27
Compare
Choose a tag to compare