decord/beta/source/modules/screen/native/useScaledTextLineHeight.android.tsx
github-actions 30c0bb2ec3 chore: update source for beta 347.10
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
2026-09-24 16:03:38 +00:00

69 lines
2.4 KiB
TypeScript

// Module ID: 11327
// Function ID: 11328
// Name: useScaledTextLineHeight
// Dependencies: [11328, 4786, 558, 568, 5227, 2]
// Exports: scaleLineHeight, scaleTextLineHeight
// Module 11327 (useScaledTextLineHeight)
import c from "c" /* 568 */;
import Text_Text from "Text/Text" /* 4786 */;
import useFontScale from "useFontScale" /* 5227 */;
import NativeFontModuleDefault from "NativeFontModule" /* 11328 */;
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
const map = new Map();
function scaleLineHeight(arg0) {
value = map.get(arg0);
if (null == value) {
const scaledHeightForText = NativeFontModuleDefault.getScaledHeightForText(arg0);
const result = map.set(arg0, scaledHeightForText);
value = scaledHeightForText;
}
return value;
}
function scaleTextLineHeight(c15, fontScale) {
const lineHeight = Text_Text.TextStyleSheet[c15].lineHeight;
value = map.get(lineHeight);
if (null == value) {
const scaledHeightForText = NativeFontModuleDefault.getScaledHeightForText(lineHeight);
const result = map.set(lineHeight, scaledHeightForText);
value = scaledHeightForText;
}
return value;
}
let result = size.fileFinishedImporting("modules/screen/native/useScaledTextLineHeight.android.tsx");
export { scaleLineHeight };
export { scaleTextLineHeight };
export const useScaledTextLineHeight = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
const cResult = c.c(3);
const fontScale = useFontScale.useFontScale();
if (cResult[0] === fontScale) {
if (cResult[1] === arg0) {
let tmp5 = cResult[2];
}
return tmp5;
}
const lineHeight = Text_Text.TextStyleSheet[arg0].lineHeight;
value = map.get(lineHeight);
if (null == value) {
const scaledHeightForText = NativeFontModuleDefault.getScaledHeightForText(lineHeight);
const result = map.set(lineHeight, scaledHeightForText);
value = scaledHeightForText;
}
cResult[0] = fontScale;
cResult[1] = arg0;
cResult[2] = value;
tmp5 = value;
}) : ((arg0) => {
const fontScale = useFontScale.useFontScale();
const lineHeight = Text_Text.TextStyleSheet[arg0].lineHeight;
value = map.get(lineHeight);
if (null == value) {
const scaledHeightForText = NativeFontModuleDefault.getScaledHeightForText(lineHeight);
const result = map.set(lineHeight, scaledHeightForText);
value = scaledHeightForText;
}
return value;
});