@timpel/forumkit-sdk-react-native 0.2.4 → 0.2.6

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.
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ __export(src_exports, {
35
35
  module.exports = __toCommonJS(src_exports);
36
36
 
37
37
  // src/ForumKit.tsx
38
- var import_react_native50 = require("react-native");
38
+ var import_react_native51 = require("react-native");
39
39
  var import_react_native_safe_area_context11 = require("react-native-safe-area-context");
40
40
  var import_inter = require("@expo-google-fonts/inter");
41
41
  var import_michroma = require("@expo-google-fonts/michroma");
@@ -833,11 +833,12 @@ function SessionProvider({ config, children }) {
833
833
  if (cancelled) return;
834
834
  expiresAtRef.current = Date.now() + expiresIn * 1e3;
835
835
  refreshTimer = setTimeout(() => {
836
- void refresh();
836
+ void refresh(true);
837
837
  }, expiresIn * 1e3 * 0.8);
838
838
  }
839
- function refresh() {
840
- return createSession(apiUrl, config.token).then((result) => {
839
+ function refresh(isRenewal = false) {
840
+ const tokenPromise = isRenewal && config.getToken ? config.getToken() : Promise.resolve(config.token);
841
+ return tokenPromise.then((hostToken) => createSession(apiUrl, hostToken)).then((result) => {
841
842
  if (cancelled) return;
842
843
  setState({ status: "ready", forumId: config.forumId, apiUrl, sessionToken: result.sessionToken, userId: result.userId, role: result.role, error: null });
843
844
  scheduleRefresh(result.expiresIn);
@@ -846,7 +847,7 @@ function SessionProvider({ config, children }) {
846
847
  const message = err instanceof Error ? err.message : "Failed to create session";
847
848
  setState({ status: "error", forumId: config.forumId, apiUrl, sessionToken: null, userId: null, role: null, error: message });
848
849
  retryTimer = setTimeout(() => {
849
- void refresh();
850
+ void refresh(true);
850
851
  }, RETRY_DELAY_MS);
851
852
  });
852
853
  }
@@ -855,10 +856,10 @@ function SessionProvider({ config, children }) {
855
856
  const msRemaining = expiresAtRef.current - Date.now();
856
857
  if (refreshTimer) clearTimeout(refreshTimer);
857
858
  if (msRemaining <= 0) {
858
- void refresh();
859
+ void refresh(true);
859
860
  } else {
860
861
  refreshTimer = setTimeout(() => {
861
- void refresh();
862
+ void refresh(true);
862
863
  }, msRemaining * 0.8);
863
864
  }
864
865
  });
@@ -892,13 +893,13 @@ function useSession() {
892
893
  }
893
894
 
894
895
  // src/navigation/RootNavigator.tsx
895
- var import_react35 = require("react");
896
+ var import_react36 = require("react");
896
897
  var import_native11 = require("@react-navigation/native");
897
898
  var import_native_stack = require("@react-navigation/native-stack");
898
899
 
899
900
  // src/screens/FeedScreen.tsx
900
- var import_react23 = require("react");
901
- var import_react_native36 = require("react-native");
901
+ var import_react24 = require("react");
902
+ var import_react_native37 = require("react-native");
902
903
  var import_native4 = require("@react-navigation/native");
903
904
 
904
905
  // src/lib/vote.ts
@@ -913,8 +914,8 @@ function applyVote(vc, oldDir, newDir) {
913
914
  }
914
915
 
915
916
  // src/navigation/Shell.tsx
916
- var import_react14 = require("react");
917
- var import_react_native21 = require("react-native");
917
+ var import_react15 = require("react");
918
+ var import_react_native22 = require("react-native");
918
919
  var import_react_native_reanimated3 = __toESM(require("react-native-reanimated"));
919
920
  var import_react_native_safe_area_context7 = require("react-native-safe-area-context");
920
921
  var import_native3 = require("@react-navigation/native");
@@ -2243,7 +2244,7 @@ var import_react_native_safe_area_context3 = require("react-native-safe-area-con
2243
2244
  var import_jsx_runtime12 = require("react/jsx-runtime");
2244
2245
  function ImageLightbox({ uri, onClose }) {
2245
2246
  const insets = (0, import_react_native_safe_area_context3.useSafeAreaInsets)();
2246
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Modal, { visible: true, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.Pressable, { style: styles6.backdrop, onPress: onClose, children: [
2247
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Modal, { visible: true, transparent: true, animationType: "fade", statusBarTranslucent: true, onRequestClose: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.Pressable, { style: styles6.backdrop, onPress: onClose, children: [
2247
2248
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Image, { source: { uri }, style: styles6.image, resizeMode: "contain" }),
2248
2249
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Pressable, { onPress: onClose, hitSlop: 10, style: [styles6.close, { top: insets.top + 12 }], children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CloseIcon, { size: 20, color: "#fff" }) })
2249
2250
  ] }) });
@@ -2799,8 +2800,8 @@ var styles9 = import_react_native15.StyleSheet.create({
2799
2800
  });
2800
2801
 
2801
2802
  // src/composer/DraftsSheet.tsx
2802
- var import_react11 = require("react");
2803
- var import_react_native17 = require("react-native");
2803
+ var import_react12 = require("react");
2804
+ var import_react_native18 = require("react-native");
2804
2805
 
2805
2806
  // src/lib/sheet-layout.ts
2806
2807
  var import_react_native16 = require("react-native");
@@ -2814,14 +2815,47 @@ function useSheetLayout(basePaddingBottom) {
2814
2815
  };
2815
2816
  }
2816
2817
 
2817
- // src/composer/DraftsSheet.tsx
2818
+ // src/components/BottomSheetShell.tsx
2819
+ var import_react11 = require("react");
2820
+ var import_react_native17 = require("react-native");
2818
2821
  var import_jsx_runtime16 = require("react/jsx-runtime");
2822
+ function BottomSheetShell({
2823
+ visible,
2824
+ onClose,
2825
+ children,
2826
+ scrimOpacity = 0.5,
2827
+ fadeDuration = 220
2828
+ }) {
2829
+ const { height: windowHeight } = (0, import_react_native17.useWindowDimensions)();
2830
+ const progress = (0, import_react11.useRef)(new import_react_native17.Animated.Value(0)).current;
2831
+ (0, import_react11.useEffect)(() => {
2832
+ import_react_native17.Animated.timing(progress, {
2833
+ toValue: visible ? 1 : 0,
2834
+ duration: fadeDuration,
2835
+ useNativeDriver: true
2836
+ }).start();
2837
+ }, [visible, fadeDuration, progress]);
2838
+ const scrim = progress.interpolate({ inputRange: [0, 1], outputRange: [0, scrimOpacity] });
2839
+ const translateY = progress.interpolate({ inputRange: [0, 1], outputRange: [windowHeight, 0] });
2840
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native17.Modal, { transparent: true, visible, animationType: "none", statusBarTranslucent: true, onRequestClose: onClose, children: [
2841
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.Animated.View, { style: [styles10.scrim, { opacity: scrim }], pointerEvents: "none" }),
2842
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.Pressable, { style: import_react_native17.StyleSheet.absoluteFill, onPress: onClose }),
2843
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.Animated.View, { style: [styles10.sheetWrap, { transform: [{ translateY }] }], pointerEvents: "box-none", children })
2844
+ ] });
2845
+ }
2846
+ var styles10 = import_react_native17.StyleSheet.create({
2847
+ scrim: { ...import_react_native17.StyleSheet.absoluteFill, backgroundColor: "#000" },
2848
+ sheetWrap: { flex: 1, justifyContent: "flex-end" }
2849
+ });
2850
+
2851
+ // src/composer/DraftsSheet.tsx
2852
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2819
2853
  function DraftsSheet({ apiUrl, forumId, token, onClose, onOpen }) {
2820
2854
  const { tokens } = useTheme();
2821
2855
  const { maxHeight, paddingBottom } = useSheetLayout(28);
2822
- const [drafts, setDrafts] = (0, import_react11.useState)([]);
2823
- const [loading, setLoading] = (0, import_react11.useState)(true);
2824
- (0, import_react11.useEffect)(() => {
2856
+ const [drafts, setDrafts] = (0, import_react12.useState)([]);
2857
+ const [loading, setLoading] = (0, import_react12.useState)(true);
2858
+ (0, import_react12.useEffect)(() => {
2825
2859
  if (!token) return;
2826
2860
  let cancelled = false;
2827
2861
  setLoading(true);
@@ -2841,30 +2875,28 @@ function DraftsSheet({ apiUrl, forumId, token, onClose, onOpen }) {
2841
2875
  if (token) void deleteDraft(apiUrl, forumId, id, token).catch(() => {
2842
2876
  });
2843
2877
  }
2844
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.Modal, { transparent: true, visible: true, animationType: "slide", onRequestClose: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.Pressable, { style: styles10.scrim, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native17.Pressable, { style: [styles10.sheet, { backgroundColor: tokens.elev, borderColor: tokens.border, maxHeight, paddingBottom }], onPress: () => {
2845
- }, children: [
2846
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.Text, { style: [styles10.title, { color: tokens.text }], children: "Drafts" }),
2847
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.Text, { style: [styles10.note, { color: tokens.muted }], children: "Media isn\u2019t saved in drafts." }),
2848
- loading ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.View, { style: { alignItems: "center", padding: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Mascot, { size: 36 }) }) : drafts.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.Text, { style: { color: tokens["text-2"], padding: 12 }, children: "No drafts yet" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2849
- import_react_native17.FlatList,
2878
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BottomSheetShell, { visible: true, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native18.View, { style: [styles11.sheet, { backgroundColor: tokens.elev, borderColor: tokens.border, maxHeight, paddingBottom }], children: [
2879
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native18.Text, { style: [styles11.title, { color: tokens.text }], children: "Drafts" }),
2880
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native18.Text, { style: [styles11.note, { color: tokens.muted }], children: "Media isn\u2019t saved in drafts." }),
2881
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native18.View, { style: { alignItems: "center", padding: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Mascot, { size: 36 }) }) : drafts.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native18.Text, { style: { color: tokens["text-2"], padding: 12 }, children: "No drafts yet" }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2882
+ import_react_native18.FlatList,
2850
2883
  {
2851
2884
  data: drafts,
2852
2885
  keyExtractor: (d) => d.id,
2853
2886
  style: { maxHeight: 320 },
2854
- renderItem: ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native17.Pressable, { onPress: () => onOpen(item), style: [styles10.row, { borderTopColor: tokens.border }], children: [
2855
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native17.View, { style: { flex: 1 }, children: [
2856
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.Text, { style: [styles10.dTitle, { color: tokens.text }], numberOfLines: 1, children: item.title || "Untitled" }),
2857
- item.content.body ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.Text, { style: [styles10.dBody, { color: tokens["text-2"] }], numberOfLines: 1, children: item.content.body }) : null,
2858
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.Text, { style: [styles10.dTime, { color: tokens.muted }], children: fmtRelativeTime(item.updatedAt) })
2887
+ renderItem: ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native18.Pressable, { onPress: () => onOpen(item), style: [styles11.row, { borderTopColor: tokens.border }], children: [
2888
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native18.View, { style: { flex: 1 }, children: [
2889
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native18.Text, { style: [styles11.dTitle, { color: tokens.text }], numberOfLines: 1, children: item.title || "Untitled" }),
2890
+ item.content.body ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native18.Text, { style: [styles11.dBody, { color: tokens["text-2"] }], numberOfLines: 1, children: item.content.body }) : null,
2891
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native18.Text, { style: [styles11.dTime, { color: tokens.muted }], children: fmtRelativeTime(item.updatedAt) })
2859
2892
  ] }),
2860
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native17.Pressable, { onPress: () => remove(item.id), hitSlop: 8, style: [styles10.del, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CloseIcon, { size: 14, color: tokens["text-2"] }) })
2893
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native18.Pressable, { onPress: () => remove(item.id), hitSlop: 8, style: [styles11.del, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CloseIcon, { size: 14, color: tokens["text-2"] }) })
2861
2894
  ] })
2862
2895
  }
2863
2896
  )
2864
- ] }) }) });
2897
+ ] }) });
2865
2898
  }
2866
- var styles10 = import_react_native17.StyleSheet.create({
2867
- scrim: { flex: 1, backgroundColor: "rgba(0,0,0,0.5)", justifyContent: "flex-end" },
2899
+ var styles11 = import_react_native18.StyleSheet.create({
2868
2900
  sheet: { borderTopWidth: 1, borderTopLeftRadius: 18, borderTopRightRadius: 18, paddingHorizontal: 16, paddingTop: 16 },
2869
2901
  title: { fontSize: 16, fontWeight: "800" },
2870
2902
  note: { fontSize: 12, marginTop: 4, marginBottom: 8 },
@@ -2876,48 +2908,48 @@ var styles10 = import_react_native17.StyleSheet.create({
2876
2908
  });
2877
2909
 
2878
2910
  // src/navigation/NotificationsOverlay.tsx
2879
- var import_react13 = require("react");
2880
- var import_react_native20 = require("react-native");
2911
+ var import_react14 = require("react");
2912
+ var import_react_native21 = require("react-native");
2881
2913
  var import_react_native_safe_area_context6 = require("react-native-safe-area-context");
2882
2914
  var import_native2 = require("@react-navigation/native");
2883
2915
 
2884
2916
  // src/notifications/NotificationSettingsSheet.tsx
2885
- var import_react12 = require("react");
2886
- var import_react_native19 = require("react-native");
2917
+ var import_react13 = require("react");
2918
+ var import_react_native20 = require("react-native");
2887
2919
 
2888
2920
  // src/components/Toggle.tsx
2889
- var import_react_native18 = require("react-native");
2890
- var import_jsx_runtime17 = require("react/jsx-runtime");
2921
+ var import_react_native19 = require("react-native");
2922
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2891
2923
  function Toggle({ value, onValueChange }) {
2892
2924
  const { tokens } = useTheme();
2893
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2894
- import_react_native18.Pressable,
2925
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2926
+ import_react_native19.Pressable,
2895
2927
  {
2896
2928
  onPress: onValueChange,
2897
2929
  hitSlop: 6,
2898
2930
  style: [
2899
- styles11.track,
2931
+ styles12.track,
2900
2932
  { backgroundColor: value ? tokens.accent : tokens["surface-2"], borderColor: value ? tokens.accent : tokens["border-strong"] }
2901
2933
  ],
2902
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native18.View, { style: [styles11.knob, { backgroundColor: value ? "#fff" : tokens.text }, value && styles11.knobOn] })
2934
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native19.View, { style: [styles12.knob, { backgroundColor: value ? "#fff" : tokens.text }, value && styles12.knobOn] })
2903
2935
  }
2904
2936
  );
2905
2937
  }
2906
- var styles11 = import_react_native18.StyleSheet.create({
2938
+ var styles12 = import_react_native19.StyleSheet.create({
2907
2939
  track: { width: 40, height: 24, borderRadius: 999, borderWidth: 1, padding: 2, justifyContent: "center" },
2908
2940
  knob: { width: 18, height: 18, borderRadius: 9 },
2909
2941
  knobOn: { transform: [{ translateX: 16 }] }
2910
2942
  });
2911
2943
 
2912
2944
  // src/notifications/NotificationSettingsSheet.tsx
2913
- var import_jsx_runtime18 = require("react/jsx-runtime");
2945
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2914
2946
  function NotificationSettingsSheet({ apiUrl, forumId, token, onClose }) {
2915
2947
  const { tokens } = useTheme();
2916
2948
  const { maxHeight, paddingBottom } = useSheetLayout(28);
2917
- const [prefs, setPrefs] = (0, import_react12.useState)(null);
2918
- const [isMod, setIsMod] = (0, import_react12.useState)(false);
2919
- const [loading, setLoading] = (0, import_react12.useState)(true);
2920
- (0, import_react12.useEffect)(() => {
2949
+ const [prefs, setPrefs] = (0, import_react13.useState)(null);
2950
+ const [isMod, setIsMod] = (0, import_react13.useState)(false);
2951
+ const [loading, setLoading] = (0, import_react13.useState)(true);
2952
+ (0, import_react13.useEffect)(() => {
2921
2953
  if (!token) return;
2922
2954
  let cancelled = false;
2923
2955
  getMyProfile(apiUrl, forumId, token).then((p) => {
@@ -2940,20 +2972,18 @@ function NotificationSettingsSheet({ apiUrl, forumId, token, onClose }) {
2940
2972
  void updateNotificationPrefs(apiUrl, forumId, next, token).catch(() => setPrefs(prev));
2941
2973
  }
2942
2974
  const rows = NOTIFICATION_PREF_ROWS.filter((r) => !r.modOnly || isMod);
2943
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native19.Modal, { transparent: true, visible: true, animationType: "slide", onRequestClose: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native19.Pressable, { style: styles12.scrim, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native19.Pressable, { style: [styles12.sheet, { backgroundColor: tokens.elev, borderColor: tokens.border, maxHeight, paddingBottom }], onPress: () => {
2944
- }, children: [
2945
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native19.Text, { style: [styles12.title, { color: tokens.text }], children: "Notification settings" }),
2946
- loading || !prefs ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native19.ActivityIndicator, { color: tokens.accent, style: { padding: 16 } }) : rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native19.View, { style: [styles12.row, i < rows.length - 1 && { marginBottom: 22 }], children: [
2947
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native19.View, { style: { flex: 1, paddingRight: 12 }, children: [
2948
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native19.Text, { style: [styles12.label, { color: tokens.text }], children: row.label }),
2949
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native19.Text, { style: [styles12.sub, { color: tokens.muted }], children: row.sub })
2975
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BottomSheetShell, { visible: true, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native20.View, { style: [styles13.sheet, { backgroundColor: tokens.elev, borderColor: tokens.border, maxHeight, paddingBottom }], children: [
2976
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Text, { style: [styles13.title, { color: tokens.text }], children: "Notification settings" }),
2977
+ loading || !prefs ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.ActivityIndicator, { color: tokens.accent, style: { padding: 16 } }) : rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native20.View, { style: [styles13.row, i < rows.length - 1 && { marginBottom: 22 }], children: [
2978
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native20.View, { style: { flex: 1, paddingRight: 12 }, children: [
2979
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Text, { style: [styles13.label, { color: tokens.text }], children: row.label }),
2980
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Text, { style: [styles13.sub, { color: tokens.muted }], children: row.sub })
2950
2981
  ] }),
2951
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Toggle, { value: prefs[row.key], onValueChange: () => toggle(row.key) })
2982
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Toggle, { value: prefs[row.key], onValueChange: () => toggle(row.key) })
2952
2983
  ] }, row.key))
2953
- ] }) }) });
2984
+ ] }) });
2954
2985
  }
2955
- var styles12 = import_react_native19.StyleSheet.create({
2956
- scrim: { flex: 1, backgroundColor: "rgba(0,0,0,0.5)", justifyContent: "flex-end" },
2986
+ var styles13 = import_react_native20.StyleSheet.create({
2957
2987
  sheet: { borderTopWidth: 1, borderTopLeftRadius: 18, borderTopRightRadius: 18, paddingHorizontal: 16, paddingTop: 16 },
2958
2988
  title: { fontSize: 16, fontWeight: "800", marginBottom: 8 },
2959
2989
  row: { flexDirection: "row", alignItems: "center" },
@@ -2962,8 +2992,8 @@ var styles12 = import_react_native19.StyleSheet.create({
2962
2992
  });
2963
2993
 
2964
2994
  // src/navigation/NotificationsOverlay.tsx
2965
- var import_jsx_runtime19 = require("react/jsx-runtime");
2966
- var ANDROID_TOP_EXTRA3 = import_react_native20.Platform.OS === "android" ? 12 : 0;
2995
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2996
+ var ANDROID_TOP_EXTRA3 = import_react_native21.Platform.OS === "android" ? 12 : 0;
2967
2997
  function badgeFor(n) {
2968
2998
  if (n.type === "vote") {
2969
2999
  return n.message === "down" ? { Icon: DownvoteIcon, color: "#7d3fbd" } : { Icon: UpvoteIcon, color: "#c0431a" };
@@ -2984,14 +3014,14 @@ function NotificationsOverlay({ onClose }) {
2984
3014
  const insets = (0, import_react_native_safe_area_context6.useSafeAreaInsets)();
2985
3015
  const session = useSession();
2986
3016
  const navigation = (0, import_native2.useNavigation)();
2987
- const BackIcon = import_react_native20.Platform.OS === "ios" ? ChevronLeftIcon : MaterialBackIcon;
3017
+ const BackIcon = import_react_native21.Platform.OS === "ios" ? ChevronLeftIcon : MaterialBackIcon;
2988
3018
  const { apiUrl, forumId } = session;
2989
3019
  const token = session.status === "ready" ? session.sessionToken : void 0;
2990
- const [items, setItems] = (0, import_react13.useState)([]);
2991
- const [loading, setLoading] = (0, import_react13.useState)(true);
2992
- const [error, setError] = (0, import_react13.useState)(null);
2993
- const [settingsOpen, setSettingsOpen] = (0, import_react13.useState)(false);
2994
- (0, import_react13.useEffect)(() => {
3020
+ const [items, setItems] = (0, import_react14.useState)([]);
3021
+ const [loading, setLoading] = (0, import_react14.useState)(true);
3022
+ const [error, setError] = (0, import_react14.useState)(null);
3023
+ const [settingsOpen, setSettingsOpen] = (0, import_react14.useState)(false);
3024
+ (0, import_react14.useEffect)(() => {
2995
3025
  if (!token) return;
2996
3026
  let cancelled = false;
2997
3027
  setLoading(true);
@@ -3019,7 +3049,7 @@ function NotificationsOverlay({ onClose }) {
3019
3049
  }
3020
3050
  }
3021
3051
  function handleDelete(n) {
3022
- import_react_native20.Alert.alert("Delete notification?", "", [
3052
+ import_react_native21.Alert.alert("Delete notification?", "", [
3023
3053
  { text: "Cancel", style: "cancel" },
3024
3054
  {
3025
3055
  text: "Delete",
@@ -3039,10 +3069,10 @@ function NotificationsOverlay({ onClose }) {
3039
3069
  });
3040
3070
  }
3041
3071
  const hasUnread = items.some((n) => !n.readAt);
3042
- const SCREEN_WIDTH = import_react_native20.Dimensions.get("window").width;
3043
- const translateX = (0, import_react13.useRef)(new import_react_native20.Animated.Value(0)).current;
3044
- const swipePan = (0, import_react13.useRef)(
3045
- import_react_native20.PanResponder.create({
3072
+ const SCREEN_WIDTH = import_react_native21.Dimensions.get("window").width;
3073
+ const translateX = (0, import_react14.useRef)(new import_react_native21.Animated.Value(0)).current;
3074
+ const swipePan = (0, import_react14.useRef)(
3075
+ import_react_native21.PanResponder.create({
3046
3076
  onMoveShouldSetPanResponder: (_evt, gesture) => gesture.dx > 8 && Math.abs(gesture.dx) > Math.abs(gesture.dy),
3047
3077
  onPanResponderMove: (_evt, gesture) => {
3048
3078
  if (gesture.dx > 0) translateX.setValue(gesture.dx);
@@ -3050,46 +3080,46 @@ function NotificationsOverlay({ onClose }) {
3050
3080
  onPanResponderRelease: (_evt, gesture) => {
3051
3081
  const shouldClose = gesture.dx > SCREEN_WIDTH / 3 || gesture.vx > 0.5;
3052
3082
  if (shouldClose) {
3053
- import_react_native20.Animated.timing(translateX, { toValue: SCREEN_WIDTH, duration: 180, useNativeDriver: true }).start(() => onClose());
3083
+ import_react_native21.Animated.timing(translateX, { toValue: SCREEN_WIDTH, duration: 180, useNativeDriver: true }).start(() => onClose());
3054
3084
  } else {
3055
- import_react_native20.Animated.spring(translateX, { toValue: 0, useNativeDriver: true, bounciness: 0 }).start();
3085
+ import_react_native21.Animated.spring(translateX, { toValue: 0, useNativeDriver: true, bounciness: 0 }).start();
3056
3086
  }
3057
3087
  },
3058
3088
  onPanResponderTerminate: () => {
3059
- import_react_native20.Animated.spring(translateX, { toValue: 0, useNativeDriver: true, bounciness: 0 }).start();
3089
+ import_react_native21.Animated.spring(translateX, { toValue: 0, useNativeDriver: true, bounciness: 0 }).start();
3060
3090
  }
3061
3091
  })
3062
3092
  ).current;
3063
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native20.Animated.View, { style: [styles13.overlay, { backgroundColor: tokens.bg, transform: [{ translateX }] }], ...swipePan.panHandlers, children: [
3064
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.View, { style: { paddingTop: insets.top + ANDROID_TOP_EXTRA3, borderBottomWidth: 1, borderBottomColor: tokens.border }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native20.View, { style: styles13.header, children: [
3065
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Pressable, { onPress: onClose, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BackIcon, { size: 20, color: tokens.text }) }),
3066
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Text, { style: [styles13.title, { color: tokens.text }], children: "Notifications" }),
3067
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.View, { style: { flex: 1 } }),
3068
- hasUnread && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Pressable, { onPress: handleMarkAllRead, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Text, { style: { color: tokens.accent, fontSize: 13, fontWeight: "600" }, children: "Mark all read" }) }),
3069
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Pressable, { onPress: () => setSettingsOpen(true), hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(GearIcon, { size: 20, color: tokens["text-2"] }) })
3093
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native21.Animated.View, { style: [styles14.overlay, { backgroundColor: tokens.bg, transform: [{ translateX }] }], ...swipePan.panHandlers, children: [
3094
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.View, { style: { paddingTop: insets.top + ANDROID_TOP_EXTRA3, borderBottomWidth: 1, borderBottomColor: tokens.border }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native21.View, { style: styles14.header, children: [
3095
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.Pressable, { onPress: onClose, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(BackIcon, { size: 20, color: tokens.text }) }),
3096
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.Text, { style: [styles14.title, { color: tokens.text }], children: "Notifications" }),
3097
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.View, { style: { flex: 1 } }),
3098
+ hasUnread && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.Pressable, { onPress: handleMarkAllRead, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.Text, { style: { color: tokens.accent, fontSize: 13, fontWeight: "600" }, children: "Mark all read" }) }),
3099
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.Pressable, { onPress: () => setSettingsOpen(true), hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(GearIcon, { size: 20, color: tokens["text-2"] }) })
3070
3100
  ] }) }),
3071
- loading ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.View, { style: styles13.center, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Mascot, { size: 32 }) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.View, { style: styles13.center, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Text, { style: { color: tokens["text-2"] }, children: error }) }) : items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.View, { style: styles13.center, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Text, { style: { color: tokens["text-2"] }, children: "No notifications yet" }) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3072
- import_react_native20.FlatList,
3101
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.View, { style: styles14.center, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Mascot, { size: 32 }) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.View, { style: styles14.center, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.Text, { style: { color: tokens["text-2"] }, children: error }) }) : items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.View, { style: styles14.center, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.Text, { style: { color: tokens["text-2"] }, children: "No notifications yet" }) }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3102
+ import_react_native21.FlatList,
3073
3103
  {
3074
3104
  data: items,
3075
3105
  keyExtractor: (n) => n.id,
3076
3106
  renderItem: ({ item, index }) => {
3077
3107
  const badge = badgeFor(item);
3078
3108
  const unread = !item.readAt;
3079
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3080
- import_react_native20.Pressable,
3109
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3110
+ import_react_native21.Pressable,
3081
3111
  {
3082
3112
  onPress: () => handleOpen(item),
3083
3113
  onLongPress: () => handleDelete(item),
3084
- style: [styles13.row, index > 0 && { borderTopWidth: 1, borderTopColor: tokens.border }, unread && { backgroundColor: tokens.hover }],
3114
+ style: [styles14.row, index > 0 && { borderTopWidth: 1, borderTopColor: tokens.border }, unread && { backgroundColor: tokens.hover }],
3085
3115
  children: [
3086
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native20.View, { style: styles13.avatarWrap, children: [
3087
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Avatar, { authorId: item.actorId ?? void 0, author: item.actorDisplayName ?? "Someone", avatarUrl: item.actorAvatarUrl, size: 34 }),
3088
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.View, { style: [styles13.badge, { backgroundColor: badge.color, borderColor: tokens.bg }], children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(badge.Icon, { size: 9, color: "#ffffff" }) })
3116
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native21.View, { style: styles14.avatarWrap, children: [
3117
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Avatar, { authorId: item.actorId ?? void 0, author: item.actorDisplayName ?? "Someone", avatarUrl: item.actorAvatarUrl, size: 34 }),
3118
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.View, { style: [styles14.badge, { backgroundColor: badge.color, borderColor: tokens.bg }], children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(badge.Icon, { size: 9, color: "#ffffff" }) })
3089
3119
  ] }),
3090
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Text, { style: [styles13.text, { color: tokens["text-2"] }], children: describeNotification(item) }),
3091
- item.threadImageUrl != null && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Image, { source: { uri: item.threadImageUrl }, style: [styles13.thumb, { backgroundColor: tokens["surface-2"] }] }),
3092
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native20.Text, { style: [styles13.time, { color: tokens.muted }], children: fmtRelativeTime(item.createdAt) })
3120
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.Text, { style: [styles14.text, { color: tokens["text-2"] }], children: describeNotification(item) }),
3121
+ item.threadImageUrl != null && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.Image, { source: { uri: item.threadImageUrl }, style: [styles14.thumb, { backgroundColor: tokens["surface-2"] }] }),
3122
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.Text, { style: [styles14.time, { color: tokens.muted }], children: fmtRelativeTime(item.createdAt) })
3093
3123
  ]
3094
3124
  }
3095
3125
  );
@@ -3097,10 +3127,10 @@ function NotificationsOverlay({ onClose }) {
3097
3127
  contentContainerStyle: { paddingBottom: 24 }
3098
3128
  }
3099
3129
  ),
3100
- settingsOpen && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(NotificationSettingsSheet, { apiUrl, forumId, token, onClose: () => setSettingsOpen(false) })
3130
+ settingsOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(NotificationSettingsSheet, { apiUrl, forumId, token, onClose: () => setSettingsOpen(false) })
3101
3131
  ] });
3102
3132
  }
3103
- var styles13 = import_react_native20.StyleSheet.create({
3133
+ var styles14 = import_react_native21.StyleSheet.create({
3104
3134
  overlay: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, zIndex: 65 },
3105
3135
  header: { height: 52, flexDirection: "row", alignItems: "center", gap: 14, paddingHorizontal: 16 },
3106
3136
  title: { fontSize: 16, fontWeight: "800" },
@@ -3114,12 +3144,12 @@ var styles13 = import_react_native20.StyleSheet.create({
3114
3144
  });
3115
3145
 
3116
3146
  // src/navigation/Shell.tsx
3117
- var import_jsx_runtime20 = require("react/jsx-runtime");
3118
- var ANDROID_TOP_EXTRA4 = import_react_native21.Platform.OS === "android" ? 12 : 0;
3147
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3148
+ var ANDROID_TOP_EXTRA4 = import_react_native22.Platform.OS === "android" ? 12 : 0;
3119
3149
  var _globalAskRef = null;
3120
- var ShellContext = (0, import_react14.createContext)(null);
3150
+ var ShellContext = (0, import_react15.createContext)(null);
3121
3151
  function useShell() {
3122
- const ctx = (0, import_react14.useContext)(ShellContext);
3152
+ const ctx = (0, import_react15.useContext)(ShellContext);
3123
3153
  if (!ctx) throw new Error("useShell must be used within a Shell");
3124
3154
  return ctx;
3125
3155
  }
@@ -3134,19 +3164,19 @@ function Shell({ children }) {
3134
3164
  const { apiUrl, forumId } = session;
3135
3165
  const token = session.status === "ready" ? session.sessionToken : void 0;
3136
3166
  const isModerator = session.status === "ready" && (session.role === "moderator" || session.role === "admin");
3137
- const [drawerOpen, setDrawerOpen] = (0, import_react14.useState)(false);
3138
- const [composerOpen, setComposerOpen] = (0, import_react14.useState)(false);
3139
- const [notifOpen, setNotifOpen] = (0, import_react14.useState)(false);
3140
- const [draftsOpen, setDraftsOpen] = (0, import_react14.useState)(false);
3141
- const [loadedDraft, setLoadedDraft] = (0, import_react14.useState)(null);
3142
- const [bottomBarCollapsed, setBottomBarCollapsed] = (0, import_react14.useState)(false);
3167
+ const [drawerOpen, setDrawerOpen] = (0, import_react15.useState)(false);
3168
+ const [composerOpen, setComposerOpen] = (0, import_react15.useState)(false);
3169
+ const [notifOpen, setNotifOpen] = (0, import_react15.useState)(false);
3170
+ const [draftsOpen, setDraftsOpen] = (0, import_react15.useState)(false);
3171
+ const [loadedDraft, setLoadedDraft] = (0, import_react15.useState)(null);
3172
+ const [bottomBarCollapsed, setBottomBarCollapsed] = (0, import_react15.useState)(false);
3143
3173
  const drawerX = (0, import_react_native_reanimated3.useSharedValue)(0);
3144
- (0, import_react14.useEffect)(() => {
3174
+ (0, import_react15.useEffect)(() => {
3145
3175
  drawerX.value = (0, import_react_native_reanimated3.withTiming)(drawerOpen ? DRAWER_WIDTH : 0, { duration: 250, easing: import_react_native_reanimated3.Easing.out(import_react_native_reanimated3.Easing.cubic) });
3146
3176
  }, [drawerOpen, drawerX]);
3147
3177
  const drawerPushStyle = (0, import_react_native_reanimated3.useAnimatedStyle)(() => ({ transform: [{ translateX: drawerX.value }] }));
3148
- const closeDrawerResponder = (0, import_react14.useRef)(
3149
- import_react_native21.PanResponder.create({
3178
+ const closeDrawerResponder = (0, import_react15.useRef)(
3179
+ import_react_native22.PanResponder.create({
3150
3180
  onStartShouldSetPanResponder: () => true,
3151
3181
  onMoveShouldSetPanResponder: () => true,
3152
3182
  onPanResponderMove: (_evt, gesture) => {
@@ -3166,8 +3196,8 @@ function Shell({ children }) {
3166
3196
  }
3167
3197
  })
3168
3198
  ).current;
3169
- const openDrawerResponder = (0, import_react14.useRef)(
3170
- import_react_native21.PanResponder.create({
3199
+ const openDrawerResponder = (0, import_react15.useRef)(
3200
+ import_react_native22.PanResponder.create({
3171
3201
  onStartShouldSetPanResponder: () => false,
3172
3202
  onMoveShouldSetPanResponder: (_evt, gesture) => gesture.dx > 8 && Math.abs(gesture.dx) > Math.abs(gesture.dy),
3173
3203
  onPanResponderMove: (_evt, gesture) => {
@@ -3187,9 +3217,9 @@ function Shell({ children }) {
3187
3217
  }
3188
3218
  })
3189
3219
  ).current;
3190
- (0, import_react14.useEffect)(() => {
3220
+ (0, import_react15.useEffect)(() => {
3191
3221
  if (!drawerOpen) return;
3192
- const sub = import_react_native21.BackHandler.addEventListener("hardwareBackPress", () => {
3222
+ const sub = import_react_native22.BackHandler.addEventListener("hardwareBackPress", () => {
3193
3223
  setDrawerOpen(false);
3194
3224
  return true;
3195
3225
  });
@@ -3210,7 +3240,7 @@ function Shell({ children }) {
3210
3240
  setBottomBarCollapsed(false);
3211
3241
  navigation.navigate("Feed");
3212
3242
  }
3213
- const actions = (0, import_react14.useMemo)(() => ({
3243
+ const actions = (0, import_react15.useMemo)(() => ({
3214
3244
  openDrawer: () => setDrawerOpen(true),
3215
3245
  openComposer: () => setComposerOpen(true),
3216
3246
  openNotifications: () => setNotifOpen(true),
@@ -3222,8 +3252,8 @@ function Shell({ children }) {
3222
3252
  callAsk: () => _globalAskRef?.(),
3223
3253
  setBottomBarCollapsed
3224
3254
  }), []);
3225
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native21.View, { style: [styles14.root, { backgroundColor: tokens.bg }], children: [
3226
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3255
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native22.View, { style: [styles15.root, { backgroundColor: tokens.bg }], children: [
3256
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3227
3257
  Drawer,
3228
3258
  {
3229
3259
  activeRoute: feedScope,
@@ -3234,8 +3264,8 @@ function Shell({ children }) {
3234
3264
  } : void 0
3235
3265
  }
3236
3266
  ),
3237
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native_reanimated3.default.View, { style: [styles14.pushed, drawerPushStyle, { backgroundColor: tokens.bg, paddingTop: insets.top + ANDROID_TOP_EXTRA4 }], children: [
3238
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3267
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native_reanimated3.default.View, { style: [styles15.pushed, drawerPushStyle, { backgroundColor: tokens.bg, paddingTop: insets.top + ANDROID_TOP_EXTRA4 }], children: [
3268
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3239
3269
  TopBar,
3240
3270
  {
3241
3271
  onOpenDrawer: () => setDrawerOpen(true),
@@ -3244,8 +3274,8 @@ function Shell({ children }) {
3244
3274
  query: route.name === "Search" ? route.params?.query : void 0
3245
3275
  }
3246
3276
  ),
3247
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ShellContext.Provider, { value: actions, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.View, { style: { flex: 1 }, children }) }),
3248
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3277
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ShellContext.Provider, { value: actions, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native22.View, { style: { flex: 1 }, children }) }),
3278
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3249
3279
  BottomBar,
3250
3280
  {
3251
3281
  collapsed: bottomBarCollapsed,
@@ -3261,10 +3291,10 @@ function Shell({ children }) {
3261
3291
  onProfile: () => navigation.navigate("Profile")
3262
3292
  }
3263
3293
  ),
3264
- drawerOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.View, { style: import_react_native21.StyleSheet.absoluteFill, ...closeDrawerResponder.panHandlers }),
3265
- !drawerOpen && route.name !== "Thread" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native21.View, { style: styles14.edgeZone, ...openDrawerResponder.panHandlers })
3294
+ drawerOpen && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native22.View, { style: import_react_native22.StyleSheet.absoluteFill, ...closeDrawerResponder.panHandlers }),
3295
+ !drawerOpen && route.name !== "Thread" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native22.View, { style: styles15.edgeZone, ...openDrawerResponder.panHandlers })
3266
3296
  ] }),
3267
- composerOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3297
+ composerOpen && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3268
3298
  ComposerOverlay,
3269
3299
  {
3270
3300
  onClose: closeComposer,
@@ -3277,7 +3307,7 @@ function Shell({ children }) {
3277
3307
  },
3278
3308
  loadedDraft?.id ?? "new"
3279
3309
  ),
3280
- draftsOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3310
+ draftsOpen && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3281
3311
  DraftsSheet,
3282
3312
  {
3283
3313
  apiUrl,
@@ -3290,10 +3320,10 @@ function Shell({ children }) {
3290
3320
  }
3291
3321
  }
3292
3322
  ),
3293
- notifOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(NotificationsOverlay, { onClose: () => setNotifOpen(false) })
3323
+ notifOpen && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(NotificationsOverlay, { onClose: () => setNotifOpen(false) })
3294
3324
  ] });
3295
3325
  }
3296
- var styles14 = import_react_native21.StyleSheet.create({
3326
+ var styles15 = import_react_native22.StyleSheet.create({
3297
3327
  root: {
3298
3328
  flex: 1
3299
3329
  },
@@ -3310,13 +3340,13 @@ var styles14 = import_react_native21.StyleSheet.create({
3310
3340
  });
3311
3341
 
3312
3342
  // src/lib/useScrollCollapse.ts
3313
- var import_react15 = require("react");
3343
+ var import_react16 = require("react");
3314
3344
  var COLLAPSE_THRESHOLD = 14;
3315
3345
  var EXPAND_THRESHOLD = 48;
3316
3346
  var TOP_SNAP_Y = 24;
3317
3347
  function useScrollCollapse() {
3318
3348
  const { setBottomBarCollapsed } = useShell();
3319
- const state = (0, import_react15.useRef)({ lastY: 0, downAccum: 0, upAccum: 0, collapsed: false });
3349
+ const state = (0, import_react16.useRef)({ lastY: 0, downAccum: 0, upAccum: 0, collapsed: false });
3320
3350
  return (e) => {
3321
3351
  const y = Math.max(0, e.nativeEvent.contentOffset.y);
3322
3352
  const s = state.current;
@@ -3352,17 +3382,17 @@ function useScrollCollapse() {
3352
3382
  }
3353
3383
 
3354
3384
  // src/feed/PostRow.tsx
3355
- var import_react17 = require("react");
3356
- var import_react_native26 = require("react-native");
3385
+ var import_react18 = require("react");
3386
+ var import_react_native27 = require("react-native");
3357
3387
 
3358
3388
  // src/components/Thumbnail.tsx
3359
- var import_react_native22 = require("react-native");
3360
- var import_jsx_runtime21 = require("react/jsx-runtime");
3389
+ var import_react_native23 = require("react-native");
3390
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3361
3391
  function Thumbnail({ imageUrl, radius, square, aspectRatio, style }) {
3362
3392
  const { tokens } = useTheme();
3363
3393
  const dims = square != null ? { width: square, height: square } : { width: "100%", aspectRatio: aspectRatio ?? 4 / 5 };
3364
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3365
- import_react_native22.Image,
3394
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3395
+ import_react_native23.Image,
3366
3396
  {
3367
3397
  source: { uri: imageUrl },
3368
3398
  resizeMode: "cover",
@@ -3372,22 +3402,22 @@ function Thumbnail({ imageUrl, radius, square, aspectRatio, style }) {
3372
3402
  }
3373
3403
 
3374
3404
  // src/components/VotePill.tsx
3375
- var import_react_native23 = require("react-native");
3376
- var import_jsx_runtime22 = require("react/jsx-runtime");
3405
+ var import_react_native24 = require("react-native");
3406
+ var import_jsx_runtime23 = require("react/jsx-runtime");
3377
3407
  function VotePill({ voteCounts, dir, onVote }) {
3378
3408
  const { tokens } = useTheme();
3379
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_native23.View, { style: [styles15.pill, { backgroundColor: tokens["surface-2"] }], children: [
3380
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_native23.Pressable, { onPress: () => onVote(1), hitSlop: 8, style: styles15.unit, children: [
3381
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(UpvoteIcon, { size: 17, color: dir === 1 ? tokens.up : tokens.muted, filled: dir === 1 }),
3382
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native23.Text, { style: [styles15.count, { color: dir === 1 ? tokens.up : tokens["text-2"] }], children: voteCounts.up })
3409
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_native24.View, { style: [styles16.pill, { backgroundColor: tokens["surface-2"] }], children: [
3410
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_native24.Pressable, { onPress: () => onVote(1), hitSlop: 8, style: styles16.unit, children: [
3411
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(UpvoteIcon, { size: 17, color: dir === 1 ? tokens.up : tokens.muted, filled: dir === 1 }),
3412
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native24.Text, { style: [styles16.count, { color: dir === 1 ? tokens.up : tokens["text-2"] }], children: voteCounts.up })
3383
3413
  ] }),
3384
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_native23.Pressable, { onPress: () => onVote(-1), hitSlop: 8, style: styles15.unit, children: [
3385
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DownvoteIcon, { size: 17, color: dir === -1 ? tokens.down : tokens.muted, filled: dir === -1 }),
3386
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native23.Text, { style: [styles15.count, { color: dir === -1 ? tokens.down : tokens["text-2"] }], children: voteCounts.down })
3414
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_native24.Pressable, { onPress: () => onVote(-1), hitSlop: 8, style: styles16.unit, children: [
3415
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DownvoteIcon, { size: 17, color: dir === -1 ? tokens.down : tokens.muted, filled: dir === -1 }),
3416
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native24.Text, { style: [styles16.count, { color: dir === -1 ? tokens.down : tokens["text-2"] }], children: voteCounts.down })
3387
3417
  ] })
3388
3418
  ] });
3389
3419
  }
3390
- var styles15 = import_react_native23.StyleSheet.create({
3420
+ var styles16 = import_react_native24.StyleSheet.create({
3391
3421
  pill: {
3392
3422
  flexDirection: "row",
3393
3423
  alignItems: "center",
@@ -3401,16 +3431,16 @@ var styles15 = import_react_native23.StyleSheet.create({
3401
3431
  });
3402
3432
 
3403
3433
  // src/components/CommentPill.tsx
3404
- var import_react_native24 = require("react-native");
3405
- var import_jsx_runtime23 = require("react/jsx-runtime");
3434
+ var import_react_native25 = require("react-native");
3435
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3406
3436
  function CommentPill({ count }) {
3407
3437
  const { tokens } = useTheme();
3408
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react_native24.View, { style: [styles16.pill, { backgroundColor: tokens["surface-2"] }], children: [
3409
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CommentIcon, { size: 17, color: tokens["text-2"] }),
3410
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native24.Text, { style: [styles16.count, { color: tokens["text-2"] }], children: count })
3438
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native25.View, { style: [styles17.pill, { backgroundColor: tokens["surface-2"] }], children: [
3439
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CommentIcon, { size: 17, color: tokens["text-2"] }),
3440
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native25.Text, { style: [styles17.count, { color: tokens["text-2"] }], children: count })
3411
3441
  ] });
3412
3442
  }
3413
- var styles16 = import_react_native24.StyleSheet.create({
3443
+ var styles17 = import_react_native25.StyleSheet.create({
3414
3444
  pill: {
3415
3445
  flexDirection: "row",
3416
3446
  alignItems: "center",
@@ -3426,13 +3456,13 @@ var styles16 = import_react_native24.StyleSheet.create({
3426
3456
  });
3427
3457
 
3428
3458
  // src/components/DropdownMenu.tsx
3429
- var import_react16 = require("react");
3430
- var import_react_native25 = require("react-native");
3431
- var import_jsx_runtime24 = require("react/jsx-runtime");
3459
+ var import_react17 = require("react");
3460
+ var import_react_native26 = require("react-native");
3461
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3432
3462
  function useAnchor() {
3433
- const ref = (0, import_react16.useRef)(null);
3434
- const [anchor, setAnchor] = (0, import_react16.useState)(null);
3435
- const measure = (0, import_react16.useCallback)((cb) => {
3463
+ const ref = (0, import_react17.useRef)(null);
3464
+ const [anchor, setAnchor] = (0, import_react17.useState)(null);
3465
+ const measure = (0, import_react17.useCallback)((cb) => {
3436
3466
  ref.current?.measureInWindow((x, y, width, height) => {
3437
3467
  setAnchor({ x, y, width, height });
3438
3468
  cb?.();
@@ -3445,13 +3475,13 @@ function DropdownMenu({ visible, onClose, anchor, width = 150, align = "left", c
3445
3475
  if (!anchor) return null;
3446
3476
  const top = anchor.y + anchor.height + 4;
3447
3477
  const left = align === "left" ? anchor.x : anchor.x + anchor.width - width;
3448
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native25.Modal, { visible, transparent: true, animationType: "none", onRequestClose: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native25.Pressable, { style: import_react_native25.StyleSheet.absoluteFill, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3449
- import_react_native25.Pressable,
3478
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native26.Modal, { visible, transparent: true, animationType: "none", statusBarTranslucent: true, onRequestClose: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native26.Pressable, { style: import_react_native26.StyleSheet.absoluteFill, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3479
+ import_react_native26.Pressable,
3450
3480
  {
3451
3481
  onPress: () => {
3452
3482
  },
3453
3483
  style: [
3454
- styles17.card,
3484
+ styles18.card,
3455
3485
  { top, left, width, backgroundColor: tokens.elev, borderColor: tokens.border }
3456
3486
  ],
3457
3487
  children
@@ -3460,12 +3490,12 @@ function DropdownMenu({ visible, onClose, anchor, width = 150, align = "left", c
3460
3490
  }
3461
3491
  function DropdownMenuItem({ label, active, icon, labelColor, onPress }) {
3462
3492
  const { tokens } = useTheme();
3463
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native25.Pressable, { onPress, style: [styles17.item, active ? { backgroundColor: tokens["hover-2"] } : null], children: [
3493
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.Pressable, { onPress, style: [styles18.item, active ? { backgroundColor: tokens["hover-2"] } : null], children: [
3464
3494
  icon,
3465
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native25.Text, { style: { color: labelColor ?? tokens.text, fontSize: 13.5, fontWeight: active ? "600" : "400" }, children: label })
3495
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native26.Text, { style: { color: labelColor ?? tokens.text, fontSize: 13.5, fontWeight: active ? "600" : "400" }, children: label })
3466
3496
  ] });
3467
3497
  }
3468
- var styles17 = import_react_native25.StyleSheet.create({
3498
+ var styles18 = import_react_native26.StyleSheet.create({
3469
3499
  card: {
3470
3500
  position: "absolute",
3471
3501
  borderWidth: 1,
@@ -3488,82 +3518,82 @@ var styles17 = import_react_native25.StyleSheet.create({
3488
3518
  });
3489
3519
 
3490
3520
  // src/feed/PostRow.tsx
3491
- var import_jsx_runtime25 = require("react/jsx-runtime");
3521
+ var import_jsx_runtime26 = require("react/jsx-runtime");
3492
3522
  function PostRow({ row, view, onOpen, onVote, onSave, onReport, onShare, onPressAuthor }) {
3493
3523
  const { tokens } = useTheme();
3494
3524
  const { ref: ellipsisRef, anchor, measure } = useAnchor();
3495
- const [menuOpen, setMenuOpen] = (0, import_react17.useState)(false);
3525
+ const [menuOpen, setMenuOpen] = (0, import_react18.useState)(false);
3496
3526
  const imageUrl = row.imageUrl;
3497
3527
  const videoUrl = row.videoUrl;
3498
3528
  const extraMediaCount = Math.max(0, row.mediaCount - 1);
3499
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.Pressable, { onPress: onOpen, style: [styles18.row, { borderBottomColor: tokens.border }], children: [
3500
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
3501
- import_react_native26.Pressable,
3529
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native27.Pressable, { onPress: onOpen, style: [styles19.row, { borderBottomColor: tokens.border }], children: [
3530
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3531
+ import_react_native27.Pressable,
3502
3532
  {
3503
- style: styles18.head,
3533
+ style: styles19.head,
3504
3534
  onPress: onPressAuthor ? () => onPressAuthor(row.authorId) : void 0,
3505
3535
  disabled: !onPressAuthor,
3506
3536
  children: [
3507
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Avatar, { authorId: row.authorId, author: row.author, avatarUrl: row.authorAvatarUrl, size: 22 }),
3508
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native26.Text, { style: [styles18.author, { color: tokens.text }], children: row.author }),
3509
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.Text, { style: [styles18.time, { color: tokens.muted }], children: [
3537
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Avatar, { authorId: row.authorId, author: row.author, avatarUrl: row.authorAvatarUrl, size: 22 }),
3538
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native27.Text, { style: [styles19.author, { color: tokens.text }], children: row.author }),
3539
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native27.Text, { style: [styles19.time, { color: tokens.muted }], children: [
3510
3540
  "\xB7 ",
3511
3541
  row.time
3512
3542
  ] })
3513
3543
  ]
3514
3544
  }
3515
3545
  ),
3516
- view === "card" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
3517
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native26.Text, { style: [styles18.title, { color: tokens.text }], numberOfLines: 3, children: row.title }),
3518
- imageUrl != null ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.View, { style: { marginBottom: 10 }, children: [
3519
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Thumbnail, { imageUrl, aspectRatio: 4 / 5, radius: 14 }),
3520
- extraMediaCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native26.View, { style: [styles18.moreBadge, { backgroundColor: "rgba(0,0,0,0.65)" }], children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.Text, { style: styles18.moreBadgeText, children: [
3546
+ view === "card" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
3547
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native27.Text, { style: [styles19.title, { color: tokens.text }], numberOfLines: 3, children: row.title }),
3548
+ imageUrl != null ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native27.View, { style: { marginBottom: 10 }, children: [
3549
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Thumbnail, { imageUrl, aspectRatio: 4 / 5, radius: 14 }),
3550
+ extraMediaCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native27.View, { style: [styles19.moreBadge, { backgroundColor: "rgba(0,0,0,0.65)" }], children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native27.Text, { style: styles19.moreBadgeText, children: [
3521
3551
  "+",
3522
3552
  extraMediaCount
3523
3553
  ] }) })
3524
- ] }) : videoUrl != null ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.View, { style: { marginBottom: 10 }, children: [
3525
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InlineVideoThumb, { uri: videoUrl, style: [styles18.cardVideo, { backgroundColor: tokens["surface-2"] }] }),
3526
- extraMediaCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native26.View, { style: [styles18.moreBadge, { backgroundColor: "rgba(0,0,0,0.65)" }], children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.Text, { style: styles18.moreBadgeText, children: [
3554
+ ] }) : videoUrl != null ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native27.View, { style: { marginBottom: 10 }, children: [
3555
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(InlineVideoThumb, { uri: videoUrl, style: [styles19.cardVideo, { backgroundColor: tokens["surface-2"] }] }),
3556
+ extraMediaCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native27.View, { style: [styles19.moreBadge, { backgroundColor: "rgba(0,0,0,0.65)" }], children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native27.Text, { style: styles19.moreBadgeText, children: [
3527
3557
  "+",
3528
3558
  extraMediaCount
3529
3559
  ] }) })
3530
3560
  ] }) : null
3531
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.View, { style: styles18.compactBody, children: [
3532
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native26.Text, { style: [styles18.title, styles18.titleCompact, { color: tokens.text }], numberOfLines: 3, children: row.title }),
3533
- imageUrl != null ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.View, { children: [
3534
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Thumbnail, { imageUrl, square: 78, radius: 12 }),
3535
- extraMediaCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native26.View, { style: [styles18.moreBadge, styles18.moreBadgeCompact, { backgroundColor: "rgba(0,0,0,0.65)" }], children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.Text, { style: styles18.moreBadgeText, children: [
3561
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native27.View, { style: styles19.compactBody, children: [
3562
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native27.Text, { style: [styles19.title, styles19.titleCompact, { color: tokens.text }], numberOfLines: 3, children: row.title }),
3563
+ imageUrl != null ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native27.View, { children: [
3564
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Thumbnail, { imageUrl, square: 78, radius: 12 }),
3565
+ extraMediaCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native27.View, { style: [styles19.moreBadge, styles19.moreBadgeCompact, { backgroundColor: "rgba(0,0,0,0.65)" }], children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native27.Text, { style: styles19.moreBadgeText, children: [
3536
3566
  "+",
3537
3567
  extraMediaCount
3538
3568
  ] }) })
3539
- ] }) : videoUrl != null ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.View, { children: [
3540
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InlineVideoThumb, { uri: videoUrl, style: [styles18.compactVideo, { backgroundColor: tokens["surface-2"] }] }),
3541
- extraMediaCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native26.View, { style: [styles18.moreBadge, styles18.moreBadgeCompact, { backgroundColor: "rgba(0,0,0,0.65)" }], children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.Text, { style: styles18.moreBadgeText, children: [
3569
+ ] }) : videoUrl != null ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native27.View, { children: [
3570
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(InlineVideoThumb, { uri: videoUrl, style: [styles19.compactVideo, { backgroundColor: tokens["surface-2"] }] }),
3571
+ extraMediaCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native27.View, { style: [styles19.moreBadge, styles19.moreBadgeCompact, { backgroundColor: "rgba(0,0,0,0.65)" }], children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native27.Text, { style: styles19.moreBadgeText, children: [
3542
3572
  "+",
3543
3573
  extraMediaCount
3544
3574
  ] }) })
3545
3575
  ] }) : null
3546
3576
  ] }),
3547
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react_native26.View, { style: styles18.actions, children: [
3548
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VotePill, { voteCounts: row.voteCounts, dir: row.myVote, onVote }),
3549
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CommentPill, { count: row.commentCount }),
3550
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native26.View, { style: { flex: 1 } }),
3551
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_native26.Pressable, { onPress: onShare, style: [styles18.circle, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ShareIcon, { size: 17, color: tokens["text-2"] }) }),
3552
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3553
- import_react_native26.Pressable,
3577
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native27.View, { style: styles19.actions, children: [
3578
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(VotePill, { voteCounts: row.voteCounts, dir: row.myVote, onVote }),
3579
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CommentPill, { count: row.commentCount }),
3580
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native27.View, { style: { flex: 1 } }),
3581
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native27.Pressable, { onPress: onShare, style: [styles19.circle, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ShareIcon, { size: 17, color: tokens["text-2"] }) }),
3582
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3583
+ import_react_native27.Pressable,
3554
3584
  {
3555
3585
  ref: ellipsisRef,
3556
3586
  onPress: () => measure(() => setMenuOpen(true)),
3557
- style: [styles18.circle, { backgroundColor: menuOpen ? tokens["hover-2"] : tokens["surface-2"] }],
3558
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(EllipsisIcon, { size: 17, color: tokens["text-2"] })
3587
+ style: [styles19.circle, { backgroundColor: menuOpen ? tokens["hover-2"] : tokens["surface-2"] }],
3588
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(EllipsisIcon, { size: 17, color: tokens["text-2"] })
3559
3589
  }
3560
3590
  )
3561
3591
  ] }),
3562
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(DropdownMenu, { visible: menuOpen, onClose: () => setMenuOpen(false), anchor, width: 150, align: "right", children: [
3563
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3592
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DropdownMenu, { visible: menuOpen, onClose: () => setMenuOpen(false), anchor, width: 150, align: "right", children: [
3593
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3564
3594
  DropdownMenuItem,
3565
3595
  {
3566
- icon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SaveIcon, { size: 16, color: tokens["text-2"], filled: row.saved }),
3596
+ icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SaveIcon, { size: 16, color: tokens["text-2"], filled: row.saved }),
3567
3597
  label: row.saved ? "Unsave" : "Save",
3568
3598
  onPress: () => {
3569
3599
  setMenuOpen(false);
@@ -3571,10 +3601,10 @@ function PostRow({ row, view, onOpen, onVote, onSave, onReport, onShare, onPress
3571
3601
  }
3572
3602
  }
3573
3603
  ),
3574
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3604
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3575
3605
  DropdownMenuItem,
3576
3606
  {
3577
- icon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ReportIcon, { size: 16, color: tokens["text-2"] }),
3607
+ icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ReportIcon, { size: 16, color: tokens["text-2"] }),
3578
3608
  label: "Report",
3579
3609
  onPress: () => {
3580
3610
  setMenuOpen(false);
@@ -3585,12 +3615,12 @@ function PostRow({ row, view, onOpen, onVote, onSave, onReport, onShare, onPress
3585
3615
  ] })
3586
3616
  ] });
3587
3617
  }
3588
- var styles18 = import_react_native26.StyleSheet.create({
3618
+ var styles19 = import_react_native27.StyleSheet.create({
3589
3619
  row: {
3590
3620
  paddingHorizontal: 14,
3591
3621
  paddingTop: 12,
3592
3622
  paddingBottom: 12,
3593
- borderBottomWidth: import_react_native26.StyleSheet.hairlineWidth
3623
+ borderBottomWidth: import_react_native27.StyleSheet.hairlineWidth
3594
3624
  },
3595
3625
  head: {
3596
3626
  flexDirection: "row",
@@ -3651,9 +3681,9 @@ var styles18 = import_react_native26.StyleSheet.create({
3651
3681
  });
3652
3682
 
3653
3683
  // src/components/SelectPill.tsx
3654
- var import_react18 = require("react");
3655
- var import_react_native27 = require("react-native");
3656
- var import_jsx_runtime26 = require("react/jsx-runtime");
3684
+ var import_react19 = require("react");
3685
+ var import_react_native28 = require("react-native");
3686
+ var import_jsx_runtime27 = require("react/jsx-runtime");
3657
3687
  function SelectPill({
3658
3688
  value,
3659
3689
  options,
@@ -3666,22 +3696,22 @@ function SelectPill({
3666
3696
  }) {
3667
3697
  const { tokens } = useTheme();
3668
3698
  const { ref, anchor, measure } = useAnchor();
3669
- const [open, setOpen] = (0, import_react18.useState)(false);
3670
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
3671
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3672
- import_react_native27.Pressable,
3699
+ const [open, setOpen] = (0, import_react19.useState)(false);
3700
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
3701
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3702
+ import_react_native28.Pressable,
3673
3703
  {
3674
3704
  ref,
3675
3705
  onPress: () => measure(() => setOpen(true)),
3676
- style: [styles19.pill, { backgroundColor: tokens["surface-2"] }],
3706
+ style: [styles20.pill, { backgroundColor: tokens["surface-2"] }],
3677
3707
  children: [
3678
3708
  leadingIcon,
3679
- label != null && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native27.Text, { style: [styles19.label, { color: tokens.text }], children: label }),
3680
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChevronDownIcon, { size: 14, color: tokens["text-2"] })
3709
+ label != null && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native28.Text, { style: [styles20.label, { color: tokens.text }], children: label }),
3710
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChevronDownIcon, { size: 14, color: tokens["text-2"] })
3681
3711
  ]
3682
3712
  }
3683
3713
  ),
3684
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DropdownMenu, { visible: open, onClose: () => setOpen(false), anchor, width: menuWidth, children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3714
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DropdownMenu, { visible: open, onClose: () => setOpen(false), anchor, width: menuWidth, children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3685
3715
  DropdownMenuItem,
3686
3716
  {
3687
3717
  icon: optionIcon?.(opt),
@@ -3696,7 +3726,7 @@ function SelectPill({
3696
3726
  )) })
3697
3727
  ] });
3698
3728
  }
3699
- var styles19 = import_react_native27.StyleSheet.create({
3729
+ var styles20 = import_react_native28.StyleSheet.create({
3700
3730
  pill: {
3701
3731
  flexDirection: "row",
3702
3732
  alignItems: "center",
@@ -3712,35 +3742,33 @@ var styles19 = import_react_native27.StyleSheet.create({
3712
3742
  });
3713
3743
 
3714
3744
  // src/components/ReportSheet.tsx
3715
- var import_react_native28 = require("react-native");
3716
- var import_jsx_runtime27 = require("react/jsx-runtime");
3745
+ var import_react_native29 = require("react-native");
3746
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3717
3747
  var REASONS = ["Spam", "Harassment or bullying", "Hate speech", "Misinformation", "Sexual content", "Other"];
3718
3748
  function ReportSheet({ target, onClose, onSubmit }) {
3719
3749
  const { tokens } = useTheme();
3720
3750
  const { maxHeight, paddingBottom } = useSheetLayout(28);
3721
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native28.Modal, { transparent: true, visible: true, animationType: "slide", onRequestClose: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native28.Pressable, { style: styles20.scrim, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react_native28.Pressable, { style: [styles20.sheet, { backgroundColor: tokens.elev, borderColor: tokens.border, maxHeight, paddingBottom }], onPress: () => {
3722
- }, children: [
3723
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react_native28.Text, { style: [styles20.title, { color: tokens.text }], children: [
3751
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BottomSheetShell, { visible: true, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native29.View, { style: [styles21.sheet, { backgroundColor: tokens.elev, borderColor: tokens.border, maxHeight, paddingBottom }], children: [
3752
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native29.Text, { style: [styles21.title, { color: tokens.text }], children: [
3724
3753
  "Report ",
3725
3754
  target
3726
3755
  ] }),
3727
- REASONS.map((reason) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3728
- import_react_native28.Pressable,
3756
+ REASONS.map((reason) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3757
+ import_react_native29.Pressable,
3729
3758
  {
3730
3759
  onPress: () => {
3731
3760
  onSubmit(reason);
3732
3761
  onClose();
3733
3762
  },
3734
- style: [styles20.row, { borderTopColor: tokens.border }],
3735
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native28.Text, { style: { color: tokens.text, fontSize: 14.5 }, children: reason })
3763
+ style: [styles21.row, { borderTopColor: tokens.border }],
3764
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native29.Text, { style: { color: tokens.text, fontSize: 14.5 }, children: reason })
3736
3765
  },
3737
3766
  reason
3738
3767
  )),
3739
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native28.Pressable, { onPress: onClose, style: [styles20.cancel, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native28.Text, { style: { color: tokens["text-2"], fontWeight: "700", fontSize: 14 }, children: "Cancel" }) })
3740
- ] }) }) });
3768
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native29.Pressable, { onPress: onClose, style: [styles21.cancel, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native29.Text, { style: { color: tokens["text-2"], fontWeight: "700", fontSize: 14 }, children: "Cancel" }) })
3769
+ ] }) });
3741
3770
  }
3742
- var styles20 = import_react_native28.StyleSheet.create({
3743
- scrim: { flex: 1, backgroundColor: "rgba(0,0,0,0.5)", justifyContent: "flex-end" },
3771
+ var styles21 = import_react_native29.StyleSheet.create({
3744
3772
  sheet: { borderTopWidth: 1, borderTopLeftRadius: 18, borderTopRightRadius: 18, paddingHorizontal: 16, paddingTop: 16 },
3745
3773
  title: { fontSize: 16, fontWeight: "800", marginBottom: 8 },
3746
3774
  row: { paddingVertical: 14, borderTopWidth: 1 },
@@ -3748,17 +3776,17 @@ var styles20 = import_react_native28.StyleSheet.create({
3748
3776
  });
3749
3777
 
3750
3778
  // src/components/ShareSheet.tsx
3751
- var import_react19 = require("react");
3752
- var import_react_native29 = require("react-native");
3753
- var import_jsx_runtime28 = require("react/jsx-runtime");
3779
+ var import_react20 = require("react");
3780
+ var import_react_native30 = require("react-native");
3781
+ var import_jsx_runtime29 = require("react/jsx-runtime");
3754
3782
  function ShareSheet({ apiUrl, forumId, token, onClose, onShare }) {
3755
3783
  const { tokens } = useTheme();
3756
3784
  const { maxHeight, paddingBottom } = useSheetLayout(28);
3757
- const [query, setQuery] = (0, import_react19.useState)("");
3758
- const [results, setResults] = (0, import_react19.useState)([]);
3759
- const [loading, setLoading] = (0, import_react19.useState)(false);
3760
- const [selected, setSelected] = (0, import_react19.useState)(/* @__PURE__ */ new Set());
3761
- (0, import_react19.useEffect)(() => {
3785
+ const [query, setQuery] = (0, import_react20.useState)("");
3786
+ const [results, setResults] = (0, import_react20.useState)([]);
3787
+ const [loading, setLoading] = (0, import_react20.useState)(false);
3788
+ const [selected, setSelected] = (0, import_react20.useState)(/* @__PURE__ */ new Set());
3789
+ (0, import_react20.useEffect)(() => {
3762
3790
  if (!token) return;
3763
3791
  const q = query.trim();
3764
3792
  if (!q) {
@@ -3779,59 +3807,54 @@ function ShareSheet({ apiUrl, forumId, token, onClose, onShare }) {
3779
3807
  return next;
3780
3808
  });
3781
3809
  }
3782
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native29.Modal, { transparent: true, visible: true, animationType: "slide", onRequestClose: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native29.KeyboardAvoidingView, { style: { flex: 1 }, behavior: import_react_native29.Platform.OS === "ios" ? "padding" : "height", children: [
3783
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native29.Pressable, { style: styles21.scrim, onPress: onClose }),
3784
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native29.View, { style: styles21.sheetWrap, pointerEvents: "box-none", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native29.View, { style: [styles21.sheet, { backgroundColor: tokens.elev, borderColor: tokens.border, maxHeight, paddingBottom }], children: [
3785
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native29.Text, { style: [styles21.title, { color: tokens.text }], children: "Share with a member" }),
3786
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3787
- import_react_native29.TextInput,
3788
- {
3789
- value: query,
3790
- onChangeText: setQuery,
3791
- placeholder: "Search members",
3792
- placeholderTextColor: tokens.muted,
3793
- style: [styles21.search, { color: tokens.text, backgroundColor: tokens["surface-2"], borderColor: tokens["border-strong"] }]
3794
- }
3795
- ),
3796
- loading ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native29.ActivityIndicator, { color: tokens.accent, style: { padding: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3797
- import_react_native29.FlatList,
3798
- {
3799
- data: results,
3800
- keyExtractor: (u) => u.id,
3801
- style: { maxHeight: 260 },
3802
- keyboardShouldPersistTaps: "handled",
3803
- renderItem: ({ item }) => {
3804
- const isSel = selected.has(item.id);
3805
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native29.Pressable, { onPress: () => toggle(item.id), style: styles21.row, children: [
3806
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Avatar, { authorId: item.id, author: item.displayName, avatarUrl: item.avatarUrl, size: 32 }),
3807
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native29.Text, { style: { flex: 1, color: tokens.text, fontSize: 14 }, children: item.displayName }),
3808
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native29.View, { style: [styles21.check, { borderColor: isSel ? tokens.accent : tokens["border-strong"], backgroundColor: isSel ? tokens.accent : "transparent" }] })
3809
- ] });
3810
- },
3811
- ListEmptyComponent: query.trim() ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native29.Text, { style: { color: tokens.muted, fontSize: 13, padding: 12 }, children: "No members found" }) : null
3812
- }
3813
- ),
3814
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3815
- import_react_native29.Pressable,
3816
- {
3817
- onPress: () => {
3818
- onShare([...selected]);
3819
- onClose();
3820
- },
3821
- disabled: selected.size === 0,
3822
- style: [styles21.shareBtn, { backgroundColor: tokens.accent, opacity: selected.size ? 1 : 0.5 }],
3823
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native29.Text, { style: { color: tokens["accent-fg"], fontWeight: "700", fontSize: 14 }, children: [
3824
- "Share",
3825
- selected.size ? ` (${selected.size})` : ""
3826
- ] })
3827
- }
3828
- )
3829
- ] }) })
3830
- ] }) });
3810
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(BottomSheetShell, { visible: true, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native30.KeyboardAvoidingView, { style: { flex: 1 }, behavior: import_react_native30.Platform.OS === "ios" ? "padding" : "height", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_native30.View, { style: [styles22.sheet, { backgroundColor: tokens.elev, borderColor: tokens.border, maxHeight, paddingBottom }], children: [
3811
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native30.Text, { style: [styles22.title, { color: tokens.text }], children: "Share with a member" }),
3812
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3813
+ import_react_native30.TextInput,
3814
+ {
3815
+ value: query,
3816
+ onChangeText: setQuery,
3817
+ placeholder: "Search members",
3818
+ placeholderTextColor: tokens.muted,
3819
+ style: [styles22.search, { color: tokens.text, backgroundColor: tokens["surface-2"], borderColor: tokens["border-strong"] }]
3820
+ }
3821
+ ),
3822
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native30.ActivityIndicator, { color: tokens.accent, style: { padding: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3823
+ import_react_native30.FlatList,
3824
+ {
3825
+ data: results,
3826
+ keyExtractor: (u) => u.id,
3827
+ style: { maxHeight: 260 },
3828
+ keyboardShouldPersistTaps: "handled",
3829
+ renderItem: ({ item }) => {
3830
+ const isSel = selected.has(item.id);
3831
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_native30.Pressable, { onPress: () => toggle(item.id), style: styles22.row, children: [
3832
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Avatar, { authorId: item.id, author: item.displayName, avatarUrl: item.avatarUrl, size: 32 }),
3833
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native30.Text, { style: { flex: 1, color: tokens.text, fontSize: 14 }, children: item.displayName }),
3834
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native30.View, { style: [styles22.check, { borderColor: isSel ? tokens.accent : tokens["border-strong"], backgroundColor: isSel ? tokens.accent : "transparent" }] })
3835
+ ] });
3836
+ },
3837
+ ListEmptyComponent: query.trim() ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native30.Text, { style: { color: tokens.muted, fontSize: 13, padding: 12 }, children: "No members found" }) : null
3838
+ }
3839
+ ),
3840
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3841
+ import_react_native30.Pressable,
3842
+ {
3843
+ onPress: () => {
3844
+ onShare([...selected]);
3845
+ onClose();
3846
+ },
3847
+ disabled: selected.size === 0,
3848
+ style: [styles22.shareBtn, { backgroundColor: tokens.accent, opacity: selected.size ? 1 : 0.5 }],
3849
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_native30.Text, { style: { color: tokens["accent-fg"], fontWeight: "700", fontSize: 14 }, children: [
3850
+ "Share",
3851
+ selected.size ? ` (${selected.size})` : ""
3852
+ ] })
3853
+ }
3854
+ )
3855
+ ] }) }) });
3831
3856
  }
3832
- var styles21 = import_react_native29.StyleSheet.create({
3833
- scrim: { ...import_react_native29.StyleSheet.absoluteFill, backgroundColor: "rgba(0,0,0,0.5)" },
3834
- sheetWrap: { flex: 1, justifyContent: "flex-end" },
3857
+ var styles22 = import_react_native30.StyleSheet.create({
3835
3858
  sheet: { borderTopWidth: 1, borderTopLeftRadius: 18, borderTopRightRadius: 18, paddingHorizontal: 16, paddingTop: 16 },
3836
3859
  title: { fontSize: 16, fontWeight: "800", marginBottom: 12 },
3837
3860
  search: { borderWidth: 1, borderRadius: 999, paddingHorizontal: 14, paddingVertical: 9, fontSize: 14 },
@@ -3841,76 +3864,71 @@ var styles21 = import_react_native29.StyleSheet.create({
3841
3864
  });
3842
3865
 
3843
3866
  // src/profile/UserProfileSheet.tsx
3844
- var import_react22 = require("react");
3845
- var import_react_native35 = require("react-native");
3867
+ var import_react23 = require("react");
3868
+ var import_react_native36 = require("react-native");
3846
3869
  var import_react_native_safe_area_context8 = require("react-native-safe-area-context");
3847
3870
 
3848
3871
  // src/components/TabPills.tsx
3849
- var import_react_native30 = require("react-native");
3850
- var import_jsx_runtime29 = require("react/jsx-runtime");
3872
+ var import_react_native31 = require("react-native");
3873
+ var import_jsx_runtime30 = require("react/jsx-runtime");
3851
3874
  function TabPills({ tabs, active, onSelect }) {
3852
3875
  const { tokens } = useTheme();
3853
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native30.View, { style: [styles22.container, { borderBottomColor: tokens.border }], children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3854
- import_react_native30.ScrollView,
3876
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_native31.View, { style: [styles23.container, { borderBottomColor: tokens.border }], children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3877
+ import_react_native31.ScrollView,
3855
3878
  {
3856
3879
  horizontal: true,
3857
3880
  showsHorizontalScrollIndicator: false,
3858
- contentContainerStyle: styles22.row,
3881
+ contentContainerStyle: styles23.row,
3859
3882
  children: tabs.map((tab) => {
3860
3883
  const isActive = tab === active;
3861
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_native30.Pressable, { onPress: () => onSelect(tab), style: styles22.tab, children: [
3862
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native30.Text, { style: { color: isActive ? tokens.text : tokens.muted, fontSize: 15, fontWeight: isActive ? "700" : "500" }, children: tab }),
3863
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native30.View, { style: [styles22.underline, { backgroundColor: isActive ? tokens.accent : "transparent" }] })
3884
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react_native31.Pressable, { onPress: () => onSelect(tab), style: styles23.tab, children: [
3885
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_native31.Text, { style: { color: isActive ? tokens.text : tokens.muted, fontSize: 15, fontWeight: isActive ? "700" : "500" }, children: tab }),
3886
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_native31.View, { style: [styles23.underline, { backgroundColor: isActive ? tokens.accent : "transparent" }] })
3864
3887
  ] }, tab);
3865
3888
  })
3866
3889
  }
3867
3890
  ) });
3868
3891
  }
3869
- var styles22 = import_react_native30.StyleSheet.create({
3892
+ var styles23 = import_react_native31.StyleSheet.create({
3870
3893
  // The hairline border is the full-width rail; the active tab's underline
3871
3894
  // sits flush at bottom: 0 on top of it.
3872
- container: { borderBottomWidth: import_react_native30.StyleSheet.hairlineWidth },
3895
+ container: { borderBottomWidth: import_react_native31.StyleSheet.hairlineWidth },
3873
3896
  row: { gap: 35, paddingHorizontal: 16 },
3874
3897
  tab: { alignItems: "center", paddingTop: 8, paddingBottom: 0 },
3875
3898
  underline: { height: 3, borderRadius: 2, alignSelf: "stretch", marginTop: 6 }
3876
3899
  });
3877
3900
 
3878
3901
  // src/profile/SocialLinks.tsx
3879
- var import_react20 = require("react");
3880
- var import_react_native32 = require("react-native");
3902
+ var import_react21 = require("react");
3903
+ var import_react_native33 = require("react-native");
3881
3904
 
3882
3905
  // src/profile/AllSocialLinksSheet.tsx
3883
- var import_react_native31 = require("react-native");
3884
- var import_jsx_runtime30 = require("react/jsx-runtime");
3906
+ var import_react_native32 = require("react-native");
3907
+ var import_jsx_runtime31 = require("react/jsx-runtime");
3885
3908
  function AllSocialLinksSheet({ links, onClose, onEditProfile }) {
3886
3909
  const { tokens } = useTheme();
3887
3910
  const { maxHeight, paddingBottom } = useSheetLayout(24);
3888
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react_native31.Modal, { transparent: true, visible: true, animationType: "slide", onRequestClose: onClose, children: [
3889
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_native31.Pressable, { style: styles23.scrim, onPress: onClose }),
3890
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_native31.View, { style: styles23.sheetWrap, pointerEvents: "box-none", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react_native31.View, { style: [styles23.sheet, { backgroundColor: tokens.elev, borderColor: tokens.border, maxHeight, paddingBottom }], children: [
3891
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react_native31.View, { style: styles23.header, children: [
3892
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_native31.Text, { style: [styles23.title, { color: tokens.text }], children: "Social links" }),
3893
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react_native31.View, { style: styles23.headerBtns, children: [
3894
- onEditProfile && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_native31.Pressable, { onPress: onEditProfile, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PencilIcon, { size: 16, color: tokens.text }) }),
3895
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_native31.Pressable, { onPress: onClose, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CloseIcon, { size: 18, color: tokens.text }) })
3911
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(BottomSheetShell, { visible: true, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native32.View, { style: [styles24.sheet, { backgroundColor: tokens.elev, borderColor: tokens.border, maxHeight, paddingBottom }], children: [
3912
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native32.View, { style: styles24.header, children: [
3913
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native32.Text, { style: [styles24.title, { color: tokens.text }], children: "Social links" }),
3914
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native32.View, { style: styles24.headerBtns, children: [
3915
+ onEditProfile && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native32.Pressable, { onPress: onEditProfile, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PencilIcon, { size: 16, color: tokens.text }) }),
3916
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native32.Pressable, { onPress: onClose, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CloseIcon, { size: 18, color: tokens.text }) })
3917
+ ] })
3918
+ ] }),
3919
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native32.ScrollView, { contentContainerStyle: { paddingBottom: 8 }, children: links.map((l, i) => {
3920
+ const Icon = SOCIAL_PLATFORM_ICON[l.platform] ?? LinkIcon;
3921
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native32.Pressable, { onPress: () => void import_react_native32.Linking.openURL(l.url), style: styles24.row, children: [
3922
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { size: 18, color: tokens.text }),
3923
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native32.View, { style: { flex: 1 }, children: [
3924
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native32.Text, { style: [styles24.platform, { color: tokens.text }], children: l.platform }),
3925
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native32.Text, { style: [styles24.url, { color: tokens.muted }], numberOfLines: 1, children: l.url })
3896
3926
  ] })
3897
- ] }),
3898
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_native31.ScrollView, { contentContainerStyle: { paddingBottom: 8 }, children: links.map((l, i) => {
3899
- const Icon = SOCIAL_PLATFORM_ICON[l.platform] ?? LinkIcon;
3900
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react_native31.Pressable, { onPress: () => void import_react_native31.Linking.openURL(l.url), style: styles23.row, children: [
3901
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { size: 18, color: tokens.text }),
3902
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react_native31.View, { style: { flex: 1 }, children: [
3903
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_native31.Text, { style: [styles23.platform, { color: tokens.text }], children: l.platform }),
3904
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_native31.Text, { style: [styles23.url, { color: tokens.muted }], numberOfLines: 1, children: l.url })
3905
- ] })
3906
- ] }, `${l.platform}-${i}`);
3907
- }) })
3908
- ] }) })
3909
- ] });
3927
+ ] }, `${l.platform}-${i}`);
3928
+ }) })
3929
+ ] }) });
3910
3930
  }
3911
- var styles23 = import_react_native31.StyleSheet.create({
3912
- scrim: { ...import_react_native31.StyleSheet.absoluteFill, backgroundColor: "rgba(0,0,0,0.5)" },
3913
- sheetWrap: { flex: 1, justifyContent: "flex-end" },
3931
+ var styles24 = import_react_native32.StyleSheet.create({
3914
3932
  sheet: { borderTopWidth: 1, borderTopLeftRadius: 18, borderTopRightRadius: 18, paddingHorizontal: 16, paddingTop: 16, overflow: "hidden" },
3915
3933
  header: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", marginBottom: 8 },
3916
3934
  headerBtns: { flexDirection: "row", alignItems: "center", gap: 18 },
@@ -3922,7 +3940,7 @@ var styles23 = import_react_native31.StyleSheet.create({
3922
3940
  });
3923
3941
 
3924
3942
  // src/profile/SocialLinks.tsx
3925
- var import_jsx_runtime31 = require("react/jsx-runtime");
3943
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3926
3944
  var SOCIAL_PLATFORM_ICON = {
3927
3945
  Website: GlobeIcon,
3928
3946
  Portfolio: GlobeIcon,
@@ -3936,35 +3954,35 @@ var SOCIAL_PLATFORM_ICON = {
3936
3954
  var MAX_INLINE = 3;
3937
3955
  function SocialLinks({ links, onEditProfile }) {
3938
3956
  const { tokens } = useTheme();
3939
- const [viewAllOpen, setViewAllOpen] = (0, import_react20.useState)(false);
3940
- const [maxInline, setMaxInline] = (0, import_react20.useState)(MAX_INLINE);
3941
- const firstPillY = (0, import_react20.useRef)(null);
3942
- const shrunk = (0, import_react20.useRef)(false);
3957
+ const [viewAllOpen, setViewAllOpen] = (0, import_react21.useState)(false);
3958
+ const [maxInline, setMaxInline] = (0, import_react21.useState)(MAX_INLINE);
3959
+ const firstPillY = (0, import_react21.useRef)(null);
3960
+ const shrunk = (0, import_react21.useRef)(false);
3943
3961
  if (links.length === 0) return null;
3944
3962
  const inline = links.slice(0, maxInline);
3945
3963
  const hasMore = links.length > maxInline;
3946
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
3947
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native32.View, { style: styles24.row, children: [
3964
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
3965
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react_native33.View, { style: styles25.row, children: [
3948
3966
  inline.map((l, i) => {
3949
3967
  const Icon = SOCIAL_PLATFORM_ICON[l.platform] ?? LinkIcon;
3950
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
3951
- import_react_native32.Pressable,
3968
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
3969
+ import_react_native33.Pressable,
3952
3970
  {
3953
3971
  onLayout: i === 0 ? (e) => {
3954
3972
  firstPillY.current = e.nativeEvent.layout.y;
3955
3973
  } : void 0,
3956
- onPress: () => void import_react_native32.Linking.openURL(l.url),
3957
- style: [styles24.pill, { backgroundColor: tokens["surface-2"] }],
3974
+ onPress: () => void import_react_native33.Linking.openURL(l.url),
3975
+ style: [styles25.pill, { backgroundColor: tokens["surface-2"] }],
3958
3976
  children: [
3959
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { size: 15, color: tokens["text-2"] }),
3960
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native32.Text, { style: { color: tokens["text-2"], fontSize: 12.5 }, children: l.platform })
3977
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { size: 15, color: tokens["text-2"] }),
3978
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { color: tokens["text-2"], fontSize: 12.5 }, children: l.platform })
3961
3979
  ]
3962
3980
  },
3963
3981
  `${l.platform}-${i}`
3964
3982
  );
3965
3983
  }),
3966
- hasMore && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
3967
- import_react_native32.Pressable,
3984
+ hasMore && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
3985
+ import_react_native33.Pressable,
3968
3986
  {
3969
3987
  onLayout: (e) => {
3970
3988
  if (!shrunk.current && maxInline > 2 && firstPillY.current !== null && e.nativeEvent.layout.y > firstPillY.current) {
@@ -3973,15 +3991,15 @@ function SocialLinks({ links, onEditProfile }) {
3973
3991
  }
3974
3992
  },
3975
3993
  onPress: () => setViewAllOpen(true),
3976
- style: [styles24.pill, { backgroundColor: tokens["surface-2"] }],
3994
+ style: [styles25.pill, { backgroundColor: tokens["surface-2"] }],
3977
3995
  children: [
3978
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native32.Text, { style: { color: tokens["text-2"], fontSize: 12.5 }, children: "View all" }),
3979
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ChevronRightIcon, { size: 13, color: tokens["text-2"] })
3996
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { color: tokens["text-2"], fontSize: 12.5 }, children: "View all" }),
3997
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChevronRightIcon, { size: 13, color: tokens["text-2"] })
3980
3998
  ]
3981
3999
  }
3982
4000
  )
3983
4001
  ] }),
3984
- viewAllOpen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4002
+ viewAllOpen && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3985
4003
  AllSocialLinksSheet,
3986
4004
  {
3987
4005
  links,
@@ -3994,18 +4012,18 @@ function SocialLinks({ links, onEditProfile }) {
3994
4012
  )
3995
4013
  ] });
3996
4014
  }
3997
- var styles24 = import_react_native32.StyleSheet.create({
4015
+ var styles25 = import_react_native33.StyleSheet.create({
3998
4016
  row: { flexDirection: "row", flexWrap: "wrap", gap: 8, marginTop: 12 },
3999
4017
  pill: { flexDirection: "row", alignItems: "center", gap: 6, borderRadius: 999, paddingVertical: 7, paddingHorizontal: 12 }
4000
4018
  });
4001
4019
 
4002
4020
  // src/profile/ProfileCommentCard.tsx
4003
- var import_react_native34 = require("react-native");
4021
+ var import_react_native35 = require("react-native");
4004
4022
 
4005
4023
  // src/components/RenderedBody.tsx
4006
- var import_react21 = require("react");
4007
- var import_react_native33 = require("react-native");
4008
- var import_jsx_runtime32 = require("react/jsx-runtime");
4024
+ var import_react22 = require("react");
4025
+ var import_react_native34 = require("react-native");
4026
+ var import_jsx_runtime33 = require("react/jsx-runtime");
4009
4027
  function parseBlocks(body) {
4010
4028
  const lines = body.replace(/\r\n/g, "\n").split("\n");
4011
4029
  const blocks = [];
@@ -4099,23 +4117,23 @@ function renderInline(text, keyPrefix, linkColor, codeBg) {
4099
4117
  return parts.map((part, i) => {
4100
4118
  const key = `${keyPrefix}-${i}`;
4101
4119
  if (part.startsWith("**") && part.endsWith("**")) {
4102
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { fontWeight: "700" }, children: part.slice(2, -2) }, key);
4120
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { fontWeight: "700" }, children: part.slice(2, -2) }, key);
4103
4121
  }
4104
4122
  if (part.startsWith("~~") && part.endsWith("~~")) {
4105
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { textDecorationLine: "line-through" }, children: part.slice(2, -2) }, key);
4123
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { textDecorationLine: "line-through" }, children: part.slice(2, -2) }, key);
4106
4124
  }
4107
4125
  if (part.startsWith("`") && part.endsWith("`")) {
4108
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { fontFamily: "Courier", backgroundColor: codeBg, borderRadius: 4 }, children: part.slice(1, -1) }, key);
4126
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { fontFamily: "Courier", backgroundColor: codeBg, borderRadius: 4 }, children: part.slice(1, -1) }, key);
4109
4127
  }
4110
4128
  if (part.startsWith("*") && part.endsWith("*")) {
4111
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { fontStyle: "italic" }, children: part.slice(1, -1) }, key);
4129
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { fontStyle: "italic" }, children: part.slice(1, -1) }, key);
4112
4130
  }
4113
4131
  const linkMatch = /^\[([^\]]*)\]\(([^)]+)\)$/.exec(part);
4114
4132
  if (linkMatch) {
4115
4133
  const label = linkMatch[1];
4116
4134
  const url = linkMatch[2] ?? "";
4117
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { color: linkColor }, onPress: () => {
4118
- void import_react_native33.Linking.openURL(url);
4135
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { color: linkColor }, onPress: () => {
4136
+ void import_react_native34.Linking.openURL(url);
4119
4137
  }, children: label && label.length > 0 ? label : url }, key);
4120
4138
  }
4121
4139
  return part;
@@ -4123,34 +4141,34 @@ function renderInline(text, keyPrefix, linkColor, codeBg) {
4123
4141
  }
4124
4142
  function RenderedBody({ body, size = 14.5 }) {
4125
4143
  const { tokens } = useTheme();
4126
- const blocks = (0, import_react21.useMemo)(() => parseBlocks(body), [body]);
4144
+ const blocks = (0, import_react22.useMemo)(() => parseBlocks(body), [body]);
4127
4145
  const line = Math.round(size * 1.5);
4128
4146
  const textColor = tokens["text-2"];
4129
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.View, { children: blocks.map((b, idx) => {
4147
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.View, { children: blocks.map((b, idx) => {
4130
4148
  const key = `b-${idx}`;
4131
4149
  switch (b.type) {
4132
4150
  case "heading":
4133
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { color: tokens.text, fontSize: size + (4 - b.level) * 2, fontWeight: "800", marginBottom: 8 }, children: renderInline(b.text, key, tokens.accent, tokens["surface-2"]) }, key);
4151
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { color: tokens.text, fontSize: size + (4 - b.level) * 2, fontWeight: "800", marginBottom: 8 }, children: renderInline(b.text, key, tokens.accent, tokens["surface-2"]) }, key);
4134
4152
  case "blockquote":
4135
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.View, { style: [styles25.blockquote, { backgroundColor: tokens["surface-2"], borderLeftColor: tokens["border-strong"] }], children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { color: textColor, fontSize: size, lineHeight: line }, children: renderInline(b.text, key, tokens.accent, tokens.elev) }) }, key);
4153
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.View, { style: [styles26.blockquote, { backgroundColor: tokens["surface-2"], borderLeftColor: tokens["border-strong"] }], children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { color: textColor, fontSize: size, lineHeight: line }, children: renderInline(b.text, key, tokens.accent, tokens.elev) }) }, key);
4136
4154
  case "list":
4137
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.View, { style: styles25.list, children: b.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react_native33.View, { style: styles25.listRow, children: [
4138
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { color: textColor, fontSize: size, lineHeight: line }, children: b.ordered ? `${i + 1}.` : "\u2022" }),
4139
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { color: textColor, fontSize: size, lineHeight: line, flex: 1 }, children: renderInline(item, `${key}-${i}`, tokens.accent, tokens.elev) })
4155
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.View, { style: styles26.list, children: b.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native34.View, { style: styles26.listRow, children: [
4156
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { color: textColor, fontSize: size, lineHeight: line }, children: b.ordered ? `${i + 1}.` : "\u2022" }),
4157
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { color: textColor, fontSize: size, lineHeight: line, flex: 1 }, children: renderInline(item, `${key}-${i}`, tokens.accent, tokens.elev) })
4140
4158
  ] }, `${key}-${i}`)) }, key);
4141
4159
  case "code":
4142
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.View, { style: [styles25.codeBlock, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { color: tokens.text, fontFamily: "Courier", fontSize: size - 1 }, children: b.text }) }, key);
4160
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.View, { style: [styles26.codeBlock, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { color: tokens.text, fontFamily: "Courier", fontSize: size - 1 }, children: b.text }) }, key);
4143
4161
  case "hr":
4144
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.View, { style: [styles25.hr, { backgroundColor: tokens.border }] }, key);
4162
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.View, { style: [styles26.hr, { backgroundColor: tokens.border }] }, key);
4145
4163
  case "image":
4146
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Image, { source: { uri: b.url }, style: [styles25.image, { backgroundColor: tokens["surface-2"] }], resizeMode: "cover" }, key);
4164
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Image, { source: { uri: b.url }, style: [styles26.image, { backgroundColor: tokens["surface-2"] }], resizeMode: "cover" }, key);
4147
4165
  case "paragraph":
4148
4166
  default:
4149
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native33.Text, { style: { color: textColor, fontSize: size, lineHeight: line, marginBottom: 10 }, children: renderInline(b.text, key, tokens.accent, tokens.elev) }, key);
4167
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { color: textColor, fontSize: size, lineHeight: line, marginBottom: 10 }, children: renderInline(b.text, key, tokens.accent, tokens.elev) }, key);
4150
4168
  }
4151
4169
  }) });
4152
4170
  }
4153
- var styles25 = import_react_native33.StyleSheet.create({
4171
+ var styles26 = import_react_native34.StyleSheet.create({
4154
4172
  blockquote: { borderLeftWidth: 3, borderRadius: 6, paddingHorizontal: 12, paddingVertical: 6, marginBottom: 10 },
4155
4173
  list: { marginBottom: 10 },
4156
4174
  listRow: { flexDirection: "row", gap: 6, marginBottom: 4 },
@@ -4160,43 +4178,43 @@ var styles25 = import_react_native33.StyleSheet.create({
4160
4178
  });
4161
4179
 
4162
4180
  // src/profile/ProfileCommentCard.tsx
4163
- var import_jsx_runtime33 = require("react/jsx-runtime");
4181
+ var import_jsx_runtime34 = require("react/jsx-runtime");
4164
4182
  function ProfileCommentCard({ comment, threadTitle, replyingTo, onOpen }) {
4165
4183
  const { tokens } = useTheme();
4166
4184
  const voteCounts = comment.voteCounts ?? { up: 0, down: 0 };
4167
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native34.Pressable, { onPress: onOpen, style: [styles26.card, { borderBottomColor: tokens.border }], children: [
4168
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native34.View, { style: styles26.head, children: [
4169
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: [styles26.author, { color: tokens.text }], children: comment.authorDisplayName ?? "Member" }),
4170
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native34.Text, { style: [styles26.time, { color: tokens.muted }], children: [
4185
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.Pressable, { onPress: onOpen, style: [styles27.card, { borderBottomColor: tokens.border }], children: [
4186
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.View, { style: styles27.head, children: [
4187
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: [styles27.author, { color: tokens.text }], children: comment.authorDisplayName ?? "Member" }),
4188
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.Text, { style: [styles27.time, { color: tokens.muted }], children: [
4171
4189
  "\xB7 ",
4172
4190
  fmtRelativeTime(comment.createdAt)
4173
4191
  ] })
4174
4192
  ] }),
4175
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native34.Text, { style: [styles26.context, { color: tokens.muted }], children: [
4193
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.Text, { style: [styles27.context, { color: tokens.muted }], children: [
4176
4194
  "Commented on ",
4177
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { color: tokens["text-2"], fontWeight: "600" }, children: threadTitle })
4195
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: { color: tokens["text-2"], fontWeight: "600" }, children: threadTitle })
4178
4196
  ] }),
4179
- replyingTo && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native34.Text, { style: [styles26.replying, { color: tokens.muted }], numberOfLines: 1, children: [
4197
+ replyingTo && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.Text, { style: [styles27.replying, { color: tokens.muted }], numberOfLines: 1, children: [
4180
4198
  "Replying to ",
4181
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: { fontWeight: "700" }, children: replyingTo.author }),
4199
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: { fontWeight: "700" }, children: replyingTo.author }),
4182
4200
  ": \u201C",
4183
4201
  replyingTo.snippet,
4184
4202
  "\u201D"
4185
4203
  ] }),
4186
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.View, { style: { marginTop: 4, maxHeight: 40, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RenderedBody, { body: comment.body, size: 13.5 }) }),
4187
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native34.View, { style: styles26.stats, children: [
4188
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native34.View, { style: styles26.stat, children: [
4189
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UpvoteIcon, { size: 13, color: tokens.muted }),
4190
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: [styles26.statN, { color: tokens.muted }], children: voteCounts.up })
4204
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.View, { style: { marginTop: 4, maxHeight: 40, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RenderedBody, { body: comment.body, size: 13.5 }) }),
4205
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.View, { style: styles27.stats, children: [
4206
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.View, { style: styles27.stat, children: [
4207
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(UpvoteIcon, { size: 13, color: tokens.muted }),
4208
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: [styles27.statN, { color: tokens.muted }], children: voteCounts.up })
4191
4209
  ] }),
4192
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native34.View, { style: styles26.stat, children: [
4193
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DownvoteIcon, { size: 13, color: tokens.muted }),
4194
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native34.Text, { style: [styles26.statN, { color: tokens.muted }], children: voteCounts.down })
4210
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.View, { style: styles27.stat, children: [
4211
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DownvoteIcon, { size: 13, color: tokens.muted }),
4212
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: [styles27.statN, { color: tokens.muted }], children: voteCounts.down })
4195
4213
  ] })
4196
4214
  ] })
4197
4215
  ] });
4198
4216
  }
4199
- var styles26 = import_react_native34.StyleSheet.create({
4217
+ var styles27 = import_react_native35.StyleSheet.create({
4200
4218
  card: { paddingVertical: 12, borderBottomWidth: 1 },
4201
4219
  head: { flexDirection: "row", alignItems: "center", gap: 6 },
4202
4220
  author: { fontSize: 13, fontWeight: "700" },
@@ -4209,7 +4227,7 @@ var styles26 = import_react_native34.StyleSheet.create({
4209
4227
  });
4210
4228
 
4211
4229
  // src/profile/UserProfileSheet.tsx
4212
- var import_jsx_runtime34 = require("react/jsx-runtime");
4230
+ var import_jsx_runtime35 = require("react/jsx-runtime");
4213
4231
  var PUBLIC_TABS = ["Overview", "Posts", "Comments", "Upvoted", "Downvoted"];
4214
4232
  var HANDLE_H = 32;
4215
4233
  function UserProfileSheet({ userId, onClose }) {
@@ -4218,24 +4236,24 @@ function UserProfileSheet({ userId, onClose }) {
4218
4236
  const { apiUrl, forumId } = session;
4219
4237
  const token = session.status === "ready" ? session.sessionToken : void 0;
4220
4238
  const insets = (0, import_react_native_safe_area_context8.useSafeAreaInsets)();
4221
- const { height: windowHeight } = import_react_native35.Dimensions.get("window");
4239
+ const { height: windowHeight } = import_react_native36.Dimensions.get("window");
4222
4240
  const SNAP_HALF = windowHeight * 0.52;
4223
4241
  const SNAP_FULL = insets.top;
4224
4242
  const SNAP_CLOSED = windowHeight;
4225
- const sheetTop = (0, import_react22.useRef)(new import_react_native35.Animated.Value(SNAP_CLOSED)).current;
4226
- const lastMoveY = (0, import_react22.useRef)(null);
4227
- const isAtFullRef = (0, import_react22.useRef)(false);
4228
- const snapFullRef = (0, import_react22.useRef)(insets.top);
4243
+ const sheetTop = (0, import_react23.useRef)(new import_react_native36.Animated.Value(SNAP_CLOSED)).current;
4244
+ const lastMoveY = (0, import_react23.useRef)(null);
4245
+ const isAtFullRef = (0, import_react23.useRef)(false);
4246
+ const snapFullRef = (0, import_react23.useRef)(insets.top);
4229
4247
  snapFullRef.current = insets.top;
4230
- const onCloseRef = (0, import_react22.useRef)(onClose);
4248
+ const onCloseRef = (0, import_react23.useRef)(onClose);
4231
4249
  onCloseRef.current = onClose;
4232
- const [scrollEnabled, setScrollEnabled] = (0, import_react22.useState)(false);
4233
- (0, import_react22.useEffect)(() => {
4250
+ const [scrollEnabled, setScrollEnabled] = (0, import_react23.useState)(false);
4251
+ (0, import_react23.useEffect)(() => {
4234
4252
  const id = requestAnimationFrame(() => {
4235
- import_react_native35.Animated.timing(sheetTop, {
4253
+ import_react_native36.Animated.timing(sheetTop, {
4236
4254
  toValue: SNAP_HALF,
4237
4255
  duration: 320,
4238
- easing: import_react_native35.Easing.out(import_react_native35.Easing.cubic),
4256
+ easing: import_react_native36.Easing.out(import_react_native36.Easing.cubic),
4239
4257
  useNativeDriver: false
4240
4258
  }).start();
4241
4259
  });
@@ -4246,12 +4264,12 @@ function UserProfileSheet({ userId, onClose }) {
4246
4264
  isAtFullRef.current = goingFull;
4247
4265
  setScrollEnabled(goingFull);
4248
4266
  if (target === SNAP_CLOSED) {
4249
- import_react_native35.Animated.timing(sheetTop, { toValue: SNAP_CLOSED, duration: 220, useNativeDriver: false }).start(done);
4267
+ import_react_native36.Animated.timing(sheetTop, { toValue: SNAP_CLOSED, duration: 220, useNativeDriver: false }).start(done);
4250
4268
  } else {
4251
- import_react_native35.Animated.spring(sheetTop, { toValue: target, useNativeDriver: false, bounciness: 4 }).start(done);
4269
+ import_react_native36.Animated.spring(sheetTop, { toValue: target, useNativeDriver: false, bounciness: 4 }).start(done);
4252
4270
  }
4253
4271
  };
4254
- const pan = (0, import_react22.useRef)(import_react_native35.PanResponder.create({
4272
+ const pan = (0, import_react23.useRef)(import_react_native36.PanResponder.create({
4255
4273
  onStartShouldSetPanResponder: () => true,
4256
4274
  onMoveShouldSetPanResponder: () => true,
4257
4275
  onPanResponderTerminationRequest: () => false,
@@ -4281,7 +4299,7 @@ function UserProfileSheet({ userId, onClose }) {
4281
4299
  snapTo(SNAP_HALF);
4282
4300
  }
4283
4301
  })).current;
4284
- const contentPan = (0, import_react22.useRef)(import_react_native35.PanResponder.create({
4302
+ const contentPan = (0, import_react23.useRef)(import_react_native36.PanResponder.create({
4285
4303
  onMoveShouldSetPanResponder: (_e, g) => !isAtFullRef.current && Math.abs(g.dy) > 5,
4286
4304
  onPanResponderTerminationRequest: () => false,
4287
4305
  onPanResponderGrant: (_e, g) => {
@@ -4318,13 +4336,13 @@ function UserProfileSheet({ userId, onClose }) {
4318
4336
  function handleClose() {
4319
4337
  snapTo(SNAP_CLOSED, onClose);
4320
4338
  }
4321
- const [profile, setProfile] = (0, import_react22.useState)(null);
4322
- const [loading, setLoading] = (0, import_react22.useState)(true);
4323
- const [activeTab, setActiveTab] = (0, import_react22.useState)("Overview");
4324
- const [activity, setActivity] = (0, import_react22.useState)([]);
4325
- const [activityLoading, setActivityLoading] = (0, import_react22.useState)(false);
4326
- const [previewUri, setPreviewUri] = (0, import_react22.useState)(null);
4327
- (0, import_react22.useEffect)(() => {
4339
+ const [profile, setProfile] = (0, import_react23.useState)(null);
4340
+ const [loading, setLoading] = (0, import_react23.useState)(true);
4341
+ const [activeTab, setActiveTab] = (0, import_react23.useState)("Overview");
4342
+ const [activity, setActivity] = (0, import_react23.useState)([]);
4343
+ const [activityLoading, setActivityLoading] = (0, import_react23.useState)(false);
4344
+ const [previewUri, setPreviewUri] = (0, import_react23.useState)(null);
4345
+ (0, import_react23.useEffect)(() => {
4328
4346
  let cancelled = false;
4329
4347
  setLoading(true);
4330
4348
  getUserProfile(apiUrl, forumId, userId, token).then((p) => {
@@ -4336,7 +4354,7 @@ function UserProfileSheet({ userId, onClose }) {
4336
4354
  cancelled = true;
4337
4355
  };
4338
4356
  }, [apiUrl, forumId, userId, token]);
4339
- (0, import_react22.useEffect)(() => {
4357
+ (0, import_react23.useEffect)(() => {
4340
4358
  let cancelled = false;
4341
4359
  setActivityLoading(true);
4342
4360
  const scope = activeTab.toLowerCase();
@@ -4354,12 +4372,12 @@ function UserProfileSheet({ userId, onClose }) {
4354
4372
  }, [apiUrl, forumId, userId, token, activeTab]);
4355
4373
  const name = profile?.displayName ?? "\u2026";
4356
4374
  const copy = profileEmptyCopy(activeTab);
4357
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.Modal, { transparent: true, visible: true, animationType: "none", onRequestClose: handleClose, children: [
4358
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Animated.View, { style: [styles27.scrim, { opacity: scrimOpacity }], pointerEvents: "none" }),
4359
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4360
- import_react_native35.View,
4375
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native36.Modal, { transparent: true, visible: true, animationType: "none", statusBarTranslucent: true, onRequestClose: handleClose, children: [
4376
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Animated.View, { style: [styles28.scrim, { opacity: scrimOpacity }], pointerEvents: "none" }),
4377
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4378
+ import_react_native36.View,
4361
4379
  {
4362
- style: import_react_native35.StyleSheet.absoluteFill,
4380
+ style: import_react_native36.StyleSheet.absoluteFill,
4363
4381
  onStartShouldSetResponder: (e) => {
4364
4382
  const sheetY = sheetTop._value;
4365
4383
  return e.nativeEvent.pageY < sheetY;
@@ -4367,56 +4385,56 @@ function UserProfileSheet({ userId, onClose }) {
4367
4385
  onResponderRelease: () => handleClose()
4368
4386
  }
4369
4387
  ),
4370
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Animated.View, { style: [styles27.sheet, { backgroundColor: tokens.bg, top: sheetTop }], children: loading ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.View, { style: styles27.center, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Mascot, { size: 36 }) }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.View, { style: styles27.scrollWrap, ...contentPan.panHandlers, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.ScrollView, { scrollEnabled, contentContainerStyle: styles27.content, scrollEventThrottle: 16, children: [
4371
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4372
- import_react_native35.Pressable,
4388
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Animated.View, { style: [styles28.sheet, { backgroundColor: tokens.bg, top: sheetTop }], children: loading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: styles28.center, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Mascot, { size: 36 }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: styles28.scrollWrap, ...contentPan.panHandlers, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native36.ScrollView, { scrollEnabled, contentContainerStyle: styles28.content, scrollEventThrottle: 16, children: [
4389
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4390
+ import_react_native36.Pressable,
4373
4391
  {
4374
4392
  onPress: () => profile?.bannerUrl && setPreviewUri(profile.bannerUrl),
4375
4393
  disabled: !profile?.bannerUrl,
4376
- style: [styles27.banner, { backgroundColor: tokens["surface-2"] }],
4394
+ style: [styles28.banner, { backgroundColor: tokens["surface-2"] }],
4377
4395
  children: [
4378
- profile?.bannerUrl != null && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Image, { source: { uri: profile.bannerUrl }, style: import_react_native35.StyleSheet.absoluteFill }),
4379
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.View, { style: styles27.avatarWrap, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4380
- import_react_native35.Pressable,
4396
+ profile?.bannerUrl != null && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Image, { source: { uri: profile.bannerUrl }, style: import_react_native36.StyleSheet.absoluteFill }),
4397
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: styles28.avatarWrap, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4398
+ import_react_native36.Pressable,
4381
4399
  {
4382
4400
  onPress: () => profile?.avatarUrl && setPreviewUri(profile.avatarUrl),
4383
4401
  disabled: !profile?.avatarUrl,
4384
- style: [styles27.avatarRing, { borderColor: tokens.bg }],
4385
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Avatar, { authorId: profile?.id, author: name, avatarUrl: profile?.avatarUrl, size: 72 })
4402
+ style: [styles28.avatarRing, { borderColor: tokens.bg }],
4403
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Avatar, { authorId: profile?.id, author: name, avatarUrl: profile?.avatarUrl, size: 72 })
4386
4404
  }
4387
4405
  ) })
4388
4406
  ]
4389
4407
  }
4390
4408
  ),
4391
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.View, { style: { paddingHorizontal: 16 }, children: [
4392
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.View, { style: styles27.nameRow, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.View, { style: { flex: 1 }, children: [
4393
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: [styles27.displayName, { color: tokens.text }], children: name }),
4394
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.Text, { style: [styles27.username, { color: tokens.muted }], children: [
4409
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native36.View, { style: { paddingHorizontal: 16 }, children: [
4410
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: styles28.nameRow, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native36.View, { style: { flex: 1 }, children: [
4411
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Text, { style: [styles28.displayName, { color: tokens.text }], children: name }),
4412
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native36.Text, { style: [styles28.username, { color: tokens.muted }], children: [
4395
4413
  "/",
4396
4414
  name
4397
4415
  ] })
4398
4416
  ] }) }),
4399
- profile?.bio != null && profile.bio.trim().length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: [styles27.bio, { color: tokens["text-2"] }], children: profile.bio }),
4400
- profile && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SocialLinks, { links: profile.socialLinks })
4417
+ profile?.bio != null && profile.bio.trim().length > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Text, { style: [styles28.bio, { color: tokens["text-2"] }], children: profile.bio }),
4418
+ profile && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SocialLinks, { links: profile.socialLinks })
4401
4419
  ] }),
4402
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.View, { style: [styles27.karmaRow, { borderTopColor: tokens.border }], children: [
4403
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.View, { style: styles27.karmaBlock, children: [
4404
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: [styles27.karmaValue, { color: tokens.text }], children: (profile?.postKarma ?? 0).toLocaleString() }),
4405
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: [styles27.karmaLabel, { color: tokens.muted }], children: "Post Karma" })
4420
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native36.View, { style: [styles28.karmaRow, { borderTopColor: tokens.border }], children: [
4421
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native36.View, { style: styles28.karmaBlock, children: [
4422
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Text, { style: [styles28.karmaValue, { color: tokens.text }], children: (profile?.postKarma ?? 0).toLocaleString() }),
4423
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Text, { style: [styles28.karmaLabel, { color: tokens.muted }], children: "Post Karma" })
4406
4424
  ] }),
4407
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.View, { style: [styles27.karmaDivider, { backgroundColor: tokens.border }] }),
4408
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.View, { style: styles27.karmaBlock, children: [
4409
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: [styles27.karmaValue, { color: tokens.text }], children: (profile?.commentKarma ?? 0).toLocaleString() }),
4410
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: [styles27.karmaLabel, { color: tokens.muted }], children: "Comment Karma" })
4425
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: [styles28.karmaDivider, { backgroundColor: tokens.border }] }),
4426
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native36.View, { style: styles28.karmaBlock, children: [
4427
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Text, { style: [styles28.karmaValue, { color: tokens.text }], children: (profile?.commentKarma ?? 0).toLocaleString() }),
4428
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Text, { style: [styles28.karmaLabel, { color: tokens.muted }], children: "Comment Karma" })
4411
4429
  ] })
4412
4430
  ] }),
4413
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.View, { style: [styles27.divider, { backgroundColor: tokens.border }] }),
4414
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.View, { style: { marginTop: 6, marginBottom: 14 }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TabPills, { tabs: PUBLIC_TABS, active: activeTab, onSelect: setActiveTab }) }),
4415
- activityLoading ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.View, { style: { alignItems: "center", paddingVertical: 30 }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Mascot, { size: 36 }) }) : activity.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native35.View, { style: styles27.empty, children: [
4416
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Mascot, { size: 88, animated: false, badge: false }),
4417
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: [styles27.emptyTitle, { color: tokens.text }], children: copy.title }),
4418
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.Text, { style: [styles27.emptyDesc, { color: tokens.muted }], children: copy.description })
4419
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.View, { style: { paddingHorizontal: 16 }, children: activity.map((a, i) => a.kind === "thread" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4431
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: [styles28.divider, { backgroundColor: tokens.border }] }),
4432
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: { marginTop: 6, marginBottom: 14 }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TabPills, { tabs: PUBLIC_TABS, active: activeTab, onSelect: setActiveTab }) }),
4433
+ activityLoading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: { alignItems: "center", paddingVertical: 30 }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Mascot, { size: 36 }) }) : activity.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native36.View, { style: styles28.empty, children: [
4434
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Mascot, { size: 88, animated: false, badge: false }),
4435
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Text, { style: [styles28.emptyTitle, { color: tokens.text }], children: copy.title }),
4436
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Text, { style: [styles28.emptyDesc, { color: tokens.muted }], children: copy.description })
4437
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: { paddingHorizontal: 16 }, children: activity.map((a, i) => a.kind === "thread" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4420
4438
  PostRow,
4421
4439
  {
4422
4440
  row: a.row,
@@ -4433,7 +4451,7 @@ function UserProfileSheet({ userId, onClose }) {
4433
4451
  }
4434
4452
  },
4435
4453
  `t-${a.row.id}-${i}`
4436
- ) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4454
+ ) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4437
4455
  ProfileCommentCard,
4438
4456
  {
4439
4457
  comment: a.comment,
@@ -4445,21 +4463,21 @@ function UserProfileSheet({ userId, onClose }) {
4445
4463
  `c-${a.comment.id}-${i}`
4446
4464
  )) })
4447
4465
  ] }) }) }),
4448
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4449
- import_react_native35.Animated.View,
4466
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4467
+ import_react_native36.Animated.View,
4450
4468
  {
4451
- style: [styles27.handleBar, { backgroundColor: tokens.bg, top: sheetTop }],
4469
+ style: [styles28.handleBar, { backgroundColor: tokens.bg, top: sheetTop }],
4452
4470
  children: [
4453
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.View, { style: [styles27.pill, { backgroundColor: tokens["surface-2"] }] }),
4454
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native35.View, { style: import_react_native35.StyleSheet.absoluteFill, ...pan.panHandlers })
4471
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: [styles28.pill, { backgroundColor: tokens["surface-2"] }] }),
4472
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: import_react_native36.StyleSheet.absoluteFill, ...pan.panHandlers })
4455
4473
  ]
4456
4474
  }
4457
4475
  ),
4458
- previewUri && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ImageLightbox, { uri: previewUri, onClose: () => setPreviewUri(null) })
4476
+ previewUri && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ImageLightbox, { uri: previewUri, onClose: () => setPreviewUri(null) })
4459
4477
  ] });
4460
4478
  }
4461
- var styles27 = import_react_native35.StyleSheet.create({
4462
- scrim: { ...import_react_native35.StyleSheet.absoluteFill, backgroundColor: "rgba(0,0,0,1)" },
4479
+ var styles28 = import_react_native36.StyleSheet.create({
4480
+ scrim: { ...import_react_native36.StyleSheet.absoluteFill, backgroundColor: "rgba(0,0,0,1)" },
4463
4481
  sheet: {
4464
4482
  position: "absolute",
4465
4483
  left: 0,
@@ -4506,7 +4524,7 @@ var styles27 = import_react_native35.StyleSheet.create({
4506
4524
  });
4507
4525
 
4508
4526
  // src/screens/FeedScreen.tsx
4509
- var import_jsx_runtime35 = require("react/jsx-runtime");
4527
+ var import_jsx_runtime36 = require("react/jsx-runtime");
4510
4528
  var SORT_OPTIONS = ["Best", "Hot", "New", "Top", "Rising"];
4511
4529
  var SORT_QUERY = {
4512
4530
  Best: "best",
@@ -4527,23 +4545,23 @@ function FeedBody() {
4527
4545
  const session = useSession();
4528
4546
  const navigation = (0, import_native4.useNavigation)();
4529
4547
  const onScroll = useScrollCollapse();
4530
- const [sort, setSort] = (0, import_react23.useState)("Best");
4531
- const [rows, setRows] = (0, import_react23.useState)([]);
4532
- const [loading, setLoading] = (0, import_react23.useState)(true);
4533
- const [error, setError] = (0, import_react23.useState)(null);
4534
- const [reportId, setReportId] = (0, import_react23.useState)(null);
4535
- const [shareId, setShareId] = (0, import_react23.useState)(null);
4536
- const [viewingUserId, setViewingUserId] = (0, import_react23.useState)(null);
4548
+ const [sort, setSort] = (0, import_react24.useState)("Best");
4549
+ const [rows, setRows] = (0, import_react24.useState)([]);
4550
+ const [loading, setLoading] = (0, import_react24.useState)(true);
4551
+ const [error, setError] = (0, import_react24.useState)(null);
4552
+ const [reportId, setReportId] = (0, import_react24.useState)(null);
4553
+ const [shareId, setShareId] = (0, import_react24.useState)(null);
4554
+ const [viewingUserId, setViewingUserId] = (0, import_react24.useState)(null);
4537
4555
  const currentUserId = session.status === "ready" ? session.userId : null;
4538
4556
  const route = (0, import_native4.useRoute)();
4539
4557
  const scope = route.params?.scope ?? "home";
4540
4558
  const { apiUrl, forumId } = session;
4541
4559
  const token = session.status === "ready" ? session.sessionToken : void 0;
4542
- (0, import_react23.useEffect)(() => {
4560
+ (0, import_react24.useEffect)(() => {
4543
4561
  if (scope === "popular") setSort("Hot");
4544
4562
  else if (scope === "home") setSort("Best");
4545
4563
  }, [scope]);
4546
- const load = (0, import_react23.useCallback)(async (s) => {
4564
+ const load = (0, import_react24.useCallback)(async (s) => {
4547
4565
  if (!token) return;
4548
4566
  setLoading(true);
4549
4567
  setError(null);
@@ -4560,13 +4578,13 @@ function FeedBody() {
4560
4578
  setLoading(false);
4561
4579
  }
4562
4580
  }, [apiUrl, forumId, token, scope]);
4563
- (0, import_react23.useEffect)(() => {
4581
+ (0, import_react24.useEffect)(() => {
4564
4582
  void load(sort);
4565
4583
  }, [load, sort]);
4566
- const updateRow = (0, import_react23.useCallback)((id, fn) => {
4584
+ const updateRow = (0, import_react24.useCallback)((id, fn) => {
4567
4585
  setRows((prev) => prev.map((r) => r.id === id ? fn(r) : r));
4568
4586
  }, []);
4569
- const onVote = (0, import_react23.useCallback)((row, dir) => {
4587
+ const onVote = (0, import_react24.useCallback)((row, dir) => {
4570
4588
  if (!token) return;
4571
4589
  const oldDir = row.myVote;
4572
4590
  const newDir = nextVoteDir(oldDir, dir);
@@ -4575,24 +4593,24 @@ function FeedBody() {
4575
4593
  const req = newDir === null ? removeVoteFromThread(apiUrl, forumId, row.id, token) : voteOnThread(apiUrl, forumId, row.id, newDir, token);
4576
4594
  req.then((res) => updateRow(row.id, (r) => ({ ...r, myVote: res.myVote, voteCounts: res.voteCounts }))).catch(() => updateRow(row.id, (r) => ({ ...r, myVote: oldDir, voteCounts: prevCounts })));
4577
4595
  }, [apiUrl, forumId, token, updateRow]);
4578
- const onSave = (0, import_react23.useCallback)((row) => {
4596
+ const onSave = (0, import_react24.useCallback)((row) => {
4579
4597
  if (!token) return;
4580
4598
  const newSaved = !row.saved;
4581
4599
  updateRow(row.id, (r) => ({ ...r, saved: newSaved }));
4582
4600
  const req = newSaved ? saveThread(apiUrl, forumId, row.id, token) : unsaveThread(apiUrl, forumId, row.id, token);
4583
4601
  req.catch(() => updateRow(row.id, (r) => ({ ...r, saved: !newSaved })));
4584
4602
  }, [apiUrl, forumId, token, updateRow]);
4585
- const submitReport = (0, import_react23.useCallback)((reason) => {
4603
+ const submitReport = (0, import_react24.useCallback)((reason) => {
4586
4604
  if (!token || !reportId) return;
4587
4605
  void reportThread(apiUrl, forumId, reportId, reason, token).catch(() => {
4588
4606
  });
4589
4607
  }, [apiUrl, forumId, token, reportId]);
4590
- const submitShare = (0, import_react23.useCallback)((recipientIds) => {
4608
+ const submitShare = (0, import_react24.useCallback)((recipientIds) => {
4591
4609
  if (!token || !shareId || recipientIds.length === 0) return;
4592
4610
  void shareThreadWithUsers(apiUrl, forumId, shareId, recipientIds, void 0, token).catch(() => {
4593
4611
  });
4594
4612
  }, [apiUrl, forumId, token, shareId]);
4595
- const controls = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: styles28.controls, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4613
+ const controls = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native37.View, { style: styles29.controls, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4596
4614
  SelectPill,
4597
4615
  {
4598
4616
  value: sort,
@@ -4601,20 +4619,20 @@ function FeedBody() {
4601
4619
  label: sort,
4602
4620
  optionIcon: (s) => {
4603
4621
  const Icon = SORT_ICON[s];
4604
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { size: 16, color: tokens["text-2"] });
4622
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { size: 16, color: tokens["text-2"] });
4605
4623
  }
4606
4624
  }
4607
4625
  ) });
4608
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
4609
- loading && rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: styles28.center, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Mascot, { size: 36 }) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: styles28.center, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Text, { style: { color: tokens["text-2"], fontSize: 14 }, children: error }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4610
- import_react_native36.FlatList,
4626
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
4627
+ loading && rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native37.View, { style: styles29.center, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Mascot, { size: 36 }) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native37.View, { style: styles29.center, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native37.Text, { style: { color: tokens["text-2"], fontSize: 14 }, children: error }) }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4628
+ import_react_native37.FlatList,
4611
4629
  {
4612
4630
  data: rows,
4613
4631
  keyExtractor: (r) => r.id,
4614
4632
  onScroll,
4615
4633
  scrollEventThrottle: 16,
4616
4634
  ListHeaderComponent: controls,
4617
- renderItem: ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4635
+ renderItem: ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4618
4636
  PostRow,
4619
4637
  {
4620
4638
  row: item,
@@ -4629,19 +4647,19 @@ function FeedBody() {
4629
4647
  }
4630
4648
  }
4631
4649
  ),
4632
- ListEmptyComponent: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.View, { style: styles28.center, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native36.Text, { style: { color: tokens["text-2"], fontSize: 14 }, children: "No posts yet" }) }),
4650
+ ListEmptyComponent: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native37.View, { style: styles29.center, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native37.Text, { style: { color: tokens["text-2"], fontSize: 14 }, children: "No posts yet" }) }),
4633
4651
  contentContainerStyle: { paddingBottom: 100 }
4634
4652
  }
4635
4653
  ),
4636
- reportId && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ReportSheet, { target: "post", onClose: () => setReportId(null), onSubmit: submitReport }),
4637
- shareId && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ShareSheet, { apiUrl, forumId, token, onClose: () => setShareId(null), onShare: submitShare }),
4638
- viewingUserId && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(UserProfileSheet, { userId: viewingUserId, onClose: () => setViewingUserId(null) })
4654
+ reportId && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ReportSheet, { target: "post", onClose: () => setReportId(null), onSubmit: submitReport }),
4655
+ shareId && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ShareSheet, { apiUrl, forumId, token, onClose: () => setShareId(null), onShare: submitShare }),
4656
+ viewingUserId && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(UserProfileSheet, { userId: viewingUserId, onClose: () => setViewingUserId(null) })
4639
4657
  ] });
4640
4658
  }
4641
4659
  function FeedScreen() {
4642
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Shell, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(FeedBody, {}) });
4660
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Shell, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FeedBody, {}) });
4643
4661
  }
4644
- var styles28 = import_react_native36.StyleSheet.create({
4662
+ var styles29 = import_react_native37.StyleSheet.create({
4645
4663
  controls: {
4646
4664
  flexDirection: "row",
4647
4665
  alignItems: "center",
@@ -4659,28 +4677,28 @@ var styles28 = import_react_native36.StyleSheet.create({
4659
4677
  });
4660
4678
 
4661
4679
  // src/screens/ThreadScreen.tsx
4662
- var import_react28 = require("react");
4663
- var import_react_native43 = require("react-native");
4680
+ var import_react29 = require("react");
4681
+ var import_react_native44 = require("react-native");
4664
4682
  var import_native5 = require("@react-navigation/native");
4665
4683
 
4666
4684
  // src/components/MediaGallery.tsx
4667
- var import_react24 = require("react");
4668
- var import_react_native37 = require("react-native");
4669
- var import_jsx_runtime36 = require("react/jsx-runtime");
4685
+ var import_react25 = require("react");
4686
+ var import_react_native38 = require("react-native");
4687
+ var import_jsx_runtime37 = require("react/jsx-runtime");
4670
4688
  function MediaGallery({ attachments, radius = 14, aspectRatio = 4 / 5 }) {
4671
4689
  const { tokens } = useTheme();
4672
- const { width: windowWidth } = (0, import_react_native37.useWindowDimensions)();
4673
- const [index, setIndex] = (0, import_react24.useState)(0);
4674
- const [previewUri, setPreviewUri] = (0, import_react24.useState)(null);
4690
+ const { width: windowWidth } = (0, import_react_native38.useWindowDimensions)();
4691
+ const [index, setIndex] = (0, import_react25.useState)(0);
4692
+ const [previewUri, setPreviewUri] = (0, import_react25.useState)(null);
4675
4693
  const slideWidth = windowWidth - 32;
4676
4694
  if (attachments.length === 0) return null;
4677
4695
  function onScrollEnd(e) {
4678
4696
  setIndex(Math.round(e.nativeEvent.contentOffset.x / slideWidth));
4679
4697
  }
4680
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_native37.View, { style: { marginBottom: 16 }, children: [
4681
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_native37.View, { style: { borderRadius: radius, overflow: "hidden" }, children: [
4682
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4683
- import_react_native37.ScrollView,
4698
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_native38.View, { style: { marginBottom: 16 }, children: [
4699
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_native38.View, { style: { borderRadius: radius, overflow: "hidden" }, children: [
4700
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4701
+ import_react_native38.ScrollView,
4684
4702
  {
4685
4703
  horizontal: true,
4686
4704
  pagingEnabled: true,
@@ -4688,25 +4706,25 @@ function MediaGallery({ attachments, radius = 14, aspectRatio = 4 / 5 }) {
4688
4706
  onMomentumScrollEnd: onScrollEnd,
4689
4707
  children: attachments.map((a) => {
4690
4708
  const isVideo = a.mimeType.startsWith("video/");
4691
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4692
- import_react_native37.Pressable,
4709
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4710
+ import_react_native38.Pressable,
4693
4711
  {
4694
4712
  disabled: isVideo,
4695
4713
  onPress: () => setPreviewUri(a.downloadUrl),
4696
- style: [styles29.slide, { width: slideWidth, aspectRatio, backgroundColor: tokens["surface-2"] }],
4697
- children: isVideo ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(InlineVideoThumb, { uri: a.downloadUrl, style: styles29.media, contentFit: "contain" }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native37.Image, { source: { uri: a.downloadUrl }, style: styles29.media, resizeMode: "cover" })
4714
+ style: [styles30.slide, { width: slideWidth, aspectRatio, backgroundColor: tokens["surface-2"] }],
4715
+ children: isVideo ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(InlineVideoThumb, { uri: a.downloadUrl, style: styles30.media, contentFit: "contain" }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native38.Image, { source: { uri: a.downloadUrl }, style: styles30.media, resizeMode: "cover" })
4698
4716
  },
4699
4717
  a.id
4700
4718
  );
4701
4719
  })
4702
4720
  }
4703
4721
  ),
4704
- attachments.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native37.View, { style: styles29.dots, children: attachments.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native37.View, { style: [styles29.dot, { backgroundColor: i === index ? "#fff" : "rgba(255,255,255,0.5)" }] }, a.id)) })
4722
+ attachments.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native38.View, { style: styles30.dots, children: attachments.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native38.View, { style: [styles30.dot, { backgroundColor: i === index ? "#fff" : "rgba(255,255,255,0.5)" }] }, a.id)) })
4705
4723
  ] }),
4706
- previewUri && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ImageLightbox, { uri: previewUri, onClose: () => setPreviewUri(null) })
4724
+ previewUri && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ImageLightbox, { uri: previewUri, onClose: () => setPreviewUri(null) })
4707
4725
  ] });
4708
4726
  }
4709
- var styles29 = import_react_native37.StyleSheet.create({
4727
+ var styles30 = import_react_native38.StyleSheet.create({
4710
4728
  slide: {},
4711
4729
  media: { width: "100%", height: "100%" },
4712
4730
  dots: {
@@ -4722,17 +4740,17 @@ var styles29 = import_react_native37.StyleSheet.create({
4722
4740
  });
4723
4741
 
4724
4742
  // src/components/BackRow.tsx
4725
- var import_react_native38 = require("react-native");
4726
- var import_jsx_runtime37 = require("react/jsx-runtime");
4743
+ var import_react_native39 = require("react-native");
4744
+ var import_jsx_runtime38 = require("react/jsx-runtime");
4727
4745
  function BackRow({ onPress, label = "Back" }) {
4728
4746
  const { tokens } = useTheme();
4729
- const BackIcon = import_react_native38.Platform.OS === "ios" ? ChevronLeftIcon : MaterialBackIcon;
4730
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native38.View, { style: styles30.wrap, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_native38.Pressable, { onPress, hitSlop: 6, style: [styles30.pill, { backgroundColor: tokens["surface-2"] }], children: [
4731
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(BackIcon, { size: 16, color: tokens["text-2"] }),
4732
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native38.Text, { style: [styles30.label, { color: tokens["text-2"] }], children: label })
4747
+ const BackIcon = import_react_native39.Platform.OS === "ios" ? ChevronLeftIcon : MaterialBackIcon;
4748
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native39.View, { style: styles31.wrap, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react_native39.Pressable, { onPress, hitSlop: 6, style: [styles31.pill, { backgroundColor: tokens["surface-2"] }], children: [
4749
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(BackIcon, { size: 16, color: tokens["text-2"] }),
4750
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native39.Text, { style: [styles31.label, { color: tokens["text-2"] }], children: label })
4733
4751
  ] }) });
4734
4752
  }
4735
- var styles30 = import_react_native38.StyleSheet.create({
4753
+ var styles31 = import_react_native39.StyleSheet.create({
4736
4754
  wrap: { flexDirection: "row" },
4737
4755
  pill: {
4738
4756
  flexDirection: "row",
@@ -4746,21 +4764,21 @@ var styles30 = import_react_native38.StyleSheet.create({
4746
4764
  });
4747
4765
 
4748
4766
  // src/components/ConfirmDialog.tsx
4749
- var import_react_native39 = require("react-native");
4750
- var import_jsx_runtime38 = require("react/jsx-runtime");
4767
+ var import_react_native40 = require("react-native");
4768
+ var import_jsx_runtime39 = require("react/jsx-runtime");
4751
4769
  function ConfirmDialog({ title, message, confirmLabel = "Delete", onCancel, onConfirm }) {
4752
4770
  const { tokens } = useTheme();
4753
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native39.Modal, { transparent: true, visible: true, animationType: "fade", onRequestClose: onCancel, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native39.Pressable, { style: styles31.scrim, onPress: onCancel, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react_native39.Pressable, { style: [styles31.card, { backgroundColor: tokens.elev, borderColor: tokens.border }], onPress: () => {
4771
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Modal, { transparent: true, visible: true, animationType: "fade", statusBarTranslucent: true, onRequestClose: onCancel, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Pressable, { style: styles32.scrim, onPress: onCancel, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native40.Pressable, { style: [styles32.card, { backgroundColor: tokens.elev, borderColor: tokens.border }], onPress: () => {
4754
4772
  }, children: [
4755
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native39.Text, { style: [styles31.title, { color: tokens.text }], children: title }),
4756
- message && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native39.Text, { style: [styles31.msg, { color: tokens["text-2"] }], children: message }),
4757
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react_native39.View, { style: styles31.actions, children: [
4758
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native39.Pressable, { onPress: onCancel, style: [styles31.btn, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native39.Text, { style: { color: tokens["text-2"], fontWeight: "700", fontSize: 13.5 }, children: "Cancel" }) }),
4759
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native39.Pressable, { onPress: onConfirm, style: [styles31.btn, { backgroundColor: tokens.danger }], children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native39.Text, { style: { color: "#ffffff", fontWeight: "700", fontSize: 13.5 }, children: confirmLabel }) })
4773
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.title, { color: tokens.text }], children: title }),
4774
+ message && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.msg, { color: tokens["text-2"] }], children: message }),
4775
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native40.View, { style: styles32.actions, children: [
4776
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Pressable, { onPress: onCancel, style: [styles32.btn, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: { color: tokens["text-2"], fontWeight: "700", fontSize: 13.5 }, children: "Cancel" }) }),
4777
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Pressable, { onPress: onConfirm, style: [styles32.btn, { backgroundColor: tokens.danger }], children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: { color: "#ffffff", fontWeight: "700", fontSize: 13.5 }, children: confirmLabel }) })
4760
4778
  ] })
4761
4779
  ] }) }) });
4762
4780
  }
4763
- var styles31 = import_react_native39.StyleSheet.create({
4781
+ var styles32 = import_react_native40.StyleSheet.create({
4764
4782
  scrim: { flex: 1, backgroundColor: "rgba(0,0,0,0.5)", alignItems: "center", justifyContent: "center", padding: 32 },
4765
4783
  card: { width: "100%", maxWidth: 340, borderWidth: 1, borderRadius: 16, padding: 18 },
4766
4784
  title: { fontSize: 16, fontWeight: "800", marginBottom: 8 },
@@ -4770,21 +4788,21 @@ var styles31 = import_react_native39.StyleSheet.create({
4770
4788
  });
4771
4789
 
4772
4790
  // src/thread/AiRow.tsx
4773
- var import_react25 = require("react");
4774
- var import_react_native40 = require("react-native");
4791
+ var import_react26 = require("react");
4792
+ var import_react_native41 = require("react-native");
4775
4793
  var Clipboard = __toESM(require("expo-clipboard"));
4776
- var import_jsx_runtime39 = require("react/jsx-runtime");
4777
- var AiRow = (0, import_react25.forwardRef)(function AiRow2({ threadId, forumId, apiUrl, token }, ref) {
4794
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4795
+ var AiRow = (0, import_react26.forwardRef)(function AiRow2({ threadId, forumId, apiUrl, token }, ref) {
4778
4796
  const { tokens } = useTheme();
4779
- const [rowState, setRowState] = (0, import_react25.useState)("closed");
4780
- const [summaryOpen, setSummaryOpen] = (0, import_react25.useState)(false);
4781
- const [summaryState, setSummaryState] = (0, import_react25.useState)("idle");
4782
- const [summaryPoints, setSummaryPoints] = (0, import_react25.useState)([]);
4783
- const [suggestOpen, setSuggestOpen] = (0, import_react25.useState)(false);
4784
- const [suggestState, setSuggestState] = (0, import_react25.useState)("idle");
4785
- const [suggestText, setSuggestText] = (0, import_react25.useState)("");
4786
- const [suggestCopied, setSuggestCopied] = (0, import_react25.useState)(false);
4787
- (0, import_react25.useEffect)(() => {
4797
+ const [rowState, setRowState] = (0, import_react26.useState)("closed");
4798
+ const [summaryOpen, setSummaryOpen] = (0, import_react26.useState)(false);
4799
+ const [summaryState, setSummaryState] = (0, import_react26.useState)("idle");
4800
+ const [summaryPoints, setSummaryPoints] = (0, import_react26.useState)([]);
4801
+ const [suggestOpen, setSuggestOpen] = (0, import_react26.useState)(false);
4802
+ const [suggestState, setSuggestState] = (0, import_react26.useState)("idle");
4803
+ const [suggestText, setSuggestText] = (0, import_react26.useState)("");
4804
+ const [suggestCopied, setSuggestCopied] = (0, import_react26.useState)(false);
4805
+ (0, import_react26.useEffect)(() => {
4788
4806
  setRowState("closed");
4789
4807
  setSummaryOpen(false);
4790
4808
  setSummaryState("idle");
@@ -4808,7 +4826,7 @@ var AiRow = (0, import_react25.forwardRef)(function AiRow2({ threadId, forumId,
4808
4826
  setSuggestOpen(false);
4809
4827
  }
4810
4828
  };
4811
- (0, import_react25.useImperativeHandle)(ref, () => ({
4829
+ (0, import_react26.useImperativeHandle)(ref, () => ({
4812
4830
  openSummary: () => {
4813
4831
  if (rowState === "open") return;
4814
4832
  void openWithAvailability();
@@ -4865,63 +4883,63 @@ var AiRow = (0, import_react25.forwardRef)(function AiRow2({ threadId, forumId,
4865
4883
  if (suggestState === "idle" || suggestState === "done") void fetchSuggest();
4866
4884
  };
4867
4885
  const panelOpen = summaryOpen || suggestOpen;
4868
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native40.View, { style: { marginBottom: 16 }, children: [
4869
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(GradientBorderPill, { height: 36, borderWidth: 1.3, style: styles32.sparklePill, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
4870
- import_react_native40.Pressable,
4886
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native41.View, { style: { marginBottom: 16 }, children: [
4887
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(GradientBorderPill, { height: 36, borderWidth: 1.3, style: styles33.sparklePill, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4888
+ import_react_native41.Pressable,
4871
4889
  {
4872
4890
  onPress: handleSparkle,
4873
- style: styles32.sparkleBtn,
4891
+ style: styles33.sparkleBtn,
4874
4892
  disabled: rowState === "checking",
4875
4893
  hitSlop: 4,
4876
4894
  children: [
4877
- rowState === "checking" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.ActivityIndicator, { size: "small", color: tokens.accent, style: { width: 16, height: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SparkleIcon, { size: 16 }),
4878
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.sparkleLabel, { color: tokens.text }], children: "Ask AI" })
4895
+ rowState === "checking" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.ActivityIndicator, { size: "small", color: tokens.accent, style: { width: 16, height: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SparkleIcon, { size: 16 }),
4896
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: [styles33.sparkleLabel, { color: tokens.text }], children: "Ask AI" })
4879
4897
  ]
4880
4898
  }
4881
4899
  ) }),
4882
- rowState === "unavailable" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native40.View, { style: [styles32.panel, { borderColor: tokens["border-strong"], backgroundColor: tokens["surface-2"] }], children: [
4883
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native40.View, { style: styles32.panelHead, children: [
4884
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SparkleIcon, { size: 16 }),
4885
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.panelTitle, { color: tokens.text }], children: "AI Features" }),
4886
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.View, { style: { flex: 1 } }),
4887
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Pressable, { onPress: () => setRowState("closed"), hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CloseIcon, { size: 16, color: tokens.muted }) })
4900
+ rowState === "unavailable" && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native41.View, { style: [styles33.panel, { borderColor: tokens["border-strong"], backgroundColor: tokens["surface-2"] }], children: [
4901
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native41.View, { style: styles33.panelHead, children: [
4902
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SparkleIcon, { size: 16 }),
4903
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: [styles33.panelTitle, { color: tokens.text }], children: "AI Features" }),
4904
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.View, { style: { flex: 1 } }),
4905
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Pressable, { onPress: () => setRowState("closed"), hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CloseIcon, { size: 16, color: tokens.muted }) })
4888
4906
  ] }),
4889
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.panelBody, { color: tokens.muted }], children: "AI features are not available for this deployment." })
4907
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: [styles33.panelBody, { color: tokens.muted }], children: "AI features are not available for this deployment." })
4890
4908
  ] }),
4891
- rowState === "open" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
4892
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native40.View, { style: [styles32.actionRow], children: [
4893
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(AiButton, { label: "Summarise thread", onPress: toggleSummary, active: summaryOpen }),
4894
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(AiButton, { label: "Suggest reply", onPress: toggleSuggest, active: suggestOpen })
4909
+ rowState === "open" && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
4910
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native41.View, { style: [styles33.actionRow], children: [
4911
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AiButton, { label: "Summarise thread", onPress: toggleSummary, active: summaryOpen }),
4912
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AiButton, { label: "Suggest reply", onPress: toggleSuggest, active: suggestOpen })
4895
4913
  ] }),
4896
- panelOpen && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native40.View, { style: [styles32.panel, { borderColor: tokens["border-strong"], backgroundColor: tokens["surface-2"] }], children: [
4897
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native40.View, { style: styles32.panelHead, children: [
4898
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SparkleIcon, { size: 16 }),
4899
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.panelTitle, { color: tokens.text }], children: summaryOpen ? "Thread summary" : "Suggested reply" }),
4900
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.View, { style: { flex: 1 } }),
4901
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Pressable, { onPress: () => {
4914
+ panelOpen && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native41.View, { style: [styles33.panel, { borderColor: tokens["border-strong"], backgroundColor: tokens["surface-2"] }], children: [
4915
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native41.View, { style: styles33.panelHead, children: [
4916
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SparkleIcon, { size: 16 }),
4917
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: [styles33.panelTitle, { color: tokens.text }], children: summaryOpen ? "Thread summary" : "Suggested reply" }),
4918
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.View, { style: { flex: 1 } }),
4919
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Pressable, { onPress: () => {
4902
4920
  setSummaryOpen(false);
4903
4921
  setSuggestOpen(false);
4904
- }, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CloseIcon, { size: 16, color: tokens.muted }) })
4922
+ }, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CloseIcon, { size: 16, color: tokens.muted }) })
4905
4923
  ] }),
4906
- summaryOpen && (summaryState === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.panelBody, { color: tokens.muted }], children: "Summarising\u2026" }) : summaryState === "error" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.panelBody, { color: tokens.muted }], children: "AI service unavailable" }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.View, { style: { gap: 6 }, children: summaryPoints.map((pt, i) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native40.View, { style: styles32.bulletRow, children: [
4907
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.bullet, { color: tokens["text-2"] }], children: "\u2022" }),
4908
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.panelBody, { color: tokens["text-2"], flex: 1 }], children: pt })
4924
+ summaryOpen && (summaryState === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: [styles33.panelBody, { color: tokens.muted }], children: "Summarising\u2026" }) : summaryState === "error" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: [styles33.panelBody, { color: tokens.muted }], children: "AI service unavailable" }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.View, { style: { gap: 6 }, children: summaryPoints.map((pt, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native41.View, { style: styles33.bulletRow, children: [
4925
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: [styles33.bullet, { color: tokens["text-2"] }], children: "\u2022" }),
4926
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: [styles33.panelBody, { color: tokens["text-2"], flex: 1 }], children: pt })
4909
4927
  ] }, i)) })),
4910
- suggestOpen && (suggestState === "error" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.panelBody, { color: tokens.muted }], children: "AI service unavailable" }) : suggestText ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native40.View, { children: [
4911
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.panelBody, { color: tokens["text-2"] }], children: suggestText }),
4912
- suggestState === "done" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4913
- import_react_native40.Pressable,
4928
+ suggestOpen && (suggestState === "error" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: [styles33.panelBody, { color: tokens.muted }], children: "AI service unavailable" }) : suggestText ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native41.View, { children: [
4929
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: [styles33.panelBody, { color: tokens["text-2"] }], children: suggestText }),
4930
+ suggestState === "done" && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4931
+ import_react_native41.Pressable,
4914
4932
  {
4915
- style: [styles32.copyBtn, { borderColor: suggestCopied ? tokens.accent : tokens.border, backgroundColor: tokens.surface }],
4933
+ style: [styles33.copyBtn, { borderColor: suggestCopied ? tokens.accent : tokens.border, backgroundColor: tokens.surface }],
4916
4934
  onPress: () => {
4917
4935
  void Clipboard.setStringAsync(suggestText);
4918
4936
  setSuggestCopied(true);
4919
4937
  setTimeout(() => setSuggestCopied(false), 1500);
4920
4938
  },
4921
- children: suggestCopied ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CheckIcon, { size: 15, color: tokens.accent }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CopyIcon, { size: 15, color: tokens["text-2"] })
4939
+ children: suggestCopied ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CheckIcon, { size: 15, color: tokens.accent }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CopyIcon, { size: 15, color: tokens["text-2"] })
4922
4940
  }
4923
4941
  )
4924
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.panelBody, { color: tokens.muted }], children: "Generating suggestion\u2026" }))
4942
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: [styles33.panelBody, { color: tokens.muted }], children: "Generating suggestion\u2026" }))
4925
4943
  ] })
4926
4944
  ] })
4927
4945
  ] });
@@ -4929,19 +4947,19 @@ var AiRow = (0, import_react25.forwardRef)(function AiRow2({ threadId, forumId,
4929
4947
  var AiRow_default = AiRow;
4930
4948
  function AiButton({ label, onPress, active }) {
4931
4949
  const { tokens } = useTheme();
4932
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(GradientBorderPill, { height: 34, borderWidth: 1.3, filled: active, style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
4933
- import_react_native40.Pressable,
4950
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(GradientBorderPill, { height: 34, borderWidth: 1.3, filled: active, style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4951
+ import_react_native41.Pressable,
4934
4952
  {
4935
4953
  onPress,
4936
- style: styles32.aiBtn,
4954
+ style: styles33.aiBtn,
4937
4955
  children: [
4938
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SparkleIcon, { size: 14 }),
4939
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native40.Text, { style: [styles32.aiBtnLabel, { color: tokens.text }], children: label })
4956
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SparkleIcon, { size: 14 }),
4957
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: [styles33.aiBtnLabel, { color: tokens.text }], children: label })
4940
4958
  ]
4941
4959
  }
4942
4960
  ) });
4943
4961
  }
4944
- var styles32 = import_react_native40.StyleSheet.create({
4962
+ var styles33 = import_react_native41.StyleSheet.create({
4945
4963
  sparklePill: { alignSelf: "flex-start" },
4946
4964
  sparkleBtn: { flexDirection: "row", alignItems: "center", gap: 8, paddingHorizontal: 16 },
4947
4965
  sparkleLabel: { fontSize: 13, fontWeight: "600" },
@@ -4972,9 +4990,9 @@ var styles32 = import_react_native40.StyleSheet.create({
4972
4990
  });
4973
4991
 
4974
4992
  // src/thread/CommentComposer.tsx
4975
- var import_react26 = require("react");
4976
- var import_react_native41 = require("react-native");
4977
- var import_jsx_runtime40 = require("react/jsx-runtime");
4993
+ var import_react27 = require("react");
4994
+ var import_react_native42 = require("react-native");
4995
+ var import_jsx_runtime41 = require("react/jsx-runtime");
4978
4996
  function CommentComposer({
4979
4997
  apiUrl,
4980
4998
  forumId,
@@ -4985,10 +5003,10 @@ function CommentComposer({
4985
5003
  submitLabel = "Comment"
4986
5004
  }) {
4987
5005
  const { tokens } = useTheme();
4988
- const [body, setBody] = (0, import_react26.useState)("");
4989
- const [attachments, setAttachments] = (0, import_react26.useState)([]);
4990
- const [submitting, setSubmitting] = (0, import_react26.useState)(false);
4991
- const [uploading, setUploading] = (0, import_react26.useState)(false);
5006
+ const [body, setBody] = (0, import_react27.useState)("");
5007
+ const [attachments, setAttachments] = (0, import_react27.useState)([]);
5008
+ const [submitting, setSubmitting] = (0, import_react27.useState)(false);
5009
+ const [uploading, setUploading] = (0, import_react27.useState)(false);
4992
5010
  const canSubmit = (body.trim().length > 0 || attachments.length > 0) && !submitting && !uploading;
4993
5011
  async function submit() {
4994
5012
  if (!canSubmit) return;
@@ -5001,8 +5019,8 @@ function CommentComposer({
5001
5019
  setSubmitting(false);
5002
5020
  }
5003
5021
  }
5004
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native41.View, { style: { marginTop: 12 }, children: [
5005
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5022
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native42.View, { style: { marginTop: 12 }, children: [
5023
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5006
5024
  RichComposer,
5007
5025
  {
5008
5026
  apiUrl,
@@ -5017,35 +5035,35 @@ function CommentComposer({
5017
5035
  minHeight: 64
5018
5036
  }
5019
5037
  ),
5020
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native41.View, { style: styles33.actions, children: [
5021
- onCancel && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Pressable, { onPress: onCancel, style: [styles33.btn, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: { color: tokens["text-2"], fontWeight: "700", fontSize: 13 }, children: "Cancel" }) }),
5022
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Pressable, { onPress: submit, disabled: !canSubmit, style: [styles33.btn, { backgroundColor: tokens.accent, opacity: canSubmit ? 1 : 0.5 }], children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native41.Text, { style: { color: tokens["accent-fg"], fontWeight: "700", fontSize: 13 }, children: submitting ? "\u2026" : uploading ? "Uploading\u2026" : submitLabel }) })
5038
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native42.View, { style: styles34.actions, children: [
5039
+ onCancel && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.Pressable, { onPress: onCancel, style: [styles34.btn, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.Text, { style: { color: tokens["text-2"], fontWeight: "700", fontSize: 13 }, children: "Cancel" }) }),
5040
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.Pressable, { onPress: submit, disabled: !canSubmit, style: [styles34.btn, { backgroundColor: tokens.accent, opacity: canSubmit ? 1 : 0.5 }], children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.Text, { style: { color: tokens["accent-fg"], fontWeight: "700", fontSize: 13 }, children: submitting ? "\u2026" : uploading ? "Uploading\u2026" : submitLabel }) })
5023
5041
  ] })
5024
5042
  ] });
5025
5043
  }
5026
- var styles33 = import_react_native41.StyleSheet.create({
5044
+ var styles34 = import_react_native42.StyleSheet.create({
5027
5045
  actions: { flexDirection: "row", justifyContent: "flex-end", gap: 8, marginTop: 8 },
5028
5046
  btn: { borderRadius: 999, paddingVertical: 8, paddingHorizontal: 16 }
5029
5047
  });
5030
5048
 
5031
5049
  // src/thread/CommentRow.tsx
5032
- var import_react27 = require("react");
5033
- var import_react_native42 = require("react-native");
5034
- var import_jsx_runtime41 = require("react/jsx-runtime");
5050
+ var import_react28 = require("react");
5051
+ var import_react_native43 = require("react-native");
5052
+ var import_jsx_runtime42 = require("react/jsx-runtime");
5035
5053
  function CommentRow({ node, depth = 0, ctx }) {
5036
5054
  const { tokens } = useTheme();
5037
- const [replyOpen, setReplyOpen] = (0, import_react27.useState)(false);
5038
- const [editOpen, setEditOpen] = (0, import_react27.useState)(false);
5039
- const [editBody, setEditBody] = (0, import_react27.useState)(node.body);
5040
- const [deleteOpen, setDeleteOpen] = (0, import_react27.useState)(false);
5041
- const [menuOpen, setMenuOpen] = (0, import_react27.useState)(false);
5055
+ const [replyOpen, setReplyOpen] = (0, import_react28.useState)(false);
5056
+ const [editOpen, setEditOpen] = (0, import_react28.useState)(false);
5057
+ const [editBody, setEditBody] = (0, import_react28.useState)(node.body);
5058
+ const [deleteOpen, setDeleteOpen] = (0, import_react28.useState)(false);
5059
+ const [menuOpen, setMenuOpen] = (0, import_react28.useState)(false);
5042
5060
  const { ref: ellipsisRef, anchor, measure } = useAnchor();
5043
5061
  const canModify = ctx.currentUserId !== null && (node.authorId === ctx.currentUserId || ctx.isModerator);
5044
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
5045
- import_react_native42.View,
5062
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
5063
+ import_react_native43.View,
5046
5064
  {
5047
5065
  style: [
5048
- styles34.row,
5066
+ styles35.row,
5049
5067
  depth > 0 && { marginLeft: 16, borderLeftWidth: 1, borderLeftColor: tokens.border, paddingLeft: 10 },
5050
5068
  // Wins over the depth>0 border above when both apply (a reply that's
5051
5069
  // also the accepted answer) — the accepted-answer accent is the more
@@ -5059,28 +5077,28 @@ function CommentRow({ node, depth = 0, ctx }) {
5059
5077
  }
5060
5078
  ],
5061
5079
  children: [
5062
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
5063
- import_react_native42.Pressable,
5080
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
5081
+ import_react_native43.Pressable,
5064
5082
  {
5065
- style: styles34.head,
5083
+ style: styles35.head,
5066
5084
  onPress: ctx.onPressAuthor && node.authorId ? () => ctx.onPressAuthor(node.authorId) : void 0,
5067
5085
  disabled: !ctx.onPressAuthor || !node.authorId,
5068
5086
  children: [
5069
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Avatar, { authorId: node.authorId, author: node.author, avatarUrl: node.authorAvatarUrl, size: 24 }),
5070
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.Text, { style: [styles34.author, { color: tokens.text }], children: node.author }),
5071
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native42.Text, { style: [styles34.time, { color: tokens.muted }], children: [
5087
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Avatar, { authorId: node.authorId, author: node.author, avatarUrl: node.authorAvatarUrl, size: 24 }),
5088
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Text, { style: [styles35.author, { color: tokens.text }], children: node.author }),
5089
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native43.Text, { style: [styles35.time, { color: tokens.muted }], children: [
5072
5090
  "\xB7 ",
5073
5091
  node.time
5074
5092
  ] }),
5075
- node.isAcceptedAnswer && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native42.View, { style: [styles34.answerBadge, { backgroundColor: tokens["success-soft-strong"] }], children: [
5076
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CheckIcon, { size: 11, color: tokens.success }),
5077
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.Text, { style: { color: tokens.success, fontSize: 11, fontWeight: "700" }, children: "Answer" })
5093
+ node.isAcceptedAnswer && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native43.View, { style: [styles35.answerBadge, { backgroundColor: tokens["success-soft-strong"] }], children: [
5094
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CheckIcon, { size: 11, color: tokens.success }),
5095
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Text, { style: { color: tokens.success, fontSize: 11, fontWeight: "700" }, children: "Answer" })
5078
5096
  ] })
5079
5097
  ]
5080
5098
  }
5081
5099
  ),
5082
- editOpen ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native42.View, { style: { marginTop: 8, marginLeft: 32 }, children: [
5083
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5100
+ editOpen ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native43.View, { style: { marginTop: 8, marginLeft: 32 }, children: [
5101
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5084
5102
  RichComposer,
5085
5103
  {
5086
5104
  apiUrl: ctx.apiUrl,
@@ -5094,44 +5112,44 @@ function CommentRow({ node, depth = 0, ctx }) {
5094
5112
  allowMedia: false
5095
5113
  }
5096
5114
  ),
5097
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native42.View, { style: styles34.editActions, children: [
5098
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.Pressable, { onPress: () => {
5115
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native43.View, { style: styles35.editActions, children: [
5116
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Pressable, { onPress: () => {
5099
5117
  setEditOpen(false);
5100
5118
  setEditBody(node.body);
5101
- }, style: [styles34.smallBtn, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.Text, { style: { color: tokens["text-2"], fontWeight: "700", fontSize: 12 }, children: "Cancel" }) }),
5102
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5103
- import_react_native42.Pressable,
5119
+ }, style: [styles35.smallBtn, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Text, { style: { color: tokens["text-2"], fontWeight: "700", fontSize: 12 }, children: "Cancel" }) }),
5120
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5121
+ import_react_native43.Pressable,
5104
5122
  {
5105
5123
  onPress: async () => {
5106
5124
  await ctx.onEdit(node.id, editBody.trim());
5107
5125
  setEditOpen(false);
5108
5126
  },
5109
- style: [styles34.smallBtn, { backgroundColor: tokens.accent }],
5110
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.Text, { style: { color: tokens["accent-fg"], fontWeight: "700", fontSize: 12 }, children: "Save" })
5127
+ style: [styles35.smallBtn, { backgroundColor: tokens.accent }],
5128
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Text, { style: { color: tokens["accent-fg"], fontWeight: "700", fontSize: 12 }, children: "Save" })
5111
5129
  }
5112
5130
  )
5113
5131
  ] })
5114
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.View, { style: styles34.body, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RenderedBody, { body: node.body, size: 13.5 }) }),
5115
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native42.View, { style: styles34.actions, children: [
5116
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(VotePill, { voteCounts: node.voteCounts, dir: node.myVote ?? null, onVote: (dir) => ctx.onVote(node.id, dir) }),
5117
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Action, { label: "Reply", onPress: () => setReplyOpen((o) => !o) }),
5118
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Action, { label: node.isSaved ? "Unsave" : "Save", onPress: () => ctx.onSave(node.id, !node.isSaved) }),
5119
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5120
- import_react_native42.Pressable,
5132
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.View, { style: styles35.body, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RenderedBody, { body: node.body, size: 13.5 }) }),
5133
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native43.View, { style: styles35.actions, children: [
5134
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(VotePill, { voteCounts: node.voteCounts, dir: node.myVote ?? null, onVote: (dir) => ctx.onVote(node.id, dir) }),
5135
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Action, { label: "Reply", onPress: () => setReplyOpen((o) => !o) }),
5136
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Action, { label: node.isSaved ? "Unsave" : "Save", onPress: () => ctx.onSave(node.id, !node.isSaved) }),
5137
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5138
+ import_react_native43.Pressable,
5121
5139
  {
5122
5140
  ref: ellipsisRef,
5123
5141
  onPress: () => measure(() => setMenuOpen(true)),
5124
5142
  hitSlop: 6,
5125
- style: [styles34.ellipsisBtn, { backgroundColor: menuOpen ? tokens["hover-2"] : tokens["surface-2"] }],
5126
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(EllipsisIcon, { size: 17, color: tokens["text-2"] })
5143
+ style: [styles35.ellipsisBtn, { backgroundColor: menuOpen ? tokens["hover-2"] : tokens["surface-2"] }],
5144
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(EllipsisIcon, { size: 17, color: tokens["text-2"] })
5127
5145
  }
5128
5146
  )
5129
5147
  ] }),
5130
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(DropdownMenu, { visible: menuOpen, onClose: () => setMenuOpen(false), anchor, width: 170, align: "right", children: [
5131
- canModify && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5148
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(DropdownMenu, { visible: menuOpen, onClose: () => setMenuOpen(false), anchor, width: 170, align: "right", children: [
5149
+ canModify && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5132
5150
  DropdownMenuItem,
5133
5151
  {
5134
- icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PencilIcon, { size: 16, color: tokens["text-2"] }),
5152
+ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PencilIcon, { size: 16, color: tokens["text-2"] }),
5135
5153
  label: "Edit",
5136
5154
  onPress: () => {
5137
5155
  setMenuOpen(false);
@@ -5140,10 +5158,10 @@ function CommentRow({ node, depth = 0, ctx }) {
5140
5158
  }
5141
5159
  }
5142
5160
  ),
5143
- depth === 0 && ctx.canAcceptAnswer && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5161
+ depth === 0 && ctx.canAcceptAnswer && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5144
5162
  DropdownMenuItem,
5145
5163
  {
5146
- icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CheckIcon, { size: 16, color: node.isAcceptedAnswer ? tokens.success : tokens["text-2"] }),
5164
+ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CheckIcon, { size: 16, color: node.isAcceptedAnswer ? tokens.success : tokens["text-2"] }),
5147
5165
  label: node.isAcceptedAnswer ? "Unaccept" : "Accept",
5148
5166
  labelColor: node.isAcceptedAnswer ? tokens.success : void 0,
5149
5167
  onPress: () => {
@@ -5152,10 +5170,10 @@ function CommentRow({ node, depth = 0, ctx }) {
5152
5170
  }
5153
5171
  }
5154
5172
  ),
5155
- depth === 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5173
+ depth === 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5156
5174
  DropdownMenuItem,
5157
5175
  {
5158
- icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ShareIcon, { size: 16, color: tokens["text-2"] }),
5176
+ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ShareIcon, { size: 16, color: tokens["text-2"] }),
5159
5177
  label: "Share",
5160
5178
  onPress: () => {
5161
5179
  setMenuOpen(false);
@@ -5163,10 +5181,10 @@ function CommentRow({ node, depth = 0, ctx }) {
5163
5181
  }
5164
5182
  }
5165
5183
  ),
5166
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5184
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5167
5185
  DropdownMenuItem,
5168
5186
  {
5169
- icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ReportIcon, { size: 16, color: tokens["text-2"] }),
5187
+ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ReportIcon, { size: 16, color: tokens["text-2"] }),
5170
5188
  label: "Report",
5171
5189
  onPress: () => {
5172
5190
  setMenuOpen(false);
@@ -5174,10 +5192,10 @@ function CommentRow({ node, depth = 0, ctx }) {
5174
5192
  }
5175
5193
  }
5176
5194
  ),
5177
- canModify && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5195
+ canModify && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5178
5196
  DropdownMenuItem,
5179
5197
  {
5180
- icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TrashIcon, { size: 16, color: tokens["text-2"] }),
5198
+ icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TrashIcon, { size: 16, color: tokens["text-2"] }),
5181
5199
  label: "Delete",
5182
5200
  onPress: () => {
5183
5201
  setMenuOpen(false);
@@ -5186,7 +5204,7 @@ function CommentRow({ node, depth = 0, ctx }) {
5186
5204
  }
5187
5205
  )
5188
5206
  ] }),
5189
- replyOpen && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.View, { style: { marginLeft: 32 }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5207
+ replyOpen && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.View, { style: { marginLeft: 32 }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5190
5208
  CommentComposer,
5191
5209
  {
5192
5210
  apiUrl: ctx.apiUrl,
@@ -5201,8 +5219,8 @@ function CommentRow({ node, depth = 0, ctx }) {
5201
5219
  onCancel: () => setReplyOpen(false)
5202
5220
  }
5203
5221
  ) }),
5204
- node.replies.map((child) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CommentRow, { node: child, depth: depth + 1, ctx }, child.id)),
5205
- deleteOpen && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5222
+ node.replies.map((child) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CommentRow, { node: child, depth: depth + 1, ctx }, child.id)),
5223
+ deleteOpen && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5206
5224
  ConfirmDialog,
5207
5225
  {
5208
5226
  title: "Delete comment?",
@@ -5220,9 +5238,9 @@ function CommentRow({ node, depth = 0, ctx }) {
5220
5238
  }
5221
5239
  function Action({ label, onPress }) {
5222
5240
  const { tokens } = useTheme();
5223
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.Pressable, { onPress, hitSlop: 6, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native42.Text, { style: { color: tokens.muted, fontSize: 12, fontWeight: "600" }, children: label }) });
5241
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Pressable, { onPress, hitSlop: 6, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Text, { style: { color: tokens.muted, fontSize: 12, fontWeight: "600" }, children: label }) });
5224
5242
  }
5225
- var styles34 = import_react_native42.StyleSheet.create({
5243
+ var styles35 = import_react_native43.StyleSheet.create({
5226
5244
  row: { marginTop: 14 },
5227
5245
  head: { flexDirection: "row", alignItems: "center", gap: 7 },
5228
5246
  author: { fontSize: 13, fontWeight: "700" },
@@ -5245,7 +5263,7 @@ var styles34 = import_react_native42.StyleSheet.create({
5245
5263
  });
5246
5264
 
5247
5265
  // src/screens/ThreadScreen.tsx
5248
- var import_jsx_runtime42 = require("react/jsx-runtime");
5266
+ var import_jsx_runtime43 = require("react/jsx-runtime");
5249
5267
  var COMMENT_SORTS = ["Best", "Top", "Controversial", "Old"];
5250
5268
  var COMMENT_SORT_ICON = {
5251
5269
  Best: RocketIcon,
@@ -5280,31 +5298,31 @@ function ThreadScreen() {
5280
5298
  const token = session.status === "ready" ? session.sessionToken : void 0;
5281
5299
  const currentUserId = session.status === "ready" ? session.userId : null;
5282
5300
  const isModerator = session.status === "ready" && (session.role === "moderator" || session.role === "admin");
5283
- const [thread, setThread] = (0, import_react28.useState)(null);
5284
- const [comments, setComments] = (0, import_react28.useState)([]);
5285
- const [loading, setLoading] = (0, import_react28.useState)(true);
5286
- const [error, setError] = (0, import_react28.useState)(null);
5287
- const [commentSort, setCommentSort] = (0, import_react28.useState)("Best");
5288
- const [search, setSearch] = (0, import_react28.useState)("");
5289
- const [reportTarget, setReportTarget] = (0, import_react28.useState)(null);
5290
- const [shareTarget, setShareTarget] = (0, import_react28.useState)(null);
5291
- const [postEditOpen, setPostEditOpen] = (0, import_react28.useState)(false);
5292
- const [postEditTitle, setPostEditTitle] = (0, import_react28.useState)("");
5293
- const [postEditBody, setPostEditBody] = (0, import_react28.useState)("");
5294
- const [postDeleteOpen, setPostDeleteOpen] = (0, import_react28.useState)(false);
5295
- const [postMenuOpen, setPostMenuOpen] = (0, import_react28.useState)(false);
5296
- const [viewingUserId, setViewingUserId] = (0, import_react28.useState)(null);
5297
- const aiRowRef = (0, import_react28.useRef)(null);
5298
- const scrollRef = (0, import_react28.useRef)(null);
5299
- const scrollHandlerRef = (0, import_react28.useRef)(() => {
5301
+ const [thread, setThread] = (0, import_react29.useState)(null);
5302
+ const [comments, setComments] = (0, import_react29.useState)([]);
5303
+ const [loading, setLoading] = (0, import_react29.useState)(true);
5304
+ const [error, setError] = (0, import_react29.useState)(null);
5305
+ const [commentSort, setCommentSort] = (0, import_react29.useState)("Best");
5306
+ const [search, setSearch] = (0, import_react29.useState)("");
5307
+ const [reportTarget, setReportTarget] = (0, import_react29.useState)(null);
5308
+ const [shareTarget, setShareTarget] = (0, import_react29.useState)(null);
5309
+ const [postEditOpen, setPostEditOpen] = (0, import_react29.useState)(false);
5310
+ const [postEditTitle, setPostEditTitle] = (0, import_react29.useState)("");
5311
+ const [postEditBody, setPostEditBody] = (0, import_react29.useState)("");
5312
+ const [postDeleteOpen, setPostDeleteOpen] = (0, import_react29.useState)(false);
5313
+ const [postMenuOpen, setPostMenuOpen] = (0, import_react29.useState)(false);
5314
+ const [viewingUserId, setViewingUserId] = (0, import_react29.useState)(null);
5315
+ const aiRowRef = (0, import_react29.useRef)(null);
5316
+ const scrollRef = (0, import_react29.useRef)(null);
5317
+ const scrollHandlerRef = (0, import_react29.useRef)(() => {
5300
5318
  });
5301
5319
  const { ref: postMenuRef, anchor: postMenuAnchor, measure: measurePostMenu } = useAnchor();
5302
- const translateX = (0, import_react28.useRef)(new import_react_native43.Animated.Value(0)).current;
5303
- const screenWidth = import_react_native43.Dimensions.get("window").width;
5304
- const swipeRef = (0, import_react28.useRef)({ nextId: nextId2, prevId, threadIds, startX: 0 });
5320
+ const translateX = (0, import_react29.useRef)(new import_react_native44.Animated.Value(0)).current;
5321
+ const screenWidth = import_react_native44.Dimensions.get("window").width;
5322
+ const swipeRef = (0, import_react29.useRef)({ nextId: nextId2, prevId, threadIds, startX: 0 });
5305
5323
  swipeRef.current = { ...swipeRef.current, nextId: nextId2, prevId, threadIds };
5306
- const panResponder = (0, import_react28.useRef)(
5307
- import_react_native43.PanResponder.create({
5324
+ const panResponder = (0, import_react29.useRef)(
5325
+ import_react_native44.PanResponder.create({
5308
5326
  onStartShouldSetPanResponder: (e) => {
5309
5327
  swipeRef.current.startX = e.nativeEvent.pageX;
5310
5328
  return false;
@@ -5320,23 +5338,23 @@ function ThreadScreen() {
5320
5338
  const SWIPE_THRESHOLD = 80;
5321
5339
  const { nextId: n, prevId: p, threadIds: ids } = swipeRef.current;
5322
5340
  if (gesture.dx <= -SWIPE_THRESHOLD && n) {
5323
- import_react_native43.Animated.timing(translateX, { toValue: -screenWidth, duration: 200, easing: import_react_native43.Easing.out(import_react_native43.Easing.cubic), useNativeDriver: false }).start(() => {
5341
+ import_react_native44.Animated.timing(translateX, { toValue: -screenWidth, duration: 200, easing: import_react_native44.Easing.out(import_react_native44.Easing.cubic), useNativeDriver: false }).start(() => {
5324
5342
  navigation.replace("Thread", { threadId: n, threadIds: ids });
5325
5343
  });
5326
5344
  } else if (gesture.dx >= SWIPE_THRESHOLD && p) {
5327
- import_react_native43.Animated.timing(translateX, { toValue: screenWidth, duration: 200, easing: import_react_native43.Easing.out(import_react_native43.Easing.cubic), useNativeDriver: false }).start(() => {
5345
+ import_react_native44.Animated.timing(translateX, { toValue: screenWidth, duration: 200, easing: import_react_native44.Easing.out(import_react_native44.Easing.cubic), useNativeDriver: false }).start(() => {
5328
5346
  navigation.replace("Thread", { threadId: p, threadIds: ids });
5329
5347
  });
5330
5348
  } else {
5331
- import_react_native43.Animated.spring(translateX, { toValue: 0, useNativeDriver: false, bounciness: 6 }).start();
5349
+ import_react_native44.Animated.spring(translateX, { toValue: 0, useNativeDriver: false, bounciness: 6 }).start();
5332
5350
  }
5333
5351
  },
5334
5352
  onPanResponderTerminate: () => {
5335
- import_react_native43.Animated.spring(translateX, { toValue: 0, useNativeDriver: false, bounciness: 6 }).start();
5353
+ import_react_native44.Animated.spring(translateX, { toValue: 0, useNativeDriver: false, bounciness: 6 }).start();
5336
5354
  }
5337
5355
  })
5338
5356
  ).current;
5339
- (0, import_react28.useEffect)(() => {
5357
+ (0, import_react29.useEffect)(() => {
5340
5358
  if (!token) return;
5341
5359
  let cancelled = false;
5342
5360
  setLoading(true);
@@ -5355,7 +5373,7 @@ function ThreadScreen() {
5355
5373
  cancelled = true;
5356
5374
  };
5357
5375
  }, [apiUrl, forumId, threadId, token]);
5358
- const tree = (0, import_react28.useMemo)(() => {
5376
+ const tree = (0, import_react29.useMemo)(() => {
5359
5377
  const built = commentsToCommentTree(comments);
5360
5378
  const filtered = search.trim() ? filterComments(built, search.trim()) : built;
5361
5379
  return sortRoots(filtered, commentSort);
@@ -5458,37 +5476,37 @@ function ThreadScreen() {
5458
5476
  });
5459
5477
  }
5460
5478
  const media = thread?.attachments ?? [];
5461
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Shell, { children: [
5462
- loading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.View, { style: styles35.center, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Mascot, { size: 36 }) }) : error && !thread ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.View, { style: styles35.center, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Text, { style: { color: tokens["text-2"] }, children: error }) }) : thread ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Animated.View, { style: { flex: 1, transform: [{ translateX }] }, ...panResponder.panHandlers, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.KeyboardAvoidingView, { style: { flex: 1 }, behavior: import_react_native43.Platform.OS === "ios" ? "padding" : "height", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
5463
- import_react_native43.ScrollView,
5479
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Shell, { children: [
5480
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.View, { style: styles36.center, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Mascot, { size: 36 }) }) : error && !thread ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.View, { style: styles36.center, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: { color: tokens["text-2"] }, children: error }) }) : thread ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Animated.View, { style: { flex: 1, transform: [{ translateX }] }, ...panResponder.panHandlers, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.KeyboardAvoidingView, { style: { flex: 1 }, behavior: import_react_native44.Platform.OS === "ios" ? "padding" : "height", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
5481
+ import_react_native44.ScrollView,
5464
5482
  {
5465
5483
  ref: scrollRef,
5466
- contentContainerStyle: styles35.content,
5484
+ contentContainerStyle: styles36.content,
5467
5485
  keyboardShouldPersistTaps: "handled",
5468
5486
  onScroll: (e) => scrollHandlerRef.current(e),
5469
5487
  scrollEventThrottle: 16,
5470
5488
  children: [
5471
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(BackRow, { onPress: () => navigation.goBack() }),
5472
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
5473
- import_react_native43.Pressable,
5489
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(BackRow, { onPress: () => navigation.goBack() }),
5490
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
5491
+ import_react_native44.Pressable,
5474
5492
  {
5475
- style: styles35.head,
5493
+ style: styles36.head,
5476
5494
  onPress: () => {
5477
5495
  if (thread.authorId !== currentUserId) setViewingUserId(thread.authorId);
5478
5496
  },
5479
5497
  children: [
5480
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Avatar, { authorId: thread.authorId, author: thread.authorDisplayName ?? "Member", avatarUrl: thread.authorAvatarUrl, size: 26 }),
5481
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Text, { style: [styles35.author, { color: tokens.text }], children: thread.authorDisplayName ?? "Member" }),
5482
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native43.Text, { style: [styles35.time, { color: tokens.muted }], children: [
5498
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Avatar, { authorId: thread.authorId, author: thread.authorDisplayName ?? "Member", avatarUrl: thread.authorAvatarUrl, size: 26 }),
5499
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: [styles36.author, { color: tokens.text }], children: thread.authorDisplayName ?? "Member" }),
5500
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.Text, { style: [styles36.time, { color: tokens.muted }], children: [
5483
5501
  "\xB7 ",
5484
5502
  fmtRelativeTime(thread.createdAt)
5485
5503
  ] })
5486
5504
  ]
5487
5505
  }
5488
5506
  ),
5489
- postEditOpen ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native43.View, { style: { marginBottom: 12 }, children: [
5490
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.TextInput, { value: postEditTitle, onChangeText: setPostEditTitle, style: [styles35.editInput, { color: tokens.text, borderColor: tokens["border-strong"], fontWeight: "700", marginBottom: 12 }] }),
5491
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5507
+ postEditOpen ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.View, { style: { marginBottom: 12 }, children: [
5508
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.TextInput, { value: postEditTitle, onChangeText: setPostEditTitle, style: [styles36.editInput, { color: tokens.text, borderColor: tokens["border-strong"], fontWeight: "700", marginBottom: 12 }] }),
5509
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5492
5510
  RichComposer,
5493
5511
  {
5494
5512
  apiUrl,
@@ -5502,36 +5520,36 @@ function ThreadScreen() {
5502
5520
  allowMedia: false
5503
5521
  }
5504
5522
  ),
5505
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native43.View, { style: styles35.editActions, children: [
5506
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Pressable, { onPress: () => setPostEditOpen(false), style: [styles35.smallBtn, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Text, { style: { color: tokens["text-2"], fontWeight: "700", fontSize: 13 }, children: "Cancel" }) }),
5507
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Pressable, { onPress: savePostEdit, style: [styles35.smallBtn, { backgroundColor: tokens.accent }], children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Text, { style: { color: tokens["accent-fg"], fontWeight: "700", fontSize: 13 }, children: "Save" }) })
5523
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.View, { style: styles36.editActions, children: [
5524
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Pressable, { onPress: () => setPostEditOpen(false), style: [styles36.smallBtn, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: { color: tokens["text-2"], fontWeight: "700", fontSize: 13 }, children: "Cancel" }) }),
5525
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Pressable, { onPress: savePostEdit, style: [styles36.smallBtn, { backgroundColor: tokens.accent }], children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: { color: tokens["accent-fg"], fontWeight: "700", fontSize: 13 }, children: "Save" }) })
5508
5526
  ] })
5509
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
5510
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Text, { style: [styles35.title, { color: tokens.text }], children: thread.title }),
5511
- thread.body.trim().length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.View, { style: { marginBottom: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RenderedBody, { body: thread.body, size: 14.5 }) }),
5512
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MediaGallery, { attachments: media, aspectRatio: 4 / 5, radius: 14 })
5527
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
5528
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: [styles36.title, { color: tokens.text }], children: thread.title }),
5529
+ thread.body.trim().length > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.View, { style: { marginBottom: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(RenderedBody, { body: thread.body, size: 14.5 }) }),
5530
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MediaGallery, { attachments: media, aspectRatio: 4 / 5, radius: 14 })
5513
5531
  ] }),
5514
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native43.View, { style: styles35.actions, children: [
5515
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(VotePill, { voteCounts: thread.voteCounts ?? { up: 0, down: 0 }, dir: thread.myVote ?? null, onVote: votePost }),
5516
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CommentPill, { count: thread.commentCount ?? comments.length }),
5517
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.View, { style: { flex: 1 } }),
5518
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PostAction, { label: "Share", onPress: () => setShareTarget({ kind: "post", id: threadId }) }),
5519
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5520
- import_react_native43.Pressable,
5532
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.View, { style: styles36.actions, children: [
5533
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(VotePill, { voteCounts: thread.voteCounts ?? { up: 0, down: 0 }, dir: thread.myVote ?? null, onVote: votePost }),
5534
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CommentPill, { count: thread.commentCount ?? comments.length }),
5535
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.View, { style: { flex: 1 } }),
5536
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PostAction, { label: "Share", onPress: () => setShareTarget({ kind: "post", id: threadId }) }),
5537
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5538
+ import_react_native44.Pressable,
5521
5539
  {
5522
5540
  ref: postMenuRef,
5523
5541
  onPress: () => measurePostMenu(() => setPostMenuOpen(true)),
5524
5542
  hitSlop: 6,
5525
- style: [styles35.ellipsisBtn, { backgroundColor: postMenuOpen ? tokens["hover-2"] : tokens["surface-2"] }],
5526
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(EllipsisIcon, { size: 17, color: tokens["text-2"] })
5543
+ style: [styles36.ellipsisBtn, { backgroundColor: postMenuOpen ? tokens["hover-2"] : tokens["surface-2"] }],
5544
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EllipsisIcon, { size: 17, color: tokens["text-2"] })
5527
5545
  }
5528
5546
  )
5529
5547
  ] }),
5530
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(DropdownMenu, { visible: postMenuOpen, onClose: () => setPostMenuOpen(false), anchor: postMenuAnchor, width: 150, align: "right", children: [
5531
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5548
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(DropdownMenu, { visible: postMenuOpen, onClose: () => setPostMenuOpen(false), anchor: postMenuAnchor, width: 150, align: "right", children: [
5549
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5532
5550
  DropdownMenuItem,
5533
5551
  {
5534
- icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SaveIcon, { size: 16, color: tokens["text-2"], filled: !!thread.isSaved }),
5552
+ icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SaveIcon, { size: 16, color: tokens["text-2"], filled: !!thread.isSaved }),
5535
5553
  label: thread.isSaved ? "Unsave" : "Save",
5536
5554
  onPress: () => {
5537
5555
  setPostMenuOpen(false);
@@ -5539,10 +5557,10 @@ function ThreadScreen() {
5539
5557
  }
5540
5558
  }
5541
5559
  ),
5542
- canModifyPost && !postEditOpen && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5560
+ canModifyPost && !postEditOpen && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5543
5561
  DropdownMenuItem,
5544
5562
  {
5545
- icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PencilIcon, { size: 16, color: tokens["text-2"] }),
5563
+ icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PencilIcon, { size: 16, color: tokens["text-2"] }),
5546
5564
  label: "Edit",
5547
5565
  onPress: () => {
5548
5566
  setPostMenuOpen(false);
@@ -5552,10 +5570,10 @@ function ThreadScreen() {
5552
5570
  }
5553
5571
  }
5554
5572
  ),
5555
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5573
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5556
5574
  DropdownMenuItem,
5557
5575
  {
5558
- icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ReportIcon, { size: 16, color: tokens["text-2"] }),
5576
+ icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ReportIcon, { size: 16, color: tokens["text-2"] }),
5559
5577
  label: "Report",
5560
5578
  onPress: () => {
5561
5579
  setPostMenuOpen(false);
@@ -5563,10 +5581,10 @@ function ThreadScreen() {
5563
5581
  }
5564
5582
  }
5565
5583
  ),
5566
- canModifyPost && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5584
+ canModifyPost && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5567
5585
  DropdownMenuItem,
5568
5586
  {
5569
- icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TrashIcon, { size: 16, color: tokens["text-2"] }),
5587
+ icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TrashIcon, { size: 16, color: tokens["text-2"] }),
5570
5588
  label: "Delete",
5571
5589
  onPress: () => {
5572
5590
  setPostMenuOpen(false);
@@ -5575,12 +5593,12 @@ function ThreadScreen() {
5575
5593
  }
5576
5594
  )
5577
5595
  ] }),
5578
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AiRow_default, { ref: aiRowRef, threadId, forumId, apiUrl, token }),
5579
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AskAiRegistration, { aiRowRef }),
5580
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ScrollCollapseRegistration, { handlerRef: scrollHandlerRef }),
5581
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CommentComposer, { apiUrl, forumId, token, onSubmit: submitTopLevel }),
5582
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native43.View, { style: styles35.sortRow, children: [
5583
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5596
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AiRow_default, { ref: aiRowRef, threadId, forumId, apiUrl, token }),
5597
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AskAiRegistration, { aiRowRef }),
5598
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ScrollCollapseRegistration, { handlerRef: scrollHandlerRef }),
5599
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CommentComposer, { apiUrl, forumId, token, onSubmit: submitTopLevel }),
5600
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.View, { style: styles36.sortRow, children: [
5601
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5584
5602
  SelectPill,
5585
5603
  {
5586
5604
  value: commentSort,
@@ -5590,22 +5608,22 @@ function ThreadScreen() {
5590
5608
  menuWidth: 160,
5591
5609
  optionIcon: (s) => {
5592
5610
  const Icon = COMMENT_SORT_ICON[s];
5593
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { size: 16, color: tokens["text-2"] });
5611
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { size: 16, color: tokens["text-2"] });
5594
5612
  }
5595
5613
  }
5596
5614
  ),
5597
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native43.View, { style: [styles35.searchPill, { borderColor: tokens["border-strong"] }], children: [
5598
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchIcon, { size: 15, color: tokens.muted }),
5599
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.TextInput, { value: search, onChangeText: setSearch, placeholder: "Search Comments", placeholderTextColor: tokens.muted, style: { flex: 1, color: tokens.text, fontSize: 13, padding: 0 } })
5615
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.View, { style: [styles36.searchPill, { borderColor: tokens["border-strong"] }], children: [
5616
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchIcon, { size: 15, color: tokens.muted }),
5617
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.TextInput, { value: search, onChangeText: setSearch, placeholder: "Search Comments", placeholderTextColor: tokens.muted, style: { flex: 1, color: tokens.text, fontSize: 13, padding: 0 } })
5600
5618
  ] })
5601
5619
  ] }),
5602
- tree.map((node) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CommentRow, { node, ctx }, node.id))
5620
+ tree.map((node) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CommentRow, { node, ctx }, node.id))
5603
5621
  ]
5604
5622
  }
5605
5623
  ) }) }) : null,
5606
- reportTarget && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ReportSheet, { target: reportTarget.kind, onClose: () => setReportTarget(null), onSubmit: submitReport }),
5607
- shareTarget && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ShareSheet, { apiUrl, forumId, token, onClose: () => setShareTarget(null), onShare: submitShare }),
5608
- postDeleteOpen && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5624
+ reportTarget && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ReportSheet, { target: reportTarget.kind, onClose: () => setReportTarget(null), onSubmit: submitReport }),
5625
+ shareTarget && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ShareSheet, { apiUrl, forumId, token, onClose: () => setShareTarget(null), onShare: submitShare }),
5626
+ postDeleteOpen && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5609
5627
  ConfirmDialog,
5610
5628
  {
5611
5629
  title: "Delete post?",
@@ -5618,12 +5636,12 @@ function ThreadScreen() {
5618
5636
  }
5619
5637
  }
5620
5638
  ),
5621
- viewingUserId && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(UserProfileSheet, { userId: viewingUserId, onClose: () => setViewingUserId(null) })
5639
+ viewingUserId && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(UserProfileSheet, { userId: viewingUserId, onClose: () => setViewingUserId(null) })
5622
5640
  ] });
5623
5641
  }
5624
5642
  function AskAiRegistration({ aiRowRef }) {
5625
5643
  const { registerAskHandler } = useShell();
5626
- (0, import_react28.useEffect)(() => {
5644
+ (0, import_react29.useEffect)(() => {
5627
5645
  registerAskHandler(() => aiRowRef.current?.openSummary());
5628
5646
  return () => registerAskHandler(null);
5629
5647
  }, [registerAskHandler, aiRowRef]);
@@ -5635,9 +5653,9 @@ function ScrollCollapseRegistration({ handlerRef }) {
5635
5653
  }
5636
5654
  function PostAction({ label, onPress }) {
5637
5655
  const { tokens } = useTheme();
5638
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Pressable, { onPress, hitSlop: 6, style: [styles35.postActionChip, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native43.Text, { style: { color: tokens["text-2"], fontSize: 13, fontWeight: "700" }, children: label }) });
5656
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Pressable, { onPress, hitSlop: 6, style: [styles36.postActionChip, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: { color: tokens["text-2"], fontSize: 13, fontWeight: "700" }, children: label }) });
5639
5657
  }
5640
- var styles35 = import_react_native43.StyleSheet.create({
5658
+ var styles36 = import_react_native44.StyleSheet.create({
5641
5659
  center: { flex: 1, alignItems: "center", justifyContent: "center", paddingVertical: 40 },
5642
5660
  content: { paddingHorizontal: 16, paddingTop: 12, paddingBottom: 110 },
5643
5661
  head: { flexDirection: "row", alignItems: "center", gap: 7, marginTop: 12, marginBottom: 8 },
@@ -5655,28 +5673,28 @@ var styles35 = import_react_native43.StyleSheet.create({
5655
5673
  });
5656
5674
 
5657
5675
  // src/screens/ProfileScreen.tsx
5658
- var import_react30 = require("react");
5659
- var import_react_native45 = require("react-native");
5676
+ var import_react31 = require("react");
5677
+ var import_react_native46 = require("react-native");
5660
5678
  var import_native6 = require("@react-navigation/native");
5661
5679
 
5662
5680
  // src/profile/EditProfileSheet.tsx
5663
- var import_react29 = require("react");
5664
- var import_react_native44 = require("react-native");
5665
- var import_jsx_runtime43 = require("react/jsx-runtime");
5681
+ var import_react30 = require("react");
5682
+ var import_react_native45 = require("react-native");
5683
+ var import_jsx_runtime44 = require("react/jsx-runtime");
5666
5684
  var nextId = 0;
5667
5685
  function EditProfileSheet({ apiUrl, forumId, token, profile, onClose, onSaved }) {
5668
5686
  const { tokens, mode, toggleTheme } = useTheme();
5669
- const { height: windowHeight } = (0, import_react_native44.useWindowDimensions)();
5687
+ const { height: windowHeight } = (0, import_react_native45.useWindowDimensions)();
5670
5688
  const { maxHeight: sheetMaxHeight, paddingBottom } = useSheetLayout(24);
5671
5689
  const scrollMaxHeight = Math.min(300, windowHeight * 0.34);
5672
- const [name, setName] = (0, import_react29.useState)(profile.displayName);
5673
- const [bio, setBio] = (0, import_react29.useState)(profile.bio ?? "");
5674
- const [links, setLinks] = (0, import_react29.useState)(
5690
+ const [name, setName] = (0, import_react30.useState)(profile.displayName);
5691
+ const [bio, setBio] = (0, import_react30.useState)(profile.bio ?? "");
5692
+ const [links, setLinks] = (0, import_react30.useState)(
5675
5693
  profile.socialLinks.map((l) => ({ id: nextId++, platform: l.platform, suffix: socialToSuffix(l.platform, l.url) }))
5676
5694
  );
5677
- const [saving, setSaving] = (0, import_react29.useState)(false);
5678
- const [error, setError] = (0, import_react29.useState)(null);
5679
- const [openPickerId, setOpenPickerId] = (0, import_react29.useState)(null);
5695
+ const [saving, setSaving] = (0, import_react30.useState)(false);
5696
+ const [error, setError] = (0, import_react30.useState)(null);
5697
+ const [openPickerId, setOpenPickerId] = (0, import_react30.useState)(null);
5680
5698
  function selectPlatform(id, platform) {
5681
5699
  setLinks((prev) => prev.map((l) => l.id === id ? { ...l, platform, suffix: "" } : l));
5682
5700
  setOpenPickerId(null);
@@ -5696,94 +5714,85 @@ function EditProfileSheet({ apiUrl, forumId, token, profile, onClose, onSaved })
5696
5714
  setSaving(false);
5697
5715
  }
5698
5716
  }
5699
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Modal, { transparent: true, visible: true, animationType: "slide", onRequestClose: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.KeyboardAvoidingView, { style: { flex: 1 }, behavior: import_react_native44.Platform.OS === "ios" ? "padding" : "height", children: [
5700
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Pressable, { style: styles36.scrim, onPress: onClose }),
5701
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.View, { style: styles36.sheetWrap, pointerEvents: "box-none", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.View, { style: [styles36.sheet, { backgroundColor: tokens.elev, borderColor: tokens.border, maxHeight: sheetMaxHeight, paddingBottom }], children: [
5702
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.View, { style: styles36.header, children: [
5703
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: [styles36.title, { color: tokens.text }], children: "Edit profile" }),
5704
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Pressable, { onPress: onClose, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CloseIcon, { size: 18, color: tokens.text }) })
5705
- ] }),
5706
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
5707
- import_react_native44.ScrollView,
5708
- {
5709
- style: { maxHeight: scrollMaxHeight, marginRight: -16 },
5710
- contentContainerStyle: { paddingRight: 26 },
5711
- keyboardShouldPersistTaps: "handled",
5712
- children: [
5713
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: [styles36.label, { color: tokens["text-2"] }], children: "Display name" }),
5714
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.TextInput, { value: name, onChangeText: setName, style: [styles36.input, { color: tokens.text, borderColor: tokens["border-strong"] }] }),
5715
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: [styles36.label, { color: tokens["text-2"] }], children: "Bio" }),
5716
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.TextInput, { value: bio, onChangeText: setBio, multiline: true, style: [styles36.input, { color: tokens.text, borderColor: tokens["border-strong"], minHeight: 70, textAlignVertical: "top" }] }),
5717
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: [styles36.label, { color: tokens["text-2"] }], children: "Links" }),
5718
- links.map((link) => {
5719
- const PlatformIcon = SOCIAL_PLATFORM_ICON[link.platform] ?? LinkIcon;
5720
- const prefix = socialPrefix(link.platform).replace("https://", "");
5721
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.View, { style: { marginBottom: 8 }, children: [
5722
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.View, { style: styles36.linkRow, children: [
5723
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
5724
- import_react_native44.Pressable,
5717
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(BottomSheetShell, { visible: true, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.KeyboardAvoidingView, { style: { flex: 1 }, behavior: import_react_native45.Platform.OS === "ios" ? "padding" : "height", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: [styles37.sheet, { backgroundColor: tokens.elev, borderColor: tokens.border, maxHeight: sheetMaxHeight, paddingBottom }], children: [
5718
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: styles37.header, children: [
5719
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: [styles37.title, { color: tokens.text }], children: "Edit profile" }),
5720
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Pressable, { onPress: onClose, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CloseIcon, { size: 18, color: tokens.text }) })
5721
+ ] }),
5722
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
5723
+ import_react_native45.ScrollView,
5724
+ {
5725
+ style: { maxHeight: scrollMaxHeight, marginRight: -16 },
5726
+ contentContainerStyle: { paddingRight: 26 },
5727
+ keyboardShouldPersistTaps: "handled",
5728
+ children: [
5729
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: [styles37.label, { color: tokens["text-2"] }], children: "Display name" }),
5730
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.TextInput, { value: name, onChangeText: setName, style: [styles37.input, { color: tokens.text, borderColor: tokens["border-strong"] }] }),
5731
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: [styles37.label, { color: tokens["text-2"] }], children: "Bio" }),
5732
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.TextInput, { value: bio, onChangeText: setBio, multiline: true, style: [styles37.input, { color: tokens.text, borderColor: tokens["border-strong"], minHeight: 70, textAlignVertical: "top" }] }),
5733
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: [styles37.label, { color: tokens["text-2"] }], children: "Links" }),
5734
+ links.map((link) => {
5735
+ const PlatformIcon = SOCIAL_PLATFORM_ICON[link.platform] ?? LinkIcon;
5736
+ const prefix = socialPrefix(link.platform).replace("https://", "");
5737
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: { marginBottom: 8 }, children: [
5738
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: styles37.linkRow, children: [
5739
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
5740
+ import_react_native45.Pressable,
5741
+ {
5742
+ onPress: () => setOpenPickerId((id) => id === link.id ? null : link.id),
5743
+ style: [styles37.platBtn, { backgroundColor: tokens["surface-2"] }],
5744
+ children: [
5745
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PlatformIcon, { size: 17, color: tokens.text }),
5746
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ChevronDownIcon, { size: 11, color: tokens.muted })
5747
+ ]
5748
+ }
5749
+ ),
5750
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: [styles37.linkUrlWrap, { borderColor: tokens["border-strong"] }], children: [
5751
+ prefix.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: { color: tokens.muted, fontSize: 12.5 }, children: prefix }),
5752
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5753
+ import_react_native45.TextInput,
5725
5754
  {
5726
- onPress: () => setOpenPickerId((id) => id === link.id ? null : link.id),
5727
- style: [styles36.platBtn, { backgroundColor: tokens["surface-2"] }],
5728
- children: [
5729
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PlatformIcon, { size: 17, color: tokens.text }),
5730
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ChevronDownIcon, { size: 11, color: tokens.muted })
5731
- ]
5755
+ value: link.suffix,
5756
+ onChangeText: (v) => setLinks((prev) => prev.map((l) => l.id === link.id ? { ...l, suffix: v } : l)),
5757
+ placeholder: socialPlaceholder(link.platform),
5758
+ placeholderTextColor: tokens.muted,
5759
+ autoCapitalize: "none",
5760
+ style: { flex: 1, color: tokens.text, fontSize: 13, padding: 0 }
5732
5761
  }
5733
- ),
5734
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.View, { style: [styles36.linkUrlWrap, { borderColor: tokens["border-strong"] }], children: [
5735
- prefix.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: { color: tokens.muted, fontSize: 12.5 }, children: prefix }),
5736
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5737
- import_react_native44.TextInput,
5738
- {
5739
- value: link.suffix,
5740
- onChangeText: (v) => setLinks((prev) => prev.map((l) => l.id === link.id ? { ...l, suffix: v } : l)),
5741
- placeholder: socialPlaceholder(link.platform),
5742
- placeholderTextColor: tokens.muted,
5743
- autoCapitalize: "none",
5744
- style: { flex: 1, color: tokens.text, fontSize: 13, padding: 0 }
5745
- }
5746
- )
5747
- ] }),
5748
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Pressable, { onPress: () => setLinks((prev) => prev.filter((l) => l.id !== link.id)), hitSlop: 6, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CloseIcon, { size: 16, color: tokens.muted }) })
5762
+ )
5749
5763
  ] }),
5750
- openPickerId === link.id && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.View, { style: [styles36.platformGrid, { backgroundColor: tokens["surface-2"], borderColor: tokens["border-strong"] }], children: SOCIAL_PLATFORMS.map((p) => {
5751
- const OptIcon = SOCIAL_PLATFORM_ICON[p] ?? LinkIcon;
5752
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5753
- import_react_native44.Pressable,
5754
- {
5755
- onPress: () => selectPlatform(link.id, p),
5756
- style: [styles36.platformOption, link.platform === p && { backgroundColor: tokens["hover-2"] }],
5757
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(OptIcon, { size: 18, color: tokens.text })
5758
- },
5759
- p
5760
- );
5761
- }) })
5762
- ] }, link.id);
5763
- }),
5764
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Pressable, { onPress: () => setLinks((prev) => [...prev, { id: nextId++, platform: "Website", suffix: "" }]), style: styles36.addLink, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: { color: tokens.accent, fontSize: 13, fontWeight: "600" }, children: "+ Add link" }) }),
5765
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.Pressable, { onPress: toggleTheme, style: [styles36.themeRow, { borderColor: tokens.border }], children: [
5766
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: { color: tokens.text, fontSize: 14 }, children: "Display mode" }),
5767
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native44.View, { style: { flexDirection: "row", alignItems: "center", gap: 6 }, children: [
5768
- mode === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MoonIcon, { size: 16, color: tokens["text-2"] }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SunIcon, { size: 16, color: tokens["text-2"] }),
5769
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: { color: tokens["text-2"], fontSize: 13 }, children: mode === "dark" ? "Dark" : "Light" })
5770
- ] })
5771
- ] }),
5772
- error && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: { color: tokens.up, fontSize: 13, marginTop: 8 }, children: error })
5773
- ]
5774
- }
5775
- ),
5776
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Pressable, { onPress: save, disabled: saving, style: [styles36.saveBtn, { backgroundColor: tokens.accent, opacity: saving ? 0.5 : 1 }], children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_native44.Text, { style: { color: tokens["accent-fg"], fontWeight: "700", fontSize: 14 }, children: saving ? "Saving\u2026" : "Save" }) })
5777
- ] }) })
5778
- ] }) });
5764
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Pressable, { onPress: () => setLinks((prev) => prev.filter((l) => l.id !== link.id)), hitSlop: 6, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CloseIcon, { size: 16, color: tokens.muted }) })
5765
+ ] }),
5766
+ openPickerId === link.id && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.View, { style: [styles37.platformGrid, { backgroundColor: tokens["surface-2"], borderColor: tokens["border-strong"] }], children: SOCIAL_PLATFORMS.map((p) => {
5767
+ const OptIcon = SOCIAL_PLATFORM_ICON[p] ?? LinkIcon;
5768
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5769
+ import_react_native45.Pressable,
5770
+ {
5771
+ onPress: () => selectPlatform(link.id, p),
5772
+ style: [styles37.platformOption, link.platform === p && { backgroundColor: tokens["hover-2"] }],
5773
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(OptIcon, { size: 18, color: tokens.text })
5774
+ },
5775
+ p
5776
+ );
5777
+ }) })
5778
+ ] }, link.id);
5779
+ }),
5780
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Pressable, { onPress: () => setLinks((prev) => [...prev, { id: nextId++, platform: "Website", suffix: "" }]), style: styles37.addLink, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: { color: tokens.accent, fontSize: 13, fontWeight: "600" }, children: "+ Add link" }) }),
5781
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.Pressable, { onPress: toggleTheme, style: [styles37.themeRow, { borderColor: tokens.border }], children: [
5782
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: { color: tokens.text, fontSize: 14 }, children: "Display mode" }),
5783
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: { flexDirection: "row", alignItems: "center", gap: 6 }, children: [
5784
+ mode === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(MoonIcon, { size: 16, color: tokens["text-2"] }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SunIcon, { size: 16, color: tokens["text-2"] }),
5785
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: { color: tokens["text-2"], fontSize: 13 }, children: mode === "dark" ? "Dark" : "Light" })
5786
+ ] })
5787
+ ] }),
5788
+ error && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: { color: tokens.up, fontSize: 13, marginTop: 8 }, children: error })
5789
+ ]
5790
+ }
5791
+ ),
5792
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Pressable, { onPress: save, disabled: saving, style: [styles37.saveBtn, { backgroundColor: tokens.accent, opacity: saving ? 0.5 : 1 }], children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: { color: tokens["accent-fg"], fontWeight: "700", fontSize: 14 }, children: saving ? "Saving\u2026" : "Save" }) })
5793
+ ] }) }) });
5779
5794
  }
5780
- var styles36 = import_react_native44.StyleSheet.create({
5781
- // Full-screen dim backdrop, a sibling of sheetWrap below rather than its
5782
- // parent — see the comment above where it's rendered.
5783
- scrim: { ...import_react_native44.StyleSheet.absoluteFill, backgroundColor: "rgba(0,0,0,0.5)" },
5784
- // Positions the sheet at the bottom; box-none means it never itself
5785
- // intercepts a touch, so a tap above the sheet reaches the scrim behind it.
5786
- sheetWrap: { flex: 1, justifyContent: "flex-end" },
5795
+ var styles37 = import_react_native45.StyleSheet.create({
5787
5796
  sheet: { borderTopWidth: 1, borderTopLeftRadius: 18, borderTopRightRadius: 18, paddingHorizontal: 16, paddingTop: 16, overflow: "hidden" },
5788
5797
  header: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", marginBottom: 12 },
5789
5798
  title: { fontSize: 16, fontWeight: "800" },
@@ -5800,7 +5809,7 @@ var styles36 = import_react_native44.StyleSheet.create({
5800
5809
  });
5801
5810
 
5802
5811
  // src/screens/ProfileScreen.tsx
5803
- var import_jsx_runtime44 = require("react/jsx-runtime");
5812
+ var import_jsx_runtime45 = require("react/jsx-runtime");
5804
5813
  function ProfileBody() {
5805
5814
  const { tokens } = useTheme();
5806
5815
  const session = useSession();
@@ -5808,17 +5817,17 @@ function ProfileBody() {
5808
5817
  const { openComposer } = useShell();
5809
5818
  const { apiUrl, forumId } = session;
5810
5819
  const token = session.status === "ready" ? session.sessionToken : void 0;
5811
- const [profile, setProfile] = (0, import_react30.useState)(null);
5812
- const [loading, setLoading] = (0, import_react30.useState)(true);
5813
- const [activeTab, setActiveTab] = (0, import_react30.useState)("Overview");
5814
- const [activity, setActivity] = (0, import_react30.useState)([]);
5815
- const [activityLoading, setActivityLoading] = (0, import_react30.useState)(false);
5816
- const [editOpen, setEditOpen] = (0, import_react30.useState)(false);
5817
- const [reportId, setReportId] = (0, import_react30.useState)(null);
5818
- const [shareId, setShareId] = (0, import_react30.useState)(null);
5819
- const [imageUploading, setImageUploading] = (0, import_react30.useState)(null);
5820
- const [previewUri, setPreviewUri] = (0, import_react30.useState)(null);
5821
- (0, import_react30.useEffect)(() => {
5820
+ const [profile, setProfile] = (0, import_react31.useState)(null);
5821
+ const [loading, setLoading] = (0, import_react31.useState)(true);
5822
+ const [activeTab, setActiveTab] = (0, import_react31.useState)("Overview");
5823
+ const [activity, setActivity] = (0, import_react31.useState)([]);
5824
+ const [activityLoading, setActivityLoading] = (0, import_react31.useState)(false);
5825
+ const [editOpen, setEditOpen] = (0, import_react31.useState)(false);
5826
+ const [reportId, setReportId] = (0, import_react31.useState)(null);
5827
+ const [shareId, setShareId] = (0, import_react31.useState)(null);
5828
+ const [imageUploading, setImageUploading] = (0, import_react31.useState)(null);
5829
+ const [previewUri, setPreviewUri] = (0, import_react31.useState)(null);
5830
+ (0, import_react31.useEffect)(() => {
5822
5831
  if (!token) return;
5823
5832
  let cancelled = false;
5824
5833
  setLoading(true);
@@ -5831,7 +5840,7 @@ function ProfileBody() {
5831
5840
  cancelled = true;
5832
5841
  };
5833
5842
  }, [apiUrl, forumId, token]);
5834
- (0, import_react30.useEffect)(() => {
5843
+ (0, import_react31.useEffect)(() => {
5835
5844
  if (!token) return;
5836
5845
  let cancelled = false;
5837
5846
  setActivityLoading(true);
@@ -5847,7 +5856,7 @@ function ProfileBody() {
5847
5856
  cancelled = true;
5848
5857
  };
5849
5858
  }, [apiUrl, forumId, activeTab, token]);
5850
- const updateThreadRow = (0, import_react30.useCallback)((id, fn) => {
5859
+ const updateThreadRow = (0, import_react31.useCallback)((id, fn) => {
5851
5860
  setActivity((prev) => prev.map((a) => a.kind === "thread" && a.row.id === id ? { kind: "thread", row: fn(a.row) } : a));
5852
5861
  }, []);
5853
5862
  function onVote(row, dir) {
@@ -5882,75 +5891,75 @@ function ProfileBody() {
5882
5891
  }, token);
5883
5892
  setProfile((p) => p ? { ...p, ...updated } : p);
5884
5893
  } catch (e) {
5885
- import_react_native45.Alert.alert("Update failed", e instanceof Error ? e.message : `Couldn't update your ${kind}. Please try again.`);
5894
+ import_react_native46.Alert.alert("Update failed", e instanceof Error ? e.message : `Couldn't update your ${kind}. Please try again.`);
5886
5895
  } finally {
5887
5896
  setImageUploading(null);
5888
5897
  }
5889
5898
  }
5890
- if (loading) return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.View, { style: styles37.center, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Mascot, { size: 36 }) });
5899
+ if (loading) return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.View, { style: styles38.center, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Mascot, { size: 36 }) });
5891
5900
  const name = profile?.displayName ?? "You";
5892
5901
  const copy = profileEmptyCopy(activeTab);
5893
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.ScrollView, { contentContainerStyle: styles37.content, children: [
5894
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
5895
- import_react_native45.Pressable,
5902
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.ScrollView, { contentContainerStyle: styles38.content, children: [
5903
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
5904
+ import_react_native46.Pressable,
5896
5905
  {
5897
5906
  onPress: () => profile?.bannerUrl && setPreviewUri(profile.bannerUrl),
5898
5907
  disabled: !profile?.bannerUrl,
5899
- style: [styles37.banner, { backgroundColor: tokens["surface-2"] }],
5908
+ style: [styles38.banner, { backgroundColor: tokens["surface-2"] }],
5900
5909
  children: [
5901
- profile?.bannerUrl != null && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Image, { source: { uri: profile.bannerUrl }, style: import_react_native45.StyleSheet.absoluteFill }),
5902
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Pressable, { onPress: () => void editImage("banner"), disabled: imageUploading != null, style: [styles37.bannerCam, { backgroundColor: tokens.elev }], children: imageUploading === "banner" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.ActivityIndicator, { size: "small", color: tokens["text-2"] }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CameraIcon, { size: 14, color: tokens["text-2"] }) }),
5903
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: styles37.avatarWrap, children: [
5904
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5905
- import_react_native45.Pressable,
5910
+ profile?.bannerUrl != null && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Image, { source: { uri: profile.bannerUrl }, style: import_react_native46.StyleSheet.absoluteFill }),
5911
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Pressable, { onPress: () => void editImage("banner"), disabled: imageUploading != null, style: [styles38.bannerCam, { backgroundColor: tokens.elev }], children: imageUploading === "banner" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.ActivityIndicator, { size: "small", color: tokens["text-2"] }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CameraIcon, { size: 14, color: tokens["text-2"] }) }),
5912
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: styles38.avatarWrap, children: [
5913
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
5914
+ import_react_native46.Pressable,
5906
5915
  {
5907
5916
  onPress: () => profile?.avatarUrl && setPreviewUri(profile.avatarUrl),
5908
5917
  disabled: !profile?.avatarUrl,
5909
- style: [styles37.avatarRing, { borderColor: tokens.bg }],
5910
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Avatar, { authorId: profile?.id, author: name, avatarUrl: profile?.avatarUrl, size: 72 })
5918
+ style: [styles38.avatarRing, { borderColor: tokens.bg }],
5919
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Avatar, { authorId: profile?.id, author: name, avatarUrl: profile?.avatarUrl, size: 72 })
5911
5920
  }
5912
5921
  ),
5913
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Pressable, { onPress: () => void editImage("avatar"), disabled: imageUploading != null, style: [styles37.avatarCam, { backgroundColor: tokens.accent }], children: imageUploading === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.ActivityIndicator, { size: "small", color: tokens["accent-fg"] }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CameraIcon, { size: 12, color: tokens["accent-fg"] }) })
5922
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Pressable, { onPress: () => void editImage("avatar"), disabled: imageUploading != null, style: [styles38.avatarCam, { backgroundColor: tokens.accent }], children: imageUploading === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.ActivityIndicator, { size: "small", color: tokens["accent-fg"] }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CameraIcon, { size: 12, color: tokens["accent-fg"] }) })
5914
5923
  ] })
5915
5924
  ]
5916
5925
  }
5917
5926
  ),
5918
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: { paddingHorizontal: 16 }, children: [
5919
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: styles37.nameRow, children: [
5920
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: { flex: 1 }, children: [
5921
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: [styles37.name, { color: tokens.text }], children: name }),
5922
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.Text, { style: [styles37.handle, { color: tokens.muted }], children: [
5927
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: { paddingHorizontal: 16 }, children: [
5928
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: styles38.nameRow, children: [
5929
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: { flex: 1 }, children: [
5930
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.name, { color: tokens.text }], children: name }),
5931
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.Text, { style: [styles38.handle, { color: tokens.muted }], children: [
5923
5932
  "/",
5924
5933
  name
5925
5934
  ] })
5926
5935
  ] }),
5927
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: { flexDirection: "row", gap: 8 }, children: [
5928
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Pressable, { onPress: openComposer, hitSlop: 8, style: styles37.editIconBtn, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PlusIcon, { size: 16, color: tokens.text }) }),
5929
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Pressable, { onPress: () => setEditOpen(true), hitSlop: 8, style: styles37.editIconBtn, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PencilIcon, { size: 15, color: tokens.text }) })
5936
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: { flexDirection: "row", gap: 8 }, children: [
5937
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Pressable, { onPress: openComposer, hitSlop: 8, style: styles38.editIconBtn, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PlusIcon, { size: 16, color: tokens.text }) }),
5938
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Pressable, { onPress: () => setEditOpen(true), hitSlop: 8, style: styles38.editIconBtn, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PencilIcon, { size: 15, color: tokens.text }) })
5930
5939
  ] })
5931
5940
  ] }),
5932
- profile?.bio != null && profile.bio.trim().length > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: [styles37.bio, { color: tokens["text-2"] }], children: profile.bio }),
5933
- profile && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SocialLinks, { links: profile.socialLinks, onEditProfile: () => setEditOpen(true) })
5941
+ profile?.bio != null && profile.bio.trim().length > 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.bio, { color: tokens["text-2"] }], children: profile.bio }),
5942
+ profile && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SocialLinks, { links: profile.socialLinks, onEditProfile: () => setEditOpen(true) })
5934
5943
  ] }),
5935
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: [styles37.karmaRow, { borderTopColor: tokens.border }], children: [
5936
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: styles37.karmaBlock, children: [
5937
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: [styles37.karmaValue, { color: tokens.text }], children: (profile?.postKarma ?? 0).toLocaleString() }),
5938
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: [styles37.karmaLabel, { color: tokens.muted }], children: "Post Karma" })
5944
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: [styles38.karmaRow, { borderTopColor: tokens.border }], children: [
5945
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: styles38.karmaBlock, children: [
5946
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.karmaValue, { color: tokens.text }], children: (profile?.postKarma ?? 0).toLocaleString() }),
5947
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.karmaLabel, { color: tokens.muted }], children: "Post Karma" })
5939
5948
  ] }),
5940
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.View, { style: [styles37.karmaDivider, { backgroundColor: tokens.border }] }),
5941
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: styles37.karmaBlock, children: [
5942
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: [styles37.karmaValue, { color: tokens.text }], children: (profile?.commentKarma ?? 0).toLocaleString() }),
5943
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: [styles37.karmaLabel, { color: tokens.muted }], children: "Comment Karma" })
5949
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.View, { style: [styles38.karmaDivider, { backgroundColor: tokens.border }] }),
5950
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: styles38.karmaBlock, children: [
5951
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.karmaValue, { color: tokens.text }], children: (profile?.commentKarma ?? 0).toLocaleString() }),
5952
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.karmaLabel, { color: tokens.muted }], children: "Comment Karma" })
5944
5953
  ] })
5945
5954
  ] }),
5946
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.View, { style: [styles37.divider, { backgroundColor: tokens.border }] }),
5947
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.View, { style: { marginTop: 6, marginBottom: 14 }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TabPills, { tabs: PROFILE_TABS, active: activeTab, onSelect: setActiveTab }) }),
5948
- activityLoading ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.View, { style: { alignItems: "center", paddingVertical: 30 }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Mascot, { size: 36 }) }) : activity.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native45.View, { style: styles37.empty, children: [
5949
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Mascot, { size: 88, animated: false, badge: false }),
5950
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: [styles37.emptyTitle, { color: tokens.text }], children: copy.title }),
5951
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: [styles37.emptyDesc, { color: tokens.muted }], children: copy.description }),
5952
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Pressable, { onPress: () => setEditOpen(true), style: [styles37.settingsBtn, { backgroundColor: tokens.text }], children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.Text, { style: { color: tokens.bg, fontSize: 13.5, fontWeight: "700" }, children: "Update Settings" }) })
5953
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native45.View, { style: { paddingHorizontal: 16 }, children: activity.map((a, i) => a.kind === "thread" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5955
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.View, { style: [styles38.divider, { backgroundColor: tokens.border }] }),
5956
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.View, { style: { marginTop: 6, marginBottom: 14 }, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TabPills, { tabs: PROFILE_TABS, active: activeTab, onSelect: setActiveTab }) }),
5957
+ activityLoading ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.View, { style: { alignItems: "center", paddingVertical: 30 }, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Mascot, { size: 36 }) }) : activity.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: styles38.empty, children: [
5958
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Mascot, { size: 88, animated: false, badge: false }),
5959
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.emptyTitle, { color: tokens.text }], children: copy.title }),
5960
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.emptyDesc, { color: tokens.muted }], children: copy.description }),
5961
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Pressable, { onPress: () => setEditOpen(true), style: [styles38.settingsBtn, { backgroundColor: tokens.text }], children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: { color: tokens.bg, fontSize: 13.5, fontWeight: "700" }, children: "Update Settings" }) })
5962
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.View, { style: { paddingHorizontal: 16 }, children: activity.map((a, i) => a.kind === "thread" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
5954
5963
  PostRow,
5955
5964
  {
5956
5965
  row: a.row,
@@ -5962,7 +5971,7 @@ function ProfileBody() {
5962
5971
  onShare: () => setShareId(a.row.id)
5963
5972
  },
5964
5973
  `t-${a.row.id}-${i}`
5965
- ) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5974
+ ) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
5966
5975
  ProfileCommentCard,
5967
5976
  {
5968
5977
  comment: a.comment,
@@ -5972,7 +5981,7 @@ function ProfileBody() {
5972
5981
  },
5973
5982
  `c-${a.comment.id}-${i}`
5974
5983
  )) }),
5975
- editOpen && profile && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5984
+ editOpen && profile && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
5976
5985
  EditProfileSheet,
5977
5986
  {
5978
5987
  apiUrl,
@@ -5986,21 +5995,21 @@ function ProfileBody() {
5986
5995
  }
5987
5996
  }
5988
5997
  ),
5989
- reportId && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ReportSheet, { target: "post", onClose: () => setReportId(null), onSubmit: (reason) => {
5998
+ reportId && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ReportSheet, { target: "post", onClose: () => setReportId(null), onSubmit: (reason) => {
5990
5999
  if (token) void reportThread(apiUrl, forumId, reportId, reason, token).catch(() => {
5991
6000
  });
5992
6001
  } }),
5993
- shareId && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ShareSheet, { apiUrl, forumId, token, onClose: () => setShareId(null), onShare: (ids) => {
6002
+ shareId && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ShareSheet, { apiUrl, forumId, token, onClose: () => setShareId(null), onShare: (ids) => {
5994
6003
  if (token && ids.length) void shareThreadWithUsers(apiUrl, forumId, shareId, ids, void 0, token).catch(() => {
5995
6004
  });
5996
6005
  } }),
5997
- previewUri && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ImageLightbox, { uri: previewUri, onClose: () => setPreviewUri(null) })
6006
+ previewUri && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ImageLightbox, { uri: previewUri, onClose: () => setPreviewUri(null) })
5998
6007
  ] });
5999
6008
  }
6000
6009
  function ProfileScreen() {
6001
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Shell, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ProfileBody, {}) });
6010
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Shell, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ProfileBody, {}) });
6002
6011
  }
6003
- var styles37 = import_react_native45.StyleSheet.create({
6012
+ var styles38 = import_react_native46.StyleSheet.create({
6004
6013
  center: { flex: 1, alignItems: "center", justifyContent: "center" },
6005
6014
  content: { paddingBottom: 110 },
6006
6015
  banner: { height: 120, marginBottom: 44, position: "relative" },
@@ -6032,52 +6041,52 @@ var styles37 = import_react_native45.StyleSheet.create({
6032
6041
  });
6033
6042
 
6034
6043
  // src/screens/SearchScreen.tsx
6035
- var import_react31 = require("react");
6036
- var import_react_native46 = require("react-native");
6044
+ var import_react32 = require("react");
6045
+ var import_react_native47 = require("react-native");
6037
6046
  var import_native7 = require("@react-navigation/native");
6038
- var import_jsx_runtime45 = require("react/jsx-runtime");
6047
+ var import_jsx_runtime46 = require("react/jsx-runtime");
6039
6048
  var TABS2 = ["All", "Threads", "Comments", "Profiles", "Media"];
6040
6049
  var PREVIEW_LIMIT = 5;
6041
6050
  var FULL_LIMIT = 20;
6042
6051
  function ThreadRow({ r, onPress }) {
6043
6052
  const { tokens } = useTheme();
6044
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.Pressable, { onPress, style: [styles38.row, { borderBottomColor: tokens.border }], children: [
6045
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: styles38.rowHead, children: [
6046
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Avatar, { authorId: r.authorId, author: r.authorDisplayName, avatarUrl: r.authorAvatarUrl, size: 20 }),
6047
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.author, { color: tokens.text }], children: r.authorDisplayName }),
6048
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.Text, { style: [styles38.time, { color: tokens.muted }], children: [
6053
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Pressable, { onPress, style: [styles39.row, { borderBottomColor: tokens.border }], children: [
6054
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: styles39.rowHead, children: [
6055
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Avatar, { authorId: r.authorId, author: r.authorDisplayName, avatarUrl: r.authorAvatarUrl, size: 20 }),
6056
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.author, { color: tokens.text }], children: r.authorDisplayName }),
6057
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.time, { color: tokens.muted }], children: [
6049
6058
  "\xB7 ",
6050
6059
  fmtRelativeTime(r.createdAt)
6051
6060
  ] })
6052
6061
  ] }),
6053
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: styles38.rowBody, children: [
6054
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: { flex: 1 }, children: [
6055
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.title, { color: tokens.text }], numberOfLines: 2, children: r.title }),
6056
- r.bodySnippet ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.snippet, { color: tokens["text-2"] }], numberOfLines: 2, children: r.bodySnippet }) : null,
6057
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.Text, { style: [styles38.meta, { color: tokens.muted }], children: [
6062
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: styles39.rowBody, children: [
6063
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: { flex: 1 }, children: [
6064
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.title, { color: tokens.text }], numberOfLines: 2, children: r.title }),
6065
+ r.bodySnippet ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.snippet, { color: tokens["text-2"] }], numberOfLines: 2, children: r.bodySnippet }) : null,
6066
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.meta, { color: tokens.muted }], children: [
6058
6067
  r.voteCounts.up - r.voteCounts.down,
6059
6068
  " votes \xB7 ",
6060
6069
  r.commentCount,
6061
6070
  " comments"
6062
6071
  ] })
6063
6072
  ] }),
6064
- r.imageUrl != null && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Thumbnail, { imageUrl: r.imageUrl, square: 64, radius: 10 })
6073
+ r.imageUrl != null && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Thumbnail, { imageUrl: r.imageUrl, square: 64, radius: 10 })
6065
6074
  ] })
6066
6075
  ] });
6067
6076
  }
6068
6077
  function CommentResultRow({ r, onPress }) {
6069
6078
  const { tokens } = useTheme();
6070
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.Pressable, { onPress, style: [styles38.row, { borderBottomColor: tokens.border }], children: [
6071
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: styles38.rowHead, children: [
6072
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Avatar, { authorId: r.authorId, author: r.authorDisplayName, avatarUrl: r.authorAvatarUrl, size: 20 }),
6073
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.author, { color: tokens.text }], children: r.authorDisplayName }),
6074
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.Text, { style: [styles38.time, { color: tokens.muted }], children: [
6079
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Pressable, { onPress, style: [styles39.row, { borderBottomColor: tokens.border }], children: [
6080
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: styles39.rowHead, children: [
6081
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Avatar, { authorId: r.authorId, author: r.authorDisplayName, avatarUrl: r.authorAvatarUrl, size: 20 }),
6082
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.author, { color: tokens.text }], children: r.authorDisplayName }),
6083
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.time, { color: tokens.muted }], children: [
6075
6084
  "\xB7 ",
6076
6085
  fmtRelativeTime(r.createdAt)
6077
6086
  ] })
6078
6087
  ] }),
6079
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.snippet, { color: tokens["text-2"] }], numberOfLines: 3, children: r.bodySnippet }),
6080
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.Text, { style: [styles38.meta, { color: tokens.muted }], numberOfLines: 1, children: [
6088
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.snippet, { color: tokens["text-2"] }], numberOfLines: 3, children: r.bodySnippet }),
6089
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.meta, { color: tokens.muted }], numberOfLines: 1, children: [
6081
6090
  "in: ",
6082
6091
  r.threadTitle
6083
6092
  ] })
@@ -6085,11 +6094,11 @@ function CommentResultRow({ r, onPress }) {
6085
6094
  }
6086
6095
  function ProfileRow({ r }) {
6087
6096
  const { tokens } = useTheme();
6088
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.View, { style: [styles38.row, { borderBottomColor: tokens.border }], children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: styles38.profileRow, children: [
6089
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Avatar, { authorId: r.id, author: r.displayName, avatarUrl: r.avatarUrl, size: 36 }),
6090
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { children: [
6091
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.author, { color: tokens.text, fontSize: 14 }], children: r.displayName }),
6092
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.Text, { style: [styles38.meta, { color: tokens.muted, marginTop: 2 }], children: [
6097
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.View, { style: [styles39.row, { borderBottomColor: tokens.border }], children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: styles39.profileRow, children: [
6098
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Avatar, { authorId: r.id, author: r.displayName, avatarUrl: r.avatarUrl, size: 36 }),
6099
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { children: [
6100
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.author, { color: tokens.text, fontSize: 14 }], children: r.displayName }),
6101
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.meta, { color: tokens.muted, marginTop: 2 }], children: [
6093
6102
  r.karma,
6094
6103
  " karma"
6095
6104
  ] })
@@ -6098,9 +6107,9 @@ function ProfileRow({ r }) {
6098
6107
  }
6099
6108
  function SectionHeader({ title, onSeeAll }) {
6100
6109
  const { tokens } = useTheme();
6101
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.View, { style: styles38.sectionHead, children: [
6102
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.sectionTitle, { color: tokens.text }], children: title }),
6103
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Pressable, { onPress: onSeeAll, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ChevronRightIcon, { size: 16, color: tokens.accent }) })
6110
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: styles39.sectionHead, children: [
6111
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.sectionTitle, { color: tokens.text }], children: title }),
6112
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Pressable, { onPress: onSeeAll, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ChevronRightIcon, { size: 16, color: tokens.accent }) })
6104
6113
  ] });
6105
6114
  }
6106
6115
  function SearchBody() {
@@ -6112,13 +6121,13 @@ function SearchBody() {
6112
6121
  const query = route.params.query;
6113
6122
  const { apiUrl, forumId } = session;
6114
6123
  const token = session.status === "ready" ? session.sessionToken : void 0;
6115
- const [tab, setTab] = (0, import_react31.useState)("All");
6116
- const [threads, setThreads] = (0, import_react31.useState)([]);
6117
- const [comments, setComments] = (0, import_react31.useState)([]);
6118
- const [users, setUsers] = (0, import_react31.useState)([]);
6119
- const [loading, setLoading] = (0, import_react31.useState)(true);
6120
- const [querySuggestion, setQuerySuggestion] = (0, import_react31.useState)({ query: null, isRelated: false });
6121
- (0, import_react31.useEffect)(() => {
6124
+ const [tab, setTab] = (0, import_react32.useState)("All");
6125
+ const [threads, setThreads] = (0, import_react32.useState)([]);
6126
+ const [comments, setComments] = (0, import_react32.useState)([]);
6127
+ const [users, setUsers] = (0, import_react32.useState)([]);
6128
+ const [loading, setLoading] = (0, import_react32.useState)(true);
6129
+ const [querySuggestion, setQuerySuggestion] = (0, import_react32.useState)({ query: null, isRelated: false });
6130
+ (0, import_react32.useEffect)(() => {
6122
6131
  if (!token) return;
6123
6132
  let cancelled = false;
6124
6133
  setLoading(true);
@@ -6171,59 +6180,59 @@ function SearchBody() {
6171
6180
  const showComments = tab === "All" || tab === "Comments";
6172
6181
  const showProfiles = tab === "All" || tab === "Profiles";
6173
6182
  const showMedia = tab === "All" || tab === "Media";
6174
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.ScrollView, { contentContainerStyle: styles38.content, onScroll, scrollEventThrottle: 16, children: [
6175
- querySuggestion.isRelated && querySuggestion.query && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6176
- import_react_native46.Pressable,
6183
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.ScrollView, { contentContainerStyle: styles39.content, onScroll, scrollEventThrottle: 16, children: [
6184
+ querySuggestion.isRelated && querySuggestion.query && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6185
+ import_react_native47.Pressable,
6177
6186
  {
6178
- style: styles38.suggestionBanner,
6187
+ style: styles39.suggestionBanner,
6179
6188
  onPress: () => navigation.navigate("Search", { query: querySuggestion.query }),
6180
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.Text, { style: [styles38.suggestionBannerText, { color: tokens["text-2"] }], children: [
6189
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.suggestionBannerText, { color: tokens["text-2"] }], children: [
6181
6190
  'No results for "',
6182
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: { fontWeight: "700" }, children: query }),
6191
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: { fontWeight: "700" }, children: query }),
6183
6192
  '". Showing related results for ',
6184
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: { color: tokens.accent, fontWeight: "500" }, children: querySuggestion.query })
6193
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: { color: tokens.accent, fontWeight: "500" }, children: querySuggestion.query })
6185
6194
  ] })
6186
6195
  }
6187
6196
  ),
6188
- !querySuggestion.isRelated && querySuggestion.query && querySuggestion.query.toLowerCase() !== query.toLowerCase() && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6189
- import_react_native46.Pressable,
6197
+ !querySuggestion.isRelated && querySuggestion.query && querySuggestion.query.toLowerCase() !== query.toLowerCase() && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6198
+ import_react_native47.Pressable,
6190
6199
  {
6191
- style: styles38.suggestionBanner,
6200
+ style: styles39.suggestionBanner,
6192
6201
  onPress: () => navigation.navigate("Search", { query: querySuggestion.query }),
6193
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.Text, { style: [styles38.suggestionBannerText, { color: tokens["text-2"] }], children: [
6202
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.suggestionBannerText, { color: tokens["text-2"] }], children: [
6194
6203
  "Did you mean: ",
6195
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: { color: tokens.accent, fontWeight: "500" }, children: querySuggestion.query }),
6204
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: { color: tokens.accent, fontWeight: "500" }, children: querySuggestion.query }),
6196
6205
  "?"
6197
6206
  ] })
6198
6207
  }
6199
6208
  ),
6200
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TabPills, { tabs: TABS2, active: tab, onSelect: (t) => switchTab(t) }),
6201
- loading ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.View, { style: { alignItems: "center", marginTop: 40 }, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Mascot, { size: 32 }) }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
6202
- showThreads && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
6203
- tab === "All" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SectionHeader, { title: "Threads", onSeeAll: () => switchTab("Threads") }),
6204
- threads.length === 0 ? tab !== "All" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.empty, { color: tokens["text-2"] }], children: "No thread results" }) : threads.map((r) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ThreadRow, { r, onPress: () => navigation.navigate("Thread", { threadId: r.threadId }) }, r.threadId))
6209
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TabPills, { tabs: TABS2, active: tab, onSelect: (t) => switchTab(t) }),
6210
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.View, { style: { alignItems: "center", marginTop: 40 }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Mascot, { size: 32 }) }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6211
+ showThreads && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6212
+ tab === "All" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SectionHeader, { title: "Threads", onSeeAll: () => switchTab("Threads") }),
6213
+ threads.length === 0 ? tab !== "All" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.empty, { color: tokens["text-2"] }], children: "No thread results" }) : threads.map((r) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ThreadRow, { r, onPress: () => navigation.navigate("Thread", { threadId: r.threadId }) }, r.threadId))
6205
6214
  ] }),
6206
- showComments && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
6207
- tab === "All" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SectionHeader, { title: "Comments", onSeeAll: () => switchTab("Comments") }),
6208
- comments.length === 0 ? tab !== "All" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.empty, { color: tokens["text-2"] }], children: "No comment results" }) : comments.map((r) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CommentResultRow, { r, onPress: () => navigation.navigate("Thread", { threadId: r.threadId }) }, r.commentId))
6215
+ showComments && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6216
+ tab === "All" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SectionHeader, { title: "Comments", onSeeAll: () => switchTab("Comments") }),
6217
+ comments.length === 0 ? tab !== "All" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.empty, { color: tokens["text-2"] }], children: "No comment results" }) : comments.map((r) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CommentResultRow, { r, onPress: () => navigation.navigate("Thread", { threadId: r.threadId }) }, r.commentId))
6209
6218
  ] }),
6210
- showProfiles && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
6211
- tab === "All" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SectionHeader, { title: "Profiles", onSeeAll: () => switchTab("Profiles") }),
6212
- users.length === 0 ? tab !== "All" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.empty, { color: tokens["text-2"] }], children: "No profile results" }) : users.map((r) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ProfileRow, { r }, r.id))
6219
+ showProfiles && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6220
+ tab === "All" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SectionHeader, { title: "Profiles", onSeeAll: () => switchTab("Profiles") }),
6221
+ users.length === 0 ? tab !== "All" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.empty, { color: tokens["text-2"] }], children: "No profile results" }) : users.map((r) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ProfileRow, { r }, r.id))
6213
6222
  ] }),
6214
- showMedia && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
6215
- tab === "All" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SectionHeader, { title: "Media", onSeeAll: () => switchTab("Media") }),
6216
- mediaThreads.length === 0 ? tab !== "All" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.Text, { style: [styles38.empty, { color: tokens["text-2"] }], children: "No media results" }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native46.View, { style: styles38.mediaGrid, children: mediaThreads.map((r) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6217
- import_react_native46.Pressable,
6223
+ showMedia && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6224
+ tab === "All" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SectionHeader, { title: "Media", onSeeAll: () => switchTab("Media") }),
6225
+ mediaThreads.length === 0 ? tab !== "All" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.empty, { color: tokens["text-2"] }], children: "No media results" }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.View, { style: styles39.mediaGrid, children: mediaThreads.map((r) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6226
+ import_react_native47.Pressable,
6218
6227
  {
6219
- style: styles38.mediaCell,
6228
+ style: styles39.mediaCell,
6220
6229
  onPress: () => navigation.navigate("Thread", { threadId: r.threadId }),
6221
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Thumbnail, { imageUrl: r.imageUrl, radius: 10, style: { width: "100%", aspectRatio: 1 } })
6230
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Thumbnail, { imageUrl: r.imageUrl, radius: 10, style: { width: "100%", aspectRatio: 1 } })
6222
6231
  },
6223
6232
  r.threadId
6224
6233
  )) })
6225
6234
  ] }),
6226
- tab === "All" && !loading && threads.length === 0 && comments.length === 0 && users.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native46.Text, { style: [styles38.empty, { color: tokens["text-2"] }], children: [
6235
+ tab === "All" && !loading && threads.length === 0 && comments.length === 0 && users.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.empty, { color: tokens["text-2"] }], children: [
6227
6236
  'No results for "',
6228
6237
  query,
6229
6238
  '"'
@@ -6232,9 +6241,9 @@ function SearchBody() {
6232
6241
  ] });
6233
6242
  }
6234
6243
  function SearchScreen() {
6235
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Shell, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SearchBody, {}) });
6244
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Shell, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SearchBody, {}) });
6236
6245
  }
6237
- var styles38 = import_react_native46.StyleSheet.create({
6246
+ var styles39 = import_react_native47.StyleSheet.create({
6238
6247
  content: { paddingTop: 16, paddingBottom: 110 },
6239
6248
  sectionHead: {
6240
6249
  flexDirection: "row",
@@ -6262,18 +6271,18 @@ var styles38 = import_react_native46.StyleSheet.create({
6262
6271
  });
6263
6272
 
6264
6273
  // src/screens/SearchInputScreen.tsx
6265
- var import_react32 = require("react");
6266
- var import_react_native47 = require("react-native");
6274
+ var import_react33 = require("react");
6275
+ var import_react_native48 = require("react-native");
6267
6276
  var import_react_native_svg5 = __toESM(require("react-native-svg"));
6268
6277
  var import_react_native_safe_area_context9 = require("react-native-safe-area-context");
6269
6278
  var import_native8 = require("@react-navigation/native");
6270
6279
  var import_async_storage2 = __toESM(require("@react-native-async-storage/async-storage"));
6271
- var import_jsx_runtime46 = require("react/jsx-runtime");
6272
- var AnimatedRect = import_react_native47.Animated.createAnimatedComponent(import_react_native_svg5.Rect);
6280
+ var import_jsx_runtime47 = require("react/jsx-runtime");
6281
+ var AnimatedRect = import_react_native48.Animated.createAnimatedComponent(import_react_native_svg5.Rect);
6273
6282
  var HISTORY_KEY = "fk_search_history";
6274
6283
  var MAX_HISTORY = 10;
6275
6284
  var DEBOUNCE_MS = 300;
6276
- var ANDROID_TOP_EXTRA5 = import_react_native47.Platform.OS === "android" ? 12 : 0;
6285
+ var ANDROID_TOP_EXTRA5 = import_react_native48.Platform.OS === "android" ? 12 : 0;
6277
6286
  async function loadHistory() {
6278
6287
  try {
6279
6288
  const raw = await import_async_storage2.default.getItem(HISTORY_KEY);
@@ -6307,16 +6316,16 @@ function SearchInputScreen() {
6307
6316
  const session = useSession();
6308
6317
  const { apiUrl, forumId } = session;
6309
6318
  const token = session.status === "ready" ? session.sessionToken : void 0;
6310
- const [query, setQuery] = (0, import_react32.useState)("");
6311
- const [aiMode, setAiMode] = (0, import_react32.useState)(false);
6312
- const [askPillSize, setAskPillSize] = (0, import_react32.useState)({ w: 0, h: 0 });
6313
- const [history, setHistory] = (0, import_react32.useState)([]);
6314
- const [latestPosts, setLatestPosts] = (0, import_react32.useState)([]);
6315
- const [liveThreads, setLiveThreads] = (0, import_react32.useState)([]);
6316
- const [liveComments, setLiveComments] = (0, import_react32.useState)([]);
6317
- const [searching, setSearching] = (0, import_react32.useState)(false);
6318
- const debounceRef = (0, import_react32.useRef)(null);
6319
- (0, import_react32.useEffect)(() => {
6319
+ const [query, setQuery] = (0, import_react33.useState)("");
6320
+ const [aiMode, setAiMode] = (0, import_react33.useState)(false);
6321
+ const [askPillSize, setAskPillSize] = (0, import_react33.useState)({ w: 0, h: 0 });
6322
+ const [history, setHistory] = (0, import_react33.useState)([]);
6323
+ const [latestPosts, setLatestPosts] = (0, import_react33.useState)([]);
6324
+ const [liveThreads, setLiveThreads] = (0, import_react33.useState)([]);
6325
+ const [liveComments, setLiveComments] = (0, import_react33.useState)([]);
6326
+ const [searching, setSearching] = (0, import_react33.useState)(false);
6327
+ const debounceRef = (0, import_react33.useRef)(null);
6328
+ (0, import_react33.useEffect)(() => {
6320
6329
  void loadHistory().then(setHistory);
6321
6330
  if (!token) return;
6322
6331
  void listThreads(apiUrl, forumId, token, { sort: "new", limit: 8 }).then((r) => setLatestPosts(r.threads)).catch(() => {
@@ -6325,7 +6334,7 @@ function SearchInputScreen() {
6325
6334
  function handleAskPress() {
6326
6335
  setAiMode((prev) => !prev);
6327
6336
  }
6328
- const runLiveSearch = (0, import_react32.useCallback)((q) => {
6337
+ const runLiveSearch = (0, import_react33.useCallback)((q) => {
6329
6338
  if (!token || !q.trim()) {
6330
6339
  setLiveThreads([]);
6331
6340
  setLiveComments([]);
@@ -6384,14 +6393,14 @@ function SearchInputScreen() {
6384
6393
  }
6385
6394
  const isEmpty = !query.trim();
6386
6395
  const canSubmit = !!query.trim();
6387
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: [styles39.root, { backgroundColor: tokens.bg }], children: [
6388
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.View, { style: { height: insets.top + ANDROID_TOP_EXTRA5 } }),
6389
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: [styles39.searchBox, { backgroundColor: mode === "dark" ? tokens.surface : "#dde1e6" }], children: [
6390
- aiMode && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SearchBoxGlowBorder, {}),
6391
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: styles39.searchTop, children: [
6392
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Pressable, { onPress: () => navigation.goBack(), hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.View, { style: { transform: [{ scaleX: -1 }] }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ArrowRightIcon, { size: 20, color: tokens.text }) }) }),
6393
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6394
- import_react_native47.TextInput,
6396
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: [styles40.root, { backgroundColor: tokens.bg }], children: [
6397
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.View, { style: { height: insets.top + ANDROID_TOP_EXTRA5 } }),
6398
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: [styles40.searchBox, { backgroundColor: mode === "dark" ? tokens.surface : "#dde1e6" }], children: [
6399
+ aiMode && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SearchBoxGlowBorder, {}),
6400
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.searchTop, children: [
6401
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Pressable, { onPress: () => navigation.goBack(), hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.View, { style: { transform: [{ scaleX: -1 }] }, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ArrowRightIcon, { size: 20, color: tokens.text }) }) }),
6402
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6403
+ import_react_native48.TextInput,
6395
6404
  {
6396
6405
  value: query,
6397
6406
  onChangeText: handleQueryChange,
@@ -6400,27 +6409,27 @@ function SearchInputScreen() {
6400
6409
  autoFocus: true,
6401
6410
  placeholder: "Search",
6402
6411
  placeholderTextColor: tokens.faint,
6403
- style: [styles39.searchInput, { color: tokens.text }]
6412
+ style: [styles40.searchInput, { color: tokens.text }]
6404
6413
  }
6405
6414
  ),
6406
- query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Pressable, { onPress: clearQuery, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.clearBtn, { color: tokens.muted }], children: "\u2715" }) })
6415
+ query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Pressable, { onPress: clearQuery, hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.clearBtn, { color: tokens.muted }], children: "\u2715" }) })
6407
6416
  ] }),
6408
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: styles39.searchBottom, children: [
6409
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
6410
- import_react_native47.Pressable,
6417
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.searchBottom, children: [
6418
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
6419
+ import_react_native48.Pressable,
6411
6420
  {
6412
- style: [styles39.askPill, { backgroundColor: aiMode ? "#7b5cff11" : tokens["surface-2"] }],
6421
+ style: [styles40.askPill, { backgroundColor: aiMode ? "#7b5cff11" : tokens["surface-2"] }],
6413
6422
  onPress: handleAskPress,
6414
6423
  hitSlop: 6,
6415
6424
  onLayout: (e) => setAskPillSize({ w: e.nativeEvent.layout.width, h: e.nativeEvent.layout.height }),
6416
6425
  children: [
6417
- aiMode && askPillSize.w > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native_svg5.default, { width: askPillSize.w, height: askPillSize.h, style: import_react_native47.StyleSheet.absoluteFill, children: [
6418
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native_svg5.Defs, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native_svg5.LinearGradient, { id: "fkAskPillGrad", x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
6419
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native_svg5.Stop, { offset: "0", stopColor: "#3f7ee2" }),
6420
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native_svg5.Stop, { offset: "0.55", stopColor: "#7b5cff" }),
6421
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native_svg5.Stop, { offset: "1", stopColor: "#37e0e6" })
6426
+ aiMode && askPillSize.w > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native_svg5.default, { width: askPillSize.w, height: askPillSize.h, style: import_react_native48.StyleSheet.absoluteFill, children: [
6427
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native_svg5.Defs, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native_svg5.LinearGradient, { id: "fkAskPillGrad", x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
6428
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native_svg5.Stop, { offset: "0", stopColor: "#3f7ee2" }),
6429
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native_svg5.Stop, { offset: "0.55", stopColor: "#7b5cff" }),
6430
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native_svg5.Stop, { offset: "1", stopColor: "#37e0e6" })
6422
6431
  ] }) }),
6423
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6432
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6424
6433
  import_react_native_svg5.Rect,
6425
6434
  {
6426
6435
  x: 0.75,
@@ -6435,52 +6444,52 @@ function SearchInputScreen() {
6435
6444
  }
6436
6445
  )
6437
6446
  ] }),
6438
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SparkleIcon, { size: 14 }),
6439
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.askLabel, { color: aiMode ? "#7b5cff" : tokens["text-2"] }], children: "Ask" })
6447
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SparkleIcon, { size: 14 }),
6448
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.askLabel, { color: aiMode ? "#7b5cff" : tokens["text-2"] }], children: "Ask" })
6440
6449
  ]
6441
6450
  }
6442
6451
  ),
6443
- aiMode && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.askHint, { color: tokens.muted }], numberOfLines: 1, children: "summarise the top conversations" }),
6444
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6445
- import_react_native47.Pressable,
6452
+ aiMode && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.askHint, { color: tokens.muted }], numberOfLines: 1, children: "summarise the top conversations" }),
6453
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6454
+ import_react_native48.Pressable,
6446
6455
  {
6447
- style: [styles39.submitBtn, { backgroundColor: tokens.accent, opacity: canSubmit ? 1 : 0.35 }],
6456
+ style: [styles40.submitBtn, { backgroundColor: tokens.accent, opacity: canSubmit ? 1 : 0.35 }],
6448
6457
  onPress: () => submit(query),
6449
6458
  hitSlop: 6,
6450
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ChevronRightIcon, { size: 18, color: "#fff" })
6459
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ChevronRightIcon, { size: 18, color: "#fff" })
6451
6460
  }
6452
6461
  )
6453
6462
  ] })
6454
6463
  ] }),
6455
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.KeyboardAvoidingView, { behavior: import_react_native47.Platform.OS === "ios" ? "padding" : void 0, style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.ScrollView, { keyboardShouldPersistTaps: "handled", contentContainerStyle: styles39.body, children: isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6456
- history.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6457
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.sectionTitle, { color: tokens["text-2"] }], children: "Recent" }),
6458
- history.map((q) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: styles39.historyRow, children: [
6459
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Pressable, { style: styles39.historyMain, onPress: () => handleHistoryTap(q), children: [
6460
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ClockIcon, { size: 15, color: tokens.muted }),
6461
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.historyText, { color: tokens["text-2"] }], numberOfLines: 1, children: q })
6464
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.KeyboardAvoidingView, { behavior: import_react_native48.Platform.OS === "ios" ? "padding" : void 0, style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.ScrollView, { keyboardShouldPersistTaps: "handled", contentContainerStyle: styles40.body, children: isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
6465
+ history.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
6466
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.sectionTitle, { color: tokens["text-2"] }], children: "Recent" }),
6467
+ history.map((q) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.historyRow, children: [
6468
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.Pressable, { style: styles40.historyMain, onPress: () => handleHistoryTap(q), children: [
6469
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ClockIcon, { size: 15, color: tokens.muted }),
6470
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.historyText, { color: tokens["text-2"] }], numberOfLines: 1, children: q })
6462
6471
  ] }),
6463
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Pressable, { onPress: () => void handleRemoveHistory(q), hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.historyClear, { color: tokens.muted }], children: "\u2715" }) })
6472
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Pressable, { onPress: () => void handleRemoveHistory(q), hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.historyClear, { color: tokens.muted }], children: "\u2715" }) })
6464
6473
  ] }, q))
6465
6474
  ] }),
6466
- latestPosts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6467
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.sectionTitle, { color: tokens["text-2"], marginTop: history.length > 0 ? 28 : 0 }], children: "Latest" }),
6468
- latestPosts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LatestRow, { thread: t, onPress: () => navigation.navigate("Thread", { threadId: t.id }) }, t.id))
6475
+ latestPosts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
6476
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.sectionTitle, { color: tokens["text-2"], marginTop: history.length > 0 ? 28 : 0 }], children: "Latest" }),
6477
+ latestPosts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LatestRow, { thread: t, onPress: () => navigation.navigate("Thread", { threadId: t.id }) }, t.id))
6469
6478
  ] }),
6470
- history.length === 0 && latestPosts.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: styles39.empty, children: [
6471
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Mascot, { size: 32 }),
6472
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.emptyText, { color: tokens["text-2"] }], children: "Search posts, comments, and people" })
6479
+ history.length === 0 && latestPosts.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.empty, children: [
6480
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Mascot, { size: 32 }),
6481
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.emptyText, { color: tokens["text-2"] }], children: "Search posts, comments, and people" })
6473
6482
  ] })
6474
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children: !(searching && liveThreads.length === 0 && liveComments.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6475
- liveThreads.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6476
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.sectionTitle, { color: tokens["text-2"] }], children: "Threads" }),
6477
- liveThreads.map((r) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LiveThreadRow, { r, onPress: () => handleResultTap(r.threadId, query) }, r.threadId))
6483
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: !(searching && liveThreads.length === 0 && liveComments.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
6484
+ liveThreads.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
6485
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.sectionTitle, { color: tokens["text-2"] }], children: "Threads" }),
6486
+ liveThreads.map((r) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LiveThreadRow, { r, onPress: () => handleResultTap(r.threadId, query) }, r.threadId))
6478
6487
  ] }),
6479
- liveComments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6480
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.sectionTitle, { color: tokens["text-2"], marginTop: liveThreads.length > 0 ? 24 : 0 }], children: "Comments" }),
6481
- liveComments.map((r) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LiveCommentRow, { r, onPress: () => handleResultTap(r.threadId, query) }, r.commentId))
6488
+ liveComments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
6489
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.sectionTitle, { color: tokens["text-2"], marginTop: liveThreads.length > 0 ? 24 : 0 }], children: "Comments" }),
6490
+ liveComments.map((r) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LiveCommentRow, { r, onPress: () => handleResultTap(r.threadId, query) }, r.commentId))
6482
6491
  ] }),
6483
- !searching && liveThreads.length === 0 && liveComments.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.noResults, { color: tokens["text-2"] }], children: [
6492
+ !searching && liveThreads.length === 0 && liveComments.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.Text, { style: [styles40.noResults, { color: tokens["text-2"] }], children: [
6484
6493
  'No results for "',
6485
6494
  query,
6486
6495
  '"'
@@ -6492,34 +6501,34 @@ var _glowBorderCtr = 0;
6492
6501
  var BOX_H = 110;
6493
6502
  var BOX_RX = 25.25;
6494
6503
  function SearchBoxGlowBorder() {
6495
- const [w, setW] = (0, import_react32.useState)(0);
6496
- const dashOffset = (0, import_react32.useRef)(new import_react_native47.Animated.Value(0)).current;
6497
- const gradId = (0, import_react32.useRef)(`fkSiGlow${++_glowBorderCtr}`).current;
6498
- (0, import_react32.useEffect)(() => {
6504
+ const [w, setW] = (0, import_react33.useState)(0);
6505
+ const dashOffset = (0, import_react33.useRef)(new import_react_native48.Animated.Value(0)).current;
6506
+ const gradId = (0, import_react33.useRef)(`fkSiGlow${++_glowBorderCtr}`).current;
6507
+ (0, import_react33.useEffect)(() => {
6499
6508
  if (w === 0) return;
6500
6509
  const perim2 = 2 * (w - 2 * BOX_RX) + 2 * (BOX_H - 2 * BOX_RX) + 2 * Math.PI * BOX_RX;
6501
6510
  dashOffset.setValue(0);
6502
- const loop = import_react_native47.Animated.loop(
6503
- import_react_native47.Animated.timing(dashOffset, { toValue: -perim2, duration: 1600, easing: import_react_native47.Easing.linear, useNativeDriver: false })
6511
+ const loop = import_react_native48.Animated.loop(
6512
+ import_react_native48.Animated.timing(dashOffset, { toValue: -perim2, duration: 1600, easing: import_react_native48.Easing.linear, useNativeDriver: false })
6504
6513
  );
6505
6514
  loop.start();
6506
6515
  return () => loop.stop();
6507
6516
  }, [w, dashOffset]);
6508
6517
  const perim = w > 0 ? 2 * (w - 2 * BOX_RX) + 2 * (BOX_H - 2 * BOX_RX) + 2 * Math.PI * BOX_RX : 0;
6509
6518
  const segLen = perim * 0.16;
6510
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6511
- import_react_native47.View,
6519
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6520
+ import_react_native48.View,
6512
6521
  {
6513
- style: [import_react_native47.StyleSheet.absoluteFill, { borderRadius: 26 }],
6522
+ style: [import_react_native48.StyleSheet.absoluteFill, { borderRadius: 26 }],
6514
6523
  pointerEvents: "none",
6515
6524
  onLayout: (e) => setW(e.nativeEvent.layout.width),
6516
- children: w > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native_svg5.default, { width: w, height: BOX_H, style: import_react_native47.StyleSheet.absoluteFill, children: [
6517
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native_svg5.Defs, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native_svg5.LinearGradient, { id: gradId, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
6518
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native_svg5.Stop, { offset: "0", stopColor: "#3f7ee2" }),
6519
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native_svg5.Stop, { offset: "0.55", stopColor: "#7b5cff" }),
6520
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native_svg5.Stop, { offset: "1", stopColor: "#37e0e6" })
6525
+ children: w > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native_svg5.default, { width: w, height: BOX_H, style: import_react_native48.StyleSheet.absoluteFill, children: [
6526
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native_svg5.Defs, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native_svg5.LinearGradient, { id: gradId, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
6527
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native_svg5.Stop, { offset: "0", stopColor: "#3f7ee2" }),
6528
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native_svg5.Stop, { offset: "0.55", stopColor: "#7b5cff" }),
6529
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native_svg5.Stop, { offset: "1", stopColor: "#37e0e6" })
6521
6530
  ] }) }),
6522
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6531
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6523
6532
  import_react_native_svg5.Rect,
6524
6533
  {
6525
6534
  x: 0.75,
@@ -6534,7 +6543,7 @@ function SearchBoxGlowBorder() {
6534
6543
  opacity: 1
6535
6544
  }
6536
6545
  ),
6537
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6546
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6538
6547
  AnimatedRect,
6539
6548
  {
6540
6549
  x: 0.75,
@@ -6557,51 +6566,51 @@ function SearchBoxGlowBorder() {
6557
6566
  }
6558
6567
  function LatestRow({ thread, onPress }) {
6559
6568
  const { tokens } = useTheme();
6560
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Pressable, { onPress, style: styles39.latestRow, children: [
6561
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: styles39.rowHead, children: [
6562
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Avatar, { authorId: thread.authorId, author: thread.authorDisplayName ?? "Unknown", avatarUrl: thread.authorAvatarUrl ?? null, size: 18 }),
6563
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.rowAuthor, { color: tokens["text-2"] }], children: thread.authorDisplayName ?? "Unknown" }),
6564
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.rowTime, { color: tokens.muted }], children: [
6569
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.Pressable, { onPress, style: styles40.latestRow, children: [
6570
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.rowHead, children: [
6571
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Avatar, { authorId: thread.authorId, author: thread.authorDisplayName ?? "Unknown", avatarUrl: thread.authorAvatarUrl ?? null, size: 18 }),
6572
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.rowAuthor, { color: tokens["text-2"] }], children: thread.authorDisplayName ?? "Unknown" }),
6573
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.Text, { style: [styles40.rowTime, { color: tokens.muted }], children: [
6565
6574
  "\xB7 ",
6566
6575
  fmtRelativeTime(thread.createdAt)
6567
6576
  ] })
6568
6577
  ] }),
6569
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.rowTitle, { color: tokens.text }], numberOfLines: 2, children: thread.title })
6578
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.rowTitle, { color: tokens.text }], numberOfLines: 2, children: thread.title })
6570
6579
  ] });
6571
6580
  }
6572
6581
  function LiveThreadRow({ r, onPress }) {
6573
6582
  const { tokens } = useTheme();
6574
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Pressable, { onPress, style: [styles39.row, { borderBottomColor: tokens.border }], children: [
6575
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: styles39.rowHead, children: [
6576
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Avatar, { authorId: r.authorId, author: r.authorDisplayName, avatarUrl: r.authorAvatarUrl, size: 18 }),
6577
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.rowAuthor, { color: tokens["text-2"] }], children: r.authorDisplayName }),
6578
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.rowTime, { color: tokens.muted }], children: [
6583
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.Pressable, { onPress, style: [styles40.row, { borderBottomColor: tokens.border }], children: [
6584
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.rowHead, children: [
6585
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Avatar, { authorId: r.authorId, author: r.authorDisplayName, avatarUrl: r.authorAvatarUrl, size: 18 }),
6586
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.rowAuthor, { color: tokens["text-2"] }], children: r.authorDisplayName }),
6587
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.Text, { style: [styles40.rowTime, { color: tokens.muted }], children: [
6579
6588
  "\xB7 ",
6580
6589
  fmtRelativeTime(r.createdAt)
6581
6590
  ] })
6582
6591
  ] }),
6583
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.rowTitle, { color: tokens.text }], numberOfLines: 2, children: r.title })
6592
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.rowTitle, { color: tokens.text }], numberOfLines: 2, children: r.title })
6584
6593
  ] });
6585
6594
  }
6586
6595
  function LiveCommentRow({ r, onPress }) {
6587
6596
  const { tokens } = useTheme();
6588
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Pressable, { onPress, style: [styles39.row, { borderBottomColor: tokens.border }], children: [
6589
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.View, { style: styles39.rowHead, children: [
6590
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Avatar, { authorId: r.authorId, author: r.authorDisplayName, avatarUrl: r.authorAvatarUrl, size: 18 }),
6591
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.rowAuthor, { color: tokens["text-2"] }], children: r.authorDisplayName }),
6592
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.rowTime, { color: tokens.muted }], children: [
6597
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.Pressable, { onPress, style: [styles40.row, { borderBottomColor: tokens.border }], children: [
6598
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.rowHead, children: [
6599
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Avatar, { authorId: r.authorId, author: r.authorDisplayName, avatarUrl: r.authorAvatarUrl, size: 18 }),
6600
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.rowAuthor, { color: tokens["text-2"] }], children: r.authorDisplayName }),
6601
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.Text, { style: [styles40.rowTime, { color: tokens.muted }], children: [
6593
6602
  "\xB7 ",
6594
6603
  fmtRelativeTime(r.createdAt)
6595
6604
  ] })
6596
6605
  ] }),
6597
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native47.Text, { style: [styles39.rowSnippet, { color: tokens["text-2"] }], numberOfLines: 2, children: r.bodySnippet }),
6598
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native47.Text, { style: [styles39.rowMeta, { color: tokens.muted }], numberOfLines: 1, children: [
6606
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.rowSnippet, { color: tokens["text-2"] }], numberOfLines: 2, children: r.bodySnippet }),
6607
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.Text, { style: [styles40.rowMeta, { color: tokens.muted }], numberOfLines: 1, children: [
6599
6608
  "in: ",
6600
6609
  r.threadTitle
6601
6610
  ] })
6602
6611
  ] });
6603
6612
  }
6604
- var styles39 = import_react_native47.StyleSheet.create({
6613
+ var styles40 = import_react_native48.StyleSheet.create({
6605
6614
  root: { flex: 1 },
6606
6615
  searchBox: {
6607
6616
  marginHorizontal: 14,
@@ -6693,7 +6702,7 @@ var styles39 = import_react_native47.StyleSheet.create({
6693
6702
  row: {
6694
6703
  paddingHorizontal: 16,
6695
6704
  paddingVertical: 12,
6696
- borderBottomWidth: import_react_native47.StyleSheet.hairlineWidth
6705
+ borderBottomWidth: import_react_native48.StyleSheet.hairlineWidth
6697
6706
  },
6698
6707
  latestRow: {
6699
6708
  paddingHorizontal: 16,
@@ -6743,11 +6752,11 @@ var styles39 = import_react_native47.StyleSheet.create({
6743
6752
  });
6744
6753
 
6745
6754
  // src/screens/AskResultScreen.tsx
6746
- var import_react33 = require("react");
6747
- var import_react_native48 = require("react-native");
6755
+ var import_react34 = require("react");
6756
+ var import_react_native49 = require("react-native");
6748
6757
  var import_react_native_safe_area_context10 = require("react-native-safe-area-context");
6749
6758
  var import_native9 = require("@react-navigation/native");
6750
- var import_jsx_runtime47 = require("react/jsx-runtime");
6759
+ var import_jsx_runtime48 = require("react/jsx-runtime");
6751
6760
  function AskResultScreen() {
6752
6761
  const { tokens, mode } = useTheme();
6753
6762
  const insets = (0, import_react_native_safe_area_context10.useSafeAreaInsets)();
@@ -6756,11 +6765,11 @@ function AskResultScreen() {
6756
6765
  const session = useSession();
6757
6766
  const { apiUrl, forumId } = session;
6758
6767
  const token = session.status === "ready" ? session.sessionToken : void 0;
6759
- const [turns, setTurns] = (0, import_react33.useState)([]);
6760
- const [followUp, setFollowUp] = (0, import_react33.useState)("");
6761
- const [sheetTurn, setSheetTurn] = (0, import_react33.useState)(null);
6762
- const scrollRef = (0, import_react33.useRef)(null);
6763
- const ask = (0, import_react33.useCallback)(async (q) => {
6768
+ const [turns, setTurns] = (0, import_react34.useState)([]);
6769
+ const [followUp, setFollowUp] = (0, import_react34.useState)("");
6770
+ const [sheetTurn, setSheetTurn] = (0, import_react34.useState)(null);
6771
+ const scrollRef = (0, import_react34.useRef)(null);
6772
+ const ask = (0, import_react34.useCallback)(async (q) => {
6764
6773
  if (!token) return;
6765
6774
  const idx = turns.length;
6766
6775
  setTurns((prev) => [...prev, { query: q, answer: null, sources: [], loading: true, error: null }]);
@@ -6801,10 +6810,10 @@ function AskResultScreen() {
6801
6810
  setTurns((prev) => prev.map((t, i) => i === idx ? { ...t, loading: false, error: msg } : t));
6802
6811
  }
6803
6812
  }, [apiUrl, forumId, token, turns.length]);
6804
- (0, import_react33.useEffect)(() => {
6813
+ (0, import_react34.useEffect)(() => {
6805
6814
  void ask(route.params.query);
6806
6815
  }, []);
6807
- (0, import_react33.useEffect)(() => {
6816
+ (0, import_react34.useEffect)(() => {
6808
6817
  setTimeout(() => scrollRef.current?.scrollToEnd({ animated: true }), 80);
6809
6818
  }, [turns]);
6810
6819
  function submitFollowUp() {
@@ -6816,21 +6825,21 @@ function AskResultScreen() {
6816
6825
  function handleSuggest(p) {
6817
6826
  void ask(p);
6818
6827
  }
6819
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: [styles40.root, { backgroundColor: tokens.bg }], children: [
6820
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.View, { style: { height: insets.top + (import_react_native48.Platform.OS === "android" ? 12 : 0) } }),
6821
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.header, children: [
6822
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Pressable, { onPress: () => navigation.goBack(), hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.View, { style: { transform: [{ scaleX: -1 }] }, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ArrowRightIcon, { size: 20, color: tokens.text }) }) }),
6823
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.headerTitle, { color: tokens.text }], children: "Ask AI" })
6828
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: [styles41.root, { backgroundColor: tokens.bg }], children: [
6829
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.View, { style: { height: insets.top + (import_react_native49.Platform.OS === "android" ? 12 : 0) } }),
6830
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: styles41.header, children: [
6831
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Pressable, { onPress: () => navigation.goBack(), hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.View, { style: { transform: [{ scaleX: -1 }] }, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ArrowRightIcon, { size: 20, color: tokens.text }) }) }),
6832
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.headerTitle, { color: tokens.text }], children: "Ask AI" })
6824
6833
  ] }),
6825
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.KeyboardAvoidingView, { behavior: import_react_native48.Platform.OS === "ios" ? "padding" : void 0, style: { flex: 1 }, children: [
6826
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6827
- import_react_native48.ScrollView,
6834
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.KeyboardAvoidingView, { behavior: import_react_native49.Platform.OS === "ios" ? "padding" : void 0, style: { flex: 1 }, children: [
6835
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6836
+ import_react_native49.ScrollView,
6828
6837
  {
6829
6838
  ref: scrollRef,
6830
6839
  keyboardShouldPersistTaps: "handled",
6831
6840
  keyboardDismissMode: "on-drag",
6832
- contentContainerStyle: [styles40.body, { paddingBottom: 20 }],
6833
- children: turns.map((turn, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6841
+ contentContainerStyle: [styles41.body, { paddingBottom: 20 }],
6842
+ children: turns.map((turn, i) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6834
6843
  TurnView,
6835
6844
  {
6836
6845
  turn,
@@ -6844,13 +6853,13 @@ function AskResultScreen() {
6844
6853
  ))
6845
6854
  }
6846
6855
  ),
6847
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: [styles40.inputBar, {
6856
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: [styles41.inputBar, {
6848
6857
  backgroundColor: mode === "dark" ? tokens.surface : "#dde1e6",
6849
6858
  marginHorizontal: 14,
6850
6859
  marginBottom: insets.bottom + 12
6851
6860
  }], children: [
6852
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6853
- import_react_native48.TextInput,
6861
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6862
+ import_react_native49.TextInput,
6854
6863
  {
6855
6864
  value: followUp,
6856
6865
  onChangeText: setFollowUp,
@@ -6858,57 +6867,45 @@ function AskResultScreen() {
6858
6867
  returnKeyType: "send",
6859
6868
  placeholder: "Ask a follow-up\u2026",
6860
6869
  placeholderTextColor: tokens.faint,
6861
- style: [styles40.followInput, { color: tokens.text }]
6870
+ style: [styles41.followInput, { color: tokens.text }]
6862
6871
  }
6863
6872
  ),
6864
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6865
- import_react_native48.Pressable,
6873
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6874
+ import_react_native49.Pressable,
6866
6875
  {
6867
- style: [styles40.followBtn, {
6876
+ style: [styles41.followBtn, {
6868
6877
  backgroundColor: tokens.accent,
6869
6878
  opacity: followUp.trim() ? 1 : 0.35
6870
6879
  }],
6871
6880
  onPress: submitFollowUp,
6872
6881
  hitSlop: 6,
6873
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ChevronRightIcon, { size: 16, color: "#fff" })
6882
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChevronRightIcon, { size: 16, color: "#fff" })
6874
6883
  }
6875
6884
  )
6876
6885
  ] })
6877
6886
  ] }),
6878
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
6879
- import_react_native48.Modal,
6880
- {
6881
- visible: sheetTurn !== null,
6882
- animationType: "slide",
6883
- transparent: true,
6884
- onRequestClose: () => setSheetTurn(null),
6885
- children: [
6886
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Pressable, { style: styles40.sheetBackdrop, onPress: () => setSheetTurn(null) }),
6887
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: [styles40.sheet, {
6888
- backgroundColor: tokens.bg,
6889
- paddingBottom: insets.bottom + 16
6890
- }], children: [
6891
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.View, { style: styles40.sheetHandle }),
6892
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.sheetHeader, children: [
6893
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.sheetTitle, { color: tokens.text }], children: "Sources" }),
6894
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Pressable, { onPress: () => setSheetTurn(null), hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.sheetClose, { color: tokens.muted }], children: "\u2715" }) })
6895
- ] }),
6896
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.ScrollView, { contentContainerStyle: { paddingVertical: 8 }, children: (sheetTurn?.sources ?? []).map((src, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6897
- SourceCard,
6898
- {
6899
- src,
6900
- tokens,
6901
- onPress: () => {
6902
- setSheetTurn(null);
6903
- navigation.navigate("Thread", { threadId: src.threadId });
6904
- }
6905
- },
6906
- src.threadId + i
6907
- )) })
6908
- ] })
6909
- ]
6910
- }
6911
- )
6887
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(BottomSheetShell, { visible: sheetTurn !== null, onClose: () => setSheetTurn(null), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: [styles41.sheet, {
6888
+ backgroundColor: tokens.bg,
6889
+ paddingBottom: insets.bottom + 16
6890
+ }], children: [
6891
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.View, { style: styles41.sheetHandle }),
6892
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: styles41.sheetHeader, children: [
6893
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.sheetTitle, { color: tokens.text }], children: "Sources" }),
6894
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Pressable, { onPress: () => setSheetTurn(null), hitSlop: 8, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.sheetClose, { color: tokens.muted }], children: "\u2715" }) })
6895
+ ] }),
6896
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.ScrollView, { contentContainerStyle: { paddingVertical: 8 }, children: (sheetTurn?.sources ?? []).map((src, i) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6897
+ SourceCard,
6898
+ {
6899
+ src,
6900
+ tokens,
6901
+ onPress: () => {
6902
+ setSheetTurn(null);
6903
+ navigation.navigate("Thread", { threadId: src.threadId });
6904
+ }
6905
+ },
6906
+ src.threadId + i
6907
+ )) })
6908
+ ] }) })
6912
6909
  ] });
6913
6910
  }
6914
6911
  function TurnView({
@@ -6920,62 +6917,62 @@ function TurnView({
6920
6917
  isLast
6921
6918
  }) {
6922
6919
  const mediaSources = turn.sources.filter((s) => s.imageUrl);
6923
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.turn, children: [
6924
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.View, { style: styles40.queryRow, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.View, { style: [styles40.queryPill, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.queryText, { color: tokens.text }], children: turn.query }) }) }),
6925
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.responseWrap, children: [
6926
- turn.loading && !turn.answer && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.ActivityIndicator, { color: tokens.accent, style: { marginTop: 12 } }),
6927
- turn.error && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.errorText, { color: tokens.up }], children: turn.error }),
6928
- (turn.answer || turn.sources.length > 0) && !turn.error && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.answerWrap, children: [
6929
- turn.sources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
6930
- import_react_native48.Pressable,
6920
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: styles41.turn, children: [
6921
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.View, { style: styles41.queryRow, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.View, { style: [styles41.queryPill, { backgroundColor: tokens["surface-2"] }], children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.queryText, { color: tokens.text }], children: turn.query }) }) }),
6922
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: styles41.responseWrap, children: [
6923
+ turn.loading && !turn.answer && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.ActivityIndicator, { color: tokens.accent, style: { marginTop: 12 } }),
6924
+ turn.error && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.errorText, { color: tokens.up }], children: turn.error }),
6925
+ (turn.answer || turn.sources.length > 0) && !turn.error && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: styles41.answerWrap, children: [
6926
+ turn.sources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6927
+ import_react_native49.Pressable,
6931
6928
  {
6932
- style: [styles40.sourcePill, { borderColor: tokens.border, backgroundColor: tokens["surface-2"] }],
6929
+ style: [styles41.sourcePill, { borderColor: tokens.border, backgroundColor: tokens["surface-2"] }],
6933
6930
  onPress: onSourcesPress,
6934
6931
  children: [
6935
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AvatarStack, { sources: turn.sources }),
6936
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.sourcePillText, { color: tokens["text-2"] }], numberOfLines: 1, children: "From " + truncate(turn.sources[0]?.title ?? "", 28) + (turn.sources.length > 1 ? ` +${turn.sources.length - 1} more` : "") }),
6937
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ChevronRightIcon, { size: 12, color: tokens.muted })
6932
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AvatarStack, { sources: turn.sources }),
6933
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.sourcePillText, { color: tokens["text-2"] }], numberOfLines: 1, children: "From " + truncate(turn.sources[0]?.title ?? "", 28) + (turn.sources.length > 1 ? ` +${turn.sources.length - 1} more` : "") }),
6934
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChevronRightIcon, { size: 12, color: tokens.muted })
6938
6935
  ]
6939
6936
  }
6940
6937
  ),
6941
- turn.answer?.intro ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.intro, { color: tokens.text }], children: turn.answer.intro }) : turn.loading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.ActivityIndicator, { color: tokens.accent, style: { marginVertical: 10 }, size: "small" }) : null,
6942
- (turn.answer?.categories ?? []).map((cat, ci) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.category, children: [
6943
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.catTitle, { color: tokens["text-2"] }], children: cat.title }),
6938
+ turn.answer?.intro ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.intro, { color: tokens.text }], children: turn.answer.intro }) : turn.loading ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.ActivityIndicator, { color: tokens.accent, style: { marginVertical: 10 }, size: "small" }) : null,
6939
+ (turn.answer?.categories ?? []).map((cat, ci) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: styles41.category, children: [
6940
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.catTitle, { color: tokens["text-2"] }], children: cat.title }),
6944
6941
  cat.bullets.map((b, bi) => {
6945
6942
  const src = turn.sources[b.sourceIndex];
6946
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.bullet, children: [
6947
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.bulletFact, { color: tokens.text }], children: b.fact }),
6948
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.Text, { style: [styles40.bulletQuote, { color: tokens.accent }], children: [
6943
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: styles41.bullet, children: [
6944
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.bulletFact, { color: tokens.text }], children: b.fact }),
6945
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.Text, { style: [styles41.bulletQuote, { color: tokens.accent }], children: [
6949
6946
  '"',
6950
6947
  b.quote,
6951
6948
  '"'
6952
6949
  ] }),
6953
- src && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
6954
- import_react_native48.Pressable,
6950
+ src && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6951
+ import_react_native49.Pressable,
6955
6952
  {
6956
- style: [styles40.attrChip, { backgroundColor: tokens["surface-2"] }],
6953
+ style: [styles41.attrChip, { backgroundColor: tokens["surface-2"] }],
6957
6954
  onPress: () => onThreadPress(src.threadId),
6958
6955
  children: [
6959
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.attrText, { color: tokens["text-2"] }], numberOfLines: 1, children: truncate(src.title, 40) }),
6960
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ChevronRightIcon, { size: 10, color: tokens.muted })
6956
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.attrText, { color: tokens["text-2"] }], numberOfLines: 1, children: truncate(src.title, 40) }),
6957
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChevronRightIcon, { size: 10, color: tokens.muted })
6961
6958
  ]
6962
6959
  }
6963
6960
  )
6964
6961
  ] }, bi);
6965
6962
  })
6966
6963
  ] }, ci)),
6967
- !turn.loading && mediaSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.mediaSection, children: [
6968
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.catTitle, { color: tokens["text-2"] }], children: "Related Media" }),
6969
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles40.mediaScroll, children: mediaSources.map((src) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6970
- import_react_native48.Pressable,
6964
+ !turn.loading && mediaSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: styles41.mediaSection, children: [
6965
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.catTitle, { color: tokens["text-2"] }], children: "Related Media" }),
6966
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles41.mediaScroll, children: mediaSources.map((src) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6967
+ import_react_native49.Pressable,
6971
6968
  {
6972
- style: [styles40.mediaThumbnail, { borderColor: tokens.border }],
6969
+ style: [styles41.mediaThumbnail, { borderColor: tokens.border }],
6973
6970
  onPress: () => onThreadPress(src.threadId),
6974
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6975
- import_react_native48.Image,
6971
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6972
+ import_react_native49.Image,
6976
6973
  {
6977
6974
  source: { uri: src.imageUrl },
6978
- style: styles40.mediaImage,
6975
+ style: styles41.mediaImage,
6979
6976
  resizeMode: "cover"
6980
6977
  }
6981
6978
  )
@@ -6983,13 +6980,13 @@ function TurnView({
6983
6980
  src.threadId
6984
6981
  )) })
6985
6982
  ] }),
6986
- isLast && !turn.loading && turn.answer && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.disclaimer, { color: tokens.muted }], children: "Responses are AI-generated from threads and comments and may not be accurate." }),
6987
- !turn.loading && (turn.answer?.suggestions.length ?? 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles40.suggestionRow, children: turn.answer.suggestions.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6988
- import_react_native48.Pressable,
6983
+ isLast && !turn.loading && turn.answer && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.disclaimer, { color: tokens.muted }], children: "Responses are AI-generated from threads and comments and may not be accurate." }),
6984
+ !turn.loading && (turn.answer?.suggestions.length ?? 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles41.suggestionRow, children: turn.answer.suggestions.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6985
+ import_react_native49.Pressable,
6989
6986
  {
6990
- style: [styles40.suggestionChip, { borderColor: tokens.accent }],
6987
+ style: [styles41.suggestionChip, { borderColor: tokens.accent }],
6991
6988
  onPress: () => onSuggest(p),
6992
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.suggestionText, { color: tokens.accent }], children: p })
6989
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.suggestionText, { color: tokens.accent }], children: p })
6993
6990
  },
6994
6991
  i
6995
6992
  )) })
@@ -6999,7 +6996,7 @@ function TurnView({
6999
6996
  }
7000
6997
  function AvatarStack({ sources }) {
7001
6998
  const shown = sources.slice(0, 3);
7002
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.View, { style: styles40.avatarStack, children: shown.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.View, { style: [styles40.avatarWrap, { zIndex: 3 - i, marginLeft: i === 0 ? 0 : -8 }], children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6999
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.View, { style: styles41.avatarStack, children: shown.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.View, { style: [styles41.avatarWrap, { zIndex: 3 - i, marginLeft: i === 0 ? 0 : -8 }], children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7003
7000
  Avatar,
7004
7001
  {
7005
7002
  authorId: s.authorId,
@@ -7014,13 +7011,13 @@ function SourceCard({
7014
7011
  tokens,
7015
7012
  onPress
7016
7013
  }) {
7017
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
7018
- import_react_native48.Pressable,
7014
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
7015
+ import_react_native49.Pressable,
7019
7016
  {
7020
- style: [styles40.sourceCard, { backgroundColor: tokens["surface-2"] }],
7017
+ style: [styles41.sourceCard, { backgroundColor: tokens["surface-2"] }],
7021
7018
  onPress,
7022
7019
  children: [
7023
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
7020
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7024
7021
  Avatar,
7025
7022
  {
7026
7023
  authorId: src.authorId,
@@ -7029,9 +7026,9 @@ function SourceCard({
7029
7026
  size: 36
7030
7027
  }
7031
7028
  ),
7032
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.View, { style: styles40.sourceCardBody, children: [
7033
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native48.Text, { style: [styles40.sourceCardTitle, { color: tokens.text }], numberOfLines: 2, children: src.title }),
7034
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native48.Text, { style: [styles40.sourceCardMeta, { color: tokens.muted }], children: [
7029
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: styles41.sourceCardBody, children: [
7030
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.sourceCardTitle, { color: tokens.text }], numberOfLines: 2, children: src.title }),
7031
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.Text, { style: [styles41.sourceCardMeta, { color: tokens.muted }], children: [
7035
7032
  src.authorDisplayName,
7036
7033
  " \xB7 ",
7037
7034
  fmtRelativeTime(src.createdAt),
@@ -7047,7 +7044,7 @@ function SourceCard({
7047
7044
  function truncate(s, max) {
7048
7045
  return s.length > max ? s.slice(0, max) + "\u2026" : s;
7049
7046
  }
7050
- var styles40 = import_react_native48.StyleSheet.create({
7047
+ var styles41 = import_react_native49.StyleSheet.create({
7051
7048
  root: { flex: 1 },
7052
7049
  header: {
7053
7050
  flexDirection: "row",
@@ -7092,7 +7089,7 @@ var styles40 = import_react_native48.StyleSheet.create({
7092
7089
  flexDirection: "row",
7093
7090
  alignItems: "center",
7094
7091
  gap: 6,
7095
- borderWidth: import_react_native48.StyleSheet.hairlineWidth,
7092
+ borderWidth: import_react_native49.StyleSheet.hairlineWidth,
7096
7093
  borderRadius: 20,
7097
7094
  paddingHorizontal: 10,
7098
7095
  paddingVertical: 6,
@@ -7171,7 +7168,7 @@ var styles40 = import_react_native48.StyleSheet.create({
7171
7168
  borderRadius: 12,
7172
7169
  marginRight: 8,
7173
7170
  overflow: "hidden",
7174
- borderWidth: import_react_native48.StyleSheet.hairlineWidth
7171
+ borderWidth: import_react_native49.StyleSheet.hairlineWidth
7175
7172
  },
7176
7173
  mediaImage: {
7177
7174
  width: 120,
@@ -7209,10 +7206,6 @@ var styles40 = import_react_native48.StyleSheet.create({
7209
7206
  justifyContent: "center"
7210
7207
  },
7211
7208
  // Sources bottom sheet
7212
- sheetBackdrop: {
7213
- flex: 1,
7214
- backgroundColor: "rgba(0,0,0,0.4)"
7215
- },
7216
7209
  sheet: {
7217
7210
  borderRadius: 20,
7218
7211
  paddingTop: 12,
@@ -7282,10 +7275,10 @@ var styles40 = import_react_native48.StyleSheet.create({
7282
7275
  });
7283
7276
 
7284
7277
  // src/screens/ModerationScreen.tsx
7285
- var import_react34 = require("react");
7286
- var import_react_native49 = require("react-native");
7278
+ var import_react35 = require("react");
7279
+ var import_react_native50 = require("react-native");
7287
7280
  var import_native10 = require("@react-navigation/native");
7288
- var import_jsx_runtime48 = require("react/jsx-runtime");
7281
+ var import_jsx_runtime49 = require("react/jsx-runtime");
7289
7282
  var PAGE_LIMIT = 50;
7290
7283
  function badgeFor2(item) {
7291
7284
  if (item.reporterId) return { label: "Reported", Icon: ReportIcon, color: "#ef4444" };
@@ -7298,11 +7291,11 @@ function ModerationBody() {
7298
7291
  const onScroll = useScrollCollapse();
7299
7292
  const { apiUrl } = session;
7300
7293
  const token = session.status === "ready" ? session.sessionToken : void 0;
7301
- const [items, setItems] = (0, import_react34.useState)([]);
7302
- const [loading, setLoading] = (0, import_react34.useState)(true);
7303
- const [error, setError] = (0, import_react34.useState)(null);
7304
- const [resolvingId, setResolvingId] = (0, import_react34.useState)(null);
7305
- (0, import_react34.useEffect)(() => {
7294
+ const [items, setItems] = (0, import_react35.useState)([]);
7295
+ const [loading, setLoading] = (0, import_react35.useState)(true);
7296
+ const [error, setError] = (0, import_react35.useState)(null);
7297
+ const [resolvingId, setResolvingId] = (0, import_react35.useState)(null);
7298
+ (0, import_react35.useEffect)(() => {
7306
7299
  if (!token) return;
7307
7300
  let cancelled = false;
7308
7301
  setLoading(true);
@@ -7328,11 +7321,11 @@ function ModerationBody() {
7328
7321
  setResolvingId(null);
7329
7322
  }
7330
7323
  }
7331
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: styles41.content, children: [
7332
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(BackRow, { onPress: () => navigation.goBack() }),
7333
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.heading, { color: tokens.text }], children: "Moderation" }),
7334
- loading ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.View, { style: styles41.center, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Mascot, { size: 32 }) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.View, { style: styles41.center, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: { color: tokens["text-2"] }, children: error }) }) : items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.View, { style: styles41.center, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: { color: tokens["text-2"] }, children: "Nothing pending review" }) }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7335
- import_react_native49.FlatList,
7324
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react_native50.View, { style: styles42.content, children: [
7325
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(BackRow, { onPress: () => navigation.goBack() }),
7326
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native50.Text, { style: [styles42.heading, { color: tokens.text }], children: "Moderation" }),
7327
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native50.View, { style: styles42.center, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Mascot, { size: 32 }) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native50.View, { style: styles42.center, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native50.Text, { style: { color: tokens["text-2"] }, children: error }) }) : items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native50.View, { style: styles42.center, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native50.Text, { style: { color: tokens["text-2"] }, children: "Nothing pending review" }) }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7328
+ import_react_native50.FlatList,
7336
7329
  {
7337
7330
  data: items,
7338
7331
  keyExtractor: (i) => i.id,
@@ -7341,42 +7334,42 @@ function ModerationBody() {
7341
7334
  renderItem: ({ item, index }) => {
7342
7335
  const badge = badgeFor2(item);
7343
7336
  const resolving = resolvingId === item.id;
7344
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
7345
- import_react_native49.Pressable,
7337
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
7338
+ import_react_native50.Pressable,
7346
7339
  {
7347
7340
  onPress: () => {
7348
7341
  if (item.threadId) navigation.navigate("Thread", { threadId: item.threadId });
7349
7342
  },
7350
- style: [styles41.row, index > 0 && { borderTopWidth: 1, borderTopColor: tokens.border }],
7343
+ style: [styles42.row, index > 0 && { borderTopWidth: 1, borderTopColor: tokens.border }],
7351
7344
  children: [
7352
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.View, { style: styles41.rowTop, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: [styles41.badge, { backgroundColor: `${badge.color}30` }], children: [
7353
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(badge.Icon, { size: 12, color: badge.color }),
7354
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.badgeLabel, { color: badge.color }], children: badge.label })
7345
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native50.View, { style: styles42.rowTop, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react_native50.View, { style: [styles42.badge, { backgroundColor: `${badge.color}30` }], children: [
7346
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(badge.Icon, { size: 12, color: badge.color }),
7347
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native50.Text, { style: [styles42.badgeLabel, { color: badge.color }], children: badge.label })
7355
7348
  ] }) }),
7356
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.threadTitle, { color: tokens.text }], numberOfLines: 1, children: item.threadTitle ?? "Untitled thread" }),
7357
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_native49.Text, { style: [styles41.body, { color: tokens["text-2"] }], numberOfLines: 2, children: item.commentBody ?? "The thread itself was reported." }),
7358
- item.reason ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.Text, { style: [styles41.reason, { color: tokens.muted }], numberOfLines: 1, children: [
7349
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native50.Text, { style: [styles42.threadTitle, { color: tokens.text }], numberOfLines: 1, children: item.threadTitle ?? "Untitled thread" }),
7350
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native50.Text, { style: [styles42.body, { color: tokens["text-2"] }], numberOfLines: 2, children: item.commentBody ?? "The thread itself was reported." }),
7351
+ item.reason ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react_native50.Text, { style: [styles42.reason, { color: tokens.muted }], numberOfLines: 1, children: [
7359
7352
  "\u201C",
7360
7353
  item.reason,
7361
7354
  "\u201D"
7362
7355
  ] }) : null,
7363
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native49.View, { style: styles41.actions, children: [
7364
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7365
- import_react_native49.Pressable,
7356
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react_native50.View, { style: styles42.actions, children: [
7357
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7358
+ import_react_native50.Pressable,
7366
7359
  {
7367
7360
  disabled: resolving,
7368
7361
  onPress: () => handleResolve(item, "approved"),
7369
- style: [styles41.actionBtn, { backgroundColor: "rgba(46,193,106,0.18)" }, resolving && styles41.actionDisabled],
7370
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CheckIcon, { size: 16, color: "#2ec16a" })
7362
+ style: [styles42.actionBtn, { backgroundColor: "rgba(46,193,106,0.18)" }, resolving && styles42.actionDisabled],
7363
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CheckIcon, { size: 16, color: "#2ec16a" })
7371
7364
  }
7372
7365
  ),
7373
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7374
- import_react_native49.Pressable,
7366
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7367
+ import_react_native50.Pressable,
7375
7368
  {
7376
7369
  disabled: resolving,
7377
7370
  onPress: () => handleResolve(item, "removed"),
7378
- style: [styles41.actionBtn, { backgroundColor: "rgba(239,68,68,0.18)" }, resolving && styles41.actionDisabled],
7379
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CloseIcon, { size: 16, color: "#ef4444" })
7371
+ style: [styles42.actionBtn, { backgroundColor: "rgba(239,68,68,0.18)" }, resolving && styles42.actionDisabled],
7372
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CloseIcon, { size: 16, color: "#ef4444" })
7380
7373
  }
7381
7374
  )
7382
7375
  ] })
@@ -7390,9 +7383,9 @@ function ModerationBody() {
7390
7383
  ] });
7391
7384
  }
7392
7385
  function ModerationScreen() {
7393
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Shell, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ModerationBody, {}) });
7386
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Shell, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ModerationBody, {}) });
7394
7387
  }
7395
- var styles41 = import_react_native49.StyleSheet.create({
7388
+ var styles42 = import_react_native50.StyleSheet.create({
7396
7389
  content: { flex: 1, paddingHorizontal: 16, paddingTop: 12 },
7397
7390
  heading: { fontSize: 17, fontWeight: "800", marginTop: 12, marginBottom: 8 },
7398
7391
  center: { alignItems: "center", marginTop: 40 },
@@ -7409,11 +7402,11 @@ var styles41 = import_react_native49.StyleSheet.create({
7409
7402
  });
7410
7403
 
7411
7404
  // src/navigation/RootNavigator.tsx
7412
- var import_jsx_runtime49 = require("react/jsx-runtime");
7405
+ var import_jsx_runtime50 = require("react/jsx-runtime");
7413
7406
  var Stack = (0, import_native_stack.createNativeStackNavigator)();
7414
7407
  function RootNavigator() {
7415
7408
  const { tokens, mode } = useTheme();
7416
- const navTheme = (0, import_react35.useMemo)(() => ({
7409
+ const navTheme = (0, import_react36.useMemo)(() => ({
7417
7410
  ...mode === "dark" ? import_native11.DarkTheme : import_native11.DefaultTheme,
7418
7411
  colors: {
7419
7412
  ...mode === "dark" ? import_native11.DarkTheme.colors : import_native11.DefaultTheme.colors,
@@ -7425,20 +7418,20 @@ function RootNavigator() {
7425
7418
  }
7426
7419
  }), [mode, tokens]);
7427
7420
  const containerProps = { theme: navTheme, independent: true };
7428
- const container = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_native11.NavigationContainer, { ...containerProps, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Stack.Navigator, { screenOptions: { headerShown: false, statusBarTranslucent: true }, children: [
7429
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Stack.Screen, { name: "Feed", component: FeedScreen }),
7430
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Stack.Screen, { name: "Thread", component: ThreadScreen, options: { animation: "none" } }),
7431
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Stack.Screen, { name: "Profile", component: ProfileScreen }),
7432
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Stack.Screen, { name: "Search", component: SearchScreen }),
7433
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Stack.Screen, { name: "SearchInput", component: SearchInputScreen, options: { headerShown: false } }),
7434
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Stack.Screen, { name: "AskResult", component: AskResultScreen, options: { headerShown: false } }),
7435
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Stack.Screen, { name: "Moderation", component: ModerationScreen })
7421
+ const container = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_native11.NavigationContainer, { ...containerProps, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Stack.Navigator, { screenOptions: { headerShown: false, statusBarTranslucent: true }, children: [
7422
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Stack.Screen, { name: "Feed", component: FeedScreen }),
7423
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Stack.Screen, { name: "Thread", component: ThreadScreen, options: { animation: "none" } }),
7424
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Stack.Screen, { name: "Profile", component: ProfileScreen }),
7425
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Stack.Screen, { name: "Search", component: SearchScreen }),
7426
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Stack.Screen, { name: "SearchInput", component: SearchInputScreen, options: { headerShown: false } }),
7427
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Stack.Screen, { name: "AskResult", component: AskResultScreen, options: { headerShown: false } }),
7428
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Stack.Screen, { name: "Moderation", component: ModerationScreen })
7436
7429
  ] }) });
7437
- return import_native11.NavigationIndependentTree ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_native11.NavigationIndependentTree, { children: container }) : container;
7430
+ return import_native11.NavigationIndependentTree ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_native11.NavigationIndependentTree, { children: container }) : container;
7438
7431
  }
7439
7432
 
7440
7433
  // src/ForumKit.tsx
7441
- var import_jsx_runtime50 = require("react/jsx-runtime");
7434
+ var import_jsx_runtime51 = require("react/jsx-runtime");
7442
7435
  function ForumKit(config) {
7443
7436
  const [fontsLoaded] = (0, import_inter.useFonts)({
7444
7437
  Inter_400Regular: import_inter.Inter_400Regular,
@@ -7449,23 +7442,23 @@ function ForumKit(config) {
7449
7442
  Michroma_400Regular: import_michroma.Michroma_400Regular
7450
7443
  });
7451
7444
  if (!fontsLoaded) {
7452
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_native50.View, { style: { flex: 1, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_native50.ActivityIndicator, {}) });
7445
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_native51.View, { style: { flex: 1, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_native51.ActivityIndicator, {}) });
7453
7446
  }
7454
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_native_safe_area_context11.SafeAreaProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ThemeProvider, { theme: config.theme, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SessionProvider, { config, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SessionGate, {}) }) }) });
7447
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_native_safe_area_context11.SafeAreaProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ThemeProvider, { theme: config.theme, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SessionProvider, { config, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SessionGate, {}) }) }) });
7455
7448
  }
7456
7449
  function SessionGate() {
7457
7450
  const { tokens } = useTheme();
7458
7451
  const session = useSession();
7459
7452
  if (session.status === "loading") {
7460
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_native50.View, { style: { flex: 1, alignItems: "center", justifyContent: "center", backgroundColor: tokens.bg }, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_native50.ActivityIndicator, { color: tokens.accent }) });
7453
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_native51.View, { style: { flex: 1, alignItems: "center", justifyContent: "center", backgroundColor: tokens.bg }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_native51.ActivityIndicator, { color: tokens.accent }) });
7461
7454
  }
7462
7455
  if (session.status === "error") {
7463
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react_native50.View, { style: { flex: 1, alignItems: "center", justifyContent: "center", backgroundColor: tokens.bg, padding: 24 }, children: [
7464
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_native50.Text, { style: { color: tokens.text, fontSize: 15, fontWeight: "600", marginBottom: 6 }, children: "Couldn't connect" }),
7465
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_native50.Text, { style: { color: tokens["text-2"], fontSize: 13, textAlign: "center" }, children: session.error })
7456
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_react_native51.View, { style: { flex: 1, alignItems: "center", justifyContent: "center", backgroundColor: tokens.bg, padding: 24 }, children: [
7457
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_native51.Text, { style: { color: tokens.text, fontSize: 15, fontWeight: "600", marginBottom: 6 }, children: "Couldn't connect" }),
7458
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_native51.Text, { style: { color: tokens["text-2"], fontSize: 13, textAlign: "center" }, children: session.error })
7466
7459
  ] });
7467
7460
  }
7468
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RootNavigator, {});
7461
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RootNavigator, {});
7469
7462
  }
7470
7463
  // Annotate the CommonJS export names for ESM import in node:
7471
7464
  0 && (module.exports = {