@nivaro/react 0.3.8 → 0.3.10

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 (60) hide show
  1. package/dist/components/fields/FileField.js +20 -19
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/replayUploadQueue.js +107 -93
  4. package/dist/hooks/useNivaroForm.js +129 -126
  5. package/dist/hooks/useSessionRecorder.js +103 -101
  6. package/dist/index.d.ts +115 -2
  7. package/dist/index.js +466 -447
  8. package/dist/shared/components/CollectionBrowserView.js +1058 -1059
  9. package/dist/shared/components/ConformanceView.js +36 -35
  10. package/dist/shared/components/DataTable.js +230 -223
  11. package/dist/shared/components/ForceReloadBanner.js +58 -34
  12. package/dist/shared/components/ItemEditForm.js +3687 -3580
  13. package/dist/shared/components/JsonMapEditor.js +18 -17
  14. package/dist/shared/components/MatrixEditor.js +8 -7
  15. package/dist/shared/components/MyWorkView.js +32 -31
  16. package/dist/shared/components/PageRenderer.js +146 -145
  17. package/dist/shared/components/QueryTable.js +49 -49
  18. package/dist/shared/components/RecordGridEditor.js +76 -75
  19. package/dist/shared/components/ai/AiMemorySuggestions.js +15 -14
  20. package/dist/shared/components/ai/AskPanel.js +55 -54
  21. package/dist/shared/components/bulk/BulkActionButtons.js +30 -29
  22. package/dist/shared/components/bulk/PushBulkButtons.js +57 -56
  23. package/dist/shared/components/chat/ChatPanel.js +288 -287
  24. package/dist/shared/components/chat/SlashCommands.js +30 -29
  25. package/dist/shared/components/chat/chat-outbox.js +76 -75
  26. package/dist/shared/components/help-videos/recorder/useLeaveWarning.js +6 -5
  27. package/dist/shared/components/integrations/console/SignalCard.js +124 -123
  28. package/dist/shared/components/integrations/console/SnoozeMenu.js +24 -23
  29. package/dist/shared/components/item-edit/CloneDialog.js +85 -78
  30. package/dist/shared/components/item-edit/InlineTableField.js +301 -300
  31. package/dist/shared/components/item-edit/MembershipSetField.js +24 -23
  32. package/dist/shared/components/item-edit/QuickCreateButton.js +8 -7
  33. package/dist/shared/components/item-edit/RecordLiveSync.js +101 -100
  34. package/dist/shared/components/item-edit/staged-links.js +86 -0
  35. package/dist/shared/components/layout-editor/LayoutEditor.js +275 -274
  36. package/dist/shared/components/layout-editor/editors/cascade-rule-row.js +18 -17
  37. package/dist/shared/components/layout-editor/inspector/HelpTab.js +37 -36
  38. package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +50 -49
  39. package/dist/shared/components/panels/CommentPanel.js +237 -236
  40. package/dist/shared/components/profile/AiMemoryCard.js +15 -14
  41. package/dist/shared/components/profile/PersonAdminTools.js +70 -67
  42. package/dist/shared/components/profile/usePersonPresence.js +42 -37
  43. package/dist/shared/components/queue/QueueItemSheet.js +36 -35
  44. package/dist/shared/components/queue/QueueWorklist.js +597 -598
  45. package/dist/shared/lib/client-version.js +63 -0
  46. package/dist/shared/lib/force-reload.js +36 -0
  47. package/dist/shared/lib/load-error.js +11 -10
  48. package/dist/shared/lib/presence-live.js +73 -0
  49. package/dist/shared/lib/presence-state.js +39 -31
  50. package/dist/shared/lib/record-outbox.js +76 -75
  51. package/dist/shared/lib/request-gate.js +120 -102
  52. package/dist/shared/lib/rum.js +45 -36
  53. package/dist/shared/lib/safe-error.js +39 -0
  54. package/dist/shared/lib/server-clock.js +11 -7
  55. package/dist/shared/lib/signed-out.js +114 -0
  56. package/dist/shared/lib/socket-realtime.js +19 -17
  57. package/dist/shared/lib/unsaved-work.js +62 -0
  58. package/dist/shared/lib/use-online-users.js +11 -10
  59. package/dist/shared/lib/worker-socket.js +89 -79
  60. package/package.json +1 -1
@@ -4,7 +4,8 @@ import { Loader2 as W } from "lucide-react";
4
4
  import { useState as f, useEffect as le, useMemo as A } from "react";
5
5
  import { useNivaroClient as se } from "../context.js";
6
6
  import { get as z, post as B, patch as ae } from "../lib/commands.js";
7
- import { RelationCombobox as ne } from "./item-edit/RelationCombobox.js";
7
+ import { userErrorMessage as ne } from "../lib/safe-error.js";
8
+ import { RelationCombobox as oe } from "./item-edit/RelationCombobox.js";
8
9
  function w(t, o) {
9
10
  return typeof t == "string" && t.startsWith("$scope.") ? o[t.slice(7)] : Array.isArray(t) ? t.map((m) => w(m, o)) : t && typeof t == "object" ? Object.fromEntries(
10
11
  Object.entries(t).map(([m, h]) => [m, w(h, o)])
@@ -13,7 +14,7 @@ function w(t, o) {
13
14
  function _(t) {
14
15
  return t === void 0 ? !0 : Array.isArray(t) ? t.some(_) : t && typeof t == "object" ? Object.values(t).some(_) : !1;
15
16
  }
16
- function oe(t, o) {
17
+ function ie(t, o) {
17
18
  return t.replace(/\{\{\s*([\w.]+)\s*\}\}/g, (m, h) => {
18
19
  let d = o;
19
20
  for (const u of h.split(".")) {
@@ -23,15 +24,15 @@ function oe(t, o) {
23
24
  return d == null ? "" : String(d);
24
25
  });
25
26
  }
26
- function ie(t) {
27
+ function de(t) {
27
28
  return [...t.matchAll(/\{\{\s*([\w.]+)\s*\}\}/g)].map((o) => o[1]);
28
29
  }
29
- function xe({
30
+ function Ne({
30
31
  config: t,
31
32
  scope: o
32
33
  }) {
33
34
  var U;
34
- const m = se(), h = re(), d = t.label_field ?? "name", [u, j] = f(null), [S, K] = f(""), [x, q] = f(null), [c, L] = f(!1), [$, C] = f({}), [O, F] = f({}), [Q, E] = f(!1), [M, y] = f(null), G = JSON.stringify(o), D = w(t.record_filter, o), H = D && !_(D) ? D : void 0, { data: p } = V({
35
+ const m = se(), h = re(), d = t.label_field ?? "name", [u, j] = f(null), [S, K] = f(""), [x, q] = f(null), [c, L] = f(!1), [$, C] = f({}), [O, F] = f({}), [M, Q] = f(!1), [E, y] = f(null), G = JSON.stringify(o), D = w(t.record_filter, o), H = D && !_(D) ? D : void 0, { data: p } = V({
35
36
  queryKey: ["json-map-record", t.collection, u],
36
37
  queryFn: () => m.request(z(`/items/${t.collection}/${u}`)).then((e) => e.data ?? null),
37
38
  enabled: u != null && !c
@@ -49,7 +50,7 @@ function xe({
49
50
  queryFn: async () => {
50
51
  const e = [];
51
52
  for (let r = 0; r < t.sections.length; r++) {
52
- const l = t.sections[r], s = ie(l.label_template), n = w(l.filter, o), b = n && !_(n) ? n : void 0, k = await m.request(
53
+ const l = t.sections[r], s = de(l.label_template), n = w(l.filter, o), b = n && !_(n) ? n : void 0, k = await m.request(
53
54
  z(`/items/${l.collection}`, {
54
55
  limit: 1e3,
55
56
  fields: ["id", ...s].join(","),
@@ -67,7 +68,7 @@ function xe({
67
68
  for (const r of J.data ?? []) {
68
69
  const l = t.sections[r.section], s = r.rows.map((n) => ({
69
70
  key: String(n.id),
70
- label: oe(l.label_template, n) || `#${n.id}`,
71
+ label: ie(l.label_template, n) || `#${n.id}`,
71
72
  section: l.section_label ?? null
72
73
  })).sort((n, b) => n.label.localeCompare(b.label));
73
74
  e.push(...s);
@@ -104,7 +105,7 @@ function xe({
104
105
  y(`${d} is required`);
105
106
  return;
106
107
  }
107
- E(!0), y(null);
108
+ Q(!0), y(null);
108
109
  try {
109
110
  const r = {};
110
111
  for (const s of t.fields ?? []) {
@@ -136,9 +137,9 @@ function xe({
136
137
  predicate: (s) => JSON.stringify(s.queryKey).includes(t.collection)
137
138
  }), y("Saved");
138
139
  } catch (r) {
139
- y(`Save failed: ${r instanceof Error ? r.message : "unknown error"}`);
140
+ y(`Save failed: ${ne(r, "unknown error")}`);
140
141
  } finally {
141
- E(!1);
142
+ Q(!1);
142
143
  }
143
144
  }
144
145
  const ee = A(() => {
@@ -162,7 +163,7 @@ function xe({
162
163
  className: "h-9 w-full rounded-md border border-slate-200 bg-white px-2.5 text-[13px] outline-none focus:border-nvr-cyan dark:border-border dark:bg-background"
163
164
  }
164
165
  ) : /* @__PURE__ */ a(
165
- ne,
166
+ oe,
166
167
  {
167
168
  collection: t.collection,
168
169
  value: u ?? null,
@@ -212,11 +213,11 @@ function xe({
212
213
  "button",
213
214
  {
214
215
  type: "button",
215
- disabled: !P || !Y || Q || v !== null && v < 0,
216
+ disabled: !P || !Y || M || v !== null && v < 0,
216
217
  onClick: () => void Z(),
217
218
  className: "inline-flex h-9 items-center gap-1.5 rounded-md bg-nvr-cyan px-3 text-[13px] font-medium text-white hover:brightness-110 disabled:opacity-50",
218
219
  children: [
219
- Q && /* @__PURE__ */ a(W, { className: "h-3.5 w-3.5 animate-spin" }),
220
+ M && /* @__PURE__ */ a(W, { className: "h-3.5 w-3.5 animate-spin" }),
220
221
  "Save"
221
222
  ]
222
223
  }
@@ -226,7 +227,7 @@ function xe({
226
227
  ": ",
227
228
  v
228
229
  ] }),
229
- M && /* @__PURE__ */ a("span", { className: "pb-2 text-[12px] text-slate-500", children: M })
230
+ E && /* @__PURE__ */ a("span", { className: "pb-2 text-[12px] text-slate-500", children: E })
230
231
  ] }),
231
232
  P ? J.isLoading ? /* @__PURE__ */ i("div", { className: "flex items-center gap-2 text-[12px] text-slate-400", children: [
232
233
  /* @__PURE__ */ a(W, { className: "h-4 w-4 animate-spin" }),
@@ -244,7 +245,7 @@ function xe({
244
245
  ))
245
246
  ] }) }),
246
247
  /* @__PURE__ */ a("tbody", { children: ee.map((e, r) => /* @__PURE__ */ a(
247
- de,
248
+ ce,
248
249
  {
249
250
  header: e.section ? /* @__PURE__ */ a("tr", { className: "border-b border-slate-200 bg-slate-100/80 dark:border-border dark:bg-muted", children: /* @__PURE__ */ a(
250
251
  "td",
@@ -286,7 +287,7 @@ function xe({
286
287
  ] }) }) : /* @__PURE__ */ a("p", { className: "text-[12px] text-slate-400", children: "Pick a record or create a new one." })
287
288
  ] });
288
289
  }
289
- function de({
290
+ function ce({
290
291
  header: t,
291
292
  children: o
292
293
  }) {
@@ -296,5 +297,5 @@ function de({
296
297
  ] });
297
298
  }
298
299
  export {
299
- xe as JsonMapEditor
300
+ Ne as JsonMapEditor
300
301
  };
@@ -5,9 +5,10 @@ import { useState as ee, useRef as Pe, useEffect as he, useMemo as N } from "rea
5
5
  import { useNivaroClient as lt } from "../context.js";
6
6
  import { get as te, post as Be, patch as at } from "../lib/commands.js";
7
7
  import { evaluateNumeric as nt } from "../lib/expression.js";
8
+ import { userErrorMessage as ot } from "../lib/safe-error.js";
8
9
  import { cn as $ } from "../lib/utils.js";
9
- import { RelationCombobox as ot } from "./item-edit/RelationCombobox.js";
10
- import { colorPair as it } from "./QueryTable.js";
10
+ import { RelationCombobox as it } from "./item-edit/RelationCombobox.js";
11
+ import { colorPair as ct } from "./QueryTable.js";
11
12
  const W = "__uncat__", J = "__bucket__";
12
13
  function xe(t, y) {
13
14
  if (!t) return;
@@ -46,7 +47,7 @@ function O(t, y) {
46
47
  const w = Number(t);
47
48
  return t == null || t === "" || !Number.isFinite(w) ? "—" : y === "currency" ? w.toLocaleString("en-US", { style: "currency", currency: "USD" }) : w.toLocaleString("en-US", { maximumFractionDigits: 2 });
48
49
  }
49
- function yt({
50
+ function vt({
50
51
  config: t,
51
52
  initialScope: y,
52
53
  lockScope: w = !1
@@ -352,7 +353,7 @@ function yt({
352
353
  }
353
354
  V({}), await v.invalidateQueries({ queryKey: ["matrix-targets", t.target_collection] }), ie(`Saved — ${e} updated, ${s} created`);
354
355
  } catch (l) {
355
- ie(`Save failed: ${l instanceof Error ? l.message : "unknown error"}`);
356
+ ie(`Save failed: ${ot(l, "unknown error")}`);
356
357
  } finally {
357
358
  we(!1);
358
359
  }
@@ -362,7 +363,7 @@ function yt({
362
363
  const G = "text-[color:var(--qtc)] dark:text-[color:var(--qtcd)]", U = (e, s, r) => {
363
364
  const a = r && typeof s == "number" && s < 0 ? r : e;
364
365
  if (!a) return;
365
- const [o, n] = it(a);
366
+ const [o, n] = ct(a);
366
367
  return { "--qtc": o, "--qtcd": n };
367
368
  }, me = t.value_color ?? "info", Q = ((Je = t.metrics) == null ? void 0 : Je.unmatched) === !1 ? null : ((Ve = t.metrics) == null ? void 0 : Ve.unmatched) ?? {}, M = N(() => {
368
369
  var i, b;
@@ -592,7 +593,7 @@ function yt({
592
593
  return /* @__PURE__ */ f("div", { className: "w-56", children: [
593
594
  /* @__PURE__ */ d("p", { className: "mb-1 text-[11px] font-medium text-slate-500 dark:text-slate-400", children: Ee(e) }),
594
595
  /* @__PURE__ */ d(
595
- ot,
596
+ it,
596
597
  {
597
598
  collection: e.collection,
598
599
  value: x[e.field] ?? null,
@@ -851,5 +852,5 @@ function He({
851
852
  ] });
852
853
  }
853
854
  export {
854
- yt as MatrixEditor
855
+ vt as MatrixEditor
855
856
  };
@@ -6,40 +6,41 @@ import { useLiveEvent as ue } from "../lib/live.js";
6
6
  import { useLiveOps as pe, useFreshIds as be } from "../lib/live-ops.js";
7
7
  import { resolveNotificationTarget as Z, runNotificationTarget as xe } from "../lib/notification-target.js";
8
8
  import { useOptionalRealtime as he } from "../lib/realtime.js";
9
- import { withinDay as G, slaChip as ge } from "../lib/sla-chip.js";
9
+ import { userErrorMessage as ge } from "../lib/safe-error.js";
10
+ import { withinDay as G, slaChip as fe } from "../lib/sla-chip.js";
10
11
  import { cn as A } from "../lib/utils.js";
11
- import { FirstWeekCard as fe } from "./ai/FirstWeekCard.js";
12
- import { TaskDoButton as ke } from "./ai/TaskDo.js";
13
- import { openChatRoom as ye, canOpenChatRoom as Ne } from "./chat/chat-core.js";
14
- import { useMyRecordRooms as we } from "./chat/chat-hooks.js";
15
- import { LearningPathCard as ve } from "./help-videos/viewer/LearningPathCard.js";
16
- import { RequiredVideosCard as _e } from "./help-videos/viewer/RequiredVideosCard.js";
17
- import { TickerNumber as Ce } from "./TickerNumber.js";
18
- import { UserAvatar as $e } from "./UserAvatar.js";
19
- const Se = 8e3, X = ["records", "tasks", "team", "waiting", "notifications"], Te = {
12
+ import { FirstWeekCard as ke } from "./ai/FirstWeekCard.js";
13
+ import { TaskDoButton as ye } from "./ai/TaskDo.js";
14
+ import { openChatRoom as Ne, canOpenChatRoom as we } from "./chat/chat-core.js";
15
+ import { useMyRecordRooms as ve } from "./chat/chat-hooks.js";
16
+ import { LearningPathCard as _e } from "./help-videos/viewer/LearningPathCard.js";
17
+ import { RequiredVideosCard as Ce } from "./help-videos/viewer/RequiredVideosCard.js";
18
+ import { TickerNumber as $e } from "./TickerNumber.js";
19
+ import { UserAvatar as Se } from "./UserAvatar.js";
20
+ const Te = 8e3, X = ["records", "tasks", "team", "waiting", "notifications"], je = {
20
21
  records: "Waiting on you",
21
22
  tasks: "My tasks",
22
23
  team: "Team tasks",
23
24
  waiting: "Waiting on others",
24
25
  notifications: "Notifications"
25
- }, je = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), M = (l) => !!l && String(l).slice(0, 10) < je(), Ae = {
26
+ }, Ae = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), M = (l) => !!l && String(l).slice(0, 10) < Ae(), Me = {
26
27
  alert: "bg-red-500/10 text-red-600 dark:text-red-400",
27
28
  warn: "bg-amber-400/15 text-amber-700 dark:text-amber-400",
28
29
  neutral: "bg-slate-500/10 text-slate-600 dark:text-slate-400",
29
30
  ok: "bg-emerald-500/10 text-emerald-700 dark:text-emerald-400"
30
31
  };
31
- function Me({ sla: l }) {
32
- const c = ge(l);
32
+ function Oe({ sla: l }) {
33
+ const c = fe(l);
33
34
  return c ? /* @__PURE__ */ e(
34
35
  "span",
35
36
  {
36
37
  "data-sla-chip": c.tone,
37
- className: `rounded px-1.5 py-0.5 text-[10px] font-semibold tabular-nums ${Ae[c.tone]}`,
38
+ className: `rounded px-1.5 py-0.5 text-[10px] font-semibold tabular-nums ${Me[c.tone]}`,
38
39
  children: c.label
39
40
  }
40
41
  ) : null;
41
42
  }
42
- function Oe({ state: l, color: c }) {
43
+ function De({ state: l, color: c }) {
43
44
  return l ? /* @__PURE__ */ e(
44
45
  "span",
45
46
  {
@@ -55,10 +56,10 @@ function Oe({ state: l, color: c }) {
55
56
  function O({ label: l, value: c, tone: u }) {
56
57
  return /* @__PURE__ */ s("div", { className: "rounded-lg border border-slate-200 bg-white p-3 dark:border-border dark:bg-card", children: [
57
58
  /* @__PURE__ */ e("p", { className: "text-[10.5px] uppercase tracking-wide text-muted-foreground", children: l }),
58
- /* @__PURE__ */ e("p", { className: `mt-0.5 text-[18px] font-semibold tabular-nums ${u ?? ""}`, children: /* @__PURE__ */ e(Ce, { value: c }) })
59
+ /* @__PURE__ */ e("p", { className: `mt-0.5 text-[18px] font-semibold tabular-nums ${u ?? ""}`, children: /* @__PURE__ */ e($e, { value: c }) })
59
60
  ] });
60
61
  }
61
- function Xe({
62
+ function et({
62
63
  notificationRoutes: l,
63
64
  onOpenPath: c
64
65
  } = {}) {
@@ -99,7 +100,7 @@ function Xe({
99
100
  }), z = q(0), g = q(null), J = () => {
100
101
  const t = () => {
101
102
  g.current = null, z.current = Date.now(), C(!1), h.invalidateQueries({ queryKey: ["my-work"] });
102
- }, d = z.current + Se - Date.now();
103
+ }, d = z.current + Te - Date.now();
103
104
  g.current || (d <= 0 ? t() : g.current = setTimeout(t, d));
104
105
  };
105
106
  pe("my-work", J, { debounceMs: 1500 }), ue("notification:new", J, { debounceMs: 1500 }), E(
@@ -149,7 +150,7 @@ function Xe({
149
150
  onSuccess: (t) => {
150
151
  I(t === "claim" ? "It’s yours — it moved to My tasks." : "Reminder sent."), h.invalidateQueries({ queryKey: ["my-work"] });
151
152
  },
152
- onError: (t) => I(t instanceof Error ? t.message : "Failed")
153
+ onError: (t) => I(ge(t, "Failed"))
153
154
  }), [T, I] = N(null);
154
155
  E(() => {
155
156
  if (!T) return;
@@ -187,7 +188,7 @@ function Xe({
187
188
  ...l
188
189
  });
189
190
  return de || !a ? /* @__PURE__ */ e("div", { className: "grid grid-cols-4 gap-3 p-6", children: [1, 2, 3, 4].map((t) => /* @__PURE__ */ e("div", { className: "h-16 animate-pulse rounded-lg bg-[hsl(var(--nvr-skeleton))]" }, t)) }) : /* @__PURE__ */ s("div", { className: "space-y-5 p-6", "data-my-work": !0, children: [
190
- /* @__PURE__ */ e(fe, { onOpenPath: c }),
191
+ /* @__PURE__ */ e(ke, { onOpenPath: c }),
191
192
  /* @__PURE__ */ s("div", { className: "flex items-start justify-between", children: [
192
193
  /* @__PURE__ */ s("div", { className: "grid flex-1 grid-cols-2 gap-3 lg:grid-cols-4", children: [
193
194
  /* @__PURE__ */ e(O, { label: "Waiting on you", value: a.counts.owned }),
@@ -241,7 +242,7 @@ function Xe({
241
242
  te && /* @__PURE__ */ s("div", { className: "absolute right-0 top-full z-20 mt-1 w-56 rounded-lg border border-slate-200 bg-white p-2 shadow-lg dark:border-border dark:bg-card", children: [
242
243
  /* @__PURE__ */ e("p", { className: "px-1 pb-1.5 text-[11px] font-semibold text-slate-500", children: "Sections" }),
243
244
  x.order.map((t, d) => {
244
- const b = Te[t] ?? t, i = x.hidden.includes(t), m = (r) => {
245
+ const b = je[t] ?? t, i = x.hidden.includes(t), m = (r) => {
245
246
  const p = [...x.order], n = d + r;
246
247
  n < 0 || n >= p.length || ([p[d], p[n]] = [p[n], p[d]], K({ ...x, order: p }));
247
248
  };
@@ -300,8 +301,8 @@ function Xe({
300
301
  children: T
301
302
  }
302
303
  ),
304
+ /* @__PURE__ */ e(Ce, { className: "mb-4" }),
303
305
  /* @__PURE__ */ e(_e, { className: "mb-4" }),
304
- /* @__PURE__ */ e(ve, { className: "mb-4" }),
305
306
  (() => {
306
307
  const t = {
307
308
  records: () => {
@@ -350,8 +351,8 @@ function Xe({
350
351
  children: [
351
352
  /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[12.5px] font-medium", children: o.label }),
352
353
  /* @__PURE__ */ e("span", { className: "hidden text-[11px] text-muted-foreground sm:inline", children: o.collection.replace(/_/g, " ") }),
353
- /* @__PURE__ */ e(Oe, { state: o.state, color: o.state_color }),
354
- /* @__PURE__ */ e(Me, { sla: o.sla })
354
+ /* @__PURE__ */ e(De, { state: o.state, color: o.state_color }),
355
+ /* @__PURE__ */ e(Oe, { sla: o.sla })
355
356
  ]
356
357
  }
357
358
  )
@@ -393,7 +394,7 @@ function Xe({
393
394
  }
394
395
  ),
395
396
  /* @__PURE__ */ e(
396
- ke,
397
+ ye,
397
398
  {
398
399
  task: r,
399
400
  isAssignee: !0,
@@ -562,7 +563,7 @@ function Xe({
562
563
  className: A("flex items-start gap-2.5 px-4 py-2", f(`n:${r.id}`)),
563
564
  children: [
564
565
  /* @__PURE__ */ e(
565
- $e,
566
+ Se,
566
567
  {
567
568
  userId: r.sender,
568
569
  className: "mt-0.5 h-5 w-5",
@@ -613,11 +614,11 @@ function Xe({
613
614
  }
614
615
  return i;
615
616
  })(),
616
- /* @__PURE__ */ e(De, {})
617
+ /* @__PURE__ */ e(Fe, {})
617
618
  ] });
618
619
  }
619
- function De() {
620
- const l = Ne(), { rooms: c } = we(l);
620
+ function Fe() {
621
+ const l = we(), { rooms: c } = ve(l);
621
622
  return !l || c.length === 0 ? null : /* @__PURE__ */ s(
622
623
  "section",
623
624
  {
@@ -629,7 +630,7 @@ function De() {
629
630
  "button",
630
631
  {
631
632
  type: "button",
632
- onClick: () => ye(u.room, u.label),
633
+ onClick: () => Ne(u.room, u.label),
633
634
  className: "flex w-full items-center gap-2.5 px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-muted/40",
634
635
  "data-my-work-chat-room": u.room,
635
636
  children: [
@@ -650,5 +651,5 @@ function De() {
650
651
  );
651
652
  }
652
653
  export {
653
- Xe as MyWorkView
654
+ et as MyWorkView
654
655
  };