Skip to content

Commit

Permalink
chore: updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Oct 1, 2020
1 parent dbb1df6 commit 4af6851
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 87 deletions.
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ PODS:
- React
- RNGestureHandler (1.8.0):
- React
- RNReanimated (2.0.0-alpha.6):
- RNReanimated (2.0.0-alpha.7):
- DoubleConversion
- FBLazyVector
- FBReactNativeSpec
Expand Down Expand Up @@ -429,7 +429,7 @@ SPEC CHECKSUMS:
ReactCommon: a0a1edbebcac5e91338371b72ffc66aa822792ce
RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f
RNGestureHandler: 7a5833d0f788dbd107fbb913e09aa0c1ff333c39
RNReanimated: 6bd3347e383cee6eb879a1a7d6c748934a015a05
RNReanimated: c40c29429b22a1564e505b789132cfcef456c6bd
RNScreens: b748efec66e095134c7166ca333b628cd7e6f3e2
Yoga: 7740b94929bbacbddda59bf115b5317e9a161598

Expand Down
10 changes: 5 additions & 5 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
"start": "react-native start"
},
"dependencies": {
"@gorhom/showcase-template": "^0.3.1",
"@gorhom/showcase-template": "^1.0.2",
"@react-native-community/blur": "^3.6.0",
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/native": "^5.7.3",
"@react-navigation/stack": "^5.9.0",
"@react-navigation/native": "^5.7.5",
"@react-navigation/stack": "^5.9.2",
"faker": "^4.1.0",
"lodash.isequal": "^4.5.0",
"react": "16.13.1",
"react-native": "0.63.2",
"react-native-gesture-handler": "^1.8.0",
"react-native-maps": "^0.27.1",
"react-native-reanimated": "^2.0.0-alpha.6",
"react-native-reanimated": "^2.0.0-alpha.7",
"react-native-redash": "^15.1.4",
"react-native-safe-area-context": "0.7.3",
"react-native-screens": "^2.9.0"
"react-native-screens": "^2.11.0"
},
"devDependencies": {
"@babel/core": "^7.11.1",
Expand Down
55 changes: 25 additions & 30 deletions example/src/screens/MapExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,36 +52,31 @@ const MapExample = () => {
}, []);

// styles
const locationButtonAnimatedStyle = useAnimatedStyle(
() => {
console.log(
'X',
animatedPosition.value - snapPoints[snapPoints.length - 1]
);
return {
transform: [
{
translateY: clamp(
animatedPosition.value - snapPoints[snapPoints.length - 1],
-350,
-200
),
},
{
scale: interpolate(
animatedPosition.value - snapPoints[snapPoints.length - 1],
[-350, -400],
[1, 0],
Extrapolate.CLAMP
),
},
],
};
},
/** @TODO this should be fixed with reanimated alpha 7 */
// @ts-ignore
[]
);
const locationButtonAnimatedStyle = useAnimatedStyle(() => {
console.log(
'X',
animatedPosition.value - snapPoints[snapPoints.length - 1]
);
return {
transform: [
{
translateY: clamp(
animatedPosition.value - snapPoints[snapPoints.length - 1],
-350,
-200
),
},
{
scale: interpolate(
animatedPosition.value - snapPoints[snapPoints.length - 1],
[-350, -400],
[1, 0],
Extrapolate.CLAMP
),
},
],
};
}, []);

// renders
const renderBackground = useCallback(
Expand Down
3 changes: 3 additions & 0 deletions example/src/screens/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import Showcase from '@gorhom/showcase-template';
import { useNavigation } from '@react-navigation/native';
import { useSafeArea } from 'react-native-safe-area-context';
import { version, description } from '../../../package.json';

const data = [
Expand Down Expand Up @@ -51,6 +52,7 @@ const data = [
const RootScreen = () => {
// hooks
const { navigate } = useNavigation();
const safeInsets = useSafeArea();

// callbacks
const handleOnPress = (slug: string) => navigate(slug);
Expand All @@ -67,6 +69,7 @@ const RootScreen = () => {
url: 'https://gorhom.dev',
}}
data={data}
safeInsets={safeInsets}
handleOnPress={handleOnPress}
/>
);
Expand Down
2 changes: 0 additions & 2 deletions example/src/screens/ShadowOverlayExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ const ShadowOverlayExample = () => {
Extrapolate.CLAMP
),
}),
/** @TODO this should be fixed with reanimated alpha 7 */
// @ts-ignore
[]
);

Expand Down
60 changes: 30 additions & 30 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -687,10 +687,10 @@
dependencies:
"@types/hammerjs" "^2.0.36"

"@gorhom/showcase-template@^0.3.1":
version "0.3.1"
resolved "https://registry.yarnpkg.com/@gorhom/showcase-template/-/showcase-template-0.3.1.tgz#a44dfb51e49f5f4f606f5afa911ddfe70593bd53"
integrity sha512-3VK1KQpKn6wI6oIV5D2dFfQqDGzm0TIwzzwfzvskIV7LoAmATcDuoP/k49Sz7pjVVqWKoohVfE6Is+7dkQPaqw==
"@gorhom/showcase-template@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@gorhom/showcase-template/-/showcase-template-1.0.2.tgz#4dfefde1a2e05d28ac6420827d576ababb133272"
integrity sha512-D0mV9qsncJdwXfkkwE1eWpEANxMEFe8jwhVXJK7z6wJ1S3we3WXwzFleOc2Xl4tnwpcLOi6ijoowedwIPTjb1A==

"@hapi/address@2.x.x":
version "2.1.4"
Expand Down Expand Up @@ -898,37 +898,37 @@
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.10.tgz#5dda643e19e587793bc2034dd9bf7398ad43d401"
integrity sha512-rk4sWFsmtOw8oyx8SD3KSvawwaK7gRBSEIy2TAwURyGt+3TizssXP1r8nx3zY+R7v2vYYHXZ+k2/GULAT/bcaQ==

"@react-navigation/core@^5.12.3":
version "5.12.3"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-5.12.3.tgz#0484fcca290569a0dc10b70b99f00edd3f1fd93c"
integrity sha512-aEOTAw4FRRNsNu6F9ibLk3SVSs4Res8BI832NEZN6qUto5ZgtuYnQHWeWV2cZ43Nc9KvUyQC/vXvO2RScwgFwA==
"@react-navigation/core@^5.12.4":
version "5.12.4"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-5.12.4.tgz#1bd0c81d098895c8ffe49f8624fae60c9abc5684"
integrity sha512-vhaVIJGfSgln4dIoO4R2HeX9p3Vc7OJLa0/JpKHpXn/DZgNVn+RP7ktk1CRZ16ikUJ0k8CxzuvRxeRIg7EhA7w==
dependencies:
"@react-navigation/routers" "^5.4.11"
"@react-navigation/routers" "^5.4.12"
escape-string-regexp "^4.0.0"
nanoid "^3.1.12"
query-string "^6.13.1"
react-is "^16.13.0"
use-subscription "^1.4.0"

"@react-navigation/native@^5.7.3":
version "5.7.3"
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-5.7.3.tgz#3cda5ee7b0fe0d980db6d788419f0af50a64deac"
integrity sha512-bXb1g/cLpGF2DW1Vxk90Ch5vbaZTk5b/4Fn5xjQlueQODgc9ca+GPEssKZ84hCrNmS+Xg+iK1m/ArawLF5gMlw==
"@react-navigation/native@^5.7.5":
version "5.7.5"
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-5.7.5.tgz#478579435549a1c5c9901c9c6b3c1f75fa7dbf0c"
integrity sha512-HZpfxXF740XsA0HkeohGETo/zOmlMFb65XElQOk9+dPoN+36y2olZC/f7HuqpucsU925zg7jrnyUnW6tCtc3IA==
dependencies:
"@react-navigation/core" "^5.12.3"
"@react-navigation/core" "^5.12.4"
nanoid "^3.1.12"

"@react-navigation/routers@^5.4.11":
version "5.4.11"
resolved "https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.4.11.tgz#75dbec1809e282c3749068845099c5bee2c792f0"
integrity sha512-J/CsHdIjYBRe81UUiLOoz9NSrQ91uP23Oe21QPCALInRHx+rfwo2oPl6Fn8xAa7n8Dtt2oQUGyF+g5d05cB74w==
"@react-navigation/routers@^5.4.12":
version "5.4.12"
resolved "https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.4.12.tgz#5c3690650c94be3a54b617a1c07510d2f604c03f"
integrity sha512-IwMmxeb5e6LboljhakmhtrHBXLYFrFDr2c1GjAG538e4MjT4QGi/ZYckAxCh/NqKI0knnzqKppPl2NsOMv/NoQ==
dependencies:
nanoid "^3.1.12"

"@react-navigation/stack@^5.9.0":
version "5.9.0"
resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.9.0.tgz#bf24607175bf502798cc4c832aa8a86e55f3b365"
integrity sha512-kt6M0ZLMyNKXfKi50n01bHg4/d8zp0Yh5QaQG4d1roWOqdV9ou1nFEK4l2yQ6XKH2lLSYswHElPDZUuWd+6XzA==
"@react-navigation/stack@^5.9.2":
version "5.9.2"
resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.9.2.tgz#68841c9ef032177d15664b14cff62e16698f89c7"
integrity sha512-imEvTuCNsIo3ZriN6eIreGaxypuuB9ZOqdUXfxJznzMCkb7lN4OR/YVztAJW3QQzhuD4vwly+7jDvt7SxyfSuw==
dependencies:
color "^3.1.2"
react-native-iphone-x-helper "^1.2.1"
Expand Down Expand Up @@ -3587,10 +3587,10 @@ react-native-maps@^0.27.1:
resolved "https://registry.yarnpkg.com/react-native-maps/-/react-native-maps-0.27.1.tgz#2f10cd417bb2fd938c9e015b1c9b6d9b1a44b97f"
integrity sha512-HygBkZBecTnIVRYrSiLRAvu4OmXOYso/A7c6Cy73HkOh9CgGV8Ap5eBea24tvmFGptjj5Hg8AJ94/YbmWK1Okw==

react-native-reanimated@^2.0.0-alpha.6:
version "2.0.0-alpha.6"
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.0.0-alpha.6.tgz#d3b55127e8202a12b9073c97086dfe85283c9e08"
integrity sha512-VlclQ4dlHM7e8F8HBgwqUQTfCNK3k+h13aL/9k/JMqx4CrUAWe2RYdsRWxurV3YrK0RYdjpM4AvmxqGvJKWuWA==
react-native-reanimated@^2.0.0-alpha.7:
version "2.0.0-alpha.7"
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.0.0-alpha.7.tgz#20b9852df6aeab9fc0efb938527bf47ae954370a"
integrity sha512-dAOkt087c3uSm9oTe8cDIKHbZ+D6X951OG/SWzGAOWaR9GH/JW5N++YjmxQX2IK1vFlYNCMfBnxjTuWT6QHfmQ==
dependencies:
"@babel/plugin-transform-object-assign" "^7.10.4"
fbjs "^1.0.0"
Expand All @@ -3610,10 +3610,10 @@ react-native-safe-area-context@0.7.3:
resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-0.7.3.tgz#ad6bd4abbabe195332c53810e4ce5851eb21aa2a"
integrity sha512-9Uqu1vlXPi+2cKW/CW6OnHxA76mWC4kF3wvlqzq4DY8hn37AeiXtLFs2WkxH4yXQRrnJdP6ivc65Lz+MqwRZAA==

react-native-screens@^2.9.0:
version "2.10.1"
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.10.1.tgz#06d22fae87ef0ce51c616c34a199726db1403b95"
integrity sha512-Z2kKSk4AwWRQNCBmTjViuBQK0/Lx0jc25TZptn/2gKYUCOuVRvCekoA26u0Tsb3BIQ8tWDsZW14OwDlFUXW1aw==
react-native-screens@^2.11.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.11.0.tgz#34b30b07c2d04aa100cba984b944b303bfa43ea6"
integrity sha512-vJzJE3zI1XUtqthrX3Dh2TBQWB+xFyaGhF52KBq9FjJUN5ws4xpLZJxBWa1KbGV3DilmcSZ4jmZR5LGordwE7w==

react-native@0.63.2:
version "0.63.2"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"react": "~16.9.0",
"react-native": "^0.62.2",
"react-native-gesture-handler": "^1.7.0",
"react-native-reanimated": "^2.0.0-alpha.6",
"react-native-reanimated": "^2.0.0-alpha.7",
"release-it": "^13.6.5",
"typescript": "^3.9.7"
},
Expand Down
4 changes: 0 additions & 4 deletions src/components/bottomSheet/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
.reverse(),
Extrapolate.CLAMP
),
/** @TODO this should be fixed with reanimated alpha 7 */
// @ts-ignore
[snapPoints]
);

Expand Down Expand Up @@ -337,8 +335,6 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
return {
transform: [{ translateY: animatedPosition.value }],
};
/** @TODO this should be fixed with reanimated alpha 7 */
// @ts-ignore
}, []);
//#endregion

Expand Down
11 changes: 8 additions & 3 deletions src/hooks/useInteractivePanGestureHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import { clamp } from 'react-native-redash';
import { snapPoint } from '../utilities';
import { GESTURE } from '../constants';

type InteractivePanGestureHandlerContextType = {
lastAnimatedPosition: number;
};

export const useInteractivePanGestureHandler = (
type: GESTURE,
animatedPosition: Animated.SharedValue<number>,
Expand All @@ -27,7 +31,10 @@ export const useInteractivePanGestureHandler = (
const gestureTranslationY = useSharedValue(0);
const gestureVelocityY = useSharedValue(0);

const gestureHandler = useAnimatedGestureHandler<Record<string, number>>(
const gestureHandler = useAnimatedGestureHandler<
PanGestureHandlerGestureEvent,
InteractivePanGestureHandlerContextType
>(
{
onStart: ({ state, translationY, velocityY }, context) => {
// cancel current animation
Expand Down Expand Up @@ -73,8 +80,6 @@ export const useInteractivePanGestureHandler = (
);
},
},
/** @TODO this should be fixed with reanimated alpha 7 */
// @ts-ignore
[type, snapPoints, animateToPoint]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ export const useScrollableAnimatedProps = () => {
() => ({
decelerationRate: scrollableDecelerationRate.value,
}),
/** @TODO this should be fixed with reanimated alpha 7 */
// @ts-ignore
[]
);

Expand Down
2 changes: 0 additions & 2 deletions src/hooks/useScrollableInternal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ export const useScrollableInternal = (type: ScrollableType) => {
}
},
},
/** @TODO this should be fixed with reanimated alpha 7 */
// @ts-ignore
[]
);
const handleSettingScrollable = useCallback(() => {
Expand Down
2 changes: 0 additions & 2 deletions src/hooks/useTapGestureHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export const useTapGestureHandler = (
gestureState.value = state;
},
},
/** @TODO this should be fixed with reanimated alpha 7 */
// @ts-ignore
[]
);

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6665,10 +6665,10 @@ react-native-gesture-handler@^1.7.0:
invariant "^2.2.4"
prop-types "^15.7.2"

react-native-reanimated@^2.0.0-alpha.6:
version "2.0.0-alpha.6"
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.0.0-alpha.6.tgz#d3b55127e8202a12b9073c97086dfe85283c9e08"
integrity sha512-VlclQ4dlHM7e8F8HBgwqUQTfCNK3k+h13aL/9k/JMqx4CrUAWe2RYdsRWxurV3YrK0RYdjpM4AvmxqGvJKWuWA==
react-native-reanimated@^2.0.0-alpha.7:
version "2.0.0-alpha.7"
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.0.0-alpha.7.tgz#20b9852df6aeab9fc0efb938527bf47ae954370a"
integrity sha512-dAOkt087c3uSm9oTe8cDIKHbZ+D6X951OG/SWzGAOWaR9GH/JW5N++YjmxQX2IK1vFlYNCMfBnxjTuWT6QHfmQ==
dependencies:
"@babel/plugin-transform-object-assign" "^7.10.4"
fbjs "^1.0.0"
Expand Down

0 comments on commit 4af6851

Please sign in to comment.