decord/source/415_useAndroidRippleForView.js

93 lines
2.6 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 415
// Function ID: 416
// Name: useAndroidRippleForView
// Dependencies: [19, 50, 112]
// Exports: default
// Module 415 (useAndroidRippleForView)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import { useMemo } from "noop" /* 19 */;
2026-07-29 08:29:29 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
export default function useAndroidRippleForView(arg0, arg1) {
let obj = arg0;
2026-08-24 06:08:38 +00:00
closure_0 = arg1;
2026-07-29 08:29:29 +00:00
if (arg0 == null) {
obj = {};
}
const color = obj.color;
const borderless = obj.borderless;
const radius = obj.radius;
({ cornerRadius: closure_4, foreground } = obj);
const alpha = obj.alpha;
const items = [alpha, borderless, color, foreground, radius, arg1];
return radius(() => {
if (null == color) {
if (null == borderless) {
if (null == radius) {
return null;
}
}
}
let obj = { type: "RippleAndroid", color: color(borderless[1])(color), borderless: true === borderless, rippleRadius: radius, rippleCornerRadius: closure_4, alpha: null };
let tmp4 = alpha;
if (alpha == null) {
tmp4 = null;
}
obj[5] = tmp4;
if (true === foreground) {
obj = { nativeForegroundAndroid: null };
obj[0] = obj;
} else {
obj = { nativeBackgroundAndroid: null };
obj[0] = obj;
}
return {
viewProps: obj,
onPressIn(nativeEvent) {
const current = ref.current;
if (null != current) {
2026-08-24 06:08:38 +00:00
const Commands = closure_1_0(closure_1_2[2]).Commands;
2026-07-29 08:29:29 +00:00
let num = nativeEvent.nativeEvent.locationX;
if (num == null) {
num = 0;
}
let num2 = nativeEvent.nativeEvent.locationY;
if (num2 == null) {
num2 = 0;
}
Commands.hotspotUpdate(current, num, num2);
2026-08-24 06:08:38 +00:00
const Commands2 = closure_1_0(closure_1_2[2]).Commands;
2026-07-29 08:29:29 +00:00
Commands2.setPressed(current, true);
2026-08-24 06:08:38 +00:00
const tmp2 = closure_1_0;
const tmp3 = closure_1_2;
2026-07-29 08:29:29 +00:00
}
},
onPressMove(nativeEvent) {
const current = ref.current;
if (null != current) {
2026-08-24 06:08:38 +00:00
const Commands = closure_1_0(closure_1_2[2]).Commands;
2026-07-29 08:29:29 +00:00
let num = nativeEvent.nativeEvent.locationX;
if (num == null) {
num = 0;
}
let num2 = nativeEvent.nativeEvent.locationY;
if (num2 == null) {
num2 = 0;
}
Commands.hotspotUpdate(current, num, num2);
}
},
onPressOut(arg0) {
const current = ref.current;
if (null != current) {
2026-08-24 06:08:38 +00:00
const Commands = closure_1_0(closure_1_2[2]).Commands;
2026-07-29 08:29:29 +00:00
Commands.setPressed(current, false);
}
}
};
}, items);
};