@poolse/react-native 3.8.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1645,7 +1645,7 @@ function ConversationRow({
1645
1645
  const title = isDirect ? otherExtId ? labelFor?.(otherExtId) ?? resolvedOther.profile?.displayName ?? otherExtId : "Direct chat" : conv.name ?? "Untitled conversation";
1646
1646
  const avatarUrl = isDirect && otherExtId ? avatarFor?.(otherExtId) ?? resolvedOther.profile?.avatarUrl ?? null : conv.avatar_url ?? null;
1647
1647
  const avatarSeed = isDirect ? otherExtId ?? conv.id : conv.id;
1648
- const preview = conv.last_message_preview ? react$1.formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview : null;
1648
+ const preview = conv.last_message_preview ? react$1.formatCallLogPreview(conv.last_message_preview, meId) ?? react$1.formatRecordingNoticePreview(conv.last_message_preview, meId) ?? conv.last_message_preview : null;
1649
1649
  const when = relativeTime(conv.last_message_at, Date.now(), "short");
1650
1650
  const bold = unread > 0;
1651
1651
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3689,6 +3689,403 @@ var styles16 = reactNative.StyleSheet.create({
3689
3689
  fontVariant: ["tabular-nums"]
3690
3690
  }
3691
3691
  });
3692
+ function RecDot({ off = false, color }) {
3693
+ const theme = useTheme();
3694
+ const opacity = react.useRef(new reactNative.Animated.Value(1)).current;
3695
+ react.useEffect(() => {
3696
+ if (off) return;
3697
+ let loop = null;
3698
+ let cancelled = false;
3699
+ void reactNative.AccessibilityInfo.isReduceMotionEnabled?.().then((reduce) => {
3700
+ if (reduce || cancelled) return;
3701
+ loop = reactNative.Animated.loop(
3702
+ reactNative.Animated.sequence([
3703
+ reactNative.Animated.timing(opacity, { toValue: 0.35, duration: 800, useNativeDriver: true }),
3704
+ reactNative.Animated.timing(opacity, { toValue: 1, duration: 800, useNativeDriver: true })
3705
+ ])
3706
+ );
3707
+ loop.start();
3708
+ }).catch(() => {
3709
+ });
3710
+ return () => {
3711
+ cancelled = true;
3712
+ loop?.stop();
3713
+ };
3714
+ }, [off, opacity]);
3715
+ return /* @__PURE__ */ jsxRuntime.jsx(
3716
+ reactNative.Animated.View,
3717
+ {
3718
+ style: [
3719
+ styles17.dot,
3720
+ {
3721
+ backgroundColor: off ? theme.colors.textSubtle : color ?? theme.colors.danger,
3722
+ opacity: off ? 1 : opacity
3723
+ }
3724
+ ]
3725
+ }
3726
+ );
3727
+ }
3728
+ function RecordingBanner({
3729
+ recording,
3730
+ transcribing = false,
3731
+ mode,
3732
+ consentRequired = false,
3733
+ myConsent,
3734
+ onStop,
3735
+ onChangeConsent,
3736
+ pending = false,
3737
+ style
3738
+ }) {
3739
+ const theme = useTheme();
3740
+ const label = react$1.captureLabel(recording, transcribing, mode);
3741
+ if (!label) return null;
3742
+ const listenOnly = consentRequired && myConsent === "declined";
3743
+ const meta = listenOnly ? "You declined \u2014 you are listen-only" : consentRequired ? "Only people who agreed are captured" : "Everyone in the call is told";
3744
+ const button = (text, onPress) => /* @__PURE__ */ jsxRuntime.jsx(
3745
+ reactNative.Pressable,
3746
+ {
3747
+ onPress,
3748
+ disabled: pending,
3749
+ accessibilityRole: "button",
3750
+ accessibilityLabel: text === "Stop" ? "Stop recording" : "Change consent",
3751
+ hitSlop: 8,
3752
+ style: ({ pressed }) => [
3753
+ styles17.bannerBtn,
3754
+ { borderColor: theme.colors.border, backgroundColor: theme.colors.surface },
3755
+ (pressed || pending) && styles17.pressed
3756
+ ],
3757
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3758
+ reactNative.Text,
3759
+ {
3760
+ style: [styles17.bannerBtnText, { color: theme.colors.text, fontFamily: theme.fonts.body }],
3761
+ children: text
3762
+ }
3763
+ )
3764
+ }
3765
+ );
3766
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3767
+ reactNative.View,
3768
+ {
3769
+ style: [
3770
+ styles17.banner,
3771
+ { backgroundColor: theme.colors.surfaceAlt, borderColor: theme.colors.danger },
3772
+ style
3773
+ ],
3774
+ accessibilityRole: "summary",
3775
+ accessibilityLabel: `${label}. ${meta}`,
3776
+ children: [
3777
+ /* @__PURE__ */ jsxRuntime.jsx(RecDot, {}),
3778
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.bannerText, children: [
3779
+ /* @__PURE__ */ jsxRuntime.jsx(
3780
+ reactNative.Text,
3781
+ {
3782
+ style: [styles17.bannerTitle, { color: theme.colors.text, fontFamily: theme.fonts.body }],
3783
+ numberOfLines: 1,
3784
+ children: label
3785
+ }
3786
+ ),
3787
+ /* @__PURE__ */ jsxRuntime.jsx(
3788
+ reactNative.Text,
3789
+ {
3790
+ style: [
3791
+ styles17.bannerMeta,
3792
+ { color: theme.colors.textMuted, fontFamily: theme.fonts.body }
3793
+ ],
3794
+ numberOfLines: 2,
3795
+ children: meta
3796
+ }
3797
+ )
3798
+ ] }),
3799
+ listenOnly && onChangeConsent ? button("Change", onChangeConsent) : null,
3800
+ recording && onStop ? button("Stop", onStop) : null
3801
+ ]
3802
+ }
3803
+ );
3804
+ }
3805
+ function RecordingIndicator({
3806
+ recording,
3807
+ transcribing = false,
3808
+ mode,
3809
+ color,
3810
+ style
3811
+ }) {
3812
+ const theme = useTheme();
3813
+ const label = react$1.captureLabel(recording, transcribing, mode);
3814
+ if (!label) return null;
3815
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3816
+ reactNative.View,
3817
+ {
3818
+ style: [styles17.indicator, style],
3819
+ accessible: true,
3820
+ accessibilityRole: "image",
3821
+ accessibilityLabel: label,
3822
+ children: [
3823
+ /* @__PURE__ */ jsxRuntime.jsx(RecDot, {}),
3824
+ /* @__PURE__ */ jsxRuntime.jsx(
3825
+ reactNative.Text,
3826
+ {
3827
+ style: [
3828
+ styles17.indicatorText,
3829
+ { color: color ?? theme.colors.danger, fontFamily: theme.fonts.body }
3830
+ ],
3831
+ children: recording ? "REC" : "Transcript"
3832
+ }
3833
+ )
3834
+ ]
3835
+ }
3836
+ );
3837
+ }
3838
+ function ConsentPrompt({
3839
+ recording,
3840
+ transcribing = false,
3841
+ mode,
3842
+ startedByName,
3843
+ onAnswer,
3844
+ onAccepted,
3845
+ onDeclined,
3846
+ pending = false,
3847
+ error,
3848
+ overlay = true,
3849
+ style
3850
+ }) {
3851
+ const theme = useTheme();
3852
+ const [busy, setBusy] = react.useState(false);
3853
+ const [failed, setFailed] = react.useState(false);
3854
+ const what = recording && transcribing ? "recorded and transcribed" : recording ? mode === "audio" ? "recorded (audio)" : "recorded" : "transcribed";
3855
+ const title = `This call is being ${what}`;
3856
+ react.useEffect(() => {
3857
+ reactNative.AccessibilityInfo.announceForAccessibility?.(title);
3858
+ }, [title]);
3859
+ const answer = async (decision) => {
3860
+ setBusy(true);
3861
+ setFailed(false);
3862
+ try {
3863
+ const ok = await onAnswer(decision);
3864
+ if (ok === false) {
3865
+ setFailed(true);
3866
+ return;
3867
+ }
3868
+ if (decision === "accepted") onAccepted?.();
3869
+ else onDeclined?.();
3870
+ } catch {
3871
+ setFailed(true);
3872
+ } finally {
3873
+ setBusy(false);
3874
+ }
3875
+ };
3876
+ const disabled = busy || pending;
3877
+ const shownError = error ?? (failed ? "That didn\u2019t go through. Try again." : null);
3878
+ const card = /* @__PURE__ */ jsxRuntime.jsxs(
3879
+ reactNative.View,
3880
+ {
3881
+ style: [
3882
+ styles17.card,
3883
+ { backgroundColor: theme.colors.surface, borderColor: theme.colors.border },
3884
+ !overlay && style
3885
+ ],
3886
+ accessibilityViewIsModal: overlay,
3887
+ children: [
3888
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.cardHead, children: [
3889
+ /* @__PURE__ */ jsxRuntime.jsx(RecDot, {}),
3890
+ /* @__PURE__ */ jsxRuntime.jsx(
3891
+ reactNative.Text,
3892
+ {
3893
+ style: [styles17.cardTitle, { color: theme.colors.text, fontFamily: theme.fonts.body }],
3894
+ accessibilityRole: "header",
3895
+ children: title
3896
+ }
3897
+ )
3898
+ ] }),
3899
+ /* @__PURE__ */ jsxRuntime.jsxs(
3900
+ reactNative.Text,
3901
+ {
3902
+ style: [styles17.cardBody, { color: theme.colors.textMuted, fontFamily: theme.fonts.body }],
3903
+ children: [
3904
+ startedByName ? `${startedByName} started it. ` : "",
3905
+ "Your microphone and camera stay off until you agree. You can still hear and see everyone."
3906
+ ]
3907
+ }
3908
+ ),
3909
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.cardActions, children: [
3910
+ /* @__PURE__ */ jsxRuntime.jsx(
3911
+ reactNative.Pressable,
3912
+ {
3913
+ onPress: () => void answer("declined"),
3914
+ disabled,
3915
+ accessibilityRole: "button",
3916
+ accessibilityLabel: "Stay listen-only",
3917
+ style: ({ pressed }) => [
3918
+ styles17.cardBtn,
3919
+ { backgroundColor: theme.colors.surfaceAlt, borderColor: theme.colors.border },
3920
+ (pressed || disabled) && styles17.pressed
3921
+ ],
3922
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3923
+ reactNative.Text,
3924
+ {
3925
+ style: [styles17.cardBtnText, { color: theme.colors.text, fontFamily: theme.fonts.body }],
3926
+ children: "Stay listen-only"
3927
+ }
3928
+ )
3929
+ }
3930
+ ),
3931
+ /* @__PURE__ */ jsxRuntime.jsx(
3932
+ reactNative.Pressable,
3933
+ {
3934
+ onPress: () => void answer("accepted"),
3935
+ disabled,
3936
+ accessibilityRole: "button",
3937
+ accessibilityLabel: "Agree to be recorded",
3938
+ style: ({ pressed }) => [
3939
+ styles17.cardBtn,
3940
+ { backgroundColor: theme.colors.accent, borderColor: theme.colors.accent },
3941
+ (pressed || disabled) && styles17.pressed
3942
+ ],
3943
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3944
+ reactNative.Text,
3945
+ {
3946
+ style: [
3947
+ styles17.cardBtnText,
3948
+ { color: theme.colors.accentText, fontFamily: theme.fonts.body }
3949
+ ],
3950
+ children: "Agree"
3951
+ }
3952
+ )
3953
+ }
3954
+ )
3955
+ ] }),
3956
+ shownError ? /* @__PURE__ */ jsxRuntime.jsx(
3957
+ reactNative.Text,
3958
+ {
3959
+ style: [styles17.cardError, { color: theme.colors.danger, fontFamily: theme.fonts.body }],
3960
+ accessibilityLiveRegion: "assertive",
3961
+ children: shownError
3962
+ }
3963
+ ) : null
3964
+ ]
3965
+ }
3966
+ );
3967
+ if (!overlay) return card;
3968
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles17.scrim, { backgroundColor: theme.colors.overlay }, style], children: card });
3969
+ }
3970
+ function RecordingNoticeRow({ msg, meId, nameFor }) {
3971
+ const theme = useTheme();
3972
+ const display = react$1.recordingNoticeDisplayFor(msg, meId, nameFor);
3973
+ if (!display) return null;
3974
+ const time = formatTime2(msg.inserted_at);
3975
+ const label = [display.title, display.detail, time].filter(Boolean).join(", ");
3976
+ const metaStyle = [styles17.meta, { color: theme.colors.textSubtle, fontFamily: theme.fonts.body }];
3977
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles17.noticeWrap, accessible: true, accessibilityLabel: label, children: /* @__PURE__ */ jsxRuntime.jsxs(
3978
+ reactNative.View,
3979
+ {
3980
+ style: [
3981
+ styles17.chip,
3982
+ { backgroundColor: theme.colors.surfaceAlt, borderColor: theme.colors.border }
3983
+ ],
3984
+ children: [
3985
+ /* @__PURE__ */ jsxRuntime.jsx(RecDot, { off: display.event === "stopped" }),
3986
+ /* @__PURE__ */ jsxRuntime.jsx(
3987
+ reactNative.Text,
3988
+ {
3989
+ style: [
3990
+ styles17.chipTitle,
3991
+ { color: theme.colors.textMuted, fontFamily: theme.fonts.body }
3992
+ ],
3993
+ numberOfLines: 1,
3994
+ children: display.title
3995
+ }
3996
+ ),
3997
+ display.detail ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: metaStyle, numberOfLines: 1, children: [
3998
+ "\xB7 ",
3999
+ display.detail
4000
+ ] }) : null,
4001
+ time ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: metaStyle, children: [
4002
+ "\xB7 ",
4003
+ time
4004
+ ] }) : null
4005
+ ]
4006
+ }
4007
+ ) });
4008
+ }
4009
+ function formatTime2(iso) {
4010
+ const d = new Date(iso);
4011
+ if (Number.isNaN(d.getTime())) return "";
4012
+ return d.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
4013
+ }
4014
+ var styles17 = reactNative.StyleSheet.create({
4015
+ dot: { width: 8, height: 8, borderRadius: 4 },
4016
+ pressed: { opacity: 0.6 },
4017
+ banner: {
4018
+ flexDirection: "row",
4019
+ alignItems: "center",
4020
+ gap: 10,
4021
+ paddingHorizontal: 12,
4022
+ paddingVertical: 6,
4023
+ borderBottomWidth: reactNative.StyleSheet.hairlineWidth
4024
+ },
4025
+ bannerText: { flex: 1, minWidth: 0 },
4026
+ bannerTitle: { fontSize: 13, fontWeight: "600" },
4027
+ bannerMeta: { fontSize: 12, fontWeight: "500" },
4028
+ bannerBtn: {
4029
+ paddingHorizontal: 12,
4030
+ paddingVertical: 4,
4031
+ borderRadius: 999,
4032
+ borderWidth: reactNative.StyleSheet.hairlineWidth
4033
+ },
4034
+ bannerBtnText: { fontSize: 12, fontWeight: "600" },
4035
+ indicator: {
4036
+ flexDirection: "row",
4037
+ alignItems: "center",
4038
+ gap: 6,
4039
+ paddingHorizontal: 8,
4040
+ paddingVertical: 2,
4041
+ borderRadius: 999
4042
+ },
4043
+ indicatorText: { fontSize: 11, fontWeight: "700", letterSpacing: 0.4 },
4044
+ scrim: {
4045
+ ...reactNative.StyleSheet.absoluteFillObject,
4046
+ zIndex: 20,
4047
+ alignItems: "center",
4048
+ justifyContent: "center",
4049
+ padding: 16
4050
+ },
4051
+ card: {
4052
+ width: "100%",
4053
+ maxWidth: 380,
4054
+ padding: 18,
4055
+ borderRadius: 16,
4056
+ borderWidth: reactNative.StyleSheet.hairlineWidth
4057
+ },
4058
+ cardHead: { flexDirection: "row", alignItems: "center", gap: 10 },
4059
+ cardTitle: { flex: 1, fontSize: 16, fontWeight: "700" },
4060
+ cardBody: { marginTop: 8, marginBottom: 16, fontSize: 14, lineHeight: 20 },
4061
+ cardActions: { flexDirection: "row", flexWrap: "wrap", justifyContent: "flex-end", gap: 8 },
4062
+ cardBtn: {
4063
+ paddingHorizontal: 16,
4064
+ paddingVertical: 10,
4065
+ borderRadius: 999,
4066
+ borderWidth: reactNative.StyleSheet.hairlineWidth
4067
+ },
4068
+ cardBtnText: { fontSize: 14, fontWeight: "600" },
4069
+ cardError: { marginTop: 10, fontSize: 13, fontWeight: "500" },
4070
+ noticeWrap: {
4071
+ alignItems: "center",
4072
+ alignSelf: "stretch",
4073
+ marginVertical: 6,
4074
+ paddingHorizontal: 16
4075
+ },
4076
+ chip: {
4077
+ flexDirection: "row",
4078
+ alignItems: "center",
4079
+ gap: 6,
4080
+ maxWidth: "100%",
4081
+ paddingHorizontal: 12,
4082
+ paddingVertical: 4,
4083
+ borderRadius: 999,
4084
+ borderWidth: reactNative.StyleSheet.hairlineWidth
4085
+ },
4086
+ chipTitle: { fontSize: 11, fontWeight: "600", letterSpacing: 0.3, flexShrink: 1 },
4087
+ meta: { fontSize: 11, fontWeight: "500", letterSpacing: 0.3, flexShrink: 1 }
4088
+ });
3692
4089
  var forbidden = /* @__PURE__ */ new Set();
3693
4090
  function canShowEditHistory(messageId) {
3694
4091
  return !forbidden.has(messageId);
@@ -3729,12 +4126,12 @@ function EditHistorySheet({
3729
4126
  live = false;
3730
4127
  };
3731
4128
  }, [visible, messageId, chat]);
3732
- const entry = (key, label, body, when) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles17.entry, { borderBottomColor: theme.colors.border }], children: [
3733
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.entryHead, children: [
3734
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.entryLabel, { color: theme.colors.textMuted }], children: label }),
3735
- when ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.entryTime, { color: theme.colors.textSubtle }], children: when }) : null
4129
+ const entry = (key, label, body, when) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles18.entry, { borderBottomColor: theme.colors.border }], children: [
4130
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles18.entryHead, children: [
4131
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.entryLabel, { color: theme.colors.textMuted }], children: label }),
4132
+ when ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.entryTime, { color: theme.colors.textSubtle }], children: when }) : null
3736
4133
  ] }),
3737
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.entryBody, { color: theme.colors.text, fontFamily: theme.fonts.body }], children: body ?? "\u2014" })
4134
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.entryBody, { color: theme.colors.text, fontFamily: theme.fonts.body }], children: body ?? "\u2014" })
3738
4135
  ] }, key);
3739
4136
  return /* @__PURE__ */ jsxRuntime.jsx(
3740
4137
  reactNative.Modal,
@@ -3747,14 +4144,14 @@ function EditHistorySheet({
3747
4144
  children: /* @__PURE__ */ jsxRuntime.jsx(
3748
4145
  reactNative.Pressable,
3749
4146
  {
3750
- style: [styles17.backdrop, { backgroundColor: theme.colors.overlay }],
4147
+ style: [styles18.backdrop, { backgroundColor: theme.colors.overlay }],
3751
4148
  onPress: onClose,
3752
4149
  children: /* @__PURE__ */ jsxRuntime.jsxs(
3753
4150
  reactNative.Pressable,
3754
4151
  {
3755
4152
  onPress: () => void 0,
3756
4153
  style: [
3757
- styles17.sheet,
4154
+ styles18.sheet,
3758
4155
  {
3759
4156
  backgroundColor: theme.colors.surface,
3760
4157
  borderTopLeftRadius: theme.radii.lg,
@@ -3769,12 +4166,12 @@ function EditHistorySheet({
3769
4166
  /* @__PURE__ */ jsxRuntime.jsx(
3770
4167
  reactNative.Text,
3771
4168
  {
3772
- style: [styles17.title, { color: theme.colors.text, fontFamily: theme.fonts.display }],
4169
+ style: [styles18.title, { color: theme.colors.text, fontFamily: theme.fonts.display }],
3773
4170
  accessibilityRole: "header",
3774
4171
  children: "Edit history"
3775
4172
  }
3776
4173
  ),
3777
- failed ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.status, { color: theme.colors.textMuted }], children: "Couldn't load the earlier versions." }) : edits === null ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.ActivityIndicator, { color: theme.colors.accent, style: styles17.spinner }) : /* @__PURE__ */ jsxRuntime.jsxs(reactNative.ScrollView, { style: styles17.scroll, children: [
4174
+ failed ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.status, { color: theme.colors.textMuted }], children: "Couldn't load the earlier versions." }) : edits === null ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.ActivityIndicator, { color: theme.colors.accent, style: styles18.spinner }) : /* @__PURE__ */ jsxRuntime.jsxs(reactNative.ScrollView, { style: styles18.scroll, children: [
3778
4175
  currentBody !== void 0 ? entry("current", "Current", currentBody, "") : null,
3779
4176
  edits.map(
3780
4177
  (e) => entry(
@@ -3784,7 +4181,7 @@ function EditHistorySheet({
3784
4181
  relativeTime(e.written_at)
3785
4182
  )
3786
4183
  ),
3787
- edits.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.status, { color: theme.colors.textMuted }], children: "No earlier versions." }) : null
4184
+ edits.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.status, { color: theme.colors.textMuted }], children: "No earlier versions." }) : null
3788
4185
  ] })
3789
4186
  ]
3790
4187
  }
@@ -3794,7 +4191,7 @@ function EditHistorySheet({
3794
4191
  }
3795
4192
  );
3796
4193
  }
3797
- var styles17 = reactNative.StyleSheet.create({
4194
+ var styles18 = reactNative.StyleSheet.create({
3798
4195
  backdrop: {
3799
4196
  flex: 1,
3800
4197
  justifyContent: "flex-end"
@@ -3872,7 +4269,7 @@ function AttachmentPreview({
3872
4269
  reactNative.View,
3873
4270
  {
3874
4271
  style: [
3875
- styles18.imagePlaceholder,
4272
+ styles19.imagePlaceholder,
3876
4273
  {
3877
4274
  width: maxWidth,
3878
4275
  height: 200,
@@ -3892,7 +4289,7 @@ function AttachmentPreview({
3892
4289
  onPress,
3893
4290
  disabled: !onPress,
3894
4291
  style: [
3895
- styles18.fileCard,
4292
+ styles19.fileCard,
3896
4293
  {
3897
4294
  backgroundColor: onBrand ? "rgba(255,255,255,0.18)" : theme.colors.surfaceAlt,
3898
4295
  borderColor: onBrand ? "transparent" : theme.colors.border,
@@ -3905,12 +4302,12 @@ function AttachmentPreview({
3905
4302
  /* @__PURE__ */ jsxRuntime.jsx(
3906
4303
  reactNative.Text,
3907
4304
  {
3908
- style: [styles18.fileName, { color: ink, fontFamily: theme.fonts.body }],
4305
+ style: [styles19.fileName, { color: ink, fontFamily: theme.fonts.body }],
3909
4306
  numberOfLines: 1,
3910
4307
  children: attachment.original_filename ?? "file"
3911
4308
  }
3912
4309
  ),
3913
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes3(attachment.byte_size) })
4310
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles19.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes3(attachment.byte_size) })
3914
4311
  ] })
3915
4312
  ]
3916
4313
  }
@@ -3922,7 +4319,7 @@ function formatBytes3(n) {
3922
4319
  if (n < 1024 * 1024 * 1024) return `${(n / 1024 / 1024).toFixed(1)} MB`;
3923
4320
  return `${(n / 1024 / 1024 / 1024).toFixed(1)} GB`;
3924
4321
  }
3925
- var styles18 = reactNative.StyleSheet.create({
4322
+ var styles19 = reactNative.StyleSheet.create({
3926
4323
  imagePlaceholder: {},
3927
4324
  fileCard: {
3928
4325
  flexDirection: "row",
@@ -3958,7 +4355,7 @@ function ImageMosaic({
3958
4355
  reactNative.View,
3959
4356
  {
3960
4357
  style: [
3961
- styles19.root,
4358
+ styles20.root,
3962
4359
  {
3963
4360
  borderTopLeftRadius: r,
3964
4361
  borderTopRightRadius: r,
@@ -3979,18 +4376,18 @@ function ImageMosaic({
3979
4376
  {
3980
4377
  onLongPress,
3981
4378
  attachment: visible[0],
3982
- style: styles19.tileFull,
4379
+ style: styles20.tileFull,
3983
4380
  onPress: () => setViewerIndex(0),
3984
4381
  overlay: null
3985
4382
  }
3986
4383
  ) : null,
3987
- n === 2 ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.rowEven, children: [
4384
+ n === 2 ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles20.rowEven, children: [
3988
4385
  /* @__PURE__ */ jsxRuntime.jsx(
3989
4386
  Tile,
3990
4387
  {
3991
4388
  onLongPress,
3992
4389
  attachment: visible[0],
3993
- style: styles19.tileHalfSquare,
4390
+ style: styles20.tileHalfSquare,
3994
4391
  onPress: () => setViewerIndex(0),
3995
4392
  overlay: null
3996
4393
  }
@@ -4000,7 +4397,7 @@ function ImageMosaic({
4000
4397
  {
4001
4398
  onLongPress,
4002
4399
  attachment: visible[1],
4003
- style: styles19.tileHalfSquare,
4400
+ style: styles20.tileHalfSquare,
4004
4401
  onPress: () => setViewerIndex(1),
4005
4402
  overlay: null
4006
4403
  }
@@ -4012,18 +4409,18 @@ function ImageMosaic({
4012
4409
  {
4013
4410
  onLongPress,
4014
4411
  attachment: visible[0],
4015
- style: styles19.tileHero,
4412
+ style: styles20.tileHero,
4016
4413
  onPress: () => setViewerIndex(0),
4017
4414
  overlay: null
4018
4415
  }
4019
4416
  ),
4020
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles19.rowEven, { marginTop: 2 }], children: [
4417
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles20.rowEven, { marginTop: 2 }], children: [
4021
4418
  /* @__PURE__ */ jsxRuntime.jsx(
4022
4419
  Tile,
4023
4420
  {
4024
4421
  onLongPress,
4025
4422
  attachment: visible[1],
4026
- style: styles19.tileHalfSquare,
4423
+ style: styles20.tileHalfSquare,
4027
4424
  onPress: () => setViewerIndex(1),
4028
4425
  overlay: null
4029
4426
  }
@@ -4033,7 +4430,7 @@ function ImageMosaic({
4033
4430
  {
4034
4431
  onLongPress,
4035
4432
  attachment: visible[2],
4036
- style: styles19.tileHalfSquare,
4433
+ style: styles20.tileHalfSquare,
4037
4434
  onPress: () => setViewerIndex(2),
4038
4435
  overlay: null
4039
4436
  }
@@ -4041,13 +4438,13 @@ function ImageMosaic({
4041
4438
  ] })
4042
4439
  ] }) : null,
4043
4440
  n === 4 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4044
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.rowEven, children: [
4441
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles20.rowEven, children: [
4045
4442
  /* @__PURE__ */ jsxRuntime.jsx(
4046
4443
  Tile,
4047
4444
  {
4048
4445
  onLongPress,
4049
4446
  attachment: visible[0],
4050
- style: styles19.tileHalfSquare,
4447
+ style: styles20.tileHalfSquare,
4051
4448
  onPress: () => setViewerIndex(0),
4052
4449
  overlay: null
4053
4450
  }
@@ -4057,19 +4454,19 @@ function ImageMosaic({
4057
4454
  {
4058
4455
  onLongPress,
4059
4456
  attachment: visible[1],
4060
- style: styles19.tileHalfSquare,
4457
+ style: styles20.tileHalfSquare,
4061
4458
  onPress: () => setViewerIndex(1),
4062
4459
  overlay: null
4063
4460
  }
4064
4461
  )
4065
4462
  ] }),
4066
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles19.rowEven, { marginTop: 2 }], children: [
4463
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles20.rowEven, { marginTop: 2 }], children: [
4067
4464
  /* @__PURE__ */ jsxRuntime.jsx(
4068
4465
  Tile,
4069
4466
  {
4070
4467
  onLongPress,
4071
4468
  attachment: visible[2],
4072
- style: styles19.tileHalfSquare,
4469
+ style: styles20.tileHalfSquare,
4073
4470
  onPress: () => setViewerIndex(2),
4074
4471
  overlay: null
4075
4472
  }
@@ -4079,7 +4476,7 @@ function ImageMosaic({
4079
4476
  {
4080
4477
  onLongPress,
4081
4478
  attachment: visible[3],
4082
- style: styles19.tileHalfSquare,
4479
+ style: styles20.tileHalfSquare,
4083
4480
  onPress: () => setViewerIndex(3),
4084
4481
  overlay: overflow > 0 ? `+${overflow}` : null
4085
4482
  }
@@ -4117,18 +4514,18 @@ function Tile({
4117
4514
  }) {
4118
4515
  const theme = useTheme();
4119
4516
  const { url } = react$1.useAttachmentUrl(attachment.id);
4120
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress, onLongPress, style: [styles19.tileBase, style], children: [
4517
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress, onLongPress, style: [styles20.tileBase, style], children: [
4121
4518
  url ? /* @__PURE__ */ jsxRuntime.jsx(
4122
4519
  reactNative.Image,
4123
4520
  {
4124
4521
  source: { uri: url },
4125
- style: [styles19.tileImage, { backgroundColor: theme.colors.surfaceAlt }],
4522
+ style: [styles20.tileImage, { backgroundColor: theme.colors.surfaceAlt }],
4126
4523
  resizeMode: "cover",
4127
4524
  accessible: true,
4128
4525
  accessibilityLabel: attachment.original_filename ?? "image"
4129
4526
  }
4130
- ) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles19.tileImage, { backgroundColor: theme.colors.surfaceAlt }] }),
4131
- overlay ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.overflow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles19.overflowText, children: overlay }) }) : null
4527
+ ) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles20.tileImage, { backgroundColor: theme.colors.surfaceAlt }] }),
4528
+ overlay ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles20.overflow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles20.overflowText, children: overlay }) }) : null
4132
4529
  ] });
4133
4530
  }
4134
4531
  function FullScreenViewer({
@@ -4138,7 +4535,7 @@ function FullScreenViewer({
4138
4535
  const { url } = react$1.useAttachmentUrl(attachment.id);
4139
4536
  const { width, height } = reactNative.useWindowDimensions();
4140
4537
  const insets = useSafeInsets();
4141
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles19.viewer, onPress: onClose, children: [
4538
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles20.viewer, onPress: onClose, children: [
4142
4539
  url ? /* @__PURE__ */ jsxRuntime.jsx(
4143
4540
  reactNative.Image,
4144
4541
  {
@@ -4154,14 +4551,14 @@ function FullScreenViewer({
4154
4551
  {
4155
4552
  onPress: onClose,
4156
4553
  hitSlop: 12,
4157
- style: [styles19.closeBtn, { top: insets.top + 12, right: insets.right + 16 }],
4554
+ style: [styles20.closeBtn, { top: insets.top + 12, right: insets.right + 16 }],
4158
4555
  accessibilityLabel: "Close viewer",
4159
4556
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 20, color: "#ffffff" })
4160
4557
  }
4161
4558
  )
4162
4559
  ] });
4163
4560
  }
4164
- var styles19 = reactNative.StyleSheet.create({
4561
+ var styles20 = reactNative.StyleSheet.create({
4165
4562
  root: {
4166
4563
  width: "100%",
4167
4564
  overflow: "hidden",
@@ -4334,7 +4731,7 @@ function LinkPreviewCard({
4334
4731
  {
4335
4732
  onPress: onRemove,
4336
4733
  hitSlop: 8,
4337
- style: [styles20.remove, { backgroundColor: theme.colors.overlay }],
4734
+ style: [styles21.remove, { backgroundColor: theme.colors.overlay }],
4338
4735
  accessibilityRole: "button",
4339
4736
  accessibilityLabel: "Remove preview",
4340
4737
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 12, color: "#FFFFFF", label: null })
@@ -4350,13 +4747,13 @@ function LinkPreviewCard({
4350
4747
  ...onLongPress ? { onLongPress } : {},
4351
4748
  accessibilityRole: "link",
4352
4749
  accessibilityLabel: preview.title || "Image link",
4353
- style: [styles20.imageOnly, { maxWidth, borderRadius: theme.radii.md }],
4750
+ style: [styles21.imageOnly, { maxWidth, borderRadius: theme.radii.md }],
4354
4751
  children: [
4355
4752
  /* @__PURE__ */ jsxRuntime.jsx(
4356
4753
  reactNative.Image,
4357
4754
  {
4358
4755
  source: { uri: src },
4359
- style: [styles20.inlineImage, { borderRadius: theme.radii.md }],
4756
+ style: [styles21.inlineImage, { borderRadius: theme.radii.md }],
4360
4757
  resizeMode: "cover",
4361
4758
  onError: () => setImageFailed(true),
4362
4759
  accessible: false
@@ -4376,7 +4773,7 @@ function LinkPreviewCard({
4376
4773
  accessibilityRole: "link",
4377
4774
  accessibilityLabel: [site, preview.title].filter(Boolean).join(": ") || preview.url,
4378
4775
  style: ({ pressed }) => [
4379
- styles20.card,
4776
+ styles21.card,
4380
4777
  {
4381
4778
  maxWidth,
4382
4779
  borderRadius: theme.radii.md,
@@ -4391,7 +4788,7 @@ function LinkPreviewCard({
4391
4788
  {
4392
4789
  source: { uri: preview.image_url },
4393
4790
  style: [
4394
- styles20.cardImage,
4791
+ styles21.cardImage,
4395
4792
  { borderTopLeftRadius: theme.radii.md, borderTopRightRadius: theme.radii.md }
4396
4793
  ],
4397
4794
  resizeMode: "cover",
@@ -4399,13 +4796,13 @@ function LinkPreviewCard({
4399
4796
  accessible: false
4400
4797
  }
4401
4798
  ) : null,
4402
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles20.cardBody, { padding: theme.spacing.sm, gap: 2 }], children: [
4403
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles20.siteLine, children: [
4799
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles21.cardBody, { padding: theme.spacing.sm, gap: 2 }], children: [
4800
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.siteLine, children: [
4404
4801
  preview.favicon_url && !faviconFailed ? /* @__PURE__ */ jsxRuntime.jsx(
4405
4802
  reactNative.Image,
4406
4803
  {
4407
4804
  source: { uri: preview.favicon_url },
4408
- style: styles20.favicon,
4805
+ style: styles21.favicon,
4409
4806
  onError: () => setFaviconFailed(true),
4410
4807
  accessible: false
4411
4808
  }
@@ -4413,7 +4810,7 @@ function LinkPreviewCard({
4413
4810
  /* @__PURE__ */ jsxRuntime.jsx(
4414
4811
  reactNative.Text,
4415
4812
  {
4416
- style: [styles20.site, { color: muted, fontFamily: theme.fonts.body }],
4813
+ style: [styles21.site, { color: muted, fontFamily: theme.fonts.body }],
4417
4814
  numberOfLines: 1,
4418
4815
  children: site
4419
4816
  }
@@ -4423,7 +4820,7 @@ function LinkPreviewCard({
4423
4820
  reactNative.Text,
4424
4821
  {
4425
4822
  style: [
4426
- styles20.title,
4823
+ styles21.title,
4427
4824
  { color: onBrand ? text : theme.colors.link, fontFamily: theme.fonts.body }
4428
4825
  ],
4429
4826
  numberOfLines: 2,
@@ -4433,7 +4830,7 @@ function LinkPreviewCard({
4433
4830
  preview.description ? /* @__PURE__ */ jsxRuntime.jsx(
4434
4831
  reactNative.Text,
4435
4832
  {
4436
- style: [styles20.description, { color: muted, fontFamily: theme.fonts.body }],
4833
+ style: [styles21.description, { color: muted, fontFamily: theme.fonts.body }],
4437
4834
  numberOfLines: 2,
4438
4835
  children: preview.description
4439
4836
  }
@@ -4448,7 +4845,7 @@ function hostOf(url) {
4448
4845
  const m = /^[a-z][a-z0-9+.-]*:\/\/([^/?#]+)/i.exec(url);
4449
4846
  return (m?.[1] ?? url).replace(/^www\./, "");
4450
4847
  }
4451
- var styles20 = reactNative.StyleSheet.create({
4848
+ var styles21 = reactNative.StyleSheet.create({
4452
4849
  card: {
4453
4850
  alignSelf: "stretch",
4454
4851
  borderLeftWidth: 3,
@@ -4555,7 +4952,7 @@ function MessageBubble({
4555
4952
  const isEdited = !!message.edited_at && !isDeleted;
4556
4953
  const trimmable = maxBodyLength > 0 && body.length > maxBodyLength;
4557
4954
  const truncated = trimmable && !expanded ? body.slice(0, maxBodyLength) + "\u2026" : body;
4558
- const time = formatTime2(message.inserted_at, timeFormat);
4955
+ const time = formatTime3(message.inserted_at, timeFormat);
4559
4956
  const images = showAttachments && !isDeleted ? (message.attachments ?? []).filter((a) => isImageContentType(a.content_type)) : [];
4560
4957
  const files = showAttachments && !isDeleted ? (message.attachments ?? []).filter((a) => !isImageContentType(a.content_type)) : [];
4561
4958
  const hasMedia = images.length > 0;
@@ -4574,16 +4971,16 @@ function MessageBubble({
4574
4971
  reactNative.View,
4575
4972
  {
4576
4973
  style: [
4577
- styles21.metaRow,
4578
- variant === "inline" && styles21.metaInline,
4579
- variant === "inline" && dense && styles21.metaInlineDense,
4580
- variant === "wrapped" && styles21.metaWrapped,
4581
- variant === "overlay" && styles21.metaOverlay,
4582
- variant === "block" && styles21.metaBlock,
4974
+ styles22.metaRow,
4975
+ variant === "inline" && styles22.metaInline,
4976
+ variant === "inline" && dense && styles22.metaInlineDense,
4977
+ variant === "wrapped" && styles22.metaWrapped,
4978
+ variant === "overlay" && styles22.metaOverlay,
4979
+ variant === "block" && styles22.metaBlock,
4583
4980
  // File-only bubble: the meta row follows the cards directly —
4584
4981
  // give it air so the time doesn't sit glued to the card.
4585
- variant === "block" && hasFiles && !hasBody && styles21.metaBlockAfterFiles,
4586
- variant === "jumbo" && styles21.metaJumbo
4982
+ variant === "block" && hasFiles && !hasBody && styles22.metaBlockAfterFiles,
4983
+ variant === "jumbo" && styles22.metaJumbo
4587
4984
  ],
4588
4985
  onLayout: variant === "inline" || variant === "wrapped" ? (e) => setMetaWidth(e.nativeEvent.layout.width) : void 0,
4589
4986
  pointerEvents: isEdited && onEditedPress ? "box-none" : "none",
@@ -4591,7 +4988,7 @@ function MessageBubble({
4591
4988
  isEdited ? /* @__PURE__ */ jsxRuntime.jsx(
4592
4989
  reactNative.Text,
4593
4990
  {
4594
- style: [styles21.editedTag, { color, opacity: 0.8 }],
4991
+ style: [styles22.editedTag, { color, opacity: 0.8 }],
4595
4992
  ...onEditedPress ? {
4596
4993
  onPress: onEditedPress,
4597
4994
  suppressHighlighting: true,
@@ -4602,8 +4999,8 @@ function MessageBubble({
4602
4999
  children: "edited"
4603
5000
  }
4604
5001
  ) : null,
4605
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles21.meta, { color, opacity: variant === "overlay" ? 1 : 0.75 }], children: time }),
4606
- isSelf && readState ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles21.readTick, children: /* @__PURE__ */ jsxRuntime.jsx(
5002
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.meta, { color, opacity: variant === "overlay" ? 1 : 0.75 }], children: time }),
5003
+ isSelf && readState ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles22.readTick, children: /* @__PURE__ */ jsxRuntime.jsx(
4607
5004
  PoolseIcon,
4608
5005
  {
4609
5006
  name: readState === "read" ? "check-double" : "check",
@@ -4619,7 +5016,7 @@ function MessageBubble({
4619
5016
  reactNative.View,
4620
5017
  {
4621
5018
  style: [
4622
- styles21.wrap,
5019
+ styles22.wrap,
4623
5020
  { alignSelf: isSelf ? "flex-end" : "flex-start", maxWidth: bubbleMaxWidth }
4624
5021
  ],
4625
5022
  children: [
@@ -4645,7 +5042,7 @@ function MessageBubble({
4645
5042
  showSenderName && !isSelf && jumboCount === 0 && (groupPosition === "first" || groupPosition === "standalone") ? /* @__PURE__ */ jsxRuntime.jsx(
4646
5043
  reactNative.Text,
4647
5044
  {
4648
- style: [styles21.senderName, { color: senderTint, fontFamily: theme.fonts.body }],
5045
+ style: [styles22.senderName, { color: senderTint, fontFamily: theme.fonts.body }],
4649
5046
  ...onSenderPress ? {
4650
5047
  onPress: onSenderPress,
4651
5048
  accessibilityRole: "button",
@@ -4672,7 +5069,7 @@ function MessageBubble({
4672
5069
  // 3px of bubble color framing the picture; the mosaic clips
4673
5070
  // itself 3px tighter than the bubble so the curves stay
4674
5071
  // concentric.
4675
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.mediaFrame, children: [
5072
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.mediaFrame, children: [
4676
5073
  /* @__PURE__ */ jsxRuntime.jsx(
4677
5074
  ImageMosaic,
4678
5075
  {
@@ -4686,7 +5083,7 @@ function MessageBubble({
4686
5083
  metaOverlay ? metaRow("overlay") : null
4687
5084
  ] })
4688
5085
  ) : null,
4689
- hasFiles ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles21.filesBlock, children: files.map((att) => /* @__PURE__ */ jsxRuntime.jsx(
5086
+ hasFiles ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles22.filesBlock, children: files.map((att) => /* @__PURE__ */ jsxRuntime.jsx(
4690
5087
  AttachmentPreview,
4691
5088
  {
4692
5089
  attachment: att,
@@ -4705,9 +5102,9 @@ function MessageBubble({
4705
5102
  reactNative.View,
4706
5103
  {
4707
5104
  style: [
4708
- styles21.textBlock,
4709
- dense && styles21.textBlockDense,
4710
- sectionAbove && styles21.textBlockAfter
5105
+ styles22.textBlock,
5106
+ dense && styles22.textBlockDense,
5107
+ sectionAbove && styles22.textBlockAfter
4711
5108
  ],
4712
5109
  children: /* @__PURE__ */ jsxRuntime.jsx(
4713
5110
  reactNative.Text,
@@ -4725,7 +5122,7 @@ function MessageBubble({
4725
5122
  )
4726
5123
  }
4727
5124
  ) : null,
4728
- hasBody && jumboCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles21.jumboBlock, children: /* @__PURE__ */ jsxRuntime.jsx(
5125
+ hasBody && jumboCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles22.jumboBlock, children: /* @__PURE__ */ jsxRuntime.jsx(
4729
5126
  reactNative.Text,
4730
5127
  {
4731
5128
  style: {
@@ -4739,9 +5136,9 @@ function MessageBubble({
4739
5136
  reactNative.View,
4740
5137
  {
4741
5138
  style: [
4742
- styles21.textBlock,
4743
- dense && styles21.textBlockDense,
4744
- sectionAbove && styles21.textBlockAfter
5139
+ styles22.textBlock,
5140
+ dense && styles22.textBlockDense,
5141
+ sectionAbove && styles22.textBlockAfter
4745
5142
  ],
4746
5143
  onLayout: inlineMeta ? (e) => setTextBoxWidth(e.nativeEvent.layout.width - 24) : void 0,
4747
5144
  children: [
@@ -4776,7 +5173,7 @@ function MessageBubble({
4776
5173
  reactNative.Text,
4777
5174
  {
4778
5175
  style: [
4779
- styles21.readMore,
5176
+ styles22.readMore,
4780
5177
  { color: isSelf ? theme.colors.ownBubbleText : theme.colors.link }
4781
5178
  ],
4782
5179
  children: expanded ? "Show less" : "Read more"
@@ -4791,7 +5188,7 @@ function MessageBubble({
4791
5188
  hasPreviews ? (
4792
5189
  // A fixed width, like media: a card squeezed into the width of
4793
5190
  // a one-word message would be unreadable.
4794
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles21.previews, !hasBody && styles21.previewsAlone, { width: mediaWidth }], children: previews.map((p) => /* @__PURE__ */ jsxRuntime.jsx(
5191
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles22.previews, !hasBody && styles22.previewsAlone, { width: mediaWidth }], children: previews.map((p) => /* @__PURE__ */ jsxRuntime.jsx(
4795
5192
  LinkPreviewCard,
4796
5193
  {
4797
5194
  preview: p,
@@ -4803,7 +5200,7 @@ function MessageBubble({
4803
5200
  )) })
4804
5201
  ) : null,
4805
5202
  !inlineMeta && !metaOverlay && jumboCount === 0 ? metaRow("block") : null,
4806
- actionsTrigger ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles21.actionsSlot, children: actionsTrigger }) : null
5203
+ actionsTrigger ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles22.actionsSlot, children: actionsTrigger }) : null
4807
5204
  ]
4808
5205
  }
4809
5206
  ),
@@ -4830,15 +5227,15 @@ function QuotedCard({
4830
5227
  onPress,
4831
5228
  disabled: !onPress,
4832
5229
  style: [
4833
- styles21.quoted,
5230
+ styles22.quoted,
4834
5231
  {
4835
5232
  backgroundColor: bg,
4836
5233
  borderLeftColor: accent
4837
5234
  }
4838
5235
  ],
4839
5236
  children: [
4840
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles21.quotedSender, { color: accent }], numberOfLines: 1, children: senderName }),
4841
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles21.quotedBody, { color: txt }], numberOfLines: 2, children: quoted.deleted_at ? "Original message deleted" : quoted.body ?? "\u2026" })
5237
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.quotedSender, { color: accent }], numberOfLines: 1, children: senderName }),
5238
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.quotedBody, { color: txt }], numberOfLines: 2, children: quoted.deleted_at ? "Original message deleted" : quoted.body ?? "\u2026" })
4842
5239
  ]
4843
5240
  }
4844
5241
  );
@@ -4847,7 +5244,7 @@ function isImageContentType(ct) {
4847
5244
  if (!ct) return false;
4848
5245
  return ct.startsWith("image/");
4849
5246
  }
4850
- function formatTime2(iso, format2) {
5247
+ function formatTime3(iso, format2) {
4851
5248
  try {
4852
5249
  const d = new Date(iso);
4853
5250
  if (typeof format2 === "function") return format2(d);
@@ -4871,7 +5268,7 @@ function formatTime2(iso, format2) {
4871
5268
  function isSameDay(a, b) {
4872
5269
  return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
4873
5270
  }
4874
- var styles21 = reactNative.StyleSheet.create({
5271
+ var styles22 = reactNative.StyleSheet.create({
4875
5272
  wrap: {
4876
5273
  marginBottom: 2
4877
5274
  },
@@ -5032,7 +5429,7 @@ function ReactionStrip({
5032
5429
  });
5033
5430
  const entries = Object.entries(reactions);
5034
5431
  if (entries.length === 0) return null;
5035
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.strip, children: [
5432
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles23.strip, children: [
5036
5433
  entries.map(([emoji, userIds]) => {
5037
5434
  const userArr = Array.isArray(userIds) ? userIds : [];
5038
5435
  const meReacted = meId !== null && userArr.includes(meId);
@@ -5045,7 +5442,7 @@ function ReactionStrip({
5045
5442
  accessibilityState: { selected: meReacted },
5046
5443
  accessibilityHint: meReacted ? "Removes your reaction" : "Adds this reaction",
5047
5444
  style: [
5048
- styles22.chip,
5445
+ styles23.chip,
5049
5446
  {
5050
5447
  backgroundColor: meReacted ? theme.colors.accentSoft : theme.colors.surfaceAlt,
5051
5448
  borderColor: meReacted ? theme.colors.accent : theme.colors.border,
@@ -5054,12 +5451,12 @@ function ReactionStrip({
5054
5451
  }
5055
5452
  ],
5056
5453
  children: [
5057
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles22.emoji, children: emoji }),
5454
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles23.emoji, children: emoji }),
5058
5455
  /* @__PURE__ */ jsxRuntime.jsx(
5059
5456
  reactNative.Text,
5060
5457
  {
5061
5458
  style: [
5062
- styles22.count,
5459
+ styles23.count,
5063
5460
  {
5064
5461
  color: meReacted ? theme.colors.accent : theme.colors.textMuted,
5065
5462
  fontWeight: meReacted ? "700" : "600"
@@ -5079,7 +5476,7 @@ function ReactionStrip({
5079
5476
  onPress: onMorePress,
5080
5477
  hitSlop: 4,
5081
5478
  style: [
5082
- styles22.chip,
5479
+ styles23.chip,
5083
5480
  {
5084
5481
  backgroundColor: theme.colors.surfaceAlt,
5085
5482
  borderColor: theme.colors.border,
@@ -5112,13 +5509,13 @@ function ReactionPicker({
5112
5509
  children: /* @__PURE__ */ jsxRuntime.jsx(
5113
5510
  reactNative.Pressable,
5114
5511
  {
5115
- style: [styles22.backdrop, { paddingTop: insets.top, paddingBottom: insets.bottom }],
5512
+ style: [styles23.backdrop, { paddingTop: insets.top, paddingBottom: insets.bottom }],
5116
5513
  onPress: onClose,
5117
5514
  children: /* @__PURE__ */ jsxRuntime.jsx(
5118
5515
  reactNative.View,
5119
5516
  {
5120
5517
  style: [
5121
- styles22.sheet,
5518
+ styles23.sheet,
5122
5519
  {
5123
5520
  backgroundColor: theme.colors.surface,
5124
5521
  borderRadius: theme.radii.lg
@@ -5128,12 +5525,12 @@ function ReactionPicker({
5128
5525
  children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
5129
5526
  reactNative.Pressable,
5130
5527
  {
5131
- style: styles22.emojiBtn,
5528
+ style: styles23.emojiBtn,
5132
5529
  onPress: () => {
5133
5530
  onPick(emoji);
5134
5531
  onClose();
5135
5532
  },
5136
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles22.bigEmoji, children: emoji })
5533
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles23.bigEmoji, children: emoji })
5137
5534
  },
5138
5535
  emoji
5139
5536
  ))
@@ -5144,7 +5541,7 @@ function ReactionPicker({
5144
5541
  }
5145
5542
  );
5146
5543
  }
5147
- var styles22 = reactNative.StyleSheet.create({
5544
+ var styles23 = reactNative.StyleSheet.create({
5148
5545
  strip: {
5149
5546
  flexDirection: "row",
5150
5547
  flexWrap: "wrap",
@@ -5213,12 +5610,12 @@ function SendStatus({ message, onRetry, onDiscard, alignEnd = true }) {
5213
5610
  accessibilityRole: "button",
5214
5611
  accessibilityLabel: `${label} message`,
5215
5612
  hitSlop: 8,
5216
- style: styles23.button,
5613
+ style: styles24.button,
5217
5614
  children: /* @__PURE__ */ jsxRuntime.jsx(
5218
5615
  reactNative.Text,
5219
5616
  {
5220
5617
  style: [
5221
- styles23.buttonText,
5618
+ styles24.buttonText,
5222
5619
  { color: danger ? theme.colors.danger : theme.colors.accentStrong },
5223
5620
  { fontFamily: theme.fonts.body }
5224
5621
  ],
@@ -5230,14 +5627,14 @@ function SendStatus({ message, onRetry, onDiscard, alignEnd = true }) {
5230
5627
  return /* @__PURE__ */ jsxRuntime.jsxs(
5231
5628
  reactNative.View,
5232
5629
  {
5233
- style: [styles23.root, { justifyContent: alignEnd ? "flex-end" : "flex-start" }],
5630
+ style: [styles24.root, { justifyContent: alignEnd ? "flex-end" : "flex-start" }],
5234
5631
  accessibilityLiveRegion: "polite",
5235
5632
  children: [
5236
5633
  /* @__PURE__ */ jsxRuntime.jsx(
5237
5634
  reactNative.Text,
5238
5635
  {
5239
5636
  style: [
5240
- styles23.text,
5637
+ styles24.text,
5241
5638
  { color: failed ? theme.colors.danger : theme.colors.textMuted },
5242
5639
  { fontFamily: theme.fonts.body }
5243
5640
  ],
@@ -5250,7 +5647,7 @@ function SendStatus({ message, onRetry, onDiscard, alignEnd = true }) {
5250
5647
  }
5251
5648
  );
5252
5649
  }
5253
- var styles23 = reactNative.StyleSheet.create({
5650
+ var styles24 = reactNative.StyleSheet.create({
5254
5651
  root: {
5255
5652
  flexDirection: "row",
5256
5653
  flexWrap: "wrap",
@@ -5303,7 +5700,7 @@ function ThreadSummary({
5303
5700
  accessibilityLabel: `${label}. Open thread`,
5304
5701
  hitSlop: 4,
5305
5702
  style: ({ pressed }) => [
5306
- styles24.row,
5703
+ styles25.row,
5307
5704
  {
5308
5705
  alignSelf: alignEnd ? "flex-end" : "flex-start",
5309
5706
  borderRadius: theme.radii.pill,
@@ -5311,11 +5708,11 @@ function ThreadSummary({
5311
5708
  }
5312
5709
  ],
5313
5710
  children: [
5314
- people.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles24.stack, children: people.map((p, i) => /* @__PURE__ */ jsxRuntime.jsx(
5711
+ people.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles25.stack, children: people.map((p, i) => /* @__PURE__ */ jsxRuntime.jsx(
5315
5712
  reactNative.View,
5316
5713
  {
5317
5714
  style: [
5318
- styles24.stacked,
5715
+ styles25.stacked,
5319
5716
  {
5320
5717
  marginLeft: i === 0 ? 0 : -6,
5321
5718
  borderColor: theme.colors.background,
@@ -5337,7 +5734,7 @@ function ThreadSummary({
5337
5734
  /* @__PURE__ */ jsxRuntime.jsx(
5338
5735
  reactNative.Text,
5339
5736
  {
5340
- style: [styles24.text, { color: theme.colors.link, fontFamily: theme.fonts.body }],
5737
+ style: [styles25.text, { color: theme.colors.link, fontFamily: theme.fonts.body }],
5341
5738
  numberOfLines: 1,
5342
5739
  children: label
5343
5740
  }
@@ -5357,7 +5754,7 @@ function Participant({
5357
5754
  const src = externalId ? avatarFor?.(externalId) ?? resolved.profile?.avatarUrl ?? null : null;
5358
5755
  return /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src, name, seed: externalId ?? fallback, size: "xs" });
5359
5756
  }
5360
- var styles24 = reactNative.StyleSheet.create({
5757
+ var styles25 = reactNative.StyleSheet.create({
5361
5758
  row: {
5362
5759
  flexDirection: "row",
5363
5760
  alignItems: "center",
@@ -5473,10 +5870,10 @@ function FlatMessageRow({
5473
5870
  reactNative.Text,
5474
5871
  {
5475
5872
  style: [
5476
- styles25.name,
5873
+ styles26.name,
5477
5874
  text,
5478
5875
  compact ? { color: userColor(ext ?? msg.sender_id ?? msg.id) } : null,
5479
- compact ? styles25.nameCompact : null
5876
+ compact ? styles26.nameCompact : null
5480
5877
  ],
5481
5878
  numberOfLines: 1,
5482
5879
  ...onSenderPress && !isSelf ? {
@@ -5491,22 +5888,22 @@ function FlatMessageRow({
5491
5888
  reactNative.Text,
5492
5889
  {
5493
5890
  style: [
5494
- styles25.time,
5891
+ styles26.time,
5495
5892
  { color: theme.colors.textSubtle, fontFamily: theme.fonts.body },
5496
- dim ? styles25.timeDim : null
5893
+ dim ? styles26.timeDim : null
5497
5894
  ],
5498
5895
  ...dim ? { numberOfLines: 1, adjustsFontSizeToFit: true, minimumFontScale: 0.6 } : {},
5499
5896
  children: dim ? gutterTime(time) : time
5500
5897
  }
5501
5898
  );
5502
- const header = compact ? name : isRunStart ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles25.header, children: [
5899
+ const header = compact ? name : isRunStart ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles26.header, children: [
5503
5900
  name,
5504
5901
  timeText(false)
5505
5902
  ] }) : null;
5506
5903
  const images = attachments && !deleted ? (msg.attachments ?? []).filter((a) => isImageContentType(a.content_type)) : [];
5507
5904
  const files = attachments && !deleted ? (msg.attachments ?? []).filter((a) => !isImageContentType(a.content_type)) : [];
5508
5905
  const mediaWidth = Math.min(screenWidth - GUTTER - 48, 320);
5509
- const attachmentsEl = images.length > 0 || files.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles25.attachments, children: [
5906
+ const attachmentsEl = images.length > 0 || files.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles26.attachments, children: [
5510
5907
  images.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
5511
5908
  ImageMosaic,
5512
5909
  {
@@ -5529,11 +5926,11 @@ function FlatMessageRow({
5529
5926
  lineHeight: dense ? theme.fonts.lineHeight - 3 : theme.fonts.lineHeight
5530
5927
  };
5531
5928
  const edited = !!msg.edited_at && !deleted;
5532
- const meta = edited || isSelf && readState ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles25.meta, children: [
5929
+ const meta = edited || isSelf && readState ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles26.meta, children: [
5533
5930
  edited ? /* @__PURE__ */ jsxRuntime.jsx(
5534
5931
  reactNative.Text,
5535
5932
  {
5536
- style: [styles25.edited, { color: theme.colors.textSubtle }],
5933
+ style: [styles26.edited, { color: theme.colors.textSubtle }],
5537
5934
  ...editHistory && canShowEditHistory(msg.id) ? {
5538
5935
  onPress: () => setHistoryOpen(true),
5539
5936
  suppressHighlighting: true,
@@ -5553,7 +5950,7 @@ function FlatMessageRow({
5553
5950
  }
5554
5951
  ) : null
5555
5952
  ] }) : null;
5556
- const body = deleted ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [bodyText, styles25.deleted, { color: theme.colors.textMuted }], children: "This message was deleted" }) : raw ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { children: [
5953
+ const body = deleted ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [bodyText, styles26.deleted, { color: theme.colors.textMuted }], children: "This message was deleted" }) : raw ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { children: [
5557
5954
  jumbo > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { fontSize: emojiFontSize(jumbo), lineHeight: emojiFontSize(jumbo) + 8 }, children: raw }) : markdown && hasMarkdown(shown) ? renderMarkdown(shown, {
5558
5955
  textColor: bodyText.color,
5559
5956
  linkColor: theme.colors.link,
@@ -5565,8 +5962,8 @@ function FlatMessageRow({
5565
5962
  return false;
5566
5963
  }
5567
5964
  }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: bodyText, children: shown }),
5568
- trimmable ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: () => setExpanded((e) => !e), children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.readMore, { color: theme.colors.link }], children: expanded ? "Show less" : "Read more" }) }) : null,
5569
- previews.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles25.previews, children: previews.map((p) => /* @__PURE__ */ jsxRuntime.jsx(
5965
+ trimmable ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: () => setExpanded((e) => !e), children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles26.readMore, { color: theme.colors.link }], children: expanded ? "Show less" : "Read more" }) }) : null,
5966
+ previews.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles26.previews, children: previews.map((p) => /* @__PURE__ */ jsxRuntime.jsx(
5570
5967
  LinkPreviewCard,
5571
5968
  {
5572
5969
  preview: p,
@@ -5590,7 +5987,7 @@ function FlatMessageRow({
5590
5987
  }
5591
5988
  ) : null
5592
5989
  );
5593
- const reactionsEl = reactions && !inert ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles25.reactions, children: /* @__PURE__ */ jsxRuntime.jsx(
5990
+ const reactionsEl = reactions && !inert ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles26.reactions, children: /* @__PURE__ */ jsxRuntime.jsx(
5594
5991
  ReactionStrip,
5595
5992
  {
5596
5993
  messageId: msg.id,
@@ -5609,7 +6006,7 @@ function FlatMessageRow({
5609
6006
  ...onQuotedClick ? { onPress: () => onQuotedClick(msg.quoted_message.id) } : {}
5610
6007
  }
5611
6008
  ) : null;
5612
- const content = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles25.content, children: [
6009
+ const content = /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles26.content, children: [
5613
6010
  !compact ? renderSlot(slots?.header, ctx, header) : null,
5614
6011
  quote,
5615
6012
  renderSlot(slots?.attachments, ctx, attachmentsEl),
@@ -5650,19 +6047,19 @@ function FlatMessageRow({
5650
6047
  reactNative.View,
5651
6048
  {
5652
6049
  style: [
5653
- styles25.row,
5654
- compact ? styles25.rowCompact : null,
5655
- dense ? styles25.rowDense : null,
5656
- !compact && isRunStart ? dense ? styles25.runStartDense : styles25.runStart : null,
6050
+ styles26.row,
6051
+ compact ? styles26.rowCompact : null,
6052
+ dense ? styles26.rowDense : null,
6053
+ !compact && isRunStart ? dense ? styles26.runStartDense : styles26.runStart : null,
5657
6054
  mentionsMe ? { backgroundColor: theme.colors.mention, borderLeftColor: theme.colors.accent } : null,
5658
- isEditing ? styles25.rowEditing : null
6055
+ isEditing ? styles26.rowEditing : null
5659
6056
  ],
5660
6057
  children: [
5661
6058
  /* @__PURE__ */ jsxRuntime.jsx(
5662
6059
  reactNative.Pressable,
5663
6060
  {
5664
6061
  onLongPress: openActions,
5665
- style: [styles25.line, compact ? styles25.lineCompact : null],
6062
+ style: [styles26.line, compact ? styles26.lineCompact : null],
5666
6063
  accessibilityLabel: messageA11yLabel(msg, senderName, isSelf),
5667
6064
  ...actions && !inert ? {
5668
6065
  accessibilityHint: "Long press for message actions",
@@ -5671,11 +6068,11 @@ function FlatMessageRow({
5671
6068
  } : {},
5672
6069
  children: compact ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5673
6070
  timeText(false),
5674
- avatar ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles25.avatarCompact, children: avatar }) : null,
6071
+ avatar ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles26.avatarCompact, children: avatar }) : null,
5675
6072
  renderSlot(slots?.header, ctx, header),
5676
6073
  content
5677
6074
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5678
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles25.gutter, children: isRunStart ? avatar : timeText(true) }),
6075
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles26.gutter, children: isRunStart ? avatar : timeText(true) }),
5679
6076
  content
5680
6077
  ] })
5681
6078
  }
@@ -5696,7 +6093,7 @@ function FlatMessageRow({
5696
6093
  }
5697
6094
  );
5698
6095
  }
5699
- var styles25 = reactNative.StyleSheet.create({
6096
+ var styles26 = reactNative.StyleSheet.create({
5700
6097
  row: {
5701
6098
  // 3px left border reserved for the mention accent bar.
5702
6099
  borderLeftWidth: 3,
@@ -5848,13 +6245,13 @@ function MessageActions({
5848
6245
  animationType: "fade",
5849
6246
  onRequestClose: onClose,
5850
6247
  ...EDGE_TO_EDGE_MODAL,
5851
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles26.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
6248
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles27.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
5852
6249
  reactNative.Pressable,
5853
6250
  {
5854
6251
  onPress: () => void 0,
5855
6252
  accessible: false,
5856
6253
  style: [
5857
- styles26.sheet,
6254
+ styles27.sheet,
5858
6255
  {
5859
6256
  backgroundColor: theme.colors.surface,
5860
6257
  borderTopLeftRadius: theme.radii.lg,
@@ -5867,7 +6264,7 @@ function MessageActions({
5867
6264
  theme.shadows.lg
5868
6265
  ],
5869
6266
  children: [
5870
- showEmojiRow ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles26.emojiRow, { borderBottomColor: theme.colors.border }], children: [
6267
+ showEmojiRow ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles27.emojiRow, { borderBottomColor: theme.colors.border }], children: [
5871
6268
  emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
5872
6269
  reactNative.Pressable,
5873
6270
  {
@@ -5875,10 +6272,10 @@ function MessageActions({
5875
6272
  onPickReaction(emoji);
5876
6273
  onClose();
5877
6274
  },
5878
- style: styles26.emojiBtn,
6275
+ style: styles27.emojiBtn,
5879
6276
  hitSlop: 6,
5880
6277
  accessibilityLabel: `React with ${emoji}`,
5881
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles26.emoji, children: emoji })
6278
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles27.emoji, children: emoji })
5882
6279
  },
5883
6280
  emoji
5884
6281
  )),
@@ -5889,7 +6286,7 @@ function MessageActions({
5889
6286
  onClose();
5890
6287
  onMoreReactions();
5891
6288
  },
5892
- style: [styles26.moreBtn, { backgroundColor: theme.colors.surfaceAlt }],
6289
+ style: [styles27.moreBtn, { backgroundColor: theme.colors.surfaceAlt }],
5893
6290
  hitSlop: 6,
5894
6291
  accessibilityRole: "button",
5895
6292
  accessibilityLabel: "More reactions",
@@ -5897,7 +6294,7 @@ function MessageActions({
5897
6294
  }
5898
6295
  ) : null
5899
6296
  ] }) : null,
5900
- items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress: item.onPress, style: styles26.item, children: [
6297
+ items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress: item.onPress, style: styles27.item, children: [
5901
6298
  /* @__PURE__ */ jsxRuntime.jsx(
5902
6299
  PoolseIcon,
5903
6300
  {
@@ -5910,7 +6307,7 @@ function MessageActions({
5910
6307
  reactNative.Text,
5911
6308
  {
5912
6309
  style: [
5913
- styles26.itemText,
6310
+ styles27.itemText,
5914
6311
  {
5915
6312
  color: item.danger ? theme.colors.danger : theme.colors.text,
5916
6313
  fontFamily: theme.fonts.body
@@ -5930,7 +6327,7 @@ function hostOf2(url) {
5930
6327
  const m = /^[a-z][a-z0-9+.-]*:\/\/([^/?#]+)/i.exec(url);
5931
6328
  return (m?.[1] ?? url).replace(/^www\./, "");
5932
6329
  }
5933
- var styles26 = reactNative.StyleSheet.create({
6330
+ var styles27 = reactNative.StyleSheet.create({
5934
6331
  backdrop: {
5935
6332
  flex: 1,
5936
6333
  backgroundColor: "rgba(0,0,0,0.35)",
@@ -6047,6 +6444,16 @@ function RowSheets({
6047
6444
  ] });
6048
6445
  }
6049
6446
  function MessageRow(props) {
6447
+ if (react$1.recordingNoticeDisplayFor(props.msg, props.meId)) {
6448
+ return /* @__PURE__ */ jsxRuntime.jsx(
6449
+ RecordingNoticeRow,
6450
+ {
6451
+ msg: props.msg,
6452
+ meId: props.meId,
6453
+ ...props.nameForUserId ? { nameFor: props.nameForUserId } : {}
6454
+ }
6455
+ );
6456
+ }
6050
6457
  const callLog = react$1.callLogDisplayFor(props.msg, props.meId);
6051
6458
  if (callLog !== void 0) {
6052
6459
  return callLog ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -6212,16 +6619,16 @@ function BubbleMessageRow({
6212
6619
  reactNative.View,
6213
6620
  {
6214
6621
  style: [
6215
- styles27.row,
6622
+ styles28.row,
6216
6623
  { alignSelf: isSelf ? "flex-end" : "flex-start" },
6217
- density === "compact" ? styles27.rowDense : null,
6624
+ density === "compact" ? styles28.rowDense : null,
6218
6625
  // Lift this row above the dim backdrop the parent renders
6219
6626
  // during edit mode. zIndex covers iOS / web; elevation does
6220
6627
  // the equivalent on Android.
6221
- isEditing ? styles27.rowEditing : null
6628
+ isEditing ? styles28.rowEditing : null
6222
6629
  ],
6223
6630
  children: [
6224
- showAvatarSlot ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles27.avatarSlot, children: !showAvatarRender ? null : onAvatarPress ? /* @__PURE__ */ jsxRuntime.jsx(
6631
+ showAvatarSlot ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles28.avatarSlot, children: !showAvatarRender ? null : onAvatarPress ? /* @__PURE__ */ jsxRuntime.jsx(
6225
6632
  reactNative.Pressable,
6226
6633
  {
6227
6634
  onPress: () => onAvatarPress(sender),
@@ -6231,14 +6638,14 @@ function BubbleMessageRow({
6231
6638
  children: avatar
6232
6639
  }
6233
6640
  ) : avatar }) : null,
6234
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles27.bubbleCol, children: [
6641
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles28.bubbleCol, children: [
6235
6642
  swipeEnabled ? /* @__PURE__ */ jsxRuntime.jsx(
6236
6643
  reactNative.Animated.View,
6237
6644
  {
6238
6645
  pointerEvents: "none",
6239
6646
  style: [
6240
- styles27.replyHint,
6241
- isSelf ? styles27.replyHintRight : styles27.replyHintLeft,
6647
+ styles28.replyHint,
6648
+ isSelf ? styles28.replyHintRight : styles28.replyHintLeft,
6242
6649
  {
6243
6650
  opacity: replyIconOpacity,
6244
6651
  transform: [{ scale: replyIconScale }],
@@ -6320,7 +6727,7 @@ function BubbleMessageRow({
6320
6727
  renderSlot(
6321
6728
  slots?.reactions,
6322
6729
  slotContext,
6323
- reactions && !tombstone ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles27.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsxRuntime.jsx(
6730
+ reactions && !tombstone ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles28.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsxRuntime.jsx(
6324
6731
  ReactionStrip,
6325
6732
  {
6326
6733
  messageId: msg.id,
@@ -6371,7 +6778,7 @@ function BubbleMessageRow({
6371
6778
  }
6372
6779
  );
6373
6780
  }
6374
- var styles27 = reactNative.StyleSheet.create({
6781
+ var styles28 = reactNative.StyleSheet.create({
6375
6782
  row: {
6376
6783
  flexDirection: "row",
6377
6784
  alignItems: "flex-end",
@@ -6428,24 +6835,24 @@ function NewMessagesDivider({ label = "New messages" }) {
6428
6835
  return /* @__PURE__ */ jsxRuntime.jsxs(
6429
6836
  reactNative.View,
6430
6837
  {
6431
- style: [styles28.row, { paddingHorizontal: theme.spacing.md }],
6838
+ style: [styles29.row, { paddingHorizontal: theme.spacing.md }],
6432
6839
  accessibilityRole: "text",
6433
6840
  accessibilityLabel: label,
6434
6841
  children: [
6435
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles28.line, { backgroundColor: theme.colors.accent }] }),
6842
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles29.line, { backgroundColor: theme.colors.accent }] }),
6436
6843
  /* @__PURE__ */ jsxRuntime.jsx(
6437
6844
  reactNative.Text,
6438
6845
  {
6439
- style: [styles28.label, { color: theme.colors.accentStrong, fontFamily: theme.fonts.body }],
6846
+ style: [styles29.label, { color: theme.colors.accentStrong, fontFamily: theme.fonts.body }],
6440
6847
  children: label
6441
6848
  }
6442
6849
  ),
6443
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles28.line, { backgroundColor: theme.colors.accent }] })
6850
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles29.line, { backgroundColor: theme.colors.accent }] })
6444
6851
  ]
6445
6852
  }
6446
6853
  );
6447
6854
  }
6448
- var styles28 = reactNative.StyleSheet.create({
6855
+ var styles29 = reactNative.StyleSheet.create({
6449
6856
  row: {
6450
6857
  flexDirection: "row",
6451
6858
  alignItems: "center",
@@ -6614,15 +7021,15 @@ function ThreadSheet({
6614
7021
  return /* @__PURE__ */ jsxRuntime.jsxs(
6615
7022
  reactNative.View,
6616
7023
  {
6617
- style: styles29.modalRoot,
7024
+ style: styles30.modalRoot,
6618
7025
  onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
6619
7026
  children: [
6620
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles29.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
7027
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles30.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
6621
7028
  /* @__PURE__ */ jsxRuntime.jsxs(
6622
7029
  reactNative.Animated.View,
6623
7030
  {
6624
7031
  style: [
6625
- styles29.sheet,
7032
+ styles30.sheet,
6626
7033
  {
6627
7034
  height: sheetHeight,
6628
7035
  backgroundColor: theme.colors.background,
@@ -6636,14 +7043,14 @@ function ThreadSheet({
6636
7043
  ],
6637
7044
  children: [
6638
7045
  /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ...panHandlers, children: [
6639
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles29.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles29.dragPill, { backgroundColor: theme.colors.textSubtle }] }) }),
6640
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles29.header, { borderBottomColor: theme.colors.border }], children: [
7046
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles30.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles30.dragPill, { backgroundColor: theme.colors.textSubtle }] }) }),
7047
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles30.header, { borderBottomColor: theme.colors.border }], children: [
6641
7048
  /* @__PURE__ */ jsxRuntime.jsx(
6642
7049
  reactNative.Pressable,
6643
7050
  {
6644
7051
  onPress: onClose,
6645
7052
  hitSlop: 16,
6646
- style: [styles29.closeBtn, { backgroundColor: theme.colors.surfaceAlt }],
7053
+ style: [styles30.closeBtn, { backgroundColor: theme.colors.surfaceAlt }],
6647
7054
  accessibilityLabel: "Close thread",
6648
7055
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.text })
6649
7056
  }
@@ -6651,7 +7058,7 @@ function ThreadSheet({
6651
7058
  /* @__PURE__ */ jsxRuntime.jsx(
6652
7059
  reactNative.Text,
6653
7060
  {
6654
- style: [styles29.title, { color: theme.colors.text, fontFamily: theme.fonts.display }],
7061
+ style: [styles30.title, { color: theme.colors.text, fontFamily: theme.fonts.display }],
6655
7062
  children: "Thread"
6656
7063
  }
6657
7064
  )
@@ -6660,12 +7067,12 @@ function ThreadSheet({
6660
7067
  /* @__PURE__ */ jsxRuntime.jsxs(
6661
7068
  reactNative.KeyboardAvoidingView,
6662
7069
  {
6663
- style: styles29.kavBody,
7070
+ style: styles30.kavBody,
6664
7071
  behavior: "padding",
6665
7072
  keyboardVerticalOffset: gutter,
6666
7073
  children: [
6667
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles29.rootPreview, { backgroundColor: theme.colors.surfaceAlt }], children: rootRow }),
6668
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles29.listWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
7074
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles30.rootPreview, { backgroundColor: theme.colors.surfaceAlt }], children: rootRow }),
7075
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles30.listWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
6669
7076
  MessageList,
6670
7077
  {
6671
7078
  messages: replies,
@@ -6710,7 +7117,7 @@ function ThreadSheet({
6710
7117
  }
6711
7118
  );
6712
7119
  }
6713
- var styles29 = reactNative.StyleSheet.create({
7120
+ var styles30 = reactNative.StyleSheet.create({
6714
7121
  modalRoot: {
6715
7122
  flex: 1,
6716
7123
  justifyContent: "flex-end"
@@ -6782,7 +7189,7 @@ function TypingIndicator({ typing, labelFor }) {
6782
7189
  const ids = Array.from(typing);
6783
7190
  const isTyping = ids.length > 0;
6784
7191
  if (!isTyping) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { height: 0 } });
6785
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles30.row, children: [
7192
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles31.row, children: [
6786
7193
  /* @__PURE__ */ jsxRuntime.jsx(TypingDots, {}),
6787
7194
  /* @__PURE__ */ jsxRuntime.jsx(TypingLabel, { ids, ...labelFor ? { labelFor } : {} })
6788
7195
  ] });
@@ -6827,7 +7234,7 @@ function TypingDots() {
6827
7234
  ],
6828
7235
  opacity: val.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] })
6829
7236
  });
6830
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles30.dotsWrap, children: [
7237
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles31.dotsWrap, children: [
6831
7238
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: dot(a) }),
6832
7239
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: dot(b) }),
6833
7240
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: dot(c) })
@@ -6843,9 +7250,9 @@ function TypingLabel({
6843
7250
  const name1 = useDisplayName(id1, labelFor);
6844
7251
  const name2 = useDisplayName(id2, labelFor);
6845
7252
  const text = ids.length === 1 ? `${name1} is typing` : ids.length === 2 ? `${name1} and ${name2} are typing` : `${ids.length} people are typing`;
6846
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles30.label, { color: theme.colors.textMuted, fontFamily: theme.fonts.body }], children: text });
7253
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles31.label, { color: theme.colors.textMuted, fontFamily: theme.fonts.body }], children: text });
6847
7254
  }
6848
- var styles30 = reactNative.StyleSheet.create({
7255
+ var styles31 = reactNative.StyleSheet.create({
6849
7256
  row: {
6850
7257
  flexDirection: "row",
6851
7258
  alignItems: "center",
@@ -7159,6 +7566,14 @@ function ConversationView({
7159
7566
  }, [realtimeStatus, refetch]);
7160
7567
  const wantsMembers = mentions || senderLabels === "auto" || avatars === "auto";
7161
7568
  const { members } = react$1.useMembers(wantsMembers ? conversationId : "");
7569
+ const nameForUserId = react.useCallback(
7570
+ (userId) => {
7571
+ const ext = members.find((m) => m.user_id === userId)?.external_id;
7572
+ if (!ext) return null;
7573
+ return chat.users.peek(ext)?.displayName ?? labelFor?.(ext) ?? null;
7574
+ },
7575
+ [members, chat, labelFor]
7576
+ );
7162
7577
  const isGroupChat = members.length > 2;
7163
7578
  const showSenderLabels = senderLabels === "always" || senderLabels === "auto" && isGroupChat;
7164
7579
  const showAvatars = showAvatarsProp ?? (layout === "list" ? true : layout === "compact" ? false : avatars === "always" || avatars === "auto" && isGroupChat);
@@ -7435,6 +7850,7 @@ function ConversationView({
7435
7850
  groupPosition,
7436
7851
  markdown,
7437
7852
  ...onCallBack ? { onCallBack } : {},
7853
+ nameForUserId,
7438
7854
  ...layoutProps,
7439
7855
  mentionsMe: mentionsViewer(msg, meId)
7440
7856
  }
@@ -7474,7 +7890,8 @@ function ConversationView({
7474
7890
  linkPreviews,
7475
7891
  markUnread,
7476
7892
  markMessageUnread,
7477
- removeLinkPreview
7893
+ removeLinkPreview,
7894
+ nameForUserId
7478
7895
  ]
7479
7896
  );
7480
7897
  const renderItem = react.useCallback(
@@ -7592,7 +8009,7 @@ function ConversationView({
7592
8009
  return /* @__PURE__ */ jsxRuntime.jsx(UploadProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(
7593
8010
  reactNative.KeyboardAvoidingView,
7594
8011
  {
7595
- style: [styles31.root, { backgroundColor: theme.colors.background }],
8012
+ style: [styles32.root, { backgroundColor: theme.colors.background }],
7596
8013
  behavior: reactNative.Platform.OS === "ios" ? "padding" : "height",
7597
8014
  keyboardVerticalOffset: keyboardOffset,
7598
8015
  children: [
@@ -7601,7 +8018,7 @@ function ConversationView({
7601
8018
  reactNative.Text,
7602
8019
  {
7603
8020
  style: [
7604
- styles31.notice,
8021
+ styles32.notice,
7605
8022
  { color: theme.colors.textMuted, backgroundColor: theme.colors.surfaceAlt }
7606
8023
  ],
7607
8024
  accessibilityRole: "alert",
@@ -7617,7 +8034,7 @@ function ConversationView({
7617
8034
  onJoin: onJoinCall
7618
8035
  }
7619
8036
  ) : null,
7620
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles31.listWrap, children: [
8037
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.listWrap, children: [
7621
8038
  /* @__PURE__ */ jsxRuntime.jsx(
7622
8039
  MessageList,
7623
8040
  {
@@ -7636,7 +8053,7 @@ function ConversationView({
7636
8053
  (stream) => stream.status === "failed" ? /* @__PURE__ */ jsxRuntime.jsx(
7637
8054
  reactNative.Text,
7638
8055
  {
7639
- style: [styles31.streamFailed, { color: theme.colors.textSubtle }],
8056
+ style: [styles32.streamFailed, { color: theme.colors.textSubtle }],
7640
8057
  accessibilityRole: "alert",
7641
8058
  children: stream.error ? `The agent couldn't reply: ${stream.error}` : "The agent couldn't reply."
7642
8059
  },
@@ -7677,7 +8094,7 @@ function ConversationView({
7677
8094
  {
7678
8095
  onPress: jumpToUnread,
7679
8096
  style: [
7680
- styles31.unreadPill,
8097
+ styles32.unreadPill,
7681
8098
  { backgroundColor: theme.colors.accent, borderRadius: theme.radii.pill },
7682
8099
  theme.shadows.sm
7683
8100
  ],
@@ -7693,7 +8110,7 @@ function ConversationView({
7693
8110
  label: null
7694
8111
  }
7695
8112
  ),
7696
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles31.unreadPillText, { color: theme.colors.accentText }], children: seekingUnread ? "Loading\u2026" : "New messages" }),
8113
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles32.unreadPillText, { color: theme.colors.accentText }], children: seekingUnread ? "Loading\u2026" : "New messages" }),
7697
8114
  /* @__PURE__ */ jsxRuntime.jsx(
7698
8115
  reactNative.Pressable,
7699
8116
  {
@@ -7710,7 +8127,7 @@ function ConversationView({
7710
8127
  editingId ? /* @__PURE__ */ jsxRuntime.jsx(
7711
8128
  reactNative.Pressable,
7712
8129
  {
7713
- style: [styles31.editBackdrop, { backgroundColor: theme.colors.overlay }],
8130
+ style: [styles32.editBackdrop, { backgroundColor: theme.colors.overlay }],
7714
8131
  onPress: () => setEditingId(null),
7715
8132
  accessibilityLabel: "Cancel editing"
7716
8133
  }
@@ -7772,7 +8189,7 @@ function readStateForMessage(msg, members, meId, sequenceByMessageId) {
7772
8189
  return anyRead ? "read" : "sent";
7773
8190
  }
7774
8191
  var NEW_MESSAGES_KEY = "new-messages";
7775
- var styles31 = reactNative.StyleSheet.create({
8192
+ var styles32 = reactNative.StyleSheet.create({
7776
8193
  root: {
7777
8194
  flex: 1
7778
8195
  },
@@ -7908,15 +8325,15 @@ function UserPickerSheet({
7908
8325
  children: /* @__PURE__ */ jsxRuntime.jsxs(
7909
8326
  reactNative.View,
7910
8327
  {
7911
- style: styles32.modalRoot,
8328
+ style: styles33.modalRoot,
7912
8329
  onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
7913
8330
  children: [
7914
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles32.backdrop, onPress: handleClose }),
8331
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles33.backdrop, onPress: handleClose }),
7915
8332
  /* @__PURE__ */ jsxRuntime.jsx(
7916
8333
  reactNative.Animated.View,
7917
8334
  {
7918
8335
  style: [
7919
- styles32.sheet,
8336
+ styles33.sheet,
7920
8337
  {
7921
8338
  backgroundColor: theme.colors.background,
7922
8339
  borderTopLeftRadius: theme.radii.xl,
@@ -7934,18 +8351,18 @@ function UserPickerSheet({
7934
8351
  children: /* @__PURE__ */ jsxRuntime.jsxs(
7935
8352
  reactNative.KeyboardAvoidingView,
7936
8353
  {
7937
- style: styles32.kav,
8354
+ style: styles33.kav,
7938
8355
  behavior: "padding",
7939
8356
  keyboardVerticalOffset: screenHeight - sheetHeight,
7940
8357
  children: [
7941
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { ...panHandlers, style: styles32.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles32.dragPill, { backgroundColor: theme.colors.textSubtle }] }) }),
7942
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.header, children: [
8358
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { ...panHandlers, style: styles33.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles33.dragPill, { backgroundColor: theme.colors.textSubtle }] }) }),
8359
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles33.header, children: [
7943
8360
  /* @__PURE__ */ jsxRuntime.jsx(
7944
8361
  reactNative.Pressable,
7945
8362
  {
7946
8363
  onPress: handleClose,
7947
8364
  hitSlop: 16,
7948
- style: [styles32.closeBtn, { backgroundColor: theme.colors.surfaceAlt }],
8365
+ style: [styles33.closeBtn, { backgroundColor: theme.colors.surfaceAlt }],
7949
8366
  accessibilityLabel: "Close picker",
7950
8367
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.text })
7951
8368
  }
@@ -7954,7 +8371,7 @@ function UserPickerSheet({
7954
8371
  reactNative.Text,
7955
8372
  {
7956
8373
  style: [
7957
- styles32.title,
8374
+ styles33.title,
7958
8375
  { color: theme.colors.text, fontFamily: theme.fonts.display }
7959
8376
  ],
7960
8377
  numberOfLines: 1,
@@ -7968,7 +8385,7 @@ function UserPickerSheet({
7968
8385
  disabled: !canCreate,
7969
8386
  hitSlop: 6,
7970
8387
  style: [
7971
- styles32.createBtn,
8388
+ styles33.createBtn,
7972
8389
  {
7973
8390
  backgroundColor: canCreate ? theme.colors.accent : theme.colors.surfaceAlt,
7974
8391
  opacity: canCreate ? 1 : 0.6
@@ -7999,7 +8416,7 @@ function UserPickerSheet({
7999
8416
  value: groupName,
8000
8417
  onChangeText: setGroupName,
8001
8418
  style: [
8002
- styles32.groupNameInput,
8419
+ styles33.groupNameInput,
8003
8420
  {
8004
8421
  color: theme.colors.text,
8005
8422
  backgroundColor: theme.colors.surfaceAlt,
@@ -8018,7 +8435,7 @@ function UserPickerSheet({
8018
8435
  value: query,
8019
8436
  onChangeText: setQuery,
8020
8437
  style: [
8021
- styles32.searchInput,
8438
+ styles33.searchInput,
8022
8439
  {
8023
8440
  color: theme.colors.text,
8024
8441
  backgroundColor: theme.colors.surfaceAlt,
@@ -8035,7 +8452,7 @@ function UserPickerSheet({
8035
8452
  data: filtered,
8036
8453
  keyExtractor: (u) => u.externalId,
8037
8454
  keyboardShouldPersistTaps: "handled",
8038
- ListEmptyComponent: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.empty, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles32.emptyText, { color: theme.colors.textSubtle }], children: query ? "No matches." : "No users to show." }) }),
8455
+ ListEmptyComponent: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles33.empty, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles33.emptyText, { color: theme.colors.textSubtle }], children: query ? "No matches." : "No users to show." }) }),
8039
8456
  renderItem: ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(
8040
8457
  UserRow,
8041
8458
  {
@@ -8077,29 +8494,29 @@ function UserRow({
8077
8494
  {
8078
8495
  onPress,
8079
8496
  style: [
8080
- styles32.row,
8497
+ styles33.row,
8081
8498
  {
8082
8499
  backgroundColor: selected ? theme.colors.accentSoft : "transparent"
8083
8500
  }
8084
8501
  ],
8085
8502
  children: [
8086
- user.avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { source: { uri: user.avatarUrl }, style: styles32.avatarImg }) : /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: null, name: user.name, seed: user.externalId, size: "md" }),
8087
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.body, children: [
8503
+ user.avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { source: { uri: user.avatarUrl }, style: styles33.avatarImg }) : /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: null, name: user.name, seed: user.externalId, size: "md" }),
8504
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles33.body, children: [
8088
8505
  /* @__PURE__ */ jsxRuntime.jsx(
8089
8506
  reactNative.Text,
8090
8507
  {
8091
- style: [styles32.name, { color: theme.colors.text, fontFamily: theme.fonts.body }],
8508
+ style: [styles33.name, { color: theme.colors.text, fontFamily: theme.fonts.body }],
8092
8509
  numberOfLines: 1,
8093
8510
  children: user.name
8094
8511
  }
8095
8512
  ),
8096
- user.subtitle ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles32.subtitle, { color: theme.colors.textSubtle }], numberOfLines: 1, children: user.subtitle }) : null
8513
+ user.subtitle ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles33.subtitle, { color: theme.colors.textSubtle }], numberOfLines: 1, children: user.subtitle }) : null
8097
8514
  ] }),
8098
8515
  isGroup ? /* @__PURE__ */ jsxRuntime.jsx(
8099
8516
  reactNative.View,
8100
8517
  {
8101
8518
  style: [
8102
- styles32.checkbox,
8519
+ styles33.checkbox,
8103
8520
  {
8104
8521
  borderColor: selected ? theme.colors.accent : theme.colors.border,
8105
8522
  backgroundColor: selected ? theme.colors.accent : "transparent"
@@ -8112,7 +8529,7 @@ function UserRow({
8112
8529
  }
8113
8530
  );
8114
8531
  }
8115
- var styles32 = reactNative.StyleSheet.create({
8532
+ var styles33 = reactNative.StyleSheet.create({
8116
8533
  modalRoot: {
8117
8534
  flex: 1,
8118
8535
  justifyContent: "flex-end"
@@ -8383,7 +8800,7 @@ var PoolseInbox = react.forwardRef(
8383
8800
  },
8384
8801
  [renderConversationRow, meExternalId, meId, labelFor, avatarFor, unreadCounts, showPresence]
8385
8802
  );
8386
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles33.root, { backgroundColor: theme.colors.background }], children: [
8803
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles34.root, { backgroundColor: theme.colors.background }], children: [
8387
8804
  /* @__PURE__ */ jsxRuntime.jsxs(
8388
8805
  reactNative.Animated.View,
8389
8806
  {
@@ -8394,7 +8811,7 @@ var PoolseInbox = react.forwardRef(
8394
8811
  reactNative.View,
8395
8812
  {
8396
8813
  style: [
8397
- styles33.listHeader,
8814
+ styles34.listHeader,
8398
8815
  {
8399
8816
  backgroundColor: theme.colors.surface,
8400
8817
  borderBottomColor: theme.colors.border
@@ -8405,13 +8822,13 @@ var PoolseInbox = react.forwardRef(
8405
8822
  reactNative.Text,
8406
8823
  {
8407
8824
  style: [
8408
- styles33.listTitle,
8825
+ styles34.listTitle,
8409
8826
  { color: theme.colors.text, fontFamily: theme.fonts.display }
8410
8827
  ],
8411
8828
  children: title
8412
8829
  }
8413
8830
  ),
8414
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles33.headerActions, children: [
8831
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles34.headerActions, children: [
8415
8832
  users ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8416
8833
  /* @__PURE__ */ jsxRuntime.jsx(
8417
8834
  HeaderIconButton,
@@ -8527,7 +8944,7 @@ function HeaderIconButton({
8527
8944
  hitSlop: 10,
8528
8945
  accessibilityLabel: label,
8529
8946
  style: ({ pressed }) => [
8530
- styles33.iconBtn,
8947
+ styles34.iconBtn,
8531
8948
  {
8532
8949
  backgroundColor: pressed ? theme.colors.surfaceAlt : "transparent"
8533
8950
  }
@@ -8560,7 +8977,7 @@ function DefaultConversationRow({
8560
8977
  {
8561
8978
  onPress,
8562
8979
  style: [
8563
- styles33.row,
8980
+ styles34.row,
8564
8981
  {
8565
8982
  backgroundColor: selected ? theme.colors.surfaceAlt : "transparent",
8566
8983
  borderBottomColor: theme.colors.border
@@ -8577,23 +8994,23 @@ function DefaultConversationRow({
8577
8994
  ...presence ? { presence: presence.state, doNotDisturb: !!presence.do_not_disturb } : {}
8578
8995
  }
8579
8996
  ),
8580
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles33.rowBody, children: [
8997
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles34.rowBody, children: [
8581
8998
  /* @__PURE__ */ jsxRuntime.jsx(
8582
8999
  reactNative.Text,
8583
9000
  {
8584
- style: [styles33.rowTitle, { color: theme.colors.text, fontFamily: theme.fonts.body }],
9001
+ style: [styles34.rowTitle, { color: theme.colors.text, fontFamily: theme.fonts.body }],
8585
9002
  numberOfLines: 1,
8586
9003
  children: title
8587
9004
  }
8588
9005
  ),
8589
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles33.rowSubtitle, { color: theme.colors.textSubtle }], numberOfLines: 1, children: react$1.formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview ?? (isDirect ? otherExtId ?? "" : `${(conv.member_external_ids ?? []).length} members`) })
9006
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles34.rowSubtitle, { color: theme.colors.textSubtle }], numberOfLines: 1, children: react$1.formatCallLogPreview(conv.last_message_preview, meId) ?? react$1.formatRecordingNoticePreview(conv.last_message_preview, meId) ?? conv.last_message_preview ?? (isDirect ? otherExtId ?? "" : `${(conv.member_external_ids ?? []).length} members`) })
8590
9007
  ] }),
8591
- unread > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles33.unreadPill, { backgroundColor: theme.colors.badge }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles33.unreadText, { color: theme.colors.badgeText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
9008
+ unread > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles34.unreadPill, { backgroundColor: theme.colors.badge }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles34.unreadText, { color: theme.colors.badgeText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
8592
9009
  ]
8593
9010
  }
8594
9011
  );
8595
9012
  }
8596
- var styles33 = reactNative.StyleSheet.create({
9013
+ var styles34 = reactNative.StyleSheet.create({
8597
9014
  root: {
8598
9015
  flex: 1,
8599
9016
  overflow: "hidden"
@@ -8655,6 +9072,439 @@ var styles33 = reactNative.StyleSheet.create({
8655
9072
  fontWeight: "700"
8656
9073
  }
8657
9074
  });
9075
+ function LiveTranscriptPanel({
9076
+ callId,
9077
+ enabled = true,
9078
+ showControls = true,
9079
+ onClose,
9080
+ title = "Live transcript",
9081
+ style
9082
+ }) {
9083
+ const theme = useTheme();
9084
+ const live = react$1.useLiveTranscript(callId, { enabled });
9085
+ const blocks = react.useMemo(() => react$1.groupTranscript(live.segments), [live.segments]);
9086
+ const scroller = react.useRef(null);
9087
+ const pinned = react.useRef(true);
9088
+ const error = live.error ? transcriptError(live.error) : null;
9089
+ const text = { color: theme.colors.text, fontFamily: theme.fonts.body };
9090
+ const subtle = { color: theme.colors.textSubtle, fontFamily: theme.fonts.body };
9091
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles35.panel, { backgroundColor: theme.colors.surface }, style], children: [
9092
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles35.head, { borderColor: theme.colors.border }], children: [
9093
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: [styles35.title, text], numberOfLines: 1, accessibilityRole: "header", children: [
9094
+ live.live ? "\u25CF " : "",
9095
+ title
9096
+ ] }),
9097
+ showControls && callId ? /* @__PURE__ */ jsxRuntime.jsx(
9098
+ reactNative.Pressable,
9099
+ {
9100
+ onPress: () => void (live.live ? live.stop() : live.start()),
9101
+ disabled: live.pending,
9102
+ accessibilityRole: "button",
9103
+ accessibilityLabel: live.live ? "Stop the transcript" : "Start the transcript",
9104
+ hitSlop: 8,
9105
+ style: ({ pressed }) => [
9106
+ styles35.btn,
9107
+ { backgroundColor: theme.colors.surfaceAlt, borderColor: theme.colors.border },
9108
+ (pressed || live.pending) && styles35.pressed
9109
+ ],
9110
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.btnText, text], children: live.live ? "Stop" : live.transcript ? "Resume" : "Start" })
9111
+ }
9112
+ ) : null,
9113
+ onClose ? /* @__PURE__ */ jsxRuntime.jsx(
9114
+ reactNative.Pressable,
9115
+ {
9116
+ onPress: onClose,
9117
+ accessibilityRole: "button",
9118
+ accessibilityLabel: "Close transcript",
9119
+ hitSlop: 8,
9120
+ children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.textMuted, label: null })
9121
+ }
9122
+ ) : null
9123
+ ] }),
9124
+ /* @__PURE__ */ jsxRuntime.jsx(
9125
+ reactNative.ScrollView,
9126
+ {
9127
+ ref: scroller,
9128
+ style: styles35.body,
9129
+ contentContainerStyle: styles35.bodyContent,
9130
+ onScroll: (e) => {
9131
+ const { contentOffset, contentSize, layoutMeasurement } = e.nativeEvent;
9132
+ pinned.current = contentSize.height - contentOffset.y - layoutMeasurement.height < 24;
9133
+ },
9134
+ scrollEventThrottle: 100,
9135
+ onContentSizeChange: () => {
9136
+ if (pinned.current) scroller.current?.scrollToEnd({ animated: false });
9137
+ },
9138
+ accessibilityLiveRegion: "polite",
9139
+ children: blocks.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.empty, subtle], children: error ?? (live.live ? "Listening\u2026" : live.joined ? "Transcription is off. Start it to see what is said." : "Opening the transcript\u2026") }) : blocks.map((b, i) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles35.block, children: [
9140
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles35.who, children: [
9141
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.name, text], numberOfLines: 1, children: b.name }),
9142
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.time, subtle], children: react$1.formatCallDuration(b.startMs) })
9143
+ ] }),
9144
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.text, text], children: b.segments.map((s, k) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: s.final ? void 0 : { color: theme.colors.textSubtle }, children: [
9145
+ k > 0 ? " " : "",
9146
+ s.text
9147
+ ] }, k)) })
9148
+ ] }, `${b.speaker}-${b.startMs}-${i}`))
9149
+ }
9150
+ ),
9151
+ error && blocks.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.error, { color: theme.colors.danger, fontFamily: theme.fonts.body }], children: error }) : null
9152
+ ] });
9153
+ }
9154
+ function TranscriptViewer({
9155
+ callId,
9156
+ canRename = true,
9157
+ onSeek,
9158
+ title = "Transcript",
9159
+ style
9160
+ }) {
9161
+ const theme = useTheme();
9162
+ const { transcript, loading, missing, error, renameSpeakers } = react$1.useTranscript(callId);
9163
+ const [query, setQuery] = react.useState("");
9164
+ const [hit, setHit] = react.useState(0);
9165
+ const blocks = react.useMemo(() => react$1.groupTranscript(transcript?.segments ?? []), [transcript]);
9166
+ const scroller = react.useRef(null);
9167
+ const blockY = react.useRef(/* @__PURE__ */ new Map());
9168
+ const hits = react.useMemo(() => {
9169
+ const out = [];
9170
+ if (!query.trim()) return out;
9171
+ blocks.forEach(
9172
+ (block, b) => block.segments.forEach((seg, s) => {
9173
+ for (const r of react$1.findInText(seg.text, query)) out.push({ b, s, r });
9174
+ })
9175
+ );
9176
+ return out;
9177
+ }, [blocks, query]);
9178
+ const go = (next) => {
9179
+ setHit(next);
9180
+ const target = hits[next];
9181
+ const y = target ? blockY.current.get(target.b) : void 0;
9182
+ if (y !== void 0) scroller.current?.scrollTo({ y: Math.max(0, y - 40), animated: true });
9183
+ };
9184
+ const step = (d) => {
9185
+ if (hits.length) go((hit + d + hits.length) % hits.length);
9186
+ };
9187
+ if (!callId) return null;
9188
+ const text = { color: theme.colors.text, fontFamily: theme.fonts.body };
9189
+ const subtle = { color: theme.colors.textSubtle, fontFamily: theme.fonts.body };
9190
+ const meta = transcript ? [
9191
+ transcript.started_at ? formatDate(transcript.started_at) : null,
9192
+ duration(transcript),
9193
+ transcript.speakers.length === 1 ? "1 speaker" : `${transcript.speakers.length} speakers`
9194
+ ].filter(Boolean).join(" \xB7 ") : null;
9195
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles35.panel, { backgroundColor: theme.colors.surface }, style], children: [
9196
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles35.head, { borderColor: theme.colors.border }], children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles35.heading, children: [
9197
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.title, text], numberOfLines: 1, accessibilityRole: "header", children: title }),
9198
+ meta ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.meta, subtle], numberOfLines: 1, children: meta }) : null
9199
+ ] }) }),
9200
+ transcript && transcript.segments.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles35.search, { backgroundColor: theme.colors.surfaceAlt }], children: [
9201
+ /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "search", size: 15, color: theme.colors.textSubtle, label: null }),
9202
+ /* @__PURE__ */ jsxRuntime.jsx(
9203
+ reactNative.TextInput,
9204
+ {
9205
+ value: query,
9206
+ onChangeText: (v) => {
9207
+ setQuery(v);
9208
+ setHit(0);
9209
+ },
9210
+ onSubmitEditing: () => step(1),
9211
+ placeholder: "Search the transcript",
9212
+ placeholderTextColor: theme.colors.textSubtle,
9213
+ accessibilityLabel: "Search the transcript",
9214
+ returnKeyType: "search",
9215
+ style: [styles35.searchInput, text]
9216
+ }
9217
+ ),
9218
+ query.trim() ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9219
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.count, subtle], accessibilityLiveRegion: "polite", children: hits.length ? `${hit + 1} of ${hits.length}` : "No matches" }),
9220
+ /* @__PURE__ */ jsxRuntime.jsx(
9221
+ reactNative.Pressable,
9222
+ {
9223
+ onPress: () => step(-1),
9224
+ disabled: !hits.length,
9225
+ accessibilityRole: "button",
9226
+ accessibilityLabel: "Previous match",
9227
+ hitSlop: 6,
9228
+ children: /* @__PURE__ */ jsxRuntime.jsx(
9229
+ PoolseIcon,
9230
+ {
9231
+ name: "chevron-up",
9232
+ size: 16,
9233
+ color: theme.colors.textMuted,
9234
+ label: null
9235
+ }
9236
+ )
9237
+ }
9238
+ ),
9239
+ /* @__PURE__ */ jsxRuntime.jsx(
9240
+ reactNative.Pressable,
9241
+ {
9242
+ onPress: () => step(1),
9243
+ disabled: !hits.length,
9244
+ accessibilityRole: "button",
9245
+ accessibilityLabel: "Next match",
9246
+ hitSlop: 6,
9247
+ children: /* @__PURE__ */ jsxRuntime.jsx(
9248
+ PoolseIcon,
9249
+ {
9250
+ name: "chevron-down",
9251
+ size: 16,
9252
+ color: theme.colors.textMuted,
9253
+ label: null
9254
+ }
9255
+ )
9256
+ }
9257
+ )
9258
+ ] }) : null
9259
+ ] }) : null,
9260
+ transcript && transcript.speakers.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
9261
+ SpeakerList,
9262
+ {
9263
+ speakers: transcript.speakers,
9264
+ canRename,
9265
+ onRename: renameSpeakers
9266
+ }
9267
+ ) : null,
9268
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { ref: scroller, style: styles35.body, contentContainerStyle: styles35.bodyContent, children: loading && !transcript ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.empty, subtle], children: "Loading the transcript\u2026" }) : missing ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.empty, subtle], children: "This call has no transcript." }) : error && !transcript ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.empty, subtle], children: transcriptError(error) }) : transcript && transcript.segments.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.empty, subtle], children: "Nothing was said in this call." }) : blocks.map((block, b) => /* @__PURE__ */ jsxRuntime.jsxs(
9269
+ reactNative.View,
9270
+ {
9271
+ style: styles35.block,
9272
+ onLayout: (e) => blockY.current.set(b, e.nativeEvent.layout.y),
9273
+ children: [
9274
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles35.who, children: [
9275
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.name, text], numberOfLines: 1, children: block.name }),
9276
+ onSeek ? /* @__PURE__ */ jsxRuntime.jsx(
9277
+ reactNative.Pressable,
9278
+ {
9279
+ onPress: () => onSeek(block.startMs),
9280
+ accessibilityRole: "button",
9281
+ accessibilityLabel: `Play from ${react$1.formatCallDuration(block.startMs)}`,
9282
+ hitSlop: 6,
9283
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.time, subtle, styles35.timeLink], children: react$1.formatCallDuration(block.startMs) })
9284
+ }
9285
+ ) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.time, subtle], children: react$1.formatCallDuration(block.startMs) })
9286
+ ] }),
9287
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.text, text], children: block.segments.map((seg, s) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { children: [
9288
+ s > 0 ? " " : "",
9289
+ highlight(seg, hits, b, s, hit, theme.colors.warning)
9290
+ ] }, s)) })
9291
+ ]
9292
+ },
9293
+ `${block.speaker}-${block.startMs}-${b}`
9294
+ )) })
9295
+ ] });
9296
+ }
9297
+ function SpeakerList({
9298
+ speakers,
9299
+ canRename,
9300
+ onRename
9301
+ }) {
9302
+ const theme = useTheme();
9303
+ const [editing, setEditing] = react.useState(null);
9304
+ const [draft, setDraft] = react.useState("");
9305
+ const [busy, setBusy] = react.useState(false);
9306
+ const [error, setError] = react.useState(null);
9307
+ const text = { color: theme.colors.text, fontFamily: theme.fonts.body };
9308
+ const save = async (key, name) => {
9309
+ setBusy(true);
9310
+ setError(null);
9311
+ try {
9312
+ await onRename({ [key]: name });
9313
+ setEditing(null);
9314
+ } catch (err) {
9315
+ setError(
9316
+ err instanceof react$1.ApiError && err.status === 403 ? "Only people who were in the call can rename speakers." : err instanceof react$1.ApiError && err.code === "validation_failed" ? "Names can be up to 100 characters." : "The name could not be saved. Try again."
9317
+ );
9318
+ } finally {
9319
+ setBusy(false);
9320
+ }
9321
+ };
9322
+ const action = (label, onPress, primary = false) => /* @__PURE__ */ jsxRuntime.jsx(
9323
+ reactNative.Pressable,
9324
+ {
9325
+ onPress,
9326
+ disabled: busy,
9327
+ accessibilityRole: "button",
9328
+ accessibilityLabel: label,
9329
+ hitSlop: 6,
9330
+ style: ({ pressed }) => [styles35.renameBtn, (pressed || busy) && styles35.pressed],
9331
+ children: /* @__PURE__ */ jsxRuntime.jsx(
9332
+ reactNative.Text,
9333
+ {
9334
+ style: [
9335
+ styles35.renameBtnText,
9336
+ {
9337
+ color: primary ? theme.colors.accentStrong : theme.colors.text,
9338
+ fontFamily: theme.fonts.body
9339
+ }
9340
+ ],
9341
+ children: label
9342
+ }
9343
+ )
9344
+ }
9345
+ );
9346
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles35.speakers, children: [
9347
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles35.speakerRow, accessibilityLabel: "Speakers", children: speakers.map(
9348
+ (sp) => editing === sp.key ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles35.rename, children: [
9349
+ /* @__PURE__ */ jsxRuntime.jsx(
9350
+ reactNative.TextInput,
9351
+ {
9352
+ value: draft,
9353
+ onChangeText: setDraft,
9354
+ maxLength: 100,
9355
+ autoFocus: true,
9356
+ accessibilityLabel: "Speaker name",
9357
+ onSubmitEditing: () => draft.trim() && void save(sp.key, draft.trim()),
9358
+ style: [
9359
+ styles35.renameInput,
9360
+ text,
9361
+ { borderColor: theme.colors.border, backgroundColor: theme.colors.background }
9362
+ ]
9363
+ }
9364
+ ),
9365
+ action("Save", () => draft.trim() && void save(sp.key, draft.trim()), true),
9366
+ sp.corrected ? action("Use their own name", () => void save(sp.key, null)) : null,
9367
+ action("Cancel", () => setEditing(null))
9368
+ ] }, sp.key) : /* @__PURE__ */ jsxRuntime.jsxs(
9369
+ reactNative.View,
9370
+ {
9371
+ style: [styles35.speaker, { backgroundColor: theme.colors.surfaceAlt }],
9372
+ children: [
9373
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.speakerName, text], numberOfLines: 1, children: sp.name?.trim() || "Speaker" }),
9374
+ canRename ? /* @__PURE__ */ jsxRuntime.jsx(
9375
+ reactNative.Pressable,
9376
+ {
9377
+ onPress: () => {
9378
+ setDraft(sp.name ?? "");
9379
+ setError(null);
9380
+ setEditing(sp.key);
9381
+ },
9382
+ accessibilityRole: "button",
9383
+ accessibilityLabel: `Rename ${sp.name?.trim() || "speaker"}`,
9384
+ hitSlop: 8,
9385
+ style: styles35.speakerEdit,
9386
+ children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "edit", size: 13, color: theme.colors.textMuted, label: null })
9387
+ }
9388
+ ) : null
9389
+ ]
9390
+ },
9391
+ sp.key
9392
+ )
9393
+ ) }),
9394
+ error ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles35.error, { color: theme.colors.danger, fontFamily: theme.fonts.body }], children: error }) : null
9395
+ ] });
9396
+ }
9397
+ function highlight(seg, hits, b, s, current, color) {
9398
+ const mine = hits.map((h, i) => ({ ...h, i })).filter((h) => h.b === b && h.s === s);
9399
+ if (!mine.length) return seg.text;
9400
+ const out = [];
9401
+ let at = 0;
9402
+ for (const h of mine) {
9403
+ if (h.r[0] > at) out.push(seg.text.slice(at, h.r[0]));
9404
+ out.push(
9405
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { backgroundColor: hexAlpha(color, h.i === current ? 0.65 : 0.3) }, children: seg.text.slice(h.r[0], h.r[1]) }, h.i)
9406
+ );
9407
+ at = h.r[1];
9408
+ }
9409
+ if (at < seg.text.length) out.push(seg.text.slice(at));
9410
+ return out;
9411
+ }
9412
+ function hexAlpha(color, a) {
9413
+ const m = /^#([0-9a-f]{6})$/i.exec(color);
9414
+ if (!m) return color;
9415
+ const n = parseInt(m[1], 16);
9416
+ return `rgba(${n >> 16 & 255}, ${n >> 8 & 255}, ${n & 255}, ${a})`;
9417
+ }
9418
+ function duration(t) {
9419
+ if (!t.started_at || !t.ended_at) return null;
9420
+ const ms = Date.parse(t.ended_at) - Date.parse(t.started_at);
9421
+ return Number.isFinite(ms) && ms > 0 ? react$1.formatCallDuration(ms) : null;
9422
+ }
9423
+ function formatDate(iso) {
9424
+ const d = new Date(iso);
9425
+ if (Number.isNaN(d.getTime())) return null;
9426
+ return d.toLocaleString([], {
9427
+ month: "short",
9428
+ day: "numeric",
9429
+ hour: "numeric",
9430
+ minute: "2-digit"
9431
+ });
9432
+ }
9433
+ function transcriptError(err) {
9434
+ const code = err instanceof react$1.ApiError ? err.code : err.message;
9435
+ if (code === "forbidden") return "You can\u2019t open this transcript.";
9436
+ if (code === "not_found") return "There is no transcript for this call.";
9437
+ return react$1.captureErrorMessage(err instanceof react$1.ApiError ? err : { code });
9438
+ }
9439
+ var styles35 = reactNative.StyleSheet.create({
9440
+ panel: { flex: 1, minHeight: 0 },
9441
+ pressed: { opacity: 0.6 },
9442
+ head: {
9443
+ flexDirection: "row",
9444
+ alignItems: "center",
9445
+ gap: 8,
9446
+ paddingHorizontal: 12,
9447
+ paddingVertical: 10,
9448
+ borderBottomWidth: reactNative.StyleSheet.hairlineWidth
9449
+ },
9450
+ heading: { flex: 1, minWidth: 0 },
9451
+ title: { flex: 1, fontSize: 15, fontWeight: "600" },
9452
+ meta: { fontSize: 12, fontWeight: "500" },
9453
+ btn: {
9454
+ paddingHorizontal: 12,
9455
+ paddingVertical: 4,
9456
+ borderRadius: 999,
9457
+ borderWidth: reactNative.StyleSheet.hairlineWidth
9458
+ },
9459
+ btnText: { fontSize: 12, fontWeight: "600" },
9460
+ search: {
9461
+ flexDirection: "row",
9462
+ alignItems: "center",
9463
+ gap: 6,
9464
+ marginHorizontal: 12,
9465
+ marginTop: 8,
9466
+ paddingLeft: 10,
9467
+ paddingRight: 6,
9468
+ borderRadius: 12
9469
+ },
9470
+ searchInput: { flex: 1, minWidth: 0, paddingVertical: 8, fontSize: 14 },
9471
+ count: { fontSize: 12, fontWeight: "500", fontVariant: ["tabular-nums"] },
9472
+ speakers: { paddingHorizontal: 12, paddingTop: 8 },
9473
+ speakerRow: { flexDirection: "row", flexWrap: "wrap", gap: 6 },
9474
+ speaker: {
9475
+ flexDirection: "row",
9476
+ alignItems: "center",
9477
+ maxWidth: "100%",
9478
+ paddingLeft: 10,
9479
+ paddingRight: 4,
9480
+ paddingVertical: 3,
9481
+ borderRadius: 999
9482
+ },
9483
+ speakerName: { flexShrink: 1, maxWidth: 220, fontSize: 12, fontWeight: "500" },
9484
+ speakerEdit: { padding: 4 },
9485
+ rename: { flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: 4, width: "100%" },
9486
+ renameInput: {
9487
+ flexGrow: 1,
9488
+ minWidth: 140,
9489
+ paddingHorizontal: 8,
9490
+ paddingVertical: 6,
9491
+ fontSize: 13,
9492
+ borderRadius: 8,
9493
+ borderWidth: reactNative.StyleSheet.hairlineWidth
9494
+ },
9495
+ renameBtn: { paddingHorizontal: 8, paddingVertical: 6 },
9496
+ renameBtnText: { fontSize: 12, fontWeight: "600" },
9497
+ body: { flex: 1 },
9498
+ bodyContent: { paddingHorizontal: 12, paddingTop: 8, paddingBottom: 12 },
9499
+ empty: { marginVertical: 24, textAlign: "center", fontSize: 14 },
9500
+ block: { paddingVertical: 6 },
9501
+ who: { flexDirection: "row", alignItems: "baseline", gap: 8, minWidth: 0 },
9502
+ name: { flexShrink: 1, fontSize: 13, fontWeight: "600" },
9503
+ time: { fontSize: 11, fontWeight: "500", fontVariant: ["tabular-nums"] },
9504
+ timeLink: { textDecorationLine: "underline" },
9505
+ text: { marginTop: 2, fontSize: 14, lineHeight: 21 },
9506
+ error: { marginHorizontal: 12, marginVertical: 6, fontSize: 13, fontWeight: "500" }
9507
+ });
8658
9508
  var TILE_PATH = "M50 4 C20 4 4 20 4 50 C4 80 20 96 50 96 C80 96 96 80 96 50 C96 20 80 4 50 4 Z";
8659
9509
  var PULSE_PATH = "M16 55 H34 L40 55 L47 30 L54 73 L60 55 H72";
8660
9510
  var WORDMARK_P_PATH = "M62 -169V258V528H194L196 378L214 376Q223 432 246.0 469.0Q269 506 305.5 524.0Q342 542 389 542Q459 542 509.5 508.0Q560 474 587.0 411.0Q614 348 614 260Q614 182 590.5 120.0Q567 58 519.5 22.0Q472 -14 399 -14Q350 -14 316.0 3.5Q282 21 258.5 55.0Q235 89 219 140H200Q206 113 211.0 85.0Q216 57 219.5 31.0Q223 5 223 -19V-169ZM340 113Q373 113 396.5 131.0Q420 149 433.0 182.0Q446 215 446 259Q446 306 432.5 339.5Q419 373 394.0 391.5Q369 410 336 410Q305 410 283.5 396.5Q262 383 248.5 361.5Q235 340 229.0 316.0Q223 292 223 271V249Q223 230 228.0 211.0Q233 192 243.0 174.5Q253 157 267.0 143.0Q281 129 299.5 121.0Q318 113 340 113Z";
@@ -8824,7 +9674,7 @@ function CallControlButton({
8824
9674
  const size = large ? CONTROL_SIZE_LARGE : CONTROL_SIZE;
8825
9675
  const background = tone === "danger" ? callColors.danger : tone === "accept" ? callColors.accept : active ? callColors.controlActive : callColors.control;
8826
9676
  const iconColor = tone === "neutral" && active ? callColors.controlActiveIcon : callColors.onAction;
8827
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles34.slot, children: [
9677
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles36.slot, children: [
8828
9678
  /* @__PURE__ */ jsxRuntime.jsx(
8829
9679
  reactNative.Pressable,
8830
9680
  {
@@ -8835,7 +9685,7 @@ function CallControlButton({
8835
9685
  accessibilityLabel: accessibilityLabel ?? label ?? icon,
8836
9686
  hitSlop: 8,
8837
9687
  style: ({ pressed }) => [
8838
- styles34.button,
9688
+ styles36.button,
8839
9689
  {
8840
9690
  width: size,
8841
9691
  height: size,
@@ -8849,10 +9699,10 @@ function CallControlButton({
8849
9699
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: icon, size: large ? 30 : 25, color: iconColor, label: null })
8850
9700
  }
8851
9701
  ),
8852
- label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles34.label, children: label }) : null
9702
+ label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles36.label, children: label }) : null
8853
9703
  ] });
8854
9704
  }
8855
- var styles34 = reactNative.StyleSheet.create({
9705
+ var styles36 = reactNative.StyleSheet.create({
8856
9706
  // Fixed width so captions of different lengths cannot shift the row.
8857
9707
  slot: { width: 76, alignItems: "center", gap: 7 },
8858
9708
  button: { alignItems: "center", justifyContent: "center" },
@@ -8865,7 +9715,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
8865
9715
  reactNative.View,
8866
9716
  {
8867
9717
  style: [
8868
- styles35.ring,
9718
+ styles37.ring,
8869
9719
  {
8870
9720
  width: outer,
8871
9721
  height: outer,
@@ -8878,7 +9728,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
8878
9728
  reactNative.View,
8879
9729
  {
8880
9730
  style: [
8881
- styles35.circle,
9731
+ styles37.circle,
8882
9732
  {
8883
9733
  width: size,
8884
9734
  height: size,
@@ -8889,7 +9739,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
8889
9739
  children: /* @__PURE__ */ jsxRuntime.jsx(
8890
9740
  reactNative.Text,
8891
9741
  {
8892
- style: [styles35.initials, { fontSize: Math.round(size * 0.38) }],
9742
+ style: [styles37.initials, { fontSize: Math.round(size * 0.38) }],
8893
9743
  numberOfLines: 1,
8894
9744
  allowFontScaling: false,
8895
9745
  children: initialsOf(name)
@@ -8906,7 +9756,7 @@ function initialsOf(name) {
8906
9756
  if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
8907
9757
  return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
8908
9758
  }
8909
- var styles35 = reactNative.StyleSheet.create({
9759
+ var styles37 = reactNative.StyleSheet.create({
8910
9760
  ring: { alignItems: "center", justifyContent: "center" },
8911
9761
  circle: { alignItems: "center", justifyContent: "center" },
8912
9762
  initials: { color: "#ffffff", fontWeight: "600" }
@@ -8934,15 +9784,15 @@ function AudioRouteSheet({
8934
9784
  animationType: "fade",
8935
9785
  onRequestClose: onClose,
8936
9786
  ...EDGE_TO_EDGE_MODAL,
8937
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles36.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxRuntime.jsxs(
9787
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles38.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxRuntime.jsxs(
8938
9788
  reactNative.Pressable,
8939
9789
  {
8940
- style: [styles36.sheet, { paddingBottom: Math.max(34, insets.bottom + 16) }],
9790
+ style: [styles38.sheet, { paddingBottom: Math.max(34, insets.bottom + 16) }],
8941
9791
  onPress: () => {
8942
9792
  },
8943
9793
  children: [
8944
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles36.grabber }),
8945
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles36.title, children: "Audio output" }),
9794
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles38.grabber }),
9795
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles38.title, children: "Audio output" }),
8946
9796
  routes.map((route) => {
8947
9797
  const selected = route.id === selectedRouteId;
8948
9798
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -8954,7 +9804,7 @@ function AudioRouteSheet({
8954
9804
  },
8955
9805
  accessibilityRole: "button",
8956
9806
  accessibilityState: { selected },
8957
- style: ({ pressed }) => [styles36.row, pressed && styles36.rowPressed],
9807
+ style: ({ pressed }) => [styles38.row, pressed && styles38.rowPressed],
8958
9808
  children: [
8959
9809
  /* @__PURE__ */ jsxRuntime.jsx(
8960
9810
  PoolseIcon,
@@ -8965,7 +9815,7 @@ function AudioRouteSheet({
8965
9815
  label: null
8966
9816
  }
8967
9817
  ),
8968
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles36.label, selected && styles36.labelSelected], children: route.label }),
9818
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles38.label, selected && styles38.labelSelected], children: route.label }),
8969
9819
  selected && /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
8970
9820
  ]
8971
9821
  },
@@ -8978,7 +9828,7 @@ function AudioRouteSheet({
8978
9828
  }
8979
9829
  );
8980
9830
  }
8981
- var styles36 = reactNative.StyleSheet.create({
9831
+ var styles38 = reactNative.StyleSheet.create({
8982
9832
  backdrop: { flex: 1, backgroundColor: "rgba(0,0,0,0.55)", justifyContent: "flex-end" },
8983
9833
  sheet: {
8984
9834
  backgroundColor: callColors.tile,
@@ -9070,6 +9920,7 @@ exports.CallAvatar = CallAvatar;
9070
9920
  exports.CallControlButton = CallControlButton;
9071
9921
  exports.CallLogRow = CallLogRow;
9072
9922
  exports.ChatHeader = ChatHeader;
9923
+ exports.ConsentPrompt = ConsentPrompt;
9073
9924
  exports.ConversationList = ConversationList;
9074
9925
  exports.ConversationView = ConversationView;
9075
9926
  exports.DaySeparator = DaySeparator;
@@ -9080,6 +9931,7 @@ exports.GroupDetailsSheet = GroupDetailsSheet;
9080
9931
  exports.ImageMosaic = ImageMosaic;
9081
9932
  exports.LinkPreviewCard = LinkPreviewCard;
9082
9933
  exports.LiveCallBanner = LiveCallBanner;
9934
+ exports.LiveTranscriptPanel = LiveTranscriptPanel;
9083
9935
  exports.MemberList = MemberList;
9084
9936
  exports.MentionInput = MentionInput;
9085
9937
  exports.MessageActions = MessageActions;
@@ -9096,9 +9948,13 @@ exports.PresenceBadge = PresenceBadge;
9096
9948
  exports.Primitives = primitives;
9097
9949
  exports.ReactionPicker = ReactionPicker;
9098
9950
  exports.ReactionStrip = ReactionStrip;
9951
+ exports.RecordingBanner = RecordingBanner;
9952
+ exports.RecordingIndicator = RecordingIndicator;
9953
+ exports.RecordingNoticeRow = RecordingNoticeRow;
9099
9954
  exports.SendStatus = SendStatus;
9100
9955
  exports.ThreadSummary = ThreadSummary;
9101
9956
  exports.ThreadView = ThreadView;
9957
+ exports.TranscriptViewer = TranscriptViewer;
9102
9958
  exports.TypingIndicator = TypingIndicator;
9103
9959
  exports.UploadQueueStrip = UploadQueueStrip;
9104
9960
  exports.UserName = UserName;