diff --git a/.eslintrc.cjs b/.eslintrc.cjs index dc8cc54508..803865a182 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -108,6 +108,7 @@ module.exports = { "newlines-between": "always", }, ], + "import/no-cycle": ["error", { maxDepth: "∞" }], // jest "jest/expect-expect": [ "warn", diff --git a/src/components/KeyboardAvoidingView/hooks.ts b/src/components/KeyboardAvoidingView/hooks.ts index 1033617604..399695f079 100644 --- a/src/components/KeyboardAvoidingView/hooks.ts +++ b/src/components/KeyboardAvoidingView/hooks.ts @@ -1,9 +1,7 @@ import { useSharedValue } from "react-native-reanimated"; -import { - useKeyboardContext, - useKeyboardHandler, -} from "react-native-keyboard-controller"; +import { useKeyboardContext } from "../../context"; +import { useKeyboardHandler } from "../../hooks"; export const useKeyboardAnimation = () => { const { reanimated } = useKeyboardContext(); diff --git a/src/components/KeyboardAvoidingView/index.tsx b/src/components/KeyboardAvoidingView/index.tsx index 4a2c01ac97..c8303c072a 100644 --- a/src/components/KeyboardAvoidingView/index.tsx +++ b/src/components/KeyboardAvoidingView/index.tsx @@ -8,7 +8,7 @@ import Reanimated, { useSharedValue, } from "react-native-reanimated"; -import { useWindowDimensions } from "react-native-keyboard-controller"; +import { useWindowDimensions } from "../../hooks"; import { useKeyboardAnimation } from "./hooks"; diff --git a/src/components/KeyboardAwareScrollView/index.tsx b/src/components/KeyboardAwareScrollView/index.tsx index ca15d19d26..ddab855daa 100644 --- a/src/components/KeyboardAwareScrollView/index.tsx +++ b/src/components/KeyboardAwareScrollView/index.tsx @@ -14,7 +14,7 @@ import { useFocusedInputHandler, useReanimatedFocusedInput, useWindowDimensions, -} from "react-native-keyboard-controller"; +} from "../../hooks"; import { useSmoothKeyboardHandler } from "./useSmoothKeyboardHandler"; import { debounce, scrollDistanceWithRespectToSnapPoints } from "./utils"; diff --git a/src/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.ts b/src/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.ts index 8966470996..645835ed8c 100644 --- a/src/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.ts +++ b/src/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.ts @@ -6,7 +6,7 @@ import { withTiming, } from "react-native-reanimated"; -import { useKeyboardHandler } from "react-native-keyboard-controller"; +import { useKeyboardHandler } from "../../hooks"; const IS_ANDROID_ELEVEN_OR_HIGHER = Platform.OS === "android" && Platform.Version >= 30; diff --git a/src/components/KeyboardStickyView/index.tsx b/src/components/KeyboardStickyView/index.tsx index 9a873f38a6..387062e0c3 100644 --- a/src/components/KeyboardStickyView/index.tsx +++ b/src/components/KeyboardStickyView/index.tsx @@ -4,7 +4,7 @@ import Reanimated, { useAnimatedStyle, } from "react-native-reanimated"; -import { useReanimatedKeyboardAnimation } from "react-native-keyboard-controller"; +import { useReanimatedKeyboardAnimation } from "../../hooks"; import type { View, ViewProps } from "react-native"; diff --git a/src/components/KeyboardToolbar/index.tsx b/src/components/KeyboardToolbar/index.tsx index 95ced0b44e..f178690fb0 100644 --- a/src/components/KeyboardToolbar/index.tsx +++ b/src/components/KeyboardToolbar/index.tsx @@ -1,13 +1,9 @@ import React, { useCallback, useEffect, useMemo, useState } from "react"; import { StyleSheet, Text, View } from "react-native"; -import { - FocusedInputEvents, - KeyboardStickyView, -} from "react-native-keyboard-controller"; - -import { KeyboardController } from "../../bindings"; +import { FocusedInputEvents, KeyboardController } from "../../bindings"; import useColorScheme from "../hooks/useColorScheme"; +import KeyboardStickyView from "../KeyboardStickyView"; import Arrow from "./Arrow"; import Button from "./Button";