@nivaro/react 0.3.41 → 0.3.42

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 (96) hide show
  1. package/dist/components/LayoutForm.js +100 -98
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +644 -15
  5. package/dist/index.js +814 -775
  6. package/dist/shared/components/ActivityEntry.js +154 -0
  7. package/dist/shared/components/AudienceConfirmPanel.js +98 -0
  8. package/dist/shared/components/BackgroundRunOffer.js +43 -31
  9. package/dist/shared/components/BroadcastView.js +225 -204
  10. package/dist/shared/components/CollectionBrowserView.js +3924 -3584
  11. package/dist/shared/components/ConfigHistory.js +153 -0
  12. package/dist/shared/components/ConfigReadBack.js +65 -0
  13. package/dist/shared/components/DataTable.js +379 -346
  14. package/dist/shared/components/ForceReloadBanner.js +47 -40
  15. package/dist/shared/components/IdleReloadWatcher.js +69 -0
  16. package/dist/shared/components/ItemEditForm.js +4041 -3853
  17. package/dist/shared/components/MyWorkView.js +278 -213
  18. package/dist/shared/components/NotificationBell.js +130 -121
  19. package/dist/shared/components/ProfileView.js +776 -1003
  20. package/dist/shared/components/RecentRecordsRail.js +34 -16
  21. package/dist/shared/components/RecordReadView.js +500 -477
  22. package/dist/shared/components/Skeletons.js +199 -0
  23. package/dist/shared/components/SlowNotice.js +63 -0
  24. package/dist/shared/components/Term.js +23 -0
  25. package/dist/shared/components/WidgetSlot.js +350 -353
  26. package/dist/shared/components/access/PermissionSummary.js +106 -0
  27. package/dist/shared/components/bulk/BulkActionButtons.js +76 -73
  28. package/dist/shared/components/chat/ChatPanel.js +902 -886
  29. package/dist/shared/components/chat/MemberPaging.js +70 -0
  30. package/dist/shared/components/chat/RoomParts.js +147 -117
  31. package/dist/shared/components/chat/ScreenClip.js +73 -69
  32. package/dist/shared/components/chat/chat-core.js +449 -396
  33. package/dist/shared/components/chat/huddle/huddle-store.js +48 -43
  34. package/dist/shared/components/help-videos/api.js +2 -5
  35. package/dist/shared/components/help-videos/viewer/HelpVideoMatchChip.js +79 -0
  36. package/dist/shared/components/help-videos/viewer/matchChip.js +50 -0
  37. package/dist/shared/components/imports/CollectionImportPanel.js +139 -133
  38. package/dist/shared/components/imports/RunDetailSheet.js +222 -227
  39. package/dist/shared/components/integrations/console/ErrorExplanation.js +121 -0
  40. package/dist/shared/components/integrations/console/PartnerDetail.js +175 -174
  41. package/dist/shared/components/integrations/console/SubmissionRow.js +36 -34
  42. package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +50 -48
  43. package/dist/shared/components/item-edit/FieldComments.js +212 -0
  44. package/dist/shared/components/item-edit/FieldRow.js +340 -336
  45. package/dist/shared/components/item-edit/RecordHeaderActions.js +23 -22
  46. package/dist/shared/components/item-edit/RelationCombobox.js +231 -222
  47. package/dist/shared/components/item-edit/RuleHiddenNotes.js +55 -0
  48. package/dist/shared/components/item-edit/field-comments-context.js +6 -0
  49. package/dist/shared/components/item-edit/field-sources.js +33 -0
  50. package/dist/shared/components/item-edit/rule-hidden.js +30 -0
  51. package/dist/shared/components/layout-editor/HistoryPanel.js +113 -96
  52. package/dist/shared/components/layout-editor/editors/cascade-filters.js +170 -145
  53. package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +22 -18
  54. package/dist/shared/components/layout-editor/inspector/GroupInspector.js +177 -159
  55. package/dist/shared/components/layout-editor/inspector/PickerTab.js +35 -34
  56. package/dist/shared/components/layout-editor/inspector/RulesTab.js +124 -111
  57. package/dist/shared/components/layout-editor/inspector/kit.js +292 -277
  58. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  59. package/dist/shared/components/list/CopyListLinkButton.js +41 -0
  60. package/dist/shared/components/list/InlineEdit.js +363 -0
  61. package/dist/shared/components/notifications/NotificationCenterView.js +213 -181
  62. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -82
  63. package/dist/shared/components/notifications/NotificationRulesEditor.js +515 -0
  64. package/dist/shared/components/notifications/TestMyRules.js +137 -0
  65. package/dist/shared/components/notifications/changes-lines.js +24 -0
  66. package/dist/shared/components/notifications/why-lines.js +64 -0
  67. package/dist/shared/components/panels/CommentPanel.js +316 -281
  68. package/dist/shared/components/panels/LegalHoldBanner.js +38 -0
  69. package/dist/shared/components/panels/PipelinePanel.js +201 -196
  70. package/dist/shared/components/panels/RevisionsPanel.js +496 -479
  71. package/dist/shared/components/pipeline/PipelineEditorView.js +1587 -1560
  72. package/dist/shared/components/pipeline/PipelineStateOwners.js +116 -103
  73. package/dist/shared/components/profile/PersonDidPanel.js +188 -0
  74. package/dist/shared/components/profile/PersonProfile.js +57 -52
  75. package/dist/shared/components/queue/QueueWorklist.js +1526 -1365
  76. package/dist/shared/hooks/useSlowReason.js +39 -0
  77. package/dist/shared/lib/activity-sentence.js +670 -0
  78. package/dist/shared/lib/config-sentences.js +418 -0
  79. package/dist/shared/lib/core-glossary.js +229 -0
  80. package/dist/shared/lib/error-hints.js +159 -0
  81. package/dist/shared/lib/error-message.js +105 -0
  82. package/dist/shared/lib/error-toast.js +22 -0
  83. package/dist/shared/lib/field-comments.js +25 -0
  84. package/dist/shared/lib/filter-sentence.js +261 -0
  85. package/dist/shared/lib/glossary.js +55 -48
  86. package/dist/shared/lib/idle-reload.js +138 -0
  87. package/dist/shared/lib/layout-resolve.js +42 -29
  88. package/dist/shared/lib/list-inline-edit.js +190 -0
  89. package/dist/shared/lib/list-link.js +147 -0
  90. package/dist/shared/lib/prefetch.js +259 -106
  91. package/dist/shared/lib/record-ref.js +72 -0
  92. package/dist/shared/lib/reload-holds.js +25 -0
  93. package/dist/shared/lib/safe-error.js +52 -24
  94. package/dist/shared/lib/skeleton-shapes.js +72 -0
  95. package/dist/shared/lib/slow-reason.js +63 -0
  96. package/package.json +1 -1
@@ -1,31 +1,32 @@
1
- import { jsxs as s, jsx as e, Fragment as ne } from "react/jsx-runtime";
2
- import { useQueryClient as fe, useQuery as U, useMutation as O } from "@tanstack/react-query";
3
- import { MessageSquare as Se, ChevronDown as $e, ClipboardPlus as Ee, Pencil as qe, Trash2 as De, Check as Pe, X as Re, SmilePlus as ge } from "lucide-react";
4
- import { useState as v, useRef as Z, useEffect as V, useMemo as G } from "react";
5
- import { createPortal as Te } from "react-dom";
6
- import { toast as R } from "sonner";
7
- import { useNivaroClient as oe, useItemEditAuth as Fe, useDrilldown as Me } from "../../context.js";
8
- import { useDebounced as Ie } from "../../hooks/useDebounced.js";
9
- import { get as W, post as Q, patch as je, del as Oe } from "../../lib/commands.js";
10
- import { usePresenceOnlinePoll as Le } from "../../lib/presence-live.js";
11
- import { useRecordSignalPeers as Ae, useRecordSignalSender as Ke, signalSentence as Be } from "../../lib/presence-signals.js";
12
- import { invalidateRecordTasks as Qe } from "../../lib/record-tasks.js";
13
- import { formatRelative as le } from "../../lib/utils.js";
14
- import { AgentBadge as ze } from "../AgentBadge.js";
1
+ import { jsxs as s, jsx as e, Fragment as V } from "react/jsx-runtime";
2
+ import { useQueryClient as fe, useQuery as U, useMutation as L } from "@tanstack/react-query";
3
+ import { MessageSquare as $e, ChevronDown as Ee, ClipboardPlus as qe, Pencil as De, Trash2 as Pe, Check as Te, X as Fe, SmilePlus as ge } from "lucide-react";
4
+ import { useState as N, useRef as Y, useEffect as Z, useMemo as X } from "react";
5
+ import { createPortal as Re } from "react-dom";
6
+ import { toast as F } from "sonner";
7
+ import { useNivaroClient as oe, useItemEditAuth as Me, useDrilldown as Ie } from "../../context.js";
8
+ import { useDebounced as je } from "../../hooks/useDebounced.js";
9
+ import { get as W, post as B, patch as Oe, del as Le } from "../../lib/commands.js";
10
+ import { usePresenceOnlinePoll as Ae } from "../../lib/presence-live.js";
11
+ import { useRecordSignalPeers as Ke, useRecordSignalSender as Be, signalSentence as Qe } from "../../lib/presence-signals.js";
12
+ import { invalidateRecordTasks as ze } from "../../lib/record-tasks.js";
13
+ import { formatRelative as le, titleCase as Ue } from "../../lib/utils.js";
14
+ import { AgentBadge as We } from "../AgentBadge.js";
15
15
  import { AutolinkedText as se } from "../AutolinkedText.js";
16
- import { InboundRequestPopover as Ue } from "../integrations/InboundRequest.js";
17
- import { UserAvatar as We } from "../UserAvatar.js";
18
- import { Avatar as He, AvatarFallback as Xe } from "../ui/avatar.js";
16
+ import { InboundRequestPopover as Ge } from "../integrations/InboundRequest.js";
17
+ import { useFieldComments as He } from "../item-edit/field-comments-context.js";
18
+ import { UserAvatar as Xe } from "../UserAvatar.js";
19
+ import { Avatar as Je, AvatarFallback as Ve } from "../ui/avatar.js";
19
20
  import { Button as J } from "../ui/button.js";
20
21
  import { Separator as xe } from "../ui/separator.js";
21
- import { Textarea as Ge } from "../ui/textarea.js";
22
- import { RecordEventPathSheet as Je } from "./IntegrationActivitySection.js";
22
+ import { Textarea as Ze } from "../ui/textarea.js";
23
+ import { RecordEventPathSheet as Ye } from "./IntegrationActivitySection.js";
23
24
  const ye = ["👍", "✅", "👀", "🎉", "❤️", "😂"];
24
- function Ve(t) {
25
- var d, c, b, m;
26
- return [(d = t.first_name) == null ? void 0 : d[0], (c = t.last_name) == null ? void 0 : c[0]].filter(Boolean).join("").toUpperCase() || ((m = (b = t.email) == null ? void 0 : b[0]) == null ? void 0 : m.toUpperCase()) || "?";
25
+ function et(t) {
26
+ var d, c, h, m;
27
+ return [(d = t.first_name) == null ? void 0 : d[0], (c = t.last_name) == null ? void 0 : c[0]].filter(Boolean).join("").toUpperCase() || ((m = (h = t.email) == null ? void 0 : h[0]) == null ? void 0 : m.toUpperCase()) || "?";
27
28
  }
28
- function Ze({ comment: t }) {
29
+ function tt({ comment: t }) {
29
30
  const i = (t.mentions ?? []).filter(
30
31
  (d) => {
31
32
  var c;
@@ -57,115 +58,139 @@ function Ze({ comment: t }) {
57
58
  }
58
59
  );
59
60
  }
60
- function re(t) {
61
+ function ae(t) {
61
62
  return [t.first_name, t.last_name].filter(Boolean).join(" ") || t.email;
62
63
  }
63
- function Ye(t, i) {
64
+ function nt({
65
+ field: t,
66
+ label: i,
67
+ resolved: d,
68
+ onJump: c
69
+ }) {
70
+ const h = /* @__PURE__ */ s(V, { children: [
71
+ "on ",
72
+ /* @__PURE__ */ e("span", { className: "font-medium", children: i }),
73
+ d && /* @__PURE__ */ e("span", { className: "text-slate-400 dark:text-slate-500", children: " · resolved" })
74
+ ] }), m = "inline-flex min-w-0 max-w-[220px] items-center gap-1 truncate rounded-full border border-slate-200 bg-slate-50 px-1.5 py-px text-[10.5px] text-slate-600 dark:border-border dark:bg-muted dark:text-slate-300";
75
+ return c ? /* @__PURE__ */ e(
76
+ "button",
77
+ {
78
+ type: "button",
79
+ "data-comment-field": t,
80
+ onClick: c,
81
+ "data-tip": `Go to ${i}`,
82
+ className: `${m} transition-colors hover:border-nvr-cyan/50 hover:text-[#0e7490] dark:hover:text-nvr-cyan`,
83
+ children: h
84
+ }
85
+ ) : /* @__PURE__ */ e("span", { "data-comment-field": t, className: m, children: h });
86
+ }
87
+ function at(t, i) {
64
88
  const c = t.slice(0, i).match(/(^|\s)@([a-zA-Z0-9._-]{2,})$/);
65
89
  return c ? { start: i - c[2].length - 1, query: c[2] } : null;
66
90
  }
67
91
  function he(t) {
68
92
  return t.email.split("@")[0];
69
93
  }
70
- function ae({
94
+ function re({
71
95
  value: t,
72
96
  onChange: i,
73
97
  ...d
74
98
  }) {
75
- const c = oe(), b = Z(null), [m, h] = v(null), [E, f] = v(0), k = Ie((m == null ? void 0 : m.query) ?? "", 200), { data: M = [] } = U({
76
- queryKey: ["users", "mention-search", k],
99
+ const c = oe(), h = Y(null), [m, f] = N(null), [S, g] = N(0), v = je((m == null ? void 0 : m.query) ?? "", 200), { data: D = [] } = U({
100
+ queryKey: ["users", "mention-search", v],
77
101
  queryFn: () => c.request(
78
- W("/users", { limit: 8, sort: "first_name", search: k })
102
+ W("/users", { limit: 8, sort: "first_name", search: v })
79
103
  ).then((n) => n.data),
80
- enabled: !!m && k.length >= 2,
104
+ enabled: !!m && v.length >= 2,
81
105
  staleTime: 3e4
82
- }), I = Le(15e3, !!m), { data: p } = U({
106
+ }), M = Ae(15e3, !!m), { data: $ } = U({
83
107
  queryKey: ["presence-online"],
84
108
  queryFn: () => c.request(
85
109
  W("/presence/online")
86
110
  ),
87
111
  enabled: !!m,
88
- refetchInterval: I,
112
+ refetchInterval: M,
89
113
  staleTime: 5e3
90
- }), g = (n) => {
91
- var x;
92
- const l = (x = p == null ? void 0 : p.data) == null ? void 0 : x.find((_) => String(_.user_id).toUpperCase() === n.toUpperCase());
114
+ }), p = (n) => {
115
+ var u;
116
+ const l = (u = $ == null ? void 0 : $.data) == null ? void 0 : u.find((k) => String(k.user_id).toUpperCase() === n.toUpperCase());
93
117
  return l ? l.is_idle || l.away ? 1 : 0 : 2;
94
- }, N = [...M].sort((n, l) => g(n.id) - g(l.id)), { data: j = [] } = U({
118
+ }, y = [...D].sort((n, l) => p(n.id) - p(l.id)), { data: R = [] } = U({
95
119
  queryKey: ["mention-roles"],
96
120
  queryFn: () => c.request(W("/chat/roles")).then((n) => n.data).catch(() => []),
97
121
  enabled: !!m,
98
122
  staleTime: 5 * 6e4
99
- }), T = m ? j.filter(
100
- (n) => n.name.toLowerCase().replace(/\s+/g, "-").startsWith(k.toLowerCase())
101
- ).slice(0, 3) : [], w = !!m && k.length >= 2 && "owners".startsWith(k.toLowerCase()), C = !!m && k.length >= 2 && (N.length > 0 || w || T.length > 0), o = N.length + (w ? 1 : 0) + T.length, [y, D] = v(null), z = Z(null);
102
- V(() => {
103
- if (!C || !b.current) {
104
- D(null);
123
+ }), P = m ? R.filter(
124
+ (n) => n.name.toLowerCase().replace(/\s+/g, "-").startsWith(v.toLowerCase())
125
+ ).slice(0, 3) : [], w = !!m && v.length >= 2 && "owners".startsWith(v.toLowerCase()), E = !!m && v.length >= 2 && (y.length > 0 || w || P.length > 0), o = y.length + (w ? 1 : 0) + P.length, [b, I] = N(null), A = Y(null);
126
+ Z(() => {
127
+ if (!E || !h.current) {
128
+ I(null);
105
129
  return;
106
130
  }
107
- const n = b.current.getBoundingClientRect();
108
- D({ top: n.bottom + 4, left: n.left, width: Math.min(n.width, 360) });
109
- const l = (_) => {
110
- var S;
111
- (S = z.current) != null && S.contains(_.target) || h(null);
112
- }, x = () => h(null);
113
- return window.addEventListener("scroll", l, !0), window.addEventListener("resize", x), () => {
114
- window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", x);
131
+ const n = h.current.getBoundingClientRect();
132
+ I({ top: n.bottom + 4, left: n.left, width: Math.min(n.width, 360) });
133
+ const l = (k) => {
134
+ var _;
135
+ (_ = A.current) != null && _.contains(k.target) || f(null);
136
+ }, u = () => f(null);
137
+ return window.addEventListener("scroll", l, !0), window.addEventListener("resize", u), () => {
138
+ window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", u);
115
139
  };
116
- }, [C]);
117
- function L(n) {
118
- const l = Ye(n.value, n.selectionStart ?? n.value.length);
119
- h(l), l || f(0);
140
+ }, [E]);
141
+ function Q(n) {
142
+ const l = at(n.value, n.selectionStart ?? n.value.length);
143
+ f(l), l || g(0);
120
144
  }
121
145
  function q(n) {
122
- if (!m || !b.current) return;
123
- const l = b.current.selectionStart ?? t.length, x = n === "__owners__" ? "@owners " : typeof n == "object" && "role" in n ? `@${n.role.toLowerCase().replace(/\s+/g, "-")} ` : `@${he(n)} `, _ = t.slice(0, m.start) + x + t.slice(l);
124
- i(_), h(null), f(0);
125
- const S = m.start + x.length;
146
+ if (!m || !h.current) return;
147
+ const l = h.current.selectionStart ?? t.length, u = n === "__owners__" ? "@owners " : typeof n == "object" && "role" in n ? `@${n.role.toLowerCase().replace(/\s+/g, "-")} ` : `@${he(n)} `, k = t.slice(0, m.start) + u + t.slice(l);
148
+ i(k), f(null), g(0);
149
+ const _ = m.start + u.length;
126
150
  requestAnimationFrame(() => {
127
- var F, K;
128
- (F = b.current) == null || F.focus(), (K = b.current) == null || K.setSelectionRange(S, S);
151
+ var j, O;
152
+ (j = h.current) == null || j.focus(), (O = h.current) == null || O.setSelectionRange(_, _);
129
153
  });
130
154
  }
131
- function A(n) {
132
- if (C)
155
+ function z(n) {
156
+ if (E)
133
157
  if (n.key === "ArrowDown")
134
- n.preventDefault(), f((l) => (l + 1) % o);
158
+ n.preventDefault(), g((l) => (l + 1) % o);
135
159
  else if (n.key === "ArrowUp")
136
- n.preventDefault(), f((l) => (l - 1 + o) % o);
160
+ n.preventDefault(), g((l) => (l - 1 + o) % o);
137
161
  else if (n.key === "Enter" || n.key === "Tab") {
138
162
  n.preventDefault();
139
- const l = Math.min(E, o - 1), x = w ? 1 : 0, _ = x + N.length;
163
+ const l = Math.min(S, o - 1), u = w ? 1 : 0, k = u + y.length;
140
164
  if (w && l === 0) q("__owners__");
141
- else if (l >= _) {
142
- const S = T[l - _];
143
- S && q({ role: S.name });
144
- } else q(N[l - x]);
145
- } else n.key === "Escape" && (n.preventDefault(), h(null));
165
+ else if (l >= k) {
166
+ const _ = P[l - k];
167
+ _ && q({ role: _.name });
168
+ } else q(y[l - u]);
169
+ } else n.key === "Escape" && (n.preventDefault(), f(null));
146
170
  }
147
171
  return /* @__PURE__ */ s("div", { className: "relative", children: [
148
172
  /* @__PURE__ */ e(
149
- Ge,
173
+ Ze,
150
174
  {
151
175
  ...d,
152
- ref: b,
176
+ ref: h,
153
177
  value: t,
154
178
  onChange: (n) => {
155
- i(n.target.value), L(n.target);
179
+ i(n.target.value), Q(n.target);
156
180
  },
157
- onKeyDown: A,
158
- onClick: (n) => L(n.currentTarget),
159
- onBlur: () => setTimeout(() => h(null), 150)
181
+ onKeyDown: z,
182
+ onClick: (n) => Q(n.currentTarget),
183
+ onBlur: () => setTimeout(() => f(null), 150)
160
184
  }
161
185
  ),
162
- C && y && Te(
186
+ E && b && Re(
163
187
  /* @__PURE__ */ s(
164
188
  "div",
165
189
  {
166
- ref: z,
190
+ ref: A,
191
+ "data-mention-menu": "",
167
192
  className: "fixed z-[110] max-h-60 overflow-y-auto rounded-md border border-slate-200 bg-white shadow-lg dark:border-border dark:bg-popover",
168
- style: { top: y.top, left: y.left, width: y.width },
193
+ style: { top: b.top, left: b.left, width: b.width },
169
194
  onMouseDown: (n) => n.preventDefault(),
170
195
  children: [
171
196
  w && /* @__PURE__ */ s(
@@ -175,8 +200,8 @@ function ae({
175
200
  onMouseDown: (n) => {
176
201
  n.preventDefault(), q("__owners__");
177
202
  },
178
- onMouseEnter: () => f(0),
179
- className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${E === 0 ? "bg-nvr-cyan/10" : ""}`,
203
+ onMouseEnter: () => g(0),
204
+ className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${S === 0 ? "bg-nvr-cyan/10" : ""}`,
180
205
  children: [
181
206
  /* @__PURE__ */ e("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/15 text-[10px] font-semibold text-nvr-navy/80 dark:text-nvr-cyan", children: "★" }),
182
207
  /* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
@@ -186,32 +211,32 @@ function ae({
186
211
  ]
187
212
  }
188
213
  ),
189
- N.map((n, l) => {
190
- var S, F;
191
- const x = w ? l + 1 : l, _ = [n.first_name, n.last_name].filter(Boolean).join(" ") || n.email;
214
+ y.map((n, l) => {
215
+ var _, j;
216
+ const u = w ? l + 1 : l, k = [n.first_name, n.last_name].filter(Boolean).join(" ") || n.email;
192
217
  return /* @__PURE__ */ s(
193
218
  "button",
194
219
  {
195
220
  type: "button",
196
- onMouseDown: (K) => {
197
- K.preventDefault(), q(n);
221
+ onMouseDown: (O) => {
222
+ O.preventDefault(), q(n);
198
223
  },
199
- onMouseEnter: () => f(x),
200
- className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${x === E ? "bg-nvr-cyan/10" : ""}`,
224
+ onMouseEnter: () => g(u),
225
+ className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${u === S ? "bg-nvr-cyan/10" : ""}`,
201
226
  children: [
202
227
  /* @__PURE__ */ s("span", { className: "relative flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/15 text-[10px] font-semibold text-nvr-navy/80 dark:text-nvr-cyan", children: [
203
- (`${((S = n.first_name) == null ? void 0 : S[0]) ?? ""}${((F = n.last_name) == null ? void 0 : F[0]) ?? ""}`.trim() || n.email[0]).toUpperCase(),
204
- g(n.id) < 2 && /* @__PURE__ */ e(
228
+ (`${((_ = n.first_name) == null ? void 0 : _[0]) ?? ""}${((j = n.last_name) == null ? void 0 : j[0]) ?? ""}`.trim() || n.email[0]).toUpperCase(),
229
+ p(n.id) < 2 && /* @__PURE__ */ e(
205
230
  "span",
206
231
  {
207
- "data-mention-presence": g(n.id) === 0 ? "online" : "idle",
208
- title: g(n.id) === 0 ? "Online" : "Idle",
209
- className: `absolute -bottom-px -right-px h-2 w-2 rounded-full ring-2 ring-white dark:ring-popover ${g(n.id) === 0 ? "bg-emerald-500" : "border border-amber-500 bg-white dark:bg-popover"}`
232
+ "data-mention-presence": p(n.id) === 0 ? "online" : "idle",
233
+ title: p(n.id) === 0 ? "Online" : "Idle",
234
+ className: `absolute -bottom-px -right-px h-2 w-2 rounded-full ring-2 ring-white dark:ring-popover ${p(n.id) === 0 ? "bg-emerald-500" : "border border-amber-500 bg-white dark:bg-popover"}`
210
235
  }
211
236
  )
212
237
  ] }),
213
238
  /* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
214
- /* @__PURE__ */ e("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: _ }),
239
+ /* @__PURE__ */ e("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: k }),
215
240
  /* @__PURE__ */ s("span", { className: "block truncate text-[11px] text-slate-400", children: [
216
241
  n.is_out_of_office && /* @__PURE__ */ s("span", { className: "mr-1 rounded bg-amber-100 px-1 py-px text-[9.5px] font-semibold text-amber-700 dark:bg-amber-400/15 dark:text-amber-400", children: [
217
242
  "OOO",
@@ -230,17 +255,17 @@ function ae({
230
255
  n.id
231
256
  );
232
257
  }),
233
- T.map((n, l) => {
234
- const x = N.length + (w ? 1 : 0) + l;
258
+ P.map((n, l) => {
259
+ const u = y.length + (w ? 1 : 0) + l;
235
260
  return /* @__PURE__ */ s(
236
261
  "button",
237
262
  {
238
263
  type: "button",
239
- onMouseDown: (_) => {
240
- _.preventDefault(), q({ role: n.name });
264
+ onMouseDown: (k) => {
265
+ k.preventDefault(), q({ role: n.name });
241
266
  },
242
- onMouseEnter: () => f(x),
243
- className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${x === E ? "bg-nvr-cyan/10" : ""}`,
267
+ onMouseEnter: () => g(u),
268
+ className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${u === S ? "bg-nvr-cyan/10" : ""}`,
244
269
  children: [
245
270
  /* @__PURE__ */ e("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-violet-500/15 text-[10px] font-semibold text-violet-600 dark:text-violet-300", children: "R" }),
246
271
  /* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
@@ -271,62 +296,62 @@ function be(t) {
271
296
  return "system";
272
297
  }
273
298
  }
274
- const et = {
299
+ const rt = {
275
300
  people: "People",
276
301
  system: "System",
277
302
  integration: "Integration"
278
- }, tt = "integrations:";
279
- function nt({
303
+ }, st = "integrations:";
304
+ function ot({
280
305
  note: t,
281
306
  collection: i,
282
307
  item: d
283
308
  }) {
284
- var C;
285
- const c = Me(), [b, m] = v(!1), h = t.source === "external" && !!t.provider && !t.provider.startsWith(tt), E = oe(), f = fe(), [k, M] = v(!1), I = O({
286
- mutationFn: (o) => E.request(Q(`/comments/${t.comment_id}/reactions`, { emoji: o })),
309
+ var E;
310
+ const c = Ie(), [h, m] = N(!1), f = t.source === "external" && !!t.provider && !t.provider.startsWith(st), S = oe(), g = fe(), [v, D] = N(!1), M = L({
311
+ mutationFn: (o) => S.request(B(`/comments/${t.comment_id}/reactions`, { emoji: o })),
287
312
  onSuccess: () => {
288
- M(!1), f.invalidateQueries({ queryKey: ["comments-related"] }), f.invalidateQueries({ queryKey: ["row-comment-counts"] });
313
+ D(!1), g.invalidateQueries({ queryKey: ["comments-related"] }), g.invalidateQueries({ queryKey: ["row-comment-counts"] });
289
314
  },
290
- onError: () => R.error("Failed to react")
291
- }), [p, g] = v(!1), N = O({
292
- mutationFn: () => E.request(
293
- Q(`/integration-events/${encodeURIComponent(t.provider ?? "")}/replay`, {
315
+ onError: () => F.error("Failed to react")
316
+ }), [$, p] = N(!1), y = L({
317
+ mutationFn: () => S.request(
318
+ B(`/integration-events/${encodeURIComponent(t.provider ?? "")}/replay`, {
294
319
  entry_id: t.id.replace(/^external:/, "")
295
320
  })
296
321
  ),
297
322
  onSuccess: (o) => {
298
- var y;
299
- g(!1), R.success("Event replayed", {
300
- description: (y = o == null ? void 0 : o.data) == null ? void 0 : y.detail
301
- }), f.invalidateQueries({ queryKey: ["comments-related"] });
323
+ var b;
324
+ p(!1), F.success("Event replayed", {
325
+ description: (b = o == null ? void 0 : o.data) == null ? void 0 : b.detail
326
+ }), g.invalidateQueries({ queryKey: ["comments-related"] });
302
327
  },
303
328
  onError: (o) => {
304
- var D;
305
- g(!1);
306
- const y = (D = o == null ? void 0 : o.response) == null ? void 0 : D.error;
307
- R.error(y ?? (o == null ? void 0 : o.message) ?? "Replay failed", { duration: 8e3 });
329
+ var I;
330
+ p(!1);
331
+ const b = (I = o == null ? void 0 : o.response) == null ? void 0 : I.error;
332
+ F.error(b ?? (o == null ? void 0 : o.message) ?? "Replay failed", { duration: 8e3 });
308
333
  }
309
- }), j = t.link ? () => {
334
+ }), R = t.link ? () => {
310
335
  const o = t.link;
311
336
  if (!o) return;
312
- const y = document.querySelector(`[data-o2m-row="${o.collection}:${o.item_id}"]`);
313
- if (y) {
314
- y.scrollIntoView({ behavior: "smooth", block: "center" }), y.classList.add("nvr-row-flash"), setTimeout(() => y.classList.remove("nvr-row-flash"), 2400);
337
+ const b = document.querySelector(`[data-o2m-row="${o.collection}:${o.item_id}"]`);
338
+ if (b) {
339
+ b.scrollIntoView({ behavior: "smooth", block: "center" }), b.classList.add("nvr-row-flash"), setTimeout(() => b.classList.remove("nvr-row-flash"), 2400);
315
340
  return;
316
341
  }
317
342
  c == null || c.open({ collection: o.collection, itemId: o.item_id });
318
- } : null, T = t.source === "transition" ? "border-nvr-cyan/30 bg-nvr-cyan/[0.06] text-nvr-navy dark:text-nvr-cyan" : t.source === "addendum" ? "border-amber-200 bg-amber-50/60 text-amber-700 dark:border-amber-900/40 dark:bg-amber-900/10 dark:text-amber-400" : t.source === "external" || t.source === "inbound" ? "border-sky-200 bg-sky-50/70 text-sky-700 dark:border-sky-900/40 dark:bg-sky-900/10 dark:text-sky-300" : t.source === "import" ? "border-emerald-200 bg-emerald-50/70 text-emerald-700 dark:border-emerald-900/40 dark:bg-emerald-900/10 dark:text-emerald-300" : "border-slate-200 bg-slate-50/80 text-slate-600 dark:border-border dark:bg-muted/40 dark:text-slate-300", w = t.source === "import" && ((C = t.import) != null && C.file_id) ? t.import : null;
343
+ } : null, P = t.source === "transition" ? "border-nvr-cyan/30 bg-nvr-cyan/[0.06] text-nvr-navy dark:text-nvr-cyan" : t.source === "addendum" ? "border-amber-200 bg-amber-50/60 text-amber-700 dark:border-amber-900/40 dark:bg-amber-900/10 dark:text-amber-400" : t.source === "external" || t.source === "inbound" ? "border-sky-200 bg-sky-50/70 text-sky-700 dark:border-sky-900/40 dark:bg-sky-900/10 dark:text-sky-300" : t.source === "import" ? "border-emerald-200 bg-emerald-50/70 text-emerald-700 dark:border-emerald-900/40 dark:bg-emerald-900/10 dark:text-emerald-300" : "border-slate-200 bg-slate-50/80 text-slate-600 dark:border-border dark:bg-muted/40 dark:text-slate-300", w = t.source === "import" && ((E = t.import) != null && E.file_id) ? t.import : null;
319
344
  return /* @__PURE__ */ s("div", { className: "flex gap-3", "data-recorded-note": t.source, children: [
320
345
  /* @__PURE__ */ e("div", { className: "mt-1 h-8 w-8 shrink-0", "aria-hidden": !0 }),
321
346
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
322
347
  /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
323
- /* @__PURE__ */ e("span", { className: `rounded border px-1.5 py-px text-[10px] font-medium ${T}`, children: t.label }),
348
+ /* @__PURE__ */ e("span", { className: `rounded border px-1.5 py-px text-[10px] font-medium ${P}`, children: t.label }),
324
349
  t.user_name && /* @__PURE__ */ e("span", { className: "text-[12px] font-medium text-slate-700 dark:text-slate-200", children: t.user_name }),
325
- t.context && (j ? /* @__PURE__ */ e(
350
+ t.context && (R ? /* @__PURE__ */ e(
326
351
  "button",
327
352
  {
328
353
  type: "button",
329
- onClick: j,
354
+ onClick: R,
330
355
  className: "truncate text-[11px] text-nvr-navy underline-offset-2 hover:underline dark:text-nvr-cyan",
331
356
  "data-line-comment-link": !0,
332
357
  children: t.context
@@ -345,7 +370,7 @@ function nt({
345
370
  ) : /* @__PURE__ */ e("span", { className: "truncate text-[11px] text-slate-400", children: t.context })),
346
371
  /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: le(t.created_at) }),
347
372
  t.source === "inbound" && t.inbound && /* @__PURE__ */ e(
348
- Ue,
373
+ Ge,
349
374
  {
350
375
  activityId: t.inbound.activity_id,
351
376
  callerName: t.label,
@@ -365,7 +390,7 @@ function nt({
365
390
  }
366
391
  ),
367
392
  t.source === "external" && t.status === "error" && /* @__PURE__ */ e("span", { className: "rounded bg-red-50 px-1 text-[10px] font-medium text-red-700 dark:bg-red-500/10 dark:text-red-400", children: "error" }),
368
- h && /* @__PURE__ */ e(
393
+ f && /* @__PURE__ */ e(
369
394
  "button",
370
395
  {
371
396
  type: "button",
@@ -380,13 +405,13 @@ function nt({
380
405
  "button",
381
406
  {
382
407
  type: "button",
383
- onClick: () => p ? N.mutate() : g(!0),
384
- onBlur: () => g(!1),
385
- disabled: N.isPending,
408
+ onClick: () => $ ? y.mutate() : p(!0),
409
+ onBlur: () => p(!1),
410
+ disabled: y.isPending,
386
411
  "data-note-replay": t.id,
387
- className: `rounded px-1.5 py-px text-[10.5px] font-medium transition-colors ${p ? "bg-sky-600 text-white" : "text-sky-700 hover:bg-sky-50 dark:text-sky-300 dark:hover:bg-sky-900/20"}`,
412
+ className: `rounded px-1.5 py-px text-[10.5px] font-medium transition-colors ${$ ? "bg-sky-600 text-white" : "text-sky-700 hover:bg-sky-50 dark:text-sky-300 dark:hover:bg-sky-900/20"}`,
388
413
  "data-tip": "Re-apply this event from its stored payload",
389
- children: N.isPending ? "Replaying…" : p ? "Replay this event?" : "Replay"
414
+ children: y.isPending ? "Replaying…" : $ ? "Replay this event?" : "Replay"
390
415
  }
391
416
  )
392
417
  ] }),
@@ -396,7 +421,7 @@ function nt({
396
421
  "button",
397
422
  {
398
423
  type: "button",
399
- onClick: () => I.mutate(o.emoji),
424
+ onClick: () => M.mutate(o.emoji),
400
425
  className: `inline-flex items-center gap-1 rounded-full border px-1.5 py-px text-[11px] transition-colors ${o.mine ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-slate-50 text-slate-600 hover:border-slate-300 dark:border-border dark:bg-muted dark:text-slate-300"}`,
401
426
  children: [
402
427
  o.emoji,
@@ -410,17 +435,17 @@ function nt({
410
435
  "button",
411
436
  {
412
437
  type: "button",
413
- onClick: () => M((o) => !o),
438
+ onClick: () => D((o) => !o),
414
439
  className: "rounded p-0.5 text-slate-300 transition-colors hover:bg-slate-100 hover:text-slate-500 dark:hover:bg-muted",
415
440
  "aria-label": "Add reaction",
416
441
  children: /* @__PURE__ */ e(ge, { className: "h-3.5 w-3.5" })
417
442
  }
418
443
  ),
419
- k && /* @__PURE__ */ e("span", { className: "absolute bottom-6 left-0 z-20 flex gap-0.5 rounded-full border border-slate-200 bg-white px-1.5 py-1 shadow-lg dark:border-border dark:bg-popover", children: ye.map((o) => /* @__PURE__ */ e(
444
+ v && /* @__PURE__ */ e("span", { className: "absolute bottom-6 left-0 z-20 flex gap-0.5 rounded-full border border-slate-200 bg-white px-1.5 py-1 shadow-lg dark:border-border dark:bg-popover", children: ye.map((o) => /* @__PURE__ */ e(
420
445
  "button",
421
446
  {
422
447
  type: "button",
423
- onClick: () => I.mutate(o),
448
+ onClick: () => M.mutate(o),
424
449
  className: "rounded-full px-1 text-[14px] hover:bg-muted",
425
450
  children: o
426
451
  },
@@ -429,10 +454,10 @@ function nt({
429
454
  ] })
430
455
  ] })
431
456
  ] }),
432
- h && t.provider && /* @__PURE__ */ e(
433
- Je,
457
+ f && t.provider && /* @__PURE__ */ e(
458
+ Ye,
434
459
  {
435
- target: b ? {
460
+ target: h ? {
436
461
  source: t.provider,
437
462
  id: t.id.replace(/^external:/, ""),
438
463
  record: { collection: i, item: d }
@@ -443,99 +468,99 @@ function nt({
443
468
  )
444
469
  ] });
445
470
  }
446
- function Ct({
471
+ function Dt({
447
472
  collection: t,
448
473
  item: i,
449
474
  title: d,
450
475
  defaultExpanded: c,
451
- queuedComments: b,
476
+ queuedComments: h,
452
477
  onQueueComment: m
453
478
  }) {
454
- const h = oe(), { userId: E } = Fe(), f = fe(), [k, M] = v(!1), I = Z(!1);
455
- V(() => {
456
- !I.current && c !== void 0 && (I.current = !0, M(c));
479
+ const f = oe(), { userId: S } = Me(), g = fe(), v = He(), [D, M] = N(!1), $ = Y(!1);
480
+ Z(() => {
481
+ !$.current && c !== void 0 && ($.current = !0, M(c));
457
482
  }, [c]);
458
- const [p, g] = v(""), [N, j] = v(!1), T = async () => {
483
+ const [p, y] = N(""), [R, P] = N(!1), w = async () => {
459
484
  var r;
460
- if (!(!p.trim() || N)) {
461
- j(!0);
485
+ if (!(!p.trim() || R)) {
486
+ P(!0);
462
487
  try {
463
- const a = await h.request(
464
- Q("/ai/cleanup", { text: p })
488
+ const a = await f.request(
489
+ B("/ai/cleanup", { text: p })
465
490
  );
466
- (r = a.data) != null && r.text && g(a.data.text);
491
+ (r = a.data) != null && r.text && y(a.data.text);
467
492
  } catch {
468
493
  } finally {
469
- j(!1);
494
+ P(!1);
470
495
  }
471
496
  }
472
- }, w = Ae(t, i, "note"), C = Ke(t, i, "note"), o = Z(0);
473
- V(() => {
497
+ }, E = Ke(t, i, "note"), o = Be(t, i, "note"), b = Y(0);
498
+ Z(() => {
474
499
  if (!p.trim()) {
475
- o.current && C("stop"), o.current = 0;
500
+ b.current && o("stop"), b.current = 0;
476
501
  return;
477
502
  }
478
503
  const r = Date.now();
479
- r - o.current < 2500 || (o.current = r, C("start"));
480
- }, [p, C]), V(() => () => C("stop"), [C]);
481
- const [y, D] = v(null), [z, L] = v(null), [q, A] = v(""), n = !i || i === "new", l = ["comments", t, String(i)], { data: x, isLoading: _, isError: S } = U({
482
- queryKey: l,
483
- queryFn: () => h.request(W("/comments", { collection: t, item: i })).then((r) => r.data),
484
- enabled: !n
485
- }), F = G(() => (x ?? []).filter((r) => !r.deleted), [x]), { data: K } = U({
504
+ r - b.current < 2500 || (b.current = r, o("start"));
505
+ }, [p, o]), Z(() => () => o("stop"), [o]);
506
+ const [I, A] = N(null), [Q, q] = N(null), [z, n] = N(""), l = !i || i === "new", u = ["comments", t, String(i)], { data: k, isLoading: _, isError: j } = U({
507
+ queryKey: u,
508
+ queryFn: () => f.request(W("/comments", { collection: t, item: i })).then((r) => r.data),
509
+ enabled: !l
510
+ }), O = X(() => (k ?? []).filter((r) => !r.deleted), [k]), { data: ve } = U({
486
511
  queryKey: ["comments-related", t, String(i)],
487
- queryFn: () => h.request(W("/comments/related", { collection: t, item: i })).then((r) => r.data ?? []).catch(() => []),
488
- enabled: !n,
512
+ queryFn: () => f.request(W("/comments/related", { collection: t, item: i })).then((r) => r.data ?? []).catch(() => []),
513
+ enabled: !l,
489
514
  staleTime: 3e4
490
- }), ie = K ?? [], $ = G(() => {
491
- const r = F.map((u) => ({ kind: "comment", at: u.created_at, comment: u })), a = ie.map((u) => ({ kind: "related", at: u.created_at, note: u }));
492
- return [...r, ...a].sort((u, B) => new Date(B.at).getTime() - new Date(u.at).getTime());
493
- }, [F, ie]), [H, ve] = v(() => /* @__PURE__ */ new Set()), [X, ke] = v(""), Ne = G(() => {
515
+ }), ie = ve ?? [], C = X(() => {
516
+ const r = O.map((x) => ({ kind: "comment", at: x.created_at, comment: x })), a = ie.map((x) => ({ kind: "related", at: x.created_at, note: x }));
517
+ return [...r, ...a].sort((x, K) => new Date(K.at).getTime() - new Date(x.at).getTime());
518
+ }, [O, ie]), [G, ke] = N(() => /* @__PURE__ */ new Set()), [H, Ne] = N(""), we = X(() => {
494
519
  const r = { people: 0, system: 0, integration: 0 };
495
- for (const a of $) r[be(a)]++;
520
+ for (const a of C) r[be(a)]++;
496
521
  return r;
497
- }, [$]), Y = G(() => {
498
- const r = X.trim().toLowerCase();
499
- return $.filter((a) => H.has(be(a)) ? !1 : r ? (a.kind === "comment" ? `${a.comment.text} ${re(a.comment.user)}` : `${a.note.text} ${a.note.user_name ?? ""} ${a.note.label} ${a.note.context ?? ""} ${a.note.provider ?? ""}`).toLowerCase().includes(r) : !0);
500
- }, [$, H, X]), we = (r) => ve((a) => {
501
- const u = new Set(a);
502
- return u.has(r) ? u.delete(r) : u.add(r), u;
503
- }), _e = H.size > 0 || X.trim() !== "", ee = O({
504
- mutationFn: (r) => h.request(Q("/comments", { collection: t, item: i, text: r })),
522
+ }, [C]), ee = X(() => {
523
+ const r = H.trim().toLowerCase();
524
+ return C.filter((a) => G.has(be(a)) ? !1 : r ? (a.kind === "comment" ? `${a.comment.text} ${ae(a.comment.user)}` : `${a.note.text} ${a.note.user_name ?? ""} ${a.note.label} ${a.note.context ?? ""} ${a.note.provider ?? ""}`).toLowerCase().includes(r) : !0);
525
+ }, [C, G, H]), _e = (r) => ke((a) => {
526
+ const x = new Set(a);
527
+ return x.has(r) ? x.delete(r) : x.add(r), x;
528
+ }), Ce = G.size > 0 || H.trim() !== "", te = L({
529
+ mutationFn: (r) => f.request(B("/comments", { collection: t, item: i, text: r })),
505
530
  onSuccess: () => {
506
- f.invalidateQueries({ queryKey: l }), g("");
531
+ g.invalidateQueries({ queryKey: u }), y("");
507
532
  },
508
- onError: () => R.error("Failed to post comment")
509
- }), de = O({
510
- mutationFn: ({ id: r, text: a }) => h.request(je(`/comments/${r}`, { text: a })),
533
+ onError: () => F.error("Failed to post comment")
534
+ }), de = L({
535
+ mutationFn: ({ id: r, text: a }) => f.request(Oe(`/comments/${r}`, { text: a })),
511
536
  onSuccess: () => {
512
- f.invalidateQueries({ queryKey: l }), D(null), A("");
537
+ g.invalidateQueries({ queryKey: u }), A(null), n("");
513
538
  },
514
- onError: () => R.error("Failed to update comment")
515
- }), te = O({
516
- mutationFn: (r) => h.request(Oe(`/comments/${r}`)),
517
- onSuccess: () => f.invalidateQueries({ queryKey: l }),
518
- onError: () => R.error("Failed to delete comment")
519
- }), ce = O({
520
- mutationFn: ({ id: r, emoji: a }) => h.request(Q(`/comments/${r}/reactions`, { emoji: a })),
521
- onSuccess: () => f.invalidateQueries({ queryKey: l }),
522
- onError: () => R.error("Failed to react")
523
- }), [me, ue] = v(null), Ce = O({
524
- mutationFn: (r) => h.request(
525
- Q("/tasks", {
539
+ onError: () => F.error("Failed to update comment")
540
+ }), ne = L({
541
+ mutationFn: (r) => f.request(Le(`/comments/${r}`)),
542
+ onSuccess: () => g.invalidateQueries({ queryKey: u }),
543
+ onError: () => F.error("Failed to delete comment")
544
+ }), ce = L({
545
+ mutationFn: ({ id: r, emoji: a }) => f.request(B(`/comments/${r}/reactions`, { emoji: a })),
546
+ onSuccess: () => g.invalidateQueries({ queryKey: u }),
547
+ onError: () => F.error("Failed to react")
548
+ }), [me, pe] = N(null), Se = L({
549
+ mutationFn: (r) => f.request(
550
+ B("/tasks", {
526
551
  collection: t,
527
552
  item: i,
528
553
  title: r.text.replace(/<[^>]*>/g, "").replace(/@\[([^\]]+)\]/g, "@$1").slice(0, 200),
529
- assignee: E
554
+ assignee: S
530
555
  })
531
556
  ),
532
557
  onSuccess: () => {
533
- Qe(f, t, i), R.success("Task created from comment — assigned to you");
558
+ ze(g, t, i), F.success("Task created from comment — assigned to you");
534
559
  },
535
- onError: () => R.error("Could not create a task")
560
+ onError: () => F.error("Could not create a task")
536
561
  });
537
- function pe(r) {
538
- r.preventDefault(), p.trim() && (n && m ? (m(p.trim()), g("")) : ee.mutate(p.trim()));
562
+ function ue(r) {
563
+ r.preventDefault(), p.trim() && (l && m ? (m(p.trim()), y("")) : te.mutate(p.trim()));
539
564
  }
540
565
  return (
541
566
  // Addressable from elsewhere (the summary panel jumps here), which needs
@@ -544,7 +569,7 @@ function Ct({
544
569
  "div",
545
570
  {
546
571
  "data-panel": "notes",
547
- "data-panel-expanded": k ? "true" : "false",
572
+ "data-panel-expanded": D ? "true" : "false",
548
573
  className: "overflow-hidden rounded-xl border border-slate-200 bg-white dark:bg-card dark:border-border",
549
574
  children: [
550
575
  /* @__PURE__ */ s(
@@ -556,37 +581,37 @@ function Ct({
556
581
  className: "flex w-full flex-col px-5 py-3.5 text-left transition-colors hover:bg-slate-50/50 dark:hover:bg-white/[0.02]",
557
582
  children: [
558
583
  /* @__PURE__ */ s("span", { className: "flex w-full items-center gap-2.5", children: [
559
- /* @__PURE__ */ e(Se, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
584
+ /* @__PURE__ */ e($e, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
560
585
  /* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800 dark:text-slate-200", children: d || "Comments" }),
561
- ($.length > 0 || (b ?? []).length > 0) && /* @__PURE__ */ e("span", { className: "rounded-full bg-slate-100 px-1.5 py-px text-[10.5px] font-semibold tabular-nums text-slate-500 dark:bg-muted dark:text-slate-400", children: n ? (b ?? []).length : $.length }),
586
+ (C.length > 0 || (h ?? []).length > 0) && /* @__PURE__ */ e("span", { className: "rounded-full bg-slate-100 px-1.5 py-px text-[10.5px] font-semibold tabular-nums text-slate-500 dark:bg-muted dark:text-slate-400", children: l ? (h ?? []).length : C.length }),
562
587
  /* @__PURE__ */ e(
563
- $e,
588
+ Ee,
564
589
  {
565
- className: `ml-auto h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform duration-150${k ? " rotate-180" : ""}`
590
+ className: `ml-auto h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform duration-150${D ? " rotate-180" : ""}`
566
591
  }
567
592
  )
568
593
  ] }),
569
- !k && !n && $.length > 0 && (() => {
570
- const r = $[0], a = r.kind === "comment" ? re(r.comment.user) : r.note.user_name ?? "System", u = (r.kind === "comment" ? r.comment.text : r.note.text).replace(/<[^>]*>/g, " ").replace(/@\[([^\]]+)\]/g, "@$1").replace(/\s+/g, " ").trim();
571
- return u ? /* @__PURE__ */ s("span", { className: "mt-1 w-full truncate pl-6 text-[11.5px] text-slate-400", children: [
594
+ !D && !l && C.length > 0 && (() => {
595
+ const r = C[0], a = r.kind === "comment" ? ae(r.comment.user) : r.note.user_name ?? "System", x = (r.kind === "comment" ? r.comment.text : r.note.text).replace(/<[^>]*>/g, " ").replace(/@\[([^\]]+)\]/g, "@$1").replace(/\s+/g, " ").trim();
596
+ return x ? /* @__PURE__ */ s("span", { className: "mt-1 w-full truncate pl-6 text-[11.5px] text-slate-400", children: [
572
597
  /* @__PURE__ */ s("span", { className: "font-medium text-slate-500 dark:text-slate-400", children: [
573
598
  a,
574
599
  ":"
575
600
  ] }),
576
601
  " ",
577
- /* @__PURE__ */ e(se, { text: u, plain: !0 })
602
+ /* @__PURE__ */ e(se, { text: x, plain: !0 })
578
603
  ] }) : null;
579
604
  })()
580
605
  ]
581
606
  }
582
607
  ),
583
- k && /* @__PURE__ */ e("div", { className: "border-t border-slate-100 px-5 py-4 dark:border-border/60", children: n ? /* @__PURE__ */ s("div", { className: "space-y-4", children: [
584
- /* @__PURE__ */ s("form", { onSubmit: pe, className: "space-y-2", children: [
608
+ D && /* @__PURE__ */ e("div", { className: "border-t border-slate-100 px-5 py-4 dark:border-border/60", children: l ? /* @__PURE__ */ s("div", { className: "space-y-4", children: [
609
+ /* @__PURE__ */ s("form", { onSubmit: ue, className: "space-y-2", children: [
585
610
  /* @__PURE__ */ e(
586
- ae,
611
+ re,
587
612
  {
588
613
  value: p,
589
- onChange: g,
614
+ onChange: y,
590
615
  placeholder: "Write a comment…",
591
616
  rows: 3,
592
617
  className: "text-[13px]"
@@ -597,9 +622,9 @@ function Ct({
597
622
  /* @__PURE__ */ e(J, { type: "submit", size: "sm", disabled: !p.trim(), children: "Queue" })
598
623
  ] })
599
624
  ] }),
600
- (b ?? []).length > 0 && /* @__PURE__ */ s("div", { className: "space-y-2", children: [
625
+ (h ?? []).length > 0 && /* @__PURE__ */ s("div", { className: "space-y-2", children: [
601
626
  /* @__PURE__ */ e(xe, {}),
602
- (b ?? []).map((r, a) => /* @__PURE__ */ s(
627
+ (h ?? []).map((r, a) => /* @__PURE__ */ s(
603
628
  "div",
604
629
  {
605
630
  className: "flex items-start gap-2.5 rounded-lg border border-dashed border-amber-200/70 bg-amber-50/40 px-3 py-2 dark:border-amber-500/20 dark:bg-amber-500/5",
@@ -611,13 +636,13 @@ function Ct({
611
636
  a
612
637
  ))
613
638
  ] })
614
- ] }) : /* @__PURE__ */ s(ne, { children: [
615
- /* @__PURE__ */ s("form", { onSubmit: pe, className: "space-y-2", children: [
639
+ ] }) : /* @__PURE__ */ s(V, { children: [
640
+ /* @__PURE__ */ s("form", { onSubmit: ue, className: "space-y-2", children: [
616
641
  /* @__PURE__ */ e(
617
- ae,
642
+ re,
618
643
  {
619
644
  value: p,
620
- onChange: g,
645
+ onChange: y,
621
646
  placeholder: "Write a comment…",
622
647
  rows: 3,
623
648
  className: "text-[13px]"
@@ -630,46 +655,46 @@ function Ct({
630
655
  "button",
631
656
  {
632
657
  type: "button",
633
- disabled: !p.trim() || N,
634
- onClick: () => void T(),
658
+ disabled: !p.trim() || R,
659
+ onClick: () => void w(),
635
660
  "data-tip": "✨ Fix grammar & clarity (meaning preserved)",
636
661
  className: "rounded-md border border-slate-200 px-2 py-1 text-[11.5px] text-slate-500 hover:bg-muted disabled:opacity-50 dark:border-border",
637
- children: N ? "…" : "✨ Polish"
662
+ children: R ? "…" : "✨ Polish"
638
663
  }
639
664
  ),
640
- /* @__PURE__ */ e(J, { type: "submit", size: "sm", disabled: !p.trim() || ee.isPending, children: ee.isPending ? "Posting…" : "Comment" })
665
+ /* @__PURE__ */ e(J, { type: "submit", size: "sm", disabled: !p.trim() || te.isPending, children: te.isPending ? "Posting…" : "Comment" })
641
666
  ] })
642
667
  ] })
643
668
  ] }),
644
- w.length > 0 && /* @__PURE__ */ s(
669
+ E.length > 0 && /* @__PURE__ */ s(
645
670
  "p",
646
671
  {
647
672
  className: "flex items-center gap-1.5 text-[11.5px] italic text-slate-400",
648
673
  "data-note-typing": !0,
649
674
  children: [
650
675
  /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 animate-pulse rounded-full bg-nvr-cyan" }),
651
- Be(w, "writing a note"),
676
+ Qe(E, "writing a note"),
652
677
  "…"
653
678
  ]
654
679
  }
655
680
  ),
656
681
  /* @__PURE__ */ e(xe, { className: "my-4" }),
657
- $.length > 0 && /* @__PURE__ */ s("div", { className: "mb-3 flex flex-wrap items-center gap-1.5", "data-notes-filters": !0, children: [
682
+ C.length > 0 && /* @__PURE__ */ s("div", { className: "mb-3 flex flex-wrap items-center gap-1.5", "data-notes-filters": !0, children: [
658
683
  ["people", "system", "integration"].map((r) => {
659
- const a = !H.has(r), u = Ne[r];
684
+ const a = !G.has(r), x = we[r];
660
685
  return /* @__PURE__ */ s(
661
686
  "button",
662
687
  {
663
688
  type: "button",
664
- onClick: () => we(r),
689
+ onClick: () => _e(r),
665
690
  "aria-pressed": a,
666
691
  "data-notes-filter": r,
667
- disabled: u === 0 && a,
692
+ disabled: x === 0 && a,
668
693
  className: `inline-flex items-center gap-1 rounded-full border px-2 py-px text-[11px] font-medium transition-colors ${a ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 text-slate-400 line-through decoration-slate-300 dark:border-border"} disabled:opacity-50`,
669
694
  title: r === "people" ? "Comments and notes people wrote" : r === "system" ? "State changes, change reasons, addendums and imports" : "Events an integration recorded",
670
695
  children: [
671
- et[r],
672
- /* @__PURE__ */ e("span", { className: "tabular-nums text-[10px] opacity-70", children: u })
696
+ rt[r],
697
+ /* @__PURE__ */ e("span", { className: "tabular-nums text-[10px] opacity-70", children: x })
673
698
  ]
674
699
  },
675
700
  r
@@ -678,18 +703,18 @@ function Ct({
678
703
  /* @__PURE__ */ e(
679
704
  "input",
680
705
  {
681
- value: X,
682
- onChange: (r) => ke(r.target.value),
706
+ value: H,
707
+ onChange: (r) => Ne(r.target.value),
683
708
  placeholder: "Search notes…",
684
709
  "aria-label": "Search notes",
685
710
  "data-notes-search": !0,
686
711
  className: "ml-auto h-6 w-[150px] rounded-md border border-slate-200 bg-background px-2 text-[11.5px] dark:border-border"
687
712
  }
688
713
  ),
689
- _e && /* @__PURE__ */ s("span", { className: "text-[10.5px] tabular-nums text-slate-400", "data-notes-shown": !0, children: [
690
- Y.length,
714
+ Ce && /* @__PURE__ */ s("span", { className: "text-[10.5px] tabular-nums text-slate-400", "data-notes-shown": !0, children: [
715
+ ee.length,
691
716
  " of ",
692
- $.length
717
+ C.length
693
718
  ] })
694
719
  ] }),
695
720
  _ ? /* @__PURE__ */ e("div", { className: "space-y-4", children: ["a", "b"].map((r) => /* @__PURE__ */ s("div", { className: "flex gap-3", children: [
@@ -698,36 +723,45 @@ function Ct({
698
723
  /* @__PURE__ */ e("div", { className: "h-3 w-32 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
699
724
  /* @__PURE__ */ e("div", { className: "h-3 w-full animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
700
725
  ] })
701
- ] }, r)) }) : S ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-red-500", children: "Failed to load comments." }) : $.length === 0 ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes yet." }) : Y.length === 0 ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes match — clear the search or turn a filter back on." }) : /* @__PURE__ */ e("div", { className: "nvr-stagger-direct space-y-4", children: Y.map((r) => {
726
+ ] }, r)) }) : j ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-red-500", children: "Failed to load comments." }) : C.length === 0 ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes yet." }) : ee.length === 0 ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes match — clear the search or turn a filter back on." }) : /* @__PURE__ */ e("div", { className: "nvr-stagger-direct space-y-4", children: ee.map((r) => {
702
727
  if (r.kind === "related")
703
728
  return /* @__PURE__ */ e("div", { className: "nvr-section-enter", children: /* @__PURE__ */ e(
704
- nt,
729
+ ot,
705
730
  {
706
731
  note: r.note,
707
732
  collection: t,
708
733
  item: String(i)
709
734
  }
710
735
  ) }, r.note.id);
711
- const a = r.comment, u = E === a.user.id, B = y === a.id;
736
+ const a = r.comment, x = S === a.user.id, K = I === a.id;
712
737
  return /* @__PURE__ */ s("div", { className: "nvr-section-enter group flex gap-3", children: [
713
738
  /* @__PURE__ */ e(
714
- We,
739
+ Xe,
715
740
  {
716
741
  userId: a.user.id,
717
742
  className: "h-8 w-8",
718
- fallback: /* @__PURE__ */ e(He, { className: "h-8 w-8 shrink-0", children: /* @__PURE__ */ e(Xe, { className: "bg-nvr-cyan/15 text-[11px] font-bold text-nvr-navy", children: Ve(a.user) }) })
743
+ fallback: /* @__PURE__ */ e(Je, { className: "h-8 w-8 shrink-0", children: /* @__PURE__ */ e(Ve, { className: "bg-nvr-cyan/15 text-[11px] font-bold text-nvr-navy", children: et(a.user) }) })
719
744
  }
720
745
  ),
721
746
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
722
747
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
723
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800", children: re(a.user) }),
724
- /* @__PURE__ */ e(ze, { label: a.via_agent }),
748
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800", children: ae(a.user) }),
749
+ /* @__PURE__ */ e(We, { label: a.via_agent }),
725
750
  /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: le(a.created_at) }),
726
751
  a.updated_at && a.updated_at !== a.created_at && /* @__PURE__ */ e("span", { className: "text-[10px] text-slate-300", children: "(edited)" }),
727
- !B && /* @__PURE__ */ s(
752
+ a.field && /* @__PURE__ */ e(
753
+ nt,
754
+ {
755
+ field: a.field,
756
+ label: (v == null ? void 0 : v.labelOf(a.field)) ?? Ue(a.field),
757
+ resolved: !!a.resolved_at,
758
+ onJump: v ? () => v.jump(a.field) : void 0
759
+ }
760
+ ),
761
+ !K && /* @__PURE__ */ s(
728
762
  "div",
729
763
  {
730
- className: `ml-auto flex items-center gap-1 transition-opacity group-hover:opacity-100 focus-within:opacity-100 ${z === a.id ? "opacity-100" : "opacity-0"}`,
764
+ className: `ml-auto flex items-center gap-1 transition-opacity group-hover:opacity-100 focus-within:opacity-100 ${Q === a.id ? "opacity-100" : "opacity-0"}`,
731
765
  children: [
732
766
  /* @__PURE__ */ e(
733
767
  "button",
@@ -736,23 +770,23 @@ function Ct({
736
770
  title: "Make a task from this comment",
737
771
  "aria-label": "Make a task from this comment",
738
772
  className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted",
739
- onClick: () => Ce.mutate(a),
740
- children: /* @__PURE__ */ e(Ee, { className: "h-3 w-3" })
773
+ onClick: () => Se.mutate(a),
774
+ children: /* @__PURE__ */ e(qe, { className: "h-3 w-3" })
741
775
  }
742
776
  ),
743
- u && (z === a.id ? /* @__PURE__ */ s(ne, { children: [
777
+ x && (Q === a.id ? /* @__PURE__ */ s(V, { children: [
744
778
  /* @__PURE__ */ e(
745
779
  "button",
746
780
  {
747
781
  type: "button",
748
782
  autoFocus: !0,
749
- disabled: te.isPending,
783
+ disabled: ne.isPending,
750
784
  "data-comment-delete-confirm": a.id,
751
785
  className: "rounded bg-red-600 px-1.5 py-px text-[10.5px] font-medium text-white transition-colors hover:bg-red-700 disabled:opacity-60",
752
- onClick: () => te.mutate(a.id, {
753
- onSettled: () => L(null)
786
+ onClick: () => ne.mutate(a.id, {
787
+ onSettled: () => q(null)
754
788
  }),
755
- children: te.isPending ? "Deleting…" : "Delete comment?"
789
+ children: ne.isPending ? "Deleting…" : "Delete comment?"
756
790
  }
757
791
  ),
758
792
  /* @__PURE__ */ e(
@@ -760,11 +794,11 @@ function Ct({
760
794
  {
761
795
  type: "button",
762
796
  className: "rounded px-1.5 py-px text-[10.5px] font-medium text-slate-500 transition-colors hover:bg-slate-100 dark:hover:bg-muted",
763
- onClick: () => L(null),
797
+ onClick: () => q(null),
764
798
  children: "Keep"
765
799
  }
766
800
  )
767
- ] }) : /* @__PURE__ */ s(ne, { children: [
801
+ ] }) : /* @__PURE__ */ s(V, { children: [
768
802
  /* @__PURE__ */ e(
769
803
  "button",
770
804
  {
@@ -773,9 +807,9 @@ function Ct({
773
807
  "aria-label": "Edit comment",
774
808
  className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700",
775
809
  onClick: () => {
776
- D(a.id), A(a.text);
810
+ A(a.id), n(a.text);
777
811
  },
778
- children: /* @__PURE__ */ e(qe, { className: "h-3 w-3" })
812
+ children: /* @__PURE__ */ e(De, { className: "h-3 w-3" })
779
813
  }
780
814
  ),
781
815
  /* @__PURE__ */ e(
@@ -785,8 +819,8 @@ function Ct({
785
819
  title: "Delete comment",
786
820
  "aria-label": "Delete comment",
787
821
  className: "rounded p-1 text-slate-400 transition-colors hover:bg-red-50 hover:text-red-500",
788
- onClick: () => L(a.id),
789
- children: /* @__PURE__ */ e(De, { className: "h-3 w-3" })
822
+ onClick: () => q(a.id),
823
+ children: /* @__PURE__ */ e(Pe, { className: "h-3 w-3" })
790
824
  }
791
825
  )
792
826
  ] }))
@@ -794,12 +828,12 @@ function Ct({
794
828
  }
795
829
  )
796
830
  ] }),
797
- B ? /* @__PURE__ */ s("div", { className: "mt-1.5 space-y-2", children: [
831
+ K ? /* @__PURE__ */ s("div", { className: "mt-1.5 space-y-2", children: [
798
832
  /* @__PURE__ */ e(
799
- ae,
833
+ re,
800
834
  {
801
- value: q,
802
- onChange: A,
835
+ value: z,
836
+ onChange: n,
803
837
  rows: 3,
804
838
  className: "text-[13px]"
805
839
  }
@@ -810,10 +844,10 @@ function Ct({
810
844
  {
811
845
  size: "sm",
812
846
  className: "h-7 gap-1.5",
813
- disabled: !q.trim() || de.isPending,
814
- onClick: () => de.mutate({ id: a.id, text: q.trim() }),
847
+ disabled: !z.trim() || de.isPending,
848
+ onClick: () => de.mutate({ id: a.id, text: z.trim() }),
815
849
  children: [
816
- /* @__PURE__ */ e(Pe, { className: "h-3 w-3" }),
850
+ /* @__PURE__ */ e(Te, { className: "h-3 w-3" }),
817
851
  " Save"
818
852
  ]
819
853
  }
@@ -825,53 +859,53 @@ function Ct({
825
859
  variant: "outline",
826
860
  className: "h-7 gap-1.5",
827
861
  onClick: () => {
828
- D(null), A("");
862
+ A(null), n("");
829
863
  },
830
864
  children: [
831
- /* @__PURE__ */ e(Re, { className: "h-3 w-3" }),
865
+ /* @__PURE__ */ e(Fe, { className: "h-3 w-3" }),
832
866
  " Cancel"
833
867
  ]
834
868
  }
835
869
  )
836
870
  ] })
837
871
  ] }) : /* @__PURE__ */ e("p", { className: "mt-0.5 whitespace-pre-wrap text-[13px] leading-relaxed text-slate-600", children: /* @__PURE__ */ e(se, { text: a.text }) }),
838
- !B && /* @__PURE__ */ e(Ze, { comment: a }),
839
- !B && /* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-1", children: [
840
- (a.reactions ?? []).map((P) => /* @__PURE__ */ s(
872
+ !K && /* @__PURE__ */ e(tt, { comment: a }),
873
+ !K && /* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-1", children: [
874
+ (a.reactions ?? []).map((T) => /* @__PURE__ */ s(
841
875
  "button",
842
876
  {
843
877
  type: "button",
844
- onClick: () => ce.mutate({ id: a.id, emoji: P.emoji }),
845
- className: `inline-flex items-center gap-1 rounded-full border px-1.5 py-px text-[11px] transition-colors ${P.mine ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-slate-50 text-slate-600 hover:border-slate-300 dark:border-border dark:bg-muted dark:text-slate-300"}`,
878
+ onClick: () => ce.mutate({ id: a.id, emoji: T.emoji }),
879
+ className: `inline-flex items-center gap-1 rounded-full border px-1.5 py-px text-[11px] transition-colors ${T.mine ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-slate-50 text-slate-600 hover:border-slate-300 dark:border-border dark:bg-muted dark:text-slate-300"}`,
846
880
  children: [
847
- P.emoji,
848
- /* @__PURE__ */ e("span", { className: "tabular-nums text-[10px] font-semibold", children: P.count })
881
+ T.emoji,
882
+ /* @__PURE__ */ e("span", { className: "tabular-nums text-[10px] font-semibold", children: T.count })
849
883
  ]
850
884
  },
851
- P.emoji
885
+ T.emoji
852
886
  )),
853
887
  /* @__PURE__ */ s("span", { className: "relative", children: [
854
888
  /* @__PURE__ */ e(
855
889
  "button",
856
890
  {
857
891
  type: "button",
858
- onClick: () => ue(me === a.id ? null : a.id),
892
+ onClick: () => pe(me === a.id ? null : a.id),
859
893
  className: "rounded p-0.5 text-slate-300 transition-colors hover:bg-slate-100 hover:text-slate-500 dark:hover:bg-muted",
860
894
  "aria-label": "Add reaction",
861
895
  children: /* @__PURE__ */ e(ge, { className: "h-3.5 w-3.5" })
862
896
  }
863
897
  ),
864
- me === a.id && /* @__PURE__ */ e("span", { className: "absolute bottom-6 left-0 z-20 flex gap-0.5 rounded-full border border-slate-200 bg-white px-1.5 py-1 shadow-lg dark:border-border dark:bg-popover", children: ye.map((P) => /* @__PURE__ */ e(
898
+ me === a.id && /* @__PURE__ */ e("span", { className: "absolute bottom-6 left-0 z-20 flex gap-0.5 rounded-full border border-slate-200 bg-white px-1.5 py-1 shadow-lg dark:border-border dark:bg-popover", children: ye.map((T) => /* @__PURE__ */ e(
865
899
  "button",
866
900
  {
867
901
  type: "button",
868
902
  onClick: () => {
869
- ce.mutate({ id: a.id, emoji: P }), ue(null);
903
+ ce.mutate({ id: a.id, emoji: T }), pe(null);
870
904
  },
871
905
  className: "rounded-full px-1 text-[14px] hover:bg-muted",
872
- children: P
906
+ children: T
873
907
  },
874
- P
908
+ T
875
909
  )) })
876
910
  ] })
877
911
  ] })
@@ -885,5 +919,6 @@ function Ct({
885
919
  );
886
920
  }
887
921
  export {
888
- Ct as CommentPanel
922
+ Dt as CommentPanel,
923
+ re as MentionTextarea
889
924
  };