@nivaro/react 0.3.139 → 0.3.140

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 (87) hide show
  1. package/dist/components/InlineGridField.js +95 -92
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +36 -2
  4. package/dist/shared/components/AudienceConfirmPanel.js +19 -19
  5. package/dist/shared/components/BroadcastView.js +213 -211
  6. package/dist/shared/components/CollectionBrowserView.js +2677 -2658
  7. package/dist/shared/components/ConfigHistory.js +45 -45
  8. package/dist/shared/components/ConformanceView.js +110 -110
  9. package/dist/shared/components/DataTable.js +51 -51
  10. package/dist/shared/components/FilePreviewLightbox.js +26 -25
  11. package/dist/shared/components/ItemEditForm.js +3038 -3027
  12. package/dist/shared/components/LiveCount.js +27 -23
  13. package/dist/shared/components/LiveTraceView.js +62 -61
  14. package/dist/shared/components/PageRenderer.js +422 -410
  15. package/dist/shared/components/ProfileView.js +199 -199
  16. package/dist/shared/components/QualityRulesView.js +70 -70
  17. package/dist/shared/components/QueryTable.js +131 -130
  18. package/dist/shared/components/RecordGraph.js +98 -98
  19. package/dist/shared/components/RecordReadView.js +287 -288
  20. package/dist/shared/components/ReportView.js +1279 -1259
  21. package/dist/shared/components/SlaRulesView.js +73 -74
  22. package/dist/shared/components/WidgetSlot.js +73 -73
  23. package/dist/shared/components/ai/AiChart.js +36 -32
  24. package/dist/shared/components/ai/AiMarkdown.js +136 -129
  25. package/dist/shared/components/ai/TaskDo.js +87 -87
  26. package/dist/shared/components/ai/answer-formats.js +37 -30
  27. package/dist/shared/components/ai/call-log/format.js +17 -16
  28. package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
  29. package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
  30. package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
  31. package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
  32. package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
  33. package/dist/shared/components/bulk/bulk-field-options.js +10 -10
  34. package/dist/shared/components/cbv/column-totals.js +53 -51
  35. package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
  36. package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
  37. package/dist/shared/components/command-center/announce.js +7 -6
  38. package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
  39. package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
  40. package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
  41. package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
  42. package/dist/shared/components/imports/RunDetailSheet.js +1 -1
  43. package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
  44. package/dist/shared/components/integrations/console/EventsView.js +35 -35
  45. package/dist/shared/components/integrations/console/FirefightView.js +15 -14
  46. package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
  47. package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
  48. package/dist/shared/components/integrations/console/SignalCard.js +67 -67
  49. package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
  50. package/dist/shared/components/item-edit/ChangesTray.js +88 -74
  51. package/dist/shared/components/item-edit/FilePickerField.js +123 -123
  52. package/dist/shared/components/item-edit/GroupSection.js +301 -292
  53. package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
  54. package/dist/shared/components/item-edit/InlineGridField.js +45 -36
  55. package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
  56. package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
  57. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
  58. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
  59. package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
  60. package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
  61. package/dist/shared/components/ops-report/format.js +37 -36
  62. package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
  63. package/dist/shared/components/panels/RevisionsPanel.js +306 -305
  64. package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
  65. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
  66. package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
  67. package/dist/shared/components/pipeline/TeamsView.js +189 -130
  68. package/dist/shared/components/profile/AgentsPanel.js +6 -6
  69. package/dist/shared/components/profile/DelegationCard.js +13 -12
  70. package/dist/shared/components/profile/PersonActivity.js +48 -48
  71. package/dist/shared/components/profile/PersonExtras.js +107 -107
  72. package/dist/shared/components/profile/PersonWeek.js +9 -9
  73. package/dist/shared/components/queue/QueueBulkBar.js +19 -18
  74. package/dist/shared/components/queue/QueueBulkMove.js +21 -20
  75. package/dist/shared/components/queue/QueueItemSheet.js +136 -131
  76. package/dist/shared/components/queue/QueueWorklist.js +671 -670
  77. package/dist/shared/components/queue/worklist-helpers.js +36 -21
  78. package/dist/shared/components/support/RequestList.js +121 -121
  79. package/dist/shared/components/support/SupportAnalytics.js +29 -29
  80. package/dist/shared/lib/activity-sentence.js +251 -229
  81. package/dist/shared/lib/format-value.js +5 -4
  82. package/dist/shared/lib/number-format.js +87 -0
  83. package/dist/shared/lib/number-kind.js +133 -0
  84. package/dist/shared/lib/utils.js +24 -20
  85. package/dist/shared/lib/watch-list.js +1 -1
  86. package/dist/shared/lib/widget-value-format.js +26 -12
  87. package/package.json +1 -1
@@ -1,54 +1,58 @@
1
1
  import { jsxs as x, jsx as y } from "react/jsx-runtime";
2
- import { useRef as o, useState as h, useLayoutEffect as E, useEffect as A } from "react";
3
- import { liveMotionAllowed as v } from "../lib/live-preference.js";
2
+ import { useRef as o, useState as h, useLayoutEffect as E, useEffect as b } from "react";
3
+ import { liveMotionAllowed as A } from "../lib/live-preference.js";
4
+ import { formatNumber as v } from "../lib/utils.js";
4
5
  const s = 220;
5
6
  function w() {
6
- return !v();
7
+ return !A();
7
8
  }
8
- function M(r) {
9
- return r == null ? "" : String(r);
9
+ function M(i) {
10
+ return i == null ? "" : String(i);
10
11
  }
11
- function b({ value: r, format: a, className: g }) {
12
- const e = M(r), l = o(e), [n, u] = h(null), f = o(null), d = o(null), p = o(0);
12
+ function j({ value: i, format: a, className: g }) {
13
+ const n = M(i), l = o(n), [r, u] = h(null), f = o(null), d = o(null), m = o(0);
13
14
  E(() => {
14
15
  const t = l.current;
15
- if (l.current = e, t === e || t === "" || e === "" || w()) {
16
+ if (l.current = n, t === n || t === "" || n === "" || w()) {
16
17
  u(null);
17
18
  return;
18
19
  }
19
- p.current += 1, u({ text: t, id: p.current });
20
- const i = f.current;
21
- i && typeof i.animate == "function" && i.animate([{ opacity: 0 }, { opacity: 1 }], { duration: s, easing: "ease-out" });
22
- }, [e]), A(() => {
23
- if (!n) return;
20
+ m.current += 1, u({ text: t, id: m.current });
21
+ const e = f.current;
22
+ e && typeof e.animate == "function" && e.animate([{ opacity: 0 }, { opacity: 1 }], { duration: s, easing: "ease-out" });
23
+ }, [n]), b(() => {
24
+ if (!r) return;
24
25
  const t = d.current;
25
26
  t && typeof t.animate == "function" && t.animate([{ opacity: 1 }, { opacity: 0 }], {
26
27
  duration: s,
27
28
  easing: "ease-out",
28
29
  fill: "forwards"
29
30
  });
30
- const i = setTimeout(
31
- () => u((c) => c && c.id === n.id ? null : c),
31
+ const e = setTimeout(
32
+ () => u((c) => c && c.id === r.id ? null : c),
32
33
  s + 30
33
34
  );
34
- return () => clearTimeout(i);
35
- }, [n]);
36
- const m = (t) => a && t !== "" ? a(/^-?\d+(\.\d+)?$/.test(t) ? Number(t) : t) : t;
37
- return /* @__PURE__ */ x("span", { className: g, style: { display: "inline-grid" }, "data-live-count": e, children: [
38
- n && /* @__PURE__ */ y(
35
+ return () => clearTimeout(e);
36
+ }, [r]);
37
+ const p = (t) => {
38
+ const e = /^-?\d+(\.\d+)?$/.test(t);
39
+ return a && t !== "" ? a(e ? Number(t) : t) : e ? v(Number(t)) : t;
40
+ };
41
+ return /* @__PURE__ */ x("span", { className: g, style: { display: "inline-grid" }, "data-live-count": n, children: [
42
+ r && /* @__PURE__ */ y(
39
43
  "span",
40
44
  {
41
45
  ref: d,
42
46
  "aria-hidden": "true",
43
47
  style: { gridArea: "1 / 1", pointerEvents: "none", opacity: 0 },
44
- children: m(n.text)
48
+ children: p(r.text)
45
49
  }
46
50
  ),
47
- /* @__PURE__ */ y("span", { ref: f, style: { gridArea: "1 / 1" }, children: m(e) })
51
+ /* @__PURE__ */ y("span", { ref: f, style: { gridArea: "1 / 1" }, children: p(n) })
48
52
  ] });
49
53
  }
50
54
  export {
51
- b as LiveCount,
55
+ j as LiveCount,
52
56
  M as countText,
53
57
  w as reducedMotion
54
58
  };
@@ -1,40 +1,40 @@
1
- import { jsxs as a, jsx as e, Fragment as N } from "react/jsx-runtime";
2
- import { useQuery as j } from "@tanstack/react-query";
3
- import { Loader2 as w, RefreshCw as E, CheckCircle2 as _, TriangleAlert as q } from "lucide-react";
4
- import { useState as A, useMemo as S } from "react";
5
- import { useNivaroClient as C } from "../context.js";
6
- import { get as R } from "../lib/commands.js";
7
- import { cn as T } from "../lib/utils.js";
8
- import { ErrorNotice as W } from "./ErrorNotice.js";
9
- import { SimpleSelectXs as F } from "./ui/SimpleSelect.js";
10
- const D = /* @__PURE__ */ new Set(["changed", "updated_at", "date_updated", "user_updated"]), O = {
1
+ import { jsxs as a, jsx as e, Fragment as k } from "react/jsx-runtime";
2
+ import { useQuery as E } from "@tanstack/react-query";
3
+ import { Loader2 as _, RefreshCw as q, CheckCircle2 as S, TriangleAlert as A } from "lucide-react";
4
+ import { useState as C, useMemo as T } from "react";
5
+ import { useNivaroClient as R } from "../context.js";
6
+ import { get as W } from "../lib/commands.js";
7
+ import { formatNumber as u, cn as L } from "../lib/utils.js";
8
+ import { ErrorNotice as F } from "./ErrorNotice.js";
9
+ import { SimpleSelectXs as D } from "./ui/SimpleSelect.js";
10
+ const O = /* @__PURE__ */ new Set(["changed", "updated_at", "date_updated", "user_updated"]), P = {
11
11
  $state: "step",
12
12
  $related: "linked records",
13
13
  $comments: "comments",
14
14
  $tasks: "tasks",
15
15
  $files: "files"
16
16
  };
17
- function P(l) {
17
+ function B(l) {
18
18
  const s = [], d = [];
19
19
  for (const h of l)
20
- if (!D.has(h))
20
+ if (!O.has(h))
21
21
  if (h.startsWith("$")) {
22
- const p = O[h] ?? h.slice(1).replace(/_/g, " ");
22
+ const p = P[h] ?? h.slice(1).replace(/_/g, " ");
23
23
  d.includes(p) || d.push(p);
24
24
  } else s.push(h);
25
25
  return { names: s, aspects: d };
26
26
  }
27
- const B = [
27
+ const I = [
28
28
  { value: "15", label: "Last 15 minutes", minutes: 15 },
29
29
  { value: "60", label: "Last hour", minutes: 60 },
30
30
  { value: "360", label: "Last 6 hours", minutes: 360 },
31
31
  { value: "1440", label: "Last 24 hours", minutes: 1440 }
32
- ], I = {
32
+ ], K = {
33
33
  activity: "Saved through the app",
34
34
  "raw-pending": "Waiting to be announced",
35
35
  "row-timestamp": "Row changed, no activity entry"
36
36
  };
37
- function k(l) {
37
+ function y(l) {
38
38
  const s = new Date(l);
39
39
  return Number.isNaN(s.getTime()) ? l : s.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit", second: "2-digit" });
40
40
  }
@@ -49,46 +49,46 @@ function m({
49
49
  return /* @__PURE__ */ a("section", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
50
50
  /* @__PURE__ */ a("header", { className: "flex items-center gap-2 border-b border-slate-100 px-3 py-2 dark:border-border/60", children: [
51
51
  /* @__PURE__ */ e("h4", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: l }),
52
- s != null && /* @__PURE__ */ e("span", { className: "rounded-full bg-slate-100 px-1.5 text-[10.5px] tabular-nums text-slate-600 dark:bg-slate-800 dark:text-slate-300", children: s })
52
+ s != null && /* @__PURE__ */ e("span", { className: "rounded-full bg-slate-100 px-1.5 text-[10.5px] tabular-nums text-slate-600 dark:bg-slate-800 dark:text-slate-300", children: u(s) })
53
53
  ] }),
54
54
  /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: d })
55
55
  ] });
56
56
  }
57
- function J({
57
+ function Y({
58
58
  collection: l,
59
59
  item: s,
60
60
  userId: d,
61
61
  className: h
62
62
  }) {
63
- var v;
64
- const p = C(), [u, L] = A("60"), y = !!l && s != null && String(s) !== "", $ = [
63
+ var f;
64
+ const p = R(), [b, $] = C("60"), v = !!l && s != null && String(s) !== "", j = [
65
65
  "nvr-live-trace",
66
66
  l ?? null,
67
67
  s == null ? null : String(s),
68
68
  d ?? null,
69
- u
70
- ], c = j({
71
- queryKey: $,
69
+ b
70
+ ], c = E({
71
+ queryKey: j,
72
72
  queryFn: () => {
73
- const t = /* @__PURE__ */ new Date(), i = new Date(t.getTime() - Number(u) * 6e4), o = new URLSearchParams({ from: i.toISOString(), to: t.toISOString() });
74
- return y ? (o.set("collection", String(l)), o.set("item", String(s))) : d && o.set("user", d), p.request(R(`/realtime/trace?${o.toString()}`)).then((x) => x.data);
73
+ const t = /* @__PURE__ */ new Date(), i = new Date(t.getTime() - Number(b) * 6e4), o = new URLSearchParams({ from: i.toISOString(), to: t.toISOString() });
74
+ return v ? (o.set("collection", String(l)), o.set("item", String(s))) : d && o.set("user", d), p.request(W(`/realtime/trace?${o.toString()}`)).then((x) => x.data);
75
75
  },
76
- enabled: y || !!d,
76
+ enabled: v || !!d,
77
77
  staleTime: 0,
78
78
  retry: !1
79
- }), r = c.data, b = S(
79
+ }), r = c.data, g = T(
80
80
  () => [...(r == null ? void 0 : r.writes) ?? []].sort((t, i) => i.at.localeCompare(t.at)),
81
81
  [r == null ? void 0 : r.writes]
82
- ), g = S(() => [...(r == null ? void 0 : r.events) ?? []].sort((t, i) => i.seq - t.seq), [r == null ? void 0 : r.events]);
83
- return /* @__PURE__ */ a("div", { className: T("space-y-3", h), "data-live-trace": !0, children: [
82
+ ), N = T(() => [...(r == null ? void 0 : r.events) ?? []].sort((t, i) => i.seq - t.seq), [r == null ? void 0 : r.events]);
83
+ return /* @__PURE__ */ a("div", { className: L("space-y-3", h), "data-live-trace": !0, children: [
84
84
  /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", children: [
85
85
  /* @__PURE__ */ e(
86
- F,
86
+ D,
87
87
  {
88
- value: u,
89
- onChange: L,
88
+ value: b,
89
+ onChange: $,
90
90
  ariaLabel: "Time window",
91
- options: B.map((t) => ({ value: t.value, label: t.label }))
91
+ options: I.map((t) => ({ value: t.value, label: t.label }))
92
92
  }
93
93
  ),
94
94
  /* @__PURE__ */ a(
@@ -99,19 +99,19 @@ function J({
99
99
  disabled: c.isFetching,
100
100
  className: "inline-flex h-6 items-center gap-1 rounded border border-slate-200 bg-white px-2 text-[11px] text-slate-600 hover:bg-muted disabled:opacity-60 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200",
101
101
  children: [
102
- c.isFetching ? /* @__PURE__ */ e(w, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(E, { className: "h-3 w-3" }),
102
+ c.isFetching ? /* @__PURE__ */ e(_, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(q, { className: "h-3 w-3" }),
103
103
  "Run again"
104
104
  ]
105
105
  }
106
106
  ),
107
107
  /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: "Read-only. Shows ids, field names and times, never values." })
108
108
  ] }),
109
- c.isError && /* @__PURE__ */ e(W, { error: c.error, what: "the trace", onRetry: () => void c.refetch() }),
109
+ c.isError && /* @__PURE__ */ e(F, { error: c.error, what: "the trace", onRetry: () => void c.refetch() }),
110
110
  c.isLoading && /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-[12px] text-slate-500", "aria-busy": "true", children: [
111
- /* @__PURE__ */ e(w, { className: "h-3.5 w-3.5 animate-spin" }),
111
+ /* @__PURE__ */ e(_, { className: "h-3.5 w-3.5 animate-spin" }),
112
112
  " Tracing…"
113
113
  ] }),
114
- r && /* @__PURE__ */ a(N, { children: [
114
+ r && /* @__PURE__ */ a(k, { children: [
115
115
  /* @__PURE__ */ a(
116
116
  "section",
117
117
  {
@@ -120,14 +120,14 @@ function J({
120
120
  children: [
121
121
  /* @__PURE__ */ e("h4", { className: "mb-1.5 text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: "What this says" }),
122
122
  r.findings.length === 0 ? /* @__PURE__ */ a("p", { className: "flex items-center gap-1.5 text-[12px] text-emerald-700 dark:text-emerald-400", children: [
123
- /* @__PURE__ */ e(_, { className: "h-3.5 w-3.5" }),
123
+ /* @__PURE__ */ e(S, { className: "h-3.5 w-3.5" }),
124
124
  " Every write in this window has a live event and nothing is waiting."
125
125
  ] }) : /* @__PURE__ */ e("ul", { className: "space-y-1", children: r.findings.map((t) => /* @__PURE__ */ a(
126
126
  "li",
127
127
  {
128
128
  className: "flex gap-1.5 text-[12px] text-slate-700 dark:text-slate-200",
129
129
  children: [
130
- /* @__PURE__ */ e(q, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-400" }),
130
+ /* @__PURE__ */ e(A, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-400" }),
131
131
  /* @__PURE__ */ e("span", { children: t })
132
132
  ]
133
133
  },
@@ -136,22 +136,22 @@ function J({
136
136
  ]
137
137
  }
138
138
  ),
139
- r.mode === "record" ? /* @__PURE__ */ a(N, { children: [
140
- /* @__PURE__ */ e(m, { title: "Writes", count: b.length, children: b.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "No writes in this window." }) : /* @__PURE__ */ a("table", { className: "w-full text-[12px]", "data-live-trace-writes": !0, children: [
139
+ r.mode === "record" ? /* @__PURE__ */ a(k, { children: [
140
+ /* @__PURE__ */ e(m, { title: "Writes", count: g.length, children: g.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "No writes in this window." }) : /* @__PURE__ */ a("table", { className: "w-full text-[12px]", "data-live-trace-writes": !0, children: [
141
141
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
142
142
  /* @__PURE__ */ e(n, { children: "Time" }),
143
143
  /* @__PURE__ */ e(n, { children: "How" }),
144
144
  /* @__PURE__ */ e(n, { children: "Action" }),
145
145
  /* @__PURE__ */ e(n, { children: "Live event" })
146
146
  ] }) }),
147
- /* @__PURE__ */ e("tbody", { children: b.map((t) => /* @__PURE__ */ a(
147
+ /* @__PURE__ */ e("tbody", { children: g.map((t) => /* @__PURE__ */ a(
148
148
  "tr",
149
149
  {
150
150
  className: "border-t border-slate-100 dark:border-border/60",
151
151
  children: [
152
- /* @__PURE__ */ e("td", { className: "px-3 py-1 tabular-nums", children: k(t.at) }),
152
+ /* @__PURE__ */ e("td", { className: "px-3 py-1 tabular-nums", children: y(t.at) }),
153
153
  /* @__PURE__ */ a("td", { className: "px-3 py-1", children: [
154
- I[t.kind],
154
+ K[t.kind],
155
155
  t.kind === "raw-pending" && t.by ? ` (${t.by})` : ""
156
156
  ] }),
157
157
  /* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.action ?? "—" }),
@@ -184,10 +184,11 @@ function J({
184
184
  ] }),
185
185
  /* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.via.map((i) => i === "record" ? "this record" : "the whole list").join(" + ") }),
186
186
  /* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.acked ? /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1 text-emerald-700 dark:text-emerald-400", children: [
187
- /* @__PURE__ */ e(_, { className: "h-3 w-3" }),
187
+ /* @__PURE__ */ e(S, { className: "h-3 w-3" }),
188
188
  " ",
189
- t.acked_events,
190
- " event",
189
+ u(t.acked_events),
190
+ " ",
191
+ "event",
191
192
  t.acked_events === 1 ? "" : "s"
192
193
  ] }) : (
193
194
  // Plain text, not a dashed-circle glyph (it read as "still checking").
@@ -198,8 +199,8 @@ function J({
198
199
  t.user_id ?? t.name
199
200
  )) })
200
201
  ] }) })
201
- ] }) : /* @__PURE__ */ a(N, { children: [
202
- /* @__PURE__ */ e(m, { title: "Live connections", count: ((v = r.person) == null ? void 0 : v.sockets.length) ?? 0, children: !r.person || r.person.sockets.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "No live connection from this person right now." }) : /* @__PURE__ */ a("table", { className: "w-full text-[12px]", "data-live-trace-sockets": !0, children: [
202
+ ] }) : /* @__PURE__ */ a(k, { children: [
203
+ /* @__PURE__ */ e(m, { title: "Live connections", count: ((f = r.person) == null ? void 0 : f.sockets.length) ?? 0, children: !r.person || r.person.sockets.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "No live connection from this person right now." }) : /* @__PURE__ */ a("table", { className: "w-full text-[12px]", "data-live-trace-sockets": !0, children: [
203
204
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
204
205
  /* @__PURE__ */ e(n, { children: "Connection" }),
205
206
  /* @__PURE__ */ e(n, { children: "App" }),
@@ -211,7 +212,7 @@ function J({
211
212
  /* @__PURE__ */ e("td", { className: "px-3 py-1 font-mono", children: t.id }),
212
213
  /* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.app ?? "—" }),
213
214
  /* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.transport ?? "—" }),
214
- /* @__PURE__ */ e("td", { className: "px-3 py-1 tabular-nums", children: t.connected_at ? k(t.connected_at) : "—" }),
215
+ /* @__PURE__ */ e("td", { className: "px-3 py-1 tabular-nums", children: t.connected_at ? y(t.connected_at) : "—" }),
215
216
  /* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.rooms_total })
216
217
  ] }, t.id)) })
217
218
  ] }) }),
@@ -226,14 +227,14 @@ function J({
226
227
  className: "border-t border-slate-100 dark:border-border/60",
227
228
  children: [
228
229
  /* @__PURE__ */ e("td", { className: "px-3 py-1 font-mono", children: t.room }),
229
- /* @__PURE__ */ e("td", { className: "px-3 py-1 tabular-nums", children: t.events })
230
+ /* @__PURE__ */ e("td", { className: "px-3 py-1 tabular-nums", children: u(t.events) })
230
231
  ]
231
232
  },
232
233
  t.room
233
234
  )) })
234
235
  ] }) })
235
236
  ] }),
236
- /* @__PURE__ */ e(m, { title: "Live events sent", count: g.length, children: r.journal.available ? g.length === 0 ? /* @__PURE__ */ a("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: [
237
+ /* @__PURE__ */ e(m, { title: "Live events sent", count: N.length, children: r.journal.available ? N.length === 0 ? /* @__PURE__ */ a("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: [
237
238
  "No event in this window (the journal keeps ",
238
239
  r.journal.retention_hours,
239
240
  " hours)."
@@ -245,21 +246,21 @@ function J({
245
246
  /* @__PURE__ */ e(n, { children: "Fields" }),
246
247
  /* @__PURE__ */ e(n, { children: "Acknowledged by" })
247
248
  ] }) }),
248
- /* @__PURE__ */ e("tbody", { children: g.slice(0, 100).map((t) => {
249
- const { names: i, aspects: o } = P(t.fields), x = [...i, ...o].join(", "), f = t.acked_by.length > 0;
249
+ /* @__PURE__ */ e("tbody", { children: N.slice(0, 100).map((t) => {
250
+ const { names: i, aspects: o } = B(t.fields), x = [...i, ...o].join(", "), w = t.acked_by.length > 0;
250
251
  return /* @__PURE__ */ a(
251
252
  "tr",
252
253
  {
253
- className: T(
254
+ className: L(
254
255
  "border-t border-slate-100 dark:border-border/60",
255
- f && "bg-emerald-50/70 dark:bg-emerald-500/[0.07]"
256
+ w && "bg-emerald-50/70 dark:bg-emerald-500/[0.07]"
256
257
  ),
257
258
  children: [
258
259
  /* @__PURE__ */ e("td", { className: "px-3 py-1 tabular-nums text-slate-500", children: t.seq }),
259
- /* @__PURE__ */ e("td", { className: "whitespace-nowrap px-3 py-1 tabular-nums", children: k(t.at) }),
260
+ /* @__PURE__ */ e("td", { className: "whitespace-nowrap px-3 py-1 tabular-nums", children: y(t.at) }),
260
261
  /* @__PURE__ */ a("td", { className: "px-3 py-1", children: [
261
262
  t.action ?? t.event,
262
- t.item === "*" ? ` (${t.bulk ?? "many"} records)` : "",
263
+ t.item === "*" ? ` (${t.bulk != null ? u(t.bulk) : "many"} records)` : "",
263
264
  t.source ? ` · ${t.source}` : ""
264
265
  ] }),
265
266
  /* @__PURE__ */ a("td", { className: "max-w-[200px] truncate px-3 py-1", title: x, children: [
@@ -270,7 +271,7 @@ function J({
270
271
  ] }),
271
272
  !x && "—"
272
273
  ] }),
273
- /* @__PURE__ */ e("td", { className: "whitespace-nowrap px-3 py-1", children: f ? /* @__PURE__ */ a("span", { className: "font-medium text-emerald-800 dark:text-emerald-300", children: [
274
+ /* @__PURE__ */ e("td", { className: "whitespace-nowrap px-3 py-1", children: w ? /* @__PURE__ */ a("span", { className: "font-medium text-emerald-800 dark:text-emerald-300", children: [
274
275
  t.acked_by.length,
275
276
  " ",
276
277
  t.acked_by.length === 1 ? "person" : "people"
@@ -291,6 +292,6 @@ function J({
291
292
  ] });
292
293
  }
293
294
  export {
294
- J as LiveTraceView,
295
- P as traceFields
295
+ Y as LiveTraceView,
296
+ B as traceFields
296
297
  };