275 lines
14 KiB
TypeScript
275 lines
14 KiB
TypeScript
/* Metro module 8340; source: utils/native/ChangeLogUtils.tsx; dependencies: [31, 27, 33, 4501, 697, 6235, 4597, 6766, 3855, 2] */
|
|
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import Module03855 from '../../by-id/module-03855.js'; /* Metro dependency 3855 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as LegacyTokensModule from '../../design/migrations/native/LegacyTokens.tsx'; /* Metro dependency 6235 */
|
|
import * as TextWithIOSLinkWorkaroundModule from '../../modules/a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
|
|
|
|
function _fun66412(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:6, offset: 0x01bfa8fa, size: 526 bytes, params: 8, frame: 23
|
|
let env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = ReactNativeModule;
|
|
const env0_3 = value.View;
|
|
const env0_4 = value.Image;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const TEXT_LINK = (Native).colors.TEXT_LINK;
|
|
object.link = {color: TEXT_LINK};
|
|
object.list = {marginBottom: 10};
|
|
object.image = {'alignSelf': 'center', 'flex': 1};
|
|
const DARK_PRIMARY_500_LIGHT_PRIMARY_300 = (LegacyTokensModule).DARK_PRIMARY_500_LIGHT_PRIMARY_300;
|
|
object.container = {'borderLeftWidth': 2, 'paddingLeft': 8, 'marginBottom': 10,
|
|
borderLeftColor: DARK_PRIMARY_500_LIGHT_PRIMARY_300};
|
|
const TEXT_MUTED = (Native).colors.TEXT_MUTED;
|
|
object.text = {'fontSize': 14, 'lineHeight': 18, 'marginBottom': 8, color: TEXT_MUTED};
|
|
const env0_6 = Reflect.apply(createStyles, value, [object]);
|
|
value = importAll(4597) /* metro dependency 4597: CustomMarkupNative */;
|
|
value = value.createRules({});
|
|
object = {link: function(a0) {
|
|
var env0_0 = a0;
|
|
return {react: _fun66424};
|
|
}, lheading: function(a0) {
|
|
var env0_0 = a0;
|
|
return {react: _fun66426};
|
|
}, heading: function(a0) {
|
|
var env0_0 = a0;
|
|
return {react: _fun66428};
|
|
}, list: function(a0) {
|
|
var env0_0 = a0;
|
|
return {react: _fun66430};
|
|
}};
|
|
object.image = {react: react};
|
|
object.blockQuote = {react: react_66432};
|
|
object.paragraph = function(a0) {
|
|
var env0_0 = a0;
|
|
return {react: _fun66434};
|
|
};
|
|
(FileImportTrackerModule).fileFinishedImporting('utils/native/ChangeLogUtils.tsx');
|
|
exports.baseRules = value;
|
|
exports.customRules = object;
|
|
function ChangeLogLink({node, output, state, styling}) { // fn#66413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:493, offset: 0x01bfab08, size: 131 bytes, params: 2, frame: 20
|
|
const styles = useStyles();
|
|
const Link = styling.components.Link;
|
|
const linkProps = {className: styles.link, target: node.target};
|
|
const content = node.content;
|
|
const object2 = {};
|
|
copyDataProperties(object2, state, undefined);
|
|
object2['inLink'] = true;
|
|
return (
|
|
<Link {...linkProps} key={state.key}>
|
|
{output(content, object2)}
|
|
</Link>
|
|
);
|
|
}
|
|
|
|
function ChangeLogList({node, output, state, styling}) { // fn#66414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:671, offset: 0x01bfab8b, size: 131 bytes, params: 2, frame: 18
|
|
const styles = useStyles();
|
|
const List = styling.components.List;
|
|
return ((Component) => <Component style={styles.list} key={state.key}>{node.items.map(_fun66415)}</Component>)(List || View);
|
|
function _fun66415(a0, a1) { // fn#66415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:811, offset: 0x01bfac0e, size: 62 bytes, params: 3, frame: 15
|
|
const env0_0 = a0;
|
|
const ListItem = styling.components.ListItem;
|
|
return <ListItem {...{children: children_66416}} key={a1} />;
|
|
function children_66416(a0) { // fn#66416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:852, offset: 0x01bfac4c, size: 38 bytes, params: 2, frame: 17
|
|
return ((a0, a1, a2, a3) => {
|
|
var env0_0 = a1;
|
|
var env0_1 = a2;
|
|
var env0_2 = a3;
|
|
var closure = _fun66418;
|
|
var env0_5 = closure;
|
|
var env0_4 = [];
|
|
a0.forEach(_fun66419);
|
|
closure();
|
|
return [];
|
|
})(env0_0, output, state, a0);
|
|
function processListItem(a0, a1, a2, a3) { // fn#66417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:855, owner: children_66416.processListItem, offset: 0x01bfac72, size: 78 bytes, params: 5, frame: 13
|
|
const env0_0 = a1;
|
|
const env0_1 = a2;
|
|
const env0_2 = a3;
|
|
const renderText2 = renderText;
|
|
const env0_4 = [];
|
|
a0.forEach(_fun66419);
|
|
renderText2();
|
|
return [];
|
|
function renderText() { // fn#66418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:903, owner: children_66416.processListItem.renderText, offset: 0x01bfacc0, size: 142 bytes, params: 1, frame: 20
|
|
var binding;
|
|
var push;
|
|
var value2;
|
|
if (items2.length > 0) {
|
|
binding = env0_3;
|
|
push = binding.push;
|
|
value2 = environment.__proto__.__proto__.__proto__.__proto__;
|
|
Reflect.apply(push, binding,
|
|
[((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround variant="text-sm/normal" {...importAll} key={-1}>{require(items2,
|
|
|
|
importDefault)}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround)]);
|
|
items2 = [];
|
|
}
|
|
}
|
|
|
|
function _fun66419(a0, a1) { // fn#66419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:1058, offset: 0x01bfad4e, size: 107 bytes, params: 3, frame: 19
|
|
var binding;
|
|
var push;
|
|
var value2;
|
|
if (a0.type === 'list') {
|
|
renderText();
|
|
binding = env0_3;
|
|
push = binding.push;
|
|
value2 = environment.__proto__.__proto__.__proto__.__proto__;
|
|
Reflect.apply(push, binding, [<View key={a1}>{require(a0, importDefault)}</View>]);
|
|
} else {
|
|
env0_4.push(a0);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function ChangeLogParagraph({node, output, state, styling}) { // fn#66420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:1182, offset: 0x01bfadb9, size: 146 bytes, params: 2, frame: 20
|
|
const styles = useStyles();
|
|
const Paragraph = styling.components?.Paragraph;
|
|
return ((Component) => <Component variant="text-sm/normal" style={styles.text} key={state.key}>{output(node.content,
|
|
state)}</Component>)(Paragraph ?? (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround);
|
|
}
|
|
|
|
function ChangeLogImage({node, state}) { // fn#66421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:1433, offset: 0x01bfae4b, size: 108 bytes, params: 2, frame: 20
|
|
const styles = useStyles();
|
|
return (
|
|
<Image
|
|
style={styles.image}
|
|
source={{uri: Module03855.sanitizeUrl(node.target)}}
|
|
key={state.key}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function ChangeLogBlockQuote({node, output, state}) { // fn#66422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:1562, offset: 0x01bfaeb7, size: 142 bytes, params: 2, frame: 22
|
|
const styles = useStyles();
|
|
const viewBindingProps = {style: styles.container};
|
|
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
|
|
return (
|
|
<View {...viewBindingProps} key={state.key}>
|
|
<TextWithIOSLinkWorkaround variant="text-sm/normal" style={styles.text}>
|
|
{output(node.content, state)}
|
|
</TextWithIOSLinkWorkaround>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function link_66423(a0) { // fn#66423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:1788, offset: 0x01bfaf45, size: 25 bytes, params: 2, frame: 2
|
|
const env0_0 = a0;
|
|
return {react: react_66424};
|
|
function link_66423React(a0, a1, a2) { // fn#66424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:1799, owner: link_66423.react, offset: 0x01bfaf5e, size: 66 bytes, params: 4, frame: 13
|
|
return (
|
|
<ChangeLogLink
|
|
accessibilityRole="link"
|
|
node={a0}
|
|
output={a1}
|
|
state={a2}
|
|
styling={env0_0}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function lheading(a0) { // fn#66425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:1897, offset: 0x01bfafa0, size: 25 bytes, params: 2, frame: 2
|
|
const env0_0 = a0;
|
|
return {react: react_66426};
|
|
function lheadingReact(a0, a1, a2) { // fn#66426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:1908, owner: lheading.react, offset: 0x01bfafb9, size: 79 bytes, params: 4, frame: 17
|
|
const LHeading = env0_0.components.LHeading;
|
|
return (
|
|
<LHeading className={a0.className} key={a2.key}>
|
|
{a1(a0.content, a2)}
|
|
</LHeading>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function heading(a0) { // fn#66427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:2006, offset: 0x01bfb008, size: 25 bytes, params: 2, frame: 2
|
|
const env0_0 = a0;
|
|
return {react: react_66428};
|
|
function headingReact(a0, a1, a2) { // fn#66428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:2017, owner: heading.react, offset: 0x01bfb021, size: 90 bytes, params: 4, frame: 17
|
|
const Heading = env0_0.components.Heading;
|
|
return (
|
|
<Heading
|
|
className={a0.className}
|
|
level={a0.level}
|
|
key={a2.key}
|
|
>
|
|
{a1(a0.content, a2)}
|
|
</Heading>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function list_66429(a0) { // fn#66429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:2125, offset: 0x01bfb07b, size: 25 bytes, params: 2, frame: 2
|
|
const env0_0 = a0;
|
|
return {react: react_66430};
|
|
function list_66429React(a0, a1, a2) { // fn#66430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:2136, owner: list_66429.react, offset: 0x01bfb094, size: 58 bytes, params: 4, frame: 13
|
|
return (
|
|
<ChangeLogList
|
|
node={a0}
|
|
output={a1}
|
|
state={a2}
|
|
styling={env0_0}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function react(a0, a1, a2) { // fn#66431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:2213, offset: 0x01bfb0ce, size: 46 bytes, params: 4, frame: 13
|
|
return (
|
|
<ChangeLogImage
|
|
node={a0}
|
|
output={a1}
|
|
state={a2}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function react_66432(a0, a1, a2) { // fn#66432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:2285, offset: 0x01bfb0fc, size: 46 bytes, params: 4, frame: 13
|
|
return (
|
|
<ChangeLogBlockQuote
|
|
node={a0}
|
|
output={a1}
|
|
state={a2}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function paragraph(a0) { // fn#66433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:2354, offset: 0x01bfb12a, size: 25 bytes, params: 2, frame: 2
|
|
const env0_0 = a0;
|
|
return {react: react_66434};
|
|
function paragraphReact(a0, a1, a2) { // fn#66434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8525:2365, owner: paragraph.react, offset: 0x01bfb143, size: 58 bytes, params: 4, frame: 13
|
|
return (
|
|
<ChangeLogParagraph
|
|
node={a0}
|
|
output={a1}
|
|
state={a2}
|
|
styling={env0_0}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun66412, 8340, [31, 27, 33, 4501, 697, 6235, 4597, 6766, 3855,
|
|
2]) /* metro module 8340, dependencies: [31, 27, 33, 4501, 697, 6235, 4597, 6766, 3855, 2] */;
|