decord/source/1865_sharedValue.js

54 lines
2.1 KiB
JavaScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 1865
// Function ID: 1866
2026-07-29 08:29:29 +00:00
// Name: sharedValue
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 1654, 1843]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-15 05:55:55 +00:00
// Module 1865 (sharedValue)
2026-08-24 06:08:38 +00:00
import noop from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
({ useCallback: obj1, useEffect: c3 } = noop);
2026-07-23 10:11:24 +00:00
let closure_4 = ["onScroll", "onScrollBeginDrag", "onScrollEndDrag", "onMomentumScrollBegin", "onMomentumScrollEnd"];
2026-07-20 16:05:17 +00:00
let closure_5 = { code: "function pnpm_useScrollStateTs1(event){const{offset,layout,size}=this.__closure;offset.value=event.contentOffset.y;layout.value=event.layoutMeasurement;size.value=event.contentSize;}" };
2026-07-29 08:29:29 +00:00
export default function _default(arg0) {
2026-07-23 10:11:24 +00:00
let obj = sharedValue(sharedValue1[1]);
sharedValue = obj.useSharedValue(0);
sharedValue1 = sharedValue(sharedValue1[1]).useSharedValue({ width: 0, height: 0 });
const obj2 = sharedValue(sharedValue1[1]);
const sharedValue2 = sharedValue(sharedValue1[1]).useSharedValue({ width: 0, height: 0 });
const obj3 = sharedValue(sharedValue1[1]);
const callback = sharedValue(sharedValue1[2]).useEventHandlerRegistration(arg0);
const obj4 = sharedValue(sharedValue1[2]);
2026-07-29 08:29:29 +00:00
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 = closure_5;
closure_4 = sharedValue(sharedValue1[1]).useEvent(fn, closure_4);
2026-07-20 16:05:17 +00:00
callback(() => {
2026-08-24 06:08:38 +00:00
closure_0 = callback(closure_4);
2026-07-20 16:05:17 +00:00
return () => {
callback();
};
}, []);
const items = [sharedValue1];
const items1 = [sharedValue2];
2026-07-23 10:11:24 +00:00
const obj5 = sharedValue(sharedValue1[1]);
2026-07-20 16:05:17 +00:00
obj = {
offset: sharedValue,
layout: sharedValue1,
size: sharedValue2,
onLayout: sharedValue2((nativeEvent) => {
sharedValue1.value = { width: nativeEvent.nativeEvent.layout.width, height: nativeEvent.nativeEvent.layout.height };
}, items),
onContentSizeChange: sharedValue2((width, height) => {
sharedValue2.value = { width, height };
}, items1)
};
return obj;
};