react-native-keyboard-controller 1.5.8 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/fabric/java/com/reactnativekeyboardcontroller/KeyboardControllerViewManager.kt +3 -1
- package/android/src/fabric/java/com/reactnativekeyboardcontroller/StatusBarManagerCompatModule.kt +2 -1
- package/android/src/main/java/com/reactnativekeyboardcontroller/KeyboardAnimationCallback.kt +128 -18
- package/android/src/main/java/com/reactnativekeyboardcontroller/KeyboardAnimationController.kt +2 -0
- package/android/src/main/java/com/reactnativekeyboardcontroller/events/KeyboardTransitionEvent.kt +11 -2
- package/android/src/main/java/com/reactnativekeyboardcontroller/extensions/ThemedReactContext.kt +7 -0
- package/android/src/main/java/com/reactnativekeyboardcontroller/managers/KeyboardControllerViewManagerImpl.kt +2 -1
- package/android/src/main/java/com/reactnativekeyboardcontroller/managers/KeyboardGestureAreaViewManagerImpl.kt +1 -0
- package/android/src/main/java/com/reactnativekeyboardcontroller/modules/KeyboardControllerModuleImpl.kt +6 -1
- package/android/src/main/java/com/reactnativekeyboardcontroller/modules/StatusBarManagerCompatModuleImpl.kt +9 -3
- package/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt +44 -27
- package/android/src/main/java/com/reactnativekeyboardcontroller/views/KeyboardGestureAreaReactViewGroup.kt +119 -96
- package/android/src/paper/java/com/reactnativekeyboardcontroller/KeyboardControllerModule.kt +6 -4
- package/android/src/paper/java/com/reactnativekeyboardcontroller/StatusBarManagerCompatModule.kt +2 -1
- package/ios/Extensions.swift +31 -0
- package/ios/KeyboardController-Bridging-Header.h +1 -0
- package/ios/KeyboardControllerView.mm +25 -6
- package/ios/KeyboardControllerViewManager.swift +4 -2
- package/ios/KeyboardMoveEvent.h +3 -1
- package/ios/KeyboardMoveEvent.m +8 -0
- package/ios/KeyboardMovementObserver.swift +58 -11
- package/lib/commonjs/animated.js +4 -3
- package/lib/commonjs/animated.js.map +1 -1
- package/lib/commonjs/bindings.js +26 -0
- package/lib/commonjs/bindings.js.map +1 -0
- package/lib/commonjs/bindings.native.js +33 -0
- package/lib/commonjs/bindings.native.js.map +1 -0
- package/lib/commonjs/{native.js → constants.js} +2 -29
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/context.js +9 -1
- package/lib/commonjs/context.js.map +1 -1
- package/lib/commonjs/hooks.js +7 -6
- package/lib/commonjs/hooks.js.map +1 -1
- package/lib/commonjs/index.js +15 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal.js +0 -30
- package/lib/commonjs/internal.js.map +1 -1
- package/lib/commonjs/monkey-patch.android.js +34 -0
- package/lib/commonjs/monkey-patch.android.js.map +1 -0
- package/lib/commonjs/monkey-patch.js +1 -35
- package/lib/commonjs/monkey-patch.js.map +1 -1
- package/lib/commonjs/reanimated.js +9 -0
- package/lib/commonjs/reanimated.js.map +1 -0
- package/lib/commonjs/reanimated.native.js +37 -0
- package/lib/commonjs/reanimated.native.js.map +1 -0
- package/lib/commonjs/replicas.js +4 -3
- package/lib/commonjs/replicas.js.map +1 -1
- package/lib/commonjs/specs/KeyboardControllerViewNativeComponent.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/animated.js +3 -2
- package/lib/module/animated.js.map +1 -1
- package/lib/module/bindings.js +16 -0
- package/lib/module/bindings.js.map +1 -0
- package/lib/module/bindings.native.js +23 -0
- package/lib/module/bindings.native.js.map +1 -0
- package/lib/module/{native.js → constants.js} +1 -24
- package/lib/module/constants.js.map +1 -0
- package/lib/module/context.js +8 -1
- package/lib/module/context.js.map +1 -1
- package/lib/module/hooks.js +7 -6
- package/lib/module/hooks.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal.js +1 -30
- package/lib/module/internal.js.map +1 -1
- package/lib/module/monkey-patch.android.js +29 -0
- package/lib/module/monkey-patch.android.js.map +1 -0
- package/lib/module/monkey-patch.js +1 -31
- package/lib/module/monkey-patch.js.map +1 -1
- package/lib/module/reanimated.js +2 -0
- package/lib/module/reanimated.js.map +1 -0
- package/lib/module/reanimated.native.js +30 -0
- package/lib/module/reanimated.native.js.map +1 -0
- package/lib/module/replicas.js +2 -1
- package/lib/module/replicas.js.map +1 -1
- package/lib/module/specs/KeyboardControllerViewNativeComponent.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/bindings.d.ts +6 -0
- package/lib/typescript/bindings.native.d.ts +6 -0
- package/lib/typescript/constants.d.ts +16 -0
- package/lib/typescript/context.d.ts +1 -0
- package/lib/typescript/index.d.ts +2 -1
- package/lib/typescript/internal.d.ts +1 -7
- package/lib/typescript/monkey-patch.android.d.ts +1 -0
- package/lib/typescript/monkey-patch.d.ts +0 -1
- package/lib/typescript/reanimated.d.ts +2 -0
- package/lib/typescript/reanimated.native.d.ts +2 -0
- package/lib/typescript/specs/KeyboardControllerViewNativeComponent.d.ts +3 -1
- package/lib/typescript/types.d.ts +15 -1
- package/package.json +1 -1
- package/react-native-keyboard-controller.podspec +9 -1
- package/src/animated.tsx +3 -6
- package/src/{native.ts → bindings.native.ts} +4 -25
- package/src/bindings.ts +22 -0
- package/src/constants.ts +17 -0
- package/src/context.ts +12 -1
- package/src/hooks.ts +12 -7
- package/src/index.ts +2 -1
- package/src/internal.ts +2 -57
- package/src/monkey-patch.android.ts +33 -0
- package/src/monkey-patch.ts +1 -37
- package/src/reanimated.native.ts +51 -0
- package/src/reanimated.ts +6 -0
- package/src/replicas.ts +2 -1
- package/src/specs/KeyboardControllerViewNativeComponent.ts +3 -0
- package/src/types.ts +27 -5
- package/lib/commonjs/native.js.map +0 -1
- package/lib/module/native.js.map +0 -1
- package/lib/typescript/native.d.ts +0 -24
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum AndroidSoftInputModes {
|
|
2
|
+
SOFT_INPUT_ADJUST_NOTHING = 48,
|
|
3
|
+
SOFT_INPUT_ADJUST_PAN = 32,
|
|
4
|
+
SOFT_INPUT_ADJUST_RESIZE = 16,
|
|
5
|
+
SOFT_INPUT_ADJUST_UNSPECIFIED = 0,
|
|
6
|
+
SOFT_INPUT_IS_FORWARD_NAVIGATION = 256,
|
|
7
|
+
SOFT_INPUT_MASK_ADJUST = 240,
|
|
8
|
+
SOFT_INPUT_MASK_STATE = 15,
|
|
9
|
+
SOFT_INPUT_MODE_CHANGED = 512,
|
|
10
|
+
SOFT_INPUT_STATE_ALWAYS_HIDDEN = 3,
|
|
11
|
+
SOFT_INPUT_STATE_ALWAYS_VISIBLE = 5,
|
|
12
|
+
SOFT_INPUT_STATE_HIDDEN = 2,
|
|
13
|
+
SOFT_INPUT_STATE_UNCHANGED = 1,
|
|
14
|
+
SOFT_INPUT_STATE_UNSPECIFIED = 0,
|
|
15
|
+
SOFT_INPUT_STATE_VISIBLE = 4
|
|
16
|
+
}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { Animated } from 'react-native';
|
|
2
|
-
import type {
|
|
3
|
-
export declare function useAnimatedKeyboardHandler<TContext extends Record<string, unknown>>(handlers: {
|
|
4
|
-
onKeyboardMoveStart?: (e: NativeEvent, context: TContext) => void;
|
|
5
|
-
onKeyboardMove?: (e: NativeEvent, context: TContext) => void;
|
|
6
|
-
onKeyboardMoveEnd?: (e: NativeEvent, context: TContext) => void;
|
|
7
|
-
onKeyboardMoveInteractive?: (e: NativeEvent, context: TContext) => void;
|
|
8
|
-
}, dependencies?: ReadonlyArray<unknown>): (e: import("react-native").NativeSyntheticEvent<EventWithName<NativeEvent>>) => void;
|
|
2
|
+
import type { Handlers, NativeEvent } from './types';
|
|
9
3
|
/**
|
|
10
4
|
* Hook for storing worklet handlers (objects with keys, where values are worklets).
|
|
11
5
|
* Returns methods for setting handlers and broadcasting events in them.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { HostComponent } from 'react-native';
|
|
2
2
|
import type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';
|
|
3
|
-
import type { DirectEventHandler, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
import type { DirectEventHandler, Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
type KeyboardMoveEvent = Readonly<{
|
|
5
5
|
height: Double;
|
|
6
6
|
progress: Double;
|
|
7
|
+
duration: Int32;
|
|
8
|
+
target: Int32;
|
|
7
9
|
}>;
|
|
8
10
|
export interface NativeProps extends ViewProps {
|
|
9
11
|
statusBarTranslucent?: boolean;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { NativeSyntheticEvent, ViewProps } from 'react-native';
|
|
1
|
+
import type { EmitterSubscription, NativeSyntheticEvent, ViewProps } from 'react-native';
|
|
2
2
|
export type NativeEvent = {
|
|
3
3
|
progress: number;
|
|
4
4
|
height: number;
|
|
5
|
+
duration: number;
|
|
6
|
+
target: number;
|
|
5
7
|
};
|
|
6
8
|
export type EventWithName<T> = {
|
|
7
9
|
eventName: string;
|
|
@@ -38,7 +40,19 @@ export type KeyboardControllerModule = {
|
|
|
38
40
|
export type KeyboardControllerEvents = 'keyboardWillShow' | 'keyboardDidShow' | 'keyboardWillHide' | 'keyboardDidHide';
|
|
39
41
|
export type KeyboardEventData = {
|
|
40
42
|
height: number;
|
|
43
|
+
duration: number;
|
|
44
|
+
timestamp: number;
|
|
45
|
+
target: number;
|
|
41
46
|
};
|
|
47
|
+
export type KeyboardEventsModule = {
|
|
48
|
+
addListener: (name: KeyboardControllerEvents, cb: (e: KeyboardEventData) => void) => EmitterSubscription;
|
|
49
|
+
};
|
|
50
|
+
export type KeyboardHandlerHook<TContext, Event> = (handlers: {
|
|
51
|
+
onKeyboardMoveStart?: (e: NativeEvent, context: TContext) => void;
|
|
52
|
+
onKeyboardMove?: (e: NativeEvent, context: TContext) => void;
|
|
53
|
+
onKeyboardMoveEnd?: (e: NativeEvent, context: TContext) => void;
|
|
54
|
+
onKeyboardMoveInteractive?: (e: NativeEvent, context: TContext) => void;
|
|
55
|
+
}, dependencies?: ReadonlyArray<unknown>) => (e: NativeSyntheticEvent<Event>) => void;
|
|
42
56
|
export type Handlers<T> = Record<string, T | undefined>;
|
|
43
57
|
export type KeyboardHandler = Partial<{
|
|
44
58
|
onStart: (e: NativeEvent) => void;
|
package/package.json
CHANGED
|
@@ -26,7 +26,15 @@ Pod::Spec.new do |s|
|
|
|
26
26
|
s.pod_target_xcconfig = {
|
|
27
27
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
28
28
|
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
29
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
29
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
30
|
+
# This is handy when we want to detect if new arch is enabled in Swift code
|
|
31
|
+
# and can be used like:
|
|
32
|
+
# #if KEYBOARD_CONTROLLER_NEW_ARCH_ENABLED
|
|
33
|
+
# // do sth when new arch is enabled
|
|
34
|
+
# #else
|
|
35
|
+
# // do sth when old arch is enabled
|
|
36
|
+
# #endif
|
|
37
|
+
"OTHER_SWIFT_FLAGS" => "-DKEYBOARD_CONTROLLER_NEW_ARCH_ENABLED"
|
|
30
38
|
}
|
|
31
39
|
|
|
32
40
|
s.dependency "React-RCTFabric"
|
package/src/animated.tsx
CHANGED
|
@@ -3,12 +3,9 @@ import { Animated, Platform, StyleSheet, ViewStyle } from 'react-native';
|
|
|
3
3
|
import Reanimated, { useSharedValue } from 'react-native-reanimated';
|
|
4
4
|
|
|
5
5
|
import { KeyboardContext } from './context';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
useAnimatedValue,
|
|
10
|
-
} from './internal';
|
|
11
|
-
import { KeyboardControllerView } from './native';
|
|
6
|
+
import { useSharedHandlers, useAnimatedValue } from './internal';
|
|
7
|
+
import { KeyboardControllerView } from './bindings';
|
|
8
|
+
import { useAnimatedKeyboardHandler } from './reanimated';
|
|
12
9
|
|
|
13
10
|
import type {
|
|
14
11
|
KeyboardControllerProps,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Platform, NativeEventEmitter } from 'react-native';
|
|
2
2
|
|
|
3
3
|
import type {
|
|
4
|
-
KeyboardControllerEvents,
|
|
5
4
|
KeyboardControllerModule,
|
|
6
5
|
KeyboardControllerProps,
|
|
7
|
-
|
|
6
|
+
KeyboardEventsModule,
|
|
8
7
|
KeyboardGestureAreaProps,
|
|
9
8
|
} from './types';
|
|
10
9
|
|
|
@@ -14,24 +13,6 @@ const LINKING_ERROR =
|
|
|
14
13
|
'- You rebuilt the app after installing the package\n' +
|
|
15
14
|
'- You are not using Expo Go\n';
|
|
16
15
|
|
|
17
|
-
// copied from `android.view.WindowManager.LayoutParams`
|
|
18
|
-
export enum AndroidSoftInputModes {
|
|
19
|
-
SOFT_INPUT_ADJUST_NOTHING = 48,
|
|
20
|
-
SOFT_INPUT_ADJUST_PAN = 32,
|
|
21
|
-
SOFT_INPUT_ADJUST_RESIZE = 16,
|
|
22
|
-
SOFT_INPUT_ADJUST_UNSPECIFIED = 0,
|
|
23
|
-
SOFT_INPUT_IS_FORWARD_NAVIGATION = 256,
|
|
24
|
-
SOFT_INPUT_MASK_ADJUST = 240,
|
|
25
|
-
SOFT_INPUT_MASK_STATE = 15,
|
|
26
|
-
SOFT_INPUT_MODE_CHANGED = 512,
|
|
27
|
-
SOFT_INPUT_STATE_ALWAYS_HIDDEN = 3,
|
|
28
|
-
SOFT_INPUT_STATE_ALWAYS_VISIBLE = 5,
|
|
29
|
-
SOFT_INPUT_STATE_HIDDEN = 2,
|
|
30
|
-
SOFT_INPUT_STATE_UNCHANGED = 1,
|
|
31
|
-
SOFT_INPUT_STATE_UNSPECIFIED = 0,
|
|
32
|
-
SOFT_INPUT_STATE_VISIBLE = 4,
|
|
33
|
-
}
|
|
34
|
-
|
|
35
16
|
const RCTKeyboardController =
|
|
36
17
|
require('./specs/NativeKeyboardController').default;
|
|
37
18
|
export const KeyboardController = (
|
|
@@ -49,11 +30,9 @@ export const KeyboardController = (
|
|
|
49
30
|
|
|
50
31
|
const eventEmitter = new NativeEventEmitter(KeyboardController);
|
|
51
32
|
|
|
52
|
-
export const KeyboardEvents = {
|
|
53
|
-
addListener: (
|
|
54
|
-
name
|
|
55
|
-
cb: (e: KeyboardEventData) => void
|
|
56
|
-
) => eventEmitter.addListener('KeyboardController::' + name, cb),
|
|
33
|
+
export const KeyboardEvents: KeyboardEventsModule = {
|
|
34
|
+
addListener: (name, cb) =>
|
|
35
|
+
eventEmitter.addListener('KeyboardController::' + name, cb),
|
|
57
36
|
};
|
|
58
37
|
export const KeyboardControllerView: React.FC<KeyboardControllerProps> =
|
|
59
38
|
require('./specs/KeyboardControllerViewNativeComponent').default;
|
package/src/bindings.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EmitterSubscription, View } from 'react-native';
|
|
2
|
+
import type {
|
|
3
|
+
KeyboardControllerModule,
|
|
4
|
+
KeyboardControllerProps,
|
|
5
|
+
KeyboardEventsModule,
|
|
6
|
+
KeyboardGestureAreaProps,
|
|
7
|
+
} from './types';
|
|
8
|
+
|
|
9
|
+
const NOOP = () => {};
|
|
10
|
+
export const KeyboardController: KeyboardControllerModule = {
|
|
11
|
+
setDefaultMode: NOOP,
|
|
12
|
+
setInputMode: NOOP,
|
|
13
|
+
addListener: NOOP,
|
|
14
|
+
removeListeners: NOOP,
|
|
15
|
+
};
|
|
16
|
+
export const KeyboardEvents: KeyboardEventsModule = {
|
|
17
|
+
addListener: () => ({ remove: NOOP } as EmitterSubscription),
|
|
18
|
+
};
|
|
19
|
+
export const KeyboardControllerView =
|
|
20
|
+
View as unknown as React.FC<KeyboardControllerProps>;
|
|
21
|
+
export const KeyboardGestureArea =
|
|
22
|
+
View as unknown as React.FC<KeyboardGestureAreaProps>;
|
package/src/constants.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// copied from `android.view.WindowManager.LayoutParams`
|
|
2
|
+
export enum AndroidSoftInputModes {
|
|
3
|
+
SOFT_INPUT_ADJUST_NOTHING = 48,
|
|
4
|
+
SOFT_INPUT_ADJUST_PAN = 32,
|
|
5
|
+
SOFT_INPUT_ADJUST_RESIZE = 16,
|
|
6
|
+
SOFT_INPUT_ADJUST_UNSPECIFIED = 0,
|
|
7
|
+
SOFT_INPUT_IS_FORWARD_NAVIGATION = 256,
|
|
8
|
+
SOFT_INPUT_MASK_ADJUST = 240,
|
|
9
|
+
SOFT_INPUT_MASK_STATE = 15,
|
|
10
|
+
SOFT_INPUT_MODE_CHANGED = 512,
|
|
11
|
+
SOFT_INPUT_STATE_ALWAYS_HIDDEN = 3,
|
|
12
|
+
SOFT_INPUT_STATE_ALWAYS_VISIBLE = 5,
|
|
13
|
+
SOFT_INPUT_STATE_HIDDEN = 2,
|
|
14
|
+
SOFT_INPUT_STATE_UNCHANGED = 1,
|
|
15
|
+
SOFT_INPUT_STATE_UNSPECIFIED = 0,
|
|
16
|
+
SOFT_INPUT_STATE_VISIBLE = 4,
|
|
17
|
+
}
|
package/src/context.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createContext } from 'react';
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
2
|
import { Animated } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import type { SharedValue } from 'react-native-reanimated';
|
|
@@ -29,3 +29,14 @@ const defaultContext: KeyboardAnimationContext = {
|
|
|
29
29
|
setHandlers: () => {},
|
|
30
30
|
};
|
|
31
31
|
export const KeyboardContext = createContext(defaultContext);
|
|
32
|
+
export const useKeyboardContext = () => {
|
|
33
|
+
const context = useContext(KeyboardContext);
|
|
34
|
+
|
|
35
|
+
if (__DEV__ && context === defaultContext) {
|
|
36
|
+
console.warn(
|
|
37
|
+
"Couldn't find real values for `KeyboardContext`. Please make sure you're inside of `KeyboardProvider` - otherwise functionality of `react-native-keyboard-controller` will not work."
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return context;
|
|
42
|
+
};
|
package/src/hooks.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { DependencyList,
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { DependencyList, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AnimatedContext,
|
|
5
|
+
ReanimatedContext,
|
|
6
|
+
useKeyboardContext,
|
|
7
|
+
} from './context';
|
|
8
|
+
import { KeyboardController } from './bindings';
|
|
9
|
+
import { AndroidSoftInputModes } from './constants';
|
|
5
10
|
import { uuid } from './utils';
|
|
6
11
|
|
|
7
12
|
import type { KeyboardHandler } from './types';
|
|
@@ -18,14 +23,14 @@ export const useResizeMode = () => {
|
|
|
18
23
|
|
|
19
24
|
export const useKeyboardAnimation = (): AnimatedContext => {
|
|
20
25
|
useResizeMode();
|
|
21
|
-
const context =
|
|
26
|
+
const context = useKeyboardContext();
|
|
22
27
|
|
|
23
28
|
return context.animated;
|
|
24
29
|
};
|
|
25
30
|
|
|
26
31
|
export const useReanimatedKeyboardAnimation = (): ReanimatedContext => {
|
|
27
32
|
useResizeMode();
|
|
28
|
-
const context =
|
|
33
|
+
const context = useKeyboardContext();
|
|
29
34
|
|
|
30
35
|
return context.reanimated;
|
|
31
36
|
};
|
|
@@ -34,7 +39,7 @@ export function useGenericKeyboardHandler(
|
|
|
34
39
|
handler: KeyboardHandler,
|
|
35
40
|
deps?: DependencyList
|
|
36
41
|
) {
|
|
37
|
-
const context =
|
|
42
|
+
const context = useKeyboardContext();
|
|
38
43
|
|
|
39
44
|
useEffect(() => {
|
|
40
45
|
const key = uuid();
|
package/src/index.ts
CHANGED
package/src/internal.ts
CHANGED
|
@@ -1,63 +1,8 @@
|
|
|
1
1
|
import { useCallback, useRef } from 'react';
|
|
2
2
|
import { Animated } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import { useSharedValue } from 'react-native-reanimated';
|
|
4
4
|
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
export function useAnimatedKeyboardHandler<
|
|
8
|
-
TContext extends Record<string, unknown>
|
|
9
|
-
>(
|
|
10
|
-
handlers: {
|
|
11
|
-
onKeyboardMoveStart?: (e: NativeEvent, context: TContext) => void;
|
|
12
|
-
onKeyboardMove?: (e: NativeEvent, context: TContext) => void;
|
|
13
|
-
onKeyboardMoveEnd?: (e: NativeEvent, context: TContext) => void;
|
|
14
|
-
onKeyboardMoveInteractive?: (e: NativeEvent, context: TContext) => void;
|
|
15
|
-
},
|
|
16
|
-
dependencies?: ReadonlyArray<unknown>
|
|
17
|
-
) {
|
|
18
|
-
const { context, doDependenciesDiffer } = useHandler(handlers, dependencies);
|
|
19
|
-
|
|
20
|
-
return useEvent(
|
|
21
|
-
(event: EventWithName<NativeEvent>) => {
|
|
22
|
-
'worklet';
|
|
23
|
-
const {
|
|
24
|
-
onKeyboardMoveStart,
|
|
25
|
-
onKeyboardMove,
|
|
26
|
-
onKeyboardMoveEnd,
|
|
27
|
-
onKeyboardMoveInteractive,
|
|
28
|
-
} = handlers;
|
|
29
|
-
|
|
30
|
-
if (
|
|
31
|
-
onKeyboardMoveStart &&
|
|
32
|
-
event.eventName.endsWith('onKeyboardMoveStart')
|
|
33
|
-
) {
|
|
34
|
-
onKeyboardMoveStart(event, context);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (onKeyboardMove && event.eventName.endsWith('onKeyboardMove')) {
|
|
38
|
-
onKeyboardMove(event, context);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (onKeyboardMoveEnd && event.eventName.endsWith('onKeyboardMoveEnd')) {
|
|
42
|
-
onKeyboardMoveEnd(event, context);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (
|
|
46
|
-
onKeyboardMoveInteractive &&
|
|
47
|
-
event.eventName.endsWith('onKeyboardMoveInteractive')
|
|
48
|
-
) {
|
|
49
|
-
onKeyboardMoveInteractive(event, context);
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
[
|
|
53
|
-
'onKeyboardMoveStart',
|
|
54
|
-
'onKeyboardMove',
|
|
55
|
-
'onKeyboardMoveEnd',
|
|
56
|
-
'onKeyboardMoveInteractive',
|
|
57
|
-
],
|
|
58
|
-
doDependenciesDiffer
|
|
59
|
-
);
|
|
60
|
-
}
|
|
5
|
+
import type { Handlers, NativeEvent } from './types';
|
|
61
6
|
|
|
62
7
|
/**
|
|
63
8
|
* Hook for storing worklet handlers (objects with keys, where values are worklets).
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @ts-expect-error because there is no corresponding type definition
|
|
2
|
+
import * as NativeAndroidManager from 'react-native/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid';
|
|
3
|
+
|
|
4
|
+
const getConstants = NativeAndroidManager.default.getConstants;
|
|
5
|
+
|
|
6
|
+
// On Android < 11 RN uses legacy API which breaks EdgeToEdge mode in RN, so
|
|
7
|
+
// in order to use library on all available platforms we have to monkey patch
|
|
8
|
+
// default RN implementation and use modern `WindowInsetsControllerCompat`.
|
|
9
|
+
const RCTStatusBarManagerCompat =
|
|
10
|
+
require('./specs/NativeStatusBarManagerCompat').default;
|
|
11
|
+
NativeAndroidManager.default = {
|
|
12
|
+
getConstants,
|
|
13
|
+
setColor(color: number, animated: boolean): void {
|
|
14
|
+
RCTStatusBarManagerCompat.setColor(color, animated);
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
setTranslucent(translucent: boolean): void {
|
|
18
|
+
RCTStatusBarManagerCompat.setTranslucent(translucent);
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* - statusBarStyles can be:
|
|
23
|
+
* - 'default'
|
|
24
|
+
* - 'dark-content'
|
|
25
|
+
*/
|
|
26
|
+
setStyle(statusBarStyle?: string): void {
|
|
27
|
+
RCTStatusBarManagerCompat.setStyle(statusBarStyle);
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
setHidden(hidden: boolean): void {
|
|
31
|
+
RCTStatusBarManagerCompat.setHidden(hidden);
|
|
32
|
+
},
|
|
33
|
+
};
|
package/src/monkey-patch.ts
CHANGED
|
@@ -1,37 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// @ts-expect-error because there is no corresponding type definition
|
|
3
|
-
import * as NativeAndroidManager from 'react-native/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid';
|
|
4
|
-
|
|
5
|
-
const getConstants = NativeAndroidManager.default.getConstants;
|
|
6
|
-
|
|
7
|
-
const RCTStatusBarManagerCompat =
|
|
8
|
-
require('./specs/NativeStatusBarManagerCompat').default;
|
|
9
|
-
|
|
10
|
-
// On Android < 11 RN uses legacy API which breaks EdgeToEdge mode in RN, so
|
|
11
|
-
// in order to use library on all available platforms we have to monkey patch
|
|
12
|
-
// default RN implementation and use modern `WindowInsetsControllerCompat`.
|
|
13
|
-
if (Platform.OS === 'android') {
|
|
14
|
-
NativeAndroidManager.default = {
|
|
15
|
-
getConstants,
|
|
16
|
-
setColor(color: number, animated: boolean): void {
|
|
17
|
-
RCTStatusBarManagerCompat.setColor(color, animated);
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
setTranslucent(translucent: boolean): void {
|
|
21
|
-
RCTStatusBarManagerCompat.setTranslucent(translucent);
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* - statusBarStyles can be:
|
|
26
|
-
* - 'default'
|
|
27
|
-
* - 'dark-content'
|
|
28
|
-
*/
|
|
29
|
-
setStyle(statusBarStyle?: string): void {
|
|
30
|
-
RCTStatusBarManagerCompat.setStyle(statusBarStyle);
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
setHidden(hidden: boolean): void {
|
|
34
|
-
RCTStatusBarManagerCompat.setHidden(hidden);
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
}
|
|
1
|
+
// stub for all platforms
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { useEvent, useHandler } from 'react-native-reanimated';
|
|
2
|
+
|
|
3
|
+
import type { EventWithName, KeyboardHandlerHook, NativeEvent } from './types';
|
|
4
|
+
|
|
5
|
+
export const useAnimatedKeyboardHandler: KeyboardHandlerHook<
|
|
6
|
+
Record<string, unknown>,
|
|
7
|
+
EventWithName<NativeEvent>
|
|
8
|
+
> = (handlers, dependencies) => {
|
|
9
|
+
const { context, doDependenciesDiffer } = useHandler(handlers, dependencies);
|
|
10
|
+
|
|
11
|
+
return useEvent(
|
|
12
|
+
(event) => {
|
|
13
|
+
'worklet';
|
|
14
|
+
const {
|
|
15
|
+
onKeyboardMoveStart,
|
|
16
|
+
onKeyboardMove,
|
|
17
|
+
onKeyboardMoveEnd,
|
|
18
|
+
onKeyboardMoveInteractive,
|
|
19
|
+
} = handlers;
|
|
20
|
+
|
|
21
|
+
if (
|
|
22
|
+
onKeyboardMoveStart &&
|
|
23
|
+
event.eventName.endsWith('onKeyboardMoveStart')
|
|
24
|
+
) {
|
|
25
|
+
onKeyboardMoveStart(event, context);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (onKeyboardMove && event.eventName.endsWith('onKeyboardMove')) {
|
|
29
|
+
onKeyboardMove(event, context);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (onKeyboardMoveEnd && event.eventName.endsWith('onKeyboardMoveEnd')) {
|
|
33
|
+
onKeyboardMoveEnd(event, context);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (
|
|
37
|
+
onKeyboardMoveInteractive &&
|
|
38
|
+
event.eventName.endsWith('onKeyboardMoveInteractive')
|
|
39
|
+
) {
|
|
40
|
+
onKeyboardMoveInteractive(event, context);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
[
|
|
44
|
+
'onKeyboardMoveStart',
|
|
45
|
+
'onKeyboardMove',
|
|
46
|
+
'onKeyboardMoveEnd',
|
|
47
|
+
'onKeyboardMoveInteractive',
|
|
48
|
+
],
|
|
49
|
+
doDependenciesDiffer
|
|
50
|
+
);
|
|
51
|
+
};
|
package/src/replicas.ts
CHANGED
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
} from 'react-native-reanimated';
|
|
11
11
|
import { useReanimatedKeyboardAnimation } from './hooks';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { KeyboardController } from './bindings';
|
|
14
|
+
import { AndroidSoftInputModes } from './constants';
|
|
14
15
|
|
|
15
16
|
const availableOSEventType = Platform.OS === 'ios' ? 'Will' : 'Did';
|
|
16
17
|
|
|
@@ -3,12 +3,15 @@ import type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropT
|
|
|
3
3
|
import type {
|
|
4
4
|
DirectEventHandler,
|
|
5
5
|
Double,
|
|
6
|
+
Int32,
|
|
6
7
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
8
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
8
9
|
|
|
9
10
|
type KeyboardMoveEvent = Readonly<{
|
|
10
11
|
height: Double;
|
|
11
12
|
progress: Double;
|
|
13
|
+
duration: Int32;
|
|
14
|
+
target: Int32;
|
|
12
15
|
}>;
|
|
13
16
|
|
|
14
17
|
export interface NativeProps extends ViewProps {
|
package/src/types.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
EmitterSubscription,
|
|
3
|
+
NativeSyntheticEvent,
|
|
4
|
+
ViewProps,
|
|
5
|
+
} from 'react-native';
|
|
2
6
|
|
|
3
7
|
// DirectEventHandler events declaration
|
|
4
|
-
|
|
5
8
|
export type NativeEvent = {
|
|
6
9
|
progress: number;
|
|
7
10
|
height: number;
|
|
11
|
+
duration: number;
|
|
12
|
+
target: number;
|
|
8
13
|
};
|
|
9
14
|
export type EventWithName<T> = {
|
|
10
15
|
eventName: string;
|
|
11
16
|
} & T;
|
|
12
17
|
|
|
13
18
|
// native View/Module declarations
|
|
14
|
-
|
|
15
19
|
export type KeyboardControllerProps = {
|
|
16
20
|
onKeyboardMoveStart?: (
|
|
17
21
|
e: NativeSyntheticEvent<EventWithName<NativeEvent>>
|
|
@@ -58,7 +62,6 @@ export type KeyboardControllerModule = {
|
|
|
58
62
|
};
|
|
59
63
|
|
|
60
64
|
// Event module declarations
|
|
61
|
-
|
|
62
65
|
export type KeyboardControllerEvents =
|
|
63
66
|
| 'keyboardWillShow'
|
|
64
67
|
| 'keyboardDidShow'
|
|
@@ -66,10 +69,29 @@ export type KeyboardControllerEvents =
|
|
|
66
69
|
| 'keyboardDidHide';
|
|
67
70
|
export type KeyboardEventData = {
|
|
68
71
|
height: number;
|
|
72
|
+
duration: number;
|
|
73
|
+
timestamp: number;
|
|
74
|
+
target: number;
|
|
75
|
+
};
|
|
76
|
+
export type KeyboardEventsModule = {
|
|
77
|
+
addListener: (
|
|
78
|
+
name: KeyboardControllerEvents,
|
|
79
|
+
cb: (e: KeyboardEventData) => void
|
|
80
|
+
) => EmitterSubscription;
|
|
69
81
|
};
|
|
70
82
|
|
|
71
|
-
//
|
|
83
|
+
// reanimated hook declaration
|
|
84
|
+
export type KeyboardHandlerHook<TContext, Event> = (
|
|
85
|
+
handlers: {
|
|
86
|
+
onKeyboardMoveStart?: (e: NativeEvent, context: TContext) => void;
|
|
87
|
+
onKeyboardMove?: (e: NativeEvent, context: TContext) => void;
|
|
88
|
+
onKeyboardMoveEnd?: (e: NativeEvent, context: TContext) => void;
|
|
89
|
+
onKeyboardMoveInteractive?: (e: NativeEvent, context: TContext) => void;
|
|
90
|
+
},
|
|
91
|
+
dependencies?: ReadonlyArray<unknown>
|
|
92
|
+
) => (e: NativeSyntheticEvent<Event>) => void;
|
|
72
93
|
|
|
94
|
+
// package types
|
|
73
95
|
export type Handlers<T> = Record<string, T | undefined>;
|
|
74
96
|
export type KeyboardHandler = Partial<{
|
|
75
97
|
onStart: (e: NativeEvent) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["LINKING_ERROR","Platform","select","ios","default","AndroidSoftInputModes","RCTKeyboardController","require","KeyboardController","Proxy","get","Error","eventEmitter","NativeEventEmitter","KeyboardEvents","addListener","name","cb","KeyboardControllerView","KeyboardGestureArea","OS","Version","children"],"sources":["native.ts"],"sourcesContent":["import { Platform, NativeEventEmitter } from 'react-native';\n\nimport type {\n KeyboardControllerEvents,\n KeyboardControllerModule,\n KeyboardControllerProps,\n KeyboardEventData,\n KeyboardGestureAreaProps,\n} from './types';\n\nconst LINKING_ERROR =\n `The package 'react-native-keyboard-controller' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo Go\\n';\n\n// copied from `android.view.WindowManager.LayoutParams`\nexport enum AndroidSoftInputModes {\n SOFT_INPUT_ADJUST_NOTHING = 48,\n SOFT_INPUT_ADJUST_PAN = 32,\n SOFT_INPUT_ADJUST_RESIZE = 16,\n SOFT_INPUT_ADJUST_UNSPECIFIED = 0,\n SOFT_INPUT_IS_FORWARD_NAVIGATION = 256,\n SOFT_INPUT_MASK_ADJUST = 240,\n SOFT_INPUT_MASK_STATE = 15,\n SOFT_INPUT_MODE_CHANGED = 512,\n SOFT_INPUT_STATE_ALWAYS_HIDDEN = 3,\n SOFT_INPUT_STATE_ALWAYS_VISIBLE = 5,\n SOFT_INPUT_STATE_HIDDEN = 2,\n SOFT_INPUT_STATE_UNCHANGED = 1,\n SOFT_INPUT_STATE_UNSPECIFIED = 0,\n SOFT_INPUT_STATE_VISIBLE = 4,\n}\n\nconst RCTKeyboardController =\n require('./specs/NativeKeyboardController').default;\nexport const KeyboardController = (\n RCTKeyboardController\n ? RCTKeyboardController\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n )\n) as KeyboardControllerModule;\n\nconst eventEmitter = new NativeEventEmitter(KeyboardController);\n\nexport const KeyboardEvents = {\n addListener: (\n name: KeyboardControllerEvents,\n cb: (e: KeyboardEventData) => void\n ) => eventEmitter.addListener('KeyboardController::' + name, cb),\n};\nexport const KeyboardControllerView: React.FC<KeyboardControllerProps> =\n require('./specs/KeyboardControllerViewNativeComponent').default;\nexport const KeyboardGestureArea: React.FC<KeyboardGestureAreaProps> =\n Platform.OS === 'android' && Platform.Version >= 30\n ? require('./specs/KeyboardGestureAreaNativeComponent').default\n : ({ children }: KeyboardGestureAreaProps) => children;\n"],"mappings":";;;;;;AAAA;AAUA,MAAMA,aAAa,GAChB,2FAA0F,GAC3FC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;;AAEjC;AAAA,IACYC,qBAAqB;AAAA;AAAA,WAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;AAAA,GAArBA,qBAAqB,qCAArBA,qBAAqB;AAiBjC,MAAMC,qBAAqB,GACzBC,OAAO,CAAC,kCAAkC,CAAC,CAACH,OAAO;AAC9C,MAAMI,kBAAkB,GAC7BF,qBAAqB,GACjBA,qBAAqB,GACrB,IAAIG,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAK,CAACX,aAAa,CAAC;EAChC;AACF,CAAC,CAEoB;AAAC;AAE9B,MAAMY,YAAY,GAAG,IAAIC,+BAAkB,CAACL,kBAAkB,CAAC;AAExD,MAAMM,cAAc,GAAG;EAC5BC,WAAW,EAAE,CACXC,IAA8B,EAC9BC,EAAkC,KAC/BL,YAAY,CAACG,WAAW,CAAC,sBAAsB,GAAGC,IAAI,EAAEC,EAAE;AACjE,CAAC;AAAC;AACK,MAAMC,sBAAyD,GACpEX,OAAO,CAAC,+CAA+C,CAAC,CAACH,OAAO;AAAC;AAC5D,MAAMe,mBAAuD,GAClElB,qBAAQ,CAACmB,EAAE,KAAK,SAAS,IAAInB,qBAAQ,CAACoB,OAAO,IAAI,EAAE,GAC/Cd,OAAO,CAAC,4CAA4C,CAAC,CAACH,OAAO,GAC7D;EAAA,IAAC;IAAEkB;EAAmC,CAAC;EAAA,OAAKA,QAAQ;AAAA;AAAC"}
|
package/lib/module/native.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","NativeEventEmitter","LINKING_ERROR","select","ios","default","AndroidSoftInputModes","RCTKeyboardController","require","KeyboardController","Proxy","get","Error","eventEmitter","KeyboardEvents","addListener","name","cb","KeyboardControllerView","KeyboardGestureArea","OS","Version","children"],"sources":["native.ts"],"sourcesContent":["import { Platform, NativeEventEmitter } from 'react-native';\n\nimport type {\n KeyboardControllerEvents,\n KeyboardControllerModule,\n KeyboardControllerProps,\n KeyboardEventData,\n KeyboardGestureAreaProps,\n} from './types';\n\nconst LINKING_ERROR =\n `The package 'react-native-keyboard-controller' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo Go\\n';\n\n// copied from `android.view.WindowManager.LayoutParams`\nexport enum AndroidSoftInputModes {\n SOFT_INPUT_ADJUST_NOTHING = 48,\n SOFT_INPUT_ADJUST_PAN = 32,\n SOFT_INPUT_ADJUST_RESIZE = 16,\n SOFT_INPUT_ADJUST_UNSPECIFIED = 0,\n SOFT_INPUT_IS_FORWARD_NAVIGATION = 256,\n SOFT_INPUT_MASK_ADJUST = 240,\n SOFT_INPUT_MASK_STATE = 15,\n SOFT_INPUT_MODE_CHANGED = 512,\n SOFT_INPUT_STATE_ALWAYS_HIDDEN = 3,\n SOFT_INPUT_STATE_ALWAYS_VISIBLE = 5,\n SOFT_INPUT_STATE_HIDDEN = 2,\n SOFT_INPUT_STATE_UNCHANGED = 1,\n SOFT_INPUT_STATE_UNSPECIFIED = 0,\n SOFT_INPUT_STATE_VISIBLE = 4,\n}\n\nconst RCTKeyboardController =\n require('./specs/NativeKeyboardController').default;\nexport const KeyboardController = (\n RCTKeyboardController\n ? RCTKeyboardController\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n )\n) as KeyboardControllerModule;\n\nconst eventEmitter = new NativeEventEmitter(KeyboardController);\n\nexport const KeyboardEvents = {\n addListener: (\n name: KeyboardControllerEvents,\n cb: (e: KeyboardEventData) => void\n ) => eventEmitter.addListener('KeyboardController::' + name, cb),\n};\nexport const KeyboardControllerView: React.FC<KeyboardControllerProps> =\n require('./specs/KeyboardControllerViewNativeComponent').default;\nexport const KeyboardGestureArea: React.FC<KeyboardGestureAreaProps> =\n Platform.OS === 'android' && Platform.Version >= 30\n ? require('./specs/KeyboardGestureAreaNativeComponent').default\n : ({ children }: KeyboardGestureAreaProps) => children;\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,kBAAkB,QAAQ,cAAc;AAU3D,MAAMC,aAAa,GAChB,2FAA0F,GAC3FF,QAAQ,CAACG,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;;AAEjC;AACA,WAAYC,qBAAqB;AAehC,WAfWA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;AAAA,GAArBA,qBAAqB,KAArBA,qBAAqB;AAiBjC,MAAMC,qBAAqB,GACzBC,OAAO,CAAC,kCAAkC,CAAC,CAACH,OAAO;AACrD,OAAO,MAAMI,kBAAkB,GAC7BF,qBAAqB,GACjBA,qBAAqB,GACrB,IAAIG,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAK,CAACV,aAAa,CAAC;EAChC;AACF,CAAC,CAEoB;AAE7B,MAAMW,YAAY,GAAG,IAAIZ,kBAAkB,CAACQ,kBAAkB,CAAC;AAE/D,OAAO,MAAMK,cAAc,GAAG;EAC5BC,WAAW,EAAE,CACXC,IAA8B,EAC9BC,EAAkC,KAC/BJ,YAAY,CAACE,WAAW,CAAC,sBAAsB,GAAGC,IAAI,EAAEC,EAAE;AACjE,CAAC;AACD,OAAO,MAAMC,sBAAyD,GACpEV,OAAO,CAAC,+CAA+C,CAAC,CAACH,OAAO;AAClE,OAAO,MAAMc,mBAAuD,GAClEnB,QAAQ,CAACoB,EAAE,KAAK,SAAS,IAAIpB,QAAQ,CAACqB,OAAO,IAAI,EAAE,GAC/Cb,OAAO,CAAC,4CAA4C,CAAC,CAACH,OAAO,GAC7D;EAAA,IAAC;IAAEiB;EAAmC,CAAC;EAAA,OAAKA,QAAQ;AAAA"}
|