diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 828ecd42d..1d9b9354e 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -219,6 +219,10 @@ PODS: - React-cxxreact (= 0.61.5) - React-jsi (= 0.61.5) - ReactCommon/jscallinvoker (= 0.61.5) + - RNGestureHandler (1.5.2): + - React + - RNReanimated (1.4.0): + - React - Yoga (1.14.0) DEPENDENCIES: @@ -250,6 +254,8 @@ DEPENDENCIES: - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) + - RNReanimated (from `../node_modules/react-native-reanimated`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: @@ -307,6 +313,10 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/Libraries/Vibration" ReactCommon: :path: "../node_modules/react-native/ReactCommon" + RNGestureHandler: + :path: "../node_modules/react-native-gesture-handler" + RNReanimated: + :path: "../node_modules/react-native-reanimated" Yoga: :path: "../node_modules/react-native/ReactCommon/yoga" @@ -337,6 +347,8 @@ SPEC CHECKSUMS: React-RCTText: 9ccc88273e9a3aacff5094d2175a605efa854dbe React-RCTVibration: a49a1f42bf8f5acf1c3e297097517c6b3af377ad ReactCommon: 198c7c8d3591f975e5431bec1b0b3b581aa1c5dd + RNGestureHandler: 946a7691e41df61e2c4b1884deab41a4cdc3afff + RNReanimated: b2ab0b693dddd2339bd2f300e770f6302d2e960c Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b PODFILE CHECKSUM: 79310af6b976c356911a8a833e9b99c3399fdda3 diff --git a/example/package.json b/example/package.json index 4c2c070ac..70a56ce90 100644 --- a/example/package.json +++ b/example/package.json @@ -12,6 +12,8 @@ "react": "16.9.0", "react-native": "0.61.5", "react-native-linear-gradient": "2.5.6", + "react-native-gesture-handler": "^1.5.2", + "react-native-reanimated": "^1.4.0", "react-native-snap-carousel": "file:../" }, "devDependencies": { diff --git a/example/yarn.lock b/example/yarn.lock index a4681eee8..2734aa958 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -2466,6 +2466,11 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= +hammerjs@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/hammerjs/-/hammerjs-2.0.8.tgz#04ef77862cff2bb79d30f7692095930222bf60f1" + integrity sha1-BO93hiz/K7edMPdpIJWTAiK/YPE= + handlebars@^4.1.2: version "4.5.3" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.5.3.tgz#5cf75bd8714f7605713511a56be7c349becb0482" @@ -2543,6 +2548,11 @@ hermes-engine@^0.2.1: resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.2.1.tgz#25c0f1ff852512a92cb5c5cc47cf967e1e722ea2" integrity sha512-eNHUQHuadDMJARpaqvlCZoK/Nitpj6oywq3vQ3wCwEsww5morX34mW5PmKWQTO7aU0ck0hgulxR+EVDlXygGxQ== +hoist-non-react-statics@^2.3.1: + version "2.5.5" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" + integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw== + hosted-git-info@^2.1.4: version "2.8.5" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" @@ -4550,16 +4560,33 @@ react-is@^16.8.1, react-is@^16.8.4, react-is@^16.9.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== +react-native-gesture-handler@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.5.2.tgz#281111550bf1eee10b7feba5278d142169892731" + integrity sha512-Xp03dq4XYVTD0xmWx4DW4eX+ox1NQLjHmbykspTdS5FCNIVIOekVXRLFCw1698/v8dYUHApNo6K3s3BCD8fqPA== + dependencies: + hammerjs "^2.0.8" + hoist-non-react-statics "^2.3.1" + invariant "^2.2.4" + prop-types "^15.7.2" + react-native-linear-gradient@2.5.6: version "2.5.6" resolved "https://registry.yarnpkg.com/react-native-linear-gradient/-/react-native-linear-gradient-2.5.6.tgz#96215cbc5ec7a01247a20890888aa75b834d44a0" integrity sha512-HDwEaXcQIuXXCV70O+bK1rizFong3wj+5Q/jSyifKFLg0VWF95xh8XQgfzXwtq0NggL9vNjPKXa016KuFu+VFg== +react-native-reanimated@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-1.4.0.tgz#7f1acbf9be08492d834f512700570978052be2f9" + integrity sha512-tO7nSNNP+iRLVbkcSS5GXyDBb7tSI02+XuRL3/S39EAr35rnvUy2JfeLUQG+fWSObJjnMVhasUDEUwlENk8IXw== + "react-native-snap-carousel@file:..": version "3.8.4" dependencies: prop-types "^15.6.1" react-addons-shallow-compare "15.6.2" + react-native-gesture-handler "^1.5.2" + react-native-reanimated "^1.4.0" react-native@0.61.5: version "0.61.5" diff --git a/package.json b/package.json index bcefd0b43..fdf618fc8 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,9 @@ "license": "BSD-3-Clause", "dependencies": { "prop-types": "^15.6.1", - "react-addons-shallow-compare": "15.6.2" + "react-addons-shallow-compare": "15.6.2", + "react-native-gesture-handler": "^1.5.2", + "react-native-reanimated": "^1.4.0" }, "peerDependencies": { "react": ">=15.0.0", diff --git a/src/carousel/Carousel.js b/src/carousel/Carousel.js index 7d1db25aa..01feac8ab 100644 --- a/src/carousel/Carousel.js +++ b/src/carousel/Carousel.js @@ -1,5 +1,7 @@ import React, { Component } from 'react'; -import { Animated, Easing, FlatList, I18nManager, Platform, ScrollView, View, ViewPropTypes } from 'react-native'; +import { I18nManager, Platform, View, ViewPropTypes } from 'react-native'; +import Animated, { Easing } from 'react-native-reanimated'; +import { ScrollView, FlatList } from 'react-native-gesture-handler'; import PropTypes from 'prop-types'; import shallowCompare from 'react-addons-shallow-compare'; import { diff --git a/src/pagination/PaginationDot.js b/src/pagination/PaginationDot.js index 2843257d4..766cc12cf 100644 --- a/src/pagination/PaginationDot.js +++ b/src/pagination/PaginationDot.js @@ -1,5 +1,6 @@ import React, { PureComponent } from 'react'; -import { View, Animated, Easing, TouchableOpacity, ViewPropTypes } from 'react-native'; +import { View, TouchableOpacity, ViewPropTypes } from 'react-native'; +import Animated, { Easing } from 'react-native-reanimated'; import PropTypes from 'prop-types'; import styles from './Pagination.style'; @@ -43,7 +44,7 @@ export default class PaginationDot extends PureComponent { _animate (toValue = 0) { const { animColor, animOpacity, animTransform } = this.state; - const { animatedDuration, animatedFriction, animatedTension } = this.props + const { animatedDuration, animatedFriction, animatedTension } = this.props; const commonProperties = { toValue, diff --git a/src/parallaximage/ParallaxImage.js b/src/parallaximage/ParallaxImage.js index 8bc774a10..a8421a18b 100644 --- a/src/parallaximage/ParallaxImage.js +++ b/src/parallaximage/ParallaxImage.js @@ -1,7 +1,8 @@ // Parallax effect inspired by https://github.com/oblador/react-native-parallax/ import React, { Component } from 'react'; -import { View, ViewPropTypes, Image, Animated, Easing, ActivityIndicator, findNodeHandle } from 'react-native'; +import { View, ViewPropTypes, Image, ActivityIndicator, findNodeHandle } from 'react-native'; +import Animated, { Easing } from 'react-native-reanimated'; import PropTypes from 'prop-types'; import styles from './ParallaxImage.style';