Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,114 @@
|
||||
/* Metro module 9222; source: design/components/SegmentedControl/native/SegmentedControlItem.native.tsx; dependencies: [31, 27, 33, 4501, 697, 8621, 4017, 4577, 477, 1244, 4573, 2] */
|
||||
function _fun72125(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9407:6, offset: 0x01d3ac1e, size: 345 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Pressable;
|
||||
const env0_4 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = {'mass': 0.3, 'damping': 13, 'stiffness': 250, 'overshootClamping': true};
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun72126);
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyleProperties = value.createStyleProperties;
|
||||
object2 = {};
|
||||
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
object2.inactive = TEXT_MUTED;
|
||||
let INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.active = INTERACTIVE_TEXT_ACTIVE;
|
||||
INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.pressed = INTERACTIVE_TEXT_ACTIVE;
|
||||
const env0_9 = Reflect.apply(createStyleProperties, value, [object2]);
|
||||
object2 = {code: "function SegmentedControlItemNativeTsx1(){const{colors,pressed,index,activeIndex,withSpring,SPRING_CONFIG}=this.__closure;let color=colors.inactive;const isPressActive=pressed.get()>=0;const isPressed=pressed.get()===index;const isActive=Math.round(activeIndex.get())===index;if(isPressed){color=colors.pressed;}else if(isPressActive){color=colors.inactive;}else if(isActive){color=colors.active;}return{color:withSpring(color,SPRING_CONFIG,'animate-always')};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/SegmentedControl/native/SegmentedControlItem.native.tsx');
|
||||
exports.SegmentedControlItem = SegmentedControlItem;
|
||||
}
|
||||
|
||||
function _fun72126(a0) { // fn#72126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9407:246, offset: 0x01d3ad77, size: 108 bytes, params: 2, frame: 14
|
||||
const object = {};
|
||||
const value = 4;
|
||||
object.borderRadius = importDefault(dependencyMap[value]).radii.lg;
|
||||
object.paddingVertical = a0 !== 'experimental_Small' ? 8 : value;
|
||||
object.flexDirection = 'row';
|
||||
object.justifyContent = 'center';
|
||||
return {item: object, label: {'flexDirection': 'column', 'alignItems': 'center', 'gap': 8}};
|
||||
}
|
||||
|
||||
function SegmentedControlItem({label, index, itemCount, icon, state, onPress, onPressIn, onPressOut, pressed, variant, style}) { // fn#72127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9407:1205, offset: 0x01d3ade3, size: 562 bytes, params: 2, frame: 31
|
||||
var r4;
|
||||
var intl;
|
||||
const activeIndex = state.activeIndex;
|
||||
const styles = useStyles(variant);
|
||||
const value3 = env0_9();
|
||||
const value4 = (require(8621) /* metro dependency 8621: useStateFromSharedValue */).useDerivedStateFromSharedValue(activeIndex,
|
||||
function(a0) {
|
||||
return {selected: a0 === index};
|
||||
});
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = SegmentedControlItemB;
|
||||
const object2 = {colors: value3, pressed: pressed, index: index, activeIndex: activeIndex};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.SPRING_CONFIG = env0_7;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 9369301431547;
|
||||
closure.__initData = env0_10;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const items2 = [styles.item, style];
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r4 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['4EsQA1'],
|
||||
{position: index + 1, tabCount: itemCount});
|
||||
} else {
|
||||
r4 = undefined;
|
||||
}
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Pressable
|
||||
style={items2}
|
||||
onPress={onPress}
|
||||
onPressIn={onPressIn}
|
||||
onPressOut={onPressOut}
|
||||
accessibilityRole="tab"
|
||||
accessibilityState={value4}
|
||||
accessibilityHint={r4}
|
||||
>
|
||||
<View style={styles.label}>
|
||||
{icon}
|
||||
<Text
|
||||
animated
|
||||
variant="text-sm/semibold"
|
||||
style={value5}
|
||||
lineClamp={1}
|
||||
maxFontSizeMultiplier={variant !== 'experimental_Large' ? undefined : 1.5}
|
||||
>
|
||||
{label}
|
||||
</Text>
|
||||
</View>
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
function SegmentedControlItemB() { // fn#72129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9407:1478, owner: SegmentedControlItem.b, offset: 0x01d3b02c, size: 176 bytes, params: 1, frame: 19
|
||||
const inactive = env0_3.inactive;
|
||||
const pressedBinding = pressed;
|
||||
let get = pressedBinding.get;
|
||||
const value3 = Reflect.apply(get, pressedBinding, []) >= 0;
|
||||
const value4 = pressedBinding.get();
|
||||
const indexBinding = index;
|
||||
const Math = global.Math;
|
||||
const round = Math.round;
|
||||
const activeIndexBinding = activeIndex;
|
||||
get = activeIndexBinding.get;
|
||||
const r5 = value4 === indexBinding ? env0_3.pressed : value3 ? env0_3.inactive : Reflect.apply(round, Math,
|
||||
[Reflect.apply(get, activeIndexBinding, [])]) !== indexBinding ? inactive : env0_3.active;
|
||||
const object2 = {};
|
||||
object2.color = (require(4577) /* metro dependency 4577: spring */).withSpring(r5, env1_7, 'animate-always');
|
||||
return object2;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user