decord/source/design/components/Text/native/useManaTextMigrationHighlight.tsx

82 lines
3.1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 4741
// Function ID: 4742
2026-07-23 10:11:24 +00:00
// Name: useManaTextMigrationHighlight
2026-08-24 06:08:38 +00:00
// Dependencies: [17, 4742, 1302, 4668, 712, 589, 1363, 2]
2026-07-23 10:11:24 +00:00
// Exports: useManaTextMigrationHighlight, withManaTextMigrationHighlight
2026-08-24 06:08:38 +00:00
// Module 4741 (useManaTextMigrationHighlight)
import set from "set" /* 2 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import ThemesDefault from "Themes" /* 712 */;
import importDefaultResult from "getUserAgnosticState" /* 4742 */;
import closure_4 from "handleThemeChange" /* 1302 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const StyleSheet = get_ActivityIndicator.StyleSheet;
2026-07-29 08:29:29 +00:00
let c3 = importDefaultResult;
let obj = { highlight: null, overridden: null };
2026-08-24 06:08:38 +00:00
obj = { borderWidth: 1, borderColor: ThemesDefault.colors.STATUS_POSITIVE };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
2026-08-24 06:08:38 +00:00
obj[1] = { borderWidth: 1, borderStyle: "dashed", borderColor: ThemesDefault.colors.STATUS_DANGER };
2026-07-29 08:29:29 +00:00
let closure_5 = createCacheKey.createStyles(obj);
2026-07-23 10:11:24 +00:00
let closure_6 = importDefaultResult.get("highlight_mana_text");
2026-07-29 08:29:29 +00:00
const obj2 = { borderWidth: 1, borderColor: null };
2026-08-24 06:08:38 +00:00
const internal = ThemesDefault.internal;
obj2[1] = internal.resolveSemanticColor(ThemesDefault.themes.DARK, ThemesDefault.colors.STATUS_WARNING);
2026-07-29 08:29:29 +00:00
const obj3 = { borderWidth: 1, borderColor: null };
2026-08-24 06:08:38 +00:00
const internal2 = ThemesDefault.internal;
obj3[1] = internal2.resolveSemanticColor(ThemesDefault.themes.LIGHT, ThemesDefault.colors.STATUS_WARNING);
const obj1 = { borderWidth: 1, borderStyle: "dashed", borderColor: ThemesDefault.colors.STATUS_DANGER };
const result = set.fileFinishedImporting("design/components/Text/native/useManaTextMigrationHighlight.tsx");
2026-07-23 10:11:24 +00:00
export const useManaTextMigrationHighlight = function useManaTextMigrationHighlight(arg0, style) {
const tmp = callback();
const items = [closure_3];
2026-07-29 08:29:29 +00:00
if (!obj.useStateFromStores(items, () => closure_3.get("highlight_mana_text"))) {
2026-07-23 10:11:24 +00:00
return null;
} else {
2026-07-29 08:29:29 +00:00
const _require = arg0;
2026-08-24 06:08:38 +00:00
dependencyMap = StyleSheet.flatten(style);
2026-07-29 08:29:29 +00:00
const _Object = Object;
const keys = Object.keys(arg0);
keys.some((arg0) => {
if ("includeFontPadding" === arg0) {
return false;
} else {
let tmp2 = undefined !== table[arg0];
if (tmp2) {
let tmp4;
if (table2 != null) {
tmp4 = table2[arg0];
2026-07-23 10:11:24 +00:00
}
2026-07-29 08:29:29 +00:00
tmp2 = undefined !== tmp4;
2026-07-23 10:11:24 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
}
}) ? tmp.overridden : tmp.highlight;
2026-07-23 10:11:24 +00:00
}
};
export const withManaTextMigrationHighlight = function withManaTextMigrationHighlight(fromEntriesResult) {
let proxy = fromEntriesResult;
if (closure_6) {
const _Proxy = Proxy;
2026-07-29 08:29:29 +00:00
let obj = { get: null };
2026-08-04 21:03:28 +00:00
obj[0] = function get(arg0, str) {
const value = Reflect.get(arg0, str, arg2);
if (typeof str === "string") {
2026-07-29 08:29:29 +00:00
if (null != value) {
let obj = callback(table[6]);
const tmp5 = obj.isThemeLight(theme.theme) ? closure_8 : closure_7;
obj = {};
const merged = Object.assign(value);
const merged1 = Object.assign(tmp5);
return obj;
2026-07-23 10:11:24 +00:00
}
2026-07-29 08:29:29 +00:00
}
return value;
2026-07-23 10:11:24 +00:00
};
proxy = new Proxy(fromEntriesResult, obj);
}
return proxy;
};