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

66 lines
2.6 KiB
TypeScript
Raw Normal View History

// Module ID: 12356
// Function ID: 12357
2026-07-25 08:10:48 +00:00
// Name: ChatInputScrimGradient
// Dependencies: [19, 17, 21, 4425, 4308, 576, 1091, 5039, 2]
2026-07-25 08:10:48 +00:00
// Exports: ChatInputScrimGradient, useChatInputFloatingOverlayStyle
// Module 12356 (ChatInputScrimGradient)
import nativeDefault from "native" /* 576 */;
import utils_ColorUtils from "utils/ColorUtils" /* 1091 */;
import useToken from "useToken" /* 4308 */;
import client_themes_ClientThemesUtils from "client_themes/ClientThemesUtils" /* 4425 */;
import noop from "module_19" /* 19 */;
2026-07-25 08:10:48 +00:00
const LinearGradientDefault = tmp4(5039);
require = fn;
const View = fn(17).View;
const jsxProd = fn(21);
({ jsx: closure_4, jsxs: hasOwnProperty } = jsxProd);
const size = fn(2);
let result = size.fileFinishedImporting("modules/chat_input/native/ChatInputScrimGradient.tsx");
2026-07-25 08:10:48 +00:00
export const ChatInputScrimGradient = function ChatInputScrimGradient(scrimBase) {
({ gradientHeight, inline } = scrimBase);
if (inline === undefined) {
inline = false;
}
scrimBase = scrimBase.scrimBase;
const gradientValue = client_themes_ClientThemesUtils.useGradientValue(client_themes_ClientThemesUtils.GradientPercentage.END);
const token = useToken.useToken(nativeDefault.colors.BACKGROUND_BASE_LOWER);
2026-07-29 08:29:29 +00:00
if (gradientHeight == null) {
gradientHeight = obj3.useToken(nativeDefault.modules.mobile.CHAT_INPUT_FLOATING_SCRIM_GRADIENT_HEIGHT);
2026-07-25 08:10:48 +00:00
}
2026-07-29 08:29:29 +00:00
if (scrimBase == null) {
scrimBase = gradientValue;
2026-07-25 08:10:48 +00:00
}
2026-07-29 08:29:29 +00:00
if (scrimBase == null) {
scrimBase = token;
2026-07-25 08:10:48 +00:00
}
obj3 = useToken;
let hex2rgbResult = utils_ColorUtils.hex2rgb(scrimBase, 1);
2026-07-29 08:29:29 +00:00
if (hex2rgbResult == null) {
hex2rgbResult = scrimBase;
2026-07-25 08:10:48 +00:00
}
const tmpResult = utils_ColorUtils;
let str = utils_ColorUtils.hex2rgb(scrimBase, 0);
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "transparent";
2026-07-25 08:10:48 +00:00
}
if (inline) {
let result = tmp9;
} else {
result = tmp9 / 2;
}
const obj4 = { style: { position: "absolute", top: result, left: 0, right: 0, bottom: 0 }, pointerEvents: "none", children: null };
const obj5 = { colors: null, style: { height: gradientHeight }, start: { x: 0, y: 0 }, end: { x: 0, y: 1 }, locations: [0, 1] };
2026-07-29 08:29:29 +00:00
const items = [str, hex2rgbResult];
obj5.colors = items;
const items1 = [React4(LinearGradientDefault, obj5), React4(View, { style: { flex: 1, backgroundColor: hex2rgbResult } })];
obj4.children = items1;
return hasOwnProperty(View, obj4);
2026-07-25 08:10:48 +00:00
};
export const useChatInputFloatingOverlayStyle = function useChatInputFloatingOverlayStyle() {
const obj = { marginTop: -useToken.useToken(nativeDefault.modules.mobile.CHAT_INPUT_FLOATING_SCRIM_GRADIENT_HEIGHT) / 2, overflow: "visible" };
2026-07-25 08:10:48 +00:00
return obj;
};