@adminide-stack/yantra-mobile 12.0.102 → 12.0.103-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,346 @@
1
+ import {jsx,jsxs}from'react/jsx-runtime';import {useMemo,useRef,useEffect,useCallback,useState}from'react';import {ActivityIndicator,View,StyleSheet,ScrollView,Text,Pressable}from'react-native';import {Image}from'expo-image';import {Ionicons}from'@expo/vector-icons';import {useNavigation}from'@react-navigation/native';import {AssistantMarkdown}from'../chat/AssistantMarkdown.js';import {useChatLinkOpener}from'../links/chatLinkOpener.js';import {normalizeSources,cleanArticleContent,formatPublishedAt,faviconUrl,getStoryId}from'./articleContent.js';import {discoverPalette,openDiscoverArticle,TagChip,DISCOVER_SERIF,CompactStoryCard}from'./DiscoverStoryCards.js';import {useNewsArticle,useNewsArticlesInfinite}from'./useDiscoverNews.js';const MAX_SOURCE_CARDS = 8;
2
+ const DISCOVER_MORE_COUNT = 4;
3
+ function SourceFavicon({
4
+ source,
5
+ size,
6
+ palette
7
+ }) {
8
+ const [failed, setFailed] = useState(false);
9
+ const letter = (source.name || source.host || "?").charAt(0).toUpperCase();
10
+ if (source.host && !failed) {
11
+ return /* @__PURE__ */ jsx(Image, { source: {
12
+ uri: faviconUrl(source.host)
13
+ }, style: {
14
+ width: size,
15
+ height: size,
16
+ borderRadius: 4
17
+ }, contentFit: "contain", onError: () => setFailed(true) });
18
+ }
19
+ return /* @__PURE__ */ jsx(View, { style: [styles.faviconFallback, {
20
+ width: size,
21
+ height: size,
22
+ backgroundColor: palette.text
23
+ }], children: /* @__PURE__ */ jsx(Text, { style: {
24
+ color: palette.bg,
25
+ fontSize: Math.round(size * 0.55),
26
+ fontWeight: "700"
27
+ }, children: letter }) });
28
+ }
29
+ function SourceCards({
30
+ sources,
31
+ palette,
32
+ onOpen
33
+ }) {
34
+ if (sources.length === 0) return null;
35
+ return /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.sourcesScroll, contentContainerStyle: styles.sourcesContent, children: sources.slice(0, MAX_SOURCE_CARDS).map((source, index) => /* @__PURE__ */ jsxs(Pressable, { accessibilityRole: source.url ? "link" : void 0, disabled: !source.url, onPress: () => source.url && onOpen(source.url), style: ({
36
+ pressed
37
+ }) => [styles.sourceCard, {
38
+ backgroundColor: palette.imagePlaceholder,
39
+ borderColor: palette.cardBorder
40
+ }, pressed && styles.pressed], children: [
41
+ /* @__PURE__ */ jsxs(View, { style: styles.sourceHead, children: [
42
+ /* @__PURE__ */ jsx(SourceFavicon, { source, size: 16, palette }),
43
+ /* @__PURE__ */ jsx(Text, { style: [styles.sourceName, {
44
+ color: palette.textMuted
45
+ }], numberOfLines: 1, children: source.name })
46
+ ] }),
47
+ source.title ? /* @__PURE__ */ jsx(Text, { style: [styles.sourceTitle, {
48
+ color: palette.text
49
+ }], numberOfLines: 2, children: source.title }) : null
50
+ ] }, `${source.name}-${index}`)) });
51
+ }
52
+ function DiscoverMore({
53
+ article,
54
+ palette,
55
+ onOpen
56
+ }) {
57
+ const {
58
+ articles
59
+ } = useNewsArticlesInfinite({
60
+ topic: article.topic
61
+ });
62
+ const currentId = getStoryId(article);
63
+ const related = articles.filter((story) => getStoryId(story) !== currentId).slice(0, DISCOVER_MORE_COUNT);
64
+ if (related.length === 0) return null;
65
+ return /* @__PURE__ */ jsxs(View, { style: [styles.more, {
66
+ borderTopColor: palette.border
67
+ }], children: [
68
+ /* @__PURE__ */ jsxs(View, { style: styles.moreHead, children: [
69
+ /* @__PURE__ */ jsx(Ionicons, { name: "sparkles-outline", size: 18, color: palette.text }),
70
+ /* @__PURE__ */ jsx(Text, { style: [styles.moreTitle, {
71
+ color: palette.text
72
+ }], children: "Discover more" })
73
+ ] }),
74
+ /* @__PURE__ */ jsx(View, { style: styles.moreList, children: related.map((story) => /* @__PURE__ */ jsx(CompactStoryCard, { story, palette, onPress: onOpen }, getStoryId(story))) })
75
+ ] });
76
+ }
77
+ function StateMessage({
78
+ title,
79
+ description,
80
+ palette
81
+ }) {
82
+ return /* @__PURE__ */ jsxs(View, { style: styles.state, children: [
83
+ /* @__PURE__ */ jsx(Text, { style: [styles.stateTitle, {
84
+ color: palette.text
85
+ }], children: title }),
86
+ /* @__PURE__ */ jsx(Text, { style: [styles.stateDescription, {
87
+ color: palette.textMuted
88
+ }], children: description })
89
+ ] });
90
+ }
91
+ function DiscoverArticle({
92
+ slug,
93
+ orgName,
94
+ isDark
95
+ }) {
96
+ const navigation = useNavigation();
97
+ const palette = useMemo(() => discoverPalette(isDark), [isDark]);
98
+ const openLink = useChatLinkOpener();
99
+ const scrollRef = useRef(null);
100
+ const {
101
+ article,
102
+ loading,
103
+ error
104
+ } = useNewsArticle({
105
+ slug
106
+ });
107
+ useEffect(() => {
108
+ var _a;
109
+ (_a = scrollRef.current) == null ? void 0 : _a.scrollTo({
110
+ y: 0,
111
+ animated: false
112
+ });
113
+ }, [slug]);
114
+ const onOpenStory = useCallback((story) => openDiscoverArticle(navigation, story, orgName), [navigation, orgName]);
115
+ const sources = useMemo(() => article ? normalizeSources(article.sourceItems, article.sources) : [], [article]);
116
+ const content = useMemo(() => {
117
+ var _a, _b;
118
+ return article ? cleanArticleContent(article.content, article.title, (_a = article.summary) != null ? _a : void 0, (_b = article.imageUrl) != null ? _b : void 0) : "";
119
+ }, [article]);
120
+ if (!article) {
121
+ let body;
122
+ if (loading) {
123
+ body = /* @__PURE__ */ jsx(ActivityIndicator, { color: palette.primary });
124
+ } else if (error) {
125
+ body = /* @__PURE__ */ jsx(StateMessage, { title: "Unable to load article", description: "Something went wrong while fetching this article. Please try again in a moment.", palette });
126
+ } else {
127
+ body = /* @__PURE__ */ jsx(StateMessage, { title: "Article not found", description: "We could not find this news article. It may not be available yet or may have been removed.", palette });
128
+ }
129
+ return /* @__PURE__ */ jsx(View, { style: [styles.state, {
130
+ backgroundColor: palette.bg
131
+ }], children: body });
132
+ }
133
+ const publishedLabel = formatPublishedAt(article.publishedAt);
134
+ const sourceCountLabel = article.sourceCount === 1 ? "1 source" : `${article.sourceCount || sources.length} sources`;
135
+ const [leadSource] = sources;
136
+ return /* @__PURE__ */ jsxs(ScrollView, { ref: scrollRef, style: {
137
+ backgroundColor: palette.bg
138
+ }, contentContainerStyle: styles.content, children: [
139
+ /* @__PURE__ */ jsx(View, { style: styles.tagRow, children: /* @__PURE__ */ jsx(TagChip, { label: article.tag, palette }) }),
140
+ /* @__PURE__ */ jsx(Text, { style: [styles.title, {
141
+ color: palette.text
142
+ }], accessibilityRole: "header", children: article.title }),
143
+ article.summary ? /* @__PURE__ */ jsx(Text, { style: [styles.summary, {
144
+ color: palette.text
145
+ }], children: article.summary }) : null,
146
+ leadSource ? /* @__PURE__ */ jsxs(Pressable, { accessibilityRole: leadSource.url ? "link" : void 0, disabled: !leadSource.url, onPress: () => leadSource.url && openLink(leadSource.url), style: [styles.leadPill, {
147
+ backgroundColor: palette.imagePlaceholder,
148
+ borderColor: palette.cardBorder
149
+ }], children: [
150
+ /* @__PURE__ */ jsx(SourceFavicon, { source: leadSource, size: 14, palette }),
151
+ /* @__PURE__ */ jsx(Text, { style: [styles.leadPillText, {
152
+ color: palette.textMuted
153
+ }], numberOfLines: 1, children: leadSource.name }),
154
+ sources.length > 1 ? /* @__PURE__ */ jsxs(Text, { style: [styles.leadPillText, {
155
+ color: palette.textMuted
156
+ }], children: [
157
+ "+",
158
+ sources.length - 1
159
+ ] }) : null
160
+ ] }) : null,
161
+ /* @__PURE__ */ jsxs(View, { style: [styles.byline, {
162
+ borderBottomColor: palette.border
163
+ }], children: [
164
+ /* @__PURE__ */ jsxs(View, { style: styles.bylineItem, children: [
165
+ /* @__PURE__ */ jsx(View, { style: [styles.bylineIcon, {
166
+ backgroundColor: palette.text
167
+ }], children: /* @__PURE__ */ jsx(Ionicons, { name: "layers-outline", size: 13, color: palette.bg }) }),
168
+ /* @__PURE__ */ jsxs(Text, { style: [styles.bylineStrong, {
169
+ color: palette.textMuted
170
+ }], children: [
171
+ "Summarized from ",
172
+ sourceCountLabel
173
+ ] })
174
+ ] }),
175
+ publishedLabel ? /* @__PURE__ */ jsxs(Pressable, { accessibilityRole: "link", onPress: () => article.href && openLink(article.href), style: styles.bylineItem, children: [
176
+ /* @__PURE__ */ jsx(Ionicons, { name: "time-outline", size: 14, color: palette.textMuted }),
177
+ /* @__PURE__ */ jsx(Text, { style: [styles.bylineText, {
178
+ color: palette.textMuted
179
+ }], children: publishedLabel })
180
+ ] }) : null
181
+ ] }),
182
+ /* @__PURE__ */ jsx(SourceCards, { sources, palette, onOpen: openLink }),
183
+ article.imageUrl ? /* @__PURE__ */ jsx(View, { style: [styles.hero, {
184
+ backgroundColor: palette.imagePlaceholder,
185
+ borderColor: palette.cardBorder
186
+ }], children: /* @__PURE__ */ jsx(Image, { source: {
187
+ uri: article.imageUrl
188
+ }, style: StyleSheet.absoluteFill, contentFit: "cover", transition: 150, accessibilityIgnoresInvertColors: true }) }) : null,
189
+ content ? /* @__PURE__ */ jsx(View, { style: styles.body, children: /* @__PURE__ */ jsx(AssistantMarkdown, { text: content, isDark }) }) : null,
190
+ /* @__PURE__ */ jsx(DiscoverMore, { article, palette, onOpen: onOpenStory })
191
+ ] });
192
+ }
193
+ const styles = StyleSheet.create({
194
+ content: {
195
+ paddingHorizontal: 18,
196
+ paddingTop: 18,
197
+ paddingBottom: 48
198
+ },
199
+ pressed: {
200
+ opacity: 0.85
201
+ },
202
+ tagRow: {
203
+ flexDirection: "row"
204
+ },
205
+ title: {
206
+ marginTop: 14,
207
+ fontFamily: DISCOVER_SERIF,
208
+ fontSize: 28,
209
+ lineHeight: 34,
210
+ fontWeight: "700",
211
+ letterSpacing: -0.4
212
+ },
213
+ summary: {
214
+ marginTop: 14,
215
+ fontFamily: DISCOVER_SERIF,
216
+ fontSize: 18,
217
+ lineHeight: 27
218
+ },
219
+ leadPill: {
220
+ marginTop: 10,
221
+ alignSelf: "flex-start",
222
+ flexDirection: "row",
223
+ alignItems: "center",
224
+ gap: 6,
225
+ borderRadius: 999,
226
+ borderWidth: StyleSheet.hairlineWidth,
227
+ paddingHorizontal: 9,
228
+ paddingVertical: 4,
229
+ maxWidth: 240
230
+ },
231
+ leadPillText: {
232
+ fontSize: 12,
233
+ fontWeight: "500"
234
+ },
235
+ byline: {
236
+ marginTop: 18,
237
+ paddingBottom: 14,
238
+ borderBottomWidth: StyleSheet.hairlineWidth,
239
+ flexDirection: "row",
240
+ flexWrap: "wrap",
241
+ alignItems: "center",
242
+ justifyContent: "space-between",
243
+ gap: 10
244
+ },
245
+ bylineItem: {
246
+ flexDirection: "row",
247
+ alignItems: "center",
248
+ gap: 7
249
+ },
250
+ bylineIcon: {
251
+ width: 22,
252
+ height: 22,
253
+ borderRadius: 6,
254
+ alignItems: "center",
255
+ justifyContent: "center"
256
+ },
257
+ bylineStrong: {
258
+ fontSize: 14,
259
+ fontWeight: "600"
260
+ },
261
+ bylineText: {
262
+ fontSize: 13
263
+ },
264
+ sourcesScroll: {
265
+ marginTop: 16,
266
+ marginHorizontal: -18
267
+ },
268
+ sourcesContent: {
269
+ paddingHorizontal: 18,
270
+ gap: 10
271
+ },
272
+ sourceCard: {
273
+ width: 168,
274
+ minHeight: 82,
275
+ borderRadius: 12,
276
+ borderWidth: StyleSheet.hairlineWidth,
277
+ padding: 11,
278
+ gap: 7
279
+ },
280
+ sourceHead: {
281
+ flexDirection: "row",
282
+ alignItems: "center",
283
+ gap: 7
284
+ },
285
+ sourceName: {
286
+ flex: 1,
287
+ fontSize: 12,
288
+ fontWeight: "600"
289
+ },
290
+ sourceTitle: {
291
+ fontSize: 13,
292
+ lineHeight: 18
293
+ },
294
+ faviconFallback: {
295
+ borderRadius: 4,
296
+ alignItems: "center",
297
+ justifyContent: "center"
298
+ },
299
+ hero: {
300
+ marginTop: 18,
301
+ width: "100%",
302
+ aspectRatio: 16 / 9,
303
+ borderRadius: 16,
304
+ borderWidth: StyleSheet.hairlineWidth,
305
+ overflow: "hidden"
306
+ },
307
+ body: {
308
+ marginTop: 20
309
+ },
310
+ more: {
311
+ marginTop: 32,
312
+ paddingTop: 22,
313
+ borderTopWidth: StyleSheet.hairlineWidth
314
+ },
315
+ moreHead: {
316
+ flexDirection: "row",
317
+ alignItems: "center",
318
+ gap: 8
319
+ },
320
+ moreTitle: {
321
+ fontSize: 19,
322
+ fontWeight: "700",
323
+ letterSpacing: -0.2
324
+ },
325
+ moreList: {
326
+ marginTop: 14,
327
+ gap: 12
328
+ },
329
+ state: {
330
+ flex: 1,
331
+ alignItems: "center",
332
+ justifyContent: "center",
333
+ paddingHorizontal: 28,
334
+ gap: 8
335
+ },
336
+ stateTitle: {
337
+ fontSize: 17,
338
+ fontWeight: "600",
339
+ textAlign: "center"
340
+ },
341
+ stateDescription: {
342
+ fontSize: 14,
343
+ lineHeight: 20,
344
+ textAlign: "center"
345
+ }
346
+ });export{DiscoverArticle};//# sourceMappingURL=DiscoverArticle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiscoverArticle.js","sources":["../../../src/features/discover/DiscoverArticle.tsx"],"sourcesContent":["/**\n * Native Discover reader — the browser's `DiscoverArticlePage`: tag, headline,\n * summary with a lead source pill, source cards, hero, cleaned body, and\n * \"Discover more\" from the same topic. The browser's \"Ask follow-up\" box is\n * not here yet: it hands off through the web chat session store.\n */\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { ActivityIndicator, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';\nimport { Image } from 'expo-image';\nimport { Ionicons } from '@expo/vector-icons';\nimport { useNavigation } from '@react-navigation/native';\nimport type { IAccountNewsArticle } from 'common';\nimport { AssistantMarkdown } from '../chat/AssistantMarkdown';\nimport { useChatLinkOpener } from '../links/chatLinkOpener';\nimport {\n cleanArticleContent,\n faviconUrl,\n formatPublishedAt,\n getStoryId,\n normalizeSources,\n type NormalizedSource,\n} from './articleContent';\nimport {\n CompactStoryCard,\n DISCOVER_SERIF,\n TagChip,\n discoverPalette,\n openDiscoverArticle,\n type DiscoverPalette,\n} from './DiscoverStoryCards';\nimport { useNewsArticle, useNewsArticlesInfinite } from './useDiscoverNews';\n\nconst MAX_SOURCE_CARDS = 8;\nconst DISCOVER_MORE_COUNT = 4;\n\nfunction SourceFavicon({\n source,\n size,\n palette,\n}: {\n source: NormalizedSource;\n size: number;\n palette: DiscoverPalette;\n}) {\n const [failed, setFailed] = useState(false);\n const letter = (source.name || source.host || '?').charAt(0).toUpperCase();\n\n if (source.host && !failed) {\n return (\n <Image\n source={{ uri: faviconUrl(source.host) }}\n style={{ width: size, height: size, borderRadius: 4 }}\n contentFit=\"contain\"\n onError={() => setFailed(true)}\n />\n );\n }\n\n return (\n <View style={[styles.faviconFallback, { width: size, height: size, backgroundColor: palette.text }]}>\n <Text style={{ color: palette.bg, fontSize: Math.round(size * 0.55), fontWeight: '700' }}>{letter}</Text>\n </View>\n );\n}\n\nfunction SourceCards({\n sources,\n palette,\n onOpen,\n}: {\n sources: NormalizedSource[];\n palette: DiscoverPalette;\n onOpen: (url: string) => void;\n}) {\n if (sources.length === 0) return null;\n return (\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n style={styles.sourcesScroll}\n contentContainerStyle={styles.sourcesContent}\n >\n {sources.slice(0, MAX_SOURCE_CARDS).map((source, index) => (\n <Pressable\n key={`${source.name}-${index}`}\n accessibilityRole={source.url ? 'link' : undefined}\n disabled={!source.url}\n onPress={() => source.url && onOpen(source.url)}\n style={({ pressed }) => [\n styles.sourceCard,\n { backgroundColor: palette.imagePlaceholder, borderColor: palette.cardBorder },\n pressed && styles.pressed,\n ]}\n >\n <View style={styles.sourceHead}>\n <SourceFavicon source={source} size={16} palette={palette} />\n <Text style={[styles.sourceName, { color: palette.textMuted }]} numberOfLines={1}>\n {source.name}\n </Text>\n </View>\n {source.title ? (\n <Text style={[styles.sourceTitle, { color: palette.text }]} numberOfLines={2}>\n {source.title}\n </Text>\n ) : null}\n </Pressable>\n ))}\n </ScrollView>\n );\n}\n\nfunction DiscoverMore({\n article,\n palette,\n onOpen,\n}: {\n article: IAccountNewsArticle;\n palette: DiscoverPalette;\n onOpen: (story: IAccountNewsArticle) => void;\n}) {\n // Same variables as the feed's first page, so this reads the cached list.\n const { articles } = useNewsArticlesInfinite({ topic: article.topic });\n const currentId = getStoryId(article);\n const related = articles.filter((story) => getStoryId(story) !== currentId).slice(0, DISCOVER_MORE_COUNT);\n\n if (related.length === 0) return null;\n\n return (\n <View style={[styles.more, { borderTopColor: palette.border }]}>\n <View style={styles.moreHead}>\n <Ionicons name=\"sparkles-outline\" size={18} color={palette.text} />\n <Text style={[styles.moreTitle, { color: palette.text }]}>Discover more</Text>\n </View>\n <View style={styles.moreList}>\n {related.map((story) => (\n <CompactStoryCard key={getStoryId(story)} story={story} palette={palette} onPress={onOpen} />\n ))}\n </View>\n </View>\n );\n}\n\nfunction StateMessage({\n title,\n description,\n palette,\n}: {\n title: string;\n description: string;\n palette: DiscoverPalette;\n}) {\n return (\n <View style={styles.state}>\n <Text style={[styles.stateTitle, { color: palette.text }]}>{title}</Text>\n <Text style={[styles.stateDescription, { color: palette.textMuted }]}>{description}</Text>\n </View>\n );\n}\n\nexport function DiscoverArticle({\n slug,\n orgName,\n isDark,\n}: {\n slug: string | null;\n orgName: string | null;\n isDark: boolean;\n}) {\n const navigation = useNavigation();\n const palette = useMemo(() => discoverPalette(isDark), [isDark]);\n const openLink = useChatLinkOpener();\n const scrollRef = useRef<ScrollView>(null);\n const { article, loading, error } = useNewsArticle({ slug });\n\n // \"Discover more\" reopens this same route with a new slug.\n useEffect(() => {\n scrollRef.current?.scrollTo({ y: 0, animated: false });\n }, [slug]);\n\n const onOpenStory = useCallback(\n (story: IAccountNewsArticle) => openDiscoverArticle(navigation, story, orgName),\n [navigation, orgName],\n );\n\n const sources = useMemo(() => (article ? normalizeSources(article.sourceItems, article.sources) : []), [article]);\n const content = useMemo(\n () =>\n article\n ? cleanArticleContent(\n article.content,\n article.title,\n article.summary ?? undefined,\n article.imageUrl ?? undefined,\n )\n : '',\n [article],\n );\n\n if (!article) {\n let body: React.ReactElement;\n if (loading) {\n body = <ActivityIndicator color={palette.primary} />;\n } else if (error) {\n body = (\n <StateMessage\n title=\"Unable to load article\"\n description=\"Something went wrong while fetching this article. Please try again in a moment.\"\n palette={palette}\n />\n );\n } else {\n body = (\n <StateMessage\n title=\"Article not found\"\n description=\"We could not find this news article. It may not be available yet or may have been removed.\"\n palette={palette}\n />\n );\n }\n return <View style={[styles.state, { backgroundColor: palette.bg }]}>{body}</View>;\n }\n\n const publishedLabel = formatPublishedAt(article.publishedAt);\n const sourceCountLabel =\n article.sourceCount === 1 ? '1 source' : `${article.sourceCount || sources.length} sources`;\n const [leadSource] = sources;\n\n return (\n <ScrollView ref={scrollRef} style={{ backgroundColor: palette.bg }} contentContainerStyle={styles.content}>\n <View style={styles.tagRow}>\n <TagChip label={article.tag} palette={palette} />\n </View>\n\n <Text style={[styles.title, { color: palette.text }]} accessibilityRole=\"header\">\n {article.title}\n </Text>\n\n {article.summary ? <Text style={[styles.summary, { color: palette.text }]}>{article.summary}</Text> : null}\n\n {leadSource ? (\n <Pressable\n accessibilityRole={leadSource.url ? 'link' : undefined}\n disabled={!leadSource.url}\n onPress={() => leadSource.url && openLink(leadSource.url)}\n style={[\n styles.leadPill,\n { backgroundColor: palette.imagePlaceholder, borderColor: palette.cardBorder },\n ]}\n >\n <SourceFavicon source={leadSource} size={14} palette={palette} />\n <Text style={[styles.leadPillText, { color: palette.textMuted }]} numberOfLines={1}>\n {leadSource.name}\n </Text>\n {sources.length > 1 ? (\n <Text style={[styles.leadPillText, { color: palette.textMuted }]}>+{sources.length - 1}</Text>\n ) : null}\n </Pressable>\n ) : null}\n\n <View style={[styles.byline, { borderBottomColor: palette.border }]}>\n <View style={styles.bylineItem}>\n <View style={[styles.bylineIcon, { backgroundColor: palette.text }]}>\n <Ionicons name=\"layers-outline\" size={13} color={palette.bg} />\n </View>\n <Text style={[styles.bylineStrong, { color: palette.textMuted }]}>\n Summarized from {sourceCountLabel}\n </Text>\n </View>\n {publishedLabel ? (\n <Pressable\n accessibilityRole=\"link\"\n onPress={() => article.href && openLink(article.href)}\n style={styles.bylineItem}\n >\n <Ionicons name=\"time-outline\" size={14} color={palette.textMuted} />\n <Text style={[styles.bylineText, { color: palette.textMuted }]}>{publishedLabel}</Text>\n </Pressable>\n ) : null}\n </View>\n\n <SourceCards sources={sources} palette={palette} onOpen={openLink} />\n\n {article.imageUrl ? (\n <View\n style={[\n styles.hero,\n { backgroundColor: palette.imagePlaceholder, borderColor: palette.cardBorder },\n ]}\n >\n <Image\n source={{ uri: article.imageUrl }}\n style={StyleSheet.absoluteFill}\n contentFit=\"cover\"\n transition={150}\n accessibilityIgnoresInvertColors\n />\n </View>\n ) : null}\n\n {content ? (\n <View style={styles.body}>\n <AssistantMarkdown text={content} isDark={isDark} />\n </View>\n ) : null}\n\n <DiscoverMore article={article} palette={palette} onOpen={onOpenStory} />\n </ScrollView>\n );\n}\n\nconst styles = StyleSheet.create({\n content: {\n paddingHorizontal: 18,\n paddingTop: 18,\n paddingBottom: 48,\n },\n pressed: {\n opacity: 0.85,\n },\n tagRow: {\n flexDirection: 'row',\n },\n title: {\n marginTop: 14,\n fontFamily: DISCOVER_SERIF,\n fontSize: 28,\n lineHeight: 34,\n fontWeight: '700',\n letterSpacing: -0.4,\n },\n summary: {\n marginTop: 14,\n fontFamily: DISCOVER_SERIF,\n fontSize: 18,\n lineHeight: 27,\n },\n leadPill: {\n marginTop: 10,\n alignSelf: 'flex-start',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 6,\n borderRadius: 999,\n borderWidth: StyleSheet.hairlineWidth,\n paddingHorizontal: 9,\n paddingVertical: 4,\n maxWidth: 240,\n },\n leadPillText: {\n fontSize: 12,\n fontWeight: '500',\n },\n byline: {\n marginTop: 18,\n paddingBottom: 14,\n borderBottomWidth: StyleSheet.hairlineWidth,\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 10,\n },\n bylineItem: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 7,\n },\n bylineIcon: {\n width: 22,\n height: 22,\n borderRadius: 6,\n alignItems: 'center',\n justifyContent: 'center',\n },\n bylineStrong: {\n fontSize: 14,\n fontWeight: '600',\n },\n bylineText: {\n fontSize: 13,\n },\n sourcesScroll: {\n marginTop: 16,\n marginHorizontal: -18,\n },\n sourcesContent: {\n paddingHorizontal: 18,\n gap: 10,\n },\n sourceCard: {\n width: 168,\n minHeight: 82,\n borderRadius: 12,\n borderWidth: StyleSheet.hairlineWidth,\n padding: 11,\n gap: 7,\n },\n sourceHead: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 7,\n },\n sourceName: {\n flex: 1,\n fontSize: 12,\n fontWeight: '600',\n },\n sourceTitle: {\n fontSize: 13,\n lineHeight: 18,\n },\n faviconFallback: {\n borderRadius: 4,\n alignItems: 'center',\n justifyContent: 'center',\n },\n hero: {\n marginTop: 18,\n width: '100%',\n aspectRatio: 16 / 9,\n borderRadius: 16,\n borderWidth: StyleSheet.hairlineWidth,\n overflow: 'hidden',\n },\n body: {\n marginTop: 20,\n },\n more: {\n marginTop: 32,\n paddingTop: 22,\n borderTopWidth: StyleSheet.hairlineWidth,\n },\n moreHead: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n moreTitle: {\n fontSize: 19,\n fontWeight: '700',\n letterSpacing: -0.2,\n },\n moreList: {\n marginTop: 14,\n gap: 12,\n },\n state: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: 28,\n gap: 8,\n },\n stateTitle: {\n fontSize: 17,\n fontWeight: '600',\n textAlign: 'center',\n },\n stateDescription: {\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n },\n});\n"],"names":[],"mappings":"muBAiBA,MAAM,gBAAmB,GAAA,CAAA;AACzB,MAAM,mBAAsB,GAAA,CAAA;AAC5B,SAAS,aAAc,CAAA;AAAA,EAC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GACP;AAAA,EACA,SAAW,EAAA;AAAA,IACT,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,KAAA;AAAA,IACZ,aAAe,EAAA;AAAA,GACjB;AAAA,EACA,QAAU,EAAA;AAAA,IACR,SAAW,EAAA,EAAA;AAAA,IACX,GAAK,EAAA;AAAA,GACP;AAAA,EACA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,CAAA;AAAA,IACN,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA,QAAA;AAAA,IAChB,iBAAmB,EAAA,EAAA;AAAA,IACnB,GAAK,EAAA;AAAA,GACP;AAAA,EACA,UAAY,EAAA;AAAA,IACV,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,KAAA;AAAA,IACZ,SAAW,EAAA;AAAA,GACb;AAAA,EACA,gBAAkB,EAAA;AAAA,IAChB,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,EAAA;AAAA,IACZ,SAAW,EAAA;AAAA;AAEf,CAAC,CAAA"}
@@ -0,0 +1,152 @@
1
+ import {jsx,jsxs}from'react/jsx-runtime';import {useMemo,useState,useRef,useEffect,useCallback}from'react';import {View,StyleSheet,ActivityIndicator,FlatList,RefreshControl,ScrollView,Pressable,Text}from'react-native';import {useNavigation}from'@react-navigation/native';import {getStoryId}from'./articleContent.js';import {discoverPalette,openDiscoverArticle,LeadStoryCard,CompactStoryCard}from'./DiscoverStoryCards.js';import {DISCOVER_TOPICS,useNewsArticlesInfinite}from'./useDiscoverNews.js';const BLOCK_SIZE = 5;
2
+ function TopicTabs({
3
+ active,
4
+ onChange,
5
+ palette
6
+ }) {
7
+ return /* @__PURE__ */ jsx(View, { style: [styles.tabsBar, {
8
+ borderBottomColor: palette.border,
9
+ backgroundColor: palette.bg
10
+ }], children: /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerStyle: styles.tabsContent, accessibilityRole: "tablist", children: DISCOVER_TOPICS.map((topic) => {
11
+ const selected = topic.key === active;
12
+ return /* @__PURE__ */ jsx(Pressable, { accessibilityRole: "tab", accessibilityState: {
13
+ selected
14
+ }, onPress: () => onChange(topic.key), style: [styles.tab, selected && {
15
+ backgroundColor: palette.primarySoft,
16
+ borderColor: palette.primaryBorder
17
+ }], children: /* @__PURE__ */ jsx(Text, { style: [styles.tabLabel, {
18
+ color: selected ? palette.primary : palette.textMuted
19
+ }, selected && styles.tabLabelSelected], children: topic.label }) }, topic.key);
20
+ }) }) });
21
+ }
22
+ function Separator() {
23
+ return /* @__PURE__ */ jsx(View, { style: styles.separator });
24
+ }
25
+ function StateMessage({
26
+ title,
27
+ description,
28
+ palette
29
+ }) {
30
+ return /* @__PURE__ */ jsxs(View, { style: styles.state, children: [
31
+ /* @__PURE__ */ jsx(Text, { style: [styles.stateTitle, {
32
+ color: palette.text
33
+ }], children: title }),
34
+ /* @__PURE__ */ jsx(Text, { style: [styles.stateDescription, {
35
+ color: palette.textMuted
36
+ }], children: description })
37
+ ] });
38
+ }
39
+ function DiscoverFeed({
40
+ orgName,
41
+ isDark
42
+ }) {
43
+ var _a, _b;
44
+ const navigation = useNavigation();
45
+ const palette = useMemo(() => discoverPalette(isDark), [isDark]);
46
+ const [topic, setTopic] = useState(DISCOVER_TOPICS[0].key);
47
+ const topicLabel = (_b = (_a = DISCOVER_TOPICS.find((t) => t.key === topic)) == null ? void 0 : _a.label) != null ? _b : "Top";
48
+ const listRef = useRef(null);
49
+ const [refreshing, setRefreshing] = useState(false);
50
+ const {
51
+ articles,
52
+ loading,
53
+ loadingMore,
54
+ hasMore,
55
+ error,
56
+ loadMore,
57
+ refetch
58
+ } = useNewsArticlesInfinite({
59
+ topic
60
+ });
61
+ useEffect(() => {
62
+ var _a2;
63
+ (_a2 = listRef.current) == null ? void 0 : _a2.scrollToOffset({
64
+ offset: 0,
65
+ animated: false
66
+ });
67
+ }, [topic]);
68
+ const onOpen = useCallback((story) => openDiscoverArticle(navigation, story, orgName), [navigation, orgName]);
69
+ const onRefresh = useCallback(async () => {
70
+ setRefreshing(true);
71
+ try {
72
+ await refetch();
73
+ } catch (e) {
74
+ } finally {
75
+ setRefreshing(false);
76
+ }
77
+ }, [refetch]);
78
+ const renderItem = useCallback(({
79
+ item,
80
+ index
81
+ }) => index % BLOCK_SIZE === 0 ? /* @__PURE__ */ jsx(LeadStoryCard, { story: item, palette, onPress: onOpen }) : /* @__PURE__ */ jsx(CompactStoryCard, { story: item, palette, onPress: onOpen }), [onOpen, palette]);
82
+ let empty = null;
83
+ if (loading && articles.length === 0) {
84
+ empty = /* @__PURE__ */ jsx(View, { style: styles.state, children: /* @__PURE__ */ jsx(ActivityIndicator, { color: palette.primary }) });
85
+ } else if (error && articles.length === 0) {
86
+ empty = /* @__PURE__ */ jsx(StateMessage, { title: "Unable to load stories", description: `Something went wrong while fetching the latest ${topicLabel} stories. Pull down to try again.`, palette });
87
+ } else if (articles.length === 0) {
88
+ empty = /* @__PURE__ */ jsx(StateMessage, { title: "No stories yet", description: `We do not have any ${topicLabel} stories to show right now. Please check back shortly.`, palette });
89
+ }
90
+ return /* @__PURE__ */ jsxs(View, { style: [styles.container, {
91
+ backgroundColor: palette.bg
92
+ }], children: [
93
+ /* @__PURE__ */ jsx(TopicTabs, { active: topic, onChange: setTopic, palette }),
94
+ /* @__PURE__ */ jsx(FlatList, { ref: listRef, data: articles, keyExtractor: (item, index) => `${getStoryId(item)}-${index}`, renderItem, contentContainerStyle: styles.listContent, ItemSeparatorComponent: Separator, ListEmptyComponent: empty, ListFooterComponent: loadingMore ? /* @__PURE__ */ jsx(ActivityIndicator, { style: styles.footerSpinner, color: palette.textMuted }) : null, onEndReached: hasMore ? loadMore : void 0, onEndReachedThreshold: 0.6, refreshControl: /* @__PURE__ */ jsx(RefreshControl, { refreshing, onRefresh, tintColor: palette.textMuted }) })
95
+ ] });
96
+ }
97
+ const styles = StyleSheet.create({
98
+ container: {
99
+ flex: 1
100
+ },
101
+ tabsBar: {
102
+ borderBottomWidth: StyleSheet.hairlineWidth
103
+ },
104
+ tabsContent: {
105
+ paddingHorizontal: 12,
106
+ paddingVertical: 10,
107
+ gap: 6
108
+ },
109
+ tab: {
110
+ paddingHorizontal: 14,
111
+ paddingVertical: 7,
112
+ borderRadius: 999,
113
+ borderWidth: StyleSheet.hairlineWidth,
114
+ borderColor: "transparent"
115
+ },
116
+ tabLabel: {
117
+ fontSize: 14,
118
+ fontWeight: "500"
119
+ },
120
+ tabLabelSelected: {
121
+ fontWeight: "600"
122
+ },
123
+ listContent: {
124
+ padding: 16,
125
+ paddingBottom: 40,
126
+ flexGrow: 1
127
+ },
128
+ separator: {
129
+ height: 14
130
+ },
131
+ footerSpinner: {
132
+ paddingVertical: 20
133
+ },
134
+ state: {
135
+ flex: 1,
136
+ alignItems: "center",
137
+ justifyContent: "center",
138
+ paddingHorizontal: 28,
139
+ paddingVertical: 60,
140
+ gap: 8
141
+ },
142
+ stateTitle: {
143
+ fontSize: 17,
144
+ fontWeight: "600",
145
+ textAlign: "center"
146
+ },
147
+ stateDescription: {
148
+ fontSize: 14,
149
+ lineHeight: 20,
150
+ textAlign: "center"
151
+ }
152
+ });export{DiscoverFeed};//# sourceMappingURL=DiscoverFeed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiscoverFeed.js","sources":["../../../src/features/discover/DiscoverFeed.tsx"],"sourcesContent":["/**\n * Native Discover feed: the browser's `/discover` topic tabs over an\n * infinite list of news stories. Stories run in blocks of five like the web\n * page — a lead card, then compact rows.\n */\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n ActivityIndicator,\n FlatList,\n Pressable,\n RefreshControl,\n ScrollView,\n StyleSheet,\n Text,\n View,\n} from 'react-native';\nimport { useNavigation } from '@react-navigation/native';\nimport type { IAccountNewsArticle } from 'common';\nimport { getStoryId } from './articleContent';\nimport {\n CompactStoryCard,\n LeadStoryCard,\n discoverPalette,\n openDiscoverArticle,\n type DiscoverPalette,\n} from './DiscoverStoryCards';\nimport { DISCOVER_TOPICS, useNewsArticlesInfinite } from './useDiscoverNews';\n\nconst BLOCK_SIZE = 5;\n\nfunction TopicTabs({\n active,\n onChange,\n palette,\n}: {\n active: string;\n onChange: (key: string) => void;\n palette: DiscoverPalette;\n}) {\n return (\n <View style={[styles.tabsBar, { borderBottomColor: palette.border, backgroundColor: palette.bg }]}>\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={styles.tabsContent}\n accessibilityRole=\"tablist\"\n >\n {DISCOVER_TOPICS.map((topic) => {\n const selected = topic.key === active;\n return (\n <Pressable\n key={topic.key}\n accessibilityRole=\"tab\"\n accessibilityState={{ selected }}\n onPress={() => onChange(topic.key)}\n style={[\n styles.tab,\n selected && {\n backgroundColor: palette.primarySoft,\n borderColor: palette.primaryBorder,\n },\n ]}\n >\n <Text\n style={[\n styles.tabLabel,\n { color: selected ? palette.primary : palette.textMuted },\n selected && styles.tabLabelSelected,\n ]}\n >\n {topic.label}\n </Text>\n </Pressable>\n );\n })}\n </ScrollView>\n </View>\n );\n}\n\nfunction Separator() {\n return <View style={styles.separator} />;\n}\n\nfunction StateMessage({\n title,\n description,\n palette,\n}: {\n title: string;\n description: string;\n palette: DiscoverPalette;\n}) {\n return (\n <View style={styles.state}>\n <Text style={[styles.stateTitle, { color: palette.text }]}>{title}</Text>\n <Text style={[styles.stateDescription, { color: palette.textMuted }]}>{description}</Text>\n </View>\n );\n}\n\nexport function DiscoverFeed({ orgName, isDark }: { orgName: string | null; isDark: boolean }) {\n const navigation = useNavigation();\n const palette = useMemo(() => discoverPalette(isDark), [isDark]);\n const [topic, setTopic] = useState(DISCOVER_TOPICS[0].key);\n const topicLabel = DISCOVER_TOPICS.find((t) => t.key === topic)?.label ?? 'Top';\n const listRef = useRef<FlatList<IAccountNewsArticle>>(null);\n const [refreshing, setRefreshing] = useState(false);\n\n const { articles, loading, loadingMore, hasMore, error, loadMore, refetch } = useNewsArticlesInfinite({ topic });\n\n useEffect(() => {\n listRef.current?.scrollToOffset({ offset: 0, animated: false });\n }, [topic]);\n\n const onOpen = useCallback(\n (story: IAccountNewsArticle) => openDiscoverArticle(navigation, story, orgName),\n [navigation, orgName],\n );\n\n const onRefresh = useCallback(async () => {\n setRefreshing(true);\n try {\n await refetch();\n } catch {\n // The error state below covers a failed refresh.\n } finally {\n setRefreshing(false);\n }\n }, [refetch]);\n\n const renderItem = useCallback(\n ({ item, index }: { item: IAccountNewsArticle; index: number }) =>\n index % BLOCK_SIZE === 0 ? (\n <LeadStoryCard story={item} palette={palette} onPress={onOpen} />\n ) : (\n <CompactStoryCard story={item} palette={palette} onPress={onOpen} />\n ),\n [onOpen, palette],\n );\n\n let empty: React.ReactElement | null = null;\n if (loading && articles.length === 0) {\n empty = (\n <View style={styles.state}>\n <ActivityIndicator color={palette.primary} />\n </View>\n );\n } else if (error && articles.length === 0) {\n empty = (\n <StateMessage\n title=\"Unable to load stories\"\n description={`Something went wrong while fetching the latest ${topicLabel} stories. Pull down to try again.`}\n palette={palette}\n />\n );\n } else if (articles.length === 0) {\n empty = (\n <StateMessage\n title=\"No stories yet\"\n description={`We do not have any ${topicLabel} stories to show right now. Please check back shortly.`}\n palette={palette}\n />\n );\n }\n\n return (\n <View style={[styles.container, { backgroundColor: palette.bg }]}>\n <TopicTabs active={topic} onChange={setTopic} palette={palette} />\n <FlatList\n ref={listRef}\n data={articles}\n keyExtractor={(item, index) => `${getStoryId(item)}-${index}`}\n renderItem={renderItem}\n contentContainerStyle={styles.listContent}\n ItemSeparatorComponent={Separator}\n ListEmptyComponent={empty}\n ListFooterComponent={\n loadingMore ? <ActivityIndicator style={styles.footerSpinner} color={palette.textMuted} /> : null\n }\n onEndReached={hasMore ? loadMore : undefined}\n onEndReachedThreshold={0.6}\n refreshControl={\n <RefreshControl refreshing={refreshing} onRefresh={onRefresh} tintColor={palette.textMuted} />\n }\n />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n tabsBar: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n tabsContent: {\n paddingHorizontal: 12,\n paddingVertical: 10,\n gap: 6,\n },\n tab: {\n paddingHorizontal: 14,\n paddingVertical: 7,\n borderRadius: 999,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: 'transparent',\n },\n tabLabel: {\n fontSize: 14,\n fontWeight: '500',\n },\n tabLabelSelected: {\n fontWeight: '600',\n },\n listContent: {\n padding: 16,\n paddingBottom: 40,\n flexGrow: 1,\n },\n separator: {\n height: 14,\n },\n footerSpinner: {\n paddingVertical: 20,\n },\n state: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: 28,\n paddingVertical: 60,\n gap: 8,\n },\n stateTitle: {\n fontSize: 17,\n fontWeight: '600',\n textAlign: 'center',\n },\n stateDescription: {\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n },\n});\n"],"names":["_a"],"mappings":"gfAYA,MAAM,UAAa,GAAA,CAAA;AACnB,SAAS,SAAU,CAAA;AAAA,EACjB,MAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF,CAIG,EAAA;AACD,EAAA,uBAAQ,GAAA,CAAA,IAAA,EAAA,EAAK,KAAO,EAAA,CAAC,OAAO,OAAS,EAAA;AAAA,IACnC,mBAAmB,OAAQ,CAAA,MAAA;AAAA,IAC3B,iBAAiB,OAAQ,CAAA;AAAA,GAC1B,CAAA,EACS,QAAC,kBAAA,GAAA,CAAA,UAAA,EAAA,EAAW,YAAU,IAAC,EAAA,8BAAA,EAAgC,KAAO,EAAA,qBAAA,EAAuB,OAAO,WAAa,EAAA,iBAAA,EAAkB,SACtH,EAAA,QAAA,EAAA,eAAA,CAAgB,IAAI,CAAS,KAAA,KAAA;AACtC,IAAM,MAAA,QAAA,GAAW,MAAM,GAAQ,KAAA,MAAA;AAC/B,IAAA,uBAAQ,GAAA,CAAA,SAAA,EAAA,EAA0B,iBAAkB,EAAA,KAAA,EAAM,kBAAoB,EAAA;AAAA,MAC5E;AAAA,KACF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