74 lines
2.0 KiB
JavaScript
74 lines
2.0 KiB
JavaScript
// Metro module 1810 (f1811).
|
|
import { useSharedValue } from "./Module1606";
|
|
import { useKeyboardHandler } from "./useResizeMode";
|
|
const KeyboardState = {
|
|
UNKNOWN: 0,
|
|
OPENING: 1,
|
|
OPEN: 2,
|
|
CLOSING: 3,
|
|
CLOSED: 4
|
|
};
|
|
const __initData = {
|
|
code: "function pnpm_compatTs1(e){const{state,KeyboardState}=this.__closure;state.set(e.height>0?KeyboardState.OPENING:KeyboardState.CLOSING);}"
|
|
};
|
|
const __initData2 = {
|
|
code: "function pnpm_compatTs2(e){const{height}=this.__closure;height.set(e.height);}"
|
|
};
|
|
const __initData3 = {
|
|
code: "function pnpm_compatTs3(e){const{height}=this.__closure;height.set(e.height);}"
|
|
};
|
|
const __initData4 = {
|
|
code: "function pnpm_compatTs4(e){const{state,KeyboardState,height}=this.__closure;state.set(e.height>0?KeyboardState.OPEN:KeyboardState.CLOSED);height.set(e.height);}"
|
|
};
|
|
exports.KeyboardState = KeyboardState;
|
|
export const useAnimatedKeyboard = () => {
|
|
const sharedValue = useSharedValue(0);
|
|
const sharedValue2 = useSharedValue(KeyboardState.UNKNOWN);
|
|
const u = function u(a0) {
|
|
sharedValue2.set(a0.height > 0 ? KeyboardState.OPENING : KeyboardState.CLOSING);
|
|
};
|
|
u.__closure = {
|
|
state: sharedValue2,
|
|
KeyboardState
|
|
};
|
|
u.__workletHash = 14565322463725;
|
|
u.__initData = __initData;
|
|
const c = function c(a0) {
|
|
sharedValue.set(a0.height);
|
|
};
|
|
c.__closure = {
|
|
height: sharedValue
|
|
};
|
|
c.__workletHash = 10176723030164;
|
|
c.__initData = __initData2;
|
|
const _ = function _(a0) {
|
|
sharedValue.set(a0.height);
|
|
};
|
|
_.__closure = {
|
|
height: sharedValue
|
|
};
|
|
_.__workletHash = 5410731249621;
|
|
_.__initData = __initData3;
|
|
const n = function n(a0) {
|
|
sharedValue2.set(a0.height > 0 ? KeyboardState.OPEN : KeyboardState.CLOSED);
|
|
sharedValue.set(a0.height);
|
|
};
|
|
n.__closure = {
|
|
state: sharedValue2,
|
|
KeyboardState,
|
|
height: sharedValue
|
|
};
|
|
n.__workletHash = 1401367954247;
|
|
n.__initData = __initData4;
|
|
useKeyboardHandler({
|
|
onStart: u,
|
|
onMove: c,
|
|
onInteractive: _,
|
|
onEnd: n
|
|
}, []);
|
|
return {
|
|
height: sharedValue,
|
|
state: sharedValue2
|
|
};
|
|
};
|