157 lines
10 KiB
TypeScript
157 lines
10 KiB
TypeScript
/* Metro module 15313; source: modules/launchpad/native/LaunchPadContainer.tsx; dependencies: [31, 27, 11324, 33, 4501, 11325, 15314, 15316, 14283, 4017, 4577, 4013, 14366, 5321, 15317, 2] */
|
|
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import UseLaunchPadType from './useLaunchPadType.tsx'; /* Metro dependency 11325 */
|
|
import UseWindowDimensionsSharedValueNative from '../../screen/useWindowDimensionsSharedValue.native.tsx'; /* Metro dependency 14283 */
|
|
import LaunchPadGestureRefContext from './LaunchPadGestureRefContext.tsx'; /* Metro dependency 14366 */
|
|
import UseLaunchPadStateNative from './useLaunchPadState.native.tsx'; /* Metro dependency 15314 */
|
|
import UseLaunchPadGesture from './useLaunchPadGesture.tsx'; /* Metro dependency 15316 */
|
|
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 HomeDrawerExperimentModule from '../../home_drawer/native/HomeDrawerExperiment.tsx'; /* Metro dependency 4013 */
|
|
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as SpringModule from '../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
|
|
import * as Module05321Module from '../../../by-id/module-05321.js'; /* Metro dependency 5321 */
|
|
|
|
function _fun117059(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15510:6, offset: 0x024a1caa, size: 347 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = ReactNativeModule;
|
|
const env0_3 = value.View;
|
|
const StyleSheet = value.StyleSheet;
|
|
value = require(11324) /* metro dependency 11324: LaunchPadConstants */;
|
|
const env0_4 = value.LAUNCH_PAD_SPRING_CONFIG;
|
|
const env0_5 = value.LaunchPadTypes;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {};
|
|
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
|
|
object2['backgroundColor'] = 'transparent';
|
|
object.wrapper = object2;
|
|
const object3 = {};
|
|
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
|
object3['overflow'] = 'hidden';
|
|
object.container = object3;
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
object = {code: 'function LaunchPadContainerTsx1(){const{windowDimensions}=this.__closure;return windowDimensions.get().height;}'};
|
|
object = {code: 'function LaunchPadContainerTsx2(height,lastHeight){const{updaters}=this.__closure;if(lastHeight==null)return;if(lastHeight<=height)return;updaters.onWindowHeightChange();}'};
|
|
object = {code: "function LaunchPadContainerTsx3(){const{interpolate,launchPadSharedState,withSpring,windowDimensions,LAUNCH_PAD_SPRING_CONFIG}=this.__closure;return{borderRadius:interpolate(launchPadSharedState.get(),[0,1],[0,16]),transform:[{scale:withSpring(interpolate(launchPadSharedState.get(),[0,1],[1,(windowDimensions.get().width-16*3)/windowDimensions.get().width]),LAUNCH_PAD_SPRING_CONFIG,'animate-always')},{translateY:withSpring(interpolate(launchPadSharedState.get(),[0,1],[0,-4]),LAUNCH_PAD_SPRING_CONFIG,'animate-always')}]};}"};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/launchpad/native/LaunchPadContainer.tsx');
|
|
exports.default = LaunchPadContainer;
|
|
function LaunchPadContainer({children}) { // fn#117060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15510:1303, offset: 0x024a1e05, size: 713 bytes, params: 2, frame: 33
|
|
var r10;
|
|
var value;
|
|
const styles = useStyles();
|
|
const value3 = (UseLaunchPadType)();
|
|
const {launchPadSharedState, launchPadPullTabState, launchPadShown, gestureState,
|
|
updaters} = (UseLaunchPadStateNative)();
|
|
const {gesture,
|
|
gestureRef} = (UseLaunchPadGesture)({launchPadType: value3,
|
|
launchPadSharedState: launchPadSharedState, launchPadPullTabState: launchPadPullTabState,
|
|
launchPadShown: launchPadShown, gestureState: gestureState, updaters: updaters});
|
|
const value6 = (UseWindowDimensionsSharedValueNative)();
|
|
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
|
|
let closure = LaunchPadContainerO;
|
|
closure.__closure = {windowDimensions: value6};
|
|
closure.__workletHash = 9985296176902;
|
|
closure.__initData = env0_9;
|
|
const LaunchPadContainerL2 = LaunchPadContainerL;
|
|
LaunchPadContainerL2.__closure = {updaters: updaters};
|
|
LaunchPadContainerL2.__workletHash = 418963589215;
|
|
LaunchPadContainerL2.__initData = env0_10;
|
|
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, LaunchPadContainerL2]);
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
closure = LaunchPadContainerV;
|
|
closure.__closure = {interpolate: ReanimatedRexportModule.interpolate, launchPadSharedState: launchPadSharedState,
|
|
withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, windowDimensions: value6,
|
|
LAUNCH_PAD_SPRING_CONFIG: LAUNCH_PAD_SPRING_CONFIG};
|
|
closure.__workletHash = 13886247172712;
|
|
closure.__initData = env0_11;
|
|
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
|
|
const MobileHomeDrawerExperiment = (HomeDrawerExperimentModule).MobileHomeDrawerExperiment;
|
|
const useConfig = MobileHomeDrawerExperiment.useConfig;
|
|
const enableHome = Reflect.apply(useConfig, MobileHomeDrawerExperiment, [{location: 'guilds'}]).enableHome;
|
|
const Provider = (LaunchPadGestureRefContext).Provider;
|
|
const GestureDetector = (Module05321Module).GestureDetector;
|
|
const View2 = (ReanimatedRexport).View;
|
|
const view = (
|
|
<View2 style={[styles.container, value7]}>
|
|
{children}
|
|
</View2>
|
|
);
|
|
const DISABLED = LaunchPadTypes.DISABLED;
|
|
if (value3 !== DISABLED) {
|
|
value = importDefault(15317) /* metro dependency 15317: LaunchPadWrapper */;
|
|
value = ((Component) => <Component launchPadType={value3} gestureState={gestureState} launchPadShown={launchPadShown} launchPadSharedState={launchPadSharedState} launchPadPullTabState={launchPadPullTabState} updaters={updaters} />)(value);
|
|
r10 = value;
|
|
} else if (enableHome) {
|
|
value = importDefault(15317) /* metro dependency 15317: LaunchPadWrapper */;
|
|
value = ((Component) => <Component launchPadType={value3} gestureState={gestureState} launchPadShown={launchPadShown} launchPadSharedState={launchPadSharedState} launchPadPullTabState={launchPadPullTabState} updaters={updaters} />)(value);
|
|
r10 = value;
|
|
} else {
|
|
r10 = undefined;
|
|
}
|
|
return (
|
|
<Provider value={gestureRef}>
|
|
<GestureDetector gesture={gesture}>
|
|
<View style={styles.wrapper}>
|
|
{view}
|
|
{r10}
|
|
</View>
|
|
</GestureDetector>
|
|
</Provider>
|
|
);
|
|
function LaunchPadContainerO() { // fn#117061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15510:1673, owner: LaunchPadContainer.o, offset: 0x024a20ce, size: 23 bytes, params: 1, frame: 9
|
|
const binding = env0_2;
|
|
const get = binding.get;
|
|
return Reflect.apply(get, binding, []).height;
|
|
}
|
|
|
|
function LaunchPadContainerL(a0, a1) { // fn#117062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15510:1776, owner: LaunchPadContainer.l, offset: 0x024a20e5, size: 37 bytes, params: 3, frame: 9
|
|
if (a1 != null) {
|
|
if (!(a1 <= a0)) {
|
|
updaters.onWindowHeightChange();
|
|
}
|
|
}
|
|
}
|
|
|
|
function LaunchPadContainerV() { // fn#117063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15510:1942, owner: LaunchPadContainer.v, offset: 0x024a210a, size: 326 bytes, params: 1, frame: 27
|
|
const object = {};
|
|
let value = environment.__proto__;
|
|
let interpolate = ReanimatedRexportModule.interpolate;
|
|
const launchPadSharedStateBinding = launchPadSharedState;
|
|
let get = launchPadSharedStateBinding.get;
|
|
object.borderRadius = Reflect.apply(interpolate, ReanimatedRexportModule, [Reflect.apply(get,
|
|
launchPadSharedStateBinding, []), [0, 1], [0, 16]]);
|
|
let withSpring = SpringModule.withSpring;
|
|
interpolate = ReanimatedRexportModule.interpolate;
|
|
const value4 = launchPadSharedStateBinding.get();
|
|
const binding = env0_2;
|
|
get = binding.get;
|
|
const value5 = Reflect.apply(get, binding, []).width - 48;
|
|
get = binding.get;
|
|
const items3 = [{scale: Reflect.apply(withSpring, SpringModule, [Reflect.apply(interpolate, ReanimatedRexportModule, [value4,
|
|
[0, 1], [1, value5 / Reflect.apply(get, binding, []).width]]), LAUNCH_PAD_SPRING_CONFIG, 'animate-always'])}];
|
|
value = SpringModule;
|
|
withSpring = value.withSpring;
|
|
items3[1] = {translateY: Reflect.apply(withSpring, value,
|
|
[ReanimatedRexportModule.interpolate(launchPadSharedStateBinding.get(), [0, 1], [0, -4]), LAUNCH_PAD_SPRING_CONFIG,
|
|
'animate-always'])};
|
|
object.transform = items3;
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun117059, 15313, [31, 27, 11324, 33, 4501, 11325, 15314, 15316, 14283, 4017, 4577, 4013, 14366, 5321,
|
|
15317,
|
|
2]) /* metro module 15313, dependencies: [31, 27, 11324, 33, 4501, 11325, 15314, 15316, 14283, 4017, 4577, 4013, 14366, 5321, 15317, 2] */;
|