decord/source/modules/chat_input/native/FloatingChatInputContainer.tsx

102 lines
3.5 KiB
TypeScript
Raw Normal View History

// Module ID: 12536
// Function ID: 12537
// Name: FloatingChatInputContainer
// Dependencies: [32, 19, 21, 4373, 4338, 576, 1625, 4504, 1609, 4637, 4640, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 12536 (FloatingChatInputContainer)
import nativeDefault from "native" /* 576 */;
import ReanimatedRexportDefault from "ReanimatedRexport" /* 4373 */;
import useKeyboardTypeDefault from "useKeyboardType" /* 4504 */;
import timing from "timing" /* 4637 */;
import timingPresets from "timingPresets" /* 4640 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
require = fn;
2026-08-03 11:20:01 +00:00
function useKeyboardOpenPaddingStyle() {
token = token(4338).useToken(nativeDefault.modules.mobile.CHAT_INPUT_FLOATING_CONTENT_PADDING_VERTICAL);
let obj = token(4338);
const obj2 = noop;
[tmp5, importDefault] = sharedValue(noop.useState(() => {
const KeyboardController = token(1625).KeyboardController;
2026-07-29 08:29:29 +00:00
const stateResult = KeyboardController.state();
let num;
if (stateResult != null) {
num = stateResult.height;
}
if (num == null) {
num = 0;
}
return num > 0;
}), 2);
const effect = noop.useEffect(() => {
const KeyboardEvents = token(1625).KeyboardEvents;
closure_0 = KeyboardEvents.addListener("keyboardWillShow", () => closure_1(true));
const KeyboardEvents2 = token(1625).KeyboardEvents;
closure_1 = KeyboardEvents2.addListener("keyboardWillHide", () => closure_1(false));
2026-07-29 08:29:29 +00:00
return () => {
closure_0.remove();
closure_1.remove();
2026-07-29 08:29:29 +00:00
};
}, []);
const tmp4 = sharedValue(noop.useState(() => {
const KeyboardController = token(1625).KeyboardController;
2026-07-29 08:29:29 +00:00
const stateResult = KeyboardController.state();
let num;
if (stateResult != null) {
num = stateResult.height;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return num > 0;
}), 2);
const obj3 = token(4504);
2026-08-03 11:20:01 +00:00
if (!tmp5) {
tmp5 = true === obj3.useKeyboardContextForType(token(1609).KeyboardTypes.SYSTEM).keyboardWillOpen;
2026-07-29 08:29:29 +00:00
}
2026-08-03 11:20:01 +00:00
if (!tmp5) {
tmp5 = tmp7 !== token(1609).KeyboardTypes.SYSTEM;
2026-07-29 08:29:29 +00:00
}
2026-08-24 06:08:38 +00:00
dependencyMap = tmp5;
tmp7 = useKeyboardTypeDefault();
2026-07-29 08:29:29 +00:00
let num = 0;
2026-08-03 11:20:01 +00:00
if (tmp5) {
2026-07-29 08:29:29 +00:00
num = token;
}
sharedValue = token(4373).useSharedValue(num);
2026-08-03 11:20:01 +00:00
const items = [tmp5, token, sharedValue];
2026-07-29 08:29:29 +00:00
const effect1 = obj2.useEffect(() => {
2026-07-20 16:05:17 +00:00
let num = 0;
if (closure_2) {
2026-07-20 16:05:17 +00:00
num = token;
}
const obj = timing;
const result = sharedValue.set(obj.withTiming(num, { duration: timingPresets.timingStandardDuration, easing }));
2026-07-29 08:29:29 +00:00
}, items);
const tmpResult = token(4373);
2026-08-03 11:20:01 +00:00
const fn = function b() {
return { paddingBottom: sharedValue.get() };
};
fn.__closure = { paddingSV: sharedValue };
fn.__workletHash = 5673482424037;
fn.__initData = __initData;
return token(4373).useAnimatedStyle(fn);
2026-08-03 11:20:01 +00:00
}
const jsx = fn(21).jsx;
const Easing = fn(4373).Easing;
2026-08-03 11:20:01 +00:00
let closure_6 = Easing.bezier(0.2, 0, 0, 1);
const __initData = { code: "function FloatingChatInputContainerTsx1(){const{paddingSV}=this.__closure;return{paddingBottom:paddingSV.get()};}" };
const size = fn(2);
let result = size.fileFinishedImporting("modules/chat_input/native/FloatingChatInputContainer.tsx");
2026-08-03 11:20:01 +00:00
export default function FloatingChatInputContainer(arg0) {
({ style, onLayout, children } = arg0);
const obj = { style: null, onLayout, children };
const items = [style, useKeyboardOpenPaddingStyle()];
obj.style = items;
return jsx(ReanimatedRexportDefault.View, { style: null, onLayout, children });
2026-07-20 16:05:17 +00:00
};
2026-08-03 11:20:01 +00:00
export { useKeyboardOpenPaddingStyle };