@nivaro/react 0.3.117 → 0.3.118

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 (137) 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 +4220 -4175
  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 +131 -92
  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 +54 -53
  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 +94 -85
  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 +21 -22
  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/file-live.js +69 -54
  73. package/dist/shared/components/item-edit/layout-switch.js +98 -89
  74. package/dist/shared/components/item-edit/partner-needs.js +12 -12
  75. package/dist/shared/components/item-edit/removed-line.js +31 -25
  76. package/dist/shared/components/layout-editor/pickers/field-picker.js +112 -104
  77. package/dist/shared/components/list/ListViewers.js +46 -35
  78. package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
  79. package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
  80. package/dist/shared/components/panels/AlertBanners.js +82 -72
  81. package/dist/shared/components/panels/BranchLanes.js +22 -22
  82. package/dist/shared/components/panels/CommentImages.js +123 -102
  83. package/dist/shared/components/panels/CommentPanel.js +186 -185
  84. package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
  85. package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
  86. package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
  87. package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
  88. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
  89. package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
  90. package/dist/shared/components/profile/AgentNameField.js +107 -81
  91. package/dist/shared/components/profile/AgentsPanel.js +184 -184
  92. package/dist/shared/components/profile/PersonAccess.js +599 -495
  93. package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
  94. package/dist/shared/components/profile/SignedInDevices.js +17 -17
  95. package/dist/shared/components/profile/primitives.js +1 -1
  96. package/dist/shared/components/queue/OwnerAvatars.js +91 -54
  97. package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
  98. package/dist/shared/components/queue/QueueWorklist.js +1002 -983
  99. package/dist/shared/components/support/AssignRules.js +1733 -0
  100. package/dist/shared/components/support/PersonPick.js +88 -0
  101. package/dist/shared/components/support/RequestList.js +790 -0
  102. package/dist/shared/components/support/ScreenShare.js +158 -152
  103. package/dist/shared/components/support/SupportRequestDialog.js +50 -48
  104. package/dist/shared/components/support/SupportView.js +140 -246
  105. package/dist/shared/components/support/TicketDetailSheet.js +82 -75
  106. package/dist/shared/components/support/TicketSlowScreens.js +9 -9
  107. package/dist/shared/components/support/assign-rules-text.js +171 -0
  108. package/dist/shared/components/support/support-list.js +125 -0
  109. package/dist/shared/components/ui/SimpleSelect.js +28 -20
  110. package/dist/shared/components/ui/checkbox.js +6 -6
  111. package/dist/shared/components/ui/select.js +43 -39
  112. package/dist/shared/components/ui/sheet.js +9 -9
  113. package/dist/shared/components/ui/switch.js +12 -11
  114. package/dist/shared/components/watch-list/WatchDock.js +532 -459
  115. package/dist/shared/components/watch-list/WatchExtras.js +332 -286
  116. package/dist/shared/components/watch-list/WatchRows.js +164 -140
  117. package/dist/shared/lib/activity-sentence.js +103 -91
  118. package/dist/shared/lib/agent-presence.js +27 -21
  119. package/dist/shared/lib/approval-progress.js +2 -2
  120. package/dist/shared/lib/copy-rules.js +31 -24
  121. package/dist/shared/lib/derived-causes.js +113 -78
  122. package/dist/shared/lib/grid-cursors.js +26 -26
  123. package/dist/shared/lib/label-flash.js +27 -0
  124. package/dist/shared/lib/list-return.js +137 -125
  125. package/dist/shared/lib/live-deltas.js +40 -34
  126. package/dist/shared/lib/live-groups.js +56 -52
  127. package/dist/shared/lib/live-preference.js +64 -59
  128. package/dist/shared/lib/live-screen.js +223 -192
  129. package/dist/shared/lib/partner-failure.js +11 -11
  130. package/dist/shared/lib/rollup-recalc.js +68 -64
  131. package/dist/shared/lib/screen-refresh.js +74 -68
  132. package/dist/shared/lib/screen-share.js +108 -104
  133. package/dist/shared/lib/send-status.js +77 -61
  134. package/dist/shared/lib/text-diff-window.js +29 -0
  135. package/dist/shared/lib/watch-list.js +210 -209
  136. package/dist/shared/lib/widget-image-render.js +72 -49
  137. package/package.json +1 -1
@@ -1,20 +1,20 @@
1
- import { jsxs as o, jsx as i, Fragment as A } from "react/jsx-runtime";
2
- import { useQuery as B } from "@tanstack/react-query";
3
- import { ChevronDown as I, ChevronRight as $, Eye as U, KeyRound as W, Bot as q, Upload as E, Workflow as M, Clock as H, Cog as K } from "lucide-react";
4
- import { useState as k, useMemo as h } from "react";
5
- import { useOptionalNivaroClient as O } from "../context.js";
6
- import { renderActivityGroupSentence as Z, renderActivitySentence as G, actorName as N, groupActivity as J, activityLabelRefs as Q, actorOf as z, activityWhy as P, activityPredicate as V } from "../lib/activity-sentence.js";
7
- import { post as X } from "../lib/commands.js";
8
- import { cn as f, formatDateTime as D } from "../lib/utils.js";
9
- import { AgentBadge as Y } from "./AgentBadge.js";
10
- import { UserAvatar as F } from "./UserAvatar.js";
11
- function C(e, t) {
1
+ import { jsxs as m, jsx as i, Fragment as A } from "react/jsx-runtime";
2
+ import { useQuery as B, keepPreviousData as I } from "@tanstack/react-query";
3
+ import { ChevronDown as $, ChevronRight as E, Eye as U, KeyRound as W, Bot as q, Upload as M, Workflow as H, Clock as K, Cog as O } from "lucide-react";
4
+ import { useState as b, useMemo as f } from "react";
5
+ import { useOptionalNivaroClient as Z } from "../context.js";
6
+ import { renderActivityGroupSentence as G, renderActivitySentence as J, actorName as w, groupActivity as P, actorOf as Q, activityWhy as z, activityLabelRefs as V, activityPredicate as X } from "../lib/activity-sentence.js";
7
+ import { post as Y } from "../lib/commands.js";
8
+ import { cn as v, formatDateTime as C } from "../lib/utils.js";
9
+ import { AgentBadge as F } from "./AgentBadge.js";
10
+ import { UserAvatar as tt } from "./UserAvatar.js";
11
+ function T(e, t) {
12
12
  let a = e;
13
13
  for (const n of t ?? [])
14
14
  n && (a = a.split(` on ${n}`).join("").split(` ${n}`).join(""));
15
15
  return a;
16
16
  }
17
- function tt(e) {
17
+ function et(e) {
18
18
  if (!e) return null;
19
19
  const t = new Date(e);
20
20
  return Number.isNaN(t.getTime()) ? null : {
@@ -24,113 +24,113 @@ function tt(e) {
24
24
  hour: "numeric",
25
25
  minute: "2-digit"
26
26
  }),
27
- full: D(t)
27
+ full: C(t)
28
28
  };
29
29
  }
30
- const et = "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-slate-100 text-slate-500 dark:bg-muted dark:text-slate-300";
31
- function at({ entry: e, name: t }) {
32
- const a = z(e).kind, n = a === "view_as" ? /* @__PURE__ */ i(U, { className: "h-3.5 w-3.5" }) : a === "api_key" ? /* @__PURE__ */ i(W, { className: "h-3.5 w-3.5" }) : a === "mcp" ? /* @__PURE__ */ i(q, { className: "h-3.5 w-3.5" }) : a === "import" ? /* @__PURE__ */ i(E, { className: "h-3.5 w-3.5" }) : a === "flow" ? /* @__PURE__ */ i(M, { className: "h-3.5 w-3.5" }) : a === "cron" ? /* @__PURE__ */ i(H, { className: "h-3.5 w-3.5" }) : a === "system" ? /* @__PURE__ */ i(K, { className: "h-3.5 w-3.5" }) : null;
30
+ const at = "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-slate-100 text-slate-500 dark:bg-muted dark:text-slate-300";
31
+ function nt({ entry: e, name: t }) {
32
+ const a = Q(e).kind, n = a === "view_as" ? /* @__PURE__ */ i(U, { className: "h-3.5 w-3.5" }) : a === "api_key" ? /* @__PURE__ */ i(W, { className: "h-3.5 w-3.5" }) : a === "mcp" ? /* @__PURE__ */ i(q, { className: "h-3.5 w-3.5" }) : a === "import" ? /* @__PURE__ */ i(M, { className: "h-3.5 w-3.5" }) : a === "flow" ? /* @__PURE__ */ i(H, { className: "h-3.5 w-3.5" }) : a === "cron" ? /* @__PURE__ */ i(K, { className: "h-3.5 w-3.5" }) : a === "system" ? /* @__PURE__ */ i(O, { className: "h-3.5 w-3.5" }) : null;
33
33
  if (n)
34
- return /* @__PURE__ */ i("span", { className: et, "data-activity-actor": a, "aria-hidden": !0, children: n });
35
- const s = t.split(" ").map((r) => r[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
34
+ return /* @__PURE__ */ i("span", { className: at, "data-activity-actor": a, "aria-hidden": !0, children: n });
35
+ const r = t.split(" ").map((s) => s[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
36
36
  return /* @__PURE__ */ i(
37
- F,
37
+ tt,
38
38
  {
39
39
  userId: e.user ?? e.user_id ?? null,
40
40
  className: "h-6 w-6",
41
- fallback: /* @__PURE__ */ i("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/10 text-[10px] font-semibold text-nvr-navy dark:text-nvr-cyan", children: s })
41
+ fallback: /* @__PURE__ */ i("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/10 text-[10px] font-semibold text-nvr-navy dark:text-nvr-cyan", children: r })
42
42
  }
43
43
  );
44
44
  }
45
- function nt({ entry: e }) {
46
- const t = P(e);
47
- return !t.reason && !t.note && !t.approval ? null : /* @__PURE__ */ o("span", { className: "mt-0.5 block space-y-0.5 text-[11.5px] text-slate-500 dark:text-slate-400", children: [
48
- t.note && /* @__PURE__ */ o("span", { className: "block truncate italic", "data-activity-why": "note", "data-tip": t.note, children: [
45
+ function it({ entry: e }) {
46
+ const t = z(e);
47
+ return !t.reason && !t.note && !t.approval ? null : /* @__PURE__ */ m("span", { className: "mt-0.5 block space-y-0.5 text-[11.5px] text-slate-500 dark:text-slate-400", children: [
48
+ t.note && /* @__PURE__ */ m("span", { className: "block truncate italic", "data-activity-why": "note", "data-tip": t.note, children: [
49
49
  "“",
50
50
  t.note,
51
51
  "”"
52
52
  ] }),
53
- t.reason && /* @__PURE__ */ o("span", { className: "block truncate", "data-activity-why": "reason", "data-tip": t.reason, children: [
53
+ t.reason && /* @__PURE__ */ m("span", { className: "block truncate", "data-activity-why": "reason", "data-tip": t.reason, children: [
54
54
  "Reason: ",
55
55
  t.reason
56
56
  ] }),
57
- t.approval && /* @__PURE__ */ o("span", { className: "block truncate", "data-activity-why": "approval", children: [
57
+ t.approval && /* @__PURE__ */ m("span", { className: "block truncate", "data-activity-why": "approval", children: [
58
58
  "Approval: ",
59
59
  t.approval
60
60
  ] })
61
61
  ] });
62
62
  }
63
- const b = 5;
64
- function it(e, t) {
65
- const a = N(e[0], t);
66
- return e.every((n) => N(n, t) === a);
63
+ const S = 5;
64
+ function st(e, t) {
65
+ const a = w(e[0], t);
66
+ return e.every((n) => w(n, t) === a);
67
67
  }
68
- const S = (e) => {
68
+ const D = (e) => {
69
69
  const t = e.timestamp ? new Date(e.timestamp) : null;
70
70
  return t && !Number.isNaN(t.getTime()) ? Math.floor(t.getTime() / 6e4) : null;
71
71
  };
72
- function st(e) {
73
- const t = S(e[0]);
74
- return t != null && e.every((a) => S(a) === t);
72
+ function rt(e) {
73
+ const t = D(e[0]);
74
+ return t != null && e.every((a) => D(a) === t);
75
75
  }
76
- function rt(e, t, a) {
77
- const n = C(V(e, t), a), s = /^set (.+?) to (.+)$/s.exec(n);
78
- return s ? `${s[1]} → ${s[2]}` : n;
76
+ function lt(e, t, a) {
77
+ const n = T(X(e, t), a), r = /^set (.+?) to (.+)$/s.exec(n);
78
+ return r ? `${r[1]} → ${r[2]}` : n;
79
79
  }
80
- function lt({
80
+ function ct({
81
81
  entry: e,
82
82
  labels: t,
83
83
  omitPhrases: a,
84
84
  seconds: n,
85
- showTime: s
85
+ showTime: r
86
86
  }) {
87
- const r = e.timestamp ? new Date(e.timestamp) : null, m = r && !Number.isNaN(r.getTime()), c = m ? r.toLocaleTimeString([], {
87
+ const s = e.timestamp ? new Date(e.timestamp) : null, o = s && !Number.isNaN(s.getTime()), d = o ? s.toLocaleTimeString([], {
88
88
  hour: "numeric",
89
89
  minute: "2-digit",
90
90
  ...n ? { second: "2-digit" } : {}
91
91
  }) : null;
92
- return /* @__PURE__ */ o("div", { className: "flex items-start gap-2.5 px-2 py-1.5", "data-activity-child": e.id ?? "", children: [
93
- /* @__PURE__ */ i("span", { className: "min-w-0 flex-1 text-[12.5px] leading-5 text-slate-600 dark:text-slate-300", children: rt(e, t, a) }),
94
- s && c && /* @__PURE__ */ i(
92
+ return /* @__PURE__ */ m("div", { className: "flex items-start gap-2.5 px-2 py-1.5", "data-activity-child": e.id ?? "", children: [
93
+ /* @__PURE__ */ i("span", { className: "min-w-0 flex-1 text-[12.5px] leading-5 text-slate-600 dark:text-slate-300", children: lt(e, t, a) }),
94
+ r && d && /* @__PURE__ */ i(
95
95
  "span",
96
96
  {
97
97
  className: "shrink-0 pt-px text-[11px] tabular-nums text-slate-400",
98
- "data-tip": m ? D(r) : void 0,
99
- children: c
98
+ "data-tip": o ? C(s) : void 0,
99
+ children: d
100
100
  }
101
101
  )
102
102
  ] });
103
103
  }
104
- function T({
104
+ function _({
105
105
  entry: e,
106
106
  labels: t,
107
107
  group: a,
108
108
  onOpen: n,
109
- actions: s,
110
- showTime: r = !0,
111
- className: m,
112
- omitPhrases: c,
113
- reserveChevron: d
109
+ actions: r,
110
+ showTime: s = !0,
111
+ className: o,
112
+ omitPhrases: d,
113
+ reserveChevron: c
114
114
  }) {
115
- const [p, _] = k(!1), [v, L] = k(b), l = a && a.length > 1 ? a : null, w = C(
116
- l ? Z(l, t) : G(e, t),
117
- c
118
- ), j = N(e, t), x = tt(e.timestamp), g = !!n || !!l, R = () => {
119
- l ? _((u) => !u) : n == null || n(e);
115
+ const [p, h] = b(!1), [x, L] = b(S), l = a && a.length > 1 ? a : null, g = T(
116
+ l ? G(l, t) : J(e, t),
117
+ d
118
+ ), j = w(e, t), y = et(e.timestamp), k = !!n || !!l, R = () => {
119
+ l ? h((u) => !u) : n == null || n(e);
120
120
  };
121
- return /* @__PURE__ */ o("div", { className: f("min-w-0", m), "data-activity-entry": e.id ?? "", children: [
122
- /* @__PURE__ */ o(
121
+ return /* @__PURE__ */ m("div", { className: v("min-w-0", o), "data-activity-entry": e.id ?? "", children: [
122
+ /* @__PURE__ */ m(
123
123
  "div",
124
124
  {
125
- className: f(
125
+ className: v(
126
126
  "flex w-full items-start gap-2.5 rounded-md px-2 py-2",
127
127
  // Row-background hover, only where a pointer can hover (never stuck after a tap).
128
- g && "[@media(hover:hover)]:hover:bg-slate-50 dark:[@media(hover:hover)]:hover:bg-white/[0.04]"
128
+ k && "[@media(hover:hover)]:hover:bg-slate-50 dark:[@media(hover:hover)]:hover:bg-white/[0.04]"
129
129
  ),
130
130
  children: [
131
- /* @__PURE__ */ i(at, { entry: e, name: j }),
132
- /* @__PURE__ */ o("span", { className: "min-w-0 flex-1 pt-0.5 text-[12.5px] leading-5 text-slate-700 dark:text-slate-200", children: [
133
- g ? /* @__PURE__ */ o(
131
+ /* @__PURE__ */ i(nt, { entry: e, name: j }),
132
+ /* @__PURE__ */ m("span", { className: "min-w-0 flex-1 pt-0.5 text-[12.5px] leading-5 text-slate-700 dark:text-slate-200", children: [
133
+ k ? /* @__PURE__ */ m(
134
134
  "button",
135
135
  {
136
136
  type: "button",
@@ -138,129 +138,134 @@ function T({
138
138
  "aria-expanded": l ? p : void 0,
139
139
  className: "inline-flex max-w-full items-start gap-1 text-left",
140
140
  children: [
141
- l ? p ? /* @__PURE__ */ i(I, { className: "mt-[3px] h-3.5 w-3.5 shrink-0 text-slate-400" }) : /* @__PURE__ */ i($, { className: "mt-[3px] h-3.5 w-3.5 shrink-0 text-slate-400" }) : d && /* @__PURE__ */ i("span", { className: "mt-[3px] h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
142
- /* @__PURE__ */ i("span", { "data-activity-sentence": !0, children: w })
141
+ l ? p ? /* @__PURE__ */ i($, { className: "mt-[3px] h-3.5 w-3.5 shrink-0 text-slate-400" }) : /* @__PURE__ */ i(E, { className: "mt-[3px] h-3.5 w-3.5 shrink-0 text-slate-400" }) : c && /* @__PURE__ */ i("span", { className: "mt-[3px] h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
142
+ /* @__PURE__ */ i("span", { "data-activity-sentence": !0, children: g })
143
143
  ]
144
144
  }
145
- ) : /* @__PURE__ */ o("span", { className: "inline-flex max-w-full items-start gap-1", "data-activity-sentence-wrap": !0, children: [
146
- d && /* @__PURE__ */ i("span", { className: "mt-[3px] h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
147
- /* @__PURE__ */ i("span", { "data-activity-sentence": !0, children: w })
145
+ ) : /* @__PURE__ */ m("span", { className: "inline-flex max-w-full items-start gap-1", "data-activity-sentence-wrap": !0, children: [
146
+ c && /* @__PURE__ */ i("span", { className: "mt-[3px] h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
147
+ /* @__PURE__ */ i("span", { "data-activity-sentence": !0, children: g })
148
148
  ] }),
149
- !l && /* @__PURE__ */ i(nt, { entry: e })
149
+ !l && /* @__PURE__ */ i(it, { entry: e })
150
150
  ] }),
151
- /* @__PURE__ */ i(Y, { label: e.via_agent }),
152
- r && x && /* @__PURE__ */ i(
151
+ /* @__PURE__ */ i(F, { label: e.via_agent }),
152
+ s && y && /* @__PURE__ */ i(
153
153
  "span",
154
154
  {
155
- className: "shrink-0 pt-px text-[11px] tabular-nums text-slate-400",
156
- "data-tip": x.full,
157
- children: x.short
155
+ className: "shrink-0 pt-0.5 text-[11px] leading-5 tabular-nums text-slate-400",
156
+ "data-tip": y.full,
157
+ children: y.short
158
158
  }
159
159
  ),
160
- s && /* @__PURE__ */ i("span", { className: "flex shrink-0 items-center gap-1", children: s })
160
+ r && /* @__PURE__ */ i("span", { className: "flex shrink-0 items-center gap-1", children: r })
161
161
  ]
162
162
  }
163
163
  ),
164
- l && p && /* @__PURE__ */ i("div", { className: "ml-[18px] border-l border-slate-200 pl-3 dark:border-border", children: it(l, t) ? (
164
+ l && p && /* @__PURE__ */ i("div", { className: "ml-[18px] border-l border-slate-200 pl-3 dark:border-border", children: st(l, t) ? (
165
165
  // One person's burst: the summary row already names them, so each child says only
166
166
  // what that write changed (and the time, to the second when they share a minute).
167
- /* @__PURE__ */ o(A, { children: [
168
- l.slice(0, v).map((u, y) => /* @__PURE__ */ i(
169
- lt,
167
+ /* @__PURE__ */ m(A, { children: [
168
+ l.slice(0, x).map((u, N) => /* @__PURE__ */ i(
169
+ ct,
170
170
  {
171
171
  entry: u,
172
172
  labels: t,
173
- omitPhrases: c,
174
- seconds: st(l),
175
- showTime: r
173
+ omitPhrases: d,
174
+ seconds: rt(l),
175
+ showTime: s
176
176
  },
177
- String(u.id ?? y)
177
+ String(u.id ?? N)
178
178
  )),
179
- l.length > v && /* @__PURE__ */ o(
179
+ l.length > x && /* @__PURE__ */ m(
180
180
  "button",
181
181
  {
182
182
  type: "button",
183
183
  "data-activity-show-more": !0,
184
- onClick: () => L((u) => u + b * 4),
184
+ onClick: () => L((u) => u + S * 4),
185
185
  className: "ml-2 py-1.5 text-[12px] font-medium text-nvr-navy hover:underline dark:text-nvr-cyan",
186
186
  children: [
187
187
  "Show ",
188
- l.length - v,
188
+ l.length - x,
189
189
  " more"
190
190
  ]
191
191
  }
192
192
  )
193
193
  ] })
194
- ) : l.map((u, y) => /* @__PURE__ */ i(
195
- T,
194
+ ) : l.map((u, N) => /* @__PURE__ */ i(
195
+ _,
196
196
  {
197
197
  entry: u,
198
198
  labels: t,
199
199
  onOpen: n,
200
- showTime: r,
201
- omitPhrases: c,
202
- reserveChevron: d
200
+ showTime: s,
201
+ omitPhrases: d,
202
+ reserveChevron: c
203
203
  },
204
- String(u.id ?? y)
204
+ String(u.id ?? N)
205
205
  )) })
206
206
  ] });
207
207
  }
208
- function yt({
208
+ function wt({
209
209
  entries: e,
210
210
  labels: t,
211
211
  onOpen: a,
212
212
  actionsFor: n,
213
- empty: s,
214
- className: r,
215
- isFresh: m
213
+ empty: r,
214
+ className: s,
215
+ isFresh: o
216
216
  }) {
217
- const c = h(() => J(e, { labels: t }), [e, t]);
218
- return c.length === 0 ? /* @__PURE__ */ i(A, { children: s ?? null }) : /* @__PURE__ */ i("div", { className: f("divide-y divide-slate-100 dark:divide-border", r), children: c.map((d) => {
217
+ const d = f(() => P(e, { labels: t }), [e, t]);
218
+ return d.length === 0 ? /* @__PURE__ */ i(A, { children: r ?? null }) : /* @__PURE__ */ i("div", { className: v("divide-y divide-slate-100 dark:divide-border", s), children: d.map((c) => {
219
219
  const p = /* @__PURE__ */ i(
220
- T,
220
+ _,
221
221
  {
222
- entry: d.entries[0],
223
- group: d.entries.length > 1 ? d.entries : void 0,
222
+ entry: c.entries[0],
223
+ group: c.entries.length > 1 ? c.entries : void 0,
224
224
  labels: t,
225
225
  onOpen: a,
226
- actions: n == null ? void 0 : n(d)
226
+ actions: n == null ? void 0 : n(c)
227
227
  },
228
- d.key
228
+ c.key
229
229
  );
230
- return m ? /* @__PURE__ */ i(
230
+ return o ? /* @__PURE__ */ i(
231
231
  "div",
232
232
  {
233
- className: f(
234
- m(d.entries[0]) && "motion-safe:animate-[nvr-fade-in_600ms_ease-out_backwards]"
233
+ className: v(
234
+ o(c.entries[0]) && "motion-safe:animate-[nvr-fade-in_600ms_ease-out_backwards]"
235
235
  ),
236
236
  children: p
237
237
  },
238
- d.key
238
+ c.key
239
239
  ) : p;
240
240
  }) });
241
241
  }
242
- function Nt(e, t = {}) {
243
- const a = O(), n = h(() => Q(e), [e]), s = h(() => JSON.stringify(n), [n]), r = n.refs.length === 0 && n.users.length === 0 && n.collections.length === 0, { data: m } = B({
244
- queryKey: ["activity-labels", s],
245
- queryFn: async () => (await a.request(X("/activity/labels", n))).data,
246
- enabled: !!a && !r && t.enabled !== !1,
242
+ function gt(e, t = {}) {
243
+ return ot(e, t).labels;
244
+ }
245
+ function ot(e, t = {}) {
246
+ const a = Z(), n = f(() => V(e), [e]), r = f(() => JSON.stringify(n), [n]), s = n.refs.length === 0 && n.users.length === 0 && n.collections.length === 0, { data: o, isError: d } = B({
247
+ queryKey: ["activity-labels", r],
248
+ queryFn: async () => (await a.request(Y("/activity/labels", n))).data,
249
+ enabled: !!a && !s && t.enabled !== !1,
247
250
  staleTime: 6e4,
248
- retry: !1
249
- });
250
- return h(() => {
251
- let c = null;
251
+ retry: !1,
252
+ placeholderData: I
253
+ }), c = !!a && !s && t.enabled !== !1;
254
+ return { labels: f(() => {
255
+ let h = null;
252
256
  try {
253
- c = Intl.DateTimeFormat().resolvedOptions().timeZone ?? null;
257
+ h = Intl.DateTimeFormat().resolvedOptions().timeZone ?? null;
254
258
  } catch {
255
- c = null;
259
+ h = null;
256
260
  }
257
- return m ? { ...m, timeZone: c } : void 0;
258
- }, [m]);
261
+ return o ? { ...o, timeZone: h } : void 0;
262
+ }, [o]), settled: !c || o !== void 0 || d };
259
263
  }
260
264
  export {
261
- T as ActivityEntry,
262
- yt as ActivityFeed,
263
- rt as childChangeText,
264
- C as omitRecordPhrases,
265
- Nt as useActivityLabels
265
+ _ as ActivityEntry,
266
+ wt as ActivityFeed,
267
+ lt as childChangeText,
268
+ T as omitRecordPhrases,
269
+ gt as useActivityLabels,
270
+ ot as useActivityLabelsState
266
271
  };
@@ -1,31 +1,31 @@
1
- import { jsxs as n, jsx as a } from "react/jsx-runtime";
2
- import { Bot as u } from "lucide-react";
3
- import { useRecordAgents as h, agentSentence as s } from "../lib/agent-presence.js";
4
- import { useMyUserId as p } from "../lib/presence-signals.js";
5
- import { cn as g } from "../lib/utils.js";
6
- function N({
7
- collection: i,
8
- item: l,
9
- className: d
1
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
+ import { Bot as h } from "lucide-react";
3
+ import { useRecordAgents as p, agentSentence as s, agentOwnerPrefix as g } from "../lib/agent-presence.js";
4
+ import { useMyUserId as f } from "../lib/presence-signals.js";
5
+ import { cn as x } from "../lib/utils.js";
6
+ function j({
7
+ collection: d,
8
+ item: o,
9
+ className: m
10
10
  }) {
11
- const t = h(i, l), r = p();
11
+ const t = p(d, o), n = f();
12
12
  if (t.length === 0) return null;
13
- const e = t[0], o = t.map((c) => s(c, r)).join(`
14
- `), m = e.mode === "updating";
15
- return /* @__PURE__ */ n(
13
+ const e = t[0], c = t.map((i) => s(i, n)).join(`
14
+ `), u = e.mode === "updating", l = g(e, n);
15
+ return /* @__PURE__ */ a(
16
16
  "span",
17
17
  {
18
18
  "data-nvr-agent-presence": e.mode,
19
- "data-tip": `${o}
19
+ "data-tip": `${c}
20
20
  An AI assistant working through Nivaro’s MCP server, as that person.`,
21
- className: g(
21
+ className: x(
22
22
  "inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-full border border-slate-200 bg-white py-0.5 pl-1.5 pr-2 text-[11px] leading-4 text-slate-600 motion-safe:animate-[nvr-fade-in_240ms_ease-out_backwards] dark:border-border dark:bg-card dark:text-slate-300",
23
- d
23
+ m
24
24
  ),
25
25
  children: [
26
- /* @__PURE__ */ n("span", { className: "relative flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-slate-100 text-slate-500 dark:bg-muted dark:text-slate-300", children: [
27
- /* @__PURE__ */ a(u, { className: "h-3 w-3", "aria-hidden": !0 }),
28
- m && /* @__PURE__ */ a(
26
+ /* @__PURE__ */ a("span", { className: "relative flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-slate-100 text-slate-500 dark:bg-muted dark:text-slate-300", children: [
27
+ /* @__PURE__ */ r(h, { className: "h-3 w-3", "aria-hidden": !0 }),
28
+ u && /* @__PURE__ */ r(
29
29
  "span",
30
30
  {
31
31
  "aria-hidden": !0,
@@ -33,19 +33,29 @@ An AI assistant working through Nivaro’s MCP server, as that person.`,
33
33
  }
34
34
  )
35
35
  ] }),
36
- /* @__PURE__ */ n("span", { className: "truncate", children: [
37
- /* @__PURE__ */ a("span", { className: "font-medium text-slate-800 dark:text-foreground", children: e.name }),
38
- /* @__PURE__ */ a("span", { className: "hidden sm:inline", children: s(e, r).slice(e.name.length) }),
39
- /* @__PURE__ */ a("span", { className: "sm:hidden", children: s(e, r, !0).slice(e.name.length) })
36
+ /* @__PURE__ */ a("span", { className: "truncate max-sm:hidden", children: [
37
+ /* @__PURE__ */ r("span", { className: "font-medium text-slate-800 dark:text-foreground", children: e.name }),
38
+ s(e, n).slice(e.name.length)
40
39
  ] }),
41
- t.length > 1 && /* @__PURE__ */ n("span", { className: "shrink-0 font-medium tabular-nums text-slate-500 dark:text-slate-400", children: [
40
+ /* @__PURE__ */ a("span", { className: "truncate sm:hidden", children: [
41
+ l ? `${l} ` : "",
42
+ /* @__PURE__ */ r("span", { className: "font-medium text-slate-800 dark:text-foreground", children: e.name }),
43
+ s(e, n, !0).slice(e.name.length)
44
+ ] }),
45
+ t.length > 1 && /* @__PURE__ */ a("span", { className: "shrink-0 font-medium tabular-nums text-slate-500 dark:text-slate-400", children: [
42
46
  "+",
43
- t.length - 1
47
+ t.length - 1,
48
+ /* @__PURE__ */ a("span", { className: "sr-only", children: [
49
+ " ",
50
+ "more:",
51
+ " ",
52
+ t.slice(1).map((i) => s(i, n)).join("; ")
53
+ ] })
44
54
  ] })
45
55
  ]
46
56
  }
47
57
  );
48
58
  }
49
59
  export {
50
- N as AgentPresenceChip
60
+ j as AgentPresenceChip
51
61
  };
@@ -1,24 +1,24 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { Check as k, Copy as N } from "lucide-react";
3
- import { useState as m, useRef as R, useEffect as T } from "react";
4
- import { createPortal as q } from "react-dom";
5
- let v = 0;
6
- const w = "nvr:copy-text";
7
- function A(e, t) {
8
- const r = (l) => l.detail.provide(t());
9
- return e.addEventListener(w, r), () => e.removeEventListener(w, r);
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { Check as P, Copy as q } from "lucide-react";
3
+ import { useState as w, useRef as O, useEffect as T } from "react";
4
+ import { createPortal as S } from "react-dom";
5
+ let f = 0;
6
+ const y = "nvr:copy-text", L = "nvr:record-card-open";
7
+ function j(e, t) {
8
+ const n = (l) => l.detail.provide(t());
9
+ return e.addEventListener(y, n), () => e.removeEventListener(y, n);
10
10
  }
11
- function I(e, t) {
11
+ function k(e, t) {
12
12
  if (!(e != null && e.isConnected)) return Promise.resolve(t);
13
- let r = null;
13
+ let n = null;
14
14
  return e.dispatchEvent(
15
- new CustomEvent(w, {
16
- detail: { provide: (l) => r = l }
15
+ new CustomEvent(y, {
16
+ detail: { provide: (l) => n = l }
17
17
  })
18
- ), r ? r.catch(() => t) : Promise.resolve(t);
18
+ ), n ? n.catch(() => t) : Promise.resolve(t);
19
19
  }
20
- async function O(e) {
21
- var t, r;
20
+ async function D(e) {
21
+ var t, n;
22
22
  if (typeof ClipboardItem < "u" && ((t = navigator.clipboard) != null && t.write))
23
23
  try {
24
24
  await navigator.clipboard.write([
@@ -29,53 +29,57 @@ async function O(e) {
29
29
  return;
30
30
  } catch {
31
31
  }
32
- await ((r = navigator.clipboard) == null ? void 0 : r.writeText(await e));
32
+ await ((n = navigator.clipboard) == null ? void 0 : n.writeText(await e));
33
33
  }
34
- function _() {
35
- const [e, t] = m(null), [r, l] = m(!1), [d, L] = m(!1), u = R(null);
36
- return T(() => (v += 1, L(v === 1), () => {
37
- v -= 1;
34
+ function V() {
35
+ const [e, t] = w(null), [n, l] = w(!1), [u, R] = w(!1), p = O(null);
36
+ return T(() => (f += 1, R(f === 1), () => {
37
+ f -= 1;
38
38
  }), []), T(() => {
39
- if (!d) return;
40
- const i = (P) => {
39
+ if (!u) return;
40
+ const i = (N) => {
41
41
  var C, E;
42
- const o = P.target;
42
+ const o = N.target;
43
43
  if ((C = o == null ? void 0 : o.closest) != null && C.call(o, "[data-cell-copy-btn]")) return;
44
44
  const a = (E = o == null ? void 0 : o.closest) == null ? void 0 : E.call(o, "td");
45
45
  if (!a || !a.closest("[data-copy-cells]") || a.hasAttribute("colspan")) {
46
- t((n) => n && null);
46
+ t((r) => r && null);
47
+ return;
48
+ }
49
+ if (a.querySelector("[data-record-card-anchor]") && document.querySelector("[data-record-card]")) {
50
+ t((r) => r && null);
47
51
  return;
48
52
  }
49
53
  if (a.querySelector('input[type="checkbox"]') || a.querySelector("[data-no-copy]")) {
50
- t((n) => n && null);
54
+ t((r) => r && null);
51
55
  return;
52
56
  }
53
- const p = a.innerText.trim();
54
- if (!p || p === "—") {
55
- t((n) => n && null);
57
+ const v = a.innerText.trim();
58
+ if (!v || v === "—") {
59
+ t((r) => r && null);
56
60
  return;
57
61
  }
58
62
  const s = a.getBoundingClientRect(), h = document.createRange();
59
63
  h.selectNodeContents(a);
60
64
  const b = h.getBoundingClientRect().right || s.right - 24, g = s.right - 24, x = b + 4 <= g ? g : b + 4;
61
65
  if (x + 20 > s.right + 2) {
62
- t((n) => n && null);
66
+ t((r) => r && null);
63
67
  return;
64
68
  }
65
- const c = a.querySelector("[data-copy-source]");
69
+ const d = a.querySelector("[data-copy-source]");
66
70
  t({
67
71
  x,
68
72
  y: s.top + (s.height - 20) / 2,
69
- text: p,
70
- source: c,
71
- label: (c == null ? void 0 : c.getAttribute("data-copy-label")) || null
73
+ text: v,
74
+ source: d,
75
+ label: (d == null ? void 0 : d.getAttribute("data-copy-label")) || null
72
76
  }), l(!1);
73
- }, y = () => t(null);
74
- return window.addEventListener("mouseover", i), window.addEventListener("scroll", y, !0), () => {
75
- window.removeEventListener("mouseover", i), window.removeEventListener("scroll", y, !0);
77
+ }, c = () => t(null);
78
+ return window.addEventListener("mouseover", i), window.addEventListener("scroll", c, !0), window.addEventListener(L, c), () => {
79
+ window.removeEventListener("mouseover", i), window.removeEventListener("scroll", c, !0), window.removeEventListener(L, c);
76
80
  };
77
- }, [d]), !d || !e ? null : q(
78
- /* @__PURE__ */ f(
81
+ }, [u]), !u || !e ? null : S(
82
+ /* @__PURE__ */ m(
79
83
  "button",
80
84
  {
81
85
  type: "button",
@@ -88,18 +92,19 @@ function _() {
88
92
  i.preventDefault(), i.stopPropagation();
89
93
  },
90
94
  onClick: (i) => {
91
- i.preventDefault(), i.stopPropagation(), O(I(e.source, e.text)).then(() => {
92
- l(!0), u.current && clearTimeout(u.current), u.current = setTimeout(() => t(null), 900);
95
+ i.preventDefault(), i.stopPropagation(), D(k(e.source, e.text)).then(() => {
96
+ l(!0), p.current && clearTimeout(p.current), p.current = setTimeout(() => t(null), 900);
93
97
  });
94
98
  },
95
- children: r ? /* @__PURE__ */ f(k, { className: "h-3 w-3 text-emerald-500" }) : /* @__PURE__ */ f(N, { className: "h-3 w-3" })
99
+ children: n ? /* @__PURE__ */ m(P, { className: "h-3 w-3 text-emerald-500" }) : /* @__PURE__ */ m(q, { className: "h-3 w-3" })
96
100
  }
97
101
  ),
98
102
  document.body
99
103
  );
100
104
  }
101
105
  export {
102
- w as COPY_TEXT_EVENT,
103
- _ as CellCopyLayer,
104
- A as provideCopyText
106
+ y as COPY_TEXT_EVENT,
107
+ V as CellCopyLayer,
108
+ L as RECORD_CARD_OPEN_EVENT,
109
+ j as provideCopyText
105
110
  };