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

99 lines
3.2 KiB
TypeScript
Raw Normal View History

2026-08-31 15:47:37 +00:00
// Module ID: 11943
// Function ID: 11944
2026-08-03 11:20:01 +00:00
// Name: useKeyboardOpenPaddingStyle
2026-08-31 15:47:37 +00:00
// Dependencies: [32, 19, 21, 4187, 4167, 712, 1642, 4312, 1626, 4449, 4452, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-31 15:47:37 +00:00
// Module 11943 (useKeyboardOpenPaddingStyle)
2026-08-24 06:08:38 +00:00
import ThemesDefault from "Themes" /* 712 */;
2026-08-31 15:47:37 +00:00
import _modDef4187 from "module_4187" /* 4187 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import { jsx } from "jsxProd" /* 21 */;
2026-08-31 15:47:37 +00:00
import { Easing } from "module_4187" /* 4187 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-03 11:20:01 +00:00
function useKeyboardOpenPaddingStyle() {
2026-08-31 15:47:37 +00:00
token = token(4167).useToken(ThemesDefault.modules.mobile.CHAT_INPUT_FLOATING_CONTENT_PADDING_VERTICAL);
let obj = token(4167);
2026-07-29 08:29:29 +00:00
const obj2 = React;
2026-08-03 11:20:01 +00:00
[tmp5, importDefault] = sharedValue(React.useState(() => {
2026-08-31 15:47:37 +00:00
const KeyboardController = token(1642).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 = React.useEffect(() => {
2026-08-31 15:47:37 +00:00
const KeyboardEvents = token(1642).KeyboardEvents;
2026-08-24 06:08:38 +00:00
closure_0 = KeyboardEvents.addListener("keyboardWillShow", () => lib(true));
2026-08-31 15:47:37 +00:00
const KeyboardEvents2 = token(1642).KeyboardEvents;
2026-08-24 06:08:38 +00:00
closure_1 = KeyboardEvents2.addListener("keyboardWillHide", () => lib(false));
2026-07-29 08:29:29 +00:00
return () => {
closure_0.remove();
lib.remove();
};
}, []);
2026-08-03 11:20:01 +00:00
const tmp4 = sharedValue(React.useState(() => {
2026-08-31 15:47:37 +00:00
const KeyboardController = token(1642).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);
2026-08-31 15:47:37 +00:00
const obj3 = token(4312);
2026-08-03 11:20:01 +00:00
if (!tmp5) {
2026-08-31 15:47:37 +00:00
tmp5 = true === obj3.useKeyboardContextForType(token(1626).KeyboardTypes.SYSTEM).keyboardWillOpen;
2026-07-29 08:29:29 +00:00
}
2026-08-03 11:20:01 +00:00
if (!tmp5) {
2026-08-31 15:47:37 +00:00
tmp5 = tmp7 !== token(1626).KeyboardTypes.SYSTEM;
2026-07-29 08:29:29 +00:00
}
2026-08-24 06:08:38 +00:00
dependencyMap = tmp5;
2026-08-31 15:47:37 +00:00
let tmpResult = tmp(4187);
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 = tmpResult.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-08-31 15:47:37 +00:00
let obj = token(4449);
2026-07-20 16:05:17 +00:00
let num = 0;
2026-08-24 06:08:38 +00:00
if (dependencyMap) {
2026-07-20 16:05:17 +00:00
num = token;
}
2026-08-31 15:47:37 +00:00
obj = { duration: token(4452).timingStandardDuration, easing: closure_1_6 };
2026-07-29 08:29:29 +00:00
const result = sharedValue.set(obj.withTiming(num, obj));
}, items);
2026-08-31 15:47:37 +00:00
tmpResult = tmp(4187);
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 = closure_7;
return tmpResult.useAnimatedStyle(fn);
}
let closure_6 = Easing.bezier(0.2, 0, 0, 1);
let closure_7 = { code: "function FloatingChatInputContainerTsx1(){const{paddingSV}=this.__closure;return{paddingBottom:paddingSV.get()};}" };
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/chat_input/native/FloatingChatInputContainer.tsx");
2026-08-03 11:20:01 +00:00
export default function FloatingChatInputContainer(arg0) {
({ style, onLayout, children } = arg0);
2026-07-29 08:29:29 +00:00
style = [, ];
style[0] = style;
2026-08-03 11:20:01 +00:00
style[1] = useKeyboardOpenPaddingStyle();
2026-08-31 15:47:37 +00:00
return jsx(_modDef4187.View, { style, onLayout, children });
2026-07-20 16:05:17 +00:00
};
2026-08-03 11:20:01 +00:00
export { useKeyboardOpenPaddingStyle };