59 lines
2.3 KiB
TypeScript
59 lines
2.3 KiB
TypeScript
// Metro module 12301 (f12302).
|
|
import { useEffect } from "react";
|
|
import * as _ReanimatedRexport from "../../reanimated/ReanimatedRexport";
|
|
import { useSharedValue, useAnimatedStyle } from "../../reanimated/ReanimatedRexport";
|
|
import { useMediaViewerDimensions } from "./MediaViewerDimensionsContext";
|
|
import { withTiming } from "../../../design/animation/reanimated/timing/timing";
|
|
import { STANDARD_EASING } from "../../../design/void/native";
|
|
const __initData = {
|
|
code: "function useOverlayLayoutDriverTsx1(){const{interpolate,animationDriver}=this.__closure;return{transform:[{translateY:interpolate(animationDriver.get(),[0,0.75,1],[-50,-50,0])}],opacity:interpolate(animationDriver.get(),[0,0.75,1],[0,0,1])};}"
|
|
};
|
|
const __initData2 = {
|
|
code: "function useOverlayLayoutDriverTsx2(){const{interpolate,animationDriver}=this.__closure;return{transform:[{translateY:interpolate(animationDriver.get(),[0,0.75,1],[50,50,0])}],opacity:interpolate(animationDriver.get(),[0,0.75,1],[0,0,1])};}"
|
|
};
|
|
export function useOverlayLayoutDriver() {
|
|
const sharedValue = useSharedValue(0);
|
|
const mediaViewerDimensions = useMediaViewerDimensions();
|
|
useEffect(() => {
|
|
sharedValue.set(withTiming(1, {
|
|
duration: 300,
|
|
easing: STANDARD_EASING
|
|
}));
|
|
}, [sharedValue, mediaViewerDimensions.height, mediaViewerDimensions.width]);
|
|
return sharedValue;
|
|
}
|
|
export function useHeaderLayoutAnimation(a0) {
|
|
const r11 = function() {
|
|
return {
|
|
transform: [{
|
|
translateY: _ReanimatedRexport.interpolate(a0.get(), [0, 0.75, 1], [-50, -50, 0])
|
|
}],
|
|
opacity: _ReanimatedRexport.interpolate(a0.get(), [0, 0.75, 1], [0, 0, 1])
|
|
};
|
|
};
|
|
r11.__closure = {
|
|
interpolate: _ReanimatedRexport.interpolate,
|
|
animationDriver: a0
|
|
};
|
|
r11.__workletHash = 13622939479876;
|
|
r11.__initData = __initData;
|
|
return useAnimatedStyle(r11);
|
|
}
|
|
export function useFooterLayoutAnimation(a0) {
|
|
const n = function n() {
|
|
return {
|
|
transform: [{
|
|
translateY: _ReanimatedRexport.interpolate(a0.get(), [0, 0.75, 1], [50, 50, 0])
|
|
}],
|
|
opacity: _ReanimatedRexport.interpolate(a0.get(), [0, 0.75, 1], [0, 0, 1])
|
|
};
|
|
};
|
|
n.__closure = {
|
|
interpolate: _ReanimatedRexport.interpolate,
|
|
animationDriver: a0
|
|
};
|
|
n.__workletHash = 15220711492711;
|
|
n.__initData = __initData2;
|
|
return useAnimatedStyle(n);
|
|
}
|