@burdenoff/microfe-conversations 2026.522.1 → 2026.523.2

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.
Files changed (47) hide show
  1. package/dist/conversations/ConversationsUserRoutes.d.ts.map +1 -1
  2. package/dist/conversations/ConversationsUserRoutes.js +17 -19
  3. package/dist/conversations/ConversationsUserRoutes.js.map +1 -1
  4. package/dist/conversations/components/ConversationCard.d.ts.map +1 -1
  5. package/dist/conversations/components/ConversationCard.js +2 -1
  6. package/dist/conversations/components/ConversationCard.js.map +1 -1
  7. package/dist/conversations/components/LazyPageBoundary.d.ts +3 -3
  8. package/dist/conversations/components/LazyPageBoundary.d.ts.map +1 -1
  9. package/dist/conversations/components/LazyPageBoundary.js.map +1 -1
  10. package/dist/conversations/components/MessageBubble.d.ts.map +1 -1
  11. package/dist/conversations/components/MessageBubble.js +22 -16
  12. package/dist/conversations/components/MessageBubble.js.map +1 -1
  13. package/dist/conversations/components/PageLayout.d.ts +3 -1
  14. package/dist/conversations/components/PageLayout.d.ts.map +1 -1
  15. package/dist/conversations/components/PageLayout.js +2 -1
  16. package/dist/conversations/components/PageLayout.js.map +1 -1
  17. package/dist/conversations/hooks/useConversationQueries.js +1 -1
  18. package/dist/conversations/hooks/useConversationQueries.js.map +1 -1
  19. package/dist/conversations/hooks/useMessageQueries.d.ts +1 -0
  20. package/dist/conversations/hooks/useMessageQueries.d.ts.map +1 -1
  21. package/dist/conversations/hooks/useMessageQueries.js +48 -42
  22. package/dist/conversations/hooks/useMessageQueries.js.map +1 -1
  23. package/dist/conversations/index.js +1 -1
  24. package/dist/conversations/pages/ConversationAdminPages.d.ts.map +1 -1
  25. package/dist/conversations/pages/ConversationAdminPages.js +139 -138
  26. package/dist/conversations/pages/ConversationAdminPages.js.map +1 -1
  27. package/dist/conversations/pages/ConversationDetailPage.d.ts.map +1 -1
  28. package/dist/conversations/pages/ConversationDetailPage.js +256 -230
  29. package/dist/conversations/pages/ConversationDetailPage.js.map +1 -1
  30. package/dist/conversations/pages/ConversationListPage.d.ts +1 -2
  31. package/dist/conversations/pages/ConversationListPage.d.ts.map +1 -1
  32. package/dist/conversations/pages/ConversationListPage.js +138 -125
  33. package/dist/conversations/pages/ConversationListPage.js.map +1 -1
  34. package/dist/conversations/pages/ConversationsLandingPage.d.ts.map +1 -1
  35. package/dist/conversations/pages/ConversationsLandingPage.js +3 -1
  36. package/dist/conversations/pages/ConversationsLandingPage.js.map +1 -1
  37. package/dist/conversations/pages/ConversationsSettingsPage.d.ts.map +1 -1
  38. package/dist/conversations/pages/ConversationsSettingsPage.js +5 -4
  39. package/dist/conversations/pages/ConversationsSettingsPage.js.map +1 -1
  40. package/dist/conversations/pages/NewConversationPage.d.ts.map +1 -1
  41. package/dist/conversations/pages/NewConversationPage.js +4 -0
  42. package/dist/conversations/pages/NewConversationPage.js.map +1 -1
  43. package/dist/conversations/providers/ConversationsProvider.d.ts.map +1 -1
  44. package/dist/conversations/providers/ConversationsProvider.js +10 -8
  45. package/dist/conversations/providers/ConversationsProvider.js.map +1 -1
  46. package/dist/index.js +5 -5
  47. package/package.json +1 -1
@@ -1,240 +1,263 @@
1
1
  import { useConversations as e } from "../providers/ConversationsProvider.js";
2
2
  import { cn as t } from "../utils/cn.js";
3
- import { useConversationActions as n, useGetConversation as r } from "../hooks/useConversationQueries.js";
4
- import { useMessageStreamForConversation as i } from "../hooks/useMessageSubscriptions.js";
5
- import { useConversationsStore as ee } from "../store/conversationsStore.js";
6
- import { PermissionGuard as a } from "../components/PermissionGuard.js";
7
- import { CONVERSATIONS_PERMISSIONS as o } from "../constants/permissions.js";
8
- import { nativeImpact as te, nativeNotify as s } from "../../utils/nativeBridge.js";
9
- import { MessageBubble as ne } from "../components/MessageBubble.js";
10
- import { useEditMessage as re, useGetMessages as ie, useMessageActions as ae, useSendMessage as oe } from "../hooks/useMessageQueries.js";
11
- import { useCallback as c, useEffect as l, useMemo as se, useRef as u, useState as d } from "react";
12
- import { Archive as ce, ArrowLeft as le, Bell as ue, BellOff as de, ExternalLink as fe, Hash as pe, Loader2 as me, MessageCircle as he, MoreVertical as ge, Pin as _e, PinOff as ve, SendHorizontal as ye, Users as be, X as xe } from "lucide-react";
13
- import { useNavigate as Se, useParams as Ce } from "react-router-dom";
14
- import { useEventBus as we } from "@burdenoff/fe-libs/shared/events";
15
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
16
- import { useI18n as Te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
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 a } from "../hooks/useConversationQueries.js";
6
+ import { useEditMessage as ee, useGetMessages as te, useMessageActions as ne, useSendMessage as re } from "../hooks/useMessageQueries.js";
7
+ import { useMessageStreamForConversation as ie } from "../hooks/useMessageSubscriptions.js";
8
+ import { PermissionGuard as o } from "../components/PermissionGuard.js";
9
+ import { CONVERSATIONS_PERMISSIONS as s } from "../constants/permissions.js";
10
+ import { nativeImpact as ae, nativeNotify as c } from "../../utils/nativeBridge.js";
11
+ import { useCallback as l, useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
12
+ import { Archive as oe, ArrowLeft as se, Bell as ce, BellOff as le, ExternalLink as ue, Hash as de, Loader2 as fe, MessageCircle as pe, MoreVertical as me, Pin as he, PinOff as ge, SendHorizontal as _e, Users as ve, X as ye } from "lucide-react";
13
+ import { useNavigate as be, useParams as xe } from "react-router-dom";
14
+ import { useEventBus as Se } from "@burdenoff/fe-libs/shared/events";
15
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
16
+ import { useI18n as Ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
17
17
  //#region src/conversations/pages/ConversationDetailPage.tsx
18
- function m() {
19
- let { conversationId: a } = Ce(), o = Se(), { basePath: m, currentUser: Ee } = e(), _ = we(), { t: De } = Te(), v = (e, t) => {
20
- let n = De(e);
18
+ var g = 100;
19
+ function _() {
20
+ let { conversationId: o } = xe(), s = be(), { basePath: _, currentUser: we } = e(), b = Se(), { t: Te } = Ce(), x = (e, t) => {
21
+ let n = Te(e);
21
22
  return n === e ? t : n;
22
- }, { clearMessageDraft: y, isParticipantsPanelOpen: b, messageDrafts: Oe, setMessageDraft: x, toggleParticipantsPanel: S } = ee(), [C, w] = d(Oe[a ?? ""] ?? ""), T = u(null), { conversation: E, loading: ke, error: D } = r(a ?? ""), { messages: O, loading: k, error: A } = ie(a ?? "", { first: 100 });
23
- i(a);
24
- let { sendMessage: j, loading: M } = oe(), { editMessage: N, loading: P } = re(), { deleteMessage: F, addReaction: I, removeReaction: L, pinMessage: R, unpinMessage: z } = ae(), { archiveConversation: B, pinConversation: V, unpinConversation: Ae, muteConversation: je, unmuteConversation: Me } = n(), [H, U] = d(!1), [W, G] = d(null), [K, q] = d(""), [J, Y] = d(null), X = u(null), Ne = Ee?.id ?? "", Z = E?.sourceContext;
25
- l(() => {
26
- T.current?.scrollIntoView({ behavior: "smooth" });
27
- }, [O.length]), l(() => {
28
- if (a) {
29
- if (C.trim()) {
30
- x(a, C);
23
+ }, { clearMessageDraft: S, isParticipantsPanelOpen: C, messageDrafts: Ee, setMessageDraft: w, toggleParticipantsPanel: T } = n(), [E, D] = p(Ee[o ?? ""] ?? ""), [O, k] = p([]), A = f(null), { conversation: j, loading: De, error: M } = a(o ?? ""), { messages: N, loading: P, error: F } = te(o ?? "", { first: g });
24
+ ie(o);
25
+ let { sendMessage: I, loading: L } = re(), { editMessage: R, loading: z } = ee(), { deleteMessage: B, addReaction: V, removeReaction: Oe, pinMessage: ke, unpinMessage: Ae } = ne(), { archiveConversation: je, pinConversation: Me, unpinConversation: Ne, muteConversation: Pe, unmuteConversation: Fe } = i(), [H, U] = p(!1), [W, G] = p(null), [K, q] = p(""), [J, Y] = p(null), X = f(null), Ie = we?.id ?? "", Z = j?.sourceContext, Q = d(() => {
26
+ let e = /* @__PURE__ */ new Map();
27
+ for (let t of O) t.conversationId === o && e.set(t.id, t);
28
+ for (let t of N) e.set(t.id, t);
29
+ return Array.from(e.values()).sort((e, t) => new Date(e.createdAt).getTime() - new Date(t.createdAt).getTime());
30
+ }, [
31
+ o,
32
+ O,
33
+ N
34
+ ]);
35
+ u(() => {
36
+ A.current?.scrollIntoView({ behavior: "smooth" });
37
+ }, [Q.length]), u(() => {
38
+ k([]);
39
+ }, [o]), u(() => {
40
+ if (O.length === 0 || N.length === 0) return;
41
+ let e = new Set(N.map((e) => e.id));
42
+ k((t) => {
43
+ let n = t.filter((t) => !e.has(t.id));
44
+ return n.length === t.length ? t : n;
45
+ });
46
+ }, [O.length, N]), u(() => {
47
+ if (o) {
48
+ if (E.trim()) {
49
+ w(o, E);
31
50
  return;
32
51
  }
33
- y(a);
52
+ S(o);
34
53
  }
35
54
  }, [
36
- C,
37
- a,
38
- x,
39
- y
55
+ E,
56
+ o,
57
+ w,
58
+ S
40
59
  ]);
41
- let Pe = se(() => {
60
+ let Le = d(() => {
42
61
  let e = /* @__PURE__ */ new Map();
43
- for (let t of O) !t.authorId || e.has(t.authorId) || e.set(t.authorId, {
62
+ for (let t of Q) !t.authorId || e.has(t.authorId) || e.set(t.authorId, {
44
63
  id: t.authorId,
45
64
  name: t.sender.name || t.authorId
46
65
  });
47
66
  return Array.from(e.values());
48
- }, [O]), Q = c(async () => {
49
- if (!a || !C.trim() || M) return;
50
- let e = await j({
51
- conversationId: a,
52
- content: C.trim(),
67
+ }, [Q]), $ = l(async () => {
68
+ if (!o || !E.trim() || L) return;
69
+ let e = await I({
70
+ conversationId: o,
71
+ content: E.trim(),
53
72
  type: "TEXT",
54
- parentMessageId: J?.id
73
+ parentMessageId: J?.id,
74
+ refetchFirst: g
55
75
  });
56
- e && (_.emit("conversations.message.sent", {
76
+ e && (k((t) => [...t, e]), b.emit("conversations.message.sent", {
57
77
  messageId: e.id,
58
- conversationId: a
59
- }), w(""), Y(null), y(a));
78
+ conversationId: o
79
+ }), D(""), Y(null), S(o));
60
80
  }, [
61
- _,
62
- a,
63
- C,
64
- M,
65
- j,
66
- y,
81
+ b,
82
+ o,
83
+ E,
84
+ L,
85
+ I,
86
+ S,
67
87
  J
68
- ]), Fe = c((e) => {
69
- e.key !== "Enter" || e.shiftKey || (e.preventDefault(), Q());
70
- }, [Q]);
71
- l(() => {
72
- a && _.emit("conversations.conversation.opened", { conversationId: a });
73
- }, [_, a]), l(() => {
88
+ ]), Re = l((e) => {
89
+ e.key !== "Enter" || e.shiftKey || (e.preventDefault(), $());
90
+ }, [$]);
91
+ u(() => {
92
+ o && b.emit("conversations.conversation.opened", { conversationId: o });
93
+ }, [b, o]), u(() => {
74
94
  if (!H) return;
75
95
  let e = (e) => {
76
96
  X.current && !X.current.contains(e.target) && U(!1);
77
97
  };
78
98
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
79
99
  }, [H]);
80
- let Ie = c((e) => {
100
+ let ze = l((e) => {
81
101
  Y({
82
102
  id: e.id,
83
103
  content: e.content,
84
104
  sender: e.sender.name
85
105
  });
86
- }, []), Le = c(async (e, t) => {
106
+ }, []), Be = l(async (e, t) => {
87
107
  try {
88
- await I(e, t);
108
+ await V(e, t);
89
109
  } catch {
90
- await L(e, t).catch(() => {});
110
+ await Oe(e, t).catch(() => {});
91
111
  }
92
- }, [I, L]), Re = c((e) => {
112
+ }, [V, Oe]), Ve = l((e) => {
93
113
  G(e.id), q(e.content);
94
- }, []), ze = c(async () => {
95
- !W || !K.trim() || P || (await N(W, K.trim()), G(null), q(""));
114
+ }, []), He = l(async () => {
115
+ !W || !K.trim() || z || (await R(W, K.trim()), G(null), q(""));
96
116
  }, [
97
117
  W,
98
118
  K,
99
- P,
100
- N
101
- ]), $ = c(() => {
119
+ z,
120
+ R
121
+ ]), Ue = l(() => {
102
122
  G(null), q("");
103
- }, []), Be = c(async (e) => {
104
- te("medium");
123
+ }, []), We = l(async (e) => {
124
+ ae("medium");
105
125
  try {
106
- await F(e), s("success");
126
+ await B(e), c("success");
107
127
  } catch (e) {
108
- throw s("error"), e;
128
+ throw c("error"), e;
109
129
  }
110
- }, [F]), Ve = c(async (e, t) => {
130
+ }, [B]), Ge = l(async (e, t) => {
111
131
  if (t) {
112
- await z(e);
132
+ await Ae(e);
113
133
  return;
114
134
  }
115
- await R(e);
116
- }, [R, z]), He = c(async () => {
117
- a && (E?.isPinned ? await Ae(a) : await V(a), U(!1));
135
+ await ke(e);
136
+ }, [ke, Ae]), Ke = l(async () => {
137
+ o && (j?.isPinned ? await Ne(o) : await Me(o), U(!1));
118
138
  }, [
119
- a,
120
- E?.isPinned,
121
- V,
122
- Ae
123
- ]), Ue = c(async () => {
124
- a && (E?.isMuted ? await Me(a) : await je(a), U(!1));
139
+ o,
140
+ j?.isPinned,
141
+ Me,
142
+ Ne
143
+ ]), qe = l(async () => {
144
+ o && (j?.isMuted ? await Fe(o) : await Pe(o), U(!1));
125
145
  }, [
126
- a,
127
- E?.isMuted,
128
- je,
129
- Me
130
- ]), We = c(async () => {
131
- a && (await B(a), _.emit("conversations.conversation.archived", { conversationId: a }), U(!1), o(m || "/conversations"));
146
+ o,
147
+ j?.isMuted,
148
+ Pe,
149
+ Fe
150
+ ]), Je = l(async () => {
151
+ o && (await je(o), b.emit("conversations.conversation.archived", { conversationId: o }), U(!1), s(_ || "/conversations"));
132
152
  }, [
133
- B,
134
- m,
153
+ je,
135
154
  _,
136
- a,
137
- o
138
- ]), Ge = c(() => {
155
+ b,
156
+ o,
157
+ s
158
+ ]), Ye = l(() => {
139
159
  if (Z?.contextHref) {
140
160
  try {
141
161
  let e = new URL(Z.contextHref);
142
162
  if (e.origin === window.location.origin) {
143
- o(`${e.pathname}${e.search}${e.hash}`);
163
+ s(`${e.pathname}${e.search}${e.hash}`);
144
164
  return;
145
165
  }
146
166
  } catch {}
147
167
  window.location.assign(Z.contextHref);
148
168
  }
149
- }, [o, Z?.contextHref]);
150
- return !E && ke ? /* @__PURE__ */ f("div", {
169
+ }, [s, Z?.contextHref]);
170
+ return !j && De ? /* @__PURE__ */ m("div", {
151
171
  className: "flex items-center justify-center h-[calc(100vh-64px)] text-sm text-muted-foreground",
152
- children: v("conversations.loading", "Loading conversation...")
153
- }) : !E || D ? /* @__PURE__ */ p("div", {
172
+ children: x("conversations.loading", "Loading conversation...")
173
+ }) : !j || M ? /* @__PURE__ */ h("div", {
154
174
  className: "flex flex-col items-center justify-center h-[calc(100vh-64px)] text-center gap-3 px-4",
155
175
  children: [
156
- /* @__PURE__ */ f(he, { className: "h-8 w-8 text-muted-foreground" }),
157
- /* @__PURE__ */ f("p", {
176
+ /* @__PURE__ */ m(pe, { className: "h-8 w-8 text-muted-foreground" }),
177
+ /* @__PURE__ */ m("p", {
158
178
  className: "text-sm text-muted-foreground",
159
- children: D ? v("conversations.unavailable", "We couldn't load this conversation. Please try again.") : v("conversations.notFound", "Conversation not found")
179
+ children: M ? x("conversations.unavailable", "We couldn't load this conversation. Please try again.") : x("conversations.notFound", "Conversation not found")
160
180
  }),
161
- /* @__PURE__ */ f("button", {
181
+ /* @__PURE__ */ m("button", {
162
182
  type: "button",
163
- onClick: () => o(m || "/conversations"),
183
+ onClick: () => s(_ || "/conversations"),
164
184
  className: "px-3 py-2 text-sm font-medium rounded-lg border border-border hover:bg-muted/50",
165
- children: v("conversations.back", "Back to conversations")
185
+ children: x("conversations.back", "Back to conversations")
166
186
  })
167
187
  ]
168
- }) : /* @__PURE__ */ p("div", {
169
- className: "flex h-[calc(100vh-64px)] bg-background",
170
- children: [/* @__PURE__ */ p("div", {
188
+ }) : /* @__PURE__ */ h("div", {
189
+ className: "relative flex h-[calc(100vh-64px)] bg-background",
190
+ children: [/* @__PURE__ */ h("div", {
171
191
  className: "flex-1 flex flex-col min-w-0",
172
192
  children: [
173
- /* @__PURE__ */ p("header", {
193
+ /* @__PURE__ */ h("header", {
194
+ "data-tour": "conversation-detail-header",
174
195
  className: "flex items-center justify-between px-4 py-3 border-b border-border bg-background/95 backdrop-blur-sm",
175
- children: [/* @__PURE__ */ p("div", {
196
+ children: [/* @__PURE__ */ h("div", {
176
197
  className: "flex items-center gap-3 min-w-0",
177
- children: [/* @__PURE__ */ f("button", {
198
+ children: [/* @__PURE__ */ m("button", {
178
199
  type: "button",
179
- onClick: () => o(m || "/conversations"),
180
- className: "p-1.5 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",
181
- children: /* @__PURE__ */ f(le, { size: 18 })
182
- }), /* @__PURE__ */ p("div", {
200
+ onClick: () => s(_ || "/conversations"),
201
+ className: "flex min-h-10 min-w-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground",
202
+ children: /* @__PURE__ */ m(se, { size: 18 })
203
+ }), /* @__PURE__ */ h("div", {
183
204
  className: "min-w-0",
184
- children: [/* @__PURE__ */ p("div", {
205
+ children: [/* @__PURE__ */ h("div", {
185
206
  className: "flex items-center gap-1.5",
186
- children: [E.type === "CHANNEL" && /* @__PURE__ */ f(pe, {
207
+ children: [j.type === "CHANNEL" && /* @__PURE__ */ m(de, {
187
208
  size: 14,
188
209
  className: "text-muted-foreground flex-shrink-0"
189
- }), /* @__PURE__ */ f("h2", {
210
+ }), /* @__PURE__ */ m("h2", {
190
211
  className: "text-sm font-semibold text-foreground truncate",
191
- children: E.title
212
+ children: j.title
192
213
  })]
193
- }), /* @__PURE__ */ f("p", {
214
+ }), /* @__PURE__ */ m("p", {
194
215
  className: "text-xs text-muted-foreground",
195
- children: E.type === "DIRECT" ? v("conversations.directConversation", "Direct conversation") : E.type === "CHANNEL" ? `${v("conversations.channel", "Channel")} · ${E.memberCount} ${v("conversations.membersCountLabel", "members")}` : E.type === "ANNOUNCEMENT" ? `${v("conversations.announcement", "Announcement")} · ${E.memberCount} ${v("conversations.membersCountLabel", "members")}` : `${E.memberCount} ${v("conversations.membersCountLabel", "members")}`
216
+ children: j.type === "DIRECT" ? x("conversations.directConversation", "Direct conversation") : j.type === "CHANNEL" ? `${x("conversations.channel", "Channel")} · ${j.memberCount} ${x("conversations.membersCountLabel", "members")}` : j.type === "ANNOUNCEMENT" ? `${x("conversations.announcement", "Announcement")} · ${j.memberCount} ${x("conversations.membersCountLabel", "members")}` : `${j.memberCount} ${x("conversations.membersCountLabel", "members")}`
196
217
  })]
197
218
  })]
198
- }), /* @__PURE__ */ p("div", {
199
- className: "flex items-center gap-1",
219
+ }), /* @__PURE__ */ h("div", {
220
+ className: "flex shrink-0 items-center gap-1",
200
221
  children: [
201
- Z?.contextHref && /* @__PURE__ */ f(g, {
202
- icon: /* @__PURE__ */ f(fe, { size: 16 }),
203
- label: v("conversations.openContext", "Open context"),
204
- onClick: Ge
222
+ Z?.contextHref && /* @__PURE__ */ m(y, {
223
+ dataTour: "conversation-open-context",
224
+ icon: /* @__PURE__ */ m(ue, { size: 16 }),
225
+ label: x("conversations.openContext", "Open context"),
226
+ onClick: Ye
205
227
  }),
206
- E.isGroup && /* @__PURE__ */ f(g, {
207
- icon: /* @__PURE__ */ f(be, { size: 16 }),
208
- label: v("conversations.participants", "Participants"),
209
- active: b,
210
- onClick: S
228
+ j.isGroup && /* @__PURE__ */ m(y, {
229
+ dataTour: "conversation-participants-button",
230
+ icon: /* @__PURE__ */ m(ve, { size: 16 }),
231
+ label: x("conversations.participants", "Participants"),
232
+ active: C,
233
+ onClick: T
211
234
  }),
212
- /* @__PURE__ */ p("div", {
235
+ /* @__PURE__ */ h("div", {
213
236
  className: "relative",
214
237
  ref: X,
215
- children: [/* @__PURE__ */ f(g, {
216
- icon: /* @__PURE__ */ f(ge, { size: 16 }),
217
- label: v("conversations.moreOptions", "More options"),
238
+ children: [/* @__PURE__ */ m(y, {
239
+ icon: /* @__PURE__ */ m(me, { size: 16 }),
240
+ label: x("conversations.moreOptions", "More options"),
218
241
  active: H,
219
242
  onClick: () => U((e) => !e)
220
- }), H && /* @__PURE__ */ p("div", {
243
+ }), H && /* @__PURE__ */ h("div", {
221
244
  className: "absolute right-0 top-full mt-1 w-48 bg-popover border border-border rounded-lg shadow-lg z-50 py-1 animate-in fade-in-0 zoom-in-95 duration-100",
222
245
  children: [
223
- /* @__PURE__ */ f(h, {
224
- icon: E.isPinned ? /* @__PURE__ */ f(ve, { size: 14 }) : /* @__PURE__ */ f(_e, { size: 14 }),
225
- label: E.isPinned ? v("conversations.unpinConversation", "Unpin conversation") : v("conversations.pinConversation", "Pin conversation"),
226
- onClick: () => void He()
246
+ /* @__PURE__ */ m(v, {
247
+ icon: j.isPinned ? /* @__PURE__ */ m(ge, { size: 14 }) : /* @__PURE__ */ m(he, { size: 14 }),
248
+ label: j.isPinned ? x("conversations.unpinConversation", "Unpin conversation") : x("conversations.pinConversation", "Pin conversation"),
249
+ onClick: () => void Ke()
227
250
  }),
228
- /* @__PURE__ */ f(h, {
229
- icon: E.isMuted ? /* @__PURE__ */ f(ue, { size: 14 }) : /* @__PURE__ */ f(de, { size: 14 }),
230
- label: E.isMuted ? v("conversations.unmuteConversation", "Unmute conversation") : v("conversations.muteConversation", "Mute conversation"),
231
- onClick: () => void Ue()
251
+ /* @__PURE__ */ m(v, {
252
+ icon: j.isMuted ? /* @__PURE__ */ m(ce, { size: 14 }) : /* @__PURE__ */ m(le, { size: 14 }),
253
+ label: j.isMuted ? x("conversations.unmuteConversation", "Unmute conversation") : x("conversations.muteConversation", "Mute conversation"),
254
+ onClick: () => void qe()
232
255
  }),
233
- /* @__PURE__ */ f("div", { className: "h-px bg-border my-1" }),
234
- /* @__PURE__ */ f(h, {
235
- icon: /* @__PURE__ */ f(ce, { size: 14 }),
236
- label: v("conversations.archiveConversation", "Archive conversation"),
237
- onClick: () => void We(),
256
+ /* @__PURE__ */ m("div", { className: "h-px bg-border my-1" }),
257
+ /* @__PURE__ */ m(v, {
258
+ icon: /* @__PURE__ */ m(oe, { size: 14 }),
259
+ label: x("conversations.archiveConversation", "Archive conversation"),
260
+ onClick: () => void Je(),
238
261
  destructive: !0
239
262
  })
240
263
  ]
@@ -243,106 +266,108 @@ function m() {
243
266
  ]
244
267
  })]
245
268
  }),
246
- /* @__PURE__ */ p("div", {
269
+ /* @__PURE__ */ h("div", {
247
270
  className: "flex-1 overflow-y-auto py-4 space-y-0.5",
248
271
  children: [
249
- Z?.pagePath && /* @__PURE__ */ p("div", {
272
+ Z?.pagePath && /* @__PURE__ */ h("div", {
250
273
  className: "mx-4 mb-4 rounded-lg border border-border bg-muted/20 px-3 py-2 text-xs text-muted-foreground",
251
- children: [/* @__PURE__ */ f("span", {
274
+ children: [/* @__PURE__ */ m("span", {
252
275
  className: "font-medium text-foreground",
253
276
  children: Z.contextTitle || Z.pagePath
254
277
  }), Z.entityType && Z.entityId ? ` · ${Z.entityType} ${Z.entityId}` : ""]
255
278
  }),
256
- A && /* @__PURE__ */ f("div", {
279
+ F && /* @__PURE__ */ m("div", {
257
280
  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",
258
- children: v("conversations.messagesUnavailable", "Messages couldn't be loaded right now. The conversation header and actions are still available.")
281
+ children: x("conversations.messagesUnavailable", "Messages couldn't be loaded right now. The conversation header and actions are still available.")
259
282
  }),
260
- k && /* @__PURE__ */ p("div", {
283
+ P && /* @__PURE__ */ h("div", {
261
284
  className: "mx-4 mb-4 flex items-center gap-2 rounded-lg border border-border bg-muted/20 px-3 py-2 text-sm text-muted-foreground",
262
- children: [/* @__PURE__ */ f(me, {
285
+ children: [/* @__PURE__ */ m(fe, {
263
286
  size: 14,
264
287
  className: "animate-spin"
265
- }), v("conversations.loadingMessages", "Loading messages...")]
288
+ }), x("conversations.loadingMessages", "Loading messages...")]
266
289
  }),
267
- !k && !A && O.length === 0 && /* @__PURE__ */ f("div", {
290
+ !P && !F && Q.length === 0 && /* @__PURE__ */ m("div", {
268
291
  className: "mx-4 mb-4 rounded-lg border border-dashed border-border bg-muted/20 px-3 py-6 text-center text-sm text-muted-foreground",
269
- children: v("conversations.noMessagesYet", "No messages yet. Start the conversation below.")
292
+ children: x("conversations.noMessagesYet", "No messages yet. Start the conversation below.")
270
293
  }),
271
- O.map((e, t) => {
272
- let n = O[t - 1], r = !n || n.authorId !== e.authorId || n.type === "SYSTEM";
273
- return /* @__PURE__ */ f("div", { children: W === e.id ? /* @__PURE__ */ p("div", {
294
+ Q.map((e, t) => {
295
+ let n = Q[t - 1], i = !n || n.authorId !== e.authorId || n.type === "SYSTEM";
296
+ return /* @__PURE__ */ m("div", { children: W === e.id ? /* @__PURE__ */ h("div", {
274
297
  className: "px-4 py-2",
275
- children: [/* @__PURE__ */ p("div", {
298
+ children: [/* @__PURE__ */ h("div", {
276
299
  className: "flex items-center gap-2 text-xs text-muted-foreground mb-1",
277
- children: [/* @__PURE__ */ f("span", { children: v("conversations.editingMessage", "Editing message") }), /* @__PURE__ */ f("button", {
300
+ children: [/* @__PURE__ */ m("span", { children: x("conversations.editingMessage", "Editing message") }), /* @__PURE__ */ m("button", {
278
301
  type: "button",
279
- onClick: $,
302
+ onClick: Ue,
280
303
  className: "hover:text-foreground",
281
- children: /* @__PURE__ */ f(xe, { size: 12 })
304
+ children: /* @__PURE__ */ m(ye, { size: 12 })
282
305
  })]
283
- }), /* @__PURE__ */ p("div", {
306
+ }), /* @__PURE__ */ h("div", {
284
307
  className: "flex items-end gap-2",
285
- children: [/* @__PURE__ */ f("textarea", {
308
+ children: [/* @__PURE__ */ m("textarea", {
286
309
  value: K,
287
310
  onChange: (e) => q(e.target.value),
288
311
  onKeyDown: (e) => {
289
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), ze()), e.key === "Escape" && $();
312
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), He()), e.key === "Escape" && Ue();
290
313
  },
291
314
  className: "flex-1 px-3 py-2 text-sm rounded-lg border border-border bg-muted/30 resize-none focus:outline-none focus:ring-2 focus:ring-ring",
292
315
  rows: 2
293
- }), /* @__PURE__ */ f("button", {
316
+ }), /* @__PURE__ */ m("button", {
294
317
  type: "button",
295
- onClick: () => void ze(),
296
- disabled: !K.trim() || P,
318
+ onClick: () => void He(),
319
+ disabled: !K.trim() || z,
297
320
  className: "px-3 py-2 text-xs font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50",
298
- children: v("conversations.save", "Save")
321
+ children: x("conversations.save", "Save")
299
322
  })]
300
323
  })]
301
- }) : /* @__PURE__ */ f(ne, {
324
+ }) : /* @__PURE__ */ m(r, {
302
325
  message: e,
303
- isOwnMessage: e.authorId === Ne,
304
- showAvatar: r,
305
- showSender: r,
306
- onReply: Ie,
307
- onReact: (e, t) => void Le(e, t),
308
- onEdit: Re,
309
- onDelete: (e) => void Be(e),
310
- onTogglePin: (e, t) => void Ve(e, t)
326
+ isOwnMessage: e.authorId === Ie,
327
+ showAvatar: i,
328
+ showSender: i,
329
+ onReply: ze,
330
+ onReact: (e, t) => void Be(e, t),
331
+ onEdit: Ve,
332
+ onDelete: (e) => void We(e),
333
+ onTogglePin: (e, t) => void Ge(e, t)
311
334
  }) }, e.id);
312
335
  }),
313
- /* @__PURE__ */ f("div", { ref: T })
336
+ /* @__PURE__ */ m("div", { ref: A })
314
337
  ]
315
338
  }),
316
- /* @__PURE__ */ p("div", {
339
+ /* @__PURE__ */ h("div", {
340
+ "data-tour": "conversation-message-composer",
317
341
  className: "border-t border-border px-4 py-3 bg-background",
318
- children: [J && /* @__PURE__ */ p("div", {
342
+ children: [J && /* @__PURE__ */ h("div", {
319
343
  className: "flex items-center gap-2 mb-2 px-3 py-1.5 rounded-lg bg-muted/50 text-xs text-muted-foreground",
320
- children: [/* @__PURE__ */ p("span", { children: [
321
- v("conversations.replyingTo", "Replying to"),
344
+ children: [/* @__PURE__ */ h("span", { children: [
345
+ x("conversations.replyingTo", "Replying to"),
322
346
  " ",
323
- /* @__PURE__ */ f("strong", {
347
+ /* @__PURE__ */ m("strong", {
324
348
  className: "text-foreground",
325
349
  children: J.sender
326
350
  }),
327
351
  ": ",
328
352
  J.content.slice(0, 80),
329
353
  J.content.length > 80 ? "…" : ""
330
- ] }), /* @__PURE__ */ f("button", {
354
+ ] }), /* @__PURE__ */ m("button", {
331
355
  type: "button",
332
356
  onClick: () => Y(null),
333
- className: "ml-auto hover:text-foreground",
334
- children: /* @__PURE__ */ f(xe, { size: 12 })
357
+ "aria-label": x("conversations.cancelReply", "Cancel reply"),
358
+ className: "ml-auto flex min-h-9 min-w-9 items-center justify-center rounded-md hover:bg-muted/70 hover:text-foreground",
359
+ children: /* @__PURE__ */ m(ye, { size: 12 })
335
360
  })]
336
- }), /* @__PURE__ */ p("div", {
361
+ }), /* @__PURE__ */ h("div", {
337
362
  className: "flex items-end gap-2",
338
- children: [/* @__PURE__ */ f("div", {
363
+ children: [/* @__PURE__ */ m("div", {
339
364
  className: "flex-1 relative",
340
- children: /* @__PURE__ */ f("textarea", {
341
- "aria-label": v("conversations.messageComposer", "Message composer"),
342
- value: C,
343
- onChange: (e) => w(e.target.value),
344
- onKeyDown: Fe,
345
- placeholder: `${v("conversations.messageConversationPrefix", "Message")} ${E.title}...`,
365
+ children: /* @__PURE__ */ m("textarea", {
366
+ "aria-label": x("conversations.messageComposer", "Message composer"),
367
+ value: E,
368
+ onChange: (e) => D(e.target.value),
369
+ onKeyDown: Re,
370
+ placeholder: `${x("conversations.messageConversationPrefix", "Message")} ${j.title}...`,
346
371
  rows: 1,
347
372
  className: t("w-full px-4 py-2.5 text-sm rounded-xl border border-border bg-muted/30", "resize-none overflow-hidden placeholder:text-muted-foreground", "focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent max-h-32"),
348
373
  style: {
@@ -354,55 +379,55 @@ function m() {
354
379
  t.style.height = "auto", t.style.height = `${Math.min(t.scrollHeight, 128)}px`;
355
380
  }
356
381
  })
357
- }), /* @__PURE__ */ f("button", {
382
+ }), /* @__PURE__ */ m("button", {
358
383
  type: "button",
359
- "aria-label": v("conversations.sendMessage", "Send message"),
360
- onClick: () => void Q(),
361
- disabled: !C.trim() || M,
362
- className: t("p-2.5 rounded-xl transition-all duration-150", C.trim() && !M ? "bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm" : "bg-muted text-muted-foreground cursor-not-allowed"),
363
- children: M ? /* @__PURE__ */ f(me, {
384
+ "aria-label": x("conversations.sendMessage", "Send message"),
385
+ onClick: () => void $(),
386
+ disabled: !E.trim() || L,
387
+ className: t("p-2.5 rounded-xl transition-all duration-150", E.trim() && !L ? "bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm" : "bg-muted text-muted-foreground cursor-not-allowed"),
388
+ children: L ? /* @__PURE__ */ m(fe, {
364
389
  size: 18,
365
390
  className: "animate-spin"
366
- }) : /* @__PURE__ */ f(ye, { size: 18 })
391
+ }) : /* @__PURE__ */ m(_e, { size: 18 })
367
392
  })]
368
393
  })]
369
394
  })
370
395
  ]
371
- }), b && E.isGroup && /* @__PURE__ */ f("aside", {
372
- className: "w-64 border-l border-border bg-background overflow-y-auto animate-in slide-in-from-right-4 duration-200",
373
- children: /* @__PURE__ */ p("div", {
396
+ }), C && j.isGroup && /* @__PURE__ */ m("aside", {
397
+ className: "absolute inset-y-0 right-0 z-20 w-full max-w-72 border-l border-border bg-background shadow-lg animate-in slide-in-from-right-4 duration-200 md:relative md:z-auto md:w-64 md:shadow-none",
398
+ children: /* @__PURE__ */ h("div", {
374
399
  className: "p-4",
375
- children: [/* @__PURE__ */ p("div", {
400
+ children: [/* @__PURE__ */ h("div", {
376
401
  className: "flex items-center justify-between mb-4",
377
- children: [/* @__PURE__ */ p("h3", {
402
+ children: [/* @__PURE__ */ h("h3", {
378
403
  className: "text-sm font-semibold text-foreground",
379
404
  children: [
380
- v("conversations.members", "Members"),
405
+ x("conversations.members", "Members"),
381
406
  " (",
382
- Pe.length || E.memberCount,
407
+ Le.length || j.memberCount,
383
408
  ")"
384
409
  ]
385
- }), /* @__PURE__ */ f("button", {
410
+ }), /* @__PURE__ */ m("button", {
386
411
  type: "button",
387
- onClick: S,
412
+ onClick: T,
388
413
  className: "p-1 rounded text-muted-foreground hover:text-foreground",
389
- children: /* @__PURE__ */ f(_e, { size: 14 })
414
+ children: /* @__PURE__ */ m(he, { size: 14 })
390
415
  })]
391
- }), /* @__PURE__ */ f("div", {
416
+ }), /* @__PURE__ */ m("div", {
392
417
  className: "space-y-1",
393
- children: Pe.map((e) => /* @__PURE__ */ p("div", {
418
+ children: Le.map((e) => /* @__PURE__ */ h("div", {
394
419
  className: "flex items-center gap-2.5 px-2 py-1.5 rounded-lg hover:bg-muted/50",
395
- children: [/* @__PURE__ */ f("div", {
420
+ children: [/* @__PURE__ */ m("div", {
396
421
  className: "w-7 h-7 rounded-full bg-muted flex items-center justify-center text-xs font-medium text-muted-foreground",
397
422
  children: e.name.split(" ").map((e) => e[0]).join("").slice(0, 2)
398
- }), /* @__PURE__ */ p("div", {
423
+ }), /* @__PURE__ */ h("div", {
399
424
  className: "min-w-0",
400
- children: [/* @__PURE__ */ f("p", {
425
+ children: [/* @__PURE__ */ m("p", {
401
426
  className: "text-xs font-medium text-foreground truncate",
402
427
  children: e.name
403
- }), /* @__PURE__ */ f("p", {
428
+ }), /* @__PURE__ */ m("p", {
404
429
  className: "text-[10px] text-muted-foreground",
405
- children: v("conversations.member", "Member")
430
+ children: x("conversations.member", "Member")
406
431
  })]
407
432
  })]
408
433
  }, e.id))
@@ -411,29 +436,30 @@ function m() {
411
436
  })]
412
437
  });
413
438
  }
414
- function h({ icon: e, label: n, onClick: r, destructive: i }) {
415
- return /* @__PURE__ */ p("button", {
439
+ function v({ icon: e, label: n, onClick: r, destructive: i }) {
440
+ return /* @__PURE__ */ h("button", {
416
441
  type: "button",
417
442
  onClick: r,
418
443
  className: t("flex items-center gap-2.5 w-full px-3 py-2 text-sm transition-colors text-left", i ? "text-destructive hover:bg-destructive/10" : "text-foreground hover:bg-muted/50"),
419
- children: [e, /* @__PURE__ */ f("span", { children: n })]
444
+ children: [e, /* @__PURE__ */ m("span", { children: n })]
420
445
  });
421
446
  }
422
- function g({ icon: e, label: n, active: r, onClick: i }) {
423
- return /* @__PURE__ */ f(a, {
424
- permission: o.CONVERSATION_READ,
447
+ function y({ icon: e, label: n, active: r, dataTour: i, onClick: a }) {
448
+ return /* @__PURE__ */ m(o, {
449
+ permission: s.CONVERSATION_READ,
425
450
  allowUnavailablePermissions: !0,
426
- children: /* @__PURE__ */ f("button", {
451
+ children: /* @__PURE__ */ m("button", {
452
+ "data-tour": i,
427
453
  type: "button",
428
- onClick: i,
454
+ onClick: a,
429
455
  "aria-label": n,
430
456
  title: n,
431
- className: t("p-2 rounded-lg transition-colors", r ? "bg-primary/10 text-primary" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"),
457
+ className: t("flex min-h-10 min-w-10 items-center justify-center rounded-lg transition-colors", r ? "bg-primary/10 text-primary" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"),
432
458
  children: e
433
459
  })
434
460
  });
435
461
  }
436
462
  //#endregion
437
- export { m as ConversationDetailPage };
463
+ export { _ as ConversationDetailPage };
438
464
 
439
465
  //# sourceMappingURL=ConversationDetailPage.js.map