132 lines
9.1 KiB
TypeScript
132 lines
9.1 KiB
TypeScript
/* Metro module 10496; source: modules/user_profile/native/ActionSheetBackdropToast.tsx; dependencies: [31, 27, 6276, 33, 477, 4501, 697, 1585, 1478, 5314, 4017, 4504, 4573, 2] */
|
|
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
|
|
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
|
|
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
|
|
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as NavigatorConstantsNativeModule from '../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
|
|
import * as ActionSheetConstantsModule from '../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
|
|
|
|
function _fun81195(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10682:6, offset: 0x01e9db22, size: 384 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const env0_4 = value.View;
|
|
const StyleSheet = value.StyleSheet;
|
|
const env0_7 = (PlatformUtilsModule).isIOS();
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {};
|
|
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
|
|
object2['flex'] = 1;
|
|
object2['alignItems'] = 'center';
|
|
object2['justifyContent'] = 'center';
|
|
object.container = object2;
|
|
const object3 = {'position': 'absolute', 'bottom': 16, 'backgroundColor': null, 'borderRadius': null,
|
|
'paddingTop': 6, 'paddingBottom': 8, 'paddingHorizontal': 16};
|
|
const MOBILE_TOAST_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TOAST_BACKGROUND_DEFAULT;
|
|
object3.backgroundColor = MOBILE_TOAST_BACKGROUND_DEFAULT;
|
|
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
object.toast = object3;
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
object = {code: 'function ActionSheetBackdropToastTsx1(){const{isInIOS,isExpanded,maxDynamicContentSize,TOAST_BOTTOM_MARGIN,nonExpandedHeight,ACTION_SHEET_START_HEIGHT_RATIO,TOAST_BOTTOM_GAP,positionDelta,TOAST_ANIMATION_Y_DELTA,opacity}=this.__closure;return{bottom:(isInIOS?isExpanded?maxDynamicContentSize+TOAST_BOTTOM_MARGIN:nonExpandedHeight+TOAST_BOTTOM_MARGIN:isExpanded?maxDynamicContentSize+TOAST_BOTTOM_MARGIN:ACTION_SHEET_START_HEIGHT_RATIO*maxDynamicContentSize+TOAST_BOTTOM_GAP)+ +(1-positionDelta.get())*TOAST_ANIMATION_Y_DELTA,opacity:opacity.get()};}'};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/ActionSheetBackdropToast.tsx');
|
|
exports.ActionSheetBackdropToast = ActionSheetBackdropToast;
|
|
function ActionSheetBackdropToast({text, isExpanded}) { // fn#81196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10682:1190, offset: 0x01e9dca2, size: 488 bytes, params: 2, frame: 28
|
|
const styles = useStyles();
|
|
const top = (UseSafeAreaInsetsNative)().top;
|
|
const height = (UseWindowDimensionsNative)().height;
|
|
const value2 = height * ACTION_SHEET_START_HEIGHT_RATIO;
|
|
const NAV_BAR_HEIGHT_MULTILINE = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT_MULTILINE;
|
|
const value3 = height - NAV_BAR_HEIGHT_MULTILINE - top;
|
|
const value4 = (ReanimatedRexportModule).useSharedValue(0);
|
|
const env0_3 = value4;
|
|
const value5 = (ReanimatedRexportModule).useSharedValue(0);
|
|
env0_3.useEffect(_fun81197, [value4, value5]);
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
const ActionSheetBackdropToastX2 = ActionSheetBackdropToastX;
|
|
ActionSheetBackdropToastX2.__closure = {isInIOS: env0_7, isExpanded: isExpanded, maxDynamicContentSize: value3,
|
|
TOAST_BOTTOM_MARGIN: 24, nonExpandedHeight: value2,
|
|
ACTION_SHEET_START_HEIGHT_RATIO: ACTION_SHEET_START_HEIGHT_RATIO, TOAST_BOTTOM_GAP: 46, positionDelta: value4,
|
|
TOAST_ANIMATION_Y_DELTA: 15, opacity: value5};
|
|
ActionSheetBackdropToastX2.__workletHash = 9630436597435;
|
|
ActionSheetBackdropToastX2.__initData = env0_9;
|
|
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [ActionSheetBackdropToastX2]);
|
|
const items3 = [styles.container];
|
|
const View2 = (ReanimatedRexport).View;
|
|
const items2 = [styles.toast, value6];
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<View style={items3} pointerEvents="none">
|
|
<View2 style={items2}>
|
|
<Text variant="text-sm/medium" color="mobile-text-heading-primary">
|
|
{text}
|
|
</Text>
|
|
</View2>
|
|
</View>
|
|
);
|
|
function _fun81197() { // fn#81197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10682:1377, offset: 0x01e9de8a, size: 253 bytes, params: 1, frame: 25
|
|
let binding = env0_3;
|
|
let set = binding.set;
|
|
const withDelay = ReanimatedRexportModule.withDelay;
|
|
let withTiming = TimingModule.withTiming;
|
|
let object = {duration: 200};
|
|
const Easing = ReanimatedRexportModule.Easing;
|
|
const Easing2 = ReanimatedRexportModule.Easing;
|
|
object.easing = Easing.in(Easing2.ease);
|
|
Reflect.apply(set, binding, [Reflect.apply(withDelay, ReanimatedRexportModule, [100, Reflect.apply(withTiming,
|
|
TimingModule, [1, object])])]);
|
|
binding = env0_4;
|
|
set = binding.set;
|
|
withTiming = TimingModule.withTiming;
|
|
object = {duration: 300};
|
|
const Easing3 = ReanimatedRexportModule.Easing;
|
|
object.easing = Easing.in(Easing3.linear);
|
|
Reflect.apply(set, binding, [Reflect.apply(withTiming, TimingModule, [1, object])]);
|
|
return _fun81198;
|
|
function _fun81198() { // fn#81198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10682:1594, offset: 0x01e9df87, size: 175 bytes, params: 1, frame: 22
|
|
let value = environment.__proto__;
|
|
let binding = env1_3;
|
|
let set = binding.set;
|
|
const withDelay = ReanimatedRexportModule.withDelay;
|
|
let withTiming = TimingModule.withTiming;
|
|
Reflect.apply(set, binding, [Reflect.apply(withDelay, ReanimatedRexportModule, [200, Reflect.apply(withTiming,
|
|
TimingModule, [0])])]);
|
|
binding = env1_4;
|
|
set = binding.set;
|
|
value = TimingModule;
|
|
withTiming = value.withTiming;
|
|
const Easing = ReanimatedRexportModule.Easing;
|
|
const out = Easing.out;
|
|
const Easing2 = ReanimatedRexportModule.Easing;
|
|
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [0, {duration: 200, easing: Reflect.apply(out, Easing,
|
|
[Easing2.exp])}])]);
|
|
}
|
|
|
|
}
|
|
|
|
function ActionSheetBackdropToastX() { // fn#81199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10682:1794, owner: ActionSheetBackdropToast.x, offset: 0x01e9e036, size: 140 bytes, params: 1, frame: 13
|
|
const object = {};
|
|
const value = environment.__proto__;
|
|
const binding = env1_7;
|
|
const isExpandedBinding = isExpanded;
|
|
object.bottom = (binding ? isExpandedBinding ? env0_2 + 24 : env0_1 + 24 : isExpandedBinding ? env0_2 + 24 : ACTION_SHEET_START_HEIGHT_RATIO * env0_2 + 46) + 15 * (1 - env0_3.get());
|
|
object.opacity = env0_4.get();
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun81195, 10496, [31, 27, 6276, 33, 477, 4501, 697, 1585, 1478, 5314, 4017, 4504, 4573,
|
|
2]) /* metro module 10496, dependencies: [31, 27, 6276, 33, 477, 4501, 697, 1585, 1478, 5314, 4017, 4504, 4573, 2] */;
|