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,102 @@
// Metro module 1475 (f1476).
import { Dimensions } from "react-native";
import subscribeToKeyboardUIStore from "../../keyboard/native/subscribeToKeyboardUIStore";
import { readWindowSizeForAppEntry, readScreenSizeForAppEntry } from "./readAppEntryWindowMetrics.android";
import { getSafeAreaInsets } from "../../safe_area/useSafeAreaInsets.native";
import { getSystemKeyboardHeight } from "../../keyboard/native/useSystemKeyboardHeight.native";
import { APP_ENTRY_KEYS } from "../../window/native/AppEntryKey";
import { batchUpdates } from "../../../_bundle/Module705";
import { create } from "../../../_bundle/Module644";
import SafeAreaStore_native from "../../safe_area/SafeAreaStore.native";
let getDimensionsStoreState, c1191_5, $mk69260 = function() {
return () => c1191_5.setState((state) => getDimensionsStoreState(state));
};
const getDimensionsStoreStateForEntry = function getDimensionsStoreStateForEntry(item, a1) {
const r11 = {
...Dimensions.get("window"),
...readWindowSizeForAppEntry(item)
};
let r10 = readScreenSizeForAppEntry(item);
if (r10 == null) {
r10 = Dimensions.get("screen");
}
let r37 = a1;
const fontScale = r11.fontScale;
const screenIsLandscape = r10.width > r10.height;
let windowDimensions = a1?.windowDimensions;
let windowDimensionsIgnoringKeyboard = a1?.windowDimensionsIgnoringKeyboard;
const { width: width2, height } = r11;
const { width, height: height2 } = r10;
const safeAreaInsets = getSafeAreaInsets(item);
let r19 = height2;
let r20 = width;
if (height2 === width2) {
r19 = width;
r20 = height2;
}
const width5 = Math.min(width2 + safeAreaInsets.left + safeAreaInsets.right, r20);
const height5 = Math.min(height + safeAreaInsets.top + safeAreaInsets.bottom - getSystemKeyboardHeight({
appEntryKey: item
}), r19);
if (!(windowDimensions?.width === width5 && windowDimensions.height === height5)) {
windowDimensions = {
width: width5,
height: height5
};
}
const { width: width3, height: height3 } = r11;
const { width: width4, height: height4 } = r10;
const safeAreaInsets2 = getSafeAreaInsets(item);
let r78 = height4;
let r79 = width4;
if (height4 === width3) {
r78 = width4;
r79 = height4;
}
const width6 = Math.min(width3 + safeAreaInsets2.left + safeAreaInsets2.right, r79);
const height6 = Math.min(height3 + safeAreaInsets2.top + safeAreaInsets2.bottom - 0, r78);
if (!(windowDimensionsIgnoringKeyboard?.width === width6 && windowDimensionsIgnoringKeyboard.height === height6)) {
windowDimensionsIgnoringKeyboard = {
width: width6,
height: height6
};
}
if (!(a1?.windowDimensions === windowDimensions && (a1.windowDimensionsIgnoringKeyboard === windowDimensionsIgnoringKeyboard && (a1.fontScale === fontScale && a1.screenIsLandscape === screenIsLandscape)))) {
r37 = {
fontScale,
screenIsLandscape,
windowDimensions,
windowDimensionsIgnoringKeyboard
};
}
return r37;
};
getDimensionsStoreState = function getDimensionsStoreState(a0) {
let r0 = a0;
const byAppEntry = {};
let r29 = a0 != null;
for (const item of APP_ENTRY_KEYS) {
const dimensionsStoreStateForEntry = getDimensionsStoreStateForEntry(item, a0 == null ? void 0 : a0.byAppEntry[item]);
byAppEntry[item] = dimensionsStoreStateForEntry;
if ((a0 == null ? void 0 : a0.byAppEntry[item]) !== dimensionsStoreStateForEntry) {
r29 = false;
}
}
if (!(r29 && a0 != null)) {
r0 = {
byAppEntry
};
}
return r0;
};
c1191_5 = create(() => getDimensionsStoreState(void 0));
SafeAreaStore_native.subscribe(() => {
batchUpdates($mk69260());
});
subscribeToKeyboardUIStore(() => {
batchUpdates($mk69260());
});
Dimensions.addEventListener("change", () => {
batchUpdates($mk69260());
});
export default c1191_5;
+17
View File
@@ -0,0 +1,17 @@
// Metro module 9303 (f9304).
import "../../../_bundle/Module9304";
const __measureInWindowForFWO = global.__measureInWindowForFWO;
export function measureInWindowForFWO(a0) {
let r6 = __measureInWindowForFWO == null ? void 0 : __measureInWindowForFWO(a0);
if (r6 == null) {
r6 = null;
}
return r6;
}
measureInWindowForFWO.__closure = {
_measureInWindowForFWO: __measureInWindowForFWO
};
measureInWindowForFWO.__workletHash = 12993496951221;
measureInWindowForFWO.__initData = {
code: "function measureInWindowForFWO_FWOMeasureUtilsTsx1(tag){const{_measureInWindowForFWO}=this.__closure;var _measureInWindowForFW,_measureInWindowForFW2;return(_measureInWindowForFW=(_measureInWindowForFW2=_measureInWindowForFWO)===null||_measureInWindowForFW2===void 0?void 0:_measureInWindowForFW2(tag))!==null&&_measureInWindowForFW!==void 0?_measureInWindowForFW:null;}"
};
@@ -0,0 +1,19 @@
// Metro module 10890 (f10891).
import { DM_WIDTH } from "../../../../Constants";
import useBaseAppContainerDimensions, { getBaseAppContainerDimensions } from "../useBaseAppContainerDimensions";
import useChatLayout, { getChatLayout } from "../../../chat/native/useChatLayout";
let c7329_3 = 260 + DM_WIDTH;
let c7329_4 = 300 + DM_WIDTH;
export { c7329_3 as DRAWER_LEFT_WIDTH_MIN };
export function getDrawerWidth() {
const width = getBaseAppContainerDimensions().width;
const chatLayout = getChatLayout();
const { isChatBesideChannelList, isChatLockedOpen } = chatLayout;
return isChatBesideChannelList ? isChatLockedOpen ? c7329_3 : Math.min(c7329_4, width - 32) : width;
}
export function useDrawerWidth() {
const width = useBaseAppContainerDimensions().width;
const chatLayout = useChatLayout();
const { isChatBesideChannelList, isChatLockedOpen } = chatLayout;
return isChatBesideChannelList ? isChatLockedOpen ? c7329_3 : Math.min(c7329_4, width - 32) : width;
}
@@ -0,0 +1,8 @@
// Metro module 1846 (f1847).
import Module671 from "../../../_bundle/Module671";
export function readWindowSizeForAppEntry(a0) {
return Module671 == null ? void 0 : Module671.getWindowSize(a0);
}
export function readScreenSizeForAppEntry(a0) {
return Module671 == null ? void 0 : Module671.getScreenSize(a0);
}
@@ -0,0 +1,23 @@
// Metro module 4045 (f4046).
import { useMemo } from "react";
import useWindowDimensions_native, { getWindowDimensions } from "../useWindowDimensions.native";
import useSafeAreaInsets_native, { getSafeAreaInsets } from "../../safe_area/useSafeAreaInsets.native";
export default function useBaseAppContainerDimensions() {
const windowDimensions_native = useWindowDimensions_native();
const { width, height } = windowDimensions_native;
const safeAreaInsets_native = useSafeAreaInsets_native();
const { left, right } = safeAreaInsets_native;
return useMemo(() => ({
width: width - left - right,
height
}), [width, height, left, right]);
};
export function getBaseAppContainerDimensions() {
const windowDimensions = getWindowDimensions();
const { width: width2, height: height2 } = windowDimensions;
const safeAreaInsets = getSafeAreaInsets();
return {
width: width2 - safeAreaInsets.left - safeAreaInsets.right,
height: height2
};
}
+11
View File
@@ -0,0 +1,11 @@
// Metro module 4606 (f4607).
import { useCallback } from "react";
import DimensionsStore_android from "./DimensionsStore.android";
import { useAppEntryKey } from "../../window/native/AppEntryKeyContext";
export function getFontScale(r2 = "main") {
return DimensionsStore_android.getState().byAppEntry[r2].fontScale;
}
export function useFontScale() {
const appEntryKey = useAppEntryKey();
return DimensionsStore_android(useCallback((a0) => a0.byAppEntry[appEntryKey].fontScale, [appEntryKey]));
}
@@ -0,0 +1,8 @@
// Metro module 6561 (f6562).
import useWindowSizeClassifier, { WindowSizeClassifier, getWindowSizeClassifier } from "./useWindowSizeClassifier";
export default function useIsWindowLarge() {
return useWindowSizeClassifier() >= WindowSizeClassifier.LARGE;
};
export function getIsWindowLarge() {
return getWindowSizeClassifier() >= WindowSizeClassifier.LARGE;
}
@@ -0,0 +1,8 @@
// Metro module 9139 (f9140).
import useWindowSizeClassifier, { getWindowSizeClassifier, WindowSizeClassifier } from "./useWindowSizeClassifier";
export default function getIsWindowSmall() {
return getWindowSizeClassifier() <= WindowSizeClassifier.SMALL;
};
export function useIsWindowSmall() {
return useWindowSizeClassifier() <= WindowSizeClassifier.SMALL;
}
@@ -0,0 +1,35 @@
// Metro module 9911 (f9912).
import Module9912 from "../../../_bundle/Module9912";
import { TextStyleSheet } from "../../../design/components/Text/native/Text";
import { useFontScale } from "./useFontScale";
let c6580_3 = new Map();
export function scaleLineHeight(a0) {
let r6 = c6580_3.get(a0);
if (r6 == null) {
const scaledHeightForText = Module9912.getScaledHeightForText(a0);
c6580_3.set(a0, scaledHeightForText);
r6 = scaledHeightForText;
}
return r6;
}
export function scaleTextLineHeight(a0, a1) {
const lineHeight = TextStyleSheet[a0].lineHeight;
let r13 = c6580_3.get(lineHeight);
if (r13 == null) {
const scaledHeightForText = Module9912.getScaledHeightForText(lineHeight);
c6580_3.set(lineHeight, scaledHeightForText);
r13 = scaledHeightForText;
}
return r13;
}
export function useScaledTextLineHeight(a0) {
useFontScale();
const lineHeight = TextStyleSheet[a0].lineHeight;
let r17 = c6580_3.get(lineHeight);
if (r17 == null) {
const scaledHeightForText = Module9912.getScaledHeightForText(lineHeight);
c6580_3.set(lineHeight, scaledHeightForText);
r17 = scaledHeightForText;
}
return r17;
}
@@ -0,0 +1,21 @@
// Metro module 4044 (f4045).
import useBaseAppContainerDimensions, { getBaseAppContainerDimensions } from "./useBaseAppContainerDimensions";
let c2321_3 = {
SMALL: 0,
0: "SMALL",
NORMAL: 1,
1: "NORMAL",
LARGE: 2,
2: "LARGE",
XLARGE: 3,
3: "XLARGE"
};
export default function useWindowSizeClassifier() {
const width = useBaseAppContainerDimensions().width;
return width <= 360 ? c2321_3.SMALL : width <= 600 ? c2321_3.NORMAL : width <= 840 ? c2321_3.LARGE : c2321_3.XLARGE;
};
export { c2321_3 as WindowSizeClassifier };
export function getWindowSizeClassifier() {
const width = getBaseAppContainerDimensions().width;
return width <= 360 ? c2321_3.SMALL : width <= 600 ? c2321_3.NORMAL : width <= 840 ? c2321_3.LARGE : c2321_3.XLARGE;
}
@@ -0,0 +1,9 @@
// Metro module 11160 (f11161).
import DimensionsStore_android from "./native/DimensionsStore.android";
export default function subscribeToWindowDimensions(c18580_0, r3 = "main") {
let c18580_1 = r3;
return DimensionsStore_android.subscribe((a0) => {
const r5 = a0.byAppEntry[c18580_1];
c18580_0(r5.windowDimensions, r5.windowDimensionsIgnoringKeyboard);
});
};
@@ -0,0 +1,11 @@
// Metro module 4720 (f4721).
import { useCallback } from "react";
import DimensionsStore_android from "./native/DimensionsStore.android";
import { useAppEntryKey } from "../window/native/AppEntryKeyContext";
export function getIsScreenLandscape(r2 = "main") {
return DimensionsStore_android.getState().byAppEntry[r2].screenIsLandscape;
}
export function useIsScreenLandscape() {
const appEntryKey = useAppEntryKey();
return DimensionsStore_android(useCallback((a0) => a0.byAppEntry[appEntryKey].screenIsLandscape, [appEntryKey]));
}
@@ -0,0 +1,36 @@
// Metro module 1474 (f1475).
import { useMemo } from "react";
import DimensionsStore_android from "./native/DimensionsStore.android";
import { useAppEntryKey } from "../window/native/AppEntryKeyContext";
let c1190_4 = {
ignoreKeyboard: false
};
export default function useWindowDimensions(r4 = c1190_4) {
let ignoreKeyboard = r4.ignoreKeyboard;
if (ignoreKeyboard === void 0) {
ignoreKeyboard = false;
}
let c13050_0 = ignoreKeyboard;
let appEntryKey4 = r4.appEntryKey;
const appEntryKey5 = useAppEntryKey();
if (appEntryKey4 == null) {
appEntryKey4 = appEntryKey5;
}
const appEntryKey = appEntryKey4;
return DimensionsStore_android(useMemo(() => {
let r4;
if (c13050_0) {
const appEntryKey3 = appEntryKey;
r4 = (a0) => a0.byAppEntry[appEntryKey3].windowDimensionsIgnoringKeyboard;
} else {
const appEntryKey2 = appEntryKey;
r4 = (a0) => a0.byAppEntry[appEntryKey2].windowDimensions;
}
return r4;
}, [ignoreKeyboard, appEntryKey]));
};
export function getWindowDimensions(r4 = c1190_4) {
const { ignoreKeyboard = false, appEntryKey: appEntryKey4 = "main" } = r4;
const r10 = DimensionsStore_android.getState().byAppEntry[appEntryKey4];
return ignoreKeyboard ? r10.windowDimensionsIgnoringKeyboard : r10.windowDimensions;
}
@@ -0,0 +1,31 @@
// Metro module 14839 (f14840).
import { makeMutable } from "../reanimated/ReanimatedRexport";
import { getWindowDimensions } from "./useWindowDimensions.native";
import subscribeToWindowDimensions_native from "./subscribeToWindowDimensions.native";
import updateSharedValueIfChanged_native from "../reanimated/utils/updateSharedValueIfChanged.native";
let c10481_2 = makeMutable({
...getWindowDimensions()
});
let c10481_3 = makeMutable({
...getWindowDimensions({
ignoreKeyboard: true
})
});
subscribeToWindowDimensions_native((a0, a1) => {
updateSharedValueIfChanged_native(c10481_2, a0);
updateSharedValueIfChanged_native(c10481_3, a1);
});
export function getWindowDimensionsWorklet(r2 = void 0) {
return r2?.ignoreKeyboard === true ? c10481_3.get() : c10481_2.get();
}
getWindowDimensionsWorklet.__closure = {
windowDimensionsSharedValueIgnoringKeyboard: c10481_3,
windowDimensionsSharedValue: c10481_2
};
getWindowDimensionsWorklet.__workletHash = 17271034964949;
getWindowDimensionsWorklet.__initData = {
code: "function getWindowDimensionsWorklet_useWindowDimensionsSharedValueNativeTsx1(params=undefined){const{windowDimensionsSharedValueIgnoringKeyboard,windowDimensionsSharedValue}=this.__closure;return(params===null||params===void 0?void 0:params.ignoreKeyboard)===true?windowDimensionsSharedValueIgnoringKeyboard.get():windowDimensionsSharedValue.get();}"
};
export default function useWindowDimensionsSharedValue(r2 = void 0) {
return r2?.ignoreKeyboard === true ? c10481_3 : c10481_2;
};