decord/stable/source/modules/vibegrations/native/VibegrationsRepliedMessage.tsx
github-actions 57c2214117 chore: update source for stable 347.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-29 21:26:22 +00:00

87 lines
3.8 KiB
TypeScript

// Module ID: 17026
// Function ID: 17027
// Name: VibegrationsRepliedMessage
// Dependencies: [19, 17, 21, 17024, 4788, 576, 17027, 4632, 16940, 1115, 3710, 1177, 4784, 17031, 2]
// Exports: default
// Module 17026 (VibegrationsRepliedMessage)
import nativeDefault from "native" /* 576 */;
import _modDef3710 from "module_3710" /* 3710 */;
import VibegrationsDesignFeedback from "VibegrationsDesignFeedback" /* 16940 */;
import VibegrationsSelectedMentionDefault from "VibegrationsSelectedMention" /* 17031 */;
import noop from "module_19" /* 19 */;
require = fn;
get_ActivityIndicator = fn(17);
({ Pressable: closure_4, View: hasOwnProperty } = get_ActivityIndicator);
const jsxProd = fn(21);
({ jsx: metroRequire, jsxs: closure_7 } = jsxProd);
const diff = fn(17024).MESSAGE_EDGE_INSET + fn(17024).MESSAGE_AVATAR_SIZE / 2 - 1;
const diff1 = fn(17024).MESSAGE_CONTENT_INSET - 4 - diff;
const createStyles = fn(4788);
let obj2 = { root: { marginLeft: diff - fn(17024).MESSAGE_CONTENT_INSET, paddingLeft: diff1 + 4, height: 20, flexDirection: "row", alignItems: "flex-start" }, spine: null, avatar: null, name: null, content: null };
const rect = { position: "absolute", left: 0, top: 9, bottom: 0, width: diff1, borderTopWidth: 2, borderLeftWidth: 2, borderColor: nativeDefault.colors.SPINE_DEFAULT, borderTopLeftRadius: Math.round(0.25 * diff1) };
obj2.spine = rect;
obj2.avatar = { marginRight: 4 };
obj2.name = { flexShrink: 0, marginRight: 4, maxWidth: "40%" };
obj2.content = { flex: 1 };
let closure_8 = createStyles.createStyles(obj2);
const size = fn(2);
const result = size.fileFinishedImporting("modules/vibegrations/native/VibegrationsRepliedMessage.tsx");
export default function VibegrationsRepliedMessage(replied) {
replied = replied.replied;
const onJump = replied.onJump;
const tmp = closure_8();
const messageAuthorUser = replied(17027).useMessageAuthorUser(replied.userId);
const obj = replied(17027);
let str = replied(4632).useName(messageAuthorUser);
if (str == null) {
str = "";
}
const items = [replied.content];
const memo = noop.useMemo(() => VibegrationsDesignFeedback.parseVibegrationsDesignRemark(replied.content), items);
let body;
if (memo != null) {
body = memo.body;
}
if (body == null) {
body = replied.content;
}
const obj2 = replied(4632);
const trimmed = body.replace(/\s+/g, " ").trim();
const obj3 = { style: tmp.root, onPress: onJump, disabled: null == onJump, accessibilityRole: "button", accessibilityLabel: null, children: null };
const intl = tmp2(1115).intl;
obj3.accessibilityLabel = intl.formatToPlainString(_modDef3710.loFt7s, { name: str, content: trimmed });
const items1 = [closure_6(closure_5, { style: tmp.spine }), , , ];
let tmp11Result = null;
if (null != messageAuthorUser) {
const obj5 = { style: tmp.avatar, children: null };
const obj6 = { userId: replied.userId, size: tmp2(1177).AvatarSizes.SIZE_16 };
obj5.children = tmp11(tmp2(17027).VibegrationsUserAvatar, obj6);
tmp11Result = tmp11(closure_5, obj5);
}
items1[1] = tmp11Result;
items1[2] = closure_6(replied(4784).Text, { variant: "text-xs/semibold", color: "text-default", style: tmp.name, lineClamp: 1, children: str });
const obj8 = { variant: "text-xs/medium", color: "interactive-text-default", style: tmp.content, lineClamp: 1, children: null };
let tmp11Result2 = null;
if (null != memo) {
const obj9 = { label: memo.label, variant: "text-xs/medium" };
tmp11Result2 = tmp11(VibegrationsSelectedMentionDefault, obj9);
}
const items2 = [tmp11Result2, , ];
let str3 = null;
if (null != memo) {
str3 = null;
if ("" !== trimmed) {
str3 = " ";
}
}
items2[1] = str3;
items2[2] = trimmed;
obj8.children = items2;
items1[3] = closure_7(replied(4784).Text, obj8);
obj3.children = items1;
return closure_7(closure_4, obj3);
};
export const REPLY_PREVIEW_HEIGHT = 20;