decord/beta/source/modules/screen/native/useScaledTextLineHeight.android.tsx
github-actions 19e52f659f chore: update source for beta 347.11
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-26 17:57:22 +00:00

45 lines
1.7 KiB
TypeScript

// Module ID: 10414
// Function ID: 10415
// Name: useScaledTextLineHeight
// Dependencies: [10415, 4784, 5225, 2]
// Exports: scaleLineHeight, scaleTextLineHeight, useScaledTextLineHeight
// Module 10414 (useScaledTextLineHeight)
import Text_Text from "Text/Text" /* 4784 */;
import useFontScale from "useFontScale" /* 5225 */;
import NativeFontModuleDefault from "NativeFontModule" /* 10415 */;
import size from "module_2" /* 2 */;
const map = new Map();
let result = size.fileFinishedImporting("modules/screen/native/useScaledTextLineHeight.android.tsx");
export const scaleLineHeight = 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;
};
export const scaleTextLineHeight = function scaleTextLineHeight(c10, fontScale) {
const lineHeight = Text_Text.TextStyleSheet[c10].lineHeight;
value = map.get(lineHeight);
if (null == value) {
const scaledHeightForText = NativeFontModuleDefault.getScaledHeightForText(lineHeight);
const result = map.set(lineHeight, scaledHeightForText);
value = scaledHeightForText;
}
return value;
};
export const useScaledTextLineHeight = function useScaledTextLineHeight(beginSearch) {
const fontScale = useFontScale.useFontScale();
const lineHeight = Text_Text.TextStyleSheet[beginSearch].lineHeight;
value = map.get(lineHeight);
if (null == value) {
const scaledHeightForText = NativeFontModuleDefault.getScaledHeightForText(lineHeight);
const result = map.set(lineHeight, scaledHeightForText);
value = scaledHeightForText;
}
return value;
};