@nivaro/react 0.3.117 → 0.3.119

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 (138) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +136 -14
  4. package/dist/index.js +488 -485
  5. package/dist/shared/components/ActivityEntry.js +130 -125
  6. package/dist/shared/components/AgentPresenceChip.js +36 -26
  7. package/dist/shared/components/CellCopyLayer.js +50 -45
  8. package/dist/shared/components/CollectionBrowserView.js +3757 -3695
  9. package/dist/shared/components/FilePreviewLightbox.js +96 -58
  10. package/dist/shared/components/InStep.js +18 -17
  11. package/dist/shared/components/ItemEditForm.js +4451 -4385
  12. package/dist/shared/components/JobsTray.js +8 -8
  13. package/dist/shared/components/LiveNewMatchesPill.js +21 -14
  14. package/dist/shared/components/LiveOffNote.js +3 -2
  15. package/dist/shared/components/LiveRowMark.js +53 -23
  16. package/dist/shared/components/LiveTraceView.js +162 -123
  17. package/dist/shared/components/MyWorkView.js +320 -299
  18. package/dist/shared/components/NotificationBell.js +14 -14
  19. package/dist/shared/components/OverflowRail.js +1 -1
  20. package/dist/shared/components/PageRenderer.js +120 -116
  21. package/dist/shared/components/ProfileView.js +203 -202
  22. package/dist/shared/components/RealtimeStatusBanner.js +31 -29
  23. package/dist/shared/components/RecordDrilldownSheet.js +7 -7
  24. package/dist/shared/components/RecordHoverCard.js +102 -84
  25. package/dist/shared/components/RecordReadView.js +146 -146
  26. package/dist/shared/components/ScreenRefreshButton.js +34 -32
  27. package/dist/shared/components/TipLayer.js +65 -58
  28. package/dist/shared/components/WidgetImageMenu.js +83 -43
  29. package/dist/shared/components/activity/RecordActivityStream.js +175 -173
  30. package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
  31. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
  32. package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
  33. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
  34. package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
  35. package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
  36. package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
  37. package/dist/shared/components/collections-directory/page-model.js +72 -67
  38. package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
  39. package/dist/shared/components/integrations/SendStatus.js +65 -59
  40. package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
  41. package/dist/shared/components/integrations/console/SignalCard.js +237 -230
  42. package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
  43. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +135 -94
  44. package/dist/shared/components/item-edit/CloneDialog.js +191 -161
  45. package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
  46. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
  47. package/dist/shared/components/item-edit/FieldComments.js +88 -85
  48. package/dist/shared/components/item-edit/FieldPointer.js +82 -67
  49. package/dist/shared/components/item-edit/FieldRow.js +106 -100
  50. package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
  51. package/dist/shared/components/item-edit/FilePickerField.js +452 -387
  52. package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
  53. package/dist/shared/components/item-edit/HeaderTools.js +245 -141
  54. package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
  55. package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
  56. package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
  57. package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
  58. package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
  59. package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
  60. package/dist/shared/components/item-edit/RecalcValue.js +57 -32
  61. package/dist/shared/components/item-edit/RecordHelpChip.js +15 -16
  62. package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
  63. package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
  64. package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
  65. package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
  66. package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
  67. package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
  68. package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
  69. package/dist/shared/components/item-edit/SectionPresence.js +18 -10
  70. package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
  71. package/dist/shared/components/item-edit/UserChip.js +1 -1
  72. package/dist/shared/components/item-edit/addendum-view.js +6 -0
  73. package/dist/shared/components/item-edit/file-live.js +69 -54
  74. package/dist/shared/components/item-edit/layout-switch.js +98 -89
  75. package/dist/shared/components/item-edit/partner-needs.js +12 -12
  76. package/dist/shared/components/item-edit/removed-line.js +31 -25
  77. package/dist/shared/components/layout-editor/pickers/field-picker.js +151 -130
  78. package/dist/shared/components/list/ListViewers.js +46 -35
  79. package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
  80. package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
  81. package/dist/shared/components/panels/AlertBanners.js +82 -72
  82. package/dist/shared/components/panels/BranchLanes.js +22 -22
  83. package/dist/shared/components/panels/CommentImages.js +123 -102
  84. package/dist/shared/components/panels/CommentPanel.js +186 -185
  85. package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
  86. package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
  87. package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
  88. package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
  89. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
  90. package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
  91. package/dist/shared/components/profile/AgentNameField.js +107 -81
  92. package/dist/shared/components/profile/AgentsPanel.js +184 -184
  93. package/dist/shared/components/profile/PersonAccess.js +599 -495
  94. package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
  95. package/dist/shared/components/profile/SignedInDevices.js +17 -17
  96. package/dist/shared/components/profile/primitives.js +1 -1
  97. package/dist/shared/components/queue/OwnerAvatars.js +91 -54
  98. package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
  99. package/dist/shared/components/queue/QueueWorklist.js +1002 -983
  100. package/dist/shared/components/support/AssignRules.js +1733 -0
  101. package/dist/shared/components/support/PersonPick.js +88 -0
  102. package/dist/shared/components/support/RequestList.js +790 -0
  103. package/dist/shared/components/support/ScreenShare.js +158 -152
  104. package/dist/shared/components/support/SupportRequestDialog.js +50 -48
  105. package/dist/shared/components/support/SupportView.js +140 -246
  106. package/dist/shared/components/support/TicketDetailSheet.js +82 -75
  107. package/dist/shared/components/support/TicketSlowScreens.js +9 -9
  108. package/dist/shared/components/support/assign-rules-text.js +171 -0
  109. package/dist/shared/components/support/support-list.js +125 -0
  110. package/dist/shared/components/ui/SimpleSelect.js +28 -20
  111. package/dist/shared/components/ui/checkbox.js +6 -6
  112. package/dist/shared/components/ui/select.js +43 -39
  113. package/dist/shared/components/ui/sheet.js +9 -9
  114. package/dist/shared/components/ui/switch.js +12 -11
  115. package/dist/shared/components/watch-list/WatchDock.js +532 -459
  116. package/dist/shared/components/watch-list/WatchExtras.js +332 -286
  117. package/dist/shared/components/watch-list/WatchRows.js +164 -140
  118. package/dist/shared/lib/activity-sentence.js +103 -91
  119. package/dist/shared/lib/agent-presence.js +27 -21
  120. package/dist/shared/lib/approval-progress.js +2 -2
  121. package/dist/shared/lib/copy-rules.js +31 -24
  122. package/dist/shared/lib/derived-causes.js +113 -78
  123. package/dist/shared/lib/grid-cursors.js +26 -26
  124. package/dist/shared/lib/label-flash.js +27 -0
  125. package/dist/shared/lib/list-return.js +137 -125
  126. package/dist/shared/lib/live-deltas.js +40 -34
  127. package/dist/shared/lib/live-groups.js +56 -52
  128. package/dist/shared/lib/live-preference.js +64 -59
  129. package/dist/shared/lib/live-screen.js +223 -192
  130. package/dist/shared/lib/partner-failure.js +11 -11
  131. package/dist/shared/lib/rollup-recalc.js +68 -64
  132. package/dist/shared/lib/screen-refresh.js +74 -68
  133. package/dist/shared/lib/screen-share.js +108 -104
  134. package/dist/shared/lib/send-status.js +77 -61
  135. package/dist/shared/lib/text-diff-window.js +29 -0
  136. package/dist/shared/lib/watch-list.js +210 -209
  137. package/dist/shared/lib/widget-image-render.js +72 -49
  138. package/package.json +1 -1
@@ -1,116 +1,133 @@
1
- import { jsxs as r, jsx as e, Fragment as u } from "react/jsx-runtime";
2
- import { useQuery as T } from "@tanstack/react-query";
3
- import { Loader2 as y, RefreshCw as $, CheckCircle2 as v, TriangleAlert as j, CircleDashed as q } from "lucide-react";
4
- import { useState as C, useMemo as k } from "react";
5
- import { useNivaroClient as R } from "../context.js";
6
- import { get as A } from "../lib/commands.js";
7
- import { cn as W } from "../lib/utils.js";
8
- import { ErrorNotice as E } from "./ErrorNotice.js";
9
- import { SimpleSelectXs as D } from "./ui/SimpleSelect.js";
10
- const F = [
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 = {
11
+ $state: "step",
12
+ $related: "linked records",
13
+ $comments: "comments",
14
+ $tasks: "tasks",
15
+ $files: "files"
16
+ };
17
+ function P(l) {
18
+ const s = [], d = [];
19
+ for (const h of l)
20
+ if (!D.has(h))
21
+ if (h.startsWith("$")) {
22
+ const p = O[h] ?? h.slice(1).replace(/_/g, " ");
23
+ d.includes(p) || d.push(p);
24
+ } else s.push(h);
25
+ return { names: s, aspects: d };
26
+ }
27
+ const B = [
11
28
  { value: "15", label: "Last 15 minutes", minutes: 15 },
12
29
  { value: "60", label: "Last hour", minutes: 60 },
13
30
  { value: "360", label: "Last 6 hours", minutes: 360 },
14
31
  { value: "1440", label: "Last 24 hours", minutes: 1440 }
15
- ], O = {
32
+ ], I = {
16
33
  activity: "Saved through the app",
17
34
  "raw-pending": "Waiting to be announced",
18
35
  "row-timestamp": "Row changed, no activity entry"
19
36
  };
20
- function b(s) {
21
- const l = new Date(s);
22
- return Number.isNaN(l.getTime()) ? s : l.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit", second: "2-digit" });
37
+ function k(l) {
38
+ const s = new Date(l);
39
+ return Number.isNaN(s.getTime()) ? l : s.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit", second: "2-digit" });
23
40
  }
24
- function n({ children: s }) {
25
- return /* @__PURE__ */ e("th", { className: "px-2 py-1 text-left text-[10.5px] font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400", children: s });
41
+ function n({ children: l }) {
42
+ return /* @__PURE__ */ e("th", { className: "whitespace-nowrap px-3 py-1 text-left text-[10.5px] font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400", children: l });
26
43
  }
27
- function o({
28
- title: s,
29
- count: l,
30
- children: c
44
+ function m({
45
+ title: l,
46
+ count: s,
47
+ children: d
31
48
  }) {
32
- return /* @__PURE__ */ r("section", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
33
- /* @__PURE__ */ r("header", { className: "flex items-center gap-2 border-b border-slate-100 px-3 py-2 dark:border-border/60", children: [
34
- /* @__PURE__ */ e("h4", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: s }),
35
- l != 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: l })
49
+ return /* @__PURE__ */ a("section", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
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
+ /* @__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 })
36
53
  ] }),
37
- /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: c })
54
+ /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: d })
38
55
  ] });
39
56
  }
40
- function X({
41
- collection: s,
42
- item: l,
43
- userId: c,
44
- className: f
57
+ function J({
58
+ collection: l,
59
+ item: s,
60
+ userId: d,
61
+ className: h
45
62
  }) {
46
- var g;
47
- const w = R(), [m, S] = C("60"), N = !!s && l != null && String(l) !== "", _ = [
63
+ var v;
64
+ const p = C(), [u, L] = A("60"), y = !!l && s != null && String(s) !== "", $ = [
48
65
  "nvr-live-trace",
49
- s ?? null,
50
- l == null ? null : String(l),
51
- c ?? null,
52
- m
53
- ], i = T({
54
- queryKey: _,
66
+ l ?? null,
67
+ s == null ? null : String(s),
68
+ d ?? null,
69
+ u
70
+ ], c = j({
71
+ queryKey: $,
55
72
  queryFn: () => {
56
- const t = /* @__PURE__ */ new Date(), d = new Date(t.getTime() - Number(m) * 6e4), h = new URLSearchParams({ from: d.toISOString(), to: t.toISOString() });
57
- return N ? (h.set("collection", String(s)), h.set("item", String(l))) : c && h.set("user", c), w.request(A(`/realtime/trace?${h.toString()}`)).then((L) => L.data);
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);
58
75
  },
59
- enabled: N || !!c,
76
+ enabled: y || !!d,
60
77
  staleTime: 0,
61
78
  retry: !1
62
- }), a = i.data, p = k(
63
- () => [...(a == null ? void 0 : a.writes) ?? []].sort((t, d) => d.at.localeCompare(t.at)),
64
- [a == null ? void 0 : a.writes]
65
- ), x = k(() => [...(a == null ? void 0 : a.events) ?? []].sort((t, d) => d.seq - t.seq), [a == null ? void 0 : a.events]);
66
- return /* @__PURE__ */ r("div", { className: W("space-y-3", f), "data-live-trace": !0, children: [
67
- /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2", children: [
79
+ }), r = c.data, b = S(
80
+ () => [...(r == null ? void 0 : r.writes) ?? []].sort((t, i) => i.at.localeCompare(t.at)),
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: [
84
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", children: [
68
85
  /* @__PURE__ */ e(
69
- D,
86
+ F,
70
87
  {
71
- value: m,
72
- onChange: S,
88
+ value: u,
89
+ onChange: L,
73
90
  ariaLabel: "Time window",
74
- options: F.map((t) => ({ value: t.value, label: t.label }))
91
+ options: B.map((t) => ({ value: t.value, label: t.label }))
75
92
  }
76
93
  ),
77
- /* @__PURE__ */ r(
94
+ /* @__PURE__ */ a(
78
95
  "button",
79
96
  {
80
97
  type: "button",
81
- onClick: () => void i.refetch(),
82
- disabled: i.isFetching,
98
+ onClick: () => void c.refetch(),
99
+ disabled: c.isFetching,
83
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",
84
101
  children: [
85
- i.isFetching ? /* @__PURE__ */ e(y, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e($, { className: "h-3 w-3" }),
102
+ c.isFetching ? /* @__PURE__ */ e(w, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(E, { className: "h-3 w-3" }),
86
103
  "Run again"
87
104
  ]
88
105
  }
89
106
  ),
90
- /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "Read-only. Shows ids, field names and times, never values." })
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." })
91
108
  ] }),
92
- i.isError && /* @__PURE__ */ e(E, { error: i.error, what: "the trace", onRetry: () => void i.refetch() }),
93
- i.isLoading && /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-[12px] text-slate-500", "aria-busy": "true", children: [
94
- /* @__PURE__ */ e(y, { className: "h-3.5 w-3.5 animate-spin" }),
109
+ c.isError && /* @__PURE__ */ e(W, { error: c.error, what: "the trace", onRetry: () => void c.refetch() }),
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" }),
95
112
  " Tracing…"
96
113
  ] }),
97
- a && /* @__PURE__ */ r(u, { children: [
98
- /* @__PURE__ */ r(
114
+ r && /* @__PURE__ */ a(N, { children: [
115
+ /* @__PURE__ */ a(
99
116
  "section",
100
117
  {
101
118
  "data-live-trace-findings": !0,
102
119
  className: "rounded-lg border border-slate-200 bg-slate-50 p-3 dark:border-border dark:bg-slate-900/40",
103
120
  children: [
104
121
  /* @__PURE__ */ e("h4", { className: "mb-1.5 text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: "What this says" }),
105
- a.findings.length === 0 ? /* @__PURE__ */ r("p", { className: "flex items-center gap-1.5 text-[12px] text-emerald-700 dark:text-emerald-400", children: [
106
- /* @__PURE__ */ e(v, { className: "h-3.5 w-3.5" }),
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" }),
107
124
  " Every write in this window has a live event and nothing is waiting."
108
- ] }) : /* @__PURE__ */ e("ul", { className: "space-y-1", children: a.findings.map((t) => /* @__PURE__ */ r(
125
+ ] }) : /* @__PURE__ */ e("ul", { className: "space-y-1", children: r.findings.map((t) => /* @__PURE__ */ a(
109
126
  "li",
110
127
  {
111
128
  className: "flex gap-1.5 text-[12px] text-slate-700 dark:text-slate-200",
112
129
  children: [
113
- /* @__PURE__ */ e(j, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-400" }),
130
+ /* @__PURE__ */ e(q, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-400" }),
114
131
  /* @__PURE__ */ e("span", { children: t })
115
132
  ]
116
133
  },
@@ -119,26 +136,26 @@ function X({
119
136
  ]
120
137
  }
121
138
  ),
122
- a.mode === "record" ? /* @__PURE__ */ r(u, { children: [
123
- /* @__PURE__ */ e(o, { title: "Writes", count: p.length, children: p.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "No writes in this window." }) : /* @__PURE__ */ r("table", { className: "w-full text-[12px]", "data-live-trace-writes": !0, children: [
124
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { children: [
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: [
141
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
125
142
  /* @__PURE__ */ e(n, { children: "Time" }),
126
143
  /* @__PURE__ */ e(n, { children: "How" }),
127
144
  /* @__PURE__ */ e(n, { children: "Action" }),
128
145
  /* @__PURE__ */ e(n, { children: "Live event" })
129
146
  ] }) }),
130
- /* @__PURE__ */ e("tbody", { children: p.map((t) => /* @__PURE__ */ r(
147
+ /* @__PURE__ */ e("tbody", { children: b.map((t) => /* @__PURE__ */ a(
131
148
  "tr",
132
149
  {
133
150
  className: "border-t border-slate-100 dark:border-border/60",
134
151
  children: [
135
- /* @__PURE__ */ e("td", { className: "px-2 py-1 tabular-nums", children: b(t.at) }),
136
- /* @__PURE__ */ r("td", { className: "px-2 py-1", children: [
137
- O[t.kind],
152
+ /* @__PURE__ */ e("td", { className: "px-3 py-1 tabular-nums", children: k(t.at) }),
153
+ /* @__PURE__ */ a("td", { className: "px-3 py-1", children: [
154
+ I[t.kind],
138
155
  t.kind === "raw-pending" && t.by ? ` (${t.by})` : ""
139
156
  ] }),
140
- /* @__PURE__ */ e("td", { className: "px-2 py-1", children: t.action ?? "—" }),
141
- /* @__PURE__ */ e("td", { className: "px-2 py-1", children: t.kind === "raw-pending" ? /* @__PURE__ */ e("span", { className: "text-amber-700 dark:text-amber-400", children: "not sent yet" }) : t.announced ? /* @__PURE__ */ r("span", { className: "text-emerald-700 dark:text-emerald-400", children: [
157
+ /* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.action ?? "—" }),
158
+ /* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.kind === "raw-pending" ? /* @__PURE__ */ e("span", { className: "text-amber-700 dark:text-amber-400", children: "not sent yet" }) : t.announced ? /* @__PURE__ */ a("span", { className: "text-emerald-700 dark:text-emerald-400", children: [
142
159
  "sent (#",
143
160
  t.matched_seq,
144
161
  ")"
@@ -148,110 +165,132 @@ function X({
148
165
  `${t.kind}-${t.at}-${t.matched_seq ?? ""}-${t.by ?? ""}`
149
166
  )) })
150
167
  ] }) }),
151
- /* @__PURE__ */ e(o, { title: "Who is subscribed now", count: a.subscribers.length, children: a.subscribers.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "Nobody is in this record's live room right now." }) : /* @__PURE__ */ r("table", { className: "w-full text-[12px]", "data-live-trace-subscribers": !0, children: [
152
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { children: [
168
+ /* @__PURE__ */ e(m, { title: "Who is subscribed now", count: r.subscribers.length, children: r.subscribers.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "Nobody is in this record's live room right now." }) : /* @__PURE__ */ a("table", { className: "w-full text-[12px]", "data-live-trace-subscribers": !0, children: [
169
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
153
170
  /* @__PURE__ */ e(n, { children: "Person" }),
154
171
  /* @__PURE__ */ e(n, { children: "Connections" }),
155
172
  /* @__PURE__ */ e(n, { children: "Listening to" }),
156
173
  /* @__PURE__ */ e(n, { children: "Acknowledged" })
157
174
  ] }) }),
158
- /* @__PURE__ */ e("tbody", { children: a.subscribers.map((t) => /* @__PURE__ */ r(
175
+ /* @__PURE__ */ e("tbody", { children: r.subscribers.map((t) => /* @__PURE__ */ a(
159
176
  "tr",
160
177
  {
161
178
  className: "border-t border-slate-100 dark:border-border/60",
162
179
  children: [
163
- /* @__PURE__ */ e("td", { className: "px-2 py-1", children: t.name }),
164
- /* @__PURE__ */ r("td", { className: "px-2 py-1 tabular-nums", children: [
180
+ /* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.name }),
181
+ /* @__PURE__ */ a("td", { className: "px-3 py-1 tabular-nums", children: [
165
182
  t.sockets,
166
183
  t.apps.length ? ` (${t.apps.join(", ")})` : ""
167
184
  ] }),
168
- /* @__PURE__ */ e("td", { className: "px-2 py-1", children: t.via.map((d) => d === "record" ? "this record" : "the whole list").join(" + ") }),
169
- /* @__PURE__ */ e("td", { className: "px-2 py-1", children: t.acked ? /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 text-emerald-700 dark:text-emerald-400", children: [
170
- /* @__PURE__ */ e(v, { className: "h-3 w-3" }),
185
+ /* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.via.map((i) => i === "record" ? "this record" : "the whole list").join(" + ") }),
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" }),
171
188
  " ",
172
189
  t.acked_events,
173
190
  " event",
174
191
  t.acked_events === 1 ? "" : "s"
175
- ] }) : /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 text-slate-500", children: [
176
- /* @__PURE__ */ e(q, { className: "h-3 w-3" }),
177
- " none"
178
- ] }) })
192
+ ] }) : (
193
+ // Plain text, not a dashed-circle glyph (it read as "still checking").
194
+ /* @__PURE__ */ e("span", { className: "text-slate-500 dark:text-slate-400", children: "Not acknowledged" })
195
+ ) })
179
196
  ]
180
197
  },
181
198
  t.user_id ?? t.name
182
199
  )) })
183
200
  ] }) })
184
- ] }) : /* @__PURE__ */ r(u, { children: [
185
- /* @__PURE__ */ e(o, { title: "Live connections", count: ((g = a.person) == null ? void 0 : g.sockets.length) ?? 0, children: !a.person || a.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__ */ r("table", { className: "w-full text-[12px]", "data-live-trace-sockets": !0, children: [
186
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { children: [
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: [
203
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
187
204
  /* @__PURE__ */ e(n, { children: "Connection" }),
188
205
  /* @__PURE__ */ e(n, { children: "App" }),
189
206
  /* @__PURE__ */ e(n, { children: "Transport" }),
190
207
  /* @__PURE__ */ e(n, { children: "Since" }),
191
208
  /* @__PURE__ */ e(n, { children: "Rooms" })
192
209
  ] }) }),
193
- /* @__PURE__ */ e("tbody", { children: a.person.sockets.map((t) => /* @__PURE__ */ r("tr", { className: "border-t border-slate-100 dark:border-border/60", children: [
194
- /* @__PURE__ */ e("td", { className: "px-2 py-1 font-mono", children: t.id }),
195
- /* @__PURE__ */ e("td", { className: "px-2 py-1", children: t.app ?? "—" }),
196
- /* @__PURE__ */ e("td", { className: "px-2 py-1", children: t.transport ?? "—" }),
197
- /* @__PURE__ */ e("td", { className: "px-2 py-1 tabular-nums", children: t.connected_at ? b(t.connected_at) : "—" }),
198
- /* @__PURE__ */ e("td", { className: "px-2 py-1", children: t.rooms_total })
210
+ /* @__PURE__ */ e("tbody", { children: r.person.sockets.map((t) => /* @__PURE__ */ a("tr", { className: "border-t border-slate-100 dark:border-border/60", children: [
211
+ /* @__PURE__ */ e("td", { className: "px-3 py-1 font-mono", children: t.id }),
212
+ /* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.app ?? "—" }),
213
+ /* @__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", children: t.rooms_total })
199
216
  ] }, t.id)) })
200
217
  ] }) }),
201
- /* @__PURE__ */ e(o, { title: "Events sent to their rooms", count: a.rooms.length, children: a.rooms.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "Nothing was emitted to the rooms they are in during this window." }) : /* @__PURE__ */ r("table", { className: "w-full text-[12px]", children: [
202
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { children: [
218
+ /* @__PURE__ */ e(m, { title: "Events sent to their rooms", count: r.rooms.length, children: r.rooms.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "Nothing was emitted to the rooms they are in during this window." }) : /* @__PURE__ */ a("table", { className: "w-full text-[12px]", children: [
219
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
203
220
  /* @__PURE__ */ e(n, { children: "Room" }),
204
221
  /* @__PURE__ */ e(n, { children: "Events" })
205
222
  ] }) }),
206
- /* @__PURE__ */ e("tbody", { children: a.rooms.slice(0, 40).map((t) => /* @__PURE__ */ r(
223
+ /* @__PURE__ */ e("tbody", { children: r.rooms.slice(0, 40).map((t) => /* @__PURE__ */ a(
207
224
  "tr",
208
225
  {
209
226
  className: "border-t border-slate-100 dark:border-border/60",
210
227
  children: [
211
- /* @__PURE__ */ e("td", { className: "px-2 py-1 font-mono", children: t.room }),
212
- /* @__PURE__ */ e("td", { className: "px-2 py-1 tabular-nums", children: t.events })
228
+ /* @__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 })
213
230
  ]
214
231
  },
215
232
  t.room
216
233
  )) })
217
234
  ] }) })
218
235
  ] }),
219
- /* @__PURE__ */ e(o, { title: "Live events sent", count: x.length, children: a.journal.available ? x.length === 0 ? /* @__PURE__ */ r("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: [
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: [
220
237
  "No event in this window (the journal keeps ",
221
- a.journal.retention_hours,
238
+ r.journal.retention_hours,
222
239
  " hours)."
223
- ] }) : /* @__PURE__ */ r("table", { className: "w-full text-[12px]", "data-live-trace-events": !0, children: [
224
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { children: [
240
+ ] }) : /* @__PURE__ */ a("table", { className: "w-full text-[12px]", "data-live-trace-events": !0, children: [
241
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
225
242
  /* @__PURE__ */ e(n, { children: "#" }),
226
243
  /* @__PURE__ */ e(n, { children: "Time" }),
227
244
  /* @__PURE__ */ e(n, { children: "Action" }),
228
245
  /* @__PURE__ */ e(n, { children: "Fields" }),
229
246
  /* @__PURE__ */ e(n, { children: "Acknowledged by" })
230
247
  ] }) }),
231
- /* @__PURE__ */ e("tbody", { children: x.slice(0, 100).map((t) => /* @__PURE__ */ r("tr", { className: "border-t border-slate-100 dark:border-border/60", children: [
232
- /* @__PURE__ */ e("td", { className: "px-2 py-1 tabular-nums text-slate-500", children: t.seq }),
233
- /* @__PURE__ */ e("td", { className: "px-2 py-1 tabular-nums", children: b(t.at) }),
234
- /* @__PURE__ */ r("td", { className: "px-2 py-1", children: [
235
- t.action ?? t.event,
236
- t.item === "*" ? ` (${t.bulk ?? "many"} records)` : "",
237
- t.source ? ` · ${t.source}` : ""
238
- ] }),
239
- /* @__PURE__ */ e("td", { className: "max-w-[260px] truncate px-2 py-1", title: t.fields.join(", "), children: t.fields.length ? t.fields.join(", ") : "—" }),
240
- /* @__PURE__ */ e("td", { className: "px-2 py-1", children: t.acked_by.length > 0 ? `${t.acked_by.length} ${t.acked_by.length === 1 ? "person" : "people"}` : /* @__PURE__ */ e("span", { className: "text-slate-400", children: "not sampled / none" }) })
241
- ] }, t.seq)) })
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;
250
+ return /* @__PURE__ */ a(
251
+ "tr",
252
+ {
253
+ className: T(
254
+ "border-t border-slate-100 dark:border-border/60",
255
+ f && "bg-emerald-50/70 dark:bg-emerald-500/[0.07]"
256
+ ),
257
+ children: [
258
+ /* @__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__ */ a("td", { className: "px-3 py-1", children: [
261
+ t.action ?? t.event,
262
+ t.item === "*" ? ` (${t.bulk ?? "many"} records)` : "",
263
+ t.source ? ` · ${t.source}` : ""
264
+ ] }),
265
+ /* @__PURE__ */ a("td", { className: "max-w-[200px] truncate px-3 py-1", title: x, children: [
266
+ i.join(", "),
267
+ o.length > 0 && /* @__PURE__ */ a("span", { className: "italic text-slate-500 dark:text-slate-400", children: [
268
+ i.length ? ", " : "",
269
+ o.join(", ")
270
+ ] }),
271
+ !x && "—"
272
+ ] }),
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
+ t.acked_by.length,
275
+ " ",
276
+ t.acked_by.length === 1 ? "person" : "people"
277
+ ] }) : /* @__PURE__ */ e("span", { className: "text-slate-400 dark:text-slate-500", children: "—" }) })
278
+ ]
279
+ },
280
+ t.seq
281
+ );
282
+ }) })
242
283
  ] }) : /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "The event journal is not on this instance." }) }),
243
- /* @__PURE__ */ r("p", { className: "text-[11px] leading-relaxed text-slate-400", children: [
244
- a.subscription_note,
245
- " Acknowledged events: ",
246
- a.ack.acked_events,
247
- "; about 1 in",
284
+ /* @__PURE__ */ a("p", { className: "text-[11.5px] leading-relaxed text-slate-500 dark:text-slate-400", children: [
285
+ "This shows who is connected right now, not earlier.",
248
286
  " ",
249
- a.ack.sampled_about_one_in || "—",
250
- " events is sampled."
287
+ r.ack.sampled_about_one_in ? `The server checks delivery on about 1 in ${r.ack.sampled_about_one_in} events` : "The server is not checking delivery here",
288
+ r.ack.sampled_about_one_in ? ` (${r.ack.acked_events} confirmed in this window). A dash under Acknowledged by means the event was not checked, or nobody confirmed it.` : "."
251
289
  ] })
252
290
  ] })
253
291
  ] });
254
292
  }
255
293
  export {
256
- X as LiveTraceView
294
+ J as LiveTraceView,
295
+ P as traceFields
257
296
  };