@nivaro/react 0.3.114 → 0.3.116

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 (293) hide show
  1. package/dist/components/ScreenShareHost.js +24 -0
  2. package/dist/full.css +50 -2
  3. package/dist/hooks/useSessionRecorder.js +61 -60
  4. package/dist/index.d.ts +1728 -22
  5. package/dist/index.js +1091 -950
  6. package/dist/shared/components/ActivityEntry.js +209 -97
  7. package/dist/shared/components/AgentPresenceChip.js +51 -0
  8. package/dist/shared/components/AnnouncementBanner.js +56 -41
  9. package/dist/shared/components/AutolinkedText.js +98 -85
  10. package/dist/shared/components/BroadcastView.js +149 -141
  11. package/dist/shared/components/CacheStamp.js +78 -30
  12. package/dist/shared/components/CollectionBrowserView.js +4909 -4182
  13. package/dist/shared/components/ConfigChangeStrip.js +63 -0
  14. package/dist/shared/components/ConfigReachNote.js +107 -0
  15. package/dist/shared/components/ConformanceView.js +389 -319
  16. package/dist/shared/components/DataTable.js +612 -551
  17. package/dist/shared/components/DelegateCoverLine.js +164 -0
  18. package/dist/shared/components/EnvironmentNotice.js +56 -65
  19. package/dist/shared/components/FilePreviewLightbox.js +89 -43
  20. package/dist/shared/components/FindingFixedMark.js +23 -0
  21. package/dist/shared/components/GridPresenceLine.js +100 -0
  22. package/dist/shared/components/IdleReloadWatcher.js +82 -43
  23. package/dist/shared/components/InStep.js +46 -0
  24. package/dist/shared/components/ItemEditForm.js +5504 -4889
  25. package/dist/shared/components/LiveAnnouncer.js +62 -0
  26. package/dist/shared/components/LiveCount.js +54 -0
  27. package/dist/shared/components/LiveFigure.js +28 -0
  28. package/dist/shared/components/LiveListControls.js +114 -0
  29. package/dist/shared/components/LiveNewMatchesPill.js +25 -0
  30. package/dist/shared/components/LiveOffNote.js +44 -0
  31. package/dist/shared/components/LivePreferenceHost.js +42 -0
  32. package/dist/shared/components/LiveRowMark.js +25 -20
  33. package/dist/shared/components/LiveTraceView.js +257 -0
  34. package/dist/shared/components/MapView.js +30 -29
  35. package/dist/shared/components/MatrixEditor.js +497 -462
  36. package/dist/shared/components/MyWorkView.js +346 -272
  37. package/dist/shared/components/NotificationBell.js +215 -201
  38. package/dist/shared/components/OverflowRail.js +326 -0
  39. package/dist/shared/components/PageRenderer.js +636 -599
  40. package/dist/shared/components/PresenceDot.js +21 -0
  41. package/dist/shared/components/ProfileView.js +656 -536
  42. package/dist/shared/components/RealtimeStatusBanner.js +25 -25
  43. package/dist/shared/components/RecentRecordsRail.js +51 -48
  44. package/dist/shared/components/RecordCompare.js +241 -150
  45. package/dist/shared/components/RecordDrilldownSheet.js +66 -64
  46. package/dist/shared/components/RecordGridEditor.js +350 -311
  47. package/dist/shared/components/RecordHoverCard.js +147 -0
  48. package/dist/shared/components/RecordPeekHost.js +111 -0
  49. package/dist/shared/components/RecordReadView.js +414 -412
  50. package/dist/shared/components/RelativeTime.js +16 -0
  51. package/dist/shared/components/ReportView.js +1396 -1304
  52. package/dist/shared/components/ScreenRefreshButton.js +77 -0
  53. package/dist/shared/components/TabCountHost.js +10 -0
  54. package/dist/shared/components/TickerNumber.js +19 -18
  55. package/dist/shared/components/TipLayer.js +70 -58
  56. package/dist/shared/components/WidgetImageMenu.js +59 -0
  57. package/dist/shared/components/WidgetSlot.js +571 -524
  58. package/dist/shared/components/activity/RecordActivityStream.js +317 -0
  59. package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
  60. package/dist/shared/components/cbv/approval-changed.js +20 -0
  61. package/dist/shared/components/cbv/changed-by-others.js +251 -0
  62. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
  63. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  65. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  66. package/dist/shared/components/change-proposals/types.js +4 -0
  67. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  68. package/dist/shared/components/chat/Composer.js +276 -298
  69. package/dist/shared/components/chat/room-due.js +13 -0
  70. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  71. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  72. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  73. package/dist/shared/components/imports/ImportConsole.js +159 -155
  74. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  75. package/dist/shared/components/integrations/SendStatus.js +202 -0
  76. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  77. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  78. package/dist/shared/components/integrations/console/SignalCard.js +84 -77
  79. package/dist/shared/components/integrations/console/api.js +161 -117
  80. package/dist/shared/components/integrations/console/tone.js +15 -12
  81. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  82. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  83. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  84. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  85. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  86. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  87. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  88. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  89. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  90. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  91. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  92. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  93. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  94. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  95. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  96. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  97. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  98. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  99. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  100. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  101. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  102. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  103. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  104. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  105. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  106. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  107. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  108. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  109. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  110. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  111. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  112. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  113. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  114. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  115. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  116. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  117. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  118. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  119. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  120. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  121. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  122. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  123. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  124. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  125. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  126. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  127. package/dist/shared/components/item-edit/file-live.js +77 -0
  128. package/dist/shared/components/item-edit/file-processing.js +87 -0
  129. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  130. package/dist/shared/components/item-edit/live-related.js +23 -0
  131. package/dist/shared/components/item-edit/live-title.js +66 -0
  132. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  133. package/dist/shared/components/item-edit/removed-line.js +58 -0
  134. package/dist/shared/components/item-edit/render-stability.js +70 -59
  135. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  136. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  137. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  138. package/dist/shared/components/list/InlineEdit.js +504 -208
  139. package/dist/shared/components/list/ListViewers.js +81 -0
  140. package/dist/shared/components/list/PhonePager.js +50 -0
  141. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  142. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  143. package/dist/shared/components/merge/merge-values.js +110 -0
  144. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  145. package/dist/shared/components/notifications/NotificationCenterView.js +389 -323
  146. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  147. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  148. package/dist/shared/components/notifications/bundles.js +21 -19
  149. package/dist/shared/components/notifications/resolved-line.js +25 -0
  150. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  151. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  152. package/dist/shared/components/panels/AlertBanners.js +132 -0
  153. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  154. package/dist/shared/components/panels/BranchLanes.js +82 -54
  155. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  156. package/dist/shared/components/panels/CommentImages.js +219 -0
  157. package/dist/shared/components/panels/CommentPanel.js +649 -530
  158. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  159. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  160. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  161. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  162. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  163. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  164. package/dist/shared/components/panels/SlaClock.js +130 -99
  165. package/dist/shared/components/panels/TaskPanel.js +308 -287
  166. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  167. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  168. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  169. package/dist/shared/components/pipeline/PipelineEditorView.js +2050 -1942
  170. package/dist/shared/components/profile/AgentNameField.js +141 -0
  171. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  172. package/dist/shared/components/profile/PersonAccess.js +398 -330
  173. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  174. package/dist/shared/components/profile/PersonProfile.js +81 -73
  175. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  176. package/dist/shared/components/queue/OwnerAvatars.js +9 -9
  177. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  178. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  179. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  180. package/dist/shared/components/queue/QueueWorklist.js +2407 -1950
  181. package/dist/shared/components/queue/worklist-helpers.js +10 -6
  182. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  183. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  184. package/dist/shared/components/support/ReportProblem.js +1 -0
  185. package/dist/shared/components/support/ScreenShare.js +554 -0
  186. package/dist/shared/components/support/SupportView.js +160 -129
  187. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  188. package/dist/shared/components/ui/popover.js +53 -29
  189. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  190. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  191. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  192. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  193. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  194. package/dist/shared/lib/activity-sentence.js +87 -75
  195. package/dist/shared/lib/agent-presence.js +46 -0
  196. package/dist/shared/lib/approval-progress.js +49 -0
  197. package/dist/shared/lib/attention-prefs.js +27 -0
  198. package/dist/shared/lib/cell-locks.js +56 -0
  199. package/dist/shared/lib/co-edit.js +166 -0
  200. package/dist/shared/lib/coedit-registry.js +44 -0
  201. package/dist/shared/lib/comment-awareness.js +124 -0
  202. package/dist/shared/lib/comment-images.js +45 -0
  203. package/dist/shared/lib/config-watch.js +94 -0
  204. package/dist/shared/lib/copy-rules.js +65 -0
  205. package/dist/shared/lib/count-step.js +30 -0
  206. package/dist/shared/lib/deadline-ticker.js +68 -0
  207. package/dist/shared/lib/derived-causes.js +115 -0
  208. package/dist/shared/lib/draft-store.js +114 -85
  209. package/dist/shared/lib/error-hints.js +1 -0
  210. package/dist/shared/lib/field-merge.js +126 -0
  211. package/dist/shared/lib/filter-sentence.js +10 -10
  212. package/dist/shared/lib/focus-mode.js +16 -12
  213. package/dist/shared/lib/grid-cursors.js +77 -0
  214. package/dist/shared/lib/grid-presence.js +182 -0
  215. package/dist/shared/lib/idle-reload.js +100 -73
  216. package/dist/shared/lib/in-step.js +45 -0
  217. package/dist/shared/lib/integration-chip.js +19 -18
  218. package/dist/shared/lib/keep-row-focus.js +43 -0
  219. package/dist/shared/lib/line-locks.js +141 -0
  220. package/dist/shared/lib/line-split.js +41 -0
  221. package/dist/shared/lib/linked-changes.js +150 -0
  222. package/dist/shared/lib/list-return.js +231 -0
  223. package/dist/shared/lib/list-viewers.js +52 -0
  224. package/dist/shared/lib/live-announcer.js +86 -0
  225. package/dist/shared/lib/live-counts.js +85 -0
  226. package/dist/shared/lib/live-data-changed.js +108 -0
  227. package/dist/shared/lib/live-deltas.js +81 -0
  228. package/dist/shared/lib/live-findings.js +113 -0
  229. package/dist/shared/lib/live-groups.js +122 -0
  230. package/dist/shared/lib/live-link-labels.js +162 -0
  231. package/dist/shared/lib/live-list-flow.js +334 -0
  232. package/dist/shared/lib/live-list.js +143 -129
  233. package/dist/shared/lib/live-moves.js +51 -0
  234. package/dist/shared/lib/live-ops.js +26 -26
  235. package/dist/shared/lib/live-pickers.js +7 -0
  236. package/dist/shared/lib/live-preference.js +184 -0
  237. package/dist/shared/lib/live-queries.js +226 -181
  238. package/dist/shared/lib/live-screen.js +333 -0
  239. package/dist/shared/lib/live-search.js +108 -0
  240. package/dist/shared/lib/live-seen.js +35 -0
  241. package/dist/shared/lib/live-views.js +100 -0
  242. package/dist/shared/lib/live.js +159 -133
  243. package/dist/shared/lib/missed-updates.js +198 -0
  244. package/dist/shared/lib/newer-file.js +56 -0
  245. package/dist/shared/lib/notification-sound.js +42 -20
  246. package/dist/shared/lib/obligation-banner.js +17 -17
  247. package/dist/shared/lib/own-writes.js +59 -41
  248. package/dist/shared/lib/picker-badges.js +94 -0
  249. package/dist/shared/lib/presence-signals.js +131 -84
  250. package/dist/shared/lib/rail-menu-context.js +9 -0
  251. package/dist/shared/lib/realtime.js +49 -24
  252. package/dist/shared/lib/record-gaps.js +85 -0
  253. package/dist/shared/lib/record-outbox.js +369 -222
  254. package/dist/shared/lib/record-peek.js +75 -0
  255. package/dist/shared/lib/record-tabs.js +92 -72
  256. package/dist/shared/lib/relative-ticker.js +42 -0
  257. package/dist/shared/lib/request-gate.js +119 -119
  258. package/dist/shared/lib/rollup-recalc.js +107 -0
  259. package/dist/shared/lib/room-gaps.js +40 -36
  260. package/dist/shared/lib/row-surface.js +7 -0
  261. package/dist/shared/lib/rum.js +137 -87
  262. package/dist/shared/lib/save-progress.js +20 -0
  263. package/dist/shared/lib/scheduled-countdown.js +67 -0
  264. package/dist/shared/lib/screen-refresh.js +160 -0
  265. package/dist/shared/lib/screen-share.js +234 -0
  266. package/dist/shared/lib/seen-since.js +74 -0
  267. package/dist/shared/lib/selection-watch.js +205 -0
  268. package/dist/shared/lib/send-status.js +132 -0
  269. package/dist/shared/lib/send-view.js +23 -0
  270. package/dist/shared/lib/socket-liveness.js +155 -0
  271. package/dist/shared/lib/socket-realtime.js +168 -140
  272. package/dist/shared/lib/state-census.js +53 -0
  273. package/dist/shared/lib/summary-mode.js +61 -39
  274. package/dist/shared/lib/tab-attention.js +143 -32
  275. package/dist/shared/lib/table-density.js +64 -0
  276. package/dist/shared/lib/table-pins.js +20 -18
  277. package/dist/shared/lib/track-travel.js +40 -0
  278. package/dist/shared/lib/unseen-changes.js +68 -0
  279. package/dist/shared/lib/upload-file.js +62 -0
  280. package/dist/shared/lib/upload-presence.js +127 -0
  281. package/dist/shared/lib/urgent-chime.js +65 -0
  282. package/dist/shared/lib/use-below-md.js +29 -0
  283. package/dist/shared/lib/use-online-users.js +32 -11
  284. package/dist/shared/lib/user-sync.js +155 -39
  285. package/dist/shared/lib/waiting-count.js +44 -0
  286. package/dist/shared/lib/watch-desktop.js +83 -0
  287. package/dist/shared/lib/watch-list.js +447 -0
  288. package/dist/shared/lib/widget-image-render.js +64 -0
  289. package/dist/shared/lib/widget-image.js +111 -0
  290. package/dist/shared/lib/worker-socket.js +130 -104
  291. package/dist/shared/lib/write-to-screen.js +133 -0
  292. package/package.json +1 -1
  293. package/styles.css +49 -1
@@ -1,90 +1,98 @@
1
- import { jsx as n, jsxs as s } from "react/jsx-runtime";
2
- import { useQuery as O, useQueryClient as j, useMutation as q } from "@tanstack/react-query";
3
- import { MessageSquare as D, Link2 as Q, RotateCcw as _, Check as E } from "lucide-react";
4
- import { useState as v, useMemo as y } from "react";
5
- import { toast as x } from "sonner";
6
- import { useNivaroClient as T } from "../../context.js";
7
- import { get as I, post as R } from "../../lib/commands.js";
8
- import { openFieldCommentCounts as A, fieldThread as B, fieldDeepLinkQuery as H } from "../../lib/field-comments.js";
9
- import { cn as L, formatRelative as U } from "../../lib/utils.js";
10
- import { AutolinkedText as W } from "../AutolinkedText.js";
11
- import { MentionTextarea as z } from "../panels/CommentPanel.js";
12
- import { Popover as G, PopoverTrigger as J, PopoverContent as V } from "../ui/popover.js";
13
- import { useFieldComments as X } from "./field-comments-context.js";
14
- const S = (t, o) => ["comments", t, o];
1
+ import { jsx as n, jsxs as a } from "react/jsx-runtime";
2
+ import { useQuery as Q, useQueryClient as E, useMutation as _ } from "@tanstack/react-query";
3
+ import { MessageSquare as U, Link2 as W, RotateCcw as A, Check as H } from "lucide-react";
4
+ import { useState as b, useMemo as v } from "react";
5
+ import { toast as g } from "sonner";
6
+ import { useNivaroClient as I } from "../../context.js";
7
+ import { get as z, post as q } from "../../lib/commands.js";
8
+ import { useRepliesWhileTyping as G } from "../../lib/comment-awareness.js";
9
+ import { openFieldCommentCounts as J, fieldThread as V, fieldDeepLinkQuery as X } from "../../lib/field-comments.js";
10
+ import { useDraftTypingSignal as Y, useRecordSignalPeers as Z, useMyUserId as ee, signalSentence as te } from "../../lib/presence-signals.js";
11
+ import { cn as L, formatRelative as oe } from "../../lib/utils.js";
12
+ import { RepliesWhileTyping as ne, SeenByLine as re, MentionDeliveryButton as ie } from "../panels/CommentAwareness.js";
13
+ import { useCommentImages as ae, CommentImageStrip as se, CommentBody as le } from "../panels/CommentImages.js";
14
+ import { notePreviewText as de, MentionTextarea as me } from "../panels/CommentPanel.js";
15
+ import { Popover as ce, PopoverTrigger as pe, PopoverContent as ue } from "../ui/popover.js";
16
+ import { useFieldComments as he } from "./field-comments-context.js";
17
+ const M = (t, o) => ["comments", t, o];
15
18
  function K(t, o, r) {
16
- const a = T();
17
- return O({
18
- queryKey: S(t, o),
19
- queryFn: () => a.request(I("/comments", { collection: t, item: o })).then((d) => d.data),
19
+ const i = I();
20
+ return Q({
21
+ queryKey: M(t, o),
22
+ queryFn: () => i.request(z("/comments", { collection: t, item: o })).then((m) => m.data),
20
23
  enabled: r
21
24
  });
22
25
  }
23
- function he(t) {
24
- const o = t.itemId == null ? "" : String(t.itemId), r = t.enabled && o !== "" && o !== "new", { data: a } = K(t.collection, o, r), [d, c] = v(null), l = y(() => A(a ?? []), [a]), { labelOf: i, jump: p, collection: u } = t;
25
- return y(
26
- () => r ? { collection: u, item: o, counts: l, openField: d, setOpenField: c, labelOf: i, jump: p } : null,
27
- [r, u, o, l, d, i, p]
26
+ function De(t) {
27
+ const o = t.itemId == null ? "" : String(t.itemId), r = t.enabled && o !== "" && o !== "new", { data: i } = K(t.collection, o, r), [m, s] = b(null), c = v(() => J(i ?? []), [i]), { labelOf: l, jump: u, collection: f } = t;
28
+ return v(
29
+ () => r ? { collection: f, item: o, counts: c, openField: m, setOpenField: s, labelOf: l, jump: u } : null,
30
+ [r, f, o, c, m, l, u]
28
31
  );
29
32
  }
30
- function Y(t) {
33
+ function D(t) {
31
34
  return t ? [t.first_name, t.last_name].filter(Boolean).join(" ") || t.email : "Someone";
32
35
  }
33
- function xe({ field: t, label: o }) {
34
- const r = X();
35
- return r ? /* @__PURE__ */ n(Z, { ctx: r, field: t, label: o }) : null;
36
+ function Ie({ field: t, label: o }) {
37
+ const r = he();
38
+ return r ? /* @__PURE__ */ n(xe, { ctx: r, field: t, label: o }) : null;
36
39
  }
37
- function Z({
40
+ function xe({
38
41
  ctx: t,
39
42
  field: o,
40
43
  label: r
41
44
  }) {
42
- const a = t.counts[o] ?? 0, d = t.openField === o;
43
- return /* @__PURE__ */ s(G, { open: d, onOpenChange: (c) => t.setOpenField(c ? o : null), children: [
44
- /* @__PURE__ */ n(J, { asChild: !0, children: /* @__PURE__ */ s(
45
+ const i = t.counts[o] ?? 0, m = t.openField === o;
46
+ return /* @__PURE__ */ a(ce, { open: m, onOpenChange: (s) => t.setOpenField(s ? o : null), children: [
47
+ /* @__PURE__ */ n(pe, { asChild: !0, children: /* @__PURE__ */ a(
45
48
  "button",
46
49
  {
47
50
  type: "button",
48
51
  "data-field-comment": o,
49
- "data-field-comment-count": a || void 0,
50
- "aria-label": a ? `${a} open ${a === 1 ? "comment" : "comments"} on ${r}` : `Comment on ${r}`,
51
- "data-tip": a ? void 0 : `Comment on ${r}`,
52
+ "data-field-comment-count": i || void 0,
53
+ "aria-label": i ? `${i} open ${i === 1 ? "comment" : "comments"} on ${r}` : `Comment on ${r}`,
54
+ "data-tip": i ? void 0 : `Comment on ${r}`,
52
55
  className: L(
53
56
  "inline-flex items-center gap-0.5 rounded px-0.5 py-0.5 text-[10px] font-semibold transition-[opacity,color]",
54
- a || d ? "text-[#0e7490] opacity-100 dark:text-nvr-cyan" : "text-slate-400 opacity-0 hover:text-[#0e7490] focus-visible:opacity-100 group-hover/fieldrow:opacity-100 group-focus-within/fieldrow:opacity-100 dark:text-slate-400 dark:hover:text-nvr-cyan"
57
+ i || m ? "text-[#0e7490] opacity-100 dark:text-nvr-cyan" : "text-slate-400 opacity-0 hover:text-[#0e7490] focus-visible:opacity-100 group-hover/fieldrow:opacity-100 group-focus-within/fieldrow:opacity-100 dark:text-slate-400 dark:hover:text-nvr-cyan"
55
58
  ),
56
59
  children: [
57
- /* @__PURE__ */ n(D, { "aria-hidden": !0, className: "h-3 w-3" }),
58
- a > 0 && /* @__PURE__ */ n("span", { className: "tabular-nums", children: a })
60
+ /* @__PURE__ */ n(U, { "aria-hidden": !0, className: "h-3 w-3" }),
61
+ i > 0 && /* @__PURE__ */ n("span", { className: "tabular-nums", children: i })
59
62
  ]
60
63
  }
61
64
  ) }),
62
65
  /* @__PURE__ */ n(
63
- V,
66
+ ue,
64
67
  {
65
68
  align: "start",
66
69
  className: "w-[340px] p-0",
67
- onInteractOutside: (c) => {
68
- var i;
69
- const l = c.target;
70
- (i = l == null ? void 0 : l.closest) != null && i.call(l, "[data-mention-menu]") && c.preventDefault();
70
+ onInteractOutside: (s) => {
71
+ var l;
72
+ const c = s.target;
73
+ (l = c == null ? void 0 : c.closest) != null && l.call(c, "[data-mention-menu]") && s.preventDefault();
71
74
  },
72
- children: d && /* @__PURE__ */ n(ee, { ctx: t, field: o, label: r })
75
+ children: m && /* @__PURE__ */ n(fe, { ctx: t, field: o, label: r })
73
76
  }
74
77
  )
75
78
  ] });
76
79
  }
77
- function ee({
80
+ function fe({
78
81
  ctx: t,
79
82
  field: o,
80
83
  label: r
81
84
  }) {
82
- const a = T(), d = j(), { data: c, isLoading: l } = K(t.collection, t.item, !0), i = y(() => B(c ?? [], o), [c, o]), [p, u] = v(!1), [f, g] = v(""), b = () => d.invalidateQueries({ queryKey: S(t.collection, t.item) }), k = (e, m) => {
83
- var $, F, P;
84
- return ((F = ($ = e == null ? void 0 : e.response) == null ? void 0 : $.data) == null ? void 0 : F.error) ?? ((P = e == null ? void 0 : e.data) == null ? void 0 : P.error) ?? m;
85
- }, h = q({
86
- mutationFn: (e) => a.request(
87
- R("/comments", {
85
+ const i = I(), m = E(), { data: s, isLoading: c } = K(t.collection, t.item, !0), l = v(() => V(s ?? [], o), [s, o]), [u, f] = b(!1), [h, k] = b(""), p = ae();
86
+ Y(t.collection, t.item, h, o);
87
+ const w = Z(t.collection, t.item, "note", { field: o }), O = ee(), j = v(
88
+ () => (s ?? []).filter((e) => e.field === o && !e.resolved_at),
89
+ [s, o]
90
+ ), C = G(h, s ? j : void 0, O), N = () => m.invalidateQueries({ queryKey: M(t.collection, t.item) }), F = (e, d) => {
91
+ var x, T, P;
92
+ return ((T = (x = e == null ? void 0 : e.response) == null ? void 0 : x.data) == null ? void 0 : T.error) ?? ((P = e == null ? void 0 : e.data) == null ? void 0 : P.error) ?? d;
93
+ }, y = _({
94
+ mutationFn: (e) => i.request(
95
+ q("/comments", {
88
96
  collection: t.collection,
89
97
  item: t.item,
90
98
  text: e,
@@ -93,57 +101,64 @@ function ee({
93
101
  })
94
102
  ),
95
103
  onSuccess: () => {
96
- g(""), b();
104
+ k(""), p.reset(), N();
97
105
  },
98
- onError: (e) => x.error(k(e, "Could not post the comment"))
99
- }), w = q({
100
- mutationFn: ({ id: e, resolved: m }) => a.request(R(`/comments/${e}/resolve`, { resolved: m })),
101
- onSuccess: () => void b(),
102
- onError: (e) => x.error(k(e, "Could not update the comment"))
103
- }), C = () => {
104
- const e = f.trim();
105
- e && !h.isPending && h.mutate(e);
106
- }, M = () => {
106
+ onError: (e) => g.error(F(e, "Could not post the comment"))
107
+ }), $ = _({
108
+ mutationFn: ({ id: e, resolved: d }) => i.request(q(`/comments/${e}/resolve`, { resolved: d })),
109
+ onSuccess: () => void N(),
110
+ onError: (e) => g.error(F(e, "Could not update the comment"))
111
+ }), R = () => {
112
+ const e = p.compose(h);
113
+ e && !p.uploading && !y.isPending && y.mutate(e);
114
+ }, B = () => {
107
115
  const e = new URL(window.location.href);
108
116
  e.searchParams.delete("field");
109
- const m = e.search ? "&" : "?";
110
- navigator.clipboard.writeText(`${e.origin}${e.pathname}${e.search}${m}${H(o)}`).then(
111
- () => x.success("Link to this field copied"),
112
- () => x.error("Could not copy")
117
+ const d = e.search ? "&" : "?";
118
+ navigator.clipboard.writeText(`${e.origin}${e.pathname}${e.search}${d}${X(o)}`).then(
119
+ () => g.success("Link to this field copied"),
120
+ () => g.error("Could not copy")
113
121
  );
114
- }, N = (e, m) => /* @__PURE__ */ s("li", { "data-field-comment-row": e.id, className: "px-3 py-2", children: [
115
- /* @__PURE__ */ s("div", { className: "flex items-baseline gap-1.5", children: [
116
- /* @__PURE__ */ n("span", { className: "truncate text-[12px] font-medium text-slate-800 dark:text-foreground", children: Y(e.user) }),
117
- /* @__PURE__ */ n("span", { className: "shrink-0 text-[11px] text-slate-400 dark:text-muted-foreground", children: U(e.created_at) }),
118
- /* @__PURE__ */ s(
119
- "button",
122
+ }, S = (e, d) => {
123
+ var x;
124
+ return /* @__PURE__ */ a("li", { "data-field-comment-row": e.id, className: "px-3 py-2", children: [
125
+ /* @__PURE__ */ a("div", { className: "flex items-baseline gap-1.5", children: [
126
+ /* @__PURE__ */ n("span", { className: "truncate text-[12px] font-medium text-slate-800 dark:text-foreground", children: D(e.user) }),
127
+ /* @__PURE__ */ n("span", { className: "shrink-0 text-[11px] text-slate-400 dark:text-muted-foreground", children: oe(e.created_at) }),
128
+ /* @__PURE__ */ a(
129
+ "button",
130
+ {
131
+ type: "button",
132
+ disabled: $.isPending,
133
+ onClick: () => $.mutate({ id: e.id, resolved: !d }),
134
+ "data-field-comment-resolve": e.id,
135
+ className: "ml-auto inline-flex shrink-0 items-center gap-1 rounded px-1 py-px text-[11px] text-slate-500 transition-colors hover:bg-muted hover:text-slate-800 disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground",
136
+ children: [
137
+ d ? /* @__PURE__ */ n(A, { "aria-hidden": !0, className: "h-3 w-3" }) : /* @__PURE__ */ n(H, { "aria-hidden": !0, className: "h-3 w-3" }),
138
+ d ? "Reopen" : "Resolve"
139
+ ]
140
+ }
141
+ )
142
+ ] }),
143
+ /* @__PURE__ */ n(
144
+ le,
120
145
  {
121
- type: "button",
122
- disabled: w.isPending,
123
- onClick: () => w.mutate({ id: e.id, resolved: !m }),
124
- "data-field-comment-resolve": e.id,
125
- className: "ml-auto inline-flex shrink-0 items-center gap-1 rounded px-1 py-px text-[11px] text-slate-500 transition-colors hover:bg-muted hover:text-slate-800 disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground",
126
- children: [
127
- m ? /* @__PURE__ */ n(_, { "aria-hidden": !0, className: "h-3 w-3" }) : /* @__PURE__ */ n(E, { "aria-hidden": !0, className: "h-3 w-3" }),
128
- m ? "Reopen" : "Resolve"
129
- ]
146
+ text: e.text,
147
+ className: L(
148
+ "m-0 mt-0.5 whitespace-pre-wrap text-[12.5px] leading-snug [overflow-wrap:anywhere]",
149
+ d ? "text-slate-400 dark:text-muted-foreground" : "text-slate-600 dark:text-slate-300"
150
+ )
130
151
  }
131
- )
132
- ] }),
133
- /* @__PURE__ */ n(
134
- "p",
135
- {
136
- className: L(
137
- "m-0 mt-0.5 whitespace-pre-wrap text-[12.5px] leading-snug [overflow-wrap:anywhere]",
138
- m ? "text-slate-400 dark:text-muted-foreground" : "text-slate-600 dark:text-slate-300"
139
- ),
140
- children: /* @__PURE__ */ n(W, { text: e.text })
141
- }
142
- )
143
- ] }, e.id);
144
- return /* @__PURE__ */ s("div", { "data-field-comments": o, children: [
145
- /* @__PURE__ */ s("div", { className: "flex items-center gap-2 border-b border-slate-200 px-3 py-2 dark:border-border", children: [
146
- /* @__PURE__ */ s("p", { className: "m-0 min-w-0 flex-1 truncate text-[12px] font-semibold text-slate-700 dark:text-foreground", children: [
152
+ ),
153
+ !d && ((((x = e.seen_by) == null ? void 0 : x.length) ?? 0) > 0 || e.delivery_visible) && /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-x-2", children: [
154
+ /* @__PURE__ */ n(re, { people: e.seen_by }),
155
+ e.delivery_visible && /* @__PURE__ */ n(ie, { collection: t.collection, item: t.item, commentId: e.id })
156
+ ] })
157
+ ] }, e.id);
158
+ };
159
+ return /* @__PURE__ */ a("div", { "data-field-comments": o, children: [
160
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2 border-b border-slate-200 px-3 py-2 dark:border-border", children: [
161
+ /* @__PURE__ */ a("p", { className: "m-0 min-w-0 flex-1 truncate text-[12px] font-semibold text-slate-700 dark:text-foreground", children: [
147
162
  "Comments on ",
148
163
  r
149
164
  ] }),
@@ -151,55 +166,83 @@ function ee({
151
166
  "button",
152
167
  {
153
168
  type: "button",
154
- onClick: M,
169
+ onClick: B,
155
170
  "aria-label": `Copy a link to ${r}`,
156
171
  "data-tip": "Copy a link that opens the record on this field",
157
172
  className: "rounded p-1 text-slate-400 transition-colors hover:bg-muted hover:text-slate-700 dark:hover:text-foreground",
158
- children: /* @__PURE__ */ n(Q, { "aria-hidden": !0, className: "h-3.5 w-3.5" })
173
+ children: /* @__PURE__ */ n(W, { "aria-hidden": !0, className: "h-3.5 w-3.5" })
159
174
  }
160
175
  )
161
176
  ] }),
162
- /* @__PURE__ */ s("div", { className: "max-h-[260px] overflow-y-auto overscroll-contain", children: [
163
- l ? /* @__PURE__ */ n("p", { className: "m-0 px-3 py-3 text-[12px] text-slate-400 dark:text-muted-foreground", children: "Loading…" }) : i.open.length === 0 && i.resolved.length === 0 ? /* @__PURE__ */ n("p", { className: "m-0 px-3 py-3 text-[12px] text-slate-500 dark:text-muted-foreground", children: "No comments on this field yet. They also show in the record’s Comments." }) : /* @__PURE__ */ s("ul", { className: "m-0 list-none divide-y divide-slate-100 p-0 dark:divide-border", children: [
164
- i.open.map((e) => N(e, !1)),
165
- p && i.resolved.map((e) => N(e, !0))
177
+ /* @__PURE__ */ a("div", { className: "max-h-[260px] overflow-y-auto overscroll-contain", children: [
178
+ c ? /* @__PURE__ */ n("p", { className: "m-0 px-3 py-3 text-[12px] text-slate-400 dark:text-muted-foreground", children: "Loading…" }) : l.open.length === 0 && l.resolved.length === 0 ? /* @__PURE__ */ n("p", { className: "m-0 px-3 py-3 text-[12px] text-slate-500 dark:text-muted-foreground", children: "No comments on this field yet. They also show in the record’s Comments." }) : /* @__PURE__ */ a("ul", { className: "m-0 list-none divide-y divide-slate-100 p-0 dark:divide-border", children: [
179
+ l.open.map((e) => S(e, !1)),
180
+ u && l.resolved.map((e) => S(e, !0))
166
181
  ] }),
167
- i.resolved.length > 0 && /* @__PURE__ */ n(
182
+ l.resolved.length > 0 && /* @__PURE__ */ n(
168
183
  "button",
169
184
  {
170
185
  type: "button",
171
- onClick: () => u((e) => !e),
172
- "aria-expanded": p,
186
+ onClick: () => f((e) => !e),
187
+ "aria-expanded": u,
173
188
  className: "block w-full px-3 py-1.5 text-left text-[11px] text-slate-500 transition-colors hover:bg-muted dark:text-muted-foreground",
174
- children: p ? "Hide resolved" : `${i.resolved.length} resolved`
189
+ children: u ? "Hide resolved" : `${l.resolved.length} resolved`
175
190
  }
176
191
  )
177
192
  ] }),
178
- /* @__PURE__ */ s("div", { className: "space-y-1.5 border-t border-slate-200 p-2 dark:border-border", children: [
193
+ w.length > 0 && /* @__PURE__ */ a(
194
+ "p",
195
+ {
196
+ "data-field-comment-typing": o,
197
+ "aria-live": "polite",
198
+ className: "m-0 flex items-center gap-1.5 border-t border-slate-100 px-3 py-1.5 text-[11.5px] italic text-slate-400 dark:border-border dark:text-slate-500",
199
+ children: [
200
+ /* @__PURE__ */ n("span", { className: "h-1.5 w-1.5 animate-pulse rounded-full bg-nvr-cyan motion-reduce:animate-none" }),
201
+ te(w, "replying"),
202
+ "…"
203
+ ]
204
+ }
205
+ ),
206
+ /* @__PURE__ */ a("div", { className: "space-y-1.5 border-t border-slate-200 p-2 dark:border-border", children: [
207
+ /* @__PURE__ */ n(
208
+ ne,
209
+ {
210
+ compact: !0,
211
+ replies: C.replies.map((e) => ({
212
+ id: e.id,
213
+ name: D(e.user),
214
+ text: de({ kind: "comment", comment: e }),
215
+ created_at: e.created_at
216
+ })),
217
+ onDismiss: C.dismiss
218
+ }
219
+ ),
179
220
  /* @__PURE__ */ n(
180
- z,
221
+ me,
181
222
  {
182
- value: f,
183
- onChange: g,
223
+ value: h,
224
+ onChange: k,
225
+ onImages: p.addFiles,
184
226
  rows: 2,
185
227
  "aria-label": `Comment on ${r}`,
186
228
  placeholder: "Write a comment… type @ to mention someone",
187
229
  className: "min-h-[56px] text-[12.5px]",
188
230
  onKeyDownCapture: (e) => {
189
- e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), C());
231
+ e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), R());
190
232
  }
191
233
  }
192
234
  ),
193
- /* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-2", children: [
235
+ /* @__PURE__ */ n(se, { images: p }),
236
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-2", children: [
194
237
  /* @__PURE__ */ n("span", { className: "text-[11px] text-slate-400 dark:text-muted-foreground", children: "Only people who can open this record are notified." }),
195
238
  /* @__PURE__ */ n(
196
239
  "button",
197
240
  {
198
241
  type: "button",
199
- onClick: C,
200
- disabled: !f.trim() || h.isPending,
242
+ onClick: R,
243
+ disabled: !h.trim() && !p.hasReady || p.uploading || y.isPending,
201
244
  className: "inline-flex h-7 shrink-0 items-center rounded-md bg-nvr-cyan px-2.5 text-[12px] font-medium text-white transition-colors hover:bg-nvr-cyan-dark disabled:opacity-50",
202
- children: h.isPending ? "Posting…" : "Comment"
245
+ children: y.isPending ? "Posting…" : p.uploading ? "Uploading…" : "Comment"
203
246
  }
204
247
  )
205
248
  ] })
@@ -207,6 +250,6 @@ function ee({
207
250
  ] });
208
251
  }
209
252
  export {
210
- xe as FieldCommentButton,
211
- he as useFieldCommentsApi
253
+ Ie as FieldCommentButton,
254
+ De as useFieldCommentsApi
212
255
  };
@@ -0,0 +1,132 @@
1
+ import { jsxs as d, Fragment as R, jsx as i } from "react/jsx-runtime";
2
+ import { Crosshair as q, X as T } from "lucide-react";
3
+ import { useState as D, useRef as m, useEffect as u } from "react";
4
+ import { createPortal as E } from "react-dom";
5
+ import { toast as g } from "sonner";
6
+ import { useFieldPointer as H, useCoViewers as j, pointMayScroll as F, pointRefusalText as I } from "../../lib/co-edit.js";
7
+ import { useLivePreference as L } from "../../lib/live-preference.js";
8
+ import { CoViewerAvatar as M } from "./SectionPresence.js";
9
+ const O = 6e4, _ = 6e3;
10
+ let C = 0, k = !1;
11
+ function z() {
12
+ if (k || typeof document > "u") return;
13
+ k = !0;
14
+ const e = () => {
15
+ C = Date.now();
16
+ };
17
+ for (const n of ["pointerdown", "wheel", "keydown", "touchstart"])
18
+ document.addEventListener(n, e, { capture: !0, passive: !0 });
19
+ }
20
+ function A() {
21
+ var n;
22
+ const e = typeof document < "u" ? document.activeElement : null;
23
+ return !e || e === document.body ? !1 : ((n = e.matches) == null ? void 0 : n.call(e, 'input, textarea, select, [contenteditable="true"], [role="combobox"]')) ?? !1;
24
+ }
25
+ function G() {
26
+ return typeof document < "u" && !!document.querySelector('[data-radix-popper-content-wrapper], [role="menu"]');
27
+ }
28
+ function Y({
29
+ collection: e,
30
+ itemId: n,
31
+ fieldLabel: s,
32
+ onGo: a
33
+ }) {
34
+ var w;
35
+ const { pointer: o, result: t, dismiss: S } = H(e, n), N = j(e, n), { quiet: h } = L(), [r, c] = D(null), b = m(null), f = m(a);
36
+ f.current = a;
37
+ const x = m(h);
38
+ x.current = h, u(() => z(), []), u(() => {
39
+ if (!o) return;
40
+ const p = F({
41
+ quiet: x.current,
42
+ visible: typeof document > "u" || document.visibilityState === "visible",
43
+ editingSomething: A(),
44
+ popoverOpen: G(),
45
+ lastInputAt: C,
46
+ now: Date.now()
47
+ }) ? f.current(o.field) : !1;
48
+ c({ p: o, scrolled: p }), S();
49
+ }, [o == null ? void 0 : o.at]), u(() => {
50
+ if (!r) return;
51
+ const l = setTimeout(() => c(null), r.scrolled ? _ : O);
52
+ return () => clearTimeout(l);
53
+ }, [r]), u(() => {
54
+ var y;
55
+ if (!t) return;
56
+ const l = (y = N.find((P) => P.id.toUpperCase() === t.to.toUpperCase())) == null ? void 0 : y.name, p = l ?? "They";
57
+ t.ok ? g(`${p} was pointed to ${s(t.field)}`) : g.info(I(t.reason, l ?? "That person"));
58
+ }, [t == null ? void 0 : t.seq]);
59
+ const v = ((w = b.current) == null ? void 0 : w.closest('[role="dialog"]')) ?? (typeof document < "u" ? document.body : null);
60
+ return /* @__PURE__ */ d(R, { children: [
61
+ /* @__PURE__ */ i("span", { ref: b, hidden: !0 }),
62
+ r && v && E(
63
+ /* @__PURE__ */ i(
64
+ U,
65
+ {
66
+ pointer: r.p,
67
+ label: s(r.p.field),
68
+ scrolled: r.scrolled,
69
+ onGo: () => {
70
+ f.current(r.p.field), c(null);
71
+ },
72
+ onClose: () => c(null)
73
+ }
74
+ ),
75
+ v
76
+ )
77
+ ] });
78
+ }
79
+ function U({
80
+ pointer: e,
81
+ label: n,
82
+ scrolled: s,
83
+ onGo: a,
84
+ onClose: o
85
+ }) {
86
+ const t = e.user;
87
+ return /* @__PURE__ */ d(
88
+ "div",
89
+ {
90
+ role: "status",
91
+ "aria-live": "polite",
92
+ "data-field-pointer": e.field,
93
+ className: "nvr-slide-up-centered fixed bottom-5 left-1/2 z-[60] flex max-w-[calc(100vw-32px)] -translate-x-1/2 items-center gap-2 rounded-full border border-slate-200 bg-white py-1 pl-1.5 pr-1 text-[12.5px] text-slate-700 shadow-lg shadow-slate-900/5 dark:border-border dark:bg-card dark:text-slate-200 dark:shadow-black/30",
94
+ children: [
95
+ /* @__PURE__ */ i(M, { person: t, size: 22 }),
96
+ /* @__PURE__ */ d("span", { className: "min-w-0 truncate", children: [
97
+ /* @__PURE__ */ i("span", { className: "font-medium text-slate-900 dark:text-slate-50", children: t.name }),
98
+ " ",
99
+ s ? "pointed you here:" : "pointed you to",
100
+ " ",
101
+ /* @__PURE__ */ i("span", { className: "font-medium text-slate-900 dark:text-slate-50", children: n })
102
+ ] }),
103
+ !s && /* @__PURE__ */ d(
104
+ "button",
105
+ {
106
+ type: "button",
107
+ onClick: a,
108
+ "data-field-pointer-go": "",
109
+ className: "inline-flex shrink-0 items-center gap-1 rounded px-1.5 py-1 text-[12px] font-semibold text-[#0e7490] underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:text-nvr-cyan",
110
+ children: [
111
+ /* @__PURE__ */ i(q, { className: "h-3 w-3", "aria-hidden": !0 }),
112
+ "Go"
113
+ ]
114
+ }
115
+ ),
116
+ /* @__PURE__ */ i(
117
+ "button",
118
+ {
119
+ type: "button",
120
+ onClick: o,
121
+ "aria-label": "Dismiss",
122
+ className: "inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-slate-400 hover:bg-slate-100 hover:text-slate-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:hover:bg-muted dark:hover:text-slate-300",
123
+ children: /* @__PURE__ */ i(T, { className: "h-3.5 w-3.5" })
124
+ }
125
+ )
126
+ ]
127
+ }
128
+ );
129
+ }
130
+ export {
131
+ Y as FieldPointerHost
132
+ };