Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,205 @@
|
||||
/* Metro module 6239; source: design/components/Card/native/Card.native.tsx; dependencies: [29, 31, 27, 33, 4017, 697, 6234, 4501, 1357, 3860, 477, 4577, 4581, 6240, 2] */
|
||||
function _fun49318(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6417:6, offset: 0x011f570d, size: 324 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = Card_49320;
|
||||
const env0_3 = ['accessibilityRole'];
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.View;
|
||||
const Pressable = value.Pressable;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_8 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Pressable);
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyleProperties(_fun49328);
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun49329);
|
||||
object = {code: "function CardNativeTsx1(){const{withSpring,interpolateColor,pressed,backgroundColor,backgroundColorPressed,ON_PRESS_SPRING}=this.__closure;const pressedColor=withSpring(interpolateColor(pressed.get(),[0,1],[backgroundColor,backgroundColorPressed]),ON_PRESS_SPRING,'animate-always');return{backgroundColor:pressedColor};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Card/native/Card.native.tsx');
|
||||
exports.Card = closure;
|
||||
exports.InternalCard = closure;
|
||||
}
|
||||
|
||||
function getCardBackgroundToken(a0) { // fn#49319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6417:228, offset: 0x011f5851, size: 291 bytes, params: 2, frame: 11
|
||||
if (a0 === 'primary') {
|
||||
return (require(6234) /* metro dependency 6234: CardTokensNative */).CARD_PRIMARY_BG;
|
||||
}
|
||||
if (a0 === 'secondary') {
|
||||
return (importDefault(697) /* metro dependency 697: native */).colors.CARD_SECONDARY_BACKGROUND_DEFAULT;
|
||||
}
|
||||
if (a0 === 'muted') {
|
||||
return (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
}
|
||||
if (a0 === 'transparent') {
|
||||
return (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.TRANSPARENT;
|
||||
}
|
||||
if (a0 === 'control-secondary') {
|
||||
return (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT;
|
||||
}
|
||||
if (a0 === 'surface-high') {
|
||||
return (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
}
|
||||
}
|
||||
|
||||
function Card_49320(a0) { // fn#49320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6417:1923, offset: 0x011f5974, size: 449 bytes, params: 2, frame: 28
|
||||
var accessibilityRole;
|
||||
let start = a0.start;
|
||||
start = start === undefined || start;
|
||||
let end = a0.end;
|
||||
end = end === undefined || end;
|
||||
let shadow = a0.shadow;
|
||||
shadow = shadow === undefined ? 'none' : shadow;
|
||||
let border = a0.border;
|
||||
border = border === undefined ? 'faint' : border;
|
||||
let variant = a0.variant;
|
||||
variant = variant === undefined ? 'primary' : variant;
|
||||
let object = {'start': 0, 'end': 0, 'shadow': 0, 'border': 0, 'variant': 0};
|
||||
silentSetPrototypeOf(object, null, undefined);
|
||||
let value = copyDataProperties({}, a0, object, undefined);
|
||||
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('Card');
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const CARD_DEFAULT_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CARD_DEFAULT_RADIUS;
|
||||
const r2 = value.radius ?? Reflect.apply(useToken, useTokenModule, [CARD_DEFAULT_RADIUS]);
|
||||
const styles = useStyles(start, end, variant, shadow, border, r2);
|
||||
object = [styles.spacing];
|
||||
object[1] = styles.card;
|
||||
object[2] = value.style;
|
||||
if ('onPress' in value) {
|
||||
if (value.onPress != null) {
|
||||
accessibilityRole = value.accessibilityRole;
|
||||
value = env0_4(value, env0_3);
|
||||
return (
|
||||
<PressableCard
|
||||
accessibilityRole={accessibilityRole ?? 'button'}
|
||||
{...value}
|
||||
{...{['start']: start}}
|
||||
{...{['end']: end}}
|
||||
{...{['style']: object}}
|
||||
{...{['variant']: variant}}
|
||||
{...{['isRefreshEnabled']: value3}}
|
||||
{...{['radius']: r2}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
return <View {...value} {...{['style']: object}} />;
|
||||
}
|
||||
|
||||
function PressableCard(a0) { // fn#49321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6417:2401, offset: 0x011f5b35, size: 67 bytes, params: 2, frame: 13
|
||||
const value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
return value.isAndroid() ? PressableCardAndroid(a0) : PressableCardiOS(a0);
|
||||
}
|
||||
|
||||
function _fun49328(a0) { // fn#49328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6417:693, offset: 0x011f5f04, size: 327 bytes, params: 2, frame: 16
|
||||
var r1;
|
||||
let value = a1;
|
||||
const value2 = undefined;
|
||||
let r3 = value !== value2 ? value : false;
|
||||
const cardBackgroundToken = getCardBackgroundToken(a0);
|
||||
r3 = !(r3 === value2) && r3;
|
||||
if (a0 === 'primary') {
|
||||
r1 = (require(6234) /* metro dependency 6234: CardTokensNative */).CARD_PRIMARY_PRESSED_BG;
|
||||
} else if (a0 === 'secondary') {
|
||||
r1 = (importDefault(697) /* metro dependency 697: native */).colors.CARD_SECONDARY_BACKGROUND_ACTIVE;
|
||||
} else if (a0 === 'muted') {
|
||||
r1 = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
} else if (a0 === 'transparent') {
|
||||
value = importDefault(697) /* metro dependency 697: native */;
|
||||
r3 = r3 ? value.colors.BACKGROUND_MOD_SUBTLE : value.unsafe_rawColors.TRANSPARENT;
|
||||
r1 = r3;
|
||||
} else {
|
||||
r1 = a0 === 'control-secondary' ? (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BACKGROUND_ACTIVE : a0 !== 'surface-high' ? value2 : (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
}
|
||||
return {backgroundColor: cardBackgroundToken, backgroundColorPressed: r1};
|
||||
}
|
||||
|
||||
function _fun49329(a0, a1, a2, a3, a4, a5) { // fn#49329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6417:1304, offset: 0x011f604b, size: 402 bytes, params: 7, frame: 22
|
||||
const value = a5;
|
||||
const getCardBackgroundTokenBinding = getCardBackgroundToken;
|
||||
const value3 = undefined;
|
||||
const cardBackgroundTokenBinding = getCardBackgroundTokenBinding(a2);
|
||||
const value5 = null;
|
||||
const r0 = a4 === 'none' ? value5 : a4 === 'subtle' ? (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE : a4 === 'strong' ? (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG : a4 === 'faint' ? (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED : a4 === 'control-secondary' ? (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BORDER_DEFAULT : value3;
|
||||
const r6 = value5 == r0 ? cardBackgroundTokenBinding : r0;
|
||||
const object = {};
|
||||
const cardTokensNativeModule = require(6234) /* metro dependency 6234: CardTokensNative */;
|
||||
copyDataProperties(object, cardTokensNativeModule.createCardShadowToken(a3), cardTokensNativeModule);
|
||||
object['borderTopStartRadius'] = a0 ? value : value3;
|
||||
object['borderTopEndRadius'] = a0 ? value : value3;
|
||||
object['borderBottomStartRadius'] = a1 ? value : value3;
|
||||
object['borderBottomEndRadius'] = a1 ? value : value3;
|
||||
object['borderColor'] = r6;
|
||||
object['borderWidth'] = a4 === 'none' ? 0 : 1;
|
||||
object['backgroundColor'] = cardBackgroundTokenBinding;
|
||||
return {card: object, spacing: {padding: 16}};
|
||||
}
|
||||
|
||||
function PressableCardAndroid(a0) { // fn#49322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6417:2455, owner: PressableCard.PressableCardAndroid, offset: 0x011f5b78, size: 184 bytes, params: 2, frame: 20
|
||||
const children = a0.children;
|
||||
const start = a0.start;
|
||||
const end = a0.end;
|
||||
const radius = a0.radius;
|
||||
a0.isRefreshEnabled;
|
||||
const object2 = {'children': 0, 'start': 0, 'end': 0, 'radius': 0, 'isRefreshEnabled': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
const value = copyDataProperties({}, a0, object2, start);
|
||||
const value3 = env1_5.useMemo(function() {
|
||||
return {cornerRadius: start || end ? radius : 0};
|
||||
}, [start, end, radius]);
|
||||
const AnimatedPressableHighlight = (require(6240) /* metro dependency 6240: AnimatedPressableHighlightNative */).AnimatedPressableHighlight;
|
||||
return (
|
||||
<AnimatedPressableHighlight androidRippleConfig={value3} {...value}>
|
||||
{children}
|
||||
</AnimatedPressableHighlight>
|
||||
);
|
||||
}
|
||||
|
||||
function PressableCardiOS(a0) { // fn#49324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6417:2693, owner: PressableCard.PressableCardiOS, offset: 0x011f5c50, size: 457 bytes, params: 2, frame: 28
|
||||
const children = a0.children;
|
||||
const style = a0.style;
|
||||
const variant = a0.variant;
|
||||
const onPressIn = a0.onPressIn;
|
||||
const onPressOut = a0.onPressOut;
|
||||
const isRefreshEnabled = a0.isRefreshEnabled;
|
||||
a0.radius;
|
||||
a0.start;
|
||||
a0.end;
|
||||
const object3 = {'children': 0, 'style': 0, 'variant': 0, 'onPressIn': 0, 'onPressOut': 0, 'isRefreshEnabled': 0,
|
||||
'radius': 0, 'start': 0, 'end': 0};
|
||||
silentSetPrototypeOf(object3, null, undefined);
|
||||
const value = copyDataProperties({}, a0, object3, undefined);
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const value4 = env1_5.useCallback(_fun49325, [value3, onPressIn]);
|
||||
const value5 = env1_5.useCallback(_fun49326, [value3, onPressOut]);
|
||||
const {backgroundColor, backgroundColorPressed} = env1_9(variant, isRefreshEnabled);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = PressableCardiOSB;
|
||||
const object4 = {};
|
||||
object4.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object4.interpolateColor = reanimatedRexportModule.interpolateColor;
|
||||
object4.pressed = value3;
|
||||
object4.backgroundColor = backgroundColor;
|
||||
object4.backgroundColorPressed = backgroundColorPressed;
|
||||
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 = 14943431549291;
|
||||
closure.__initData = env1_11;
|
||||
return ((Component) => <Component {...value} {...{['onPressIn']: value4}} {...{['onPressOut']: value5}} {...{['style']: [style,
|
||||
Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
|
||||
[closure])]}} {...{['unstable_pressDelay']: 130}}>{children}</Component>)(env1_8);
|
||||
}
|
||||
|
||||
function PressableCardiOSB() { // fn#49327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6417:3047, owner: PressableCard.PressableCardiOS.B, offset: 0x011f5e78, size: 140 bytes, params: 1, frame: 22
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = value.withSpring;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const value4 = reanimatedRexportModule.interpolateColor(env0_2.get(), [0, 1], [backgroundColor,
|
||||
backgroundColorPressed]);
|
||||
const ON_PRESS_SPRING = (require(4581) /* metro dependency 4581: springPresets */).ON_PRESS_SPRING;
|
||||
return {backgroundColor: Reflect.apply(withSpring, value, [value4, ON_PRESS_SPRING, 'animate-always'])};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/* Metro module 6234; source: design/components/Card/native/CardTokens.native.tsx; dependencies: [4501, 697, 2] */
|
||||
function _fun49243(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6412:6, offset: 0x011f2b83, size: 230 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = createCardBackgroundToken;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const TABLEROW_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TABLEROW_BACKGROUND_DEFAULT;
|
||||
const CARD_GRADIENT_BG = (importDefault(697) /* metro dependency 697: native */).colors.CARD_GRADIENT_BG;
|
||||
const value = closure(TABLEROW_BACKGROUND_DEFAULT, CARD_GRADIENT_BG);
|
||||
const TABLEROW_BACKGROUND_PRESSED = (importDefault(697) /* metro dependency 697: native */).colors.TABLEROW_BACKGROUND_PRESSED;
|
||||
const CARD_GRADIENT_PRESSED_BG = (importDefault(697) /* metro dependency 697: native */).colors.CARD_GRADIENT_PRESSED_BG;
|
||||
const value2 = closure(TABLEROW_BACKGROUND_PRESSED, CARD_GRADIENT_PRESSED_BG);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Card/native/CardTokens.native.tsx');
|
||||
exports.CARD_PRIMARY_BG = value;
|
||||
exports.getCardSecondaryBg = function(a0) {
|
||||
var createCardBackgroundTokenBinding = createCardBackgroundToken;
|
||||
var property = importDefault(dependencyMap[1]).colors;
|
||||
return createCardBackgroundTokenBinding(a0 ? property.BACKGROUND_MOD_MUTED : property.CARD_SECONDARY_BG,
|
||||
importDefault(dependencyMap[1]).colors.CARD_GRADIENT_BG);
|
||||
};
|
||||
exports.CARD_PRIMARY_PRESSED_BG = value2;
|
||||
exports.createCardShadowToken = createCardShadowToken;
|
||||
}
|
||||
|
||||
function createCardBackgroundToken(a0, a1) { // fn#49244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6412:43, offset: 0x011f2c69, size: 58 bytes, params: 3, frame: 12
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
return (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(_fun49245);
|
||||
}
|
||||
|
||||
function createCardShadowToken(a0) { // fn#49247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6412:774, offset: 0x011f2d1e, size: 51 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
return (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(_fun49248);
|
||||
}
|
||||
|
||||
function _fun49245({primaryColor}) { // fn#49245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6412:124, offset: 0x011f2ca3, size: 33 bytes, params: 2, frame: 2
|
||||
return primaryColor != null ? require : env0_0;
|
||||
}
|
||||
|
||||
function _fun49248({gradient}) { // fn#49248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6412:849, offset: 0x011f2d51, size: 293 bytes, params: 2, frame: 11
|
||||
if (gradient != null) {
|
||||
return {};
|
||||
}
|
||||
if (env0_0 === 'none') {
|
||||
return {};
|
||||
}
|
||||
const binding = env0_0;
|
||||
if (binding === 'border') {
|
||||
value = environment.__proto__;
|
||||
return (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_BORDER;
|
||||
}
|
||||
if (binding === 'high') {
|
||||
value = environment.__proto__;
|
||||
return (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
|
||||
}
|
||||
if (binding === 'ledge') {
|
||||
value = environment.__proto__;
|
||||
return (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LEDGE;
|
||||
}
|
||||
if (binding === 'low') {
|
||||
value = environment.__proto__;
|
||||
return (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
}
|
||||
if (binding === 'medium') {
|
||||
value = environment.__proto__;
|
||||
return (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_MEDIUM;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user