This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,54 @@
// Metro module 15846 (f15847).
import { OrientationLockState } from "../../../Constants";
import { LANDSCAPE_ACTIVITY_ASPECT_RATIO } from "../../ActivityPanelConstants";
import roundToNearestPixel from "../../../../voice_panel/native/utils/roundToNearestPixel";
const t = function t(a0) {
let marginLeft, marginTop, shouldHorizontallyCenter, shouldVerticallyCenter, width;
const pipWidth = a0.pipWidth;
let pipHeight = a0.pipHeight;
let pipOrientationLockState = a0.pipOrientationLockState;
const isLandscape = a0.isLandscape;
if (pipOrientationLockState == null) {
pipOrientationLockState = OrientationLockState.UNLOCKED;
}
L7: {
L6: {
if (pipOrientationLockState !== OrientationLockState.PORTRAIT) {
if (pipOrientationLockState === OrientationLockState.UNLOCKED && !isLandscape) {
break L6;
}
width = pipHeight * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
marginLeft = -1 * roundToNearestPixel(width / 2);
marginTop = 0;
shouldVerticallyCenter = false;
shouldHorizontallyCenter = true;
break L7;
}
}
const r31 = pipWidth * LANDSCAPE_ACTIVITY_ASPECT_RATIO;
marginTop = -1 * roundToNearestPixel(r31 / 2);
marginLeft = 0;
shouldVerticallyCenter = true;
shouldHorizontallyCenter = false;
pipHeight = r31;
width = pipWidth;
}
return {
width,
height: pipHeight,
shouldHorizontallyCenter,
shouldVerticallyCenter,
marginLeft,
marginTop
};
};
t.__closure = {
OrientationLockState,
LANDSCAPE_ACTIVITY_ASPECT_RATIO,
roundToNearestPixel
};
t.__workletHash = 7141745103186;
t.__initData = {
code: "function getActivityContainerPipStylesSpec_getActivityContainerPIPStylesSpecTsx1({pipWidth:pipWidth,pipHeight:pipHeight,pipOrientationLockState:pipOrientationLockState,isLandscape:isLandscape}){const{OrientationLockState,LANDSCAPE_ACTIVITY_ASPECT_RATIO,roundToNearestPixel}=this.__closure;const nonNullPipOrientationLockState=pipOrientationLockState!==null&&pipOrientationLockState!==void 0?pipOrientationLockState:OrientationLockState.UNLOCKED;const shouldUsePortraitAspectRatio=nonNullPipOrientationLockState===OrientationLockState.PORTRAIT||nonNullPipOrientationLockState===OrientationLockState.UNLOCKED&&!isLandscape;let width=pipWidth;let height=pipHeight;let shouldHorizontallyCenter=false;let shouldVerticallyCenter=false;let marginLeft=0;let marginTop=0;if(shouldUsePortraitAspectRatio){width=pipWidth;height=width*LANDSCAPE_ACTIVITY_ASPECT_RATIO;shouldVerticallyCenter=true;marginTop=roundToNearestPixel(height/2)*-1;}else{height=pipHeight;width=height*LANDSCAPE_ACTIVITY_ASPECT_RATIO;shouldHorizontallyCenter=true;marginLeft=roundToNearestPixel(width/2)*-1;}return{width:width,height:height,shouldHorizontallyCenter:shouldHorizontallyCenter,shouldVerticallyCenter:shouldVerticallyCenter,marginLeft:marginLeft,marginTop:marginTop};}"
};
export default t;
@@ -0,0 +1,61 @@
// Metro module 15836 (f15837).
import { useSharedValue, useAnimatedReaction } from "../../../../reanimated/ReanimatedRexport";
import useAnimatedKeyboardHeight from "../../../../keyboard/native/useAnimatedKeyboardHeight";
import useScreenNameSharedValue from "../../../../panels/morphable/native/useScreenNameSharedValue";
import * as _cheapWorkletShallowEqual from "../../../../reanimated/native/cheapWorkletShallowEqual";
import getPIPBottomOffsetForPIPMode from "../../../../panels/morphable/native/getPIPBottomOffsetForPIPMode";
import getAdjustedBottomOffsets from "../../../../panels/morphable/native/getAdjustedBottomOffsets";
import updateSharedValueIfChanged_native from "../../../../reanimated/utils/updateSharedValueIfChanged.native";
const __initData = {
code: "function usePIPAvoidanceSpecsTsx1(){const{keyboardHeight,safeArea,screenName}=this.__closure;return{keyboardHeight:keyboardHeight.get(),safeAreaBottom:safeArea.bottom,screenName:screenName.get()};}"
};
const __initData2 = {
code: "function usePIPAvoidanceSpecsTsx2(props,previous){const{cheapWorkletShallowEqual,getPIPBottomOffsetForPIPMode,getAdjustedBottomOffsets,updateSharedValueIfChanged,pipAvoidanceSpecs}=this.__closure;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const{keyboardHeight:keyboardHeight,safeAreaBottom:safeAreaBottom,screenName:screenName}=props;const screenBottomOffset=getPIPBottomOffsetForPIPMode(screenName);const{bottomOffset:bottomOffset}=getAdjustedBottomOffsets({screenBottomOffset:screenBottomOffset,safeAreaBottom:safeAreaBottom,keyboardHeight:keyboardHeight});updateSharedValueIfChanged(pipAvoidanceSpecs,{top:0,bottom:bottomOffset});}"
};
export default function usePIPAvoidanceSpecs(a0) {
let c22500_0 = a0;
const sharedValue = useSharedValue({
top: 0,
bottom: 0
});
const animatedKeyboardHeight = useAnimatedKeyboardHeight();
let c22500_2 = animatedKeyboardHeight;
const screenNameSharedValue = useScreenNameSharedValue();
let c22500_3 = screenNameSharedValue;
const n = () => ({
keyboardHeight: c22500_2.get(),
safeAreaBottom: c22500_0.bottom,
screenName: c22500_3.get()
});
n.__closure = {
keyboardHeight: animatedKeyboardHeight,
safeArea: a0,
screenName: screenNameSharedValue
};
n.__workletHash = 9790941132204;
n.__initData = __initData;
const f = function f(a0, a1) {
if (!_cheapWorkletShallowEqual.cheapWorkletShallowEqual(a0, a1 == null ? void 0 : a1)) {
const { keyboardHeight, safeAreaBottom } = a0;
updateSharedValueIfChanged_native(sharedValue, {
top: 0,
bottom: getAdjustedBottomOffsets({
screenBottomOffset: getPIPBottomOffsetForPIPMode(a0.screenName),
safeAreaBottom,
keyboardHeight
}).bottomOffset
});
}
};
f.__closure = {
cheapWorkletShallowEqual: _cheapWorkletShallowEqual.cheapWorkletShallowEqual,
getPIPBottomOffsetForPIPMode,
getAdjustedBottomOffsets,
updateSharedValueIfChanged: updateSharedValueIfChanged_native,
pipAvoidanceSpecs: sharedValue
};
f.__workletHash = 643938425459;
f.__initData = __initData2;
useAnimatedReaction(n, f);
return sharedValue;
};