diff --git a/example/ios/AnimatedTabbarExample.xcodeproj/project.pbxproj b/example/ios/AnimatedTabbarExample.xcodeproj/project.pbxproj index 728bf1c..8f28651 100644 --- a/example/ios/AnimatedTabbarExample.xcodeproj/project.pbxproj +++ b/example/ios/AnimatedTabbarExample.xcodeproj/project.pbxproj @@ -116,6 +116,7 @@ 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 3032C51978FDF384AAAA97F7 /* [CP] Copy Pods Resources */, + 72D1927318622C67C80E7598 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -204,6 +205,24 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AnimatedTabbarExample/Pods-AnimatedTabbarExample-resources.sh\"\n"; showEnvVarsInLog = 0; }; + 72D1927318622C67C80E7598 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-AnimatedTabbarExample/Pods-AnimatedTabbarExample-frameworks.sh", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL/OpenSSL.framework/OpenSSL", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AnimatedTabbarExample/Pods-AnimatedTabbarExample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; CCCC07BCAFDEF1FCADC0D0C9 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -336,6 +355,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -396,6 +416,7 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/example/ios/Podfile b/example/ios/Podfile index cd23924..621f5b8 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -11,8 +11,12 @@ target 'AnimatedTabbarExample' do # # Note that if you have use_frameworks! enabled, Flipper will not work and # you should disable these next few lines. - use_flipper! + use_flipper!({'Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1'}) post_install do |installer| flipper_post_install(installer) + + installer.pods_project.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" + end end end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index e71d105..a35beac 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,7 +1,6 @@ PODS: - boost-for-react-native (1.63.0) - - CocoaAsyncSocket (7.6.4) - - CocoaLibEvent (1.0.0) + - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - FBLazyVector (0.63.3) - FBReactNativeSpec (0.63.3): @@ -11,50 +10,50 @@ PODS: - React-Core (= 0.63.3) - React-jsi (= 0.63.3) - ReactCommon/turbomodule/core (= 0.63.3) - - Flipper (0.54.0): - - Flipper-Folly (~> 2.2) - - Flipper-RSocket (~> 1.1) + - Flipper (0.75.1): + - Flipper-Folly (~> 2.5) + - Flipper-RSocket (~> 1.3) - Flipper-DoubleConversion (1.1.7) - - Flipper-Folly (2.2.0): + - Flipper-Folly (2.5.3): - boost-for-react-native - - CocoaLibEvent (~> 1.0) - Flipper-DoubleConversion - Flipper-Glog - - OpenSSL-Universal (= 1.0.2.19) + - libevent (~> 2.1.12) + - OpenSSL-Universal (= 1.1.180) - Flipper-Glog (0.3.6) - Flipper-PeerTalk (0.0.4) - - Flipper-RSocket (1.1.0): - - Flipper-Folly (~> 2.2) - - FlipperKit (0.54.0): - - FlipperKit/Core (= 0.54.0) - - FlipperKit/Core (0.54.0): - - Flipper (~> 0.54.0) + - Flipper-RSocket (1.3.1): + - Flipper-Folly (~> 2.5) + - FlipperKit (0.75.1): + - FlipperKit/Core (= 0.75.1) + - FlipperKit/Core (0.75.1): + - Flipper (~> 0.75.1) - FlipperKit/CppBridge - FlipperKit/FBCxxFollyDynamicConvert - FlipperKit/FBDefines - FlipperKit/FKPortForwarding - - FlipperKit/CppBridge (0.54.0): - - Flipper (~> 0.54.0) - - FlipperKit/FBCxxFollyDynamicConvert (0.54.0): - - Flipper-Folly (~> 2.2) - - FlipperKit/FBDefines (0.54.0) - - FlipperKit/FKPortForwarding (0.54.0): + - FlipperKit/CppBridge (0.75.1): + - Flipper (~> 0.75.1) + - FlipperKit/FBCxxFollyDynamicConvert (0.75.1): + - Flipper-Folly (~> 2.5) + - FlipperKit/FBDefines (0.75.1) + - FlipperKit/FKPortForwarding (0.75.1): - CocoaAsyncSocket (~> 7.6) - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.54.0) - - FlipperKit/FlipperKitLayoutPlugin (0.54.0): + - FlipperKit/FlipperKitHighlightOverlay (0.75.1) + - FlipperKit/FlipperKitLayoutPlugin (0.75.1): - FlipperKit/Core - FlipperKit/FlipperKitHighlightOverlay - FlipperKit/FlipperKitLayoutTextSearchable - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutTextSearchable (0.54.0) - - FlipperKit/FlipperKitNetworkPlugin (0.54.0): + - FlipperKit/FlipperKitLayoutTextSearchable (0.75.1) + - FlipperKit/FlipperKitNetworkPlugin (0.75.1): - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.54.0): + - FlipperKit/FlipperKitReactPlugin (0.75.1): - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.54.0): + - FlipperKit/FlipperKitUserDefaultsPlugin (0.75.1): - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.54.0): + - FlipperKit/SKIOSNetworkPlugin (0.75.1): - FlipperKit/Core - FlipperKit/FlipperKitNetworkPlugin - Folly (2020.01.13.00): @@ -67,9 +66,8 @@ PODS: - DoubleConversion - glog - glog (0.3.5) - - OpenSSL-Universal (1.0.2.19): - - OpenSSL-Universal/Static (= 1.0.2.19) - - OpenSSL-Universal/Static (1.0.2.19) + - libevent (2.1.12) + - OpenSSL-Universal (1.1.180) - RCTRequired (0.63.3) - RCTTypeSafety (0.63.3): - FBLazyVector (= 0.63.3) @@ -236,7 +234,7 @@ PODS: - React-cxxreact (= 0.63.3) - React-jsi (= 0.63.3) - React-jsinspector (0.63.3) - - react-native-safe-area-context (3.1.8): + - react-native-safe-area-context (3.2.0): - React-Core - React-RCTActionSheet (0.63.3): - React-Core/RCTActionSheetHeaders (= 0.63.3) @@ -298,15 +296,15 @@ PODS: - React-Core (= 0.63.3) - React-cxxreact (= 0.63.3) - React-jsi (= 0.63.3) - - RNCMaskedView (0.1.10): - - React - - RNGestureHandler (1.8.0): + - RNCMaskedView (0.1.11): - React + - RNGestureHandler (1.10.3): + - React-Core - RNReanimated (1.13.1): - React - - RNScreens (2.11.0): - - React - - RNSVG (12.1.0): + - RNScreens (2.18.1): + - React-Core + - RNSVG (12.1.1): - React - Yoga (1.14.0) - YogaKit (1.18.1): @@ -316,25 +314,25 @@ DEPENDENCIES: - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) - - Flipper (~> 0.54.0) + - Flipper (= 0.75.1) - Flipper-DoubleConversion (= 1.1.7) - - Flipper-Folly (~> 2.2) + - Flipper-Folly (= 2.5.3) - Flipper-Glog (= 0.3.6) - Flipper-PeerTalk (~> 0.0.4) - - Flipper-RSocket (~> 1.1) - - FlipperKit (~> 0.54.0) - - FlipperKit/Core (~> 0.54.0) - - FlipperKit/CppBridge (~> 0.54.0) - - FlipperKit/FBCxxFollyDynamicConvert (~> 0.54.0) - - FlipperKit/FBDefines (~> 0.54.0) - - FlipperKit/FKPortForwarding (~> 0.54.0) - - FlipperKit/FlipperKitHighlightOverlay (~> 0.54.0) - - FlipperKit/FlipperKitLayoutPlugin (~> 0.54.0) - - FlipperKit/FlipperKitLayoutTextSearchable (~> 0.54.0) - - FlipperKit/FlipperKitNetworkPlugin (~> 0.54.0) - - FlipperKit/FlipperKitReactPlugin (~> 0.54.0) - - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.54.0) - - FlipperKit/SKIOSNetworkPlugin (~> 0.54.0) + - Flipper-RSocket (= 1.3.1) + - FlipperKit (= 0.75.1) + - FlipperKit/Core (= 0.75.1) + - FlipperKit/CppBridge (= 0.75.1) + - FlipperKit/FBCxxFollyDynamicConvert (= 0.75.1) + - FlipperKit/FBDefines (= 0.75.1) + - FlipperKit/FKPortForwarding (= 0.75.1) + - FlipperKit/FlipperKitHighlightOverlay (= 0.75.1) + - FlipperKit/FlipperKitLayoutPlugin (= 0.75.1) + - FlipperKit/FlipperKitLayoutTextSearchable (= 0.75.1) + - FlipperKit/FlipperKitNetworkPlugin (= 0.75.1) + - FlipperKit/FlipperKitReactPlugin (= 0.75.1) + - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.75.1) + - FlipperKit/SKIOSNetworkPlugin (= 0.75.1) - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) @@ -371,7 +369,6 @@ SPEC REPOS: trunk: - boost-for-react-native - CocoaAsyncSocket - - CocoaLibEvent - Flipper - Flipper-DoubleConversion - Flipper-Folly @@ -379,6 +376,7 @@ SPEC REPOS: - Flipper-PeerTalk - Flipper-RSocket - FlipperKit + - libevent - OpenSSL-Universal - YogaKit @@ -450,21 +448,21 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c - CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 - CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f + CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: cde416483dac037923206447da6e1454df403714 FBLazyVector: 878b59e31113e289e275165efbe4b54fa614d43d FBReactNativeSpec: 7da9338acfb98d4ef9e5536805a0704572d33c2f - Flipper: be611d4b742d8c87fbae2ca5f44603a02539e365 + Flipper: d3da1aa199aad94455ae725e9f3aa43f3ec17021 Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 - Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3 + Flipper-Folly: 755929a4f851b2fb2c347d533a23f191b008554c Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7 - FlipperKit: ab353d41aea8aae2ea6daaf813e67496642f3d7d + Flipper-RSocket: 127954abe8b162fcaf68d2134d34dc2bd7076154 + FlipperKit: 8a20b5c5fcf9436cac58551dc049867247f64b00 Folly: b73c3869541e86821df3c387eb0af5f65addfab4 glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 - OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355 + libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 + OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b RCTRequired: 48884c74035a0b5b76dbb7a998bd93bcfc5f2047 RCTTypeSafety: edf4b618033c2f1c5b7bc3d90d8e085ed95ba2ab React: f36e90f3ceb976546e97df3403e37d226f79d0e3 @@ -475,7 +473,7 @@ SPEC CHECKSUMS: React-jsi: df07aa95b39c5be3e41199921509bfa929ed2b9d React-jsiexecutor: b56c03e61c0dd5f5801255f2160a815f4a53d451 React-jsinspector: 8e68ffbfe23880d3ee9bafa8be2777f60b25cbe2 - react-native-safe-area-context: 79fea126c6830c85f65947c223a5e3058a666937 + react-native-safe-area-context: f0906bf8bc9835ac9a9d3f97e8bde2a997d8da79 React-RCTActionSheet: 53ea72699698b0b47a6421cb1c8b4ab215a774aa React-RCTAnimation: 1befece0b5183c22ae01b966f5583f42e69a83c2 React-RCTBlob: 0b284339cbe4b15705a05e2313a51c6d8b51fa40 @@ -486,14 +484,14 @@ SPEC CHECKSUMS: React-RCTText: 65a6de06a7389098ce24340d1d3556015c38f746 React-RCTVibration: 8e9fb25724a0805107fc1acc9075e26f814df454 ReactCommon: 4167844018c9ed375cc01a843e9ee564399e53c3 - RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f - RNGestureHandler: 7a5833d0f788dbd107fbb913e09aa0c1ff333c39 + RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489 + RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211 RNReanimated: dd8c286ab5dd4ba36d3a7fef8bff7e08711b5476 - RNScreens: 0e91da98ab26d5d04c7b59a9b6bd694124caf88c - RNSVG: ce9d996113475209013317e48b05c21ee988d42e + RNScreens: f7ad633b2e0190b77b6a7aab7f914fad6f198d8d + RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f Yoga: 7d13633d129fd179e01b8953d38d47be90db185a YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: f630fbf0bfd5691cdec7a6090ba3750dd5327574 +PODFILE CHECKSUM: 123adc0ddd7550383a810db19f0376e4a7659c8f -COCOAPODS: 1.9.1 +COCOAPODS: 1.10.1 diff --git a/example/package.json b/example/package.json index 644cdbf..3f78dfa 100644 --- a/example/package.json +++ b/example/package.json @@ -19,7 +19,7 @@ "react-native": "0.63.3", "react-native-gesture-handler": "^1.8.0", "react-native-reanimated": "1.13.1", - "react-native-redash": "^15.7.3", + "react-native-redash": "14.2.4", "react-native-safe-area-context": "^3.1.8", "react-native-screens": "^2.11.0", "react-native-svg": "^12.1.0" @@ -31,6 +31,6 @@ "@types/react-native": "^0.63.25", "metro-react-native-babel-preset": "^0.63.0", "rn-snoopy": "^2.0.2", - "typescript": "^4.0.3" + "typescript": "4.0.3" } } diff --git a/example/src/screens/material/Material.tsx b/example/src/screens/material/Material.tsx index cd285a6..77274ad 100644 --- a/example/src/screens/material/Material.tsx +++ b/example/src/screens/material/Material.tsx @@ -110,9 +110,8 @@ const createMaterialScreen = ( }; }; -export const MaterialIconWithLabelScreen = createMaterialScreen( - 'iconWithLabel' -); +export const MaterialIconWithLabelScreen = + createMaterialScreen('iconWithLabel'); export const MaterialIconWithLabelOnFocusScreen = createMaterialScreen( 'iconWithLabelOnFocus' ); diff --git a/example/src/svg/HomeSVG.tsx b/example/src/svg/HomeSVG.tsx index 0e8ef8d..dc57349 100644 --- a/example/src/svg/HomeSVG.tsx +++ b/example/src/svg/HomeSVG.tsx @@ -3,9 +3,9 @@ import Animated from 'react-native-reanimated'; import Svg, { Path, PathProps } from 'react-native-svg'; import { SVGProps } from './types'; -const AnimatedPath = (Animated.createAnimatedComponent( +const AnimatedPath = Animated.createAnimatedComponent( Path -) as any) as React.ComponentClass< +) as any as React.ComponentClass< Animated.AnimateProps<{}, PathProps & { style?: any }> >; diff --git a/example/src/svg/LikeSVG.tsx b/example/src/svg/LikeSVG.tsx index 7c508e1..e6f40db 100644 --- a/example/src/svg/LikeSVG.tsx +++ b/example/src/svg/LikeSVG.tsx @@ -3,9 +3,9 @@ import Animated from 'react-native-reanimated'; import Svg, { Path, PathProps } from 'react-native-svg'; import { SVGProps } from './types'; -const AnimatedPath = (Animated.createAnimatedComponent( +const AnimatedPath = Animated.createAnimatedComponent( Path -) as any) as React.ComponentClass< +) as any as React.ComponentClass< Animated.AnimateProps<{}, PathProps & { style?: any }> >; diff --git a/example/src/svg/ProfileSVG.tsx b/example/src/svg/ProfileSVG.tsx index 24eae7c..aa98410 100644 --- a/example/src/svg/ProfileSVG.tsx +++ b/example/src/svg/ProfileSVG.tsx @@ -3,14 +3,14 @@ import Animated from 'react-native-reanimated'; import Svg, { G, Path, Circle, PathProps, CircleProps } from 'react-native-svg'; import { SVGProps } from './types'; -const AnimatedPath = (Animated.createAnimatedComponent( +const AnimatedPath = Animated.createAnimatedComponent( Path -) as any) as React.ComponentClass< +) as any as React.ComponentClass< Animated.AnimateProps<{}, PathProps & { style?: any }> >; -const AnimatedCircle = (Animated.createAnimatedComponent( +const AnimatedCircle = Animated.createAnimatedComponent( Circle -) as any) as React.ComponentClass< +) as any as React.ComponentClass< Animated.AnimateProps<{}, CircleProps & { style?: any }> >; diff --git a/example/src/svg/SearchSVG.tsx b/example/src/svg/SearchSVG.tsx index 5e39439..ad9f1c2 100644 --- a/example/src/svg/SearchSVG.tsx +++ b/example/src/svg/SearchSVG.tsx @@ -3,14 +3,14 @@ import Animated from 'react-native-reanimated'; import Svg, { G, Circle, Path, PathProps, CircleProps } from 'react-native-svg'; import { SVGProps } from './types'; -const AnimatedPath = (Animated.createAnimatedComponent( +const AnimatedPath = Animated.createAnimatedComponent( Path -) as any) as React.ComponentClass< +) as any as React.ComponentClass< Animated.AnimateProps<{}, PathProps & { style?: any }> >; -const AnimatedCircle = (Animated.createAnimatedComponent( +const AnimatedCircle = Animated.createAnimatedComponent( Circle -) as any) as React.ComponentClass< +) as any as React.ComponentClass< Animated.AnimateProps<{}, CircleProps & { style?: any }> >; diff --git a/package.json b/package.json index e055922..6546284 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "dependencies": { "lodash.isequal": "^4.5.0", - "react-native-redash": "15.7.3" + "react-native-redash": "14.2.4" }, "devDependencies": { "@commitlint/cli": "^9.1.1", @@ -62,7 +62,7 @@ "react-native-safe-area-context": "^0.7.3", "react-native-svg": "^12.1.0", "release-it": "^13.6.5", - "typescript": "^4.0.3" + "typescript": "4.0.3" }, "peerDependencies": { "@react-navigation/native": ">=5.0.0", diff --git a/src/AnimatedTabBar.tsx b/src/AnimatedTabBar.tsx index ed0f7fa..661b121 100644 --- a/src/AnimatedTabBar.tsx +++ b/src/AnimatedTabBar.tsx @@ -14,7 +14,7 @@ import Animated, { call, onChange, } from 'react-native-reanimated'; -import { useValue } from 'react-native-redash/lib/module/v1'; +import { useValue } from 'react-native-redash'; interface Route { name: string; diff --git a/src/AnimatedTabBarView.tsx b/src/AnimatedTabBarView.tsx index 3042e3b..56fd371 100644 --- a/src/AnimatedTabBarView.tsx +++ b/src/AnimatedTabBarView.tsx @@ -1,6 +1,6 @@ import React, { useMemo, useEffect, useRef } from 'react'; import Animated from 'react-native-reanimated'; -import { useValue } from 'react-native-redash/lib/module/v1'; +import { useValue } from 'react-native-redash'; import Presets, { PresetEnum } from './presets'; import type { AnimatedTabBarViewProps } from './types'; diff --git a/src/components/rawButton/RawButton.tsx b/src/components/rawButton/RawButton.tsx index 5bb3a7b..4a2f575 100644 --- a/src/components/rawButton/RawButton.tsx +++ b/src/components/rawButton/RawButton.tsx @@ -11,7 +11,7 @@ import { TapGestureHandler, LongPressGestureHandler, } from 'react-native-gesture-handler'; -import { useValue, useGestureHandler } from 'react-native-redash/lib/module/v1'; +import { useValue, useGestureHandler } from 'react-native-redash'; import { useStableCallback } from '../../hooks'; const { useCode, cond, onChange, eq } = Animated; diff --git a/src/hooks/useTabBarVisibility.ts b/src/hooks/useTabBarVisibility.ts index b909ba5..95a80a3 100644 --- a/src/hooks/useTabBarVisibility.ts +++ b/src/hooks/useTabBarVisibility.ts @@ -11,7 +11,7 @@ import Animated, { startClock, timing, } from 'react-native-reanimated'; -import { useClock, useValue } from 'react-native-redash/lib/module/v1'; +import { useClock, useValue } from 'react-native-redash'; import { Easing } from '../utilities'; export const useTabBarVisibility = (shouldShowTabBar: boolean) => { diff --git a/src/presets.ts b/src/presets.ts index c1a945d..48f5ed7 100644 --- a/src/presets.ts +++ b/src/presets.ts @@ -14,18 +14,18 @@ import MaterialTabBar, { const Presets = { bubble: { component: BubbleTabBar, - $c: (undefined as any) as BubbleTabBarConfig, - $t: (undefined as any) as BubbleTabBarItemConfig, + $c: undefined as any as BubbleTabBarConfig, + $t: undefined as any as BubbleTabBarItemConfig, }, flashy: { component: FlashyTabBar, - $c: (undefined as any) as FlashyTabBarConfig, - $t: (undefined as any) as FlashyTabBarItemConfig, + $c: undefined as any as FlashyTabBarConfig, + $t: undefined as any as FlashyTabBarItemConfig, }, material: { component: MaterialTabBar, - $c: (undefined as any) as MaterialTabBarConfig, - $t: (undefined as any) as MaterialTabBarItemConfig, + $c: undefined as any as MaterialTabBarConfig, + $t: undefined as any as MaterialTabBarItemConfig, }, }; diff --git a/src/presets/bubble/item/BubbleTabBarItem.tsx b/src/presets/bubble/item/BubbleTabBarItem.tsx index 945a3ce..adf44cb 100644 --- a/src/presets/bubble/item/BubbleTabBarItem.tsx +++ b/src/presets/bubble/item/BubbleTabBarItem.tsx @@ -1,7 +1,7 @@ import React, { useMemo, memo } from 'react'; import { View, Text, LayoutChangeEvent } from 'react-native'; import Animated from 'react-native-reanimated'; -import { interpolateColor, useValue } from 'react-native-redash/lib/module/v1'; +import { interpolateColor, useValue } from 'react-native-redash'; // @ts-ignore 😞 import isEqual from 'lodash.isequal'; import { interpolate } from '../../../utilities'; diff --git a/src/presets/flashy/item/FlashyTabBarItem.tsx b/src/presets/flashy/item/FlashyTabBarItem.tsx index 3ca0a5a..3fc3a65 100644 --- a/src/presets/flashy/item/FlashyTabBarItem.tsx +++ b/src/presets/flashy/item/FlashyTabBarItem.tsx @@ -4,11 +4,7 @@ import Animated from 'react-native-reanimated'; // @ts-ignore 😞 import MaskedView from '@react-native-community/masked-view'; import { Svg, Circle, SvgProps, CircleProps } from 'react-native-svg'; -import { - useValues, - transformOrigin, - toRad, -} from 'react-native-redash/lib/module/v1'; +import { useValues, transformOrigin, toRad } from 'react-native-redash'; // @ts-ignore 😞 import isEqual from 'lodash.isequal'; import { @@ -70,10 +66,10 @@ const FlashyTabBarItemComponent = ({ //#region variables const [labelWidth, labelHeight] = useValues(0, 0); - const containerHeight = useMemo(() => iconSize + innerVerticalSpace * 2, [ - iconSize, - innerVerticalSpace, - ]); + const containerHeight = useMemo( + () => iconSize + innerVerticalSpace * 2, + [iconSize, innerVerticalSpace] + ); const containerWidth = max( add(labelWidth, innerHorizontalSpace * 2), iconSize + innerHorizontalSpace * 2 diff --git a/src/presets/material/item/MaterialTabBarItem.tsx b/src/presets/material/item/MaterialTabBarItem.tsx index 98dcbcd..33544c6 100644 --- a/src/presets/material/item/MaterialTabBarItem.tsx +++ b/src/presets/material/item/MaterialTabBarItem.tsx @@ -1,7 +1,7 @@ import React, { useMemo, memo, useCallback } from 'react'; import type { LayoutChangeEvent } from 'react-native'; import Animated from 'react-native-reanimated'; -import { transformOrigin, useValue } from 'react-native-redash/lib/module/v1'; +import { transformOrigin, useValue } from 'react-native-redash'; // @ts-ignore 😞 import isEqual from 'lodash.isequal'; import { useStableCallback } from '../../../hooks'; diff --git a/src/presets/material/ripple/MaterialTabBarRipple.tsx b/src/presets/material/ripple/MaterialTabBarRipple.tsx index ed75710..7dab024 100644 --- a/src/presets/material/ripple/MaterialTabBarRipple.tsx +++ b/src/presets/material/ripple/MaterialTabBarRipple.tsx @@ -16,7 +16,7 @@ import Animated, { } from 'react-native-reanimated'; // @ts-ignore 😞 import isEqual from 'lodash.isequal'; -import { useValues, get, useValue } from 'react-native-redash/lib/module/v1'; +import { useValues, get, useValue } from 'react-native-redash'; import { interpolate } from '../../../utilities'; import type { MaterialTabBarItemConfig } from '../types'; import { styles } from './styles'; diff --git a/tsconfig.json b/tsconfig.json index 7c37bf4..940fdca 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,6 @@ "baseUrl": ".", "paths": { "@gorhom/animated-tabbar": ["./src/index"], - "react-native-redash/lib/module/v1":["./node_modules/react-native-redash/lib/typescript/v1/index.d.ts"] }, "allowUnreachableCode": false, "allowUnusedLabels": false,