decord/source/__polyfill/06xxx/module_6744.js
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

83 lines
2.3 KiB
JavaScript

// Module ID: 6744
// Function ID: 6745
// Dependencies: [19, 1636, 6729, 6745]
// Exports: useScrollable
// Module 6744
import normalizeSnapPoint from "normalizeSnapPoint" /* 6745 */;
import noop from "module_19" /* 19 */;
const require = globalThis.__r;
({ useCallback: c2, useRef: c3 } = noop);
export const useScrollable = () => {
const tmp = closure_3(null);
_require = tmp;
dependencyMap = closure_3(null);
const sharedValue = require("cancelAnimation").useSharedValue(require("value2").SCROLLABLE_TYPE.UNDETERMINED);
const obj = require("cancelAnimation");
const sharedValue1 = require("cancelAnimation").useSharedValue(0);
const obj2 = require("cancelAnimation");
const sharedValue2 = require("cancelAnimation").useSharedValue(require("value2").SCROLLABLE_STATE.UNDETERMINED);
const obj3 = require("cancelAnimation");
const sharedValue3 = require("cancelAnimation").useSharedValue(false);
const obj4 = require("cancelAnimation");
const tmp6 = closure_2((id) => {
const current = ref.current;
id = undefined;
if (current != null) {
id = current.id;
}
if (id == null) {
id = null;
}
if (id !== id.id) {
if (tmp.current) {
closure_1.current = tmp.current;
}
tmp.current = id;
}
}, []);
return {
scrollableRef: tmp,
animatedScrollableType: sharedValue,
animatedScrollableContentOffsetY: sharedValue1,
animatedScrollableOverrideState: sharedValue2,
isScrollableRefreshable: sharedValue3,
setScrollableRef: closure_2((id) => {
const current = ref.current;
id = undefined;
if (current != null) {
id = current.id;
}
if (id == null) {
id = null;
}
if (id !== id.id) {
if (tmp.current) {
closure_1.current = tmp.current;
}
tmp.current = id;
}
}, []),
removeScrollableRef: closure_2((current) => {
try {
const findNodeHandleResult = normalizeSnapPoint.findNodeHandle(current.current);
current = ref.current;
let id;
if (current != null) {
id = current.id;
}
if (id == null) {
id = null;
}
if (findNodeHandleResult === id) {
ref.current = ref2.current;
}
} catch (err) {
return tmp;
}
}, [])
};
};