Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,120 @@
|
||||
/* Metro module 15309; source: modules/toast/native/Toast.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 3860, 1305, 4573, 2] */
|
||||
function _fun117044(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15506:6, offset: 0x024a145d, size: 470 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.Fragment;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.padding = PX_8;
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.paddingRight = PX_12;
|
||||
const MOBILE_TOAST_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TOAST_BACKGROUND_DEFAULT;
|
||||
object4.backgroundColor = MOBILE_TOAST_BACKGROUND_DEFAULT;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object4.borderColor = BORDER_SUBTLE;
|
||||
object4.borderWidth = 1;
|
||||
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
|
||||
copyDataProperties(object4, SHADOW_HIGH, undefined);
|
||||
object3.container = object4;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.multilineContainer = {paddingLeft: PX_12};
|
||||
object3.contentContainer = {'marginLeft': 8, 'flexShrink': 1};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/toast/native/Toast.tsx');
|
||||
exports.default = Toast_117047;
|
||||
}
|
||||
|
||||
function ToastIcon({icon, IconComponent, iconColor, recolorLegacyIcon}) { // fn#117045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15506:589, offset: 0x024a1633, size: 240 bytes, params: 2, frame: 20
|
||||
const value4 = (require(3860) /* metro dependency 3860: useToken */).useToken(iconColor ?? 'mobile-text-heading-primary');
|
||||
const object2 = {};
|
||||
if (recolorLegacyIcon) {
|
||||
object2.color = value4;
|
||||
} else {
|
||||
object2.disableColor = true;
|
||||
}
|
||||
if (IconComponent != null) {
|
||||
return <IconComponent size="sm" color={value4} />;
|
||||
} else if (typeof icon === 'function') {
|
||||
return (
|
||||
<>
|
||||
{icon()}
|
||||
</>
|
||||
);
|
||||
} else if (icon != null) {
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
return (
|
||||
<Icon
|
||||
resizeMode="contain"
|
||||
source={icon}
|
||||
{...object2}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function ToastContent({content, onTextLayout}) { // fn#117046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15506:909, offset: 0x024a1723, size: 147 bytes, params: 2, frame: 18
|
||||
const styles = useStyles();
|
||||
if (typeof content === 'function') {
|
||||
return (
|
||||
<View style={styles.contentContainer}>
|
||||
{content()}
|
||||
</View>
|
||||
);
|
||||
} else {
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
onTextLayout={onTextLayout}
|
||||
style={styles.contentContainer}
|
||||
lineClamp={3}
|
||||
variant="text-sm/semibold"
|
||||
color="mobile-text-heading-primary"
|
||||
>
|
||||
{content}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function Toast_117047({icon, iconColor, IconComponent, content, containerStyle, recolorLegacyIcon}) { // fn#117047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15506:1260, offset: 0x024a17b6, size: 269 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const binding = env0_3;
|
||||
const [property, env0_0] = env0_2(binding.useState(false), 2);
|
||||
const env0_1 = binding.useRef(false);
|
||||
return (
|
||||
<View
|
||||
style={[styles.container, property ? styles.multilineContainer : null, containerStyle]}
|
||||
accessibilityElementsHidden
|
||||
>
|
||||
<ToastIcon
|
||||
icon={icon}
|
||||
iconColor={iconColor}
|
||||
IconComponent={IconComponent}
|
||||
recolorLegacyIcon={recolorLegacyIcon}
|
||||
/>
|
||||
<ToastContent content={content} onTextLayout={binding.useCallback(_fun117048, [])} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun117048(a0) { // fn#117048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15506:1442, offset: 0x024a18c3, size: 69 bytes, params: 2, frame: 11
|
||||
if (!env0_1.current) {
|
||||
env0_1.current = true;
|
||||
env0_0(a0.nativeEvent.lines.length > 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user