{"_id":"react-native-swipe-gestures","_rev":"14-2de1eb18d5c37a58c93b75501835d588","name":"react-native-swipe-gestures","description":"4-directional swipe gestures for react-native","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"react-native-swipe-gestures","version":"1.0.0","description":"4-directional swipe gestures for react-native","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react-native","swipe","gesture"],"author":{"name":"Goran Lepur","email":"goran.lepur1@gmail.com"},"license":"MIT","gitHead":"512326baf6f1784b0cff4913e5b9f19b82363e29","_id":"react-native-swipe-gestures@1.0.0","_shasum":"062f457041f0d5953ce36f90f6509e765edc1f60","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"glepur","email":"goran.lepur1@gmail.com"},"dist":{"shasum":"062f457041f0d5953ce36f90f6509e765edc1f60","tarball":"https://registry.npmjs.org/react-native-swipe-gestures/-/react-native-swipe-gestures-1.0.0.tgz","integrity":"sha512-akjPRYHpF+pC5CHbx5laJOYSryWZXMC+qBXzEUCBNRUAqBxmv3fcA2XcbUQrV20+ErshCQOs1BUiSgqktzY5xA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGDKe+I0iOH9sXnW+nEnu4oG+8PX27Cg3JAdPo8LWkPHAiBbV+2wQkw2bAAa2czxRSwVllZw5U90nGdKFZ7RR61Xgg=="}]},"maintainers":[{"name":"glepur","email":"goran.lepur1@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/react-native-swipe-gestures-1.0.0.tgz_1482409823449_0.03786576399579644"},"directories":{}},"1.0.1":{"name":"react-native-swipe-gestures","version":"1.0.1","description":"4-directional swipe gestures for react-native","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+ssh://git@github.com/glepur/react-native-swipe-gestures.git"},"keywords":["react-native","swipe","gesture"],"bugs":{"url":"https://github.com/glepur/react-native-swipe-gestures/issues"},"author":{"name":"Goran Lepur","email":"goran.lepur1@gmail.com"},"license":"MIT","gitHead":"475fb0a856a646ae617e3879fc667845a4ea8c59","homepage":"https://github.com/glepur/react-native-swipe-gestures#readme","_id":"react-native-swipe-gestures@1.0.1","_shasum":"6dd32ec1afe7b04d39cf5755deb81c0ff6946386","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"glepur","email":"goran.lepur1@gmail.com"},"dist":{"shasum":"6dd32ec1afe7b04d39cf5755deb81c0ff6946386","tarball":"https://registry.npmjs.org/react-native-swipe-gestures/-/react-native-swipe-gestures-1.0.1.tgz","integrity":"sha512-9pBPVXBLoUCYY+/25iwOKQ/U+Hfk0k4yk4Jm5pS2KJk+8y3D0l+AMl5v4dRmFzHf5CpEZ+XZXQVaS1aMUyHpOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHiTduAoiyWNtxjBdCbBz8xeh1+Avj488izFqFXJ7tMzAiEAjyW6LFoeIeOShlPi4swkzTEsEVMjJ7w3aNkmkBlztuE="}]},"maintainers":[{"name":"glepur","email":"goran.lepur1@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/react-native-swipe-gestures-1.0.1.tgz_1482410730514_0.6803796528838575"},"directories":{}},"1.0.2":{"name":"react-native-swipe-gestures","version":"1.0.2","description":"4-directional swipe gestures for react-native","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+ssh://git@github.com/glepur/react-native-swipe-gestures.git"},"keywords":["react-native","swipe","gesture"],"bugs":{"url":"https://github.com/glepur/react-native-swipe-gestures/issues"},"author":{"name":"Goran Lepur","email":"goran.lepur1@gmail.com"},"license":"MIT","gitHead":"1cd34605a25a55a42d2041d67b6b79dea5eda176","homepage":"https://github.com/glepur/react-native-swipe-gestures#readme","_id":"react-native-swipe-gestures@1.0.2","_shasum":"914e1a72a94bc55b322b4622a01103ab879296dd","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"glepur","email":"goran.lepur1@gmail.com"},"dist":{"shasum":"914e1a72a94bc55b322b4622a01103ab879296dd","tarball":"https://registry.npmjs.org/react-native-swipe-gestures/-/react-native-swipe-gestures-1.0.2.tgz","integrity":"sha512-Mq3AX5qGFAZCZ4Cy6VPPuM6KLL5EjQxu+x7Eh1cfue3S8bBP04dNSmS1xTFchOKvxoSMj/B69tHhgNguNKiShQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXaiYClJRnpvKvssj9YmgpblyKMXlRAbptSYtpLdFgbgIhAMjV5b2w4MmoTcPEIdqS851H+bPVCguZXG7R67n53wRX"}]},"maintainers":[{"name":"glepur","email":"goran.lepur1@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/react-native-swipe-gestures-1.0.2.tgz_1485623390692_0.24257183773443103"},"directories":{}},"1.0.3":{"name":"react-native-swipe-gestures","version":"1.0.3","description":"4-directional swipe gestures for react-native","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+ssh://git@github.com/glepur/react-native-swipe-gestures.git"},"keywords":["react-native","swipe","gesture"],"bugs":{"url":"https://github.com/glepur/react-native-swipe-gestures/issues"},"author":{"name":"Goran Lepur","email":"goran.lepur1@gmail.com"},"license":"MIT","gitHead":"0b227c22cc55da654cd7724e60003bc2b4a03af4","homepage":"https://github.com/glepur/react-native-swipe-gestures#readme","_id":"react-native-swipe-gestures@1.0.3","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"sverps","email":"sverps@gmail.com"},"dist":{"integrity":"sha512-KOouRzPB2fHFjVombsSdRfYo8SFeNVa4Ho4B5il87DuuF26sPNOtb3je+qaT/xVptedOsCzRPJGbWFMsaBApgg==","shasum":"4160f8d459627323f3a3d2770af4bcd82fd054f5","tarball":"https://registry.npmjs.org/react-native-swipe-gestures/-/react-native-swipe-gestures-1.0.3.tgz","fileCount":5,"unpackedSize":9554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/QkzCRA9TVsSAnZWagAA2FkP/3hSqEf7DHX+cRRDoz9x\nANpqxAELDzmABLfsGVFLsJw1YXq1aEUSfi0CL52zt+56DwDKu4fgw3DaYqWj\n+0S1aCxWFfaWEtmXMcnj05U59Ngc2ff6YEuHIr2vVZenMwTvQfYtsrKaZAJp\nHTVHK1ffpFaFmB2dRcnJRnKhnOFbgUR1G7A6Daz3DytBNmyUKYAXN5xF5mXh\nemg5RlCJBWLDjw2E6TfkT0Ohha+2TDeygX+dKwFaO0HlPkSLPQIjFBG0VSx8\nmbmaCcpODVU8p0zVeSlTBVyAQ+ZD3qinQHqrqdfoxCV/yp/HcT+hsb6ywlhu\nmH2VXVwVEshNBbI7jQ4iqLEVO92yzBOzGyzRnLjJTU6Zh+Z7/IvoPJYYp8+o\nU/PuAU9b1aPqL7Hdmo3tan3ZfYSwSXH81+tDA+EBsfN0moR8IJ8RgGkfIZtv\nX20/RreGliuP9Y6hjSd0iKJbio2pORr0ut5ycQak0cqgQ2AOsyLbqZ51hvD+\nWPngikXXxPjPC9GnT2B1QfnoBn6dRjgzvW53a/66p6XDb/Sd67tmeNA2wyhl\ngL6IOMFTwHcoXeGFX+UKUKQfRzisyctGqU2F/TPbBxRD4Abvy5YwFf3IUVSt\nQjwFZwBmObbkesZMxk9mjwn8VMkKzRWJ0netICqS0sYHY6oqCfB5M3VeZQ7J\nyscu\r\n=h0yS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPemfw4h/mUSYDJ3tjRCaTldUGjqeazYLsrCOzWwDxSgIhAOnxpoh/M8ciLozpAgrzPuva/oJcEIlUhWOlHa4ksbb8"}]},"maintainers":[{"name":"glepur","email":"goran.lepur1@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-swipe-gestures_1.0.3_1543309618468_0.6093194254673662"},"_hasShrinkwrap":false},"1.0.4":{"name":"react-native-swipe-gestures","types":"index.d.ts","version":"1.0.4","description":"4-directional swipe gestures for react-native","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+ssh://git@github.com/glepur/react-native-swipe-gestures.git"},"keywords":["react-native","swipe","gesture"],"bugs":{"url":"https://github.com/glepur/react-native-swipe-gestures/issues"},"author":{"name":"Goran Lepur","email":"goran.lepur1@gmail.com"},"license":"MIT","gitHead":"ddc57a9c990757ef9d872e42c17cfbfa85eae5c6","homepage":"https://github.com/glepur/react-native-swipe-gestures#readme","_id":"react-native-swipe-gestures@1.0.4","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-C/vz0KPHNyqHk3uF4Cz/jzd/0N8z34ZgsjAZUh/RsXPH2FtJJf3Fw73pQDWJSoCMtvVadlztb8xQ+/aEQrll7w==","shasum":"6a9c6613bfe06cd9014a36a2c4a09f719ff62451","tarball":"https://registry.npmjs.org/react-native-swipe-gestures/-/react-native-swipe-gestures-1.0.4.tgz","fileCount":6,"unpackedSize":10692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkbw4CRA9TVsSAnZWagAAjzQP/RLf/nkFvzL0DhL9hYsJ\nu/GkTlgEuirB0Segr5sMi+abbMGOJpXlL4aBs6yr6GFeVkGGH1M8iqDC2JU0\n83W23JX/g9v5HmPZu3hZloMvwsxl+mv5nEJAKre1ZEa6fFlDhocBJ7MZ79cd\noqpNhyAX0aZz8fBmyoIc445VsozMkCzEALuqNvN0wm5SzEvtOitXa/mlezvH\nwx1372T8fNiXGOIhCWoS/3iEd32AkF0tAu7SsgpymMusvs/kzZdZWzZjAjj9\nk94Dv9Q2EnTUMi2XrDTpN0fUM1zz4Zqu5dv8r6R1hNFGx9qWWikManQ+ogNB\njkK+a34fRJANsgBYBnzy2YxZpgDJ61lNdPEQo0/YBAuBgNgxV9B4IYasYxho\nKFam45M+dE9+Ag3ZgG7W5JM8jyapyiqaH4+NUVM8KvkJLzuybInG/troL5XX\n7Zc0H6HeeCk4+9ILA4jMF6A/VfJCRH0nx9LnEoJ7XdHA8ozG5qaT/GKWxfPn\nOg2cCLIVlDlUUZ1iF5gSkNpn7Sc0tNSULBA67UILUG//8xfeTSqZj4zRsDa6\n6tbxmM2HI4aDjC/WCDV0OKjCwLLg8L9Jyw0jDHYNsZjSd1Acvm4TSq5LazMa\niqqfsH9NRu8Stu0sjxN/Xqi4IVoY4TYfaAtpjIteyZTY5ZMp09Tj6SKbBYis\nZdPF\r\n=sG4E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5Yc/oBd+QL/BhbgYLR+PfGlAEKPh18GUmEbeD+32gCgIhAJvsOoD0DpL4lAYKwr9CPTbDinK/pQeB28Mirk7xHlAf"}]},"maintainers":[{"name":"glepur","email":"goran.lepur1@gmail.com"}],"_npmUser":{"name":"glepur","email":"goran.lepur1@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-swipe-gestures_1.0.4_1569831991861_0.3262235490458747"},"_hasShrinkwrap":false},"1.0.5":{"name":"react-native-swipe-gestures","types":"index.d.ts","version":"1.0.5","description":"4-directional swipe gestures for react-native","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+ssh://git@github.com/glepur/react-native-swipe-gestures.git"},"keywords":["react-native","swipe","gesture"],"bugs":{"url":"https://github.com/glepur/react-native-swipe-gestures/issues"},"author":{"name":"Goran Lepur","email":"goran.lepur1@gmail.com"},"license":"MIT","gitHead":"68a3fef9a81bf8fa7065f942edcd01bee4568df2","homepage":"https://github.com/glepur/react-native-swipe-gestures#readme","_id":"react-native-swipe-gestures@1.0.5","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-Ns7Bn9H/Tyw278+5SQx9oAblDZ7JixyzeOczcBK8dipQk2pD7Djkcfnf1nB/8RErAmMLL9iXgW0QHqiII8AhKw==","shasum":"a172cb0f3e7478ccd681fd36b8bfbcdd098bde7c","tarball":"https://registry.npmjs.org/react-native-swipe-gestures/-/react-native-swipe-gestures-1.0.5.tgz","fileCount":6,"unpackedSize":11001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedcchCRA9TVsSAnZWagAAYjMP/108PBOKTYyLkKb6pVl1\nzRfOOZawhXCZ91MRkCJ9WoIy7MGS84I8ywSTY/1LcRvBp9XIBnVncwIju6rl\nuBOeq7AbkXJ0BEkvL6Dt6NDX9toZoTzIr3b1NzZby7o2dwW6uo04aKD5Z1vt\nN+trK7YJglcoI9ZNkpcwG5StdmVhWxBiVL8kLVqhEaECTtO4763+hdABSJLW\nkPIFVh4fsWC9DlFzCHQha8a+Iz3hrvtdUXKV1Zgkascoot0ulgH9+51jAvwV\nILAby+vSmmvygwj8JJu4zl54WKzvmTUZjV1ECU3PrPsjBm7LRL3czOcTrqcu\nAifVwsPbx49RjfiIgcpo78PYe555TFruUUN0+TdJsti1RjhFZbzFy7EXIoNv\nMHjEwULVGx06/wf/bDZGtEL4/HKqAKUtPjk6V1N9AsPS6Y2yHkc8H6PRHKss\noN5hCCKTjRnnxcedOvoKRmZeSKB+gte8ClQvJND6DUpWxJwt76sEOS8INVNT\n+mlsxXZLWJ6UJPHQqO7NlmDLQmsfxf3BP2PX22aI+Pgp1vXRhWQKfkmzjzH8\nbmUPeEkXUtS2k52e52Nfg8Igu0bGdew+1WS96j+yP8MmCS/HsbQJ8aF27ngt\n1nlZg5Jy6hKQkTe1h1Si7CMrNdbp+4bOpPHLILJIiX1AuvPi87e8kpRsxNKi\ntmh/\r\n=7lZU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnwVGrahtY0k/0DjCZeZHnlWvzzoEnVqHD8KxDUJRwogIgP6jhtu29HB0xDIazhiGBY+/AMBiu3/9jDy4VlWRgySA="}]},"maintainers":[{"name":"glepur","email":"goran.lepur1@gmail.com"}],"_npmUser":{"name":"glepur","email":"goran.lepur1@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-swipe-gestures_1.0.5_1584776993290_0.6915304053919236"},"_hasShrinkwrap":false}},"readme":"# react-native-swipe-gestures\n\nReact Native component for handling swipe gestures in up, down, left and right direction.\n\n## Installation\n\n`npm i -S react-native-swipe-gestures`\n\n## Usage\n\n```javascript\n'use strict';\n\nimport React, {Component} from 'react';\nimport {View, Text} from 'react-native';\nimport GestureRecognizer, {swipeDirections} from 'react-native-swipe-gestures';\n\nclass SomeComponent extends Component {\n\n  constructor(props) {\n    super(props);\n    this.state = {\n      myText: 'I\\'m ready to get swiped!',\n      gestureName: 'none',\n      backgroundColor: '#fff'\n    };\n  }\n\n  onSwipeUp(gestureState) {\n    this.setState({myText: 'You swiped up!'});\n  }\n\n  onSwipeDown(gestureState) {\n    this.setState({myText: 'You swiped down!'});\n  }\n\n  onSwipeLeft(gestureState) {\n    this.setState({myText: 'You swiped left!'});\n  }\n\n  onSwipeRight(gestureState) {\n    this.setState({myText: 'You swiped right!'});\n  }\n\n  onSwipe(gestureName, gestureState) {\n    const {SWIPE_UP, SWIPE_DOWN, SWIPE_LEFT, SWIPE_RIGHT} = swipeDirections;\n    this.setState({gestureName: gestureName});\n    switch (gestureName) {\n      case SWIPE_UP:\n        this.setState({backgroundColor: 'red'});\n        break;\n      case SWIPE_DOWN:\n        this.setState({backgroundColor: 'green'});\n        break;\n      case SWIPE_LEFT:\n        this.setState({backgroundColor: 'blue'});\n        break;\n      case SWIPE_RIGHT:\n        this.setState({backgroundColor: 'yellow'});\n        break;\n    }\n  }\n\n  render() {\n\n    const config = {\n      velocityThreshold: 0.3,\n      directionalOffsetThreshold: 80\n    };\n\n    return (\n      <GestureRecognizer\n        onSwipe={(direction, state) => this.onSwipe(direction, state)}\n        onSwipeUp={(state) => this.onSwipeUp(state)}\n        onSwipeDown={(state) => this.onSwipeDown(state)}\n        onSwipeLeft={(state) => this.onSwipeLeft(state)}\n        onSwipeRight={(state) => this.onSwipeRight(state)}\n        config={config}\n        style={{\n          flex: 1,\n          backgroundColor: this.state.backgroundColor\n        }}\n        >\n        <Text>{this.state.myText}</Text>\n        <Text>onSwipe callback received gesture: {this.state.gestureName}</Text>\n      </GestureRecognizer>\n    );\n  }\n}\n\nexport default SomeComponent;\n```\n\n## Config\n\nCan be passed within optional `config` property.\n\n| Params                     | Type          | Default | Description  |\n| -------------------------- |:-------------:| ------- | ------------ |\n| velocityThreshold          | Number        | 0.3     | Velocity that has to be breached in order for swipe to be triggered (`vx` and `vy` properties of `gestureState`) |\n| directionalOffsetThreshold | Number        | 80      | Absolute offset that shouldn't be breached for swipe to be triggered (`dy` for horizontal swipe, `dx` for vertical swipe) |\n| gestureIsClickThreshold    | Number        | 5       | Absolute distance that should be breached for the gesture to not be considered a click (`dx` or `dy` properties of `gestureState`) |\n\n## Methods\n\n#### onSwipe(gestureName, gestureState)\n\n| Params        | Type          | Description  |\n| ------------- |:-------------:| ------------ |\n| gestureName   | String        | Name of the gesture (look example above) |\n| gestureState  | Object        | gestureState received from PanResponder  |\n\n\n#### onSwipeUp(gestureState)\n\n| Params        | Type          | Description  |\n| ------------- |:-------------:| ------------ |\n| gestureState  | Object        | gestureState received from PanResponder  |\n\n#### onSwipeDown(gestureState)\n\n| Params        | Type          | Description  |\n| ------------- |:-------------:| ------------ |\n| gestureState  | Object        | gestureState received from PanResponder  |\n\n#### onSwipeLeft(gestureState)\n\n| Params        | Type          | Description  |\n| ------------- |:-------------:| ------------ |\n| gestureState  | Object        | gestureState received from PanResponder  |\n\n#### onSwipeRight(gestureState)\n\n| Params        | Type          | Description  |\n| ------------- |:-------------:| ------------ |\n| gestureState  | Object        | gestureState received from PanResponder  |\n","maintainers":[{"name":"glepur","email":"goran.lepur1@gmail.com"}],"time":{"modified":"2022-06-26T07:09:11.345Z","created":"2016-12-22T12:30:24.013Z","1.0.0":"2016-12-22T12:30:24.013Z","1.0.1":"2016-12-22T12:45:32.369Z","1.0.2":"2017-01-28T17:09:52.582Z","1.0.3":"2018-11-27T09:06:58.619Z","1.0.4":"2019-09-30T08:26:32.019Z","1.0.5":"2020-03-21T07:49:53.458Z"},"keywords":["react-native","swipe","gesture"],"author":{"name":"Goran Lepur","email":"goran.lepur1@gmail.com"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/glepur/react-native-swipe-gestures#readme","repository":{"type":"git","url":"git+ssh://git@github.com/glepur/react-native-swipe-gestures.git"},"bugs":{"url":"https://github.com/glepur/react-native-swipe-gestures/issues"},"users":{"chiichuy":true,"junkycoder":true,"dillonace":true,"elmarini":true,"liorgrosman":true}}