decord/source/modules/screen/native/useScaledTextLineHeight.android.tsx

49 lines
1.7 KiB
TypeScript
Raw Normal View History

// Module ID: 10124
// Function ID: 10125
2026-07-29 08:29:29 +00:00
// Name: map
// Dependencies: [10125, 4556, 4982, 2]
2026-07-29 08:29:29 +00:00
// Exports: scaleLineHeight, scaleTextLineHeight, useScaledTextLineHeight
2026-07-20 16:05:17 +00:00
// Module 10124 (map)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import Text from "Text" /* 4556 */;
import getFontScale from "getFontScale" /* 4982 */;
import enforcingDefault from "enforcing" /* 10125 */;
2026-08-24 06:08:38 +00:00
2026-07-29 08:29:29 +00:00
const map = new Map();
2026-08-24 06:08:38 +00:00
let result = set.fileFinishedImporting("modules/screen/native/useScaledTextLineHeight.android.tsx");
2026-07-29 08:29:29 +00:00
export const scaleLineHeight = function scaleLineHeight(arg0, arg1) {
let value = map.get(arg0);
if (null == value) {
2026-08-24 06:08:38 +00:00
const scaledHeightForText = enforcingDefault.getScaledHeightForText(arg0);
2026-07-29 08:29:29 +00:00
const result = map.set(arg0, scaledHeightForText);
value = scaledHeightForText;
2026-08-24 06:08:38 +00:00
const obj2 = enforcingDefault;
2026-07-29 08:29:29 +00:00
}
return value;
};
2026-08-08 06:10:11 +00:00
export const scaleTextLineHeight = function scaleTextLineHeight(c10, fontScale) {
2026-08-24 06:08:38 +00:00
const lineHeight = Text.TextStyleSheet[c10].lineHeight;
2026-07-20 16:05:17 +00:00
let value = map.get(lineHeight);
if (null == value) {
2026-08-24 06:08:38 +00:00
const scaledHeightForText = enforcingDefault.getScaledHeightForText(lineHeight);
2026-07-20 16:05:17 +00:00
const result = map.set(lineHeight, scaledHeightForText);
value = scaledHeightForText;
2026-08-24 06:08:38 +00:00
const obj2 = enforcingDefault;
2026-07-29 08:29:29 +00:00
}
return value;
};
2026-09-03 10:05:34 +00:00
export const useScaledTextLineHeight = function useScaledTextLineHeight(beginSearch) {
2026-08-24 06:08:38 +00:00
const fontScale = getFontScale.useFontScale();
2026-09-03 10:05:34 +00:00
const lineHeight = Text.TextStyleSheet[beginSearch].lineHeight;
2026-07-29 08:29:29 +00:00
let value = map.get(lineHeight);
if (null == value) {
2026-08-24 06:08:38 +00:00
const scaledHeightForText = enforcingDefault.getScaledHeightForText(lineHeight);
2026-07-29 08:29:29 +00:00
const result = map.set(lineHeight, scaledHeightForText);
value = scaledHeightForText;
2026-08-24 06:08:38 +00:00
const obj3 = enforcingDefault;
2026-07-20 16:05:17 +00:00
}
return value;
};