Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,169 @@
/* Metro module 13210; source: modules/user_profile/native/UserProfileEditTheme.tsx; dependencies: [31, 27, 33, 4501, 697, 673, 6813, 5278, 1244, 9646, 4573, 8490, 8494, 8372, 5062, 3968, 1365, 13189, 4080, 13211, 1962, 8638, 2] */
function _fun100786(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13400:6, offset: 0x021f88d1, size: 422 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.container = {gap: 6};
object2.sectionHeader = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'center'};
object2.themeColorContainer = {'flexDirection': 'row', 'gap': 12, 'justifyContent': 'center'};
object2.colorSwatchContainer = {'position': 'relative', 'flex': 1, 'flexDirection': 'column',
'alignItems': 'center', 'gap': 4};
const object4 = {'height': 50, 'width': '100%'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.colorSwatch = object4;
object2.dropperIcon = {'position': 'absolute', 'top': 10, 'right': 10};
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.overflowMenu = {tintColor: TEXT_SUBTLE};
const env0_6 = Reflect.apply(createStyles, value, [object2]);
const env0_7 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const env0_8 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_530;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileEditTheme.tsx');
exports.default = UserProfileEditTheme;
}
function ColorSwatch({color, label, accessibilityLabel, onPress, style}) { // fn#100787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13400:705, offset: 0x021f8a77, size: 403 bytes, params: 2, frame: 30
const styles = useStyles();
const value2 = (require(673) /* metro dependency 673: ColorUtils */).int2hex(color);
const higherContrastColor = (require(6813) /* metro dependency 6813: getHigherContrastColor */).getHigherContrastColor({backgroundColor: value2,
colors: [WHITE, PRIMARY_530]});
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Qp04hK = (require(1244) /* metro dependency 1244: indexNative */).t.Qp04hK;
const items2 = [styles.colorSwatch];
items2[1] = {backgroundColor: value2};
items2[2] = style;
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
const pressableOpacity = <PressableOpacity accessibilityRole="button" accessibilityLabel={accessibilityLabel} accessibilityHint={Reflect.apply(string,
intl,
[Qp04hK])} style={items2} onPress={onPress} key={color}><PencilIcon size="xs" color={higherContrastColor} style={styles.dropperIcon} /></PressableOpacity>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.colorSwatchContainer}>
{pressableOpacity}
<Text
variant="text-sm/normal"
color="text-default"
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
>
{label}
</Text>
</View>
);
}
function UserProfileEditTheme({user, onProfileThemeColorsChanged, pendingThemeColors, guildId, pendingAvatarSrc, showResetMenu, isTryItOut}) { // fn#100788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13400:1449, offset: 0x021f8c0a, size: 1033 bytes, params: 2, frame: 37
showResetMenu = !(showResetMenu === undefined) && showResetMenu;
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
const styles = useStyles();
const {primaryColor,
secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: user,
displayProfile: (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(user.id, guildId),
pendingThemeColors: pendingThemeColors, isPreview: isTryItOut});
const r6 = pendingAvatarSrc ?? user.getAvatarURL(guildId, 80);
const useAvatarColorModule = require(8372) /* metro dependency 8372: useAvatarColor */;
const useAvatarColors = useAvatarColorModule.useAvatarColors;
const PRIMARY_530 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_530;
const env0_4 = Reflect.apply(useAvatarColors, useAvatarColorModule, [r6, PRIMARY_530, false]);
if (primaryColor == null) {
return null;
}
if (secondaryColor == null) {
return null;
}
const closure = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return _fun100791;
};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const DMeO2X = (require(1244) /* metro dependency 1244: indexNative */).t.DMeO2X;
const view = <View style={styles.sectionHeader}><Text variant="text-sm/semibold" color="text-subtle">{Reflect.apply(string,
intl,
[DMeO2X])}</Text>{showResetMenu && ((PressableOpacity) => <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+1H47t'])} onPress={onPress_100792}>{((MoreHorizontalIcon) => <MoreHorizontalIcon color={styles.overflowMenu.tintColor} />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View>;
const object = {onPress: closure(primaryColor, function(a0) {
if (a0 !== primaryColor) {
handleProfileThemeColorsChanged([a0, secondaryColor]);
}
}), color: primaryColor};
string = intl.string;
const C3KTQk = (require(1244) /* metro dependency 1244: indexNative */).t.C3KTQk;
object.label = Reflect.apply(string, intl, [C3KTQk]);
let formatToPlainString = intl.formatToPlainString;
const v4X2kc = (require(1244) /* metro dependency 1244: indexNative */).t.v4X2kc;
const object2 = {};
object2.colorHex = (require(673) /* metro dependency 673: ColorUtils */).int2hex(primaryColor);
object.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [v4X2kc, object2]);
const colorSwatch = <ColorSwatch {...object} />;
const colorSwatchProps = {color: secondaryColor, onPress: closure(secondaryColor, function(a0) {
if (a0 !== secondaryColor) {
handleProfileThemeColorsChanged([primaryColor, a0]);
}
}), label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8elvy6'])};
formatToPlainString = intl.formatToPlainString;
const I0tmru = (require(1244) /* metro dependency 1244: indexNative */).t.I0tmru;
const object3 = {};
object3.colorHex = (require(673) /* metro dependency 673: ColorUtils */).int2hex(secondaryColor);
colorSwatchProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [I0tmru, object3]);
return (
<View style={styles.container}>
{view}
<View style={styles.themeColorContainer}>
{colorSwatch}
<ColorSwatch {...colorSwatchProps} />
</View>
</View>
);
}
function handleProfileThemeColorsChanged(a0) { // fn#100789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13400:1911, owner: UserProfileEditTheme.handleProfileThemeColorsChanged, offset: 0x021f9013, size: 81 bytes, params: 2, frame: 15
const value = a0;
const value3 = undefined;
onProfileThemeColorsChanged((importDefault(5062) /* metro dependency 5062 */)(value,
env0_1 == null ? value3 : env0_1.themeColors) ? value3 : value);
return value3;
}
function makeOnPress(a0, a1) { // fn#100790, owner: UserProfileEditTheme.makeOnPress, offset: 0x021f9064, size: 25 bytes, params: 3, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun100791;
}
function UserProfileEditThemeOnPress() { // fn#100792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13400:2480, owner: UserProfileEditTheme.onPress, offset: 0x021f90f2, size: 96 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[18]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[20]);
value = value(dependencyMap[19], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'Profile Theme', {onResetTheme: function() {
return handleProfileThemeColorsChanged([null, null]);
}}]);
}
function _fun100791() { // fn#100791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13400:1996, offset: 0x021f907d, size: 117 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__;
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_markDismissibleContentAsDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_markDismissibleContentAsDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const PROFILE_THEMES_SETTINGS_VIEWED_V2 = DismissibleContent.PROFILE_THEMES_SETTINGS_VIEWED_V2;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, dismissibleContentUnsafeUtilsModule,
[PROFILE_THEMES_SETTINGS_VIEWED_V2]);
(importDefault(13189) /* metro dependency 13189: showCustomColorPickerActionSheet */)({color: env0_0,
onSelect: require, suggestedColors: env1_4});
}