Latest repo

This commit is contained in:
Marc
2025-06-02 16:42:16 +00:00
parent 53ddf1a329
commit cde5fae175
27907 changed files with 3875388 additions and 1 deletions

15
node_modules/react-easy-swipe/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,15 @@
coverage
src
test
gulpfile.js
demo
.babelrc
.travis.yml
.coveralls.yml
.editorconfig
.eslintrc
.nvmrc
.gitignore
webpack.config.js

97
node_modules/react-easy-swipe/README.md generated vendored Normal file
View File

@@ -0,0 +1,97 @@
# REACT EASY SWIPE
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fleandrowd%2Freact-easy-swipe.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fleandrowd%2Freact-easy-swipe?ref=badge_shield)
Add swipe interactions to your react component.
* Generated using [react-init](https://www.npmjs.com/package/react-init)
## Demo
[http://leandrowd.github.io/react-easy-swipe/](http://leandrowd.github.io/react-easy-swipe/)
- Open your console;
- Swipe over the content and check your console;
- This is a touch component so make sure your browser is emulating touch.
## Tips:
1) To prevent scroll during swipe, return true from the handler passed to onSwipeMove
2) To allow mouse events to behave like touch, pass a prop allowMouseEvents
3) To prevent accidental swipes on scroll, pass a prop tolerance with the tolerance pixel as number.
## Instalation
`npm install react-easy-swipe --save`
## Usage
```javascript
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import Swipe from 'react-easy-swipe';
class MyComponent extends Component {
onSwipeStart(event) {
console.log('Start swiping...', event);
}
onSwipeMove(position, event) {
console.log(`Moved ${position.x} pixels horizontally`, event);
console.log(`Moved ${position.y} pixels vertically`, event);
}
onSwipeEnd(event) {
console.log('End swiping...', event);
}
render() {
const boxStyle = {
width: '100%',
height: '300px',
border: '1px solid black',
background: '#ccc',
padding: '20px',
fontSize: '3em'
};
return (
<Swipe
onSwipeStart={this.onSwipeStart}
onSwipeMove={this.onSwipeMove}
onSwipeEnd={this.onSwipeEnd}>
<div style={boxStyle}>Open the console and swipe me</div>
</Swipe>
);
}
}
ReactDOM.render(<MyComponent/>, document.getElementById('root'));
```
## Properties
```javascript
{
tagName: PropTypes.string,
className: PropTypes.string,
style: PropTypes.object,
children: PropTypes.node,
allowMouseEvents: PropTypes.bool,
onSwipeUp: PropTypes.func,
onSwipeDown: PropTypes.func,
onSwipeLeft: PropTypes.func,
onSwipeRight: PropTypes.func,
onSwipeStart: PropTypes.func,
onSwipeMove: PropTypes.func,
onSwipeEnd: PropTypes.func,
tolerance: PropTypes.number.isRequired
}
```
## Contributing
Please, feel free to contribute. You may open a bug, request a feature, submit a pull request or whatever you want!
## License
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fleandrowd%2Freact-easy-swipe.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fleandrowd%2Freact-easy-swipe?ref=badge_large)

122
node_modules/react-easy-swipe/index.html generated vendored Normal file
View File

@@ -0,0 +1,122 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>React easy swipe demo</title>
<style>
body {
font-family: 'Roboto', sans-serif;
font-size: 16px;
font-weight: 400;
color: #333; }
h1, h2, h3, h4 {
font-weight: 700;
margin: 20px 0; }
h1 {
font-weight: 700;
font-size: 2.5em; }
h2 {
border-top: 1px solid #999;
padding-top: 40px;
margin-top: 40px;
font-size: 2em; }
h3 {
font-size: 1.4em; }
h4 {
font-size: 1.1em;
margin-bottom: 10px; }
code {
border-radius: 20px;
background: #f5f5f5;
padding: 20px;
text-indent: 0;
color: #333;
display: block;
margin: auto;
overflow: scroll;
width: 100%; }
.wrapper {
padding: 30px; }
.wrapper .demo {
display: block;
margin: 30px 0;
padding-bottom: 30px;
border-bottom: 1px solid #333; }
.wrapper .demo:last-child {
border-bottom: 0; }
.list-items, .summary {
margin-left: 50px; }
.list-items li, .summary li {
line-height: 2;
list-style-type: circle; }
.list-items li ul, .summary li ul {
margin-left: 30px; }
footer {
text-align: center;
}
</style>
</head>
<body>
<a href="https://github.com/leandrowd/react-responsive-carousel"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
<div class="wrapper">
<h1>React Easy Swipe (WIP)</h1>
<h2>Summary</h2>
<ul class="summary">
<li><a href="#install">Installing</a></li>
<li><a href="#demo">Demo</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#props">Properties</a></li>
<li><a href="#contribute">Contributing</a></li>
</ul>
<h2 id="install">Installing</h2>
<code>
npm install react-easy-swipe --save
</code>
<h2 id="demo">Demo</h2>
<div id="root"></div>
<h2 id="usage">Usage</h2>
<script src="https://gist.github.com/leandrowd/e9074b19b8dc23a8b471.js"></script>
<h2 id="props">Properties</h2>
<pre>
<code>
{
tagName: PropTypes.string,
className: PropTypes.string,
style: PropTypes.object,
children: PropTypes.node,
onSwipeUp: PropTypes.func,
onSwipeDown: PropTypes.func,
onSwipeLeft: PropTypes.func,
onSwipeRight: PropTypes.func,
onSwipeStart: PropTypes.func,
onSwipeMove: PropTypes.func,
onSwipeEnd: PropTypes.func
}
</code>
</pre>
<h2 id="contribute">Contributing</h2>
<p>Please, feel free to contribute. You may open a bug, request a feature, submit a pull request or whatever you want!</p>
</div>
<script src="./demo/vendor.bundle.js"></script>
<script src="./demo/demo.js"></script>
</body>
</html>

134
node_modules/react-easy-swipe/lib/demo.js generated vendored Normal file
View File

@@ -0,0 +1,134 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(['react', 'react-dom', './react-swipe'], factory);
} else if (typeof exports !== "undefined") {
factory(require('react'), require('react-dom'), require('./react-swipe'));
} else {
var mod = {
exports: {}
};
factory(global.react, global.reactDom, global.reactSwipe);
global.demo = mod.exports;
}
})(this, function (_react, _reactDom, _reactSwipe) {
'use strict';
var _react2 = _interopRequireDefault(_react);
var _reactDom2 = _interopRequireDefault(_reactDom);
var _reactSwipe2 = _interopRequireDefault(_reactSwipe);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var MyComponent = function (_Component) {
_inherits(MyComponent, _Component);
function MyComponent() {
_classCallCheck(this, MyComponent);
return _possibleConstructorReturn(this, (MyComponent.__proto__ || Object.getPrototypeOf(MyComponent)).apply(this, arguments));
}
_createClass(MyComponent, [{
key: 'onSwipeStart',
value: function onSwipeStart(event) {
console.log('Start swiping...', event);
}
}, {
key: 'onSwipeMove',
value: function onSwipeMove(position, event) {
console.log('Moved ' + position.x + ' pixels horizontally', event);
console.log('Moved ' + position.y + ' pixels vertically', event);
}
}, {
key: 'onSwipeEnd',
value: function onSwipeEnd(event) {
console.log('End swiping...', event);
}
}, {
key: 'render',
value: function render() {
var boxStyle = {
width: '100%',
margin: '20px auto',
height: '300px',
border: '1px solid black',
background: '#ccc',
padding: '20px',
fontSize: '3em'
};
return _react2.default.createElement(
_reactSwipe2.default,
{
onSwipeStart: this.onSwipeStart,
onSwipeMove: this.onSwipeMove,
onSwipeEnd: this.onSwipeEnd
},
_react2.default.createElement(
'div',
{ style: boxStyle },
'Open the console and swipe me'
)
);
}
}]);
return MyComponent;
}(_react.Component);
_reactDom2.default.render(_react2.default.createElement(MyComponent, null), document.getElementById('root'));
});

1
node_modules/react-easy-swipe/lib/demo.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"demo.js","sourcesContent":[],"sourceRoot":"/source/"}

29
node_modules/react-easy-swipe/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(['exports', './react-swipe'], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require('./react-swipe'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.reactSwipe);
global.index = mod.exports;
}
})(this, function (exports, _reactSwipe) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactSwipe2 = _interopRequireDefault(_reactSwipe);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
exports.default = _reactSwipe2.default;
});

1
node_modules/react-easy-swipe/lib/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[],"sourceRoot":"/source/"}

360
node_modules/react-easy-swipe/lib/react-swipe.js generated vendored Normal file
View File

@@ -0,0 +1,360 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(['exports', 'react', 'prop-types'], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require('react'), require('prop-types'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.react, global.propTypes);
global.reactSwipe = mod.exports;
}
})(this, function (exports, _react, _propTypes) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.setHasSupportToCaptureOption = setHasSupportToCaptureOption;
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
function _objectWithoutProperties(obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
var supportsCaptureOption = false;
function setHasSupportToCaptureOption(hasSupport) {
supportsCaptureOption = hasSupport;
}
try {
addEventListener('test', null, Object.defineProperty({}, 'capture', { get: function get() {
setHasSupportToCaptureOption(true);
} }));
} catch (e) {} // eslint-disable-line no-empty
function getSafeEventHandlerOpts() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { capture: true };
return supportsCaptureOption ? options : options.capture;
}
/**
* [getPosition returns a position element that works for mouse or touch events]
* @param {[Event]} event [the received event]
* @return {[Object]} [x and y coords]
*/
function getPosition(event) {
if ('touches' in event) {
var _event$touches$ = event.touches[0],
pageX = _event$touches$.pageX,
pageY = _event$touches$.pageY;
return { x: pageX, y: pageY };
}
var screenX = event.screenX,
screenY = event.screenY;
return { x: screenX, y: screenY };
}
var ReactSwipe = function (_Component) {
_inherits(ReactSwipe, _Component);
function ReactSwipe() {
var _ref;
_classCallCheck(this, ReactSwipe);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var _this = _possibleConstructorReturn(this, (_ref = ReactSwipe.__proto__ || Object.getPrototypeOf(ReactSwipe)).call.apply(_ref, [this].concat(args)));
_this._handleSwipeStart = _this._handleSwipeStart.bind(_this);
_this._handleSwipeMove = _this._handleSwipeMove.bind(_this);
_this._handleSwipeEnd = _this._handleSwipeEnd.bind(_this);
_this._onMouseDown = _this._onMouseDown.bind(_this);
_this._onMouseMove = _this._onMouseMove.bind(_this);
_this._onMouseUp = _this._onMouseUp.bind(_this);
_this._setSwiperRef = _this._setSwiperRef.bind(_this);
return _this;
}
_createClass(ReactSwipe, [{
key: 'componentDidMount',
value: function componentDidMount() {
if (this.swiper) {
this.swiper.addEventListener('touchmove', this._handleSwipeMove, getSafeEventHandlerOpts({
capture: true,
passive: false
}));
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
if (this.swiper) {
this.swiper.removeEventListener('touchmove', this._handleSwipeMove, getSafeEventHandlerOpts({
capture: true,
passive: false
}));
}
}
}, {
key: '_onMouseDown',
value: function _onMouseDown(event) {
if (!this.props.allowMouseEvents) {
return;
}
this.mouseDown = true;
document.addEventListener('mouseup', this._onMouseUp);
document.addEventListener('mousemove', this._onMouseMove);
this._handleSwipeStart(event);
}
}, {
key: '_onMouseMove',
value: function _onMouseMove(event) {
if (!this.mouseDown) {
return;
}
this._handleSwipeMove(event);
}
}, {
key: '_onMouseUp',
value: function _onMouseUp(event) {
this.mouseDown = false;
document.removeEventListener('mouseup', this._onMouseUp);
document.removeEventListener('mousemove', this._onMouseMove);
this._handleSwipeEnd(event);
}
}, {
key: '_handleSwipeStart',
value: function _handleSwipeStart(event) {
var _getPosition = getPosition(event),
x = _getPosition.x,
y = _getPosition.y;
this.moveStart = { x: x, y: y };
this.props.onSwipeStart(event);
}
}, {
key: '_handleSwipeMove',
value: function _handleSwipeMove(event) {
if (!this.moveStart) {
return;
}
var _getPosition2 = getPosition(event),
x = _getPosition2.x,
y = _getPosition2.y;
var deltaX = x - this.moveStart.x;
var deltaY = y - this.moveStart.y;
this.moving = true;
// handling the responsability of cancelling the scroll to
// the component handling the event
var shouldPreventDefault = this.props.onSwipeMove({
x: deltaX,
y: deltaY
}, event);
if (shouldPreventDefault && event.cancelable) {
event.preventDefault();
}
this.movePosition = { deltaX: deltaX, deltaY: deltaY };
}
}, {
key: '_handleSwipeEnd',
value: function _handleSwipeEnd(event) {
this.props.onSwipeEnd(event);
var tolerance = this.props.tolerance;
if (this.moving && this.movePosition) {
if (this.movePosition.deltaX < -tolerance) {
this.props.onSwipeLeft(1, event);
} else if (this.movePosition.deltaX > tolerance) {
this.props.onSwipeRight(1, event);
}
if (this.movePosition.deltaY < -tolerance) {
this.props.onSwipeUp(1, event);
} else if (this.movePosition.deltaY > tolerance) {
this.props.onSwipeDown(1, event);
}
}
this.moveStart = null;
this.moving = false;
this.movePosition = null;
}
}, {
key: '_setSwiperRef',
value: function _setSwiperRef(node) {
this.swiper = node;
this.props.innerRef(node);
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
tagName = _props.tagName,
className = _props.className,
style = _props.style,
children = _props.children,
allowMouseEvents = _props.allowMouseEvents,
onSwipeUp = _props.onSwipeUp,
onSwipeDown = _props.onSwipeDown,
onSwipeLeft = _props.onSwipeLeft,
onSwipeRight = _props.onSwipeRight,
onSwipeStart = _props.onSwipeStart,
onSwipeMove = _props.onSwipeMove,
onSwipeEnd = _props.onSwipeEnd,
innerRef = _props.innerRef,
tolerance = _props.tolerance,
props = _objectWithoutProperties(_props, ['tagName', 'className', 'style', 'children', 'allowMouseEvents', 'onSwipeUp', 'onSwipeDown', 'onSwipeLeft', 'onSwipeRight', 'onSwipeStart', 'onSwipeMove', 'onSwipeEnd', 'innerRef', 'tolerance']);
return _react2.default.createElement(
this.props.tagName,
_extends({
ref: this._setSwiperRef,
onMouseDown: this._onMouseDown,
onTouchStart: this._handleSwipeStart,
onTouchEnd: this._handleSwipeEnd,
className: className,
style: style
}, props),
children
);
}
}]);
return ReactSwipe;
}(_react.Component);
ReactSwipe.displayName = 'ReactSwipe';
ReactSwipe.propTypes = {
tagName: _propTypes2.default.string,
className: _propTypes2.default.string,
style: _propTypes2.default.object,
children: _propTypes2.default.node,
allowMouseEvents: _propTypes2.default.bool,
onSwipeUp: _propTypes2.default.func,
onSwipeDown: _propTypes2.default.func,
onSwipeLeft: _propTypes2.default.func,
onSwipeRight: _propTypes2.default.func,
onSwipeStart: _propTypes2.default.func,
onSwipeMove: _propTypes2.default.func,
onSwipeEnd: _propTypes2.default.func,
innerRef: _propTypes2.default.func,
tolerance: _propTypes2.default.number.isRequired
};
ReactSwipe.defaultProps = {
tagName: 'div',
allowMouseEvents: false,
onSwipeUp: function onSwipeUp() {},
onSwipeDown: function onSwipeDown() {},
onSwipeLeft: function onSwipeLeft() {},
onSwipeRight: function onSwipeRight() {},
onSwipeStart: function onSwipeStart() {},
onSwipeMove: function onSwipeMove() {},
onSwipeEnd: function onSwipeEnd() {},
innerRef: function innerRef() {},
tolerance: 0
};
exports.default = ReactSwipe;
});

1
node_modules/react-easy-swipe/lib/react-swipe.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["react-swipe.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA2Fe,UAAU","file":"react-swipe.js","sourcesContent":["import React, { Component, PropTypes } from 'react';\n\nclass ReactSwipe extends Component {\n static propTypes = {\n tagName: PropTypes.string,\n className: PropTypes.string,\n style: PropTypes.object,\n children: PropTypes.node,\n onSwipeUp: PropTypes.func,\n onSwipeDown: PropTypes.func,\n onSwipeLeft: PropTypes.func,\n onSwipeRight: PropTypes.func,\n onSwipeStart: PropTypes.func,\n onSwipeMove: PropTypes.func,\n onSwipeEnd: PropTypes.func\n }\n\n static defaultProps = {\n tagName: 'div',\n onSwipeUp() {},\n onSwipeDown() {},\n onSwipeLeft() {},\n onSwipeRight() {},\n onSwipeStart() {},\n onSwipeMove() {},\n onSwipeEnd() {}\n }\n\n constructor() {\n super();\n this._handleSwipeStart = this._handleSwipeStart.bind(this);\n this._handleSwipeMove = this._handleSwipeMove.bind(this);\n this._handleSwipeEnd = this._handleSwipeEnd.bind(this);\n }\n\n _handleSwipeStart(e) {\n const { pageX, pageY } = e.touches[0];\n this.touchStart = { pageX, pageY };\n this.props.onSwipeStart();\n }\n\n _handleSwipeMove(e) {\n e.preventDefault();\n const deltaX = e.touches[0].pageX - this.touchStart.pageX;\n const deltaY = e.touches[0].pageY - this.touchStart.pageY;\n this.swiping = true;\n this.props.onSwipeMove({\n x: deltaX,\n y: deltaY\n });\n this.touchPosition = { deltaX, deltaY };\n }\n\n _handleSwipeEnd() {\n if (this.swiping) {\n if (this.touchPosition.deltaX < 0) {\n this.props.onSwipeLeft(1);\n } else if (this.touchPosition.deltaX > 0) {\n this.props.onSwipeRight(1);\n }\n if (this.touchPosition.deltaY < 0) {\n this.props.onSwipeDown(1);\n } else if (this.touchPosition.deltaY > 0) {\n this.props.onSwipeUp(1);\n }\n }\n this.props.onSwipeEnd();\n this.touchStart = null;\n this.swiping = false;\n this.touchPosition = null;\n }\n\n render() {\n return (\n <this.props.tagName\n onTouchMove = { this._handleSwipeMove }\n onTouchStart = { this._handleSwipeStart }\n onTouchEnd = { this._handleSwipeEnd }\n className = { this.props.className }\n style = { this.props.style }\n >\n\n { this.props.children }\n\n </this.props.tagName>\n );\n }\n}\n\nReactSwipe.displayName = 'ReactSwipe';\n\nexport default ReactSwipe;\n"],"sourceRoot":"/source/"}

90
node_modules/react-easy-swipe/package.json generated vendored Normal file
View File

@@ -0,0 +1,90 @@
{
"name": "react-easy-swipe",
"version": "0.0.21",
"description": "React easy swipe - Easy handler for common touch operations",
"main": "./lib/index.js",
"types": "./react-easy-swipe.d.ts",
"engines": {
"node": ">= 6"
},
"repository": {
"type": "git",
"url": "https://github.com/leandrowd/react-easy-swipe.git"
},
"bugs": {
"url": "https://github.com/leandrowd/react-easy-swipe/issues"
},
"homepage": "http://leandrowd.github.io/react-easy-swipe/",
"scripts": {
"start": "watch 'npm run lint' ./src",
"lint": "eslint src/ test/",
"build": "babel src/ --out-dir ./lib",
"demo": "webpack",
"test": "mocha",
"tdd": "mocha --watch",
"prepublish-to-npm": "git pull && npm run build && git add . && git commit -m 'Prepare for publishing'",
"publish-to-npm": "(git pull origin master && npm version patch && git push origin master && npm publish && git push --tags)"
},
"author": {
"name": "Leandro Augusto Lemos",
"url": "http://leandrowd.github.io/"
},
"license": "MIT",
"devDependencies": {
"@types/react": "^16.9.17",
"babel-cli": "^6.22.2",
"babel-core": "^6.3.15",
"babel-eslint": "^4.1.6",
"babel-loader": "^6.2.1",
"babel-plugin-transform-es2015-modules-umd": "^6.3.13",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-preset-stage-1": "^6.3.13",
"babel-register": "^6.3.13",
"chai": "^3.4.1",
"chai-enzyme": "^0.6.1",
"chai-sinon": "^2.8.1",
"cheerio": "^0.22.0",
"coveralls": "^2.11.4",
"del": "^2.2.0",
"enzyme": "2.8.2",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^2.0.0",
"eslint-plugin-react": "^3.11.3",
"gulp-babel": "^6.1.1",
"gulp-changed": "^1.3.0",
"gulp-eslint": "^1.1.1",
"gulp-mocha": "^2.2.0",
"gulp-sourcemaps": "^1.6.0",
"jsdom": "^7.2.0",
"mocha": "^3.2.0",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-test-renderer": "^15.5.4",
"sinon": "^1.17.7",
"watch": "^0.19.2",
"webpack": "^1.12.10"
},
"tags": [
"React",
"React swipe",
"React easy swipe",
"Swipe",
"Swiper"
],
"keywords": [
"React swipe",
"React easy swipe",
"React touch",
"react-swipe",
"react-easy-swipe",
"react-touch",
"react-component",
"Mobile",
"Swipe",
"Touch"
],
"dependencies": {
"prop-types": "^15.5.8"
}
}

27
node_modules/react-easy-swipe/react-easy-swipe.d.ts generated vendored Normal file
View File

@@ -0,0 +1,27 @@
/* eslint-disable */
import * as React from 'react';
export interface SwipePosition {
x: number;
y: number;
}
export type SwipeEvent = React.TouchEvent | React.MouseEvent;
interface SwipeProps {
tagName?: string;
className?: string;
style?: React.CSSProperties;
allowMouseEvents?: boolean;
onSwipeUp?: (trigger: 1) => void;
onSwipeDown?: (trigger: 1) => void;
onSwipeLeft?: (trigger: 1) => void;
onSwipeRight?: (trigger: 1) => void;
onSwipeStart?: (e: SwipeEvent) => void;
onSwipeMove?: (position: SwipePosition, e: SwipeEvent) => void;
onSwipeEnd?: (e: SwipeEvent) => void;
innerRef: (node: any) => void;
tolerance?: number
}
export default class Swipe extends React.Component<SwipeProps> {}

4551
node_modules/react-easy-swipe/yarn.lock generated vendored Normal file

File diff suppressed because it is too large Load Diff