131 lines
6.9 KiB
TypeScript
131 lines
6.9 KiB
TypeScript
/* Metro module 4573; source: design/components/Text/native/Text.tsx; dependencies: [31, 27, 482, 33, 4017, 697, 22, 4574, 4501, 290, 4575, 2] */
|
|
function _fun38823(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4751:6, offset: 0x010cb5e3, size: 595 bytes, params: 8, frame: 24
|
|
var object2;
|
|
const env0_0 = require;
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const Text = (require(27) /* metro dependency 27 */).Text;
|
|
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
|
|
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
|
const env0_5 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Text);
|
|
Object = global.Object;
|
|
let fromEntries = Object.fromEntries;
|
|
const Object2 = global.Object;
|
|
const value3 = Object2.keys((importDefault(697) /* metro dependency 697: native */).colors);
|
|
const env0_6 = Reflect.apply(fromEntries, Object, [value3.map(_fun38824)]);
|
|
object2 = {};
|
|
const DISPLAY_NORMAL = Fonts.DISPLAY_NORMAL;
|
|
object2[400] = DISPLAY_NORMAL;
|
|
const DISPLAY_MEDIUM = Fonts.DISPLAY_MEDIUM;
|
|
object2[500] = DISPLAY_MEDIUM;
|
|
const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD;
|
|
object2[600] = DISPLAY_SEMIBOLD;
|
|
const DISPLAY_BOLD = Fonts.DISPLAY_BOLD;
|
|
object2[700] = DISPLAY_BOLD;
|
|
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
|
|
object2[800] = DISPLAY_EXTRABOLD;
|
|
object2 = {};
|
|
const PRIMARY_NORMAL = Fonts.PRIMARY_NORMAL;
|
|
object2[400] = PRIMARY_NORMAL;
|
|
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
|
|
object2[500] = PRIMARY_MEDIUM;
|
|
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
|
|
object2[600] = PRIMARY_SEMIBOLD;
|
|
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
|
|
object2[700] = PRIMARY_BOLD;
|
|
object2 = {};
|
|
const GINTO_NORD_EXTRA_BOLD = Fonts.GINTO_NORD_EXTRA_BOLD;
|
|
object2[800] = GINTO_NORD_EXTRA_BOLD;
|
|
object2 = {};
|
|
const CODE_NORMAL = Fonts.CODE_NORMAL;
|
|
object2[400] = CODE_NORMAL;
|
|
const CODE_BOLD = Fonts.CODE_BOLD;
|
|
object2[700] = CODE_BOLD;
|
|
Object = global.Object;
|
|
fromEntries = Object.fromEntries;
|
|
const TextVariantsFlat = (require(4574) /* metro dependency 4574: TextVariants */).TextVariantsFlat;
|
|
const value4 = TextVariantsFlat.map(_fun38825);
|
|
const filter = value4.filter;
|
|
const Boolean = global.Boolean;
|
|
const value5 = Reflect.apply(fromEntries, Object, [Reflect.apply(filter, value4, [Boolean])]);
|
|
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun38826);
|
|
const value7 = value.forwardRef(_fun38827);
|
|
value = value.forwardRef(_fun38828);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Text/native/Text.tsx');
|
|
exports.TextStyleSheet = value5;
|
|
exports.Text = value7;
|
|
exports.Heading = value;
|
|
}
|
|
|
|
function _fun38824(a0) { // fn#38824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4751:242, offset: 0x010cb836, size: 53 bytes, params: 2, frame: 12
|
|
let value = importDefault(22) /* metro dependency 22 */;
|
|
value = value.kebabCase(a0);
|
|
return [value, a0];
|
|
}
|
|
|
|
function _fun38825(a0) { // fn#38825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4751:598, offset: 0x010cb86b, size: 217 bytes, params: 2, frame: 17
|
|
var r3;
|
|
var r0;
|
|
var items2;
|
|
var object2;
|
|
const name = a0.name;
|
|
const value = null;
|
|
if (name === 'code') {
|
|
r0 = value;
|
|
} else {
|
|
items2 = [a0.name];
|
|
object2 = {};
|
|
object2.fontSize = a0.size;
|
|
object2.lineHeight = a0.lineHeight;
|
|
r3 = a0.uppercase ? 'uppercase' : 'none';
|
|
object2.textTransform = r3;
|
|
object2.fontFamily = ({headline: env0_9, display: env0_7, primary: env0_8,
|
|
code: env0_10})[a0.fontStack][a0.weight.toString()];
|
|
object2.includeFontPadding = false;
|
|
r3 = 'letterSpacing' in a0 && value != a0.letterSpacing ? a0.letterSpacing / 10 : undefined;
|
|
object2.letterSpacing = r3;
|
|
items2[1] = object2;
|
|
r0 = items2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun38826(a0, a1) { // fn#38826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4751:977, offset: 0x010cb944, size: 141 bytes, params: 3, frame: 17
|
|
const value = undefined;
|
|
return {text: {color: a0 === 'none' ? value : a0 === 'always-white' ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : (importDefault(697) /* metro dependency 697: native */).colors[env0_6[a0]],
|
|
fontVariant: a1 ? ['tabular-nums'] : value}};
|
|
}
|
|
|
|
function _fun38827(a0, a1) { // fn#38827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4751:1146, offset: 0x010cb9d1, size: 307 bytes, params: 3, frame: 25
|
|
const variant = a0.variant;
|
|
const color = a0.color;
|
|
const style = a0.style;
|
|
const lineClamp = a0.lineClamp;
|
|
const ellipsizeMode = a0.ellipsizeMode;
|
|
let tabularNumbers = a0.tabularNumbers;
|
|
tabularNumbers = !(tabularNumbers === undefined) && tabularNumbers;
|
|
let animated = a0.animated;
|
|
animated = !(animated === undefined) && animated;
|
|
let experimental_useNativeText = a0.experimental_useNativeText;
|
|
experimental_useNativeText = !(experimental_useNativeText === undefined) && experimental_useNativeText;
|
|
const object2 = {'variant': 0, 'color': 0, 'style': 0, 'lineClamp': 0, 'ellipsizeMode': 0, 'tabularNumbers': 0,
|
|
'animated': 0, 'experimental_useNativeText': 0};
|
|
silentSetPrototypeOf(object2, null, undefined);
|
|
const value = copyDataProperties({}, a0, object2, undefined);
|
|
let r2 = color ?? 'text-default';
|
|
const styles = useStyles(r2, tabularNumbers);
|
|
r2 = experimental_useNativeText ? (require(290) /* metro dependency 290 */).NativeText : animated ? env0_5 : Text;
|
|
const items2 = [env0_11[(require(4575) /* metro dependency 4575: useTypographyVariantRemapNative */).useTypographyVariantRemap(variant,
|
|
false)]];
|
|
items2[1] = styles.text;
|
|
items2[2] = style;
|
|
return ((Component) => <Component style={items2} numberOfLines={lineClamp} ellipsizeMode={ellipsizeMode ?? 'tail'} allowFontScaling ref={a1} {...value} />)(r2);
|
|
}
|
|
|
|
function _fun38828(a0, a1) { // fn#38828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4751:1526, offset: 0x010cbb04, size: 104 bytes, params: 3, frame: 16
|
|
return ((Component) => <Component ref={a1} {...a0} {...{['accessibilityRole']: 'header'}} {...{['variant']: (require(4575) /* metro dependency 4575: useTypographyVariantRemapNative */).useTypographyVariantRemap(a0.variant,
|
|
true)}} />)(env0_13);
|
|
}
|
|
|