116 lines
7.1 KiB
TypeScript
116 lines
7.1 KiB
TypeScript
/* Metro module 8561; source: design/components/Button/native/FloatingActionButton.native.tsx; dependencies: [31, 33, 4501, 697, 4582, 1357, 4017, 4577, 8342, 2] */
|
|
import MobileVisualRefreshExperiment from '../../../../modules/themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
|
|
import ReanimatedRexport from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
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 ReanimatedRexportModule from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as CreateStylesModule from '../../Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as SpringModule from '../../../animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
|
|
import * as ButtonConstantsNativeModule from './ButtonConstants.native.tsx'; /* Metro dependency 4582 */
|
|
import * as BaseIconButtonNativeModule from './BaseIconButton.native.tsx'; /* Metro dependency 8342 */
|
|
|
|
function _fun67813(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8746:6, offset: 0x01c32879, size: 220 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = CreateStylesModule;
|
|
value = value.createStyles(_fun67814);
|
|
const env0_6 = {'mass': 0.5, 'damping': 80, 'stiffness': 320};
|
|
object = {code: "function FloatingActionButtonNativeTsx1(){const{withSpring,positionBottom,DEFAULT_POSITION_OFFSET,SPRING_CONFIG,positionRight}=this.__closure;var _positionBottom,_positionRight;return{position:'absolute',bottom:withSpring((_positionBottom=positionBottom)!==null&&_positionBottom!==void 0?_positionBottom:DEFAULT_POSITION_OFFSET,SPRING_CONFIG),right:withSpring((_positionRight=positionRight)!==null&&_positionRight!==void 0?_positionRight:DEFAULT_POSITION_OFFSET,SPRING_CONFIG)};}"};
|
|
(FileImportTrackerModule).fileFinishedImporting('design/components/Button/native/FloatingActionButton.native.tsx');
|
|
exports.DEFAULT_POSITION_OFFSET = 16;
|
|
exports.useStyles = value;
|
|
exports.FloatingActionButton = FloatingActionButton;
|
|
function _fun67814() { // fn#67814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8746:144, offset: 0x01c32955, size: 178 bytes, params: 1, frame: 19
|
|
var object;
|
|
const value = a0;
|
|
let r2 = value !== undefined ? value : false;
|
|
const object2 = {};
|
|
const object3 = {};
|
|
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
|
|
copyDataProperties(object3, SHADOW_HIGH, undefined);
|
|
object2.button = object3;
|
|
const object5 = {};
|
|
const FAB_BUTTON_SIZE = (ButtonConstantsNativeModule).FAB_BUTTON_SIZE;
|
|
object5.minWidth = FAB_BUTTON_SIZE;
|
|
const FAB_BUTTON_SIZE2 = (ButtonConstantsNativeModule).FAB_BUTTON_SIZE;
|
|
object5.minHeight = FAB_BUTTON_SIZE2;
|
|
object5.padding = 0;
|
|
if (r2) {
|
|
object = {};
|
|
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
r2 = object;
|
|
} else {
|
|
r2 = {};
|
|
}
|
|
copyDataProperties(object5, r2, FAB_BUTTON_SIZE);
|
|
object2.iconButtonPill = object5;
|
|
return object2;
|
|
}
|
|
|
|
function FloatingActionButton(a0) { // fn#67815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8746:1023, offset: 0x01c32a07, size: 446 bytes, params: 2, frame: 27
|
|
var r8;
|
|
var cloneElement;
|
|
const icon = a0.icon;
|
|
const positionBottom = a0.positionBottom;
|
|
const positionRight = a0.positionRight;
|
|
const accessibilityLabel = a0.accessibilityLabel;
|
|
let object = {'icon': 0, 'positionBottom': 0, 'positionRight': 0, 'accessibilityLabel': 0};
|
|
silentSetPrototypeOf(object, null, undefined);
|
|
const value = copyDataProperties({}, a0, object, undefined);
|
|
const styles = useStyles((MobileVisualRefreshExperiment)('FloatingActionButton'));
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
const FloatingActionButtonF2 = FloatingActionButtonF;
|
|
const object2 = {};
|
|
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
|
object2.positionBottom = positionBottom;
|
|
object2.DEFAULT_POSITION_OFFSET = 16;
|
|
object2.SPRING_CONFIG = env0_6;
|
|
object2.positionRight = positionRight;
|
|
FloatingActionButtonF2.__closure = object2;
|
|
FloatingActionButtonF2.__workletHash = 10762818944671;
|
|
FloatingActionButtonF2.__initData = env0_7;
|
|
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [FloatingActionButtonF2]);
|
|
const View = (ReanimatedRexport).View;
|
|
const BaseIconButton = (BaseIconButtonNativeModule).BaseIconButton;
|
|
const baseIconButtonProps = {...value};
|
|
baseIconButtonProps['accessibilityLabel'] = accessibilityLabel;
|
|
baseIconButtonProps['size'] = 'lg';
|
|
baseIconButtonProps['variant'] = 'primary';
|
|
let binding = ReactModule;
|
|
if (binding.isValidElement(icon)) {
|
|
binding = ReactModule;
|
|
cloneElement = binding.cloneElement;
|
|
object = {};
|
|
object.color = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
|
r8 = Reflect.apply(cloneElement, binding, [icon, object]);
|
|
} else {
|
|
r8 = icon;
|
|
}
|
|
baseIconButtonProps['icon'] = r8;
|
|
baseIconButtonProps['style'] = styles.button;
|
|
baseIconButtonProps['pillStyle'] = styles.iconButtonPill;
|
|
return (
|
|
<View style={value4}>
|
|
<BaseIconButton {...baseIconButtonProps} />
|
|
</View>
|
|
);
|
|
function FloatingActionButtonF() { // fn#67816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8746:1200, owner: FloatingActionButton.F, offset: 0x01c32bc5, size: 133 bytes, params: 1, frame: 20
|
|
const object = {position: 'absolute'};
|
|
const withSpring = SpringModule.withSpring;
|
|
const positionBottomBinding = positionBottom;
|
|
const value3 = 16;
|
|
object.bottom = Reflect.apply(withSpring, SpringModule, [positionBottomBinding != null ? positionBottom : value3,
|
|
env1_6]);
|
|
object.right = SpringModule.withSpring(positionRight ?? value3, env1_6);
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun67813, 8561, [31, 33, 4501, 697, 4582, 1357, 4017, 4577, 8342,
|
|
2]) /* metro module 8561, dependencies: [31, 33, 4501, 697, 4582, 1357, 4017, 4577, 8342, 2] */;
|