Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,117 @@
|
||||
/* Metro module 4588; source: design/components/Button/native/ButtonShine.native.tsx; dependencies: [57, 31, 33, 4583, 674, 4002, 4017, 4504, 4501, 2] */
|
||||
function _fun38907(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:6, offset: 0x010d09b4, size: 189 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = useShineEffectStyles;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object = {code: "function ButtonShineNativeTsx1(){const{width,SHINE_OFFSCREEN_OFFSET,useReducedMotion,SHINE_WIDTH,withRepeat,withSequence,withTiming,withDelay,SHINE_INITIAL_ANIMATION_DELAY,SHINE_ANIMATION_DURATION}=this.__closure;if(width==null){return{transform:[{translateX:-SHINE_OFFSCREEN_OFFSET}]};}if(useReducedMotion){const centerOffset=(width-SHINE_WIDTH)/2;return{transform:[{translateX:centerOffset}]};}return{transform:[{translateX:withRepeat(withSequence(withTiming(-SHINE_OFFSCREEN_OFFSET,{duration:0},'animate-always'),withDelay(SHINE_INITIAL_ANIMATION_DELAY,withTiming(width+SHINE_OFFSCREEN_OFFSET,{duration:SHINE_ANIMATION_DURATION},'animate-always'))),-1)}]};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Button/native/ButtonShine.native.tsx');
|
||||
exports.useShineEffectStyles = closure;
|
||||
exports.ButtonShine = ButtonShine;
|
||||
}
|
||||
|
||||
function useShineEffectStyles(a0, a1) { // fn#38908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:804, offset: 0x010d0a71, size: 487 bytes, params: 3, frame: 20
|
||||
const env0_0 = a0;
|
||||
const value5 = (importDefault(674) /* metro dependency 674 */)((require(4583) /* metro dependency 4583: ButtonHooksNative */).useButtonTextColorStyles(a1).color).alpha(0.1).hex();
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const AccessibilityPreferencesContext = (require(4002) /* metro dependency 4002: shared */).AccessibilityPreferencesContext;
|
||||
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = useShineEffectStylesO;
|
||||
let object2 = {width: a0, SHINE_OFFSCREEN_OFFSET: 120, useReducedMotion: enabled, SHINE_WIDTH: 56};
|
||||
object2.withRepeat = reanimatedRexportModule.withRepeat;
|
||||
object2.withSequence = reanimatedRexportModule.withSequence;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.withDelay = reanimatedRexportModule.withDelay;
|
||||
object2.SHINE_INITIAL_ANIMATION_DELAY = 750;
|
||||
object2.SHINE_ANIMATION_DURATION = 2000;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 15814138938406;
|
||||
closure.__initData = env0_6;
|
||||
const value = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
object2 = {};
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
object2.shineStyles = createStylesModule.createStyles({shineContainer: {'width': '100%', 'height': '200%',
|
||||
'position': 'absolute', 'overflow': 'hidden'}, shine: {'width': 56, 'height': '500%', 'transform': null,
|
||||
'backgroundColor': null, 'top': '-100%', 'alignItems': 'center', transform: [{rotate: '30deg'}],
|
||||
backgroundColor: value5}, shineInner: {'width': 16, 'height': '100%', backgroundColor: value5}})();
|
||||
object2.shineAnimatedStyle = value;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function ButtonShine({variant}) { // fn#38910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:2109, offset: 0x010d0d87, size: 226 bytes, params: 2, frame: 20
|
||||
const [property, env0_0] = env0_3(env0_4.useState(null), 2);
|
||||
const {shineStyles, shineAnimatedStyle} = useShineEffectStyles(property, variant);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const viewProps = {onLayout: onLayout_38911, style: [shineStyles.shineContainer, shineAnimatedStyle]};
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const shine = shineStyles.shine;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View {...viewProps}>
|
||||
<View2 style={shine}>
|
||||
<View3 style={shineStyles.shineInner} />
|
||||
</View2>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function useShineEffectStylesO() { // fn#38909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:1027, owner: useShineEffectStyles.o, offset: 0x010d0c58, size: 303 bytes, params: 1, frame: 27
|
||||
var r0;
|
||||
var enabledBinding;
|
||||
var object3;
|
||||
var object4;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var withRepeat;
|
||||
var moduleValue2;
|
||||
var withSequence;
|
||||
var withTiming;
|
||||
var value3;
|
||||
var moduleValue4;
|
||||
var withDelay;
|
||||
var moduleValue5;
|
||||
var value;
|
||||
if (env0_0 == null) {
|
||||
r0 = {transform: [{translateX: -120}]};
|
||||
} else {
|
||||
enabledBinding = enabled;
|
||||
object3 = {};
|
||||
object4 = {};
|
||||
if (enabledBinding) {
|
||||
object4.translateX = (env0_0 - 56) / 2;
|
||||
object3.transform = [object4];
|
||||
r0 = object3;
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withRepeat = moduleValue.withRepeat;
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withSequence = moduleValue2.withSequence;
|
||||
value3 = (require(4504) /* metro dependency 4504: timing */).withTiming(-120, {duration: 0},
|
||||
'animate-always');
|
||||
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withDelay = moduleValue4.withDelay;
|
||||
moduleValue5 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue5.withTiming;
|
||||
value = env0_0 + 120;
|
||||
value = Reflect.apply(withTiming, moduleValue5, [value, {duration: 2000}, 'animate-always']);
|
||||
value = Reflect.apply(withSequence, moduleValue2, [value3, Reflect.apply(withDelay, moduleValue4, [750,
|
||||
value])]);
|
||||
object4.translateX = Reflect.apply(withRepeat, moduleValue, [value, -1]);
|
||||
object3.transform = [object4];
|
||||
r0 = object3;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ButtonShineOnLayout({nativeEvent}) { // fn#38911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4766:2288, owner: ButtonShine.onLayout, offset: 0x010d0e69, size: 36 bytes, params: 2, frame: 11
|
||||
return env0_0(nativeEvent.layout.width);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user