@burdenoff/microfe-conversations 2026.830.1 → 2026.924.1

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.
@@ -1,36 +1,33 @@
1
1
  import { useConversations as e } from "../providers/ConversationsProvider.js";
2
- import { cn as t } from "../utils/cn.js";
3
- import { useConversationsStore as n } from "../store/conversationsStore.js";
4
- import { MessageBubble as r } from "../components/MessageBubble.js";
5
- import { useConversationActions as i, useGetConversation as ee } from "../hooks/useConversationQueries.js";
6
- import { useEditMessage as te, useGetMessages as ne, useMessageActions as re, useSendMessage as ie } from "../hooks/useMessageQueries.js";
7
- import { useMessageStreamForConversation as ae } from "../hooks/useMessageSubscriptions.js";
2
+ import { useTr as t } from "../utils/i18n.js";
3
+ import { cn as n } from "../utils/cn.js";
4
+ import { useConversationsStore as r } from "../store/conversationsStore.js";
5
+ import { MessageBubble as i } from "../components/MessageBubble.js";
6
+ import { useConversationActions as ee, useGetConversation as te } from "../hooks/useConversationQueries.js";
7
+ import { useEditMessage as ne, useGetMessages as re, useMessageActions as ie, useSendMessage as ae } from "../hooks/useMessageQueries.js";
8
+ import { useMessageStreamForConversation as oe } from "../hooks/useMessageSubscriptions.js";
8
9
  import { PermissionGuard as a } from "../components/PermissionGuard.js";
9
- import { QuotaExhaustedDialog as oe } from "../components/QuotaExhaustedDialog.js";
10
+ import { QuotaExhaustedDialog as se } from "../components/QuotaExhaustedDialog.js";
10
11
  import { CONVERSATIONS_PERMISSIONS as o } from "../constants/permissions.js";
11
- import { nativeImpact as se, nativeNotify as s } from "../../utils/nativeBridge.js";
12
+ import { nativeImpact as ce, nativeNotify as s } from "../../utils/nativeBridge.js";
12
13
  import { useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
13
- import { Archive as ce, ArrowLeft as le, Bell as ue, BellOff as de, ExternalLink as fe, Hash as pe, Loader2 as me, LogOut as he, MoreVertical as ge, Pin as p, PinOff as _e, SendHorizontal as m, Users as ve, X as ye } from "lucide-react";
14
- import { useNavigate as be, useParams as xe } from "react-router";
15
- import { isQuotaExhaustedError as Se } from "@burdenoff/fe-libs/shared/utils";
16
- import { useEventBus as Ce } from "@burdenoff/fe-libs/shared/events";
14
+ import { Archive as le, ArrowLeft as ue, Bell as de, BellOff as fe, ExternalLink as pe, Hash as me, Loader2 as he, LogOut as ge, MoreVertical as _e, Pin as p, PinOff as ve, SendHorizontal as m, Users as ye, X as be } from "lucide-react";
15
+ import { useNavigate as xe, useParams as Se } from "react-router";
16
+ import { isQuotaExhaustedError as Ce } from "@burdenoff/fe-libs/shared/utils";
17
+ import { useEventBus as we } from "@burdenoff/fe-libs/shared/events";
17
18
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
18
- import { useI18n as we } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
19
  import { Button as Te, IllustratedEmptyState as Ee, NextSteps as De } from "@burdenoff/fe-libs/ui";
20
20
  //#region src/conversations/pages/ConversationDetailPage.tsx
21
21
  var _ = 100, Oe = 3e4;
22
22
  function v() {
23
- let { conversationId: a } = xe(), o = be(), { basePath: v, currentUser: ke } = e(), x = Ce(), { t: Ae } = we(), S = c((e, t) => {
24
- let n = Ae(e);
25
- return n === e ? t : n;
26
- }, [Ae]), { clearMessageDraft: C, isParticipantsPanelOpen: w, messageDrafts: je, setMessageDraft: Me, toggleParticipantsPanel: T } = n(), [E, Ne] = f(je[a ?? ""] ?? ""), [Pe, D] = f(!1), [O, k] = f([]), Fe = d(null), A = d(null), j = c(() => {
23
+ let { conversationId: a } = Se(), o = xe(), { basePath: v, currentUser: ke } = e(), x = we(), S = t(), { clearMessageDraft: C, isParticipantsPanelOpen: w, messageDrafts: Ae, setMessageDraft: je, toggleParticipantsPanel: T } = r(), [E, Me] = f(Ae[a ?? ""] ?? ""), [Ne, D] = f(!1), [O, k] = f([]), Pe = d(null), A = d(null), j = c(() => {
27
24
  A.current?.focus(), A.current?.scrollIntoView({ behavior: "smooth" });
28
- }, []), { conversation: M, members: N, membersTotalCount: Ie, loading: Le, error: P } = ee(a ?? ""), { messages: F, loading: Re, error: ze, refetch: Be } = ne(a ?? "", {
25
+ }, []), { conversation: M, members: N, membersTotalCount: Fe, loading: Ie, error: P } = te(a ?? ""), { messages: F, loading: Le, error: Re, refetch: ze } = re(a ?? "", {
29
26
  first: _,
30
27
  pollInterval: Oe
31
28
  });
32
- ae(a, _);
33
- let { sendMessage: Ve, loading: I } = ie(), { editMessage: He, loading: L } = te(), { deleteMessage: Ue, addReaction: We, removeReaction: Ge, pinMessage: Ke, unpinMessage: qe } = re(), { archiveConversation: Je, pinConversation: Ye, unpinConversation: Xe, muteConversation: Ze, unmuteConversation: Qe, leaveConversation: $e } = i(), [R, z] = f(!1), [B, V] = f(null), [H, U] = f(""), [W, G] = f(null), K = d(null), q = ke?.id ?? "", J = M?.sourceContext, Y = u(() => {
29
+ oe(a, _);
30
+ let { sendMessage: Be, loading: I } = ae(), { editMessage: Ve, loading: L } = ne(), { deleteMessage: He, addReaction: Ue, removeReaction: We, pinMessage: Ge, unpinMessage: Ke } = ie(), { archiveConversation: qe, pinConversation: Je, unpinConversation: Ye, muteConversation: Xe, unmuteConversation: Ze, leaveConversation: Qe } = ee(), [R, z] = f(!1), [B, V] = f(null), [H, U] = f(""), [W, G] = f(null), K = d(null), q = ke?.id ?? "", J = M?.sourceContext, Y = u(() => {
34
31
  let e = /* @__PURE__ */ new Map();
35
32
  for (let t of O) t.conversationId === a && e.set(t.id, t);
36
33
  for (let t of F) e.set(t.id, t);
@@ -41,7 +38,7 @@ function v() {
41
38
  F
42
39
  ]);
43
40
  l(() => {
44
- Fe.current?.scrollIntoView({ behavior: "smooth" });
41
+ Pe.current?.scrollIntoView({ behavior: "smooth" });
45
42
  }, [Y.length]), l(() => {
46
43
  k([]);
47
44
  }, [a]), l(() => {
@@ -58,7 +55,7 @@ function v() {
58
55
  ]), l(() => {
59
56
  if (a) {
60
57
  if (E.trim()) {
61
- Me(a, E);
58
+ je(a, E);
62
59
  return;
63
60
  }
64
61
  C(a);
@@ -66,7 +63,7 @@ function v() {
66
63
  }, [
67
64
  E,
68
65
  a,
69
- Me,
66
+ je,
70
67
  C
71
68
  ]);
72
69
  let X = u(() => {
@@ -85,11 +82,11 @@ function v() {
85
82
  N,
86
83
  X,
87
84
  S
88
- ]), et = M?.memberCount ? Math.max(M.memberCount - Z.length, 0) : 0, Q = c(async () => {
85
+ ]), $e = M?.memberCount ? Math.max(M.memberCount - Z.length, 0) : 0, Q = c(async () => {
89
86
  if (!a || !E.trim() || I) return;
90
87
  let e;
91
88
  try {
92
- e = await Ve({
89
+ e = await Be({
93
90
  conversationId: a,
94
91
  content: E.trim(),
95
92
  type: "TEXT",
@@ -97,7 +94,7 @@ function v() {
97
94
  refetchFirst: _
98
95
  });
99
96
  } catch (e) {
100
- if (Se(e)) {
97
+ if (Ce(e)) {
101
98
  D(!0);
102
99
  return;
103
100
  }
@@ -106,16 +103,16 @@ function v() {
106
103
  e && (k((t) => [...t, e]), x.emit("conversations.message.sent", {
107
104
  messageId: e.id,
108
105
  conversationId: a
109
- }), Ne(""), G(null), C(a));
106
+ }), Me(""), G(null), C(a));
110
107
  }, [
111
108
  x,
112
109
  a,
113
110
  E,
114
111
  I,
115
- Ve,
112
+ Be,
116
113
  C,
117
114
  W
118
- ]), tt = c((e) => {
115
+ ]), et = c((e) => {
119
116
  e.key !== "Enter" || e.shiftKey || (e.preventDefault(), Q());
120
117
  }, [Q]);
121
118
  l(() => {
@@ -127,77 +124,77 @@ function v() {
127
124
  };
128
125
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
129
126
  }, [R]);
130
- let nt = c((e) => {
127
+ let tt = c((e) => {
131
128
  G({
132
129
  id: e.id,
133
130
  content: e.content,
134
131
  sender: e.sender.name
135
132
  });
136
- }, []), rt = c(async (e, t) => {
133
+ }, []), nt = c(async (e, t) => {
137
134
  try {
138
- await We(e, t);
135
+ await Ue(e, t);
139
136
  } catch {
140
- await Ge(e, t).catch(() => {});
137
+ await We(e, t).catch(() => {});
141
138
  }
142
- }, [We, Ge]), it = c((e) => {
139
+ }, [Ue, We]), rt = c((e) => {
143
140
  V(e.id), U(e.content);
144
- }, []), at = c(async () => {
145
- !B || !H.trim() || L || (await He(B, H.trim()), V(null), U(""));
141
+ }, []), it = c(async () => {
142
+ !B || !H.trim() || L || (await Ve(B, H.trim()), V(null), U(""));
146
143
  }, [
147
144
  B,
148
145
  H,
149
146
  L,
150
- He
151
- ]), ot = c(() => {
147
+ Ve
148
+ ]), at = c(() => {
152
149
  V(null), U("");
153
- }, []), st = c(async (e) => {
150
+ }, []), ot = c(async (e) => {
154
151
  if (window.confirm(S("conversations.confirmDeleteMessage", "Delete this message? This action cannot be undone."))) {
155
- se("medium");
152
+ ce("medium");
156
153
  try {
157
- await Ue(e), Be(), s("success");
154
+ await He(e), ze(), s("success");
158
155
  } catch (e) {
159
156
  console.error("[microfe-conversations] message delete failed", e), s("error");
160
157
  }
161
158
  }
162
159
  }, [
163
- Ue,
164
- Be,
160
+ He,
161
+ ze,
165
162
  S
166
- ]), ct = c(async (e, t) => {
163
+ ]), st = c(async (e, t) => {
167
164
  if (t) {
168
- await qe(e);
165
+ await Ke(e);
169
166
  return;
170
167
  }
171
- await Ke(e);
172
- }, [Ke, qe]), lt = c(async () => {
173
- a && (M?.isPinned ? await Xe(a) : await Ye(a), z(!1));
168
+ await Ge(e);
169
+ }, [Ge, Ke]), $ = c(async () => {
170
+ a && (M?.isPinned ? await Ye(a) : await Je(a), z(!1));
174
171
  }, [
175
172
  a,
176
173
  M?.isPinned,
177
- Ye,
178
- Xe
179
- ]), ut = c(async () => {
180
- a && (M?.isMuted ? await Qe(a) : await Ze(a), z(!1));
174
+ Je,
175
+ Ye
176
+ ]), ct = c(async () => {
177
+ a && (M?.isMuted ? await Ze(a) : await Xe(a), z(!1));
181
178
  }, [
182
179
  a,
183
180
  M?.isMuted,
184
- Ze,
185
- Qe
186
- ]), dt = c(async () => {
181
+ Xe,
182
+ Ze
183
+ ]), lt = c(async () => {
187
184
  if (a) try {
188
- await Je(a), x.emit("conversations.conversation.archived", { conversationId: a }), z(!1), o(v || "/conversations");
185
+ await qe(a), x.emit("conversations.conversation.archived", { conversationId: a }), z(!1), o(v || "/conversations");
189
186
  } catch (e) {
190
187
  console.error("[microfe-conversations] conversation archive failed", e), s("error");
191
188
  }
192
189
  }, [
193
- Je,
190
+ qe,
194
191
  v,
195
192
  x,
196
193
  a,
197
194
  o
198
- ]), ft = c(async () => {
195
+ ]), ut = c(async () => {
199
196
  if (a && window.confirm(S("conversations.confirmLeaveConversation", "Leave this conversation? You will lose access unless someone adds you again."))) try {
200
- await $e(a), q && x.emit("conversations.member.removed", {
197
+ await Qe(a), q && x.emit("conversations.member.removed", {
201
198
  conversationId: a,
202
199
  userId: q
203
200
  }), z(!1), o(v || "/conversations");
@@ -209,10 +206,10 @@ function v() {
209
206
  x,
210
207
  a,
211
208
  q,
212
- $e,
209
+ Qe,
213
210
  o,
214
211
  S
215
- ]), $ = c(() => {
212
+ ]), dt = c(() => {
216
213
  if (J?.contextHref) {
217
214
  try {
218
215
  let e = new URL(J.contextHref);
@@ -223,7 +220,7 @@ function v() {
223
220
  } catch {}
224
221
  window.location.assign(J.contextHref);
225
222
  }
226
- }, [o, J?.contextHref]), pt = u(() => {
223
+ }, [o, J?.contextHref]), ft = u(() => {
227
224
  let e = [{
228
225
  id: "send-message",
229
226
  label: S("conversations.nextSteps.send.label", "Send your first reply"),
@@ -239,7 +236,7 @@ function v() {
239
236
  id: "view-participants",
240
237
  label: S("conversations.nextSteps.participants.label", "Review participants"),
241
238
  description: S("conversations.nextSteps.participants.description", "See who can read and post in this conversation."),
242
- icon: /* @__PURE__ */ h(ve, {
239
+ icon: /* @__PURE__ */ h(ye, {
243
240
  size: 14,
244
241
  "aria-hidden": "true"
245
242
  }),
@@ -250,11 +247,11 @@ function v() {
250
247
  id: "open-context",
251
248
  label: S("conversations.nextSteps.context.label", "Open the related item"),
252
249
  description: S("conversations.nextSteps.context.description", "Jump to the page or record this conversation is about."),
253
- icon: /* @__PURE__ */ h(fe, {
250
+ icon: /* @__PURE__ */ h(pe, {
254
251
  size: 14,
255
252
  "aria-hidden": "true"
256
253
  }),
257
- onClick: $
254
+ onClick: dt
258
255
  }), e.push({
259
256
  id: "pin-conversation",
260
257
  label: M?.isPinned ? S("conversations.nextSteps.unpin.label", "Unpin this conversation") : S("conversations.nextSteps.pin.label", "Pin for quick access"),
@@ -263,7 +260,7 @@ function v() {
263
260
  size: 14,
264
261
  "aria-hidden": "true"
265
262
  }),
266
- onClick: () => void lt(),
263
+ onClick: () => void $(),
267
264
  done: M?.isPinned
268
265
  }), e;
269
266
  }, [
@@ -271,14 +268,14 @@ function v() {
271
268
  M?.isPinned,
272
269
  Y.length,
273
270
  j,
271
+ dt,
274
272
  $,
275
- lt,
276
273
  w,
277
274
  J?.contextHref,
278
275
  T,
279
276
  S
280
277
  ]);
281
- return !M && Le ? /* @__PURE__ */ h("div", {
278
+ return !M && Ie ? /* @__PURE__ */ h("div", {
282
279
  className: "flex items-center justify-center h-[calc(100vh-64px)] text-sm text-text-secondary",
283
280
  children: S("conversations.loading", "Loading conversation...")
284
281
  }) : !M || P ? /* @__PURE__ */ h("div", {
@@ -308,12 +305,12 @@ function v() {
308
305
  type: "button",
309
306
  onClick: () => o(v || "/conversations"),
310
307
  className: "flex min-h-10 min-w-10 items-center justify-center rounded-lg text-text-secondary transition-colors hover:bg-bg-sunken/50 hover:text-text-primary",
311
- children: /* @__PURE__ */ h(le, { size: 18 })
308
+ children: /* @__PURE__ */ h(ue, { size: 18 })
312
309
  }), /* @__PURE__ */ g("div", {
313
310
  className: "min-w-0",
314
311
  children: [/* @__PURE__ */ g("div", {
315
312
  className: "flex items-center gap-1.5",
316
- children: [M.type === "CHANNEL" && /* @__PURE__ */ h(pe, {
313
+ children: [M.type === "CHANNEL" && /* @__PURE__ */ h(me, {
317
314
  size: 14,
318
315
  className: "text-text-secondary flex-shrink-0"
319
316
  }), /* @__PURE__ */ h("h2", {
@@ -330,13 +327,13 @@ function v() {
330
327
  children: [
331
328
  J?.contextHref && /* @__PURE__ */ h(b, {
332
329
  dataTour: "conversation-open-context",
333
- icon: /* @__PURE__ */ h(fe, { size: 16 }),
330
+ icon: /* @__PURE__ */ h(pe, { size: 16 }),
334
331
  label: S("conversations.openContext", "Open context"),
335
- onClick: $
332
+ onClick: dt
336
333
  }),
337
334
  M.isGroup && /* @__PURE__ */ h(b, {
338
335
  dataTour: "conversation-participants-button",
339
- icon: /* @__PURE__ */ h(ve, { size: 16 }),
336
+ icon: /* @__PURE__ */ h(ye, { size: 16 }),
340
337
  label: S("conversations.participants", "Participants"),
341
338
  active: w,
342
339
  onClick: T
@@ -345,7 +342,7 @@ function v() {
345
342
  className: "relative",
346
343
  ref: K,
347
344
  children: [/* @__PURE__ */ h(b, {
348
- icon: /* @__PURE__ */ h(ge, { size: 16 }),
345
+ icon: /* @__PURE__ */ h(_e, { size: 16 }),
349
346
  label: S("conversations.moreOptions", "More options"),
350
347
  active: R,
351
348
  onClick: () => z((e) => !e)
@@ -353,26 +350,26 @@ function v() {
353
350
  className: "absolute right-0 top-full mt-1 w-48 bg-popover border border-border-subtle rounded-lg shadow-lg z-50 py-1 animate-in fade-in-0 zoom-in-95 duration-100",
354
351
  children: [
355
352
  /* @__PURE__ */ h(y, {
356
- icon: M.isPinned ? /* @__PURE__ */ h(_e, { size: 14 }) : /* @__PURE__ */ h(p, { size: 14 }),
353
+ icon: M.isPinned ? /* @__PURE__ */ h(ve, { size: 14 }) : /* @__PURE__ */ h(p, { size: 14 }),
357
354
  label: M.isPinned ? S("conversations.unpinConversation", "Unpin conversation") : S("conversations.pinConversation", "Pin conversation"),
358
- onClick: () => void lt()
355
+ onClick: () => void $()
359
356
  }),
360
357
  /* @__PURE__ */ h(y, {
361
- icon: M.isMuted ? /* @__PURE__ */ h(ue, { size: 14 }) : /* @__PURE__ */ h(de, { size: 14 }),
358
+ icon: M.isMuted ? /* @__PURE__ */ h(de, { size: 14 }) : /* @__PURE__ */ h(fe, { size: 14 }),
362
359
  label: M.isMuted ? S("conversations.unmuteConversation", "Unmute conversation") : S("conversations.muteConversation", "Mute conversation"),
363
- onClick: () => void ut()
360
+ onClick: () => void ct()
364
361
  }),
365
362
  /* @__PURE__ */ h("div", { className: "h-px bg-border my-1" }),
366
363
  /* @__PURE__ */ h(y, {
367
- icon: /* @__PURE__ */ h(ce, { size: 14 }),
364
+ icon: /* @__PURE__ */ h(le, { size: 14 }),
368
365
  label: S("conversations.archiveConversation", "Archive conversation"),
369
- onClick: () => void dt(),
366
+ onClick: () => void lt(),
370
367
  destructive: !0
371
368
  }),
372
369
  M.isGroup && /* @__PURE__ */ h(y, {
373
- icon: /* @__PURE__ */ h(he, { size: 14 }),
370
+ icon: /* @__PURE__ */ h(ge, { size: 14 }),
374
371
  label: S("conversations.leaveConversation", "Leave conversation"),
375
- onClick: () => void ft(),
372
+ onClick: () => void ut(),
376
373
  destructive: !0
377
374
  })
378
375
  ]
@@ -389,20 +386,23 @@ function v() {
389
386
  children: [/* @__PURE__ */ h("span", {
390
387
  className: "font-medium text-text-primary",
391
388
  children: J.contextTitle || J.pagePath
392
- }), J.entityType && J.entityId ? ` · ${J.entityType} ${J.entityId}` : ""]
389
+ }), J.entityType && J.entityId ? S("conversations.contextEntityMeta", " · {{entityType}} {{entityId}}", {
390
+ entityType: J.entityType,
391
+ entityId: J.entityId
392
+ }) : ""]
393
393
  }),
394
- ze && /* @__PURE__ */ h("div", {
394
+ Re && /* @__PURE__ */ h("div", {
395
395
  className: "mx-4 mb-4 rounded-lg border border-status-warning-border bg-status-warning-bg px-3 py-2 text-sm text-status-warning-text",
396
396
  children: S("conversations.messagesUnavailable", "Messages couldn't be loaded right now. The conversation header and actions are still available.")
397
397
  }),
398
- Re && /* @__PURE__ */ g("div", {
398
+ Le && /* @__PURE__ */ g("div", {
399
399
  className: "mx-4 mb-4 flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-sunken/20 px-3 py-2 text-sm text-text-secondary",
400
- children: [/* @__PURE__ */ h(me, {
400
+ children: [/* @__PURE__ */ h(he, {
401
401
  size: 14,
402
402
  className: "animate-spin"
403
403
  }), S("conversations.loadingMessages", "Loading messages...")]
404
404
  }),
405
- !Re && !ze && Y.length === 0 && /* @__PURE__ */ g("div", {
405
+ !Le && !Re && Y.length === 0 && /* @__PURE__ */ g("div", {
406
406
  className: "mx-4 mb-4 flex flex-col items-center gap-5 py-6",
407
407
  children: [/* @__PURE__ */ h(Ee, {
408
408
  illustration: "empty-vibes",
@@ -420,53 +420,53 @@ function v() {
420
420
  className: "w-full max-w-md",
421
421
  storageKey: "conversations-detail",
422
422
  title: S("conversations.nextSteps.title", "Get the most out of this conversation"),
423
- steps: pt
423
+ steps: ft
424
424
  })]
425
425
  }),
426
426
  Y.map((e, t) => {
427
- let n = Y[t - 1], i = !n || n.authorId !== e.authorId || n.type === "SYSTEM";
427
+ let n = Y[t - 1], r = !n || n.authorId !== e.authorId || n.type === "SYSTEM";
428
428
  return /* @__PURE__ */ h("div", { children: B === e.id ? /* @__PURE__ */ g("div", {
429
429
  className: "px-4 py-2",
430
430
  children: [/* @__PURE__ */ g("div", {
431
431
  className: "flex items-center gap-2 text-xs text-text-secondary mb-1",
432
432
  children: [/* @__PURE__ */ h("span", { children: S("conversations.editingMessage", "Editing message") }), /* @__PURE__ */ h("button", {
433
433
  type: "button",
434
- onClick: ot,
434
+ onClick: at,
435
435
  className: "hover:text-text-primary",
436
- children: /* @__PURE__ */ h(ye, { size: 12 })
436
+ children: /* @__PURE__ */ h(be, { size: 12 })
437
437
  })]
438
438
  }), /* @__PURE__ */ g("div", {
439
439
  className: "flex items-end gap-2",
440
440
  children: [/* @__PURE__ */ h("textarea", {
441
- "aria-label": "Edit message",
441
+ "aria-label": S("conversations.editMessageAria", "Edit message"),
442
442
  value: H,
443
443
  onChange: (e) => U(e.target.value),
444
444
  onKeyDown: (e) => {
445
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), at()), e.key === "Escape" && ot();
445
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), it()), e.key === "Escape" && at();
446
446
  },
447
447
  className: "flex-1 px-3 py-2 text-sm rounded-lg border border-border-subtle bg-bg-sunken/30 resize-none focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
448
448
  rows: 2
449
449
  }), /* @__PURE__ */ h("button", {
450
450
  type: "button",
451
- onClick: () => void at(),
451
+ onClick: () => void it(),
452
452
  disabled: !H.trim() || L,
453
453
  className: "px-3 py-2 text-xs font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
454
454
  children: S("conversations.save", "Save")
455
455
  })]
456
456
  })]
457
- }) : /* @__PURE__ */ h(r, {
457
+ }) : /* @__PURE__ */ h(i, {
458
458
  message: e,
459
459
  isOwnMessage: e.authorId === q,
460
- showAvatar: i,
461
- showSender: i,
462
- onReply: nt,
463
- onReact: (e, t) => void rt(e, t),
464
- onEdit: it,
465
- onDelete: (e) => void st(e),
466
- onTogglePin: (e, t) => void ct(e, t)
460
+ showAvatar: r,
461
+ showSender: r,
462
+ onReply: tt,
463
+ onReact: (e, t) => void nt(e, t),
464
+ onEdit: rt,
465
+ onDelete: (e) => void ot(e),
466
+ onTogglePin: (e, t) => void st(e, t)
467
467
  }) }, e.id);
468
468
  }),
469
- /* @__PURE__ */ h("div", { ref: Fe })
469
+ /* @__PURE__ */ h("div", { ref: Pe })
470
470
  ]
471
471
  }),
472
472
  /* @__PURE__ */ g("div", {
@@ -489,7 +489,7 @@ function v() {
489
489
  onClick: () => G(null),
490
490
  "aria-label": S("conversations.cancelReply", "Cancel reply"),
491
491
  className: "ml-auto flex min-h-9 min-w-9 items-center justify-center rounded-md hover:bg-bg-sunken/70 hover:text-text-primary",
492
- children: /* @__PURE__ */ h(ye, { size: 12 })
492
+ children: /* @__PURE__ */ h(be, { size: 12 })
493
493
  })]
494
494
  }), /* @__PURE__ */ g("div", {
495
495
  className: "flex items-end gap-2",
@@ -499,11 +499,11 @@ function v() {
499
499
  "aria-label": S("conversations.messageComposer", "Message composer"),
500
500
  ref: A,
501
501
  value: E,
502
- onChange: (e) => Ne(e.target.value),
503
- onKeyDown: tt,
502
+ onChange: (e) => Me(e.target.value),
503
+ onKeyDown: et,
504
504
  placeholder: `${S("conversations.messageConversationPrefix", "Message")} ${M.title}...`,
505
505
  rows: 1,
506
- className: t("w-full px-4 py-2.5 text-sm rounded-xl border border-border-subtle bg-bg-sunken/30", "resize-none overflow-hidden placeholder:text-text-secondary", "focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent max-h-32"),
506
+ className: n("w-full px-4 py-2.5 text-sm rounded-xl border border-border-subtle bg-bg-sunken/30", "resize-none overflow-hidden placeholder:text-text-secondary", "focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent max-h-32"),
507
507
  style: {
508
508
  height: "auto",
509
509
  minHeight: "40px"
@@ -518,8 +518,8 @@ function v() {
518
518
  "aria-label": S("conversations.sendMessage", "Send message"),
519
519
  onClick: () => void Q(),
520
520
  disabled: !E.trim() || I,
521
- className: t("p-2.5 rounded-xl transition-all duration-150", E.trim() && !I ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 shadow-sm" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
522
- children: I ? /* @__PURE__ */ h(me, {
521
+ className: n("p-2.5 rounded-xl transition-all duration-150", E.trim() && !I ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 shadow-sm" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
522
+ children: I ? /* @__PURE__ */ h(he, {
523
523
  size: 18,
524
524
  className: "animate-spin"
525
525
  }) : /* @__PURE__ */ h(m, { size: 18 })
@@ -565,12 +565,12 @@ function v() {
565
565
  children: e.role
566
566
  })]
567
567
  })]
568
- }, e.id)), et > 0 && /* @__PURE__ */ g("p", {
568
+ }, e.id)), $e > 0 && /* @__PURE__ */ g("p", {
569
569
  className: "px-2 pt-2 text-xs text-text-secondary",
570
570
  children: [
571
571
  S("conversations.moreMembersPrefix", "and"),
572
572
  " ",
573
- et,
573
+ $e,
574
574
  " ",
575
575
  S("conversations.moreMembersSuffix", "more")
576
576
  ]
@@ -578,8 +578,8 @@ function v() {
578
578
  })]
579
579
  })
580
580
  }),
581
- /* @__PURE__ */ h(oe, {
582
- open: Pe,
581
+ /* @__PURE__ */ h(se, {
582
+ open: Ne,
583
583
  title: S("conversations.quota.messages.title", "Message Quota Reached"),
584
584
  description: S("conversations.quota.messages.description", "You've reached the message limit for your current plan. View billing to upgrade or add more capacity."),
585
585
  onClose: () => D(!1),
@@ -590,15 +590,15 @@ function v() {
590
590
  ]
591
591
  });
592
592
  }
593
- function y({ icon: e, label: n, onClick: r, destructive: i }) {
593
+ function y({ icon: e, label: t, onClick: r, destructive: i }) {
594
594
  return /* @__PURE__ */ g("button", {
595
595
  type: "button",
596
596
  onClick: r,
597
- className: t("flex items-center gap-2.5 w-full px-3 py-2 text-sm transition-colors text-left", i ? "text-status-error-text hover:bg-status-error-bg/10" : "text-text-primary hover:bg-bg-sunken/50"),
598
- children: [e, /* @__PURE__ */ h("span", { children: n })]
597
+ className: n("flex items-center gap-2.5 w-full px-3 py-2 text-sm transition-colors text-left", i ? "text-status-error-text hover:bg-status-error-bg/10" : "text-text-primary hover:bg-bg-sunken/50"),
598
+ children: [e, /* @__PURE__ */ h("span", { children: t })]
599
599
  });
600
600
  }
601
- function b({ icon: e, label: n, active: r, dataTour: i, onClick: ee }) {
601
+ function b({ icon: e, label: t, active: r, dataTour: i, onClick: ee }) {
602
602
  return /* @__PURE__ */ h(a, {
603
603
  permission: o.CONVERSATION_READ,
604
604
  allowUnavailablePermissions: !0,
@@ -606,9 +606,9 @@ function b({ icon: e, label: n, active: r, dataTour: i, onClick: ee }) {
606
606
  "data-tour": i,
607
607
  type: "button",
608
608
  onClick: ee,
609
- "aria-label": n,
610
- title: n,
611
- className: t("flex min-h-10 min-w-10 items-center justify-center rounded-lg transition-colors", r ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken/50"),
609
+ "aria-label": t,
610
+ title: t,
611
+ className: n("flex min-h-10 min-w-10 items-center justify-center rounded-lg transition-colors", r ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken/50"),
612
612
  children: e
613
613
  })
614
614
  });