Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,103 @@
|
||||
/* Metro module 4585; source: design/components/Button/native/BaseButton.native.tsx; dependencies: [29, 31, 27, 4586, 33, 3868, 4501, 697, 4583, 4017, 1360, 477, 2] */
|
||||
function _fun38889(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4763:6, offset: 0x010cf432, size: 309 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const env0_3 = ['style'];
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const {Pressable, TouchableOpacity} = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = (require(4586) /* metro dependency 4586: styleConstants */).IOS_POINTER_STYLE;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun38890);
|
||||
const env0_9 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Pressable);
|
||||
const env0_10 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(TouchableOpacity);
|
||||
value = value.forwardRef(_fun38891);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/BaseButton.native.tsx');
|
||||
exports.BaseButton = value;
|
||||
}
|
||||
|
||||
function _fun38890(a0) { // fn#38890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4763:247, offset: 0x010cf567, size: 140 bytes, params: 2, frame: 13
|
||||
var r3;
|
||||
var r2;
|
||||
if (a0 === 'secondary') {
|
||||
r2 = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
r3 = importDefault;
|
||||
} else if (a0 !== 'primary-overlay') {
|
||||
r2 = {};
|
||||
} else {
|
||||
r2 = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_BUTTON_OVERLAY;
|
||||
r3 = importDefault;
|
||||
}
|
||||
const object = {};
|
||||
copyDataProperties(object, r2, r3);
|
||||
return {button: object, disabled: {opacity: 0.5}};
|
||||
}
|
||||
|
||||
function _fun38891({children, style, variant, disabled, loading, pressed, onPress, onPressDisabled, onPressIn, onPressOut, onLongPress, onLayout, accessible, accessibilityRole, accessibilityLabel, accessibilityHint, accessibilityValue, accessibilityState, accessibilityActions, onAccessibilityAction, accessibilityElementsHidden, importantForAccessibility, pointerEvents, hitSlop, scaleAmountInPx}, a1) { // fn#38891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4763:524, offset: 0x010cf5f3, size: 1065 bytes, params: 3, frame: 46
|
||||
variant = variant === undefined ? 'primary' : variant;
|
||||
disabled = !(disabled === undefined) && disabled;
|
||||
loading = !(loading === undefined) && loading;
|
||||
const env0_3 = undefined;
|
||||
const styles = useStyles(variant);
|
||||
const r7 = disabled && onPressDisabled == null;
|
||||
const r9 = (disabled ? onPressDisabled : onPress) ?? undefined;
|
||||
const value7 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useButtonPressAnimationProps(pressed,
|
||||
scaleAmountInPx, onLayout, onPressIn, onPressOut);
|
||||
const style2 = value7.style;
|
||||
let binding = env0_4;
|
||||
const r10 = pressed == null ? {animatedScaleStyles: undefined, buttonAnimationProps: {onLayout: onLayout,
|
||||
onPressIn: onPressIn, onPressOut: onPressOut}} : {animatedScaleStyles: style2,
|
||||
buttonAnimationProps: binding(value7, env0_3)};
|
||||
const animatedScaleStyles = r10.animatedScaleStyles;
|
||||
const buttonAnimationProps = r10.buttonAnimationProps;
|
||||
const value9 = env0_5.useMemo(_fun38892, [accessibilityState, r7, loading]);
|
||||
const nativeModule = require(3868) /* metro dependency 3868: native */;
|
||||
const useThemeContext = nativeModule.useThemeContext;
|
||||
const theme = Reflect.apply(useThemeContext, nativeModule, []).theme;
|
||||
const value10 = 'light';
|
||||
const r30 = variant === 'primary-overlay' ? value10 : variant !== 'secondary-overlay' || value10 !== theme ? undefined : 'dark';
|
||||
const r5 = r30 == null ? children : <nativeModule.ThemeContextProvider theme={r30}>{children}</nativeModule.ThemeContextProvider>;
|
||||
const items = [styles.button, style];
|
||||
disabled = disabled && styles.disabled;
|
||||
items[2] = disabled;
|
||||
items[3] = animatedScaleStyles;
|
||||
items[4] = IOS_POINTER_STYLE;
|
||||
if (accessibilityRole !== 'none') {
|
||||
return ((Component) => <Component {...buttonAnimationProps} {...{['ref']: a1}} {...{['accessible']: accessible}} {...{['accessibilityRole']: accessibilityRole ?? 'button'}} {...{['accessibilityLabel']: accessibilityLabel}} {...{['accessibilityHint']: accessibilityHint}} {...{['accessibilityValue']: accessibilityValue}} {...{['accessibilityState']: value9}} {...{['accessibilityActions']: accessibilityActions}} {...{['onAccessibilityAction']: onAccessibilityAction}} {...{['accessibilityElementsHidden']: accessibilityElementsHidden}} {...{['importantForAccessibility']: importantForAccessibility}} {...{['pointerEvents']: pointerEvents}} {...{['style']: items}} {...{['onPress']: r9}} {...{['onLongPress']: onLongPress}} {...{['disabled']: r7}} {...{['hitSlop']: hitSlop}}>{r5}</Component>)(env0_9);
|
||||
}
|
||||
const r27 = accessibilityElementsHidden ? '' : [accessibilityLabel,
|
||||
accessibilityHint].filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).join(', ');
|
||||
binding = env0_10;
|
||||
const bindingProps2 = {...buttonAnimationProps};
|
||||
bindingProps2['ref'] = a1;
|
||||
bindingProps2['accessible'] = !(accessible ?? (require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) && undefined;
|
||||
bindingProps2['accessibilityRole'] = 'none';
|
||||
bindingProps2['accessibilityLabel'] = r27;
|
||||
bindingProps2['accessibilityElementsHidden'] = accessibilityElementsHidden;
|
||||
bindingProps2['activeOpacity'] = 1;
|
||||
bindingProps2['importantForAccessibility'] = importantForAccessibility;
|
||||
bindingProps2['style'] = items;
|
||||
bindingProps2['onPress'] = r9;
|
||||
bindingProps2['onPressIn'] = function(a0) {
|
||||
if (buttonAnimationProps.onPressIn != null) {
|
||||
buttonAnimationProps.onPressIn(a0);
|
||||
}
|
||||
};
|
||||
bindingProps2['onPressOut'] = function(a0) {
|
||||
if (buttonAnimationProps.onPressOut != null) {
|
||||
buttonAnimationProps.onPressOut(a0);
|
||||
}
|
||||
};
|
||||
bindingProps2['hitSlop'] = hitSlop;
|
||||
return ((Component) => <Component {...bindingProps2}>{r5}</Component>)(binding);
|
||||
}
|
||||
|
||||
function _fun38892() { // fn#38892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4763:1367, offset: 0x010cfa1c, size: 44 bytes, params: 1, frame: 13
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, accessibilityState, undefined);
|
||||
object2['disabled'] = env0_2;
|
||||
object2['busy'] = loading;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/* Metro module 8342; source: design/components/Button/native/BaseIconButton.native.tsx; dependencies: [31, 33, 4501, 4582, 4017, 4580, 4583, 4585, 4587, 2] */
|
||||
function _fun66438(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8527:6, offset: 0x01bfb458, size: 221 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun66439);
|
||||
const env0_5 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(importDefault(4580) /* metro dependency 4580: Icon */);
|
||||
value = value.forwardRef(_fun66440);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/BaseIconButton.native.tsx');
|
||||
exports.BaseIconButton = value;
|
||||
}
|
||||
|
||||
function _fun66439(a0, a1) { // fn#66439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8527:144, offset: 0x01bfb535, size: 259 bytes, params: 3, frame: 16
|
||||
var r6;
|
||||
var r2;
|
||||
var LARGE_BUTTON_PADDING;
|
||||
var MEDIUM_BUTTON_PADDING;
|
||||
var SMALL_BUTTON_PADDING;
|
||||
let object3 = {};
|
||||
if (a1 === 'sm') {
|
||||
object3 = {};
|
||||
SMALL_BUTTON_PADDING = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_PADDING;
|
||||
object3.paddingHorizontal = SMALL_BUTTON_PADDING;
|
||||
object3.paddingVertical = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_PADDING;
|
||||
r2 = object3;
|
||||
r6 = SMALL_BUTTON_PADDING;
|
||||
} else if (a1 === 'md') {
|
||||
object3 = {};
|
||||
MEDIUM_BUTTON_PADDING = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_PADDING;
|
||||
object3.paddingHorizontal = MEDIUM_BUTTON_PADDING;
|
||||
object3.paddingVertical = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_PADDING;
|
||||
r2 = object3;
|
||||
r6 = MEDIUM_BUTTON_PADDING;
|
||||
} else if (a1 !== 'lg') {
|
||||
r2 = object3;
|
||||
} else {
|
||||
object3 = {};
|
||||
LARGE_BUTTON_PADDING = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_PADDING;
|
||||
object3.paddingHorizontal = LARGE_BUTTON_PADDING;
|
||||
object3.paddingVertical = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_PADDING;
|
||||
r2 = object3;
|
||||
r6 = LARGE_BUTTON_PADDING;
|
||||
}
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, r2, r6);
|
||||
return {button: {'flexShrink': 0, 'flexGrow': 0, 'alignSelf': 'center'}, pill: object4};
|
||||
}
|
||||
|
||||
function _fun66440(a0, a1) { // fn#66440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8527:638, offset: 0x01bfb638, size: 595 bytes, params: 3, frame: 34
|
||||
var r14;
|
||||
const style = a0.style;
|
||||
const pillStyle = a0.pillStyle;
|
||||
const variant = a0.variant;
|
||||
const r13 = variant === undefined ? 'primary' : variant;
|
||||
const size = a0.size;
|
||||
if (size !== undefined) {
|
||||
r14 = size;
|
||||
} else {
|
||||
value = environment;
|
||||
r14 = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).DEFAULT_BUTTON_SIZE;
|
||||
}
|
||||
const maxFontSizeMultiplier = a0.maxFontSizeMultiplier;
|
||||
const loading = a0.loading;
|
||||
const icon = a0.icon;
|
||||
const scaleAmountInPx = a0.scaleAmountInPx;
|
||||
const r19 = scaleAmountInPx === undefined ? 4 : scaleAmountInPx;
|
||||
const styles = useStyles(r13, r14);
|
||||
value = require(dependencyMap[value]);
|
||||
value = value.useSharedValue(0);
|
||||
const value3 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useIconTintStyles(r13);
|
||||
const value4 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useIconSizeStyles(r14, true,
|
||||
maxFontSizeMultiplier);
|
||||
const LARGE_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_HEIGHT;
|
||||
const value5 = 'sm';
|
||||
const r21 = value5 === r14 ? (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT : r14 !== 'md' ? LARGE_BUTTON_HEIGHT : (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_HEIGHT;
|
||||
const Math = global.Math;
|
||||
const max = Math.max;
|
||||
const MINIMUM_HIT_AREA = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MINIMUM_HIT_AREA;
|
||||
const value6 = Reflect.apply(max, Math, [(MINIMUM_HIT_AREA - r21) / 2, 0]);
|
||||
const BaseButton = (require(4585) /* metro dependency 4585: BaseButtonNative */).BaseButton;
|
||||
const baseButtonProps = {...a0};
|
||||
baseButtonProps['ref'] = a1;
|
||||
baseButtonProps['style'] = [styles.button, style];
|
||||
baseButtonProps['pressed'] = value;
|
||||
baseButtonProps['scaleAmountInPx'] = r19;
|
||||
baseButtonProps['hitSlop'] = value6;
|
||||
const ButtonPill = (require(4587) /* metro dependency 4587: ButtonPillNative */).ButtonPill;
|
||||
const binding = env0_2;
|
||||
return (
|
||||
<BaseButton {...baseButtonProps}>
|
||||
<ButtonPill
|
||||
style={[styles.pill, pillStyle]}
|
||||
variant={r13}
|
||||
size={r14}
|
||||
loading={loading}
|
||||
loaderSize={r14 !== 'lg' ? 'xs' : value5}
|
||||
pressed={value}
|
||||
>
|
||||
{binding.isValidElement(icon) ? icon : ((Component) => <Component source={icon} style={[value3,
|
||||
value4]} />)(env0_5)}
|
||||
</ButtonPill>
|
||||
</BaseButton>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,355 @@
|
||||
/* Metro module 4579; source: design/components/Button/native/BaseTextButton.native.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4017, 4580, 4577, 4581, 4582, 4583, 1357, 4573, 3875, 4081, 4585, 3862, 4587, 2] */
|
||||
function _fun38838(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:6, offset: 0x010ccaf5, size: 643 bytes, params: 8, frame: 26
|
||||
const env0_0 = require;
|
||||
const closure = getHitSlop;
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
value2.Platform;
|
||||
const env0_5 = value2.Text;
|
||||
const env0_6 = value2.View;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value3.jsx;
|
||||
const env0_8 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
let createStyles = createStylesModule.createStyles;
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [_fun38847]);
|
||||
const env0_10 = createStylesModule.createStyles({container: {'flexDirection': 'row', 'alignItems': 'center',
|
||||
'position': 'relative'}, textCollapsed: {'position': 'absolute', 'left': 0}});
|
||||
const value6 = createStylesModule;
|
||||
createStyles = value6.createStyles;
|
||||
const object3 = {borderWidth: 1};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object3.borderColor = BORDER_SUBTLE;
|
||||
object3.overflow = 'hidden';
|
||||
const env0_11 = Reflect.apply(createStyles, value6, [{entityWrapper: object3}]);
|
||||
const env0_12 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(importDefault(4580) /* metro dependency 4580: Icon */);
|
||||
const env0_13 = value.createContext('md');
|
||||
object = {code: 'function BaseTextButtonNativeTsx1({nativeEvent:nativeEvent}){const{containerWidth}=this.__closure;if(containerWidth.get()!==0)return;const{width:width}=nativeEvent.layout;containerWidth.set(width);}'};
|
||||
object = {code: "function BaseTextButtonNativeTsx2(){const{containerWidth,withSpring,collapsed,SUBTLE_SPRING}=this.__closure;if(containerWidth.get()===0)return{};return{width:withSpring(collapsed.get()===1?0:containerWidth.get(),SUBTLE_SPRING,'animate-always'),opacity:withSpring(collapsed.get()===1?0:1,SUBTLE_SPRING,'animate-always')};}"};
|
||||
object = {code: 'function BaseTextButtonNativeTsx3(){const{collapsed,textCollapsed,containerWidth}=this.__closure;if(collapsed.get()===0)return{};return{...textCollapsed,width:containerWidth.get()};}'};
|
||||
const env0_17 = createStylesModule.createStyles(function(a0, a1) {
|
||||
if (a1 !== 0) {
|
||||
if (a0 === 'start') {
|
||||
return {offset: {marginLeft: a1}};
|
||||
}
|
||||
if (a0 === 'end') {
|
||||
return {offset: {marginRight: a1}};
|
||||
}
|
||||
}
|
||||
return {offset: {}};
|
||||
});
|
||||
object = {sm: closure('sm'), md: closure('md'), lg: closure('lg')};
|
||||
const getTextPlatformLineHeight = function(a0, a1) {
|
||||
return a0 != null ? ({sm: a0, md: a0 + 0.5, lg: a0 + 1.9})[a1] : undefined;
|
||||
};
|
||||
value = value.forwardRef(_fun38850);
|
||||
Object = global.Object;
|
||||
value = Object.assign({}, value, {Icon: Icon});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/BaseTextButton.native.tsx');
|
||||
exports.BaseTextButton = value;
|
||||
}
|
||||
|
||||
function CollapsingText({children, collapseText}) { // fn#38839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:1057, offset: 0x010ccd78, size: 257 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useWorkletCallback = reanimatedRexportModule.useWorkletCallback;
|
||||
const closure = CollapsingTextO;
|
||||
closure.__closure = {containerWidth: value2};
|
||||
closure.__workletHash = 5541458715155;
|
||||
closure.__initData = env0_14;
|
||||
const value3 = Reflect.apply(useWorkletCallback, reanimatedRexportModule, [closure, [value2]]);
|
||||
const value4 = useCollapsingTextContainerStyles(value2, collapseText);
|
||||
const value5 = useCollapsingTextStyles(value2, collapseText);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.container, value4];
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View style={items2} onLayout={value3}>
|
||||
<View2 style={value5}>
|
||||
{children}
|
||||
</View2>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function getHitSlop(a0) { // fn#38845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:2889, offset: 0x010cd0d5, size: 173 bytes, params: 2, frame: 16
|
||||
const LARGE_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_HEIGHT;
|
||||
const r1 = a0 === 'sm' ? (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT : a0 !== 'md' ? LARGE_BUTTON_HEIGHT : (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_HEIGHT;
|
||||
const Math = global.Math;
|
||||
const max = Math.max;
|
||||
const MINIMUM_HIT_AREA = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MINIMUM_HIT_AREA;
|
||||
const value = Reflect.apply(max, Math, [(MINIMUM_HIT_AREA - r1) / 2, 0]);
|
||||
return {top: value, left: undefined, right: undefined, bottom: value};
|
||||
}
|
||||
|
||||
function BaseTextButtonIcon({icon, size, iconPosition, iconOpticalOffsetMargin, style}) { // fn#38846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:3285, offset: 0x010cd182, size: 124 bytes, params: 2, frame: 18
|
||||
const value2 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useIconSizeStyles(size);
|
||||
const styles = useStyles(iconPosition, iconOpticalOffsetMargin);
|
||||
return ((Component) => <Component source={icon} style={[style, value2, styles.offset]} />)(env0_12);
|
||||
}
|
||||
|
||||
function _fun38847(a0, a1) { // fn#38847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:208, offset: 0x010cd1fe, size: 139 bytes, params: 3, frame: 15
|
||||
const object = {'flexShrink': 1, 'flexGrow': 0};
|
||||
object.lineHeight = getTextPlatformLineHeight(a1, a0);
|
||||
return {grow: {'flexGrow': 1, 'alignSelf': 'stretch'}, shrink: {flexShrink: 1}, buttonText: object,
|
||||
icon: {'flexShrink': 0, 'flexGrow': 0}, iconLeft: {paddingLeft: 4}, iconRight: {paddingRight: 4},
|
||||
expressiveButtonContainer: {position: 'relative'}};
|
||||
}
|
||||
|
||||
function _fun38850(a0, a1) { // fn#38850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:3488, offset: 0x010cd31f, size: 1381 bytes, params: 3, frame: 51
|
||||
const style = a0.style;
|
||||
const pillStyle = a0.pillStyle;
|
||||
const text = a0.text;
|
||||
const textElement = a0.textElement;
|
||||
const size = a0.size;
|
||||
const value = undefined;
|
||||
const r15 = value !== size ? size : (require(4582) /* metro dependency 4582: ButtonConstantsNative */).DEFAULT_BUTTON_SIZE;
|
||||
const loading = a0.loading;
|
||||
const icon = a0.icon;
|
||||
const iconPosition = a0.iconPosition;
|
||||
const value3 = 'start';
|
||||
const r14 = value === iconPosition ? value3 : iconPosition;
|
||||
const iconOpticalOffsetMargin = a0.iconOpticalOffsetMargin;
|
||||
const value4 = 0;
|
||||
const r38 = value === iconOpticalOffsetMargin ? value4 : iconOpticalOffsetMargin;
|
||||
const grow = a0.grow;
|
||||
let r30 = value !== grow && grow;
|
||||
const shrink = a0.shrink;
|
||||
let r29 = value !== shrink && shrink;
|
||||
const collapseText = a0.collapseText;
|
||||
const accessibilityRole = a0.accessibilityRole;
|
||||
const r24 = value === accessibilityRole ? 'button' : accessibilityRole;
|
||||
const accessibilityLabel = a0.accessibilityLabel;
|
||||
const maxFontSizeMultiplier = a0.maxFontSizeMultiplier;
|
||||
const r37 = value !== maxFontSizeMultiplier ? maxFontSizeMultiplier : (require(4582) /* metro dependency 4582: ButtonConstantsNative */).BUTTON_DEFAULT_MAX_FONT_SIZE_MULTIPLIER;
|
||||
const shiny = a0.shiny;
|
||||
const r7 = value !== shiny && shiny;
|
||||
const onPressIn = a0.onPressIn;
|
||||
const onPressOut = a0.onPressOut;
|
||||
const onLayout = a0.onLayout;
|
||||
const value11 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('BaseTextButton');
|
||||
const r5 = a0.textVariant ?? (require(4582) /* metro dependency 4582: ButtonConstantsNative */).getButtonDefaultTextVariant(r15);
|
||||
const TextStyleSheet = (require(4573) /* metro dependency 4573: Text */).TextStyleSheet;
|
||||
const property = TextStyleSheet[r5];
|
||||
const styles = useStyles(r15, property.fontSize);
|
||||
const property2 = env0_18[r15];
|
||||
let binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
|
||||
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
|
||||
const env0_3 = enabled;
|
||||
let r0 = a0.variant ?? 'primary';
|
||||
r0 = value11 && r0 === 'tertiary' ? 'secondary' : r0;
|
||||
const value16 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(value4);
|
||||
const value17 = r0.startsWith('expressive');
|
||||
var env0_4 = value17;
|
||||
binding = env0_4;
|
||||
const value18 = binding.useRef(null);
|
||||
const env0_6 = binding.useRef({'width': 0, 'height': 0});
|
||||
const value20 = env0_3(binding.useState({'pressed': false, 'posx': 0, 'posy': 0}), 2);
|
||||
const property3 = value20[value4];
|
||||
const env0_7 = value20[1];
|
||||
const value21 = binding.useCallback(_fun38851, [onLayout, value17]);
|
||||
const value22 = binding.useCallback(_fun38852, [value17, onPressIn, enabled]);
|
||||
const value23 = binding.useCallback(_fun38853, [value17, onPressOut]);
|
||||
const value24 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useButtonTextColorStyles(r0);
|
||||
const r34 = icon == null ? {} : value3 === r14 ? styles.iconLeft : styles.iconRight;
|
||||
const r12 = icon == null ? <BaseTextButtonIcon icon={icon} size={r15} style={[styles.icon,
|
||||
{tintColor: value24.color}]} iconOpticalOffsetMargin={r38} iconPosition={r14} /> : env0_4.isValidElement(icon) ? icon : <BaseTextButtonIcon icon={icon} size={r15} style={[styles.icon,
|
||||
{tintColor: value24.color}]} iconOpticalOffsetMargin={r38} iconPosition={r14} />;
|
||||
const r19 = textElement ?? <Text maxFontSizeMultiplier={r37} numberOfLines={1} style={[styles.buttonText, property,
|
||||
value24, r34]}>{text}</Text>;
|
||||
const BaseButton = (require(4585) /* metro dependency 4585: BaseButtonNative */).BaseButton;
|
||||
const baseButtonProps = {ref: a1, ...a0};
|
||||
baseButtonProps['onPressIn'] = value22;
|
||||
baseButtonProps['onPressOut'] = value23;
|
||||
baseButtonProps['onLayout'] = value21;
|
||||
r30 = r30 && styles.grow;
|
||||
r29 = r29 && styles.shrink;
|
||||
baseButtonProps['style'] = [r30, r29, style, value17 && styles.expressiveButtonContainer];
|
||||
baseButtonProps['pointerEvents'] = value17 ? 'box-only' : a0.pointerEvents;
|
||||
baseButtonProps['pressed'] = value16;
|
||||
baseButtonProps['accessibilityRole'] = r24;
|
||||
baseButtonProps['accessibilityLabel'] = accessibilityLabel ?? (require(3862) /* metro dependency 3862: native */).getNodeText(text);
|
||||
baseButtonProps['hitSlop'] = property2;
|
||||
const ButtonPill = (require(4587) /* metro dependency 4587: ButtonPillNative */).ButtonPill;
|
||||
const Provider = env0_13.Provider;
|
||||
const items4 = [icon != null && value3 === r14 && r12];
|
||||
items4[1] = value === collapseText ? r19 : <CollapsingText collapseText={collapseText}>{r19}</CollapsingText>;
|
||||
items4[2] = icon != null && r14 === 'end' && r12;
|
||||
return (
|
||||
<BaseButton {...baseButtonProps}>
|
||||
<ButtonPill
|
||||
variant={r0}
|
||||
size={r15}
|
||||
loading={loading}
|
||||
pressed={value16}
|
||||
style={pillStyle}
|
||||
shiny={r7}
|
||||
expressiveRiveRef={value17 ? value18 : value}
|
||||
expressivePressState={value17 ? property3 : value}
|
||||
>
|
||||
<Provider value={r15}>
|
||||
{items4}
|
||||
</Provider>
|
||||
</ButtonPill>
|
||||
</BaseButton>
|
||||
);
|
||||
}
|
||||
|
||||
function Icon({source, variant, disableColor}) { // fn#38855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:6038, offset: 0x010cda34, size: 168 bytes, params: 2, frame: 19
|
||||
variant = variant === undefined ? 'icon' : variant;
|
||||
disableColor = disableColor === undefined || disableColor;
|
||||
const value2 = env0_4.useContext(env0_13);
|
||||
const styles = useStyles();
|
||||
const env0_122 = ((Component) => <Component source={source} disableColor={disableColor} style={(require(4583) /* metro dependency 4583: ButtonHooksNative */).useIconSizeStyles(value2)} />)(env0_12);
|
||||
return variant !== 'entity' ? env0_122 : <View style={styles.entityWrapper}>{env0_122}</View>;
|
||||
}
|
||||
|
||||
function CollapsingTextO({nativeEvent}) { // fn#38840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:1183, owner: CollapsingText.o, offset: 0x010cce79, size: 60 bytes, params: 2, frame: 12
|
||||
if (env0_0.get() === 0) {
|
||||
env0_0.set(nativeEvent.layout.width);
|
||||
}
|
||||
}
|
||||
|
||||
function useCollapsingTextContainerStyles(a0, a1) { // fn#38841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:1342, owner: CollapsingText.useCollapsingTextContainerStyles, offset: 0x010cceb5, size: 147 bytes, params: 3, frame: 18
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = useCollapsingTextContainerStylesO;
|
||||
const object2 = {containerWidth: a0};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.collapsed = a1;
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
object2.SUBTLE_SPRING = SUBTLE_SPRING;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 493185281611;
|
||||
closure.__initData = env1_15;
|
||||
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
}
|
||||
|
||||
function useCollapsingTextStyles(a0, a1) { // fn#38843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:1801, owner: CollapsingText.useCollapsingTextStyles, offset: 0x010cd018, size: 126 bytes, params: 3, frame: 17
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const styles = useStyles();
|
||||
const textCollapsed = styles.textCollapsed;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = useCollapsingTextStylesS;
|
||||
closure.__closure = {collapsed: a1, textCollapsed: textCollapsed, containerWidth: a0};
|
||||
closure.__workletHash = 5824483783888;
|
||||
closure.__initData = env1_16;
|
||||
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
}
|
||||
|
||||
function _fun38851(a0) { // fn#38851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:4519, offset: 0x010cd884, size: 80 bytes, params: 2, frame: 12
|
||||
var layout;
|
||||
if (onLayout != null) {
|
||||
onLayout(a0);
|
||||
}
|
||||
if (env0_4) {
|
||||
layout = a0.nativeEvent.layout;
|
||||
env0_6.current = {width: layout.width, height: layout.height};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun38852(a0) { // fn#38852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:4649, offset: 0x010cd8d4, size: 216 bytes, params: 2, frame: 17
|
||||
var nativeEvent;
|
||||
var locationX;
|
||||
var locationY;
|
||||
var current;
|
||||
var value;
|
||||
if (onPressIn != null) {
|
||||
onPressIn(a0);
|
||||
}
|
||||
if (env0_4) {
|
||||
if (enabled) {
|
||||
current = env0_5.current;
|
||||
if (current != null) {
|
||||
current.play();
|
||||
}
|
||||
} else {
|
||||
nativeEvent = a0.nativeEvent;
|
||||
locationX = nativeEvent.locationX;
|
||||
locationY = nativeEvent.locationY;
|
||||
current = env0_6.current;
|
||||
env0_7({pressed: true, posx: locationX - current.width / 2, posy: locationY - current.height / 2});
|
||||
}
|
||||
value = environment.__proto__;
|
||||
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
value.triggerHapticFeedback((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_HEAVY);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun38853(a0) { // fn#38853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:4946, offset: 0x010cd9ac, size: 111 bytes, params: 2, frame: 14
|
||||
var environment;
|
||||
var value;
|
||||
if (onPressOut != null) {
|
||||
onPressOut(a0);
|
||||
}
|
||||
if (env0_4) {
|
||||
env0_7(function(a0) {
|
||||
var r2;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, r2);
|
||||
object['pressed'] = false;
|
||||
return object;
|
||||
});
|
||||
value = environment.__proto__;
|
||||
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
value.triggerHapticFeedback((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_MEDIUM);
|
||||
}
|
||||
}
|
||||
|
||||
function useCollapsingTextContainerStylesO() { // fn#38842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:1424, owner: CollapsingText.useCollapsingTextContainerStyles.o, offset: 0x010ccf48, size: 208 bytes, params: 1, frame: 25
|
||||
var r0;
|
||||
var object2;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var withSpring;
|
||||
var value5;
|
||||
var value6;
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
const value2 = env0_0.get();
|
||||
const value3 = 0;
|
||||
if (value3 === value2) {
|
||||
r0 = {};
|
||||
} else {
|
||||
object2 = {};
|
||||
value4 = environment.__proto__.__proto__;
|
||||
moduleValue = require(4577) /* metro dependency 4577: spring */;
|
||||
withSpring = moduleValue.withSpring;
|
||||
value5 = require.get();
|
||||
value6 = 1;
|
||||
object2.width = Reflect.apply(withSpring, moduleValue, [value6 === value5 ? value3 : env0_0.get(),
|
||||
SUBTLE_SPRING,
|
||||
'animate-always']);
|
||||
object2.opacity = (require(4577) /* metro dependency 4577: spring */).withSpring(value6 !== require.get() ? value6 : value3,
|
||||
|
||||
SUBTLE_SPRING, 'animate-always');
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useCollapsingTextStylesS() { // fn#38844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4757:1898, owner: CollapsingText.useCollapsingTextStyles.s, offset: 0x010cd096, size: 63 bytes, params: 1, frame: 12
|
||||
var r0;
|
||||
var object2;
|
||||
const value2 = require.get();
|
||||
if (value2 === 0) {
|
||||
r0 = {};
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, textCollapsed, value2);
|
||||
object2['width'] = env0_0.get();
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Metro module 4578; source: design/components/Button/native/Button.native.tsx; dependencies: [2, 4579] */
|
||||
function _fun38837(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4756:6, offset: 0x010cca95, size: 96 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/Button.native.tsx');
|
||||
const BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
|
||||
exports.Button = BaseTextButton;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/* Metro module 4582; source: design/components/Button/native/ButtonConstants.native.tsx; dependencies: [4580, 2] */
|
||||
function _fun38862(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4760:6, offset: 0x010cded5, size: 348 bytes, params: 8, frame: 28
|
||||
const env0_0 = require;
|
||||
const closure = getButtonPadding;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const IconSizes = (require(4580) /* metro dependency 4580: Icon */).IconSizes;
|
||||
const SMALL = IconSizes.SMALL;
|
||||
const SMALL_20 = IconSizes.SMALL_20;
|
||||
const MEDIUM = IconSizes.MEDIUM;
|
||||
const MEDIUM2 = IconSizes.MEDIUM;
|
||||
const value = closure(32, SMALL);
|
||||
const value2 = closure(40, SMALL_20);
|
||||
const value3 = closure(48, MEDIUM);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/ButtonConstants.native.tsx');
|
||||
exports.MINIMUM_HIT_AREA = 44;
|
||||
exports.SMALL_BUTTON_HEIGHT = 32;
|
||||
exports.MEDIUM_BUTTON_HEIGHT = 40;
|
||||
exports.LARGE_BUTTON_HEIGHT = 48;
|
||||
exports.FAB_BUTTON_SIZE = 56;
|
||||
exports.BUTTON_BORDER_WIDTH = 1;
|
||||
exports.DEFAULT_BUTTON_SIZE = 'md';
|
||||
exports.SMALL_BUTTON_ICON_SIZE = SMALL;
|
||||
exports.MEDIUM_BUTTON_ICON_SIZE = SMALL_20;
|
||||
exports.LARGE_BUTTON_ICON_SIZE = MEDIUM;
|
||||
exports.FAB_BUTTON_ICON_SIZE = MEDIUM2;
|
||||
exports.SMALL_BUTTON_HORIZONTAL_PADDING = 12;
|
||||
exports.MEDIUM_BUTTON_HORIZONTAL_PADDING = 20;
|
||||
exports.LARGE_BUTTON_HORIZONTAL_PADDING = 24;
|
||||
exports.SMALL_BUTTON_PADDING = value;
|
||||
exports.MEDIUM_BUTTON_PADDING = value2;
|
||||
exports.LARGE_BUTTON_PADDING = value3;
|
||||
exports.BUTTON_DEFAULT_MAX_FONT_SIZE_MULTIPLIER = 3;
|
||||
exports.getButtonDefaultTextVariant = function(a0) {
|
||||
return a0 !== 'lg' ? 'text-sm/semibold' : 'text-md/semibold';
|
||||
};
|
||||
exports.getButtonPadding = closure;
|
||||
}
|
||||
|
||||
function getButtonPadding(a0, a1) { // fn#38863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4760:280, offset: 0x010ce031, size: 58 bytes, params: 3, frame: 11
|
||||
let value = require(4580) /* metro dependency 4580: Icon */;
|
||||
value = value.getIconSize(a1);
|
||||
return (a0 - value - 2) / 2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
/* Metro module 4593; source: design/components/Button/native/ButtonEllipsis.native.tsx; dependencies: [31, 33, 4017, 4501, 697, 4504, 4583, 4594, 2] */
|
||||
function _fun38927(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4771:6, offset: 0x010d1647, size: 301 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
object2 = {duration: 500};
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const inOut = Easing.inOut;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
object2.easing = Reflect.apply(inOut, Easing, [Easing2.quad]);
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun38932);
|
||||
object2 = {code: "function withEllipsisAnimation_ButtonEllipsisNativeTsx1(offset,value){const{ELLIPSIS_APPEAR_DURATION,withDelay,withRepeat,withTiming,ELLIPSIS_APPEAR_TIMING}=this.__closure;const animationTimeMs=ELLIPSIS_APPEAR_DURATION;const animationStaggerTimeMs=animationTimeMs/3;return withDelay(offset*animationStaggerTimeMs,withRepeat(withTiming(value,ELLIPSIS_APPEAR_TIMING,'animate-always'),-1,true));}"};
|
||||
const env0_8 = _fun38933();
|
||||
object2 = {code: 'function ButtonEllipsisNativeTsx2(){const{opacity,scale}=this.__closure;return{opacity:opacity.get(),transform:[{scale:scale.get()}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/ButtonEllipsis.native.tsx');
|
||||
exports.Ellipsis = Ellipsis;
|
||||
}
|
||||
|
||||
function EllipsisCircle({variant, size, offset}) { // fn#38928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4771:1436, offset: 0x010d1774, size: 293 bytes, params: 2, frame: 22
|
||||
const styles = useStyles(size, offset,
|
||||
(require(4583) /* metro dependency 4583: ButtonHooksNative */).useForegroundColor(variant));
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.4);
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.75);
|
||||
(require(4594) /* metro dependency 4594: useMountEffect */).useMountLayoutEffect(_fun38929);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = EllipsisCircleW;
|
||||
closure.__closure = {opacity: value3, scale: value4};
|
||||
closure.__workletHash = 13371762734705;
|
||||
closure.__initData = env0_9;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return <View style={[styles.circle, value5]} />;
|
||||
}
|
||||
|
||||
function _fun38932(a0, a1, a2) { // fn#38932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4771:221, offset: 0x010d195e, size: 147 bytes, params: 4, frame: 14
|
||||
var r2;
|
||||
var r3;
|
||||
var value;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
if (a0 === 'lg') {
|
||||
value = 8;
|
||||
value5 = 4;
|
||||
r2 = value;
|
||||
r3 = value5;
|
||||
} else if (a0 === 'md') {
|
||||
value = 6;
|
||||
value4 = 4;
|
||||
r2 = value;
|
||||
r3 = value4;
|
||||
} else if (a0 === 'sm') {
|
||||
value = 6;
|
||||
value4 = 4;
|
||||
r2 = value;
|
||||
r3 = value4;
|
||||
} else {
|
||||
value = 4;
|
||||
if (a0 !== 'xs') {
|
||||
r2 = undefined;
|
||||
r3 = value;
|
||||
} else {
|
||||
value = 5;
|
||||
value3 = 3;
|
||||
r2 = value;
|
||||
r3 = value3;
|
||||
}
|
||||
}
|
||||
const object = {width: r2, height: r2};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object.marginEnd = a1 === 2 ? 0 : r3;
|
||||
object.backgroundColor = a2;
|
||||
return {circle: object};
|
||||
}
|
||||
|
||||
function _fun38933() { // fn#38933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4771:830, offset: 0x010d19f1, size: 144 bytes, params: 1, frame: 16
|
||||
const closure = withEllipsisAnimation;
|
||||
const object2 = {ELLIPSIS_APPEAR_DURATION: 500};
|
||||
object2.withDelay = (require(4017) /* metro dependency 4017: ReanimatedRexport */).withDelay;
|
||||
object2.withRepeat = (require(4017) /* metro dependency 4017: ReanimatedRexport */).withRepeat;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.ELLIPSIS_APPEAR_TIMING = env0_5;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 2181731162311;
|
||||
closure.__initData = env0_7;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function Ellipsis(a0) { // fn#38935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4771:2036, offset: 0x010d1afc, size: 171 bytes, params: 2, frame: 21
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View style={{flexDirection: 'row'}}>
|
||||
<EllipsisCircle offset={0} {...a0} />
|
||||
<EllipsisCircle offset={1} {...a0} />
|
||||
<EllipsisCircle offset={2} {...a0} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun38929() { // fn#38929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4771:1625, offset: 0x010d1899, size: 72 bytes, params: 1, frame: 17
|
||||
const binding = env0_1;
|
||||
const set = binding.set;
|
||||
const binding2 = env1_8;
|
||||
const offsetBinding = offset;
|
||||
Reflect.apply(set, binding, [binding2(offsetBinding, 1)]);
|
||||
env0_2.set(env1_8(offsetBinding, 1));
|
||||
return _fun38930;
|
||||
}
|
||||
|
||||
function EllipsisCircleW() { // fn#38931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4771:1758, owner: EllipsisCircle.w, offset: 0x010d1926, size: 56 bytes, params: 1, frame: 11
|
||||
const object3 = {};
|
||||
object3.opacity = env0_1.get();
|
||||
const object4 = {};
|
||||
object4.scale = env0_2.get();
|
||||
object3.transform = [object4];
|
||||
return object3;
|
||||
}
|
||||
|
||||
function withEllipsisAnimation(a0, a1) { // fn#38934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4771:867, offset: 0x010d1a81, size: 123 bytes, params: 3, frame: 20
|
||||
const value = environment.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withDelay = reanimatedRexportModule.withDelay;
|
||||
const value2 = 166.66666666666666 * a0;
|
||||
const moduleValue2 = reanimatedRexportModule;
|
||||
return Reflect.apply(withDelay, reanimatedRexportModule, [value2,
|
||||
moduleValue2.withRepeat((require(4504) /* metro dependency 4504: timing */).withTiming(a1, env1_5,
|
||||
'animate-always'), -1, true)]);
|
||||
}
|
||||
|
||||
function _fun38930() { // fn#38930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4771:1658, offset: 0x010d18e1, size: 69 bytes, params: 1, frame: 16
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_1);
|
||||
(require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,461 @@
|
||||
/* Metro module 4583; source: design/components/Button/native/ButtonHooks.native.tsx; dependencies: [31, 4501, 3868, 697, 4002, 3860, 4017, 4577, 4581, 4582, 4584, 4580, 4573, 477, 2] */
|
||||
function _fun38865(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:6, offset: 0x010ce082, size: 754 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = useProfileThemedButtonStyles;
|
||||
const closure2 = useForegroundColor;
|
||||
const closure3 = useButtonTextColorStyles;
|
||||
const closure4 = useButtonScaleStyles;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(function() {
|
||||
return '#161CBB';
|
||||
});
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(function() {
|
||||
return '#1318A0';
|
||||
});
|
||||
object2 = {};
|
||||
const CONTROL_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_PRIMARY_TEXT_DEFAULT;
|
||||
object2.primary = CONTROL_PRIMARY_TEXT_DEFAULT;
|
||||
let WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
object2['experimental_welcome-secondary'] = WHITE;
|
||||
const CONTROL_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_TEXT_DEFAULT;
|
||||
object2.secondary = CONTROL_SECONDARY_TEXT_DEFAULT;
|
||||
const REDESIGN_BUTTON_TERTIARY_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_TEXT;
|
||||
object2.tertiary = REDESIGN_BUTTON_TERTIARY_TEXT;
|
||||
let CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT;
|
||||
object2.destructive = CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT;
|
||||
CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT;
|
||||
object2['critical-primary'] = CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT;
|
||||
const CONTROL_CRITICAL_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_SECONDARY_TEXT_DEFAULT;
|
||||
object2['critical-secondary'] = CONTROL_CRITICAL_SECONDARY_TEXT_DEFAULT;
|
||||
const CONTROL_CONNECTED_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CONNECTED_TEXT_DEFAULT;
|
||||
object2.active = CONTROL_CONNECTED_TEXT_DEFAULT;
|
||||
const CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
|
||||
object2['primary-overlay'] = CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
|
||||
const CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
|
||||
object2['secondary-overlay'] = CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2['experimental_premium-primary'] = WHITE;
|
||||
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
|
||||
object2['experimental_premium-secondary'] = TEXT_BRAND;
|
||||
const CONTROL_ICON_ONLY_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_ICON_ONLY_ICON_DEFAULT;
|
||||
object2['icon-only'] = CONTROL_ICON_ONLY_ICON_DEFAULT;
|
||||
const CONTROL_EXPRESSIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_EXPRESSIVE_TEXT_DEFAULT;
|
||||
object2.expressive = CONTROL_EXPRESSIVE_TEXT_DEFAULT;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
value = value.createStyleProperties(_fun38874);
|
||||
object2 = {code: 'function ButtonHooksNativeTsx1(){const{themedStyles,colors,interpolateColor,pressed}=this.__closure;var _themedStyles$backgro,_themedStyles,_themedStyles$borderC,_themedStyles2;const backgroundColor=(_themedStyles$backgro=(_themedStyles=themedStyles)===null||_themedStyles===void 0?void 0:_themedStyles.backgroundColor)!==null&&_themedStyles$backgro!==void 0?_themedStyles$backgro:[colors.backgroundInactive,colors.backgroundPressed];const borderColor=(_themedStyles$borderC=(_themedStyles2=themedStyles)===null||_themedStyles2===void 0?void 0:_themedStyles2.borderColor)!==null&&_themedStyles$borderC!==void 0?_themedStyles$borderC:[colors.borderInactive,colors.borderPressed];return{backgroundColor:interpolateColor(pressed.get(),[0,1],backgroundColor),borderColor:interpolateColor(pressed.get(),[0,1],borderColor)};}'};
|
||||
object2 = {code: "function ButtonHooksNativeTsx2(){const{width,scaleAmountInPx,withSpring,interpolate,pressed,ON_PRESS_SPRING}=this.__closure;const scale=width.get()>0?(width.get()-scaleAmountInPx)/width.get():1;return{transform:[{scale:withSpring(interpolate(pressed.get(),[0,1],[1,scale]),ON_PRESS_SPRING,'animate-always')}]};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/ButtonHooks.native.tsx');
|
||||
exports.SAFE_TRANSPARENT_COLOR = 'rgba(0,0,0,0.001)';
|
||||
exports.useProfileThemedButtonStyles = closure;
|
||||
exports.useForegroundColor = closure2;
|
||||
exports.useButtonColorStyles = value;
|
||||
exports.useButtonTextColorStyles = closure3;
|
||||
exports.useIconTintStyles = function(a0) {
|
||||
var object = {};
|
||||
object.tintColor = useButtonTextColorStyles(a0).color;
|
||||
return object;
|
||||
};
|
||||
exports.useGradientPillStyles = useGradientPillStyles;
|
||||
exports.useButtonPillStyles = useButtonPillStyles;
|
||||
exports.useButtonScaleStyles = closure4;
|
||||
exports.useButtonPressAnimationProps = useButtonPressAnimationProps;
|
||||
exports.useIconSizeStyles = useIconSizeStyles;
|
||||
}
|
||||
|
||||
function useProfileThemedButtonStyles(a0) { // fn#38866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:232, offset: 0x010ce374, size: 102 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
const {primaryColor, theme} = (require(3868) /* metro dependency 3868: native */).useThemeContext();
|
||||
return env0_3.useMemo(_fun38867, [theme, primaryColor, a0]);
|
||||
}
|
||||
|
||||
function useForegroundColor(a0) { // fn#38868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:2051, offset: 0x010ce6bb, size: 49 bytes, params: 2, frame: 12
|
||||
return (require(3860) /* metro dependency 3860: useToken */).useToken(env0_7[a0]);
|
||||
}
|
||||
|
||||
function useButtonTextColorStyles(a0) { // fn#38869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:4922, offset: 0x010ce6ec, size: 55 bytes, params: 2, frame: 14
|
||||
const value2 = undefined;
|
||||
const value3 = useProfileThemedButtonStyles(a0);
|
||||
return {color: (value3 == null ? value2 : value3.color) ?? useForegroundColor(a0)};
|
||||
}
|
||||
|
||||
function useButtonScaleStyles(a0, a1, a2) { // fn#38870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:6236, offset: 0x010ce723, size: 178 bytes, params: 4, frame: 20
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = useButtonScaleStylesN;
|
||||
const object2 = {width: a1, scaleAmountInPx: a2};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
object2.pressed = a0;
|
||||
const ON_PRESS_SPRING = (require(4581) /* metro dependency 4581: springPresets */).ON_PRESS_SPRING;
|
||||
object2.ON_PRESS_SPRING = ON_PRESS_SPRING;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 17256006845494;
|
||||
closure.__initData = env0_10;
|
||||
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
}
|
||||
|
||||
function _fun38874(a0) { // fn#38874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:2157, offset: 0x010ce8b5, size: 1269 bytes, params: 2, frame: 15
|
||||
var object2;
|
||||
var colors;
|
||||
if (a0 === 'primary') {
|
||||
object2 = {};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundInactive = colors.CONTROL_PRIMARY_BACKGROUND_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundPressed = colors.CONTROL_PRIMARY_BACKGROUND_ACTIVE;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.borderInactive = colors.CONTROL_PRIMARY_BORDER_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.borderPressed = colors.CONTROL_PRIMARY_BORDER_ACTIVE;
|
||||
return object2;
|
||||
}
|
||||
if (a0 === 'secondary') {
|
||||
object2 = {};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundInactive = colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundPressed = colors.CONTROL_SECONDARY_BACKGROUND_ACTIVE;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.borderInactive = colors.CONTROL_SECONDARY_BORDER_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.borderPressed = colors.CONTROL_SECONDARY_BORDER_ACTIVE;
|
||||
return object2;
|
||||
}
|
||||
if (a0 === 'tertiary') {
|
||||
object2 = {};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundInactive = colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundPressed = colors.REDESIGN_BUTTON_TERTIARY_PRESSED_BACKGROUND;
|
||||
object2.borderInactive = env0_4;
|
||||
object2.borderPressed = env0_4;
|
||||
return object2;
|
||||
}
|
||||
if (a0 === 'critical-primary') {
|
||||
object2 = {};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundInactive = colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundPressed = colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_ACTIVE;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.borderInactive = colors.CONTROL_CRITICAL_PRIMARY_BORDER_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.borderPressed = colors.CONTROL_CRITICAL_PRIMARY_BORDER_ACTIVE;
|
||||
return object2;
|
||||
}
|
||||
if (a0 === 'destructive') {
|
||||
object2 = {};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundInactive = colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundPressed = colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_ACTIVE;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.borderInactive = colors.CONTROL_CRITICAL_PRIMARY_BORDER_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.borderPressed = colors.CONTROL_CRITICAL_PRIMARY_BORDER_ACTIVE;
|
||||
return object2;
|
||||
}
|
||||
if (a0 === 'critical-secondary') {
|
||||
object2 = {};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundInactive = colors.CONTROL_CRITICAL_SECONDARY_BACKGROUND_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundPressed = colors.CONTROL_CRITICAL_SECONDARY_BACKGROUND_ACTIVE;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.borderInactive = colors.CONTROL_CRITICAL_SECONDARY_BORDER_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.borderPressed = colors.CONTROL_CRITICAL_SECONDARY_BORDER_ACTIVE;
|
||||
return object2;
|
||||
}
|
||||
if (a0 === 'active') {
|
||||
object2 = {};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundInactive = colors.CONTROL_CONNECTED_BACKGROUND_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundPressed = colors.CONTROL_CONNECTED_BACKGROUND_ACTIVE;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.borderInactive = colors.CONTROL_CONNECTED_BORDER_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.borderPressed = colors.CONTROL_CONNECTED_BORDER_ACTIVE;
|
||||
return object2;
|
||||
}
|
||||
if (a0 === 'experimental_premium-secondary') {
|
||||
object2 = {};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundInactive = colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundPressed = colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_ACTIVE;
|
||||
object2.borderInactive = env0_4;
|
||||
object2.borderPressed = env0_4;
|
||||
return object2;
|
||||
}
|
||||
if (a0 === 'primary-overlay') {
|
||||
object2 = {};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundInactive = colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundPressed = colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_ACTIVE;
|
||||
object2.borderInactive = env0_4;
|
||||
object2.borderPressed = env0_4;
|
||||
return object2;
|
||||
}
|
||||
if (a0 === 'secondary-overlay') {
|
||||
object2 = {};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundInactive = colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.backgroundPressed = colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE;
|
||||
object2.borderInactive = env0_4;
|
||||
object2.borderPressed = env0_4;
|
||||
return object2;
|
||||
}
|
||||
if (a0 === 'experimental_welcome-secondary') {
|
||||
return {backgroundInactive: env0_5, backgroundPressed: env0_6, borderInactive: env0_4, borderPressed: env0_4};
|
||||
}
|
||||
if (a0 === 'experimental_premium-primary') {
|
||||
object2 = {};
|
||||
object2.backgroundInactive = env0_4;
|
||||
object2.backgroundPressed = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_PREMIUM_PRIMARY_PRESSED_BACKGROUND;
|
||||
object2.borderInactive = env0_4;
|
||||
object2.borderPressed = env0_4;
|
||||
return object2;
|
||||
}
|
||||
if (a0 === 'icon-only') {
|
||||
object2 = {};
|
||||
object2.backgroundInactive = env0_4;
|
||||
object2.backgroundPressed = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_ICON_ONLY_BACKGROUND_ACTIVE;
|
||||
object2.borderInactive = env0_4;
|
||||
object2.borderPressed = env0_4;
|
||||
return object2;
|
||||
}
|
||||
if (a0 === 'expressive') {
|
||||
return {backgroundInactive: env0_4, backgroundPressed: env0_4, borderInactive: env0_4, borderPressed: env0_4};
|
||||
}
|
||||
}
|
||||
|
||||
function useGradientPillStyles(a0) { // fn#38876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:7115, offset: 0x010cedc9, size: 32 bytes, params: 2, frame: 12
|
||||
const object2 = {};
|
||||
object2.borderColor = env0_8(a0).borderInactive;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useButtonPillStyles(a0, a1) { // fn#38877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:7212, offset: 0x010cede9, size: 151 bytes, params: 3, frame: 20
|
||||
const env0_0 = a1;
|
||||
const value2 = useProfileThemedButtonStyles(a0);
|
||||
const value3 = env0_8(a0);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = useButtonPillStylesS;
|
||||
const object2 = {themedStyles: value2, colors: value3};
|
||||
object2.interpolateColor = reanimatedRexportModule.interpolateColor;
|
||||
object2.pressed = a1;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 2383933325137;
|
||||
closure.__initData = env0_9;
|
||||
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
}
|
||||
|
||||
function useButtonPressAnimationProps(a0) { // fn#38879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:7851, offset: 0x010cef6b, size: 257 bytes, params: 2, frame: 24
|
||||
let value = a0;
|
||||
const value2 = a1;
|
||||
const r5 = value2 !== undefined ? value2 : 8;
|
||||
const env0_0 = a2;
|
||||
const env0_1 = a3;
|
||||
const env0_2 = a4;
|
||||
const r3 = value ?? (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const env0_3 = r3;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value = value.useSharedValue(0);
|
||||
const object2 = {};
|
||||
object2.onPressIn = env0_3.useCallback(_fun38880, [r3, a3]);
|
||||
object2.onPressOut = env0_3.useCallback(_fun38881, [r3, a4]);
|
||||
object2.onLayout = env0_3.useCallback(_fun38882, [value, a2]);
|
||||
object2.style = useButtonScaleStyles(r3, value, r5);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useIconSizeStyles(a0) { // fn#38883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:8247, offset: 0x010cf109, size: 147 bytes, params: 2, frame: 18
|
||||
const value = a1;
|
||||
const value2 = a2;
|
||||
const env0_0 = a0;
|
||||
const r6 = value !== undefined ? value : false;
|
||||
const r5 = value2 !== undefined ? value2 : (require(4582) /* metro dependency 4582: ButtonConstantsNative */).BUTTON_DEFAULT_MAX_FONT_SIZE_MULTIPLIER;
|
||||
const value3 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
|
||||
return value3.useMemo(_fun38884, [a0, r6, r5, value3]);
|
||||
}
|
||||
|
||||
function _fun38867() { // fn#38867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:350, offset: 0x010ce3da, size: 737 bytes, params: 1, frame: 21
|
||||
var r10;
|
||||
var r6;
|
||||
var value2;
|
||||
var isThemeLight2;
|
||||
var moduleValue2;
|
||||
var setColorOpacity;
|
||||
var object2;
|
||||
var items2;
|
||||
var moduleValue4;
|
||||
var value5;
|
||||
var isThemeLight3;
|
||||
var moduleValue6;
|
||||
var items3;
|
||||
var moduleValue8;
|
||||
var value8;
|
||||
var WHITE;
|
||||
var moduleValue9;
|
||||
var getContrastingColor;
|
||||
var value9;
|
||||
var value;
|
||||
let primaryColorBinding = primaryColor;
|
||||
if (primaryColorBinding != null) {
|
||||
var binding = env0_0;
|
||||
if (binding === 'primary') {
|
||||
value8 = environment.__proto__;
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
moduleValue9 = require(3868) /* metro dependency 3868: native */;
|
||||
getContrastingColor = moduleValue9.getContrastingColor;
|
||||
primaryColorBinding = primaryColor;
|
||||
object2 = {base: WHITE};
|
||||
object2.contrastRatio = (require(3868) /* metro dependency 3868: native */).WCAGContrastRatios.HighContrastText;
|
||||
value = Reflect.apply(getContrastingColor, moduleValue9, [primaryColorBinding, object2]);
|
||||
value9 = (require(3868) /* metro dependency 3868: native */).darkenColor(value, 0.5);
|
||||
return {backgroundColor: [value, value9], borderColor: [value, value9], color: WHITE};
|
||||
}
|
||||
if (binding === 'secondary') {
|
||||
value5 = environment.__proto__;
|
||||
isThemeLight3 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme);
|
||||
moduleValue6 = require(3868) /* metro dependency 3868: native */;
|
||||
setColorOpacity = moduleValue6.setColorOpacity;
|
||||
r6 = isThemeLight3 ? Reflect.apply(setColorOpacity, moduleValue6, ['white',
|
||||
0.72]) : Reflect.apply(setColorOpacity,
|
||||
moduleValue6, ['white', 0.24]);
|
||||
items3 = [r6];
|
||||
value = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme);
|
||||
moduleValue8 = require(3868) /* metro dependency 3868: native */;
|
||||
setColorOpacity = moduleValue8.setColorOpacity;
|
||||
r6 = value ? Reflect.apply(setColorOpacity, moduleValue8, ['white', 0.62]) : Reflect.apply(setColorOpacity,
|
||||
moduleValue8, ['white', 0.34]);
|
||||
items3[1] = r6;
|
||||
return {backgroundColor: items3, borderColor: [env1_4, env1_4], color: undefined};
|
||||
}
|
||||
if (binding === 'tertiary') {
|
||||
value2 = environment.__proto__;
|
||||
isThemeLight2 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme);
|
||||
moduleValue2 = require(3868) /* metro dependency 3868: native */;
|
||||
setColorOpacity = moduleValue2.setColorOpacity;
|
||||
r10 = isThemeLight2 ? Reflect.apply(setColorOpacity, moduleValue2, [primaryColor,
|
||||
0.4]) : Reflect.apply(setColorOpacity, moduleValue2, ['white', 0.1]);
|
||||
items2 = [r10];
|
||||
value = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme);
|
||||
moduleValue4 = require(3868) /* metro dependency 3868: native */;
|
||||
items2[1] = value ? moduleValue4.darkenColor(r10, 0.3) : moduleValue4.setColorOpacity('white', 0.2);
|
||||
return {backgroundColor: items2, borderColor: [env1_4, env1_4], color: undefined};
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function useButtonScaleStylesN() { // fn#38871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:6309, owner: useButtonScaleStyles.n, offset: 0x010ce7d5, size: 208 bytes, params: 1, frame: 22
|
||||
const r1 = require.get() > 0 ? (require.get() - importDefault) / require.get() : 1;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = reanimatedRexportModule.interpolate;
|
||||
let value = env0_0.get();
|
||||
value = Reflect.apply(interpolate, reanimatedRexportModule, [value, [0, 1], [1, r1]]);
|
||||
const ON_PRESS_SPRING = (require(4581) /* metro dependency 4581: springPresets */).ON_PRESS_SPRING;
|
||||
return {transform: [{scale: Reflect.apply(withSpring, springModule, [value, ON_PRESS_SPRING, 'animate-always'])}]};
|
||||
}
|
||||
|
||||
function useButtonPillStylesS() { // fn#38878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:7329, owner: useButtonPillStyles.s, offset: 0x010cee80, size: 235 bytes, params: 1, frame: 22
|
||||
const value2 = undefined;
|
||||
const r11 = (env0_1 == null ? value2 : env0_1.backgroundColor) ?? [env0_2.backgroundInactive,
|
||||
env0_2.backgroundPressed];
|
||||
const r5 = (env0_1 == null ? value2 : env0_1.borderColor) ?? [env0_2.borderInactive, env0_2.borderPressed];
|
||||
const object2 = {};
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
object2.backgroundColor = reanimatedRexportModule.interpolateColor(require.get(), [0, 1], r11);
|
||||
const value = reanimatedRexportModule;
|
||||
object2.borderColor = value.interpolateColor(require.get(), [0, 1], r5);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun38880(a0) { // fn#38880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:8008, offset: 0x010cf06c, size: 48 bytes, params: 2, frame: 12
|
||||
env0_3.set(1);
|
||||
if (importAll != null) {
|
||||
importAll(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun38881(a0) { // fn#38881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:8070, offset: 0x010cf09c, size: 47 bytes, params: 2, frame: 12
|
||||
env0_3.set(0);
|
||||
if (env0_2 != null) {
|
||||
env0_2(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun38882(a0) { // fn#38882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:8130, offset: 0x010cf0cb, size: 62 bytes, params: 2, frame: 13
|
||||
const binding = env0_4;
|
||||
binding.set(a0.nativeEvent.layout.width);
|
||||
if (importDefault != null) {
|
||||
importDefault(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun38884() { // fn#38884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:8356, offset: 0x010cf19c, size: 364 bytes, params: 1, frame: 19
|
||||
var r4;
|
||||
var r5;
|
||||
var r1;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
var TextStyleSheet;
|
||||
var property;
|
||||
var Math;
|
||||
let value = environment.__proto__;
|
||||
const iconModule = require(4580) /* metro dependency 4580: Icon */;
|
||||
const getIconSize = iconModule.getIconSize;
|
||||
const MEDIUM_BUTTON_ICON_SIZE = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_ICON_SIZE;
|
||||
const value2 = Reflect.apply(getIconSize, iconModule, [MEDIUM_BUTTON_ICON_SIZE]);
|
||||
const binding = env0_0;
|
||||
if (binding === 'sm') {
|
||||
moduleValue3 = iconModule;
|
||||
r4 = moduleValue3.getIconSize((require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_ICON_SIZE);
|
||||
} else if (binding !== 'lg') {
|
||||
r4 = value2;
|
||||
} else {
|
||||
moduleValue2 = require(4580) /* metro dependency 4580: Icon */;
|
||||
r4 = moduleValue2.getIconSize((require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_ICON_SIZE);
|
||||
}
|
||||
if (env0_1) {
|
||||
if (env0_3 > 1) {
|
||||
TextStyleSheet = (require(4573) /* metro dependency 4573: Text */).TextStyleSheet;
|
||||
value = require(4582) /* metro dependency 4582: ButtonConstantsNative */;
|
||||
property = TextStyleSheet[value.getButtonDefaultTextVariant(env0_0)];
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
r5 = value.isAndroid() ? property.fontSize : property.lineHeight;
|
||||
if (r4 == null) {
|
||||
r1 = r4;
|
||||
} else if (r5 == null) {
|
||||
r1 = r4;
|
||||
} else {
|
||||
Math = global.Math;
|
||||
value = Math.min(env0_3, env0_2);
|
||||
Math = global.Math;
|
||||
value = Math.max(r4, r5 * value);
|
||||
r1 = value;
|
||||
}
|
||||
} else {
|
||||
r1 = r4;
|
||||
}
|
||||
} else {
|
||||
r1 = r4;
|
||||
}
|
||||
return {width: r1, height: r1};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,314 @@
|
||||
/* Metro module 4587; source: design/components/Button/native/ButtonPill.native.tsx; dependencies: [57, 31, 27, 33, 4582, 4501, 697, 4583, 3868, 3860, 4588, 4589, 4017, 4002, 4593, 3875, 4577, 4581, 2] */
|
||||
function _fun38896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4765:6, offset: 0x010cfaf2, size: 505 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const closure = BasicButtonPill;
|
||||
const closure2 = LoadingButtonPill;
|
||||
const closure3 = useLoadingStyles;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = value.StyleSheet;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
const env0_9 = value.Fragment;
|
||||
value = require(4582) /* metro dependency 4582: ButtonConstantsNative */;
|
||||
let getButtonPadding = value.getButtonPadding;
|
||||
const SMALL_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT;
|
||||
const SMALL_BUTTON_ICON_SIZE = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_ICON_SIZE;
|
||||
const env0_11 = Reflect.apply(getButtonPadding, value, [SMALL_BUTTON_HEIGHT, SMALL_BUTTON_ICON_SIZE]);
|
||||
value = require(4582) /* metro dependency 4582: ButtonConstantsNative */;
|
||||
getButtonPadding = value.getButtonPadding;
|
||||
const MEDIUM_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_HEIGHT;
|
||||
const MEDIUM_BUTTON_ICON_SIZE = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_ICON_SIZE;
|
||||
const env0_12 = Reflect.apply(getButtonPadding, value, [MEDIUM_BUTTON_HEIGHT, MEDIUM_BUTTON_ICON_SIZE]);
|
||||
value = require(4582) /* metro dependency 4582: ButtonConstantsNative */;
|
||||
getButtonPadding = value.getButtonPadding;
|
||||
const LARGE_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_HEIGHT;
|
||||
const LARGE_BUTTON_ICON_SIZE = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_ICON_SIZE;
|
||||
const env0_13 = Reflect.apply(getButtonPadding, value, [LARGE_BUTTON_HEIGHT, LARGE_BUTTON_ICON_SIZE]);
|
||||
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun38905);
|
||||
object = {code: "function ButtonPillNativeTsx1(){const{withSpring,loading,SUBTLE_SPRING,useReducedMotion,withDelay,FADE_DELAY,offsetY}=this.__closure;const opacityTransition=withSpring(loading?0:1,SUBTLE_SPRING,'animate-always');if(useReducedMotion){return{opacity:loading?opacityTransition:withDelay(FADE_DELAY,opacityTransition),transform:[{translateY:0}]};}return{opacity:opacityTransition,transform:[{translateY:withSpring(loading?-1*offsetY:0,SUBTLE_SPRING)}]};}"};
|
||||
object = {code: "function ButtonPillNativeTsx2(){const{withSpring,loading,SUBTLE_SPRING,useReducedMotion,withDelay,FADE_DELAY,offsetY}=this.__closure;const opacityTransition=withSpring(loading?1:0,SUBTLE_SPRING,'animate-always');if(useReducedMotion){return{opacity:loading?withDelay(FADE_DELAY,opacityTransition):opacityTransition,transform:[{translateY:0}]};}return{opacity:opacityTransition,transform:[{translateY:withSpring(loading?0:offsetY,SUBTLE_SPRING)}]};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/ButtonPill.native.tsx');
|
||||
exports.ButtonPill = ButtonPill;
|
||||
exports.BasicButtonPill = closure;
|
||||
exports.LoadingButtonPill = closure2;
|
||||
exports.useLoadingStyles = closure3;
|
||||
}
|
||||
|
||||
function PillWrapper({children, variant, style, pressed, shiny, expressiveRiveRef, expressivePressState, size}) { // fn#38897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4765:1609, offset: 0x010cfceb, size: 847 bytes, params: 2, frame: 33
|
||||
var r5;
|
||||
var object2;
|
||||
var value7;
|
||||
var object4;
|
||||
var expressivePill;
|
||||
var ExpressiveButtonRive;
|
||||
var object6;
|
||||
var items2;
|
||||
shiny = !(shiny === undefined) && shiny;
|
||||
const value2 = require(dependencyMap[7]).useButtonPillStyles(variant, pressed);
|
||||
const value3 = require(dependencyMap[7]).useGradientPillStyles(variant);
|
||||
const moduleValue3 = require(dependencyMap[8]);
|
||||
const useThemeContext = moduleValue3.useThemeContext;
|
||||
const theme = Reflect.apply(useThemeContext, moduleValue3, []).theme;
|
||||
const styles = useStyles(variant, size);
|
||||
const moduleValue4 = require(dependencyMap[9]);
|
||||
let useToken = moduleValue4.useToken;
|
||||
const REDESIGN_BUTTON_PREMIUM_PRIMARY_PURPLE_FOR_GRADIENT = importDefault(dependencyMap[6]).colors.REDESIGN_BUTTON_PREMIUM_PRIMARY_PURPLE_FOR_GRADIENT;
|
||||
let items = [Reflect.apply(useToken, moduleValue4, [REDESIGN_BUTTON_PREMIUM_PRIMARY_PURPLE_FOR_GRADIENT])];
|
||||
const moduleValue5 = require(dependencyMap[9]);
|
||||
useToken = moduleValue5.useToken;
|
||||
const REDESIGN_BUTTON_PREMIUM_PRIMARY_PURPLE_FOR_GRADIENT_2 = importDefault(dependencyMap[6]).colors.REDESIGN_BUTTON_PREMIUM_PRIMARY_PURPLE_FOR_GRADIENT_2;
|
||||
items[1] = Reflect.apply(useToken, moduleValue5, [REDESIGN_BUTTON_PREMIUM_PRIMARY_PURPLE_FOR_GRADIENT_2]);
|
||||
const moduleValue6 = require(dependencyMap[9]);
|
||||
useToken = moduleValue6.useToken;
|
||||
const REDESIGN_BUTTON_PREMIUM_PRIMARY_PINK_FOR_GRADIENT = importDefault(dependencyMap[6]).colors.REDESIGN_BUTTON_PREMIUM_PRIMARY_PINK_FOR_GRADIENT;
|
||||
items[2] = Reflect.apply(useToken, moduleValue6, [REDESIGN_BUTTON_PREMIUM_PRIMARY_PINK_FOR_GRADIENT]);
|
||||
const r10 = shiny ? ((ButtonShine) => <ButtonShine variant={variant} />)(require(dependencyMap[10]).ButtonShine) : null;
|
||||
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
if (variant === 'experimental_premium-primary') {
|
||||
items = [((Component) => <Component start={{'x': 0, 'y': 0}} end={{'x': 1, 'y': 0}} style={[style, value3,
|
||||
StyleSheet.absoluteFill]} colors={items} />)(importDefault(dependencyMap[11]))];
|
||||
items[1] = ((View) => <View style={[style,
|
||||
value2]}>{children}{r10}</View>)(importDefault(dependencyMap[12]).View);
|
||||
object2 = {children: items};
|
||||
} else {
|
||||
value7 = variant === 'expressive';
|
||||
if (value7) {
|
||||
object4 = {};
|
||||
expressivePill = styles.expressivePill;
|
||||
object4.style = [StyleSheet.absoluteFill, expressivePill];
|
||||
ExpressiveButtonRive = require(dependencyMap[8]).ExpressiveButtonRive;
|
||||
var expressiveButtonRiveProps2 = {'withReducedMotion': 'short-loop', 'ref': null, 'fit': 'layout',
|
||||
ref: expressiveRiveRef,
|
||||
artboard: require(dependencyMap[13]).isThemeLight(theme) ? 'Mobile Expressive Button Lightmode' : 'Mobile Expressive Button Dark Mode'};
|
||||
object6 = {};
|
||||
object6.buttonColor = styles.expressiveRiveFill.color;
|
||||
expressivePill = styles.expressivePill;
|
||||
object6.cornerRadius = expressivePill.borderRadius;
|
||||
copyDataProperties(object6, expressivePressState, dependencyMap);
|
||||
expressiveButtonRiveProps2.dataBinding = object6;
|
||||
r5 = <View {...object4}><ExpressiveButtonRive {...expressiveButtonRiveProps2} /></View>;
|
||||
} else {
|
||||
r5 = value7;
|
||||
}
|
||||
items2 = [r5];
|
||||
items2[1] = ((View) => <View style={[style,
|
||||
value2]}>{children}{r10}</View>)(importDefault(dependencyMap[12]).View);
|
||||
object2 = {children: items2};
|
||||
}
|
||||
return ((Fragment) => <Fragment {...object2} />)(jsxRuntimeEnv0_9Binding);
|
||||
}
|
||||
|
||||
function BasicButtonPill({children, style, pressed, variant, size = require(dependencyMap[4]).DEFAULT_BUTTON_SIZE, shiny, expressiveRiveRef, expressivePressState}) { // fn#38898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4765:2766, offset: 0x010d003a, size: 211 bytes, params: 2, frame: 23
|
||||
variant = variant === undefined ? 'primary' : variant;
|
||||
shiny = !(shiny === undefined) && shiny;
|
||||
const styles = useStyles(variant, size);
|
||||
return (
|
||||
<PillWrapper
|
||||
variant={variant}
|
||||
size={size}
|
||||
style={[styles.pill, style]}
|
||||
pressed={pressed}
|
||||
shiny={shiny}
|
||||
expressiveRiveRef={expressiveRiveRef}
|
||||
expressivePressState={expressivePressState}
|
||||
>
|
||||
<View style={styles.childContainer}>
|
||||
{children}
|
||||
</View>
|
||||
</PillWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
function LoadingButtonPill({children, style, pressed, variant, size = require(dependencyMap[4]).DEFAULT_BUTTON_SIZE, loading, loaderSize, expressiveRiveRef, expressivePressState}) { // fn#38899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4765:3114, offset: 0x010d010d, size: 499 bytes, params: 2, frame: 31
|
||||
var r8;
|
||||
var Ellipsis;
|
||||
variant = variant === undefined ? 'primary' : variant;
|
||||
loading = !(loading === undefined) && loading;
|
||||
const styles = useStyles(variant, size);
|
||||
const env0_1 = env0_4.useRef(null);
|
||||
const [property, env0_2] = env0_3(env0_4.useState(loading), 2);
|
||||
env0_4.useEffect(_fun38900, [loading]);
|
||||
const value5 = env0_3(useLoadingStyles(loading, size), 2);
|
||||
const property2 = value5[0];
|
||||
const property3 = value5[1];
|
||||
const pillWrapperBindingProps = {variant: variant, size: size, style: [styles.pill, style], pressed: pressed,
|
||||
expressiveRiveRef: expressiveRiveRef, expressivePressState: expressivePressState};
|
||||
let View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const view = <View style={[styles.childContainer, property2]}>{children}</View>;
|
||||
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items4 = [styles.ellipsis, property3];
|
||||
if (property) {
|
||||
Ellipsis = (require(4593) /* metro dependency 4593: ButtonEllipsisNative */).Ellipsis;
|
||||
size = loaderSize ?? size;
|
||||
r8 = <Ellipsis variant={variant} size={size} />;
|
||||
} else {
|
||||
r8 = property;
|
||||
}
|
||||
return (
|
||||
<PillWrapper {...pillWrapperBindingProps}>
|
||||
{view}
|
||||
<View style={items4}>
|
||||
{r8}
|
||||
</View>
|
||||
</PillWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
function useLoadingStyles(a0, a1) { // fn#38902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4765:4737, offset: 0x010d037d, size: 404 bytes, params: 3, frame: 24
|
||||
const env0_0 = a0;
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
|
||||
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
|
||||
const value2 = 12;
|
||||
const r6 = a1 !== 'lg' ? value2 : 18;
|
||||
const moduleValue = require(dependencyMap[value2]);
|
||||
let useAnimatedStyle = moduleValue.useAnimatedStyle;
|
||||
let closure = useLoadingStylesO;
|
||||
let object = {};
|
||||
const withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object.withSpring = withSpring;
|
||||
object.loading = a0;
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
object.SUBTLE_SPRING = SUBTLE_SPRING;
|
||||
object.useReducedMotion = enabled;
|
||||
object.withDelay = require(dependencyMap[value2]).withDelay;
|
||||
object.FADE_DELAY = env0_10;
|
||||
object.offsetY = r6;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 9388603334085;
|
||||
closure.__initData = env0_15;
|
||||
object = [Reflect.apply(useAnimatedStyle, moduleValue, [closure])];
|
||||
const moduleValue2 = require(dependencyMap[value2]);
|
||||
useAnimatedStyle = moduleValue2.useAnimatedStyle;
|
||||
closure = useLoadingStylesL;
|
||||
const object3 = {};
|
||||
object3.withSpring = withSpring;
|
||||
object3.loading = a0;
|
||||
object3.SUBTLE_SPRING = SUBTLE_SPRING;
|
||||
object3.useReducedMotion = enabled;
|
||||
object3.withDelay = require(dependencyMap[value2]).withDelay;
|
||||
object3.FADE_DELAY = env0_10;
|
||||
object3.offsetY = r6;
|
||||
closure.__closure = object3;
|
||||
closure.__workletHash = 8255420825872;
|
||||
closure.__initData = env0_16;
|
||||
object[1] = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
|
||||
return object;
|
||||
}
|
||||
|
||||
function _fun38905(a0, a1) { // fn#38905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4765:483, offset: 0x010d0725, size: 574 bytes, params: 3, frame: 19
|
||||
var r7;
|
||||
const LARGE_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_HEIGHT;
|
||||
const MEDIUM_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_HEIGHT;
|
||||
const SMALL_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT;
|
||||
let object3 = {};
|
||||
if (a1 === 'sm') {
|
||||
object3 = {};
|
||||
object3.minHeight = SMALL_BUTTON_HEIGHT;
|
||||
object3.minWidth = SMALL_BUTTON_HEIGHT;
|
||||
object3.paddingHorizontal = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HORIZONTAL_PADDING;
|
||||
object3.paddingVertical = env0_11;
|
||||
r7 = object3;
|
||||
} else if (a1 === 'md') {
|
||||
object3 = {};
|
||||
object3.minHeight = MEDIUM_BUTTON_HEIGHT;
|
||||
object3.minWidth = MEDIUM_BUTTON_HEIGHT;
|
||||
object3.paddingHorizontal = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_HORIZONTAL_PADDING;
|
||||
object3.paddingVertical = env0_12;
|
||||
r7 = object3;
|
||||
} else if (a1 !== 'lg') {
|
||||
r7 = object3;
|
||||
} else {
|
||||
object3 = {};
|
||||
object3.minHeight = LARGE_BUTTON_HEIGHT;
|
||||
object3.minWidth = LARGE_BUTTON_HEIGHT;
|
||||
object3.paddingHorizontal = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_HORIZONTAL_PADDING;
|
||||
object3.paddingVertical = env0_13;
|
||||
r7 = object3;
|
||||
}
|
||||
const r3 = a1 === 'lg' ? (importDefault(697) /* metro dependency 697: native */).modules.button.BORDER_RADIUS_LG : (importDefault(697) /* metro dependency 697: native */).modules.button.BORDER_RADIUS;
|
||||
object3 = {};
|
||||
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden'};
|
||||
const BUTTON_BORDER_WIDTH = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).BUTTON_BORDER_WIDTH;
|
||||
object4.borderWidth = BUTTON_BORDER_WIDTH;
|
||||
object4.borderRadius = r3;
|
||||
copyDataProperties(object4, r7, require);
|
||||
object3.pill = object4;
|
||||
object3.expressivePill = {overflow: 'hidden', borderRadius: r3};
|
||||
const CONTROL_EXPRESSIVE_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_EXPRESSIVE_BACKGROUND_DEFAULT;
|
||||
object3.expressiveRiveFill = {color: CONTROL_EXPRESSIVE_BACKGROUND_DEFAULT};
|
||||
object3.childContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'flexGrow': 1,
|
||||
'maxWidth': '100%'};
|
||||
object3.ellipsis = {'position': 'absolute', 'height': '100%', 'width': '100%', 'justifyContent': 'center',
|
||||
'alignItems': 'center'};
|
||||
return object3;
|
||||
}
|
||||
|
||||
function ButtonPill(a0) { // fn#38906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4765:5958, offset: 0x010d0963, size: 81 bytes, params: 2, frame: 14
|
||||
return a0.loading == null ? <BasicButtonPill {...a0} /> : <LoadingButtonPill {...a0} />;
|
||||
}
|
||||
|
||||
function _fun38900() { // fn#38900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4765:3379, offset: 0x010d0300, size: 107 bytes, params: 1, frame: 15
|
||||
if (env0_1.current != null) {
|
||||
global.clearTimeout(env0_1.current);
|
||||
}
|
||||
if (loading) {
|
||||
env0_2(true);
|
||||
} else {
|
||||
env0_1.current = global.setTimeout(_fun38901, 500);
|
||||
}
|
||||
}
|
||||
|
||||
function useLoadingStylesO() { // fn#38903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4765:4909, owner: useLoadingStyles.o, offset: 0x010d0511, size: 271 bytes, params: 1, frame: 22
|
||||
var moduleValue2;
|
||||
const value = environment.__proto__;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const r4 = env0_0 ? 0 : 1;
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
const value5 = Reflect.apply(withSpring, springModule, [r4, SUBTLE_SPRING, 'animate-always']);
|
||||
const enabledBinding = enabled;
|
||||
const object2 = {};
|
||||
if (enabledBinding) {
|
||||
object2.opacity = env0_0 ? value5 : (require(4017) /* metro dependency 4017: ReanimatedRexport */).withDelay(env1_10,
|
||||
|
||||
value5);
|
||||
object2.transform = [{translateY: 0}];
|
||||
} else {
|
||||
object2.opacity = value5;
|
||||
moduleValue2 = springModule;
|
||||
object2.transform = [{translateY: moduleValue2.withSpring(env0_0 ? -1 * env0_2 : 0, SUBTLE_SPRING)}];
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useLoadingStylesL() { // fn#38904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4765:5399, owner: useLoadingStyles.l, offset: 0x010d0620, size: 261 bytes, params: 1, frame: 23
|
||||
var moduleValue2;
|
||||
const value = environment.__proto__;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const value3 = 0;
|
||||
const r5 = env0_0 ? 1 : value3;
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
const value5 = Reflect.apply(withSpring, springModule, [r5, SUBTLE_SPRING, 'animate-always']);
|
||||
const enabledBinding = enabled;
|
||||
const object2 = {};
|
||||
if (enabledBinding) {
|
||||
object2.opacity = env0_0 ? (require(4017) /* metro dependency 4017: ReanimatedRexport */).withDelay(env1_10,
|
||||
value5) : value5;
|
||||
object2.transform = [{translateY: value3}];
|
||||
} else {
|
||||
object2.opacity = value5;
|
||||
moduleValue2 = springModule;
|
||||
object2.transform = [{translateY: moduleValue2.withSpring(env0_0 ? value3 : env0_2, SUBTLE_SPRING)}];
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
/* Metro module 4588; source: design/components/Button/native/ButtonShine.native.tsx; dependencies: [57, 31, 33, 4583, 674, 4002, 4017, 4504, 4501, 2] */
|
||||
function _fun38907(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:6, offset: 0x010d09b4, size: 189 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = useShineEffectStyles;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object = {code: "function ButtonShineNativeTsx1(){const{width,SHINE_OFFSCREEN_OFFSET,useReducedMotion,SHINE_WIDTH,withRepeat,withSequence,withTiming,withDelay,SHINE_INITIAL_ANIMATION_DELAY,SHINE_ANIMATION_DURATION}=this.__closure;if(width==null){return{transform:[{translateX:-SHINE_OFFSCREEN_OFFSET}]};}if(useReducedMotion){const centerOffset=(width-SHINE_WIDTH)/2;return{transform:[{translateX:centerOffset}]};}return{transform:[{translateX:withRepeat(withSequence(withTiming(-SHINE_OFFSCREEN_OFFSET,{duration:0},'animate-always'),withDelay(SHINE_INITIAL_ANIMATION_DELAY,withTiming(width+SHINE_OFFSCREEN_OFFSET,{duration:SHINE_ANIMATION_DURATION},'animate-always'))),-1)}]};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/ButtonShine.native.tsx');
|
||||
exports.useShineEffectStyles = closure;
|
||||
exports.ButtonShine = ButtonShine;
|
||||
}
|
||||
|
||||
function useShineEffectStyles(a0, a1) { // fn#38908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:804, offset: 0x010d0a71, size: 487 bytes, params: 3, frame: 20
|
||||
const env0_0 = a0;
|
||||
const value5 = (importDefault(674) /* metro dependency 674 */)((require(4583) /* metro dependency 4583: ButtonHooksNative */).useButtonTextColorStyles(a1).color).alpha(0.1).hex();
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const AccessibilityPreferencesContext = (require(4002) /* metro dependency 4002: shared */).AccessibilityPreferencesContext;
|
||||
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = useShineEffectStylesO;
|
||||
let object2 = {width: a0, SHINE_OFFSCREEN_OFFSET: 120, useReducedMotion: enabled, SHINE_WIDTH: 56};
|
||||
object2.withRepeat = reanimatedRexportModule.withRepeat;
|
||||
object2.withSequence = reanimatedRexportModule.withSequence;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.withDelay = reanimatedRexportModule.withDelay;
|
||||
object2.SHINE_INITIAL_ANIMATION_DELAY = 750;
|
||||
object2.SHINE_ANIMATION_DURATION = 2000;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 15814138938406;
|
||||
closure.__initData = env0_6;
|
||||
const value = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
object2 = {};
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
object2.shineStyles = createStylesModule.createStyles({shineContainer: {'width': '100%', 'height': '200%',
|
||||
'position': 'absolute', 'overflow': 'hidden'}, shine: {'width': 56, 'height': '500%', 'transform': null,
|
||||
'backgroundColor': null, 'top': '-100%', 'alignItems': 'center', transform: [{rotate: '30deg'}],
|
||||
backgroundColor: value5}, shineInner: {'width': 16, 'height': '100%', backgroundColor: value5}})();
|
||||
object2.shineAnimatedStyle = value;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function ButtonShine({variant}) { // fn#38910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:2109, offset: 0x010d0d87, size: 226 bytes, params: 2, frame: 20
|
||||
const [property, env0_0] = env0_3(env0_4.useState(null), 2);
|
||||
const {shineStyles, shineAnimatedStyle} = useShineEffectStyles(property, variant);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const viewProps = {onLayout: onLayout_38911, style: [shineStyles.shineContainer, shineAnimatedStyle]};
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const shine = shineStyles.shine;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View {...viewProps}>
|
||||
<View2 style={shine}>
|
||||
<View3 style={shineStyles.shineInner} />
|
||||
</View2>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function useShineEffectStylesO() { // fn#38909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:1027, owner: useShineEffectStyles.o, offset: 0x010d0c58, size: 303 bytes, params: 1, frame: 27
|
||||
var r0;
|
||||
var enabledBinding;
|
||||
var object3;
|
||||
var object4;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var withRepeat;
|
||||
var moduleValue2;
|
||||
var withSequence;
|
||||
var withTiming;
|
||||
var value3;
|
||||
var moduleValue4;
|
||||
var withDelay;
|
||||
var moduleValue5;
|
||||
var value;
|
||||
if (env0_0 == null) {
|
||||
r0 = {transform: [{translateX: -120}]};
|
||||
} else {
|
||||
enabledBinding = enabled;
|
||||
object3 = {};
|
||||
object4 = {};
|
||||
if (enabledBinding) {
|
||||
object4.translateX = (env0_0 - 56) / 2;
|
||||
object3.transform = [object4];
|
||||
r0 = object3;
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withRepeat = moduleValue.withRepeat;
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withSequence = moduleValue2.withSequence;
|
||||
value3 = (require(4504) /* metro dependency 4504: timing */).withTiming(-120, {duration: 0},
|
||||
'animate-always');
|
||||
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withDelay = moduleValue4.withDelay;
|
||||
moduleValue5 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue5.withTiming;
|
||||
value = env0_0 + 120;
|
||||
value = Reflect.apply(withTiming, moduleValue5, [value, {duration: 2000}, 'animate-always']);
|
||||
value = Reflect.apply(withSequence, moduleValue2, [value3, Reflect.apply(withDelay, moduleValue4, [750,
|
||||
value])]);
|
||||
object4.translateX = Reflect.apply(withRepeat, moduleValue, [value, -1]);
|
||||
object3.transform = [object4];
|
||||
r0 = object3;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ButtonShineOnLayout({nativeEvent}) { // fn#38911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:2288, owner: ButtonShine.onLayout, offset: 0x010d0e69, size: 36 bytes, params: 2, frame: 11
|
||||
return env0_0(nativeEvent.layout.width);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/* Metro module 8561; source: design/components/Button/native/FloatingActionButton.native.tsx; dependencies: [31, 33, 4501, 697, 4582, 1357, 4017, 4577, 8342, 2] */
|
||||
function _fun67813(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8746:6, offset: 0x01c32879, size: 220 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
let value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
value = value.createStyles(_fun67814);
|
||||
const env0_6 = {'mass': 0.5, 'damping': 80, 'stiffness': 320};
|
||||
object = {code: "function FloatingActionButtonNativeTsx1(){const{withSpring,positionBottom,DEFAULT_POSITION_OFFSET,SPRING_CONFIG,positionRight}=this.__closure;var _positionBottom,_positionRight;return{position:'absolute',bottom:withSpring((_positionBottom=positionBottom)!==null&&_positionBottom!==void 0?_positionBottom:DEFAULT_POSITION_OFFSET,SPRING_CONFIG),right:withSpring((_positionRight=positionRight)!==null&&_positionRight!==void 0?_positionRight:DEFAULT_POSITION_OFFSET,SPRING_CONFIG)};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/FloatingActionButton.native.tsx');
|
||||
exports.DEFAULT_POSITION_OFFSET = 16;
|
||||
exports.useStyles = value;
|
||||
exports.FloatingActionButton = FloatingActionButton;
|
||||
}
|
||||
|
||||
function _fun67814() { // fn#67814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8746:144, offset: 0x01c32955, size: 178 bytes, params: 1, frame: 19
|
||||
var object4;
|
||||
const value = a0;
|
||||
let r2 = value !== undefined ? value : false;
|
||||
const object6 = {};
|
||||
const object7 = {};
|
||||
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
|
||||
copyDataProperties(object7, SHADOW_HIGH, undefined);
|
||||
object6.button = object7;
|
||||
const object8 = {};
|
||||
const FAB_BUTTON_SIZE = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).FAB_BUTTON_SIZE;
|
||||
object8.minWidth = FAB_BUTTON_SIZE;
|
||||
const FAB_BUTTON_SIZE2 = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).FAB_BUTTON_SIZE;
|
||||
object8.minHeight = FAB_BUTTON_SIZE2;
|
||||
object8.padding = 0;
|
||||
if (r2) {
|
||||
object4 = {};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
r2 = object4;
|
||||
} else {
|
||||
r2 = {};
|
||||
}
|
||||
copyDataProperties(object8, r2, FAB_BUTTON_SIZE);
|
||||
object6.iconButtonPill = object8;
|
||||
return object6;
|
||||
}
|
||||
|
||||
function FloatingActionButton(a0) { // fn#67815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8746:1023, offset: 0x01c32a07, size: 446 bytes, params: 2, frame: 27
|
||||
var r8;
|
||||
var cloneElement;
|
||||
const icon = a0.icon;
|
||||
const positionBottom = a0.positionBottom;
|
||||
const positionRight = a0.positionRight;
|
||||
const accessibilityLabel = a0.accessibilityLabel;
|
||||
let object3 = {'icon': 0, 'positionBottom': 0, 'positionRight': 0, 'accessibilityLabel': 0};
|
||||
silentSetPrototypeOf(object3, null, undefined);
|
||||
const value = copyDataProperties({}, a0, object3, undefined);
|
||||
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('FloatingActionButton'));
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = FloatingActionButtonF;
|
||||
const object4 = {};
|
||||
object4.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object4.positionBottom = positionBottom;
|
||||
object4.DEFAULT_POSITION_OFFSET = 16;
|
||||
object4.SPRING_CONFIG = env0_6;
|
||||
object4.positionRight = positionRight;
|
||||
closure.__closure = object4;
|
||||
closure.__workletHash = 10762818944671;
|
||||
closure.__initData = env0_7;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const BaseIconButton = (require(8342) /* metro dependency 8342: BaseIconButtonNative */).BaseIconButton;
|
||||
const baseIconButtonProps = {...value};
|
||||
baseIconButtonProps['accessibilityLabel'] = accessibilityLabel;
|
||||
baseIconButtonProps['size'] = 'lg';
|
||||
baseIconButtonProps['variant'] = 'primary';
|
||||
let binding = env0_3;
|
||||
if (binding.isValidElement(icon)) {
|
||||
binding = env0_3;
|
||||
cloneElement = binding.cloneElement;
|
||||
object3 = {};
|
||||
object3.color = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
r8 = Reflect.apply(cloneElement, binding, [icon, object3]);
|
||||
} else {
|
||||
r8 = icon;
|
||||
}
|
||||
baseIconButtonProps['icon'] = r8;
|
||||
baseIconButtonProps['style'] = styles.button;
|
||||
baseIconButtonProps['pillStyle'] = styles.iconButtonPill;
|
||||
return (
|
||||
<View style={value4}>
|
||||
<BaseIconButton {...baseIconButtonProps} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function FloatingActionButtonF() { // fn#67816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8746:1200, owner: FloatingActionButton.F, offset: 0x01c32bc5, size: 133 bytes, params: 1, frame: 20
|
||||
const object2 = {position: 'absolute'};
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const positionBottomBinding = positionBottom;
|
||||
const value3 = 16;
|
||||
object2.bottom = Reflect.apply(withSpring, springModule, [positionBottomBinding != null ? positionBottom : value3,
|
||||
env1_6]);
|
||||
const moduleValue2 = springModule;
|
||||
object2.right = moduleValue2.withSpring(positionRight ?? value3, env1_6);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/* Metro module 8341; source: design/components/Button/native/IconButton.native.tsx; dependencies: [31, 33, 4501, 697, 4585, 8342, 4573, 2] */
|
||||
function _fun66435(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8526:6, offset: 0x01bfb17d, size: 191 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value2.jsx;
|
||||
const env0_4 = value2.jsxs;
|
||||
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun66436);
|
||||
value = value.forwardRef(_fun66437);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/IconButton.native.tsx');
|
||||
exports.IconButton = value;
|
||||
}
|
||||
|
||||
function _fun66436(a0) { // fn#66436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8526:157, offset: 0x01bfb23c, size: 114 bytes, params: 2, frame: 15
|
||||
const object = {};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object.paddingBottom = PX_4;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object.gap = PX_8;
|
||||
object.alignItems = 'center';
|
||||
object.alignSelf = 'center';
|
||||
object.flexGrow = a0 ? 1 : 0;
|
||||
return {labelPressable: object, label: {textAlign: 'center'}};
|
||||
}
|
||||
|
||||
function _fun66437(a0, a1) { // fn#66437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8526:336, offset: 0x01bfb2ae, size: 426 bytes, params: 3, frame: 27
|
||||
var r0;
|
||||
const BaseIconButton = (require(8342) /* metro dependency 8342: BaseIconButtonNative */).BaseIconButton;
|
||||
var BaseButton;
|
||||
const label = a0.label;
|
||||
const grow = a0.grow;
|
||||
const accessibilityLabel = a0.accessibilityLabel;
|
||||
const maxFontSizeMultiplier = a0.maxFontSizeMultiplier;
|
||||
const accessibilityHint = a0.accessibilityHint;
|
||||
const object2 = {'label': 0, 'grow': 0, 'accessibilityLabel': 0, 'maxFontSizeMultiplier': 0, 'accessibilityHint': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
let value = copyDataProperties({}, a0, object2, a1);
|
||||
const styles = useStyles(grow);
|
||||
if (label != null) {
|
||||
BaseButton = (require(4585) /* metro dependency 4585: BaseButtonNative */).BaseButton;
|
||||
var baseButtonProps = {style: styles.labelPressable, ...value};
|
||||
baseButtonProps['variant'] = 'none';
|
||||
baseButtonProps['accessibilityLabel'] = accessibilityLabel;
|
||||
baseButtonProps['accessibilityHint'] = accessibilityHint;
|
||||
value = <BaseIconButton ref={a1} {...value} {...{['accessibilityRole']: 'none'}} {...{['accessibilityLabel']: ''}} {...{['size']: 'lg'}} {...{['maxFontSizeMultiplier']: maxFontSizeMultiplier}} />;
|
||||
value = <BaseButton {...baseButtonProps}>{value}{((Text) => <Text style={styles.label} variant="text-xs/medium" color="interactive-text-default" maxFontSizeMultiplier={maxFontSizeMultiplier}>{label}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</BaseButton>;
|
||||
r0 = value;
|
||||
} else {
|
||||
value = <BaseIconButton ref={a1} {...value} {...{['accessibilityLabel']: accessibilityLabel}} {...{['accessibilityHint']: accessibilityHint}} {...{['maxFontSizeMultiplier']: maxFontSizeMultiplier}} />;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
/* Metro module 9204; source: design/components/Button/native/ImageButton.native.tsx; dependencies: [31, 27, 33, 4501, 4582, 697, 4583, 4017, 4577, 4581, 4585, 8342, 4573, 2] */
|
||||
function _fun72027(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9389:6, offset: 0x01d36a0d, size: 242 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.View;
|
||||
const env0_5 = value2.Image;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value3.jsx;
|
||||
const env0_7 = value3.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun72028);
|
||||
object = {code: "function ImageButtonNativeTsx1(){const{withSpring,pressed,ON_PRESS_SPRING}=this.__closure;return{opacity:withSpring(pressed.get()===1?1:0,ON_PRESS_SPRING,'animate-always')};}"};
|
||||
value = value.forwardRef(_fun72029);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/ImageButton.native.tsx');
|
||||
exports.ImageButton = value;
|
||||
}
|
||||
|
||||
function _fun72028(a0, a1, a2) { // fn#72028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9389:186, offset: 0x01d36aff, size: 371 bytes, params: 4, frame: 17
|
||||
const LARGE_BUTTON_PADDING = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_PADDING;
|
||||
const value2 = a1 + 2 * (a0 === 'sm' ? (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_PADDING : a0 !== 'md' ? LARGE_BUTTON_PADDING : (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_PADDING);
|
||||
const object4 = {};
|
||||
const object5 = {};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object5.paddingBottom = PX_4;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.gap = PX_8;
|
||||
object5.alignItems = 'center';
|
||||
object5.alignSelf = 'center';
|
||||
object5.flexGrow = a2 ? 1 : 0;
|
||||
object4.labelPressable = object5;
|
||||
const object7 = {'paddingHorizontal': 0, 'paddingVertical': 0};
|
||||
object7.minHeight = value2;
|
||||
object7.minWidth = value2;
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.pill = object7;
|
||||
object4.imageWrapper = {width: value2, height: value2, position: 'relative'};
|
||||
object4.image = {width: value2, height: value2};
|
||||
const object8 = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0};
|
||||
const REDESIGN_IMAGE_BUTTON_PRESSED_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_IMAGE_BUTTON_PRESSED_BACKGROUND;
|
||||
object8.backgroundColor = REDESIGN_IMAGE_BUTTON_PRESSED_BACKGROUND;
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.imageDim = object8;
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun72029(a0, a1) { // fn#72029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9389:1024, offset: 0x01d36c72, size: 913 bytes, params: 3, frame: 32
|
||||
var r0;
|
||||
const BaseIconButton = (require(8342) /* metro dependency 8342: BaseIconButtonNative */).BaseIconButton;
|
||||
var BaseButton;
|
||||
let size = a0.size;
|
||||
size = size === undefined ? 'lg' : size;
|
||||
const label = a0.label;
|
||||
const grow = a0.grow;
|
||||
const image = a0.image;
|
||||
const accessibilityLabel = a0.accessibilityLabel;
|
||||
const maxFontSizeMultiplier = a0.maxFontSizeMultiplier;
|
||||
const onPressIn = a0.onPressIn;
|
||||
const onPressOut = a0.onPressOut;
|
||||
const object3 = {'size': 0, 'label': 0, 'grow': 0, 'image': 0, 'accessibilityLabel': 0, 'maxFontSizeMultiplier': 0,
|
||||
'onPressIn': 0, 'onPressOut': 0};
|
||||
silentSetPrototypeOf(object3, null, undefined);
|
||||
let value = copyDataProperties({}, a0, object3, image);
|
||||
const styles = useStyles(size,
|
||||
(require(4583) /* metro dependency 4583: ButtonHooksNative */).useIconSizeStyles(size, true,
|
||||
maxFontSizeMultiplier).width, grow);
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const binding = env0_3;
|
||||
const value5 = binding.useCallback(_fun72030, [value4, onPressIn]);
|
||||
const value6 = binding.useCallback(_fun72031, [value4, onPressOut]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = w_72032;
|
||||
const object4 = {};
|
||||
object4.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object4.pressed = value4;
|
||||
const ON_PRESS_SPRING = (require(4581) /* metro dependency 4581: springPresets */).ON_PRESS_SPRING;
|
||||
object4.ON_PRESS_SPRING = ON_PRESS_SPRING;
|
||||
closure.__closure = object4;
|
||||
closure.__workletHash = 17257158773379;
|
||||
closure.__initData = env0_9;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const image2 = <Image source={image} style={styles.image} />;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const view = <View style={styles.imageWrapper}>{image2}<View2 style={[styles.imageDim, value7]} /></View>;
|
||||
if (label != null) {
|
||||
BaseButton = (require(4585) /* metro dependency 4585: BaseButtonNative */).BaseButton;
|
||||
var baseButtonProps = {style: styles.labelPressable, ...value};
|
||||
baseButtonProps['variant'] = 'none';
|
||||
baseButtonProps['accessibilityLabel'] = accessibilityLabel;
|
||||
value = <BaseIconButton ref={a1} {...value} {...{['icon']: view}} {...{['accessibilityRole']: 'none'}} {...{['accessibilityLabel']: ''}} {...{['size']: 'lg'}} {...{['pillStyle']: styles.pill}} {...{['variant']: 'secondary'}} {...{['onPressIn']: value5}} {...{['onPressOut']: value6}} {...{['maxFontSizeMultiplier']: maxFontSizeMultiplier}} />;
|
||||
value = <BaseButton {...baseButtonProps}>{value}{((Text) => <Text variant="text-xs/medium" color="interactive-text-default" maxFontSizeMultiplier={maxFontSizeMultiplier}>{label}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</BaseButton>;
|
||||
r0 = value;
|
||||
} else {
|
||||
value = <BaseIconButton ref={a1} {...value} {...{['size']: size}} {...{['icon']: view}} {...{['accessibilityLabel']: accessibilityLabel}} {...{['pillStyle']: styles.pill}} {...{['variant']: 'secondary'}} {...{['onPressIn']: value5}} {...{['onPressOut']: value6}} />;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function w_72032() { // fn#72032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9389:1372, offset: 0x01d37003, size: 105 bytes, params: 1, frame: 18
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const value3 = env0_2.get();
|
||||
const value4 = 1;
|
||||
const r3 = value4 !== value3 ? 0 : value4;
|
||||
const ON_PRESS_SPRING = (require(4581) /* metro dependency 4581: springPresets */).ON_PRESS_SPRING;
|
||||
return {opacity: Reflect.apply(withSpring, springModule, [r3, ON_PRESS_SPRING, 'animate-always'])};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/* Metro module 12797; source: design/components/Button/native/useToggleButtonProps.native.tsx; dependencies: [2] */
|
||||
function _fun97620(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12987:6, offset: 0x0218a592, size: 100 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/useToggleButtonProps.native.tsx');
|
||||
exports.useToggleButtonProps = function(a0, a1) {
|
||||
var r4;
|
||||
var object = {};
|
||||
copyDataProperties(object, a1 ? a0.on : a0.off, r4);
|
||||
object['accessibilityRole'] = 'togglebutton';
|
||||
object['accessibilityState'] = {checked: a1};
|
||||
return object;
|
||||
};
|
||||
exports.useToggleIconButtonProps = function(a0, a1) {
|
||||
var r4;
|
||||
var object = {};
|
||||
copyDataProperties(object, a1 ? a0.on : a0.off, r4);
|
||||
object['accessibilityRole'] = 'togglebutton';
|
||||
object['accessibilityState'] = {checked: a1};
|
||||
return object;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user