Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
52 lines
2.1 KiB
JavaScript
52 lines
2.1 KiB
JavaScript
// Module ID: 1847
|
|
// Function ID: 1848
|
|
// Dependencies: [19, 1636, 1825]
|
|
// Exports: default
|
|
|
|
// Module 1847
|
|
import cancelAnimation from "cancelAnimation" /* 1636 */;
|
|
import _mod1825 from "module_1825" /* 1825 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
({ useCallback: c2, useEffect: c3 } = noop);
|
|
let closure_4 = ["onScroll", "onScrollBeginDrag", "onScrollEndDrag", "onMomentumScrollBegin", "onMomentumScrollEnd"];
|
|
const __initData = { code: "function pnpm_useScrollStateTs1(event){const{offset,layout,size}=this.__closure;offset.value=event.contentOffset.y;layout.value=event.layoutMeasurement;size.value=event.contentSize;}" };
|
|
|
|
export default function _default(arg0) {
|
|
const sharedValue = cancelAnimation.useSharedValue(0);
|
|
const sharedValue1 = cancelAnimation.useSharedValue({ width: 0, height: 0 });
|
|
const sharedValue2 = cancelAnimation.useSharedValue({ width: 0, height: 0 });
|
|
closure_3 = _mod1825.useEventHandlerRegistration(arg0);
|
|
const fn = function l(contentOffset) {
|
|
sharedValue.value = contentOffset.contentOffset.y;
|
|
sharedValue1.value = contentOffset.layoutMeasurement;
|
|
sharedValue2.value = contentOffset.contentSize;
|
|
};
|
|
fn.__closure = { offset: sharedValue, layout: sharedValue1, size: sharedValue2 };
|
|
fn.__workletHash = 10534434800111;
|
|
fn.__initData = __initData;
|
|
closure_4 = cancelAnimation.useEvent(fn, closure_4);
|
|
React3(() => {
|
|
closure_0 = closure_3(closure_4);
|
|
return () => {
|
|
closure_0();
|
|
};
|
|
}, []);
|
|
const items = [sharedValue1];
|
|
const items1 = [sharedValue2];
|
|
const tmp5 = React2((nativeEvent) => {
|
|
sharedValue1.value = { width: nativeEvent.nativeEvent.layout.width, height: nativeEvent.nativeEvent.layout.height };
|
|
}, items);
|
|
return {
|
|
offset: sharedValue,
|
|
layout: sharedValue1,
|
|
size: sharedValue2,
|
|
onLayout: React2((nativeEvent) => {
|
|
sharedValue1.value = { width: nativeEvent.nativeEvent.layout.width, height: nativeEvent.nativeEvent.layout.height };
|
|
}, items),
|
|
onContentSizeChange: React2((width, height) => {
|
|
const size = { width, height };
|
|
sharedValue2.value = size;
|
|
}, items1)
|
|
};
|
|
};
|