@nivaro/react 0.3.113 → 0.3.115

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 (285) 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 +1727 -19
  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 +4088 -3592
  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 +544 -504
  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/PageRenderer.js +636 -599
  39. package/dist/shared/components/PresenceDot.js +21 -0
  40. package/dist/shared/components/ProfileView.js +656 -536
  41. package/dist/shared/components/RealtimeStatusBanner.js +25 -25
  42. package/dist/shared/components/RecentRecordsRail.js +51 -48
  43. package/dist/shared/components/RecordCompare.js +241 -150
  44. package/dist/shared/components/RecordDrilldownSheet.js +66 -64
  45. package/dist/shared/components/RecordGridEditor.js +350 -311
  46. package/dist/shared/components/RecordHoverCard.js +147 -0
  47. package/dist/shared/components/RecordPeekHost.js +111 -0
  48. package/dist/shared/components/RecordReadView.js +414 -412
  49. package/dist/shared/components/RelativeTime.js +16 -0
  50. package/dist/shared/components/ReportView.js +1396 -1304
  51. package/dist/shared/components/ScreenRefreshButton.js +77 -0
  52. package/dist/shared/components/TabCountHost.js +10 -0
  53. package/dist/shared/components/TickerNumber.js +19 -18
  54. package/dist/shared/components/TipLayer.js +70 -58
  55. package/dist/shared/components/WidgetImageMenu.js +59 -0
  56. package/dist/shared/components/WidgetSlot.js +571 -524
  57. package/dist/shared/components/activity/RecordActivityStream.js +317 -0
  58. package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
  59. package/dist/shared/components/cbv/approval-changed.js +20 -0
  60. package/dist/shared/components/cbv/changed-by-others.js +251 -0
  61. package/dist/shared/components/cbv/column-totals.js +75 -67
  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/api.js +161 -117
  79. package/dist/shared/components/integrations/console/tone.js +15 -12
  80. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  81. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  82. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  83. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  84. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  85. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  86. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  87. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  88. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  89. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  90. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  91. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  92. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  93. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  94. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  95. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  96. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  97. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  98. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  99. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  100. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  101. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  102. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  103. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  104. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  105. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  106. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  107. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  108. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  109. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  110. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  111. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  112. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  113. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  114. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  115. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  116. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  117. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  118. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  119. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  120. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  121. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  122. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  123. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  124. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  125. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  126. package/dist/shared/components/item-edit/file-live.js +77 -0
  127. package/dist/shared/components/item-edit/file-processing.js +87 -0
  128. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  129. package/dist/shared/components/item-edit/live-related.js +23 -0
  130. package/dist/shared/components/item-edit/live-title.js +66 -0
  131. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  132. package/dist/shared/components/item-edit/removed-line.js +58 -0
  133. package/dist/shared/components/item-edit/render-stability.js +70 -59
  134. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  135. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  136. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  137. package/dist/shared/components/list/InlineEdit.js +504 -208
  138. package/dist/shared/components/list/ListViewers.js +81 -0
  139. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  140. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  141. package/dist/shared/components/merge/merge-values.js +110 -0
  142. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  143. package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
  144. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  145. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  146. package/dist/shared/components/notifications/bundles.js +21 -19
  147. package/dist/shared/components/notifications/resolved-line.js +25 -0
  148. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  149. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  150. package/dist/shared/components/panels/AlertBanners.js +132 -0
  151. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  152. package/dist/shared/components/panels/BranchLanes.js +82 -54
  153. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  154. package/dist/shared/components/panels/CommentImages.js +219 -0
  155. package/dist/shared/components/panels/CommentPanel.js +649 -530
  156. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  157. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  158. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  159. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  160. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  161. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  162. package/dist/shared/components/panels/SlaClock.js +130 -99
  163. package/dist/shared/components/panels/TaskPanel.js +308 -287
  164. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  165. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  166. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  167. package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
  168. package/dist/shared/components/profile/AgentNameField.js +141 -0
  169. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  170. package/dist/shared/components/profile/PersonAccess.js +398 -330
  171. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  172. package/dist/shared/components/profile/PersonProfile.js +81 -73
  173. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  174. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  175. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  176. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  177. package/dist/shared/components/queue/QueueWorklist.js +2076 -1686
  178. package/dist/shared/components/queue/queue-totals.js +92 -0
  179. package/dist/shared/components/queue/worklist-helpers.js +18 -14
  180. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  181. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  182. package/dist/shared/components/support/ReportProblem.js +1 -0
  183. package/dist/shared/components/support/ScreenShare.js +554 -0
  184. package/dist/shared/components/support/SupportView.js +160 -129
  185. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  186. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  187. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  188. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  189. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  190. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  191. package/dist/shared/lib/activity-sentence.js +87 -75
  192. package/dist/shared/lib/agent-presence.js +46 -0
  193. package/dist/shared/lib/approval-progress.js +49 -0
  194. package/dist/shared/lib/attention-prefs.js +27 -0
  195. package/dist/shared/lib/cell-locks.js +56 -0
  196. package/dist/shared/lib/co-edit.js +166 -0
  197. package/dist/shared/lib/coedit-registry.js +44 -0
  198. package/dist/shared/lib/comment-awareness.js +124 -0
  199. package/dist/shared/lib/comment-images.js +45 -0
  200. package/dist/shared/lib/config-watch.js +94 -0
  201. package/dist/shared/lib/copy-rules.js +65 -0
  202. package/dist/shared/lib/count-step.js +30 -0
  203. package/dist/shared/lib/deadline-ticker.js +68 -0
  204. package/dist/shared/lib/derived-causes.js +115 -0
  205. package/dist/shared/lib/draft-store.js +114 -85
  206. package/dist/shared/lib/error-hints.js +1 -0
  207. package/dist/shared/lib/field-merge.js +126 -0
  208. package/dist/shared/lib/filter-sentence.js +10 -10
  209. package/dist/shared/lib/focus-mode.js +16 -12
  210. package/dist/shared/lib/grid-cursors.js +77 -0
  211. package/dist/shared/lib/grid-presence.js +182 -0
  212. package/dist/shared/lib/idle-reload.js +100 -73
  213. package/dist/shared/lib/in-step.js +45 -0
  214. package/dist/shared/lib/integration-chip.js +19 -18
  215. package/dist/shared/lib/line-locks.js +141 -0
  216. package/dist/shared/lib/line-split.js +41 -0
  217. package/dist/shared/lib/linked-changes.js +150 -0
  218. package/dist/shared/lib/list-link.js +56 -50
  219. package/dist/shared/lib/list-return.js +231 -0
  220. package/dist/shared/lib/list-viewers.js +52 -0
  221. package/dist/shared/lib/live-announcer.js +86 -0
  222. package/dist/shared/lib/live-counts.js +85 -0
  223. package/dist/shared/lib/live-data-changed.js +108 -0
  224. package/dist/shared/lib/live-deltas.js +81 -0
  225. package/dist/shared/lib/live-findings.js +113 -0
  226. package/dist/shared/lib/live-groups.js +122 -0
  227. package/dist/shared/lib/live-link-labels.js +162 -0
  228. package/dist/shared/lib/live-list-flow.js +334 -0
  229. package/dist/shared/lib/live-list.js +143 -129
  230. package/dist/shared/lib/live-moves.js +51 -0
  231. package/dist/shared/lib/live-ops.js +26 -26
  232. package/dist/shared/lib/live-pickers.js +7 -0
  233. package/dist/shared/lib/live-preference.js +184 -0
  234. package/dist/shared/lib/live-queries.js +226 -181
  235. package/dist/shared/lib/live-screen.js +333 -0
  236. package/dist/shared/lib/live-search.js +108 -0
  237. package/dist/shared/lib/live-seen.js +35 -0
  238. package/dist/shared/lib/live-views.js +100 -0
  239. package/dist/shared/lib/live.js +159 -133
  240. package/dist/shared/lib/missed-updates.js +198 -0
  241. package/dist/shared/lib/newer-file.js +56 -0
  242. package/dist/shared/lib/notification-sound.js +42 -20
  243. package/dist/shared/lib/own-writes.js +59 -41
  244. package/dist/shared/lib/picker-badges.js +94 -0
  245. package/dist/shared/lib/presence-signals.js +131 -84
  246. package/dist/shared/lib/realtime.js +49 -24
  247. package/dist/shared/lib/record-gaps.js +85 -0
  248. package/dist/shared/lib/record-outbox.js +369 -222
  249. package/dist/shared/lib/record-peek.js +75 -0
  250. package/dist/shared/lib/record-tabs.js +92 -72
  251. package/dist/shared/lib/relative-ticker.js +42 -0
  252. package/dist/shared/lib/request-gate.js +119 -119
  253. package/dist/shared/lib/rollup-recalc.js +107 -0
  254. package/dist/shared/lib/room-gaps.js +40 -36
  255. package/dist/shared/lib/rum.js +137 -87
  256. package/dist/shared/lib/save-progress.js +20 -0
  257. package/dist/shared/lib/scheduled-countdown.js +67 -0
  258. package/dist/shared/lib/screen-refresh.js +160 -0
  259. package/dist/shared/lib/screen-share.js +234 -0
  260. package/dist/shared/lib/seen-since.js +74 -0
  261. package/dist/shared/lib/selection-watch.js +205 -0
  262. package/dist/shared/lib/send-status.js +132 -0
  263. package/dist/shared/lib/send-view.js +23 -0
  264. package/dist/shared/lib/socket-liveness.js +155 -0
  265. package/dist/shared/lib/socket-realtime.js +168 -140
  266. package/dist/shared/lib/state-census.js +53 -0
  267. package/dist/shared/lib/summary-mode.js +61 -39
  268. package/dist/shared/lib/tab-attention.js +143 -32
  269. package/dist/shared/lib/table-density.js +64 -0
  270. package/dist/shared/lib/track-travel.js +40 -0
  271. package/dist/shared/lib/unseen-changes.js +68 -0
  272. package/dist/shared/lib/upload-file.js +33 -0
  273. package/dist/shared/lib/upload-presence.js +127 -0
  274. package/dist/shared/lib/urgent-chime.js +65 -0
  275. package/dist/shared/lib/use-online-users.js +32 -11
  276. package/dist/shared/lib/user-sync.js +155 -39
  277. package/dist/shared/lib/waiting-count.js +44 -0
  278. package/dist/shared/lib/watch-desktop.js +83 -0
  279. package/dist/shared/lib/watch-list.js +447 -0
  280. package/dist/shared/lib/widget-image-render.js +64 -0
  281. package/dist/shared/lib/widget-image.js +111 -0
  282. package/dist/shared/lib/worker-socket.js +130 -104
  283. package/dist/shared/lib/write-to-screen.js +133 -0
  284. package/package.json +1 -1
  285. package/styles.css +49 -1
package/dist/index.d.ts CHANGED
@@ -124,6 +124,9 @@ declare interface ActiveLayoutData {
124
124
  /** The `?layout=` this page was opened with names no form the person may
125
125
  * open: the answer is the usual form, and the page says so (army11 f3). */
126
126
  requested_form_unavailable?: boolean;
127
+ /** Fields any candidate form's record rules read (rt8 #18): a change to one — or a move —
128
+ * re-asks which form applies to the open record. Absent when a form was pinned by name. */
129
+ rule_fields?: string[];
127
130
  }
128
131
 
129
132
  /** Who really did it (nivaro_activity.actor, migration 516; derived for older rows). */
@@ -174,7 +177,7 @@ declare interface ActivityChange {
174
177
  value?: unknown;
175
178
  }
176
179
 
177
- export declare function ActivityEntry({ entry, labels, group, onOpen, actions, showTime, className }: ActivityEntryProps): JSX.Element;
180
+ export declare function ActivityEntry({ entry, labels, group, onOpen, actions, showTime, className, omitPhrases, reserveChevron }: ActivityEntryProps): JSX.Element;
178
181
 
179
182
  export declare interface ActivityEntryInput {
180
183
  id?: number | string | null;
@@ -244,10 +247,17 @@ export declare interface ActivityEntryProps {
244
247
  /** Show the time at the row's end (default true). */
245
248
  showTime?: boolean;
246
249
  className?: string;
250
+ /**
251
+ * Record phrases the sentence leaves out ("Project 12 – Alpha"): on a record's own stream the
252
+ * subject is the page itself, so "updated Project 12 – Alpha 3 times" reads "updated 3 times".
253
+ */
254
+ omitPhrases?: string[];
255
+ /** Keep the chevron's room on rows that do not fold, so every sentence starts at one edge. */
256
+ reserveChevron?: boolean;
247
257
  }
248
258
 
249
259
  /** A list of entries with bursts folded (groupActivity) — each group one ActivityEntry. */
250
- export declare function ActivityFeed({ entries, labels, onOpen, actionsFor, empty, className }: {
260
+ export declare function ActivityFeed({ entries, labels, onOpen, actionsFor, empty, className, isFresh }: {
251
261
  entries: ActivityEntryInput[];
252
262
  labels?: ActivityLabels | null;
253
263
  onOpen?: (entry: ActivityEntryInput) => void;
@@ -255,6 +265,8 @@ export declare function ActivityFeed({ entries, labels, onOpen, actionsFor, empt
255
265
  actionsFor?: (group: ActivityGroup) => ReactNode;
256
266
  empty?: ReactNode;
257
267
  className?: string;
268
+ /** A live feed (rt4 #15): entries that just arrived fade in once (no motion when reduced). */
269
+ isFresh?: (entry: ActivityEntryInput) => boolean;
258
270
  }): JSX.Element;
259
271
 
260
272
  declare interface ActivityGroup<T extends ActivityEntryInput = ActivityEntryInput> {
@@ -367,6 +379,36 @@ export declare function AddendumPanel({ collection, item, addendumLayoutId, canC
367
379
  defaultExpanded?: boolean;
368
380
  }): JSX.Element | null;
369
381
 
382
+ /**
383
+ * Agents working on a record right now (rt8 #21): "Claude (for Rob) is updating this record".
384
+ *
385
+ * The server marks a record whenever an AI agent's tool call (hosted MCP) reads or writes it
386
+ * and tells the record room `record:agents` with the whole current list; a socket that joins the
387
+ * room later is told once on join (api services/agent-presence.ts). The room admits only people
388
+ * who may open the record, so this hook never learns about an agent on a record its viewer
389
+ * cannot see. Names only: the name the agent's connection goes by (its owner or an administrator
390
+ * sets it) and the person it acts for.
391
+ *
392
+ * A presence indicator: quiet in Calm and Off (the live preference seam drops the event, and
393
+ * anything already shown clears).
394
+ */
395
+ declare type AgentMode = 'reading' | 'updating';
396
+
397
+ /**
398
+ * "Claude (for Rob) is updating this record" — beside a record's viewers while an AI agent
399
+ * reads or writes it (rt8 #21). Quiet text, no motion beyond a soft dot while it writes (none
400
+ * with reduced motion); nothing at all in Calm / Off or when no agent is there. Several agents
401
+ * show the first sentence and "+N", every sentence in the tip.
402
+ */
403
+ export declare function AgentPresenceChip({ collection, item, className }: {
404
+ collection: string | null | undefined;
405
+ item: string | number | null | undefined;
406
+ className?: string;
407
+ }): JSX.Element | null;
408
+
409
+ /** "Claude (for Rob) is updating this record" (pure). `meId` reads the viewer's own as "you". */
410
+ export declare function agentSentence(a: RecordAgent, meId?: string | null, short?: boolean): string;
411
+
370
412
  export declare function agingBucket(hours: number | null): string;
371
413
 
372
414
  export declare function AiAnalyticsView(): JSX.Element;
@@ -548,6 +590,46 @@ export declare function AiReviewCard({ templateId }: {
548
590
  */
549
591
  declare type AiStreamSubscribe = (event: 'ai:delta' | 'ai:status' | 'ai:done' | 'ai:error', handler: (payload: Record<string, unknown>) => void) => () => void;
550
592
 
593
+ /**
594
+ * Threshold banners (realtime round 9, item 20): "Project US201979 just crossed 90%".
595
+ *
596
+ * Shows crossings of the alert definitions an administrator switched to "Show as a banner"
597
+ * (Alerts → definition). Record mode (`itemId`) sits in a record page's banner stack; without
598
+ * `itemId` it lists the collection's newest crossings (a budget console, a project hub). Each
599
+ * banner is dismissed for the viewer alone; a later crossing shows again. Read as the viewer
600
+ * (GET /alerts/banners), live: a new crossing (`$alerts`) or a write to a field a banner
601
+ * watches re-reads it once per burst — no toast, no sound, nothing moves under the pointer.
602
+ * Renders nothing when there is nothing to say.
603
+ */
604
+ export declare interface AlertBannerData {
605
+ log_id: number;
606
+ definition_id: number;
607
+ name: string;
608
+ collection: string;
609
+ item: string;
610
+ record: string;
611
+ field: string;
612
+ operator: string;
613
+ threshold: number;
614
+ unit: string;
615
+ value: number | null;
616
+ triggered_at: string;
617
+ phrase: string;
618
+ }
619
+
620
+ export declare function AlertBanners({ collection, itemId, max, onOpenRecord, className }: {
621
+ collection: string;
622
+ /** One record's banners; omit for the collection's newest crossings. */
623
+ itemId?: string | null;
624
+ /** Collection mode: how many show before "N more". */
625
+ max?: number;
626
+ /** Collection mode: open the record a banner names. */
627
+ onOpenRecord?: (collection: string, item: string) => void;
628
+ className?: string;
629
+ }): JSX.Element | null;
630
+
631
+ export declare const alertBannersKey: (collection: string, itemId?: string | null) => readonly ["alert-banners", string, string];
632
+
551
633
  export declare function AlertManagerView({ defaultTab, hiddenTabs, onOpenReport, className }: AlertManagerViewProps): JSX.Element;
552
634
 
553
635
  export declare interface AlertManagerViewProps {
@@ -1140,6 +1222,12 @@ declare type BinaryOp = '+' | '-' | '*' | '/' | '==' | '!=' | '<' | '<=' | '>' |
1140
1222
  */
1141
1223
  export declare function bindClientChaosSocket(socket: ClientChaosSocket | null | undefined): () => void;
1142
1224
 
1225
+ /**
1226
+ * Wire the host's record-room socket to this module for one record. Returns the cleanup. The
1227
+ * host still joins/leaves the room and paints its own field outlines; this only listens.
1228
+ */
1229
+ export declare function bindRecordCoEdit(socket: CoEditSocket, collection: string, item: string | number, selfId: string | null | undefined): () => void;
1230
+
1143
1231
  declare interface Blur {
1144
1232
  id: string;
1145
1233
  start_ms: number;
@@ -1194,6 +1282,9 @@ export declare function buildReportPayload(input: {
1194
1282
  } | null;
1195
1283
  }): ReportProblemPayload;
1196
1284
 
1285
+ /** Everything that is printed on the picture, in order. */
1286
+ export declare function buildWidgetImageLabel(input: WidgetImageInput): WidgetImageLabel;
1287
+
1197
1288
  export declare function BulkActionButtons({ targets, enabledKeys, tone, disabled, onDone }: {
1198
1289
  targets: BulkTarget[];
1199
1290
  /** Surface allow-list (browser_config.bulk_actions / display_config.bulk_action_keys). */
@@ -1240,11 +1331,18 @@ declare interface BulkTarget {
1240
1331
  * a report served from Redis is indistinguishable from one just computed.
1241
1332
  * Renders nothing for an uncached query — there is nothing to disclose.
1242
1333
  */
1243
- export declare function CacheStamp({ envelope, onRefresh, refreshing, className }: {
1334
+ export declare function CacheStamp({ envelope, onRefresh, refreshing, className, changedLive, autoRefresh }: {
1244
1335
  envelope: CustomQueryEnvelope | undefined;
1245
1336
  onRefresh?: () => void;
1246
1337
  refreshing?: boolean;
1247
1338
  className?: string;
1339
+ /** A table this figure reads changed since it was computed (see LiveCacheStamp). */
1340
+ changedLive?: boolean;
1341
+ /** The viewer's opt-in to refresh by itself when that happens. */
1342
+ autoRefresh?: {
1343
+ on: boolean;
1344
+ onChange: (on: boolean) => void;
1345
+ } | null;
1248
1346
  }): JSX.Element | null;
1249
1347
 
1250
1348
  export declare function CallerChangesSection({ caller, hours }: {
@@ -1412,8 +1510,19 @@ declare type CascadeSwapConfig = {
1412
1510
  * record the click came from. Shape is host-interpreted. */
1413
1511
  declare type CatalogItemOpener = (id: string, context?: Record<string, unknown>) => void;
1414
1512
 
1513
+ declare interface CellAnnouncer {
1514
+ /** Focus is in this cell now (null = focus left every cell). */
1515
+ focus: (cell: string | null) => void;
1516
+ /** Focus left the grid. */
1517
+ blur: () => void;
1518
+ /** Send any pending end now (unmount). */
1519
+ flush: () => void;
1520
+ }
1521
+
1415
1522
  export declare function CellCopyLayer(): ReactPortal | null;
1416
1523
 
1524
+ declare type CellEmit = (cell: string, state: 'start' | 'end') => void;
1525
+
1417
1526
  declare interface CellFilterLite {
1418
1527
  field: string;
1419
1528
  value: unknown;
@@ -1906,6 +2015,13 @@ export declare function clearRecordOutbox(): Promise<void>;
1906
2015
 
1907
2016
  export declare function clearSignOutNote(): void;
1908
2017
 
2018
+ declare interface ClickLike {
2019
+ metaKey?: boolean;
2020
+ ctrlKey?: boolean;
2021
+ shiftKey?: boolean;
2022
+ button?: number;
2023
+ }
2024
+
1909
2025
  /**
1910
2026
  * Browser chaos mode (#2840) — this tab's own requests fail or slow down for a set time, so a
1911
2027
  * tester can watch error boundaries, retry UI, autosave and the offline outbox do their job
@@ -2084,6 +2200,7 @@ export declare function CloneDialog({ collection, itemId, fields, relations, cur
2084
2200
  declare interface CloneDialogProps {
2085
2201
  collection: string;
2086
2202
  itemId: string;
2203
+ /** The record's fields in the order the form shows them. */
2087
2204
  fields: CMSField[];
2088
2205
  relations: CMSRelation[];
2089
2206
  currentValues: Record<string, unknown>;
@@ -2137,6 +2254,43 @@ declare interface CMSRelation {
2137
2254
  one_allowed_collections?: string | string[] | null;
2138
2255
  }
2139
2256
 
2257
+ declare interface Coalescer {
2258
+ /** Something moved: schedule (or push back) the call. */
2259
+ poke: () => void;
2260
+ /** The tab came back to the front: make the call now if one is owed. */
2261
+ resume: () => void;
2262
+ /** Drop anything scheduled. */
2263
+ cancel: () => void;
2264
+ /** A call is scheduled or owed (tests). */
2265
+ pending: () => boolean;
2266
+ }
2267
+
2268
+ /**
2269
+ * Counts that follow the data — quietly (realtime program 2026-11-14, ideas 9 + 19).
2270
+ *
2271
+ * A count (a tab total, a view pill, a badge) is a read the viewer's own permissions answer,
2272
+ * so a live event can only ever say "this may have moved"; the number is then re-read through
2273
+ * its normal route. What this file adds is the discipline around that re-read:
2274
+ *
2275
+ * - `createCoalescer` turns any number of pokes into ONE call: it waits until the pokes have
2276
+ * been quiet for `quietMs` (default 2 s), but never later than `maxWaitMs` after the first
2277
+ * poke of a burst, so a steady stream still refreshes. A hidden tab does not call; it owes
2278
+ * one call for when it is shown again.
2279
+ * - `useLiveRefresh` hangs that on an ops topic and/or a list of query keys: one refresh per
2280
+ * quiet window for every count that names the same keys, however many components ask.
2281
+ * - `LiveCount` shows the number and cross-fades when it changes (no bounce, no movement;
2282
+ * reduced motion just swaps).
2283
+ */
2284
+ declare interface CoalescerOptions {
2285
+ /** Call once pokes have stopped for this long (default 2000). */
2286
+ quietMs?: number;
2287
+ /** …but never later than this after the first poke of a burst (default 15000). */
2288
+ maxWaitMs?: number;
2289
+ /** Whether the tab is on screen (default: `document.visibilityState !== 'hidden'`). */
2290
+ isVisible?: () => boolean;
2291
+ now?: () => number;
2292
+ }
2293
+
2140
2294
  declare interface CoalescingOptions {
2141
2295
  /**
2142
2296
  * #1304: record reads (`GET /items/<c>` and `GET /items/<c>/<id>`) fired in
@@ -2161,6 +2315,13 @@ declare interface CoalescingOptions {
2161
2315
  batchCollections?: boolean;
2162
2316
  }
2163
2317
 
2318
+ /** The socket calls this module needs (socket.io's Socket and the worker facade both fit). */
2319
+ export declare interface CoEditSocket {
2320
+ on(event: string, cb: (payload: any) => void): unknown;
2321
+ off(event: string, cb: (payload: any) => void): unknown;
2322
+ emit(event: string, payload: unknown): unknown;
2323
+ }
2324
+
2164
2325
  /** @deprecated Column model changed to plain field keys — kept for source
2165
2326
  * compatibility with early adopters; maps `path` to a field key. */
2166
2327
  export declare interface CollectionBrowserColumn {
@@ -2170,7 +2331,7 @@ export declare interface CollectionBrowserColumn {
2170
2331
  filterable?: boolean;
2171
2332
  }
2172
2333
 
2173
- export declare function CollectionBrowserView({ collection, quickFilters, initialColumns, initialSort, pageSize, initialSearch, initialFilters, initialConditions, onOpenItem, initialAiPrompt, extraViews, showCreate, className }: CollectionBrowserViewProps): React_2.JSX.Element;
2334
+ export declare function CollectionBrowserView({ collection, quickFilters, initialColumns, initialSort, pageSize, initialSearch, initialFilters, initialConditions, onOpenItem, initialAiPrompt, extraViews, showCreate, viewersInHeader, className }: CollectionBrowserViewProps): React_2.JSX.Element;
2174
2335
 
2175
2336
  export declare interface CollectionBrowserViewProps {
2176
2337
  collection: string;
@@ -2210,6 +2371,9 @@ export declare interface CollectionBrowserViewProps {
2210
2371
  render: () => React_2.ReactNode;
2211
2372
  }>;
2212
2373
  showCreate?: boolean;
2374
+ /** The host's header row shows who else has this list open (admin list page), so the
2375
+ * toolbar keeps no slot for it. */
2376
+ viewersInHeader?: boolean;
2213
2377
  className?: string;
2214
2378
  }
2215
2379
 
@@ -2349,6 +2513,9 @@ export declare interface Column<T = Record<string, unknown>> {
2349
2513
  className?: string;
2350
2514
  headerClassName?: string;
2351
2515
  render?: (row: T, index: number) => React_2.ReactNode;
2516
+ /** A column menu beside the header (e.g. the totals row choice, cbv/ColumnHeaderMenu); it
2517
+ * stops its own clicks, and shows on header hover (`group/hcell`). */
2518
+ headerMenu?: React_2.ReactNode;
2352
2519
  }
2353
2520
 
2354
2521
  export declare type ColumnFormatConfig = {
@@ -2481,6 +2648,13 @@ export declare type ComponentOverrides = {
2481
2648
  * several conditions AND together. */
2482
2649
  export declare function conditionsToFilter(conditions: string | undefined): Record<string, unknown> | null;
2483
2650
 
2651
+ export declare function ConfigReachNote({ collections, className, enabled }: {
2652
+ /** The collections the change applies to (a layout's, a pipeline's bound ones …). */
2653
+ collections: Array<string | null | undefined>;
2654
+ className?: string;
2655
+ enabled?: boolean;
2656
+ }): JSX.Element | null;
2657
+
2484
2658
  /**
2485
2659
  * Keep sounds apart per sign-in: a "View as" tab is someone else and must not be silenced by
2486
2660
  * (or silence) the administrator's own tabs. Call before the first sound; same idea as the
@@ -2532,6 +2706,26 @@ export declare function copyErrorDetails(input: ErrorDescription | unknown, extr
2532
2706
  action?: string;
2533
2707
  }): Promise<boolean>;
2534
2708
 
2709
+ /**
2710
+ * "You're covering for Jane Smith today — 4 of Jane's records need you" (rt5 #15).
2711
+ *
2712
+ * GET /api/my-work/covering answers who named this person their delegate and is out right now,
2713
+ * and which of the records waiting on them reach them only through that cover. Live without a
2714
+ * reload: the line re-reads when owners move anywhere (`owners:changed` — delegation and
2715
+ * out-of-office starting or ending ride it), when one of the counted records changes (handled,
2716
+ * moved on), and at the moment the cover runs out. Re-reads are coalesced and kept apart
2717
+ * (the answer resolves owners), and the count rolls rather than jumps. Renders nothing when the
2718
+ * person covers nobody.
2719
+ */
2720
+ declare interface CoverLine {
2721
+ user_id: string;
2722
+ name: string;
2723
+ first_name: string | null;
2724
+ ends_at: string | null;
2725
+ records: number;
2726
+ keys: string[];
2727
+ }
2728
+
2535
2729
  export declare interface CrashBody {
2536
2730
  message: string;
2537
2731
  name: string;
@@ -2600,6 +2794,11 @@ export declare interface CrashReporterOptions {
2600
2794
  now?: () => number;
2601
2795
  }
2602
2796
 
2797
+ /** One announcer per grid. `emit` defaults to the window event the presence hosts relay. */
2798
+ export declare function createCellAnnouncer(emit?: CellEmit): CellAnnouncer;
2799
+
2800
+ export declare function createCoalescer(fn: () => void, opts?: CoalescerOptions): Coalescer;
2801
+
2603
2802
  export declare function createCrashReporter(opts: CrashReporterOptions): CrashReporter;
2604
2803
 
2605
2804
  /**
@@ -2643,6 +2842,9 @@ export declare function CronBuilder({ value, onChange, disabled }: {
2643
2842
  disabled?: boolean;
2644
2843
  }): JSX.Element;
2645
2844
 
2845
+ /** One colour per person, the same on every screen (a hash of their id). */
2846
+ export declare function cursorColor(personId: string | null | undefined): string;
2847
+
2646
2848
  /** The cursor switches (#1517): only `{ show: true }` (plus `shortcuts: true`)
2647
2849
  * is ever stored; off = the key is absent. */
2648
2850
  declare interface CursorEdits {
@@ -2721,7 +2923,7 @@ export declare function dashboardPretendDownOptions(widgets: Array<{
2721
2923
  field?: string | null;
2722
2924
  }>, labels?: Record<string, string | null | undefined>): PretendDownOption[];
2723
2925
 
2724
- export declare function DataTable<T = Record<string, unknown>>({ columns, rows, rowKey, total, page, limit, isLoading, isError, errorMessage, onRetry, sort, onSortChange, onPageChange, onRowClick, onRowContextMenu, searchValue, onSearchChange, searchPlaceholder, filterDefs, filterValues, onFilterChange, toolbarRight, emptyMessage, minBodyHeight, fillHeight, footer, hideFilterRow, nowrapCells, density, pinFirstColumn, columnPins, onColumnPinChange, columnFilterRow, hScrollProxy, selectedIds, onSelectionChange, rowClassName, rowDragProps, rowTitle, enterKey, rowGroups, collapsedGroups, onToggleGroup, onRowFocus, activeRowKey, rowAriaLabel }: DataTableProps<T>): React_2.JSX.Element;
2926
+ export declare function DataTable<T = Record<string, unknown>>({ columns, rows, rowKey, total, page, limit, isLoading, isError, errorMessage, onRetry, sort, onSortChange, onPageChange, onRowClick, onRowContextMenu, searchValue, onSearchChange, searchPlaceholder, filterDefs, filterValues, onFilterChange, toolbarRight, emptyMessage, minBodyHeight, fillHeight, footer, hideFilterRow, nowrapCells, density, pinFirstColumn, columnPins, onColumnPinChange, columnFilterRow, hScrollProxy, selectedIds, onSelectionChange, rowClassName, rowDragProps, rowTitle, enterKey, rowGroups, collapsedGroups, onToggleGroup, onRowFocus, activeRowKey, rowAriaLabel, totalsRow }: DataTableProps<T>): React_2.JSX.Element;
2725
2927
 
2726
2928
  export declare interface DataTableProps<T = Record<string, unknown>> {
2727
2929
  columns: Column<T>[];
@@ -2818,6 +3020,15 @@ export declare interface DataTableProps<T = Record<string, unknown>> {
2818
3020
  activeRowKey?: string | null;
2819
3021
  /** Accessible name of a focusable row (e.g. its record id and title). */
2820
3022
  rowAriaLabel?: (row: T) => string | undefined;
3023
+ /**
3024
+ * Totals row (2026-11-14): a footer row that stays at the bottom of the scrolling rows,
3025
+ * one cell per column (`cells[key]`, absent = empty); `label` fills the first empty data
3026
+ * cell ("Σ totals"). Hidden while grouped, loading or empty.
3027
+ */
3028
+ totalsRow?: {
3029
+ cells: Record<string, React_2.ReactNode>;
3030
+ label?: React_2.ReactNode;
3031
+ };
2821
3032
  }
2822
3033
 
2823
3034
  export declare function DateField({ field, value, onChange, error, disabled, readOnly, inputId, errorId }: FieldComponentProps): JSX.Element;
@@ -2850,6 +3061,15 @@ export declare function DefinitionsPanel({ definitions, runCounts, isLoading, in
2850
3061
  initialKey?: string | null;
2851
3062
  }): JSX.Element;
2852
3063
 
3064
+ export declare function DelegateCoverLine({ onShow, showing, showLabel, className }: {
3065
+ /** "Show them": the host filters its list to these records (My Work), or opens My Work. */
3066
+ onShow?: (line: CoverLine) => void;
3067
+ /** The cover whose records the host is showing now (its button reads "Showing"). */
3068
+ showing?: string | null;
3069
+ showLabel?: string;
3070
+ className?: string;
3071
+ }): JSX.Element | null;
3072
+
2853
3073
  export declare function DelegationCard({ user, onSaved, forUser, coversFor }: {
2854
3074
  user: ManagedUser & {
2855
3075
  ooo_start?: string | null;
@@ -2890,6 +3110,15 @@ declare interface DeliveryChipsProps {
2890
3110
  className?: string;
2891
3111
  }
2892
3112
 
3113
+ declare interface DeltaChip {
3114
+ delta: number;
3115
+ /** `+3` / `−2`, with a real minus sign. */
3116
+ sign: string;
3117
+ since: 'this morning' | 'earlier today' | 'yesterday';
3118
+ /** The whole phrase: "+3 since this morning". */
3119
+ text: string;
3120
+ }
3121
+
2893
3122
  /** What the author reads as while a clean recording runs. */
2894
3123
  export declare const DEMO_USER: {
2895
3124
  readonly name: "Demo User";
@@ -3094,6 +3323,27 @@ export declare function DndMark({ className }: {
3094
3323
  className?: string;
3095
3324
  }): JSX.Element;
3096
3325
 
3326
+ declare type DockSort = 'mine' | 'changed' | 'due';
3327
+
3328
+ /**
3329
+ * The watch list (rt5 #1 / #2): records a person pinned to follow from every page, in a dock
3330
+ * the app shell mounts once (components/watch-list/WatchDock.tsx). Server: /api/watch-list
3331
+ * (routes/watch-list.ts), stored in the person's own preferences, so it follows them across
3332
+ * tabs and devices.
3333
+ *
3334
+ * Reads:
3335
+ * prefs — pins + dock state, no record reads (every pin button and the header icon)
3336
+ * rows — the pinned records as the viewer reads them (dock open)
3337
+ * summary — only which pins changed since seen (dock minimized / closed: the dot)
3338
+ *
3339
+ * Nothing here polls. The dock follows the pinned records' collections on the shared socket
3340
+ * and refetches in place, coalesced.
3341
+ */
3342
+ declare type DockState = 'open' | 'minimized' | 'closed';
3343
+
3344
+ /** A shared list's tab is `team:<list id>`. */
3345
+ declare type DockTab = 'watching' | 'waiting' | 'mentions' | `team:${string}`;
3346
+
3097
3347
  declare type DocumentApplySelection = {
3098
3348
  values: Record<string, unknown>;
3099
3349
  lines_by_alias: Record<string, Array<{
@@ -3730,12 +3980,38 @@ declare interface ExtraSectionSpec {
3730
3980
  /** Extract the slot key from an assignment field name, or null. */
3731
3981
  export declare function extSlotKey(field: string): string | null;
3732
3982
 
3983
+ /**
3984
+ * The elements a batch of DOM mutations changed, worth fading (pure-ish; exported for tests):
3985
+ * the parent of changed text, or an added element. Never inside an editor or a
3986
+ * `data-live-nofade` area, never the focused element's subtree, never the root itself.
3987
+ */
3988
+ export declare function fadeTargets(root: Element, records: readonly Pick<MutationRecord, 'type' | 'target' | 'addedNodes'>[], active?: Element | null): Element[];
3989
+
3733
3990
  declare interface FallbackSocket extends SocketLike {
3734
3991
  once?(event: string, cb: Listener): unknown;
3735
3992
  connect?(): unknown;
3736
3993
  disconnect?(): unknown;
3737
3994
  }
3738
3995
 
3996
+ /**
3997
+ * One live stream of what changed across a set of related records — a project and its
3998
+ * workflows, requests, invoices and budgets (realtime program 2026-11-14, idea 21).
3999
+ *
4000
+ * `POST /api/activity/feed` resolves the sources AS THE VIEWER, so the stream never names a
4001
+ * record they cannot open. Rows are the shared activity sentences (groupActivity folds a burst or
4002
+ * a link-table write into one line, labels read as the viewer). The type chips filter it.
4003
+ *
4004
+ * Live and quiet: no timer. A live write to one of the records the stream follows (or a new
4005
+ * record of a followed type) refetches the newest page, after a 2 s quiet window and never more
4006
+ * than one read at a time. New rows slide in at the top only while the person is
4007
+ * scrolled to the top; otherwise they wait behind a "3 new" pill and nothing on screen moves.
4008
+ * Older rows load on request and are kept, so the head refreshing never drops what was read.
4009
+ */
4010
+ export declare interface FeedSourceInput {
4011
+ collection: string;
4012
+ filter?: Record<string, unknown>;
4013
+ }
4014
+
3739
4015
  declare type FetchCfg = {
3740
4016
  apiBase: string;
3741
4017
  authHeaders: Record<string, string>;
@@ -3915,9 +4191,15 @@ export declare type FieldState = {
3915
4191
  */
3916
4192
  export declare function FileField({ field, value, onChange, error, disabled, readOnly, inputId, errorId }: FieldComponentProps): JSX.Element;
3917
4193
 
3918
- export declare function FilePreviewLightbox({ file, onClose }: {
4194
+ export declare function FilePreviewLightbox({ file: opened, onClose, record: recordProp }: {
3919
4195
  file: PreviewFile;
3920
4196
  onClose: () => void;
4197
+ /** The record the file was opened from: its `$files` notices say when the file changed
4198
+ * (rt8 #19). Defaults to the record form the preview sits in. */
4199
+ record?: {
4200
+ collection: string;
4201
+ itemId: string | number;
4202
+ } | null;
3921
4203
  }): ReactPortal;
3922
4204
 
3923
4205
  export declare function FilterControl({ def, value, onChange, layout }: {
@@ -3976,6 +4258,47 @@ declare interface FilterOptionSpec {
3976
4258
  * (ids → names), ≥/≤ for ranges, first two entries + count for multiselects. */
3977
4259
  export declare function filterValueDisplay(def: FilterDef, value: string | string[]): string;
3978
4260
 
4261
+ /**
4262
+ * The calm "Fixed by Beth" state of a finding whose record was just fixed (see
4263
+ * lib/live-findings.ts). Quiet green check + words, no animation; the row around it should be
4264
+ * dimmed by the board (`opacity-60`) and stays until the next refresh.
4265
+ */
4266
+ export declare function FindingFixedMark({ mark, className }: {
4267
+ mark: ResolvedMark;
4268
+ className?: string;
4269
+ }): JSX.Element;
4270
+
4271
+ /**
4272
+ * "Finding resolved live" (realtime program 2026-11-14, item 15).
4273
+ *
4274
+ * A board of findings (Data Integrity sweeps, orphans, inactive people, a "ready to send"
4275
+ * board…) goes stale the moment someone fixes a record. This hook turns a finding whose record
4276
+ * was just fixed into a calm "Fixed by Beth" state in place — it does not remove the row (the
4277
+ * list would shift under the pointer); the next refresh drops it.
4278
+ *
4279
+ * What it does, per burst of `collection:update` events (default debounce 1 s):
4280
+ * 1. picks the findings whose record the events named (a bulk write that named nobody picks
4281
+ * every finding on the page, capped at `maxPerRun`);
4282
+ * 2. asks the board's own `recheck(refs)` — a read as the VIEWER that returns the keys that
4283
+ * no longer have a finding (the board decides what "fixed" means: a conformance
4284
+ * re-check, an orphan re-test, a re-listing);
4285
+ * 3. marks those keys resolved, with who saved the record last when the viewer may read
4286
+ * `user_updated`.
4287
+ * A record that breaks again (a later recheck says it still has the finding) loses its mark.
4288
+ *
4289
+ * Wiring a board: pass `findings` as `{key, collection, itemId}` (the key is whatever the row
4290
+ * is keyed by), render `resolved.get(key)` as a `<FindingFixedMark>` and dim the row. See
4291
+ * ConformanceView and the orphan finder for the two shapes (one finding per row; one record
4292
+ * with several findings).
4293
+ */
4294
+ export declare interface FindingRef {
4295
+ /** The row's own key (unique on the board). */
4296
+ key: string;
4297
+ collection: string;
4298
+ /** The record the finding is about. */
4299
+ itemId: string;
4300
+ }
4301
+
3979
4302
  export declare function FirefightView({ onOpenRecord, onJumpTab, focusSignal }: FirefightViewProps): JSX.Element;
3980
4303
 
3981
4304
  export declare interface FirefightViewProps {
@@ -4389,6 +4712,9 @@ export declare function getFiscalStartMonth(): number;
4389
4712
 
4390
4713
  export declare function getLayoutSlot(key: string | null | undefined): LayoutSlotPlugin | null;
4391
4714
 
4715
+ /** The mode this tab runs in now. */
4716
+ export declare function getLiveMode(): LiveMode;
4717
+
4392
4718
  /** What createGetBatcher returns: queue one GET for the next batch. */
4393
4719
  declare type GetLoader = <T>(path: string, read: BatchedGet<T>) => Promise<T>;
4394
4720
 
@@ -4399,6 +4725,16 @@ export declare function getNavTrail(): TrailState;
4399
4725
  /** A copy of the rings, oldest first. */
4400
4726
  export declare function getReplayTail(): ReplayTail;
4401
4727
 
4728
+ export declare interface GridEditor {
4729
+ userId: string;
4730
+ name: string;
4731
+ item: string;
4732
+ field: string | null;
4733
+ page: string;
4734
+ at: number;
4735
+ color: string;
4736
+ }
4737
+
4402
4738
  export declare const GridFlushContext: React_2.Context<GridFlushContextValue | null>;
4403
4739
 
4404
4740
  export declare type GridFlushContextValue = {
@@ -4406,6 +4742,48 @@ export declare type GridFlushContextValue = {
4406
4742
  unregister: (key: string) => void;
4407
4743
  };
4408
4744
 
4745
+ /** A page key from parts (`matrix`, a collection, the other scope values): short, stable,
4746
+ * within the server's page-key alphabet. */
4747
+ export declare function gridPageKey(kind: string, ...parts: string[]): string;
4748
+
4749
+ declare interface GridPresence {
4750
+ /** The OTHER people editing on this page now (empty in Calm / Off). */
4751
+ editors: GridEditor[];
4752
+ }
4753
+
4754
+ /** The `data-grid-cell` value of a presence-tracked cell. */
4755
+ export declare function gridPresenceCell(item: string | number, field: string): string;
4756
+
4757
+ /**
4758
+ * The page-level line of a budget / planning grid (realtime round 8, item 22):
4759
+ * "Beth Ray is editing allocations for 4471 · March". One person reads as a sentence; more
4760
+ * become a short list of people, each with the row they are in. Each person keeps the colour
4761
+ * their cell outline uses. Names come from the server (the people already passed the read gate
4762
+ * of the row they are in, as did the viewer); row and cell labels come from the viewer's own
4763
+ * page — a row not on it falls back to its id.
4764
+ */
4765
+ export declare function GridPresenceLine({ editors, noun, rowLabel, cellLabel, className }: {
4766
+ editors: GridEditor[];
4767
+ /** What the page edits, plural: "forecasts", "allocations". */
4768
+ noun: string;
4769
+ rowLabel: (item: string) => string | null | undefined;
4770
+ cellLabel?: (field: string, item: string) => string | null | undefined;
4771
+ className?: string;
4772
+ }): JSX.Element | null;
4773
+
4774
+ declare interface GridPresenceOptions {
4775
+ /** Which page this is (`forecast-worksheet`, `matrix:allocations`…); only the same page's
4776
+ * marks show. Letters, digits and `_.:-`, up to 64. */
4777
+ page: string;
4778
+ /** The collection of the records each row stands for — the read gate is that record's. */
4779
+ collection: string | null | undefined;
4780
+ /** The records on screen. */
4781
+ items: Array<string | number>;
4782
+ /** The grid: focus inside it is announced and others' cells are outlined inside it. */
4783
+ containerRef?: RefObject<HTMLElement | null>;
4784
+ enabled?: boolean;
4785
+ }
4786
+
4409
4787
  /** options.set_all_rows on an O2M grid: one header button per entry that writes ONE value
4410
4788
  * into that column on every line (or the ticked lines), or clears it when left blank —
4411
4789
  * e.g. "Set REQ ID on all lines" (EFP v2's "apply req id to all lines"). Admin-only unless
@@ -5084,6 +5462,13 @@ declare interface Hold {
5084
5462
  /** Queue one toast-worthy thing; returns true when it was held (caller shows nothing). */
5085
5463
  export declare function holdNotification(item: Omit<HeldItem, 'at'>): boolean;
5086
5464
 
5465
+ /**
5466
+ * Pure (exported for tests). `shown`: keys on screen now (null = nothing yet). At the top, the
5467
+ * answer as it is. Scrolled down: rows on screen keep their order (taking new data), rows that
5468
+ * arrived ahead of every shown row are held back and counted, other arrivals go to the end.
5469
+ */
5470
+ export declare function holdTopInserts<T>(shown: readonly string[] | null, next: readonly T[], keyOf: (row: T) => string, atTop: boolean): TopInsertResult<T>;
5471
+
5087
5472
  /** The house style (#1551): defaults every new help video starts from.
5088
5473
  * Administrators only. */
5089
5474
  export declare function HouseStyleButton(): JSX.Element | null;
@@ -5113,6 +5498,12 @@ export declare const IDLE_AFTER_MS: number;
5113
5498
  *
5114
5499
  * Asks GET /realtime/build-status through the host's NivaroClient when there is one, else the
5115
5500
  * same-origin /api (admin mounts the banner outside its NivaroProvider).
5501
+ *
5502
+ * Two reasons, two remedies (realtime idea 13): only a NEW BUILD reloads the page. Stale DATA —
5503
+ * the tab was hidden or the machine asleep longer than the server can replay live events, the
5504
+ * socket lost events it could not replay while the tab was away, or nobody used it for hours —
5505
+ * refreshes the screen's data in place on return (lib/screen-refresh.ts, the same refresh as
5506
+ * the ↻ button), keeping scroll, open panels and edits. `decideIdleResync` is the pure rule.
5116
5507
  */
5117
5508
  export declare function IdleReloadWatcher(): null;
5118
5509
 
@@ -6048,6 +6439,9 @@ export declare function isCrashWorthy(err: unknown): err is Error;
6048
6439
  */
6049
6440
  export declare function isListTimeout(err: unknown): boolean;
6050
6441
 
6442
+ /** A click that asks for a new tab (Cmd / Ctrl / Shift / middle button). */
6443
+ export declare function isNewTabClick(e?: ClickLike | null): boolean;
6444
+
6051
6445
  /**
6052
6446
  * Text a person should never see: a bare status line, a JavaScript or driver
6053
6447
  * error, a stack, SQL or the database's own names, or an internal id. The
@@ -6636,6 +7030,29 @@ export declare function LearningPathCard({ className }: {
6636
7030
  className?: string;
6637
7031
  }): JSX.Element;
6638
7032
 
7033
+ /** Set by the record form: the record's lines lock one at a time (its line grids read it). */
7034
+ export declare const LineLockContext: Context<boolean>;
7035
+
7036
+ declare interface LineLocks {
7037
+ enabled: boolean;
7038
+ view: (rowId: string | null | undefined) => LineLockView;
7039
+ /** Take the lock on a line before editing it. false = someone else holds it. */
7040
+ claim: (rowId: string) => Promise<boolean>;
7041
+ /** Let go of the line this viewer holds (after LINE_LOCK_LEAVE_MS unless `now`). */
7042
+ release: (opts?: {
7043
+ now?: boolean;
7044
+ }) => void;
7045
+ /** The line this viewer holds right now. */
7046
+ held: string | null;
7047
+ }
7048
+
7049
+ declare interface LineLockView {
7050
+ /** Someone else is editing this line: it is read-only here. */
7051
+ readOnly: boolean;
7052
+ /** Their name ("Someone" when the server could not name them). */
7053
+ by: string | null;
7054
+ }
7055
+
6639
7056
  /**
6640
7057
  * Fired on `window` after a list rewrote its address (replaceListLinkParam), with
6641
7058
  * `detail.path` = the new pathname + search + hash. Hosts that remember "where a record was
@@ -6668,11 +7085,39 @@ export declare function ListLoadError({ error, onRetry, className }: {
6668
7085
  */
6669
7086
  export declare function listLoadErrorText(err: unknown): string;
6670
7087
 
7088
+ /**
7089
+ * Realtime #16 — "Previous / Next in list" on a record opened from a list or a worklist.
7090
+ *
7091
+ * The list kept its row order when it opened this record (lib/list-return.ts); this walks it
7092
+ * without going back to the list. A step REPLACES the record's history entry, so the browser's
7093
+ * Back (and the record's back arrow) still lands on the list — which then marks the row the
7094
+ * person ended on. A modified click (Cmd / Ctrl / Shift / middle) opens that record in a new tab.
7095
+ * Renders nothing when the record was not opened from a list in this tab.
7096
+ */
7097
+ export declare function ListNeighborNav({ collection, itemId, className }: {
7098
+ collection: string;
7099
+ itemId: string | number | null | undefined;
7100
+ className?: string;
7101
+ }): JSX.Element | null;
7102
+
7103
+ /** Where `at` sits in the stashed list: its 1-based position, the total and its neighbours. */
7104
+ export declare function listNeighbors(stash: ListReturnStash | null, at: ListRef): {
7105
+ index: number;
7106
+ total: number;
7107
+ prev: ListRef | null;
7108
+ next: ListRef | null;
7109
+ } | null;
7110
+
6671
7111
  /** The query key a collection list (CollectionBrowserView) reads its metadata under. */
6672
7112
  export declare function listQueryKeys(collection: string): {
6673
7113
  meta: QueryKey;
6674
7114
  };
6675
7115
 
7116
+ declare interface ListRef {
7117
+ collection: string;
7118
+ id: string;
7119
+ }
7120
+
6676
7121
  /**
6677
7122
  * "Copy as …" (#654): the request a list or record view is making, rendered
6678
7123
  * as a curl command, an SDK call and a GraphQL document. Pure — no client,
@@ -6691,6 +7136,33 @@ declare interface ListRequest {
6691
7136
  page?: number;
6692
7137
  }
6693
7138
 
7139
+ /**
7140
+ * The stash this record page belongs to, or null: the record must be the one the list opened
7141
+ * (or walked to with Previous / Next), on the history entry it was opened on — the same
7142
+ * record reached later from a search is not "in the list" any more.
7143
+ */
7144
+ export declare function listReturnFor(at: ListRef, stash?: ListReturnStash | null): ListReturnStash | null;
7145
+
7146
+ declare interface ListReturnStash {
7147
+ /** The list's own key: `cbv:<collection>`, `queue:<id>`. */
7148
+ list: string;
7149
+ /** How the list is named to the person ("Workflows", a queue's name). */
7150
+ label?: string | null;
7151
+ /** The list's address when the record was opened (pathname + search). */
7152
+ path: string;
7153
+ /** The rows the list showed, in order. */
7154
+ rows: ListRef[];
7155
+ /** The record the person is on now (moves with Previous / Next). */
7156
+ current: ListRef;
7157
+ /** The record the list opened (stays put). */
7158
+ opened: ListRef;
7159
+ /** history.state.idx of the record page (null when the host keeps no index). */
7160
+ idx: number | null;
7161
+ /** The list's own history entry key, so Back to that entry knows it is a return. */
7162
+ entry: string | null;
7163
+ at: number;
7164
+ }
7165
+
6694
7166
  /**
6695
7167
  * A whole list placeholder for surfaces without a real header yet: a header strip (real labels
6696
7168
  * when given) and rows at the real row height, one bar per column.
@@ -6719,6 +7191,43 @@ export declare function listTrailDetail(p: {
6719
7191
  page?: number;
6720
7192
  }): string;
6721
7193
 
7194
+ /**
7195
+ * "Beth and 2 others are viewing this list" — ADMINISTRATORS ONLY (api
7196
+ * services/list-viewer-topics.ts).
7197
+ *
7198
+ * Every open list / queue worklist joins its viewer topic (`list-view:<collection>`,
7199
+ * `queue-view:<id>`) through the ordinary reference-counted `ops:join`, so the server can
7200
+ * count the person. The names come back as `ops:changed {topic, viewers}` — and the server
7201
+ * only lets administrators into the room that carries them, so for anyone else this hook
7202
+ * simply never hears anything and returns []. Nothing about this is decided in the browser.
7203
+ */
7204
+ declare interface ListViewer {
7205
+ id: string;
7206
+ name: string;
7207
+ }
7208
+
7209
+ /**
7210
+ * Small avatars of who else has this list / queue open — administrators only (the server
7211
+ * sends the names to administrators and nobody else; for everyone else this renders
7212
+ * nothing). Quiet: no toast, and it never moves anything:
7213
+ *
7214
+ * variant 'header' a page header row (admin list + queue pages): avatars and the sentence.
7215
+ * variant 'inline' inside a wrapping toolbar (hosts without a header row): avatars only,
7216
+ * in a fixed-width slot an administrator's toolbar always reserves, so
7217
+ * names arriving or leaving never push buttons onto another row. The
7218
+ * sentence and the names ride the tooltip.
7219
+ */
7220
+ export declare function ListViewers({ kind, id, variant, selfId, className }: {
7221
+ kind: 'list' | 'queue';
7222
+ id: string | number | null | undefined;
7223
+ variant?: 'header' | 'inline';
7224
+ /** Who "me" is when the host sits outside an ItemEditAuthContext. */
7225
+ selfId?: string;
7226
+ className?: string;
7227
+ }): JSX.Element | null;
7228
+
7229
+ export declare const LIVE_MODE_LABELS: Record<LiveMode, string>;
7230
+
6722
7231
  /**
6723
7232
  * Query-key heads of surfaces that keep themselves live with their own socket handlers (record
6724
7233
  * pages — RECORD_QUERY_HEADS in item-edit/RecordLiveSync — the collection browser's row reads,
@@ -6727,12 +7236,73 @@ export declare function listTrailDetail(p: {
6727
7236
  */
6728
7237
  export declare const LIVE_RECONCILE_HEADS: readonly string[];
6729
7238
 
7239
+ /**
7240
+ * The one polite live region of an app shell: screen-reader users hear that something on
7241
+ * the page changed ("2 rows updated", "Status changed"), at most once every ~5 seconds, never
7242
+ * for their own writes, never a value (live events carry field NAMES only).
7243
+ *
7244
+ * Mount ONCE, inside the realtime and item-edit-auth providers. Renders nothing visible. The
7245
+ * person's "Live changes" setting (Profile → Display: Full / Brief / Off) is respected, and
7246
+ * `off` stops listening entirely.
7247
+ */
7248
+ export declare function LiveAnnouncer(): JSX.Element;
7249
+
7250
+ /**
7251
+ * CacheStamp that also watches the tables the figure reads (`freshness_sources`): the first
7252
+ * write after the run raises "Data changed since run", and the viewer may opt in to refreshing
7253
+ * automatically (`scope` keeps that choice, e.g. `widget:7`). Without known tables it is the
7254
+ * plain stamp.
7255
+ */
7256
+ export declare function LiveCacheStamp({ scope, ...stamp }: Omit<Parameters<typeof CacheStamp>[0], 'changedLive' | 'autoRefresh'> & {
7257
+ scope: string;
7258
+ }): JSX.Element;
7259
+
7260
+ declare interface LiveCalendar<T> {
7261
+ /** Entries to draw; `departed` ones are no longer in the server's answer. */
7262
+ entries: SettledRow<T>[];
7263
+ /** Put on the element that contains the grid (pointer / focus inside it holds the order). */
7264
+ ref: (el: HTMLElement | null) => void;
7265
+ }
7266
+
7267
+ declare interface LiveCalendarOptions<T> {
7268
+ collection: string | null | undefined;
7269
+ /** Query keys (prefixes) re-read when the collection moves. */
7270
+ keys: QueryKey[];
7271
+ /** The rows the query answered (undefined while loading). */
7272
+ items: readonly T[] | undefined;
7273
+ keyOf: (row: T) => string;
7274
+ /** react-query `dataUpdatedAt` of the main query. */
7275
+ updatedAt?: number;
7276
+ /** The person's own view (month, date field, filter): a change shows the new answer as it is. */
7277
+ resetKey: string;
7278
+ /** Only writes naming one of these fields refresh the grid (default: any non-aspect write). */
7279
+ fields?: string[];
7280
+ quietMs?: number;
7281
+ maxWaitMs?: number;
7282
+ enabled?: boolean;
7283
+ }
7284
+
7285
+ export declare function LiveCount({ value, format, className }: LiveCountProps): JSX.Element;
7286
+
7287
+ declare interface LiveCountProps {
7288
+ value: number | string | null | undefined;
7289
+ /** Render the text (e.g. `99+`, a unit); default is the plain number. */
7290
+ format?: (value: number | string) => ReactNode;
7291
+ className?: string;
7292
+ }
7293
+
6730
7294
  /** The slice of `document` / `window` the bridge listens on. */
6731
7295
  declare interface LiveEventTarget {
6732
7296
  addEventListener(type: string, cb: () => void): void;
6733
7297
  removeEventListener(type: string, cb: () => void): void;
6734
7298
  }
6735
7299
 
7300
+ declare interface LiveFadeOptions {
7301
+ enabled?: boolean;
7302
+ /** How long after an arm DOM changes count as the live change (default 1.2 s). */
7303
+ windowMs?: number;
7304
+ }
7305
+
6736
7306
  /**
6737
7307
  * Live data hooks for headless frontends (#1751).
6738
7308
  *
@@ -6762,6 +7332,19 @@ export declare interface LiveHookOptions {
6762
7332
  includeOwn?: boolean;
6763
7333
  }
6764
7334
 
7335
+ declare interface LiveJobsOptions {
7336
+ /** Query keys (prefixes) re-read when a run starts or finishes. */
7337
+ keys: QueryKey[];
7338
+ /** A progress report (never refetches). */
7339
+ onProgress?: (p: {
7340
+ id?: number;
7341
+ progress: Record<string, unknown>;
7342
+ }) => void;
7343
+ quietMs?: number;
7344
+ maxWaitMs?: number;
7345
+ enabled?: boolean;
7346
+ }
7347
+
6765
7348
  export declare function liveListKey(collection: string, query?: Query<any>): QueryKey;
6766
7349
 
6767
7350
  export declare interface LiveListOptions extends LiveHookOptions {
@@ -6772,6 +7355,75 @@ export declare type LiveListResult<T> = UseQueryResult<ListResponse<T>> & {
6772
7355
  live: boolean;
6773
7356
  };
6774
7357
 
7358
+ /**
7359
+ * Live updates, the person's own setting (realtime round 3, item 24) — Profile → Display:
7360
+ *
7361
+ * normal what the app always did: changes land in place with a short fade, new rows carry a
7362
+ * dot, co-viewers and "Beth is writing a note" show.
7363
+ * calm the same data, quieter: values change without fades, flashes or marks, a list keeps
7364
+ * its order until the person pauses (no pointer or keys for a few seconds), and no
7365
+ * typing or "who else is here" indicators.
7366
+ * off no live data refresh at all: someone else's change shows after the ↻ refresh-data
7367
+ * button (or the next time the screen loads). New-version reloads, the person's own
7368
+ * writes, notifications, preferences and access changes still arrive.
7369
+ *
7370
+ * Stored as `preferences.live_mode` (PATCH /users/me/preferences; null = the role's default,
7371
+ * GET /api/live-preference/default, else normal). This module is the ONE read: the transport
7372
+ * tap (realtime.ts `withLiveSeenTap`), the live hooks (live.ts), the list/screen helpers and
7373
+ * the CSS (`html[data-live-mode]`) all ask it, so a surface built on them follows the setting
7374
+ * without knowing about it. `LivePreferenceHost` (mounted once per app shell) feeds it from the
7375
+ * profile query; every tab of the browser follows a change at once (localStorage `storage`
7376
+ * event), other devices on the `prefs:changed` notice user-sync already handles.
7377
+ */
7378
+ declare type LiveMode = 'calm' | 'normal' | 'off';
7379
+
7380
+ declare type LiveModeSource = 'own' | 'role' | 'default';
7381
+
7382
+ /**
7383
+ * "2 new matches · Show" — the quiet pill a live results page raises when records start
7384
+ * matching after the page loaded. It floats over the top of the results (no height of its own),
7385
+ * so nothing the person is reading moves when it appears. Put it first inside the scrolling
7386
+ * results container.
7387
+ */
7388
+ export declare function LiveNewMatchesPill({ count, onShow, className }: {
7389
+ count: number;
7390
+ onShow: () => void;
7391
+ className?: string;
7392
+ }): JSX.Element;
7393
+
7394
+ /**
7395
+ * The quiet "Live updates off" note (realtime round 3, item 24). Shown only when the person set
7396
+ * Profile → Display → Live updates to Off, so a screen that does not move is never mistaken for
7397
+ * one with nothing new. `ScreenRefreshButton` renders it beside every ↻ (record headers, the
7398
+ * portal bar); a host may also place it itself.
7399
+ *
7400
+ * `variant`: `header` (a small outlined pill on a page header), `bar` (inherits a top bar's text
7401
+ * colour), `dot` (a corner mark for a narrow rail button — the caller positions it).
7402
+ */
7403
+ export declare function LiveOffNote({ variant, className }: {
7404
+ variant?: 'header' | 'bar' | 'dot';
7405
+ className?: string;
7406
+ }): JSX.Element | null;
7407
+
7408
+ declare interface LivePreference {
7409
+ mode: LiveMode;
7410
+ source: LiveModeSource;
7411
+ normal: boolean;
7412
+ calm: boolean;
7413
+ off: boolean;
7414
+ /** Calm or Off: no fades, flashes, marks or presence indicators. */
7415
+ quiet: boolean;
7416
+ }
7417
+
7418
+ /**
7419
+ * Feeds the person's live-updates setting (lib/live-preference.ts) into this tab. Mount ONCE per
7420
+ * app shell, inside the NivaroProvider and QueryClientProvider. Reads the same profile query the
7421
+ * Display card writes (`nvr-profile-prefs`, refreshed on `prefs:changed` by user-sync), plus the
7422
+ * role's default from GET /live-preference/default. Until both answered, the tab keeps the mode
7423
+ * it last ran in (stored per browser), so an Off tab never flickers live on a page load.
7424
+ */
7425
+ export declare function LivePreferenceHost(): null;
7426
+
6775
7427
  export declare interface LiveQueryBridge {
6776
7428
  /** Refetch every tagged query and every active reconcile head once. */
6777
7429
  reconcile(reason: string): void;
@@ -6859,6 +7511,20 @@ export declare interface LiveQueryMeta {
6859
7511
  minGapMs?: number;
6860
7512
  /** Never refreshed by events — only reconciled after a gap (a surface that keeps itself live). */
6861
7513
  reconcileOnly?: boolean;
7514
+ /**
7515
+ * Events (and reconciles) only mark it stale — it is never re-read while on screen; it reads
7516
+ * again the next time it is shown or enabled. For a picker's option list: someone else's new
7517
+ * vendor appears the next time the dropdown opens, and an OPEN dropdown never reshuffles under
7518
+ * the pointer. Joins its collection's room only once it holds data (a picker nobody opened
7519
+ * listens to nothing).
7520
+ */
7521
+ staleOnly?: boolean;
7522
+ /** Wait a random 0..jitterMs before an event refetch, so every open tab does not read in the
7523
+ * same second (a dashboard many people keep open). Default 0. */
7524
+ jitterMs?: number;
7525
+ /** Wait at least this long before an event refetch (a server cache dropped a moment after
7526
+ * the write, e.g. a cached report). Default 0. */
7527
+ delayMs?: number;
6862
7528
  }
6863
7529
 
6864
7530
  /** `meta` for a query the bridge keeps current: `useQuery({ …, meta: liveQueryMeta({ reads: ['orders'] }) })`. */
@@ -6887,6 +7553,83 @@ export declare type LiveRecordResult<T> = UseQueryResult<T | null> & {
6887
7553
  /** Pure form of `useLiveRefetchInterval` (exported for tests). */
6888
7554
  export declare function liveRefetchInterval(live: boolean, base: number | false | undefined, safetyMs?: number): number | false | undefined;
6889
7555
 
7556
+ declare interface LiveRefreshOptions {
7557
+ /** Ops topic to listen on (`useLiveOps`); the page is only told THAT something moved. */
7558
+ topic?: string | null;
7559
+ /** Query keys (prefixes) to re-read. */
7560
+ keys: ReadonlyArray<QueryKey>;
7561
+ /** Quiet window before the re-read (default 2 s, never lower than 2 s). */
7562
+ quietMs?: number;
7563
+ maxWaitMs?: number;
7564
+ enabled?: boolean;
7565
+ /** Extra poke source: call `poke` from your own live subscription. */
7566
+ onReady?: (poke: () => void) => (() => void) | undefined;
7567
+ }
7568
+
7569
+ export declare interface LiveSearchOptions<T extends SearchRow> {
7570
+ /** The rows exactly as the page's query returned them. */
7571
+ rows: T[];
7572
+ /** Collections whose writes matter (the page's result collections). */
7573
+ collections: string[];
7574
+ /** The page's own search, run again as the viewer, bypassing any short cache. */
7575
+ fetchFresh: () => Promise<T[]>;
7576
+ /** Changes whenever the page's query shows a new answer (query text, tab, page, refetch). */
7577
+ resetKey: string;
7578
+ /** The page's normal refetch — what Show runs. */
7579
+ onShow: () => void;
7580
+ enabled?: boolean;
7581
+ /** Count newly matching records (off past the first page: a later page cannot say). */
7582
+ detectNew?: boolean;
7583
+ /** Put on the element that contains the rows (`data-row-key` = searchRowKey) for the fade. */
7584
+ rootRef?: RefObject<HTMLElement | null>;
7585
+ /** Least time between two re-asks. */
7586
+ minGapMs?: number;
7587
+ /** `fetchFresh` answers only the first N rows (a longer, paged list): later rows are left alone. */
7588
+ windowSize?: number;
7589
+ }
7590
+
7591
+ export declare interface LiveSearchState<T extends SearchRow> {
7592
+ /** `rows` with in-place updates applied (same order, same length). */
7593
+ rows: T[];
7594
+ /** Keys (searchRowKey) of rows that no longer match. */
7595
+ dimmed: ReadonlySet<string>;
7596
+ newCount: number;
7597
+ /** Re-run the page's query (shows the new matches, drops the dimmed rows). */
7598
+ show: () => void;
7599
+ }
7600
+
7601
+ /** The refetch interval to use: the caller's own while not live, a slow safety poll while live. */
7602
+ export declare function liveWidgetInterval(live: boolean, base: number | undefined): number | undefined;
7603
+
7604
+ /**
7605
+ * Pushed dashboard and report widgets (#1675).
7606
+ *
7607
+ * The widget asks the server to watch it (`widgets:watch` over the host's socket). When a write
7608
+ * lands on a collection the widget reads, the server recomputes it AS THIS SIGN-IN — at most
7609
+ * once every 10 seconds per widget — and pushes the new figure to this socket alone
7610
+ * (`widget:data`). `onData` gets it; the caller drops it into its query cache.
7611
+ *
7612
+ * Returns whether the push is on. While it is, the caller slows its poll to a safety net
7613
+ * (`liveWidgetInterval`); when the server refuses the widget (raw-SQL query widgets, AI
7614
+ * insight, calc formulas, a host without realtime) or drops it, the poll carries on as before.
7615
+ * The watch is renewed every minute and after a reconnect (the server lets it lapse after 150
7616
+ * seconds unrenewed), and a reconnect refetches once through `onStale`, since writes made while
7617
+ * disconnected were not pushed.
7618
+ */
7619
+ declare interface LiveWidgetOptions {
7620
+ kind: 'dashboard' | 'report';
7621
+ widget: string;
7622
+ report?: string | null;
7623
+ /** Dashboard: `{ extra_filters }`; report: `{ date_range, entity_filters }`. */
7624
+ params?: Record<string, unknown> | null;
7625
+ enabled?: boolean;
7626
+ onData: (data: unknown) => void;
7627
+ /** Refetch through the normal route (figure too large to push, or a reconnect). */
7628
+ onStale?: () => void;
7629
+ }
7630
+
7631
+ declare type Loader = () => unknown;
7632
+
6890
7633
  /**
6891
7634
  * The degraded state for a widget or panel whose data did not load (#2858): what happened in
6892
7635
  * plain words and a way to try again, instead of a blank box, "No data" or a raw error string.
@@ -6940,7 +7683,17 @@ export declare interface M2MStagingCtx {
6940
7683
  }
6941
7684
 
6942
7685
  /**
6943
- * A screenshot of the page for Report a problem (#1390), with every typed
7686
+ * Mark a grid cell as someone else's cursor: their colour as the outline (`--nvr-cursor`,
7687
+ * the hosts' CSS reads it) and their name as the hover tip. `color` overrides the hashed one
7688
+ * (a screen that assigns colours per person present). Returns the undo.
7689
+ */
7690
+ export declare function markRemoteCell(el: HTMLElement, person: {
7691
+ id?: string | null;
7692
+ name: string;
7693
+ }, color?: string): () => void;
7694
+
7695
+ /**
7696
+ * A screenshot of the page for Report a problem (#1390), with every typed
6944
7697
  * value masked first — the same rule session replay applies (all inputs
6945
7698
  * masked, `.nvr-no-record` blocked). html2canvas renders a CLONE of the
6946
7699
  * document, and the masking happens on that clone, so the live page is never
@@ -7094,6 +7847,9 @@ declare interface MatrixEditorConfig {
7094
7847
  group_label?: string;
7095
7848
  } | false;
7096
7849
  };
7850
+ /** What the matrix edits, plural, for the "who is editing" line ("allocations"). Default:
7851
+ * the target collection's name in words. */
7852
+ presence_noun?: string;
7097
7853
  }
7098
7854
 
7099
7855
  /** Prefetch requests one tab runs at once; the rest wait their turn. */
@@ -7108,6 +7864,37 @@ declare type MaybeIntent = IntentProps | Record<string, never>;
7108
7864
  */
7109
7865
  export declare function measureClockOffset(samples: ClockSample[]): number | null;
7110
7866
 
7867
+ export declare interface MergeDoneInfo {
7868
+ survivor: string;
7869
+ merge_id: string | null;
7870
+ discarded: string[];
7871
+ }
7872
+
7873
+ export declare function MergeRecordsDialog({ collection, ids, open, onOpenChange, draft, preferredSurvivor, onMerged, container }: {
7874
+ collection: string;
7875
+ ids: Array<string | number>;
7876
+ open: boolean;
7877
+ onOpenChange: (open: boolean) => void;
7878
+ draft?: {
7879
+ values: Record<string, unknown>;
7880
+ label?: string;
7881
+ } | null;
7882
+ preferredSurvivor?: string | number | null;
7883
+ /** After a merge (or an undo) — refresh lists, leave a create form. */
7884
+ onMerged?: (info: MergeDoneInfo) => void;
7885
+ container?: HTMLElement | null;
7886
+ }): JSX.Element;
7887
+
7888
+ /** The picker, then the merge screen. */
7889
+ export declare function MergeWithFlow({ collection, itemId, itemLabel, open, onOpenChange, onMerged }: {
7890
+ collection: string;
7891
+ itemId: string | number;
7892
+ itemLabel?: string | null;
7893
+ open: boolean;
7894
+ onOpenChange: (open: boolean) => void;
7895
+ onMerged?: (info: MergeDoneInfo) => void;
7896
+ }): JSX.Element;
7897
+
7111
7898
  declare interface MessageToken {
7112
7899
  text: string;
7113
7900
  entity?: string;
@@ -7254,9 +8041,12 @@ export declare const NavigationContext: React_2.Context<NavigationContextValue>;
7254
8041
 
7255
8042
  export declare type NavigationContextValue = {
7256
8043
  /** `options.state` rides along for hosts whose router supports it (e.g. react-router's
7257
- * useNavigate) — hosts that ignore the second argument still navigate correctly. */
8044
+ * useNavigate) — hosts that ignore the second argument still navigate correctly.
8045
+ * `options.replace` replaces the current history entry (Previous / Next in list keeps
8046
+ * Back pointing at the list); a host that ignores it pushes, which still works. */
7258
8047
  navigate: (path: string, options?: {
7259
8048
  state?: unknown;
8049
+ replace?: boolean;
7260
8050
  }) => void;
7261
8051
  /** Map item links onto the host app's own routes. Components fall back to
7262
8052
  * the admin shape (/collections/:collection/:id?layout=…) when absent —
@@ -7297,6 +8087,9 @@ export declare function NewImportDialog({ open, onOpenChange, definitions, runCo
7297
8087
  onQueued: (id: number) => void;
7298
8088
  }): JSX.Element;
7299
8089
 
8090
+ /** "1 new match" / "3 new matches". */
8091
+ export declare function newMatchesText(count: number): string;
8092
+
7300
8093
  /**
7301
8094
  * Selects and renders the correct field component for a single field based on
7302
8095
  * its normalized fieldType. Override any type via `components`; falls back to
@@ -7368,6 +8161,19 @@ export declare function normalizeFieldType(rawType: string, iface: string | null
7368
8161
  /** The host swapped credentials (a new bearer token): whatever was refused may work now. */
7369
8162
  export declare function noteCredentialChanged(): void;
7370
8163
 
8164
+ /**
8165
+ * A list is opening a record: keep its row order and the opened row. Call it right BEFORE the
8166
+ * navigation (the record page lands one history entry later, which `idx` records).
8167
+ */
8168
+ export declare function noteListOpen(s: {
8169
+ list: string;
8170
+ label?: string | null;
8171
+ path?: string;
8172
+ rows: ListRef[];
8173
+ opened: ListRef;
8174
+ entry?: string | null;
8175
+ }): void;
8176
+
7371
8177
  /**
7372
8178
  * An identity call succeeded: this tab is signed in. Other tabs hear it when this tab was
7373
8179
  * signed out until now, or the first time this page learns it (a fresh page after sign-in).
@@ -7440,7 +8246,7 @@ export declare function NotificationAnalyticsView({ className, compactHeader }:
7440
8246
  * click-through routing via the shared notification-target resolver. Needs
7441
8247
  * `<NivaroProvider>`.
7442
8248
  */
7443
- export declare function NotificationBell({ routes, onNavigate, app, subscribe, buttonClassName, panelClassName, beforeList, extraBadge, mailLogUrl, renderTrigger, allPath, subscriptionsPath, rulesPath, onActionError, panelPlacement, tabBadge }: NotificationBellProps): JSX.Element;
8249
+ export declare function NotificationBell({ routes, onNavigate, app, subscribe, buttonClassName, panelClassName, beforeList, extraBadge, mailLogUrl, renderTrigger, allPath, subscriptionsPath, rulesPath, onActionError, panelPlacement }: NotificationBellProps): JSX.Element;
7444
8250
 
7445
8251
  export declare interface NotificationBellProps {
7446
8252
  /** Where each notification kind lands in the host app. */
@@ -7487,7 +8293,7 @@ export declare interface NotificationBellProps {
7487
8293
  * positions it beside the trigger — for a sidebar rail whose overflow
7488
8294
  * would clip an inline panel. */
7489
8295
  panelPlacement?: 'below' | 'right';
7490
- /** Put the attention count in front of the browser tab title (default true). */
8296
+ /** @deprecated The tab count moved to `TabCountHost`; this does nothing. */
7491
8297
  tabBadge?: boolean;
7492
8298
  }
7493
8299
 
@@ -7957,7 +8763,7 @@ export declare function pageAtPayload(path: string, app: string): {
7957
8763
  app: string;
7958
8764
  } | null;
7959
8765
 
7960
- export declare function PageRenderer({ slug, hideHeader, className }: PageRendererProps): JSX.Element;
8766
+ export declare function PageRenderer({ slug, hideHeader, className, liveReads, liveGapMs }: PageRendererProps): JSX.Element;
7961
8767
 
7962
8768
  export declare interface PageRendererPage {
7963
8769
  slug: string;
@@ -7974,6 +8780,14 @@ export declare interface PageRendererProps {
7974
8780
  /** Hide the page-name header row (host renders its own chrome). */
7975
8781
  hideHeader?: boolean;
7976
8782
  className?: string;
8783
+ /**
8784
+ * Collections the page's figures are computed from. Set, the query and widget figures
8785
+ * refresh when one of them changes (coalesced, at most every `liveGapMs`, spread over a few
8786
+ * seconds across viewers) and changed figures fade in. Absent: no live refresh (as before).
8787
+ */
8788
+ liveReads?: string[];
8789
+ /** Least time between two live refreshes of one figure (default 15 s). */
8790
+ liveGapMs?: number;
7977
8791
  }
7978
8792
 
7979
8793
  export declare interface PageRendererWidget {
@@ -7995,6 +8809,9 @@ declare interface ParseFailure {
7995
8809
  position: number;
7996
8810
  }
7997
8811
 
8812
+ /** A stored or posted value → a mode, or null when it is none of them. */
8813
+ export declare function parseLiveMode(v: unknown): LiveMode | null;
8814
+
7998
8815
  /**
7999
8816
  * Text → amount. Empty (or "—" / "-") is 0. Negative amounts come back
8000
8817
  * negative; a caller that only takes zero or more refuses them itself.
@@ -8082,6 +8899,35 @@ export declare interface PartnersViewProps {
8082
8899
 
8083
8900
  declare type PathStepKind = 'request' | 'cron' | 'import' | 'feed' | 'write' | 'transition' | 'flow' | 'push' | 'attempt' | 'partner_call' | 'notify' | 'mail' | 'group';
8084
8901
 
8902
+ /** Collections the sheet can show: business records, not system tables or chat. */
8903
+ export declare function peekable(collection: string | null | undefined): boolean;
8904
+
8905
+ declare type PeekDecision = 'new-tab' | 'peek' | 'navigate';
8906
+
8907
+ /** What a click on a record link does (pure; see the module note). */
8908
+ export declare function peekDecision(e: ClickLike | null | undefined, hasPeek: boolean, collection: string | null | undefined): PeekDecision;
8909
+
8910
+ /**
8911
+ * Realtime #17 — peek at a record from anywhere, without leaving the page.
8912
+ *
8913
+ * Lists and queues already open a record in a side sheet (CollectionBrowserView's Peek,
8914
+ * QueueItemSheet). The app host mounts ONE `RecordPeekHost` (components/RecordPeekHost.tsx)
8915
+ * that renders the same `RecordDrilldownSheet`, and any surface — My Work, home worklists,
8916
+ * notifications, search results, record links in comments — opens a record in it through
8917
+ * `usePeekOrOpen()`:
8918
+ *
8919
+ * - a plain click opens the sheet (live, Esc closes, ↑ / ↓ walk the surface's own list when
8920
+ * it passed one, "Open record" goes to the full page);
8921
+ * - Cmd / Ctrl / Shift / middle click opens the full page in a new tab;
8922
+ * - a host without a peek host keeps today's behaviour: the click navigates.
8923
+ */
8924
+ export declare interface PeekTarget {
8925
+ collection: string;
8926
+ itemId: string;
8927
+ /** What the sheet calls it until the record loads. */
8928
+ title?: string | null;
8929
+ }
8930
+
8085
8931
  declare interface PendingTask {
8086
8932
  title: string;
8087
8933
  description?: string;
@@ -8236,6 +9082,9 @@ export declare interface PersonProfileData {
8236
9082
  end: number;
8237
9083
  samples: number;
8238
9084
  } | null;
9085
+ /** Idea 32 — the viewer may open the sign-in troubleshooter (admins; support-desk members
9086
+ * without network details). */
9087
+ sign_in_help?: boolean;
8239
9088
  admin: {
8240
9089
  account_kind: string | null;
8241
9090
  city: string | null;
@@ -9093,8 +9942,14 @@ export declare function QueryWidgetView({ config }: {
9093
9942
  config: QueryWidgetConfig;
9094
9943
  }): JSX.Element;
9095
9944
 
9096
- export declare function QueueBulkBar({ count, states, busy, claimsEnabled, showClaim, showRelease, showTransition, onClaim, onRelease, onTransition, onClear, children }: {
9945
+ export declare function QueueBulkBar({ count, states, busy, claimsEnabled, showClaim, showRelease, showTransition, onClaim, onRelease, onTransition, onClear, children, figures, notices, onActionIntent }: {
9097
9946
  count: number;
9947
+ /** rt8 — the selection's live count + sums (replaces "N selected"). */
9948
+ figures?: ReactNode;
9949
+ /** rt8 — "open by Beth" / "changed since you picked them", drawn above the bar. */
9950
+ notices?: ReactNode;
9951
+ /** rt8 — the person reached for one of the bar's actions (pointer or keyboard). */
9952
+ onActionIntent?: () => void;
9098
9953
  states: Array<{
9099
9954
  value: string;
9100
9955
  label: string;
@@ -9213,7 +10068,7 @@ export declare interface QueueRealtimeAdapter {
9213
10068
  }) => void) => () => void;
9214
10069
  }
9215
10070
 
9216
- export declare function QueueWorklist({ queueId, realtime, renderError, hideCreateActions, onAsk }: QueueWorklistProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | JSX.Element | null;
10071
+ export declare function QueueWorklist({ queueId, realtime, renderError, hideCreateActions, viewersInHeader, onAsk }: QueueWorklistProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | JSX.Element | null;
9217
10072
 
9218
10073
  export declare interface QueueWorklistProps {
9219
10074
  queueId: string;
@@ -9224,6 +10079,9 @@ export declare interface QueueWorklistProps {
9224
10079
  * everywhere; a list hides them only when every collection the queue can
9225
10080
  * create in is on it (the header covers those, not the rest). */
9226
10081
  hideCreateActions?: boolean | string[];
10082
+ /** The host's header row shows who else has this queue open (admin queue page), so the
10083
+ * toolbar keeps no slot for it. */
10084
+ viewersInHeader?: boolean;
9227
10085
  /** Hosts with an Ask AI page pass this: the toolbar gains "Ask about this
9228
10086
  * queue" (#1276), which hands the queue over so the host can open Ask AI
9229
10087
  * with the question seeded. Absent = no button. */
@@ -9331,6 +10189,8 @@ export declare function rankTeamForFilters(scopes: TeamScopeMap | undefined, fil
9331
10189
  /** The reaction palette — mirrored server-side; anything else is rejected. */
9332
10190
  export declare const REACTION_EMOJI: readonly ["👍", "✅", "👀", "🎉", "❤️", "😂"];
9333
10191
 
10192
+ export declare function readListReturn(now?: number): ListReturnStash | null;
10193
+
9334
10194
  export declare function readSignOutNote(): SignOutNote | null;
9335
10195
 
9336
10196
  export declare interface ReadViewLayout {
@@ -9392,6 +10252,12 @@ export declare interface RealtimeStatus {
9392
10252
  * cursor, or no answer in time). Absent = unknown; the live-query bridge reconciles then.
9393
10253
  */
9394
10254
  resumed?: 'replayed' | 'reloaded' | 'unverified' | null;
10255
+ /**
10256
+ * Realtime 24 — a dead connection is being repaired quietly (lib/socket-liveness.ts): the
10257
+ * state may read `reconnecting`, but nothing is shown for it (no banner, no stale marks)
10258
+ * unless the repair fails twice, when this clears.
10259
+ */
10260
+ repair?: 'silent' | null;
9395
10261
  }
9396
10262
 
9397
10263
  /**
@@ -9399,6 +10265,10 @@ export declare interface RealtimeStatus {
9399
10265
  * updates are paused; after the reconnect and catch-up it says so (and, when catch-up had to
9400
10266
  * reload, what was refreshed), then clears itself. Renders nothing for hosts without a
9401
10267
  * realtime status, and nothing while the browser is offline (OfflineBanner says that).
10268
+ *
10269
+ * Realtime 24: nothing at all while the connection repairs itself quietly (`status.repair`) —
10270
+ * neither the paused strip nor the "resumed" line; the strip shows only once that repair has
10271
+ * failed twice and the flag clears.
9402
10272
  */
9403
10273
  export declare function RealtimeStatusBanner(): JSX.Element | null;
9404
10274
 
@@ -9408,6 +10278,37 @@ export declare function RecentRecordsRail({ limit, title, className }: {
9408
10278
  className?: string;
9409
10279
  }): JSX.Element;
9410
10280
 
10281
+ export declare function RecordActivityStream({ sources, records, typeLabels, live, empty, className, maxHeightClass, onOpenRecord }: {
10282
+ sources: FeedSourceInput[];
10283
+ records?: Array<{
10284
+ collection: string;
10285
+ id: string | number;
10286
+ }>;
10287
+ /** Chip names by collection ("workflows" → "Workflows"). */
10288
+ typeLabels?: Record<string, string>;
10289
+ live?: boolean;
10290
+ empty?: string;
10291
+ className?: string;
10292
+ maxHeightClass?: string;
10293
+ /** Open a row's record (a host's drill-down sheet). Default: the host's record route. */
10294
+ onOpenRecord?: (target: {
10295
+ collection: string;
10296
+ itemId: string;
10297
+ }) => void;
10298
+ }): JSX.Element;
10299
+
10300
+ export declare interface RecordAgent {
10301
+ key: string;
10302
+ name: string;
10303
+ for: {
10304
+ id: string;
10305
+ name: string;
10306
+ };
10307
+ mode: AgentMode;
10308
+ /** Local clock (ms) the mark lapses at. */
10309
+ until: number;
10310
+ }
10311
+
9411
10312
  export declare function RecordChatActions({ collection, itemDraft, compact }: {
9412
10313
  collection: string;
9413
10314
  itemDraft: Record<string, unknown>;
@@ -9415,7 +10316,7 @@ export declare function RecordChatActions({ collection, itemDraft, compact }: {
9415
10316
  compact?: boolean;
9416
10317
  }): JSX.Element | null;
9417
10318
 
9418
- export declare function RecordDrilldownSheet({ collection, itemId, layoutId, rootLayoutSlug, width, title, stack: controlledStack, onPush, onPop, onClose, design, onOpenRecord }: {
10319
+ export declare function RecordDrilldownSheet({ collection, itemId, layoutId, rootLayoutSlug, width, title, stack: controlledStack, onPush, onPop, onClose, design, onOpenRecord, headerExtra }: {
9419
10320
  collection: string;
9420
10321
  itemId: string;
9421
10322
  layoutId?: number | null;
@@ -9445,6 +10346,8 @@ export declare function RecordDrilldownSheet({ collection, itemId, layoutId, roo
9445
10346
  collection: string;
9446
10347
  itemId: string;
9447
10348
  }) => void;
10349
+ /** Shown in the strip before "Open record" (the app record sheet's ↑ / ↓ position). */
10350
+ headerExtra?: ReactNode;
9448
10351
  }): JSX.Element;
9449
10352
 
9450
10353
  /**
@@ -9530,6 +10433,9 @@ export declare function RecordGridEditor({ config }: {
9530
10433
  declare interface RecordGridEditorConfig {
9531
10434
  collection: string;
9532
10435
  title?: string;
10436
+ /** What the grid edits, plural, for the "who is editing" line of the browse grid
10437
+ * ("forecasts"). Default: the collection's name in words. */
10438
+ presence_noun?: string;
9533
10439
  /**
9534
10440
  * BROWSE-THEN-EDIT: the key columns become header pickers. Until every key
9535
10441
  * is chosen the grid shows read-only totals rolled up by the unpicked keys
@@ -9644,7 +10550,33 @@ export declare function recordNavigation(ev: TrailEvent): TrailEntry | undefined
9644
10550
  export declare function RecordOutboxHost({ userId, onOpenRecord }: {
9645
10551
  userId: string | null | undefined;
9646
10552
  onOpenRecord?: (collection: string, itemId: string) => void;
9647
- }): null;
10553
+ }): JSX.Element;
10554
+
10555
+ export declare interface RecordPeekApi {
10556
+ /** Open `target` in the app's record sheet; `list` (in order) enables ↑ / ↓. */
10557
+ open: (target: PeekTarget, opts?: {
10558
+ list?: PeekTarget[];
10559
+ }) => void;
10560
+ }
10561
+
10562
+ export declare const RecordPeekContext: Context<RecordPeekApi | null>;
10563
+
10564
+ /**
10565
+ * Realtime #17 — the app's one record sheet (see lib/record-peek.ts). Mount it ONCE, around
10566
+ * the app or beside it (it registers itself, so surfaces anywhere find it), inside the host's
10567
+ * QueryClient; `wrapSheet` adds the providers the sheet's form needs (NivaroProvider,
10568
+ * NavigationContext, ItemEditAuthContext) when they are not above it. It reuses `RecordDrilldownSheet`, so the sheet is the same one
10569
+ * lists and queues show: the record's form (live), nested drills, presence, "Open record".
10570
+ *
10571
+ * The open sheet sits in the host's overlay history when it gives one (Back closes it), else
10572
+ * in component state. ↑ / ↓ walk the opening surface's list while focus is not in a field or
10573
+ * menu; Esc closes.
10574
+ */
10575
+ export declare function RecordPeekHost({ children, width, wrapSheet }: {
10576
+ children?: ReactNode;
10577
+ width?: number | string;
10578
+ wrapSheet?: (sheet: ReactNode) => ReactNode;
10579
+ }): JSX.Element;
9648
10580
 
9649
10581
  /**
9650
10582
  * Presence hooks for headless frontends (#2487, #2486), over the host's realtime adapter —
@@ -9732,6 +10664,12 @@ declare function RecordReadViewBody({ collection, itemId: itemIdProp, layoutData
9732
10664
  * whatever the touch returned. Dismiss POSTs /dismiss, which collapses the
9733
10665
  * server baseline to now — a reload inside the session grace stays quiet, and
9734
10666
  * only changes made after the dismissal come back as news.
10667
+ *
10668
+ * Opened from an email (realtime round 3 #2): the link carries the send time
10669
+ * (`?since=`), and the strip instead says quietly what happened since that
10670
+ * email — "Since this email: moved to Approved · 2 fields changed" — judged by
10671
+ * the server as the viewer (only fields they may read). Dismissing it drops
10672
+ * `since` from the address.
9735
10673
  */
9736
10674
  export declare function RecordRecapStrip({ collection, itemId }: {
9737
10675
  collection: string;
@@ -9743,7 +10681,7 @@ export declare function RecordRecapStrip({ collection, itemId }: {
9743
10681
  * never content, sent only to people already admitted to the same room (the record read gate,
9744
10682
  * the ticket gate):
9745
10683
  *
9746
- * note "Beth is writing a note" (#1721, record rooms)
10684
+ * note "Beth is replying" (#1721, record rooms; `field` = one field thread)
9747
10685
  * transition "Kim is approving" (#1722, record rooms)
9748
10686
  * reply "Kim is replying" (#2026, ticket pages)
9749
10687
  * viewers "Kim is looking at this" (#1882, ticket and issue pages)
@@ -9807,6 +10745,17 @@ declare type Rect = {
9807
10745
  h: number;
9808
10746
  };
9809
10747
 
10748
+ /**
10749
+ * Refetch what this screen shows, in place. `reason` is for diagnostics ('button', 'palette',
10750
+ * 'idle-replay-window'…). Automatic reasons (anything but 'button' / 'palette' / 'shortcut')
10751
+ * inside SCREEN_REFRESH_MIN_GAP_MS of the last refresh are folded into it.
10752
+ */
10753
+ export declare function refreshScreenData(opts?: {
10754
+ reason?: string;
10755
+ qc?: QueryClient | null;
10756
+ now?: () => number;
10757
+ }): Promise<ScreenRefreshResult>;
10758
+
9810
10759
  /** What a refused call tried: `{method, path}` (GraphQL/upload/import name themselves). */
9811
10760
  declare type RefusedWrite = {
9812
10761
  method: string;
@@ -9844,6 +10793,12 @@ export declare function registerReplayCapture(fn: Capture, snap?: Snapshot): ()
9844
10793
 
9845
10794
  export declare function registerRoomOpener(fn: RoomOpener): () => void;
9846
10795
 
10796
+ /**
10797
+ * A screen that keeps data outside react-query (its own fetch + useState) registers how to load
10798
+ * it again. Returns the unregister function.
10799
+ */
10800
+ export declare function registerScreenLoader(run: Loader): () => void;
10801
+
9847
10802
  /** Report a source of unsaved work; the returned function removes it. */
9848
10803
  export declare function registerUnsavedWork(label: string, dirty: () => boolean, opts?: UnsavedWorkOptions): () => void;
9849
10804
 
@@ -10118,6 +11073,26 @@ export declare function RequiredVideosCard({ className }: {
10118
11073
 
10119
11074
  export declare function resolveCollectionIcon(iconName: string | null | undefined): React.ElementType | null;
10120
11075
 
11076
+ declare interface ResolvedFindingsOptions {
11077
+ findings: FindingRef[];
11078
+ /** The board's own re-check, as the viewer: the keys (of `refs`) that no longer have a finding. */
11079
+ recheck: (refs: FindingRef[]) => Promise<string[]>;
11080
+ enabled?: boolean;
11081
+ /** Most findings re-checked in one go. */
11082
+ maxPerRun?: number;
11083
+ /** Who saved the record last; default reads `user_updated` through the viewer's own read. */
11084
+ lookupWriter?: (ref: FindingRef) => Promise<string | null>;
11085
+ }
11086
+
11087
+ /** The calm label: "Fixed by Beth", "Fixed by you", or just "Fixed" when nobody can be named. */
11088
+ export declare function resolvedLabel(mark: ResolvedMark, name: string | null | undefined, selfId?: string | null): string;
11089
+
11090
+ export declare interface ResolvedMark {
11091
+ at: number;
11092
+ /** User id that saved the record last (null: unknown or not readable). */
11093
+ by: string | null;
11094
+ }
11095
+
10121
11096
  export declare function resolveNotificationTarget(collection: string | null | undefined, item: string | null | undefined, routes: NotificationRouteMap): NotificationTarget;
10122
11097
 
10123
11098
  /**
@@ -10585,6 +11560,78 @@ declare interface ScopeDimensionLite {
10585
11560
  display_field?: string | null;
10586
11561
  }
10587
11562
 
11563
+ /**
11564
+ * The small ↻ that refreshes this screen's data in place (realtime idea 12) — never the page.
11565
+ * Spins while the reads run, then shows a quiet ✓ for a moment. No toast: a read that failed
11566
+ * shows its own error where it renders, and the button keeps a small amber dot with a tip.
11567
+ *
11568
+ * `variant`:
11569
+ * - `header` (default): beside a page or record header's actions, a 32 px ghost button.
11570
+ * - `rail`: the admin sidebar's always-dark footer strip.
11571
+ * - `bar`: a portal top bar (inherits the bar's text colour).
11572
+ *
11573
+ * One ↻ per screen: a `header` button (a page's own) registers while mounted, and the app-wide
11574
+ * `rail` / `bar` button renders nothing meanwhile.
11575
+ */
11576
+ export declare function ScreenRefreshButton({ variant, className }: {
11577
+ variant?: 'header' | 'rail' | 'bar';
11578
+ className?: string;
11579
+ }): JSX.Element | null;
11580
+
11581
+ /** Pure: does a command-palette query ask for "Refresh this page's data"? (both apps' palettes) */
11582
+ export declare function screenRefreshMatches(query: string): boolean;
11583
+
11584
+ /**
11585
+ * Refresh the data on this screen, never the page (realtime idea 12).
11586
+ *
11587
+ * People reloaded a page to be sure what they saw was current (prod, a week to 2026-11-14:
11588
+ * ~1,050 same-page reloads). A reload costs them their scroll, open panels, selection and any
11589
+ * half-typed edit. This refetches what the screen shows, in place:
11590
+ *
11591
+ * - every ACTIVE react-query read (`refetchQueries({type: 'active'})`, reads already in flight are
11592
+ * kept, not restarted), while inactive cached reads are only marked stale so the next screen
11593
+ * that mounts them asks again;
11594
+ * - every loader a screen registered for data it keeps outside react-query
11595
+ * (`useScreenLoader(fn)` / `registerScreenLoader(fn)`);
11596
+ * - the `nvr:screen-refresh` window event, for anything else that wants to listen.
11597
+ *
11598
+ * What stays: unsaved edits (the record form merges a refetch into its draft field by field —
11599
+ * the same path a live write by someone else takes, so a touched field keeps the person's value),
11600
+ * scroll position, open sheets and popovers, selection. Nothing remounts.
11601
+ *
11602
+ * A query opts out with `meta: { screenRefresh: false }` (a read that must not repeat — a one-off
11603
+ * export, a run that costs money).
11604
+ *
11605
+ * One refresh at a time: a second call while one runs gets the same promise. Automatic callers
11606
+ * (the idle resync, idea 13) are coalesced to one per second.
11607
+ */
11608
+ declare type ScreenRefreshPhase = 'idle' | 'running' | 'done' | 'partial';
11609
+
11610
+ declare interface ScreenRefreshResult {
11611
+ /** Active reads refetched. */
11612
+ queries: number;
11613
+ /** Registered loaders run. */
11614
+ loaders: number;
11615
+ /** Reads or loaders that answered with an error. */
11616
+ failed: number;
11617
+ ms: number;
11618
+ /** True when this call was folded into one already running or just finished. */
11619
+ coalesced?: boolean;
11620
+ }
11621
+
11622
+ declare interface ScreenRefreshState {
11623
+ phase: ScreenRefreshPhase;
11624
+ /** When the phase last changed (ms). */
11625
+ at: number;
11626
+ /** What asked for the last refresh ('button', 'palette', 'idle-…'). */
11627
+ reason: string | null;
11628
+ }
11629
+
11630
+ export declare function ScreenShareHost(): JSX.Element;
11631
+
11632
+ /** Nearest ancestor that scrolls vertically (the document's scroller as a last resort). */
11633
+ export declare function scrollParentOf(el: Element | null): HTMLElement | null;
11634
+
10588
11635
  /** A child's position under `root` as child indexes ('0.2.1'); '' = root itself. */
10589
11636
  export declare function scrollPathOf(root: Element, el: Element): string | null;
10590
11637
 
@@ -10632,6 +11679,30 @@ export declare function SearchHighlight({ text, query, synonyms, className, mark
10632
11679
  */
10633
11680
  export declare function searchRankTier(values: ReadonlyArray<unknown>, q: string | null | undefined): number;
10634
11681
 
11682
+ /**
11683
+ * Live search results (realtime program 2026-11-14, item 14).
11684
+ *
11685
+ * The open results page follows other people's writes without anyone pressing reload:
11686
+ *
11687
+ * - a result whose record changed updates in place (same position, a short fade);
11688
+ * - a result that STOPS matching dims and stays where it is (nothing leaves under the
11689
+ * pointer) — it is gone on the next refresh;
11690
+ * - a record that newly matches is only COUNTED ("2 new matches · Show"); Show re-runs the
11691
+ * page's own query as the viewer. The client never works out matching itself.
11692
+ *
11693
+ * How it learns what changed: a `collection:update` for a collection on the page schedules ONE
11694
+ * re-ask (`fetchFresh`, the page's own permission-checked search, run as the viewer) — at most
11695
+ * one per `minGapMs`, none while the tab is hidden. Only records the events NAMED can dim or
11696
+ * count as new, so a result that merely moves down the ranking is neither.
11697
+ */
11698
+ export declare interface SearchRow {
11699
+ collection: string;
11700
+ id: string | number;
11701
+ }
11702
+
11703
+ /** The one key a result row and an event agree on: `collection:ID` (ids compare upper-case). */
11704
+ export declare function searchRowKey(r: SearchRow): string;
11705
+
10635
11706
  export declare interface SearchTextOptions {
10636
11707
  /** Groups of interchangeable words/phrases; a token in a group also matches the rest. */
10637
11708
  synonyms?: SynonymGroups;
@@ -10682,6 +11753,87 @@ declare interface SendInput {
10682
11753
  urgent?: boolean;
10683
11754
  }
10684
11755
 
11756
+ /**
11757
+ * "Send my view" — hand a colleague the screen you are on (this record, or this list / queue
11758
+ * with its filters, sort and columns). They open it as themselves: what they may read decides
11759
+ * what they see. Nothing of the records travels, only where to go and how the view is set up.
11760
+ */
11761
+ export declare function SendViewButton({ getView, describe, compact, className }: {
11762
+ /** Read at send time, so the latest filters go. */
11763
+ getView: () => SendViewInput;
11764
+ /** What the person is about to send, in words ("Workflows — 2 filters"). */
11765
+ describe?: () => string;
11766
+ /** Icon-only, borderless — the record header's tool group. */
11767
+ compact?: boolean;
11768
+ className?: string;
11769
+ }): JSX.Element;
11770
+
11771
+ /**
11772
+ * "Send my view to Beth" (api routes/send-view.ts). What a screen hands over: which record,
11773
+ * list or queue, and the list's VIEW SETTINGS (the same `lv` envelope "Copy link" uses —
11774
+ * filters, sort, columns, page size). Never rows, never a record's values. The recipient
11775
+ * opens it as themselves.
11776
+ */
11777
+ declare interface SendViewInput {
11778
+ kind: 'record' | 'list' | 'queue';
11779
+ collection?: string | null;
11780
+ item?: string | number | null;
11781
+ queue?: string | number | null;
11782
+ /** base64url `lv` envelope (lists and queues). */
11783
+ lv?: string | null;
11784
+ /** A record tab to land on. */
11785
+ tab?: string | null;
11786
+ /** The sender's own words for the filters, e.g. "Region NER, PUB'd". */
11787
+ summary?: string | null;
11788
+ }
11789
+
11790
+ /**
11791
+ * Configuration read back in plain English (#11, #10, #13).
11792
+ *
11793
+ * One pure module: every builder (field rules, cascade filters, alerts, flows,
11794
+ * owner groups, transitions, validation rules, show/lock conditions) and the
11795
+ * record form's "where does this come from?" turn their stored JSON into
11796
+ * sentences here, so a rule reads the same wherever it is shown.
11797
+ *
11798
+ * Rules:
11799
+ * - Nothing is fetched. Field labels, choice labels, record labels, role
11800
+ * names and collection names come in through `SentenceLabels`; a missing
11801
+ * label falls back to the key in title case.
11802
+ * - Sentences follow how the engines judge a rule: a "not" condition also
11803
+ * matches empty values in every evaluator here, so it says "(or is empty)".
11804
+ * - An unknown shape (an op, a type or a key this module does not know)
11805
+ * gives NO sentence — null — never a guess.
11806
+ */
11807
+ declare interface SentenceLabels {
11808
+ /** field → label, for the collection the config belongs to. */
11809
+ fields?: Record<string, string>;
11810
+ /** field → type ('integer', 'decimal', 'date', 'boolean', …). */
11811
+ types?: Record<string, string>;
11812
+ /** field → stored value → choice label. */
11813
+ choices?: Record<string, Record<string, string>>;
11814
+ /** field → record id → that record's label (relation values). */
11815
+ records?: Record<string, Record<string, string>>;
11816
+ /** collection → label. */
11817
+ collections?: Record<string, string>;
11818
+ /** collection → field → label, for fields of OTHER collections. */
11819
+ relatedFields?: Record<string, Record<string, string>>;
11820
+ /** collection → field → value → choice label, for OTHER collections' fields. */
11821
+ relatedChoices?: Record<string, Record<string, Record<string, string>>>;
11822
+ /** link field → the collection it points at (M2O / lookup sources). */
11823
+ links?: Record<string, string>;
11824
+ /** role id → role name. */
11825
+ roles?: Record<string, string>;
11826
+ /** state id or key → state label. */
11827
+ states?: Record<string, string>;
11828
+ /** field → how numbers read. */
11829
+ formats?: Record<string, 'money' | 'percent' | 'number'>;
11830
+ }
11831
+
11832
+ export declare function SentViewCards({ routes, onNavigate }: {
11833
+ routes: NotificationRouteMap;
11834
+ onNavigate: (path: string) => void;
11835
+ }): JSX.Element | null;
11836
+
10685
11837
  /**
10686
11838
  * Server time (#2132). A machine whose clock drifts shows "2 minutes ago" for something that
10687
11839
  * just happened and runs countdowns early or late. The host measures the offset between this
@@ -10750,6 +11902,9 @@ export declare function setFiscalStartMonth(m: number | null | undefined): void;
10750
11902
 
10751
11903
  export declare function setFormulaConstants(map: Record<string, number> | null | undefined): void;
10752
11904
 
11905
+ /** Set the mode (the host does this from the profile; tests and tools may too). */
11906
+ export declare function setLiveMode(mode: LiveMode, source?: LiveModeSource): void;
11907
+
10753
11908
  export declare function setNumberFormat(opts: {
10754
11909
  locale?: string;
10755
11910
  compact?: boolean;
@@ -10763,6 +11918,76 @@ export declare function setServerClockOffset(ms: number): void;
10763
11918
 
10764
11919
  export declare function setTimeDisplay(mode: string | null | undefined): void;
10765
11920
 
11921
+ /**
11922
+ * Screens that update live without moving under the person (realtime program 2026-11-14).
11923
+ *
11924
+ * The live-query bridge (live-queries.ts) decides WHEN a screen's reads refetch. This file is
11925
+ * what a screen does with the fresh answer so the change lands quietly:
11926
+ *
11927
+ * - `useSettledRows` — a list whose rows may leave or arrive while someone works in it. Rows
11928
+ * never reorder under the pointer or keyboard focus, a row that left stays where it was in a
11929
+ * calm "departed" state until the person's next interaction away from it (never while the
11930
+ * pointer is on it or something holds it, like an open confirm), and rows that arrive while
11931
+ * the list is held are added at the end.
11932
+ * - `holdTopInserts` / `useTopInserts` — a newest-first feed (notifications): new rows slide in
11933
+ * at the top only while the person is scrolled at the top; otherwise they wait behind a quiet
11934
+ * "3 new" pill and the rows on screen keep their order.
11935
+ * - `useLiveFade` — the changed figure fades in (Web Animations; reduced motion: none). Only
11936
+ * text that changed while the screen was armed by a background refresh fades; first loads,
11937
+ * typing and the person's own clicks do not.
11938
+ * - `updatedAgoLabel` — "Updated 10 s ago" for a hover/focus-only footer.
11939
+ *
11940
+ * Nothing here reads data or talks to the server.
11941
+ */
11942
+ export declare interface SettledRow<T> {
11943
+ key: string;
11944
+ row: T;
11945
+ /** `departed`: no longer in the server's answer, still shown (calmly) where it was. */
11946
+ state: 'live' | 'departed';
11947
+ }
11948
+
11949
+ export declare interface SettledRows<T> {
11950
+ rows: SettledRow<T>[];
11951
+ /** Put on the element that contains the rows (pointer / focus inside it holds the order). */
11952
+ containerRef: (el: HTMLElement | null) => void;
11953
+ /** The person's own action removed these: let them go at once (no departed state). */
11954
+ release: (keys: Iterable<string>) => void;
11955
+ /** Whether the list is holding its order right now (pointer or focus inside). */
11956
+ frozen: boolean;
11957
+ }
11958
+
11959
+ declare interface SettledRowsOptions {
11960
+ /** Off: the server's rows as they are (no holding, nothing departs). */
11961
+ enabled?: boolean;
11962
+ /** Keys that must not leave right now (an open confirm, a drawer on that row). */
11963
+ held?: Iterable<string>;
11964
+ /**
11965
+ * The person's own view (search, sort, filter, tab): when it changes, the new answer shows
11966
+ * as it is — rows their filter dropped are not "departed", a sort they asked for applies.
11967
+ */
11968
+ resetKey?: string;
11969
+ }
11970
+
11971
+ declare interface SettleOptions {
11972
+ /** The pointer or keyboard focus is in the list: keep the order, append arrivals at the end. */
11973
+ frozen: boolean;
11974
+ /** Keys of departed rows that may now leave (an interaction happened since they left). */
11975
+ mayLeave?: ReadonlySet<string> | ((key: string) => boolean);
11976
+ /** Keys that never leave, whatever happened (pointer on it, its confirm is open). */
11977
+ held?: ReadonlySet<string>;
11978
+ /** Keys whose departure is expected (the person's own decision): they leave at once. */
11979
+ released?: ReadonlySet<string>;
11980
+ }
11981
+
11982
+ /**
11983
+ * Fold a fresh server answer into what is on screen (pure; exported for tests).
11984
+ *
11985
+ * Frozen: the shown order stays; rows still present take their new data in place, rows gone
11986
+ * from the answer stay as `departed`, new rows go to the end. Not frozen: the server's order,
11987
+ * with departed rows kept next to the row they followed until they may leave.
11988
+ */
11989
+ export declare function settleRows<T>(prev: readonly SettledRow<T>[], next: readonly T[], keyOf: (row: T) => string, opts: SettleOptions): SettledRow<T>[];
11990
+
10766
11991
  /**
10767
11992
  * What a list shows right now, for the crumb / back link that returns to it ("My open ·
10768
11993
  * page 3" → "Back to Workflows · My open · page 3"). The list component calls it on every
@@ -10826,6 +12051,39 @@ declare interface SheetItem {
10826
12051
  */
10827
12052
  export declare function shouldUseWorkerSocket(url: string): boolean;
10828
12053
 
12054
+ /**
12055
+ * Missed-update detector (realtime idea 14).
12056
+ *
12057
+ * A reload is a person saying "I don't trust what this page shows". This finds out whether they
12058
+ * were right, without ever sending a value anywhere:
12059
+ *
12060
+ * 1. Before the page goes (pagehide) each live screen's shown records are stored in
12061
+ * sessionStorage as a small snapshot: per record (cap 200) its collection, id, when the screen
12062
+ * loaded it, when this tab last heard a live event naming it, and ONE HASH PER FIELD (cap 40
12063
+ * fields) — hashes only, never values.
12064
+ * 2. After a reload (PerformanceNavigationTiming type `reload`, same path, snapshot under two
12065
+ * minutes old) the same screens register their fresh data; each field's new hash is compared.
12066
+ * 3. A field whose hash changed counts as a MISSED UPDATE only when this tab heard no live event
12067
+ * for the record after it loaded it (an event it heard but did not show is a screen problem,
12068
+ * not a delivery one), and the record was loaded more than ~5 s before the reload (a change
12069
+ * that may still have been on its way is ignored).
12070
+ * 4. One beacon per reload: collection, record id, field NAMES, the page route and how long the
12071
+ * old value sat on screen (`gap_s`). Reloads that compared records and found nothing different
12072
+ * are counted too ("trust reloads"). The server classifies each miss (routes/realtime-trust).
12073
+ *
12074
+ * Screens take part with `useShownRecords(records)`; the detector starts with `startRum`.
12075
+ */
12076
+ declare interface ShownRecord {
12077
+ collection: string;
12078
+ id: string | number;
12079
+ /** The values as shown (only hashed, on this device). */
12080
+ values: Record<string, unknown>;
12081
+ /** When the screen's data for this record arrived (react-query `dataUpdatedAt`). */
12082
+ loadedAt: number;
12083
+ /** Limit the hashed fields to these (default: every key but `id`). */
12084
+ fields?: string[];
12085
+ }
12086
+
10829
12087
  /**
10830
12088
  * Sign-out note (2026-11-10, Rob): the message an administrator left when
10831
12089
  * signing a person out (api services/sign-out-note.ts). The person's open tabs
@@ -11006,6 +12264,15 @@ export declare interface SlaRule {
11006
12264
 
11007
12265
  export declare function SlaRulesView(): JSX.Element;
11008
12266
 
12267
+ /**
12268
+ * Mark rows `keys` (matched by `data-live-key`) under `root` as just arrived. Text is never faded.
12269
+ * The row slides in 6 px (and is already readable); it carries an accent background that holds
12270
+ * ~2 s and then fades over ~1.5 s. The highlight and the dot carry state, so they show even with
12271
+ * reduced motion or Calm updates — only the slide is skipped there. A row that arrived while
12272
+ * nobody was looking gets a small dot in its gutter instead, cleared the first time it is in view.
12273
+ */
12274
+ export declare function slideIn(root: ParentNode | null | undefined, keys: Iterable<string>): void;
12275
+
11009
12276
  declare interface SlotAssignment {
11010
12277
  field: string;
11011
12278
  sort: number;
@@ -11171,6 +12438,11 @@ export declare function SnoozeMenu({ signal, signalLabel, rowKey, group, default
11171
12438
  * - Missed events while connected (#2462): a room whose own counter (`_rseq`) skips is caught up
11172
12439
  * alone (`catchup:room`); `realtime:stale` (#2460 — the server held this socket's broadcasts
11173
12440
  * while it was too far behind) refetches the rooms it names and raises `nvr:realtime-stale`.
12441
+ * - Missed changes per record (realtime 23): a record whose own counter (`_iseq`) skips is
12442
+ * re-read alone (record-gaps.ts) — also after a reconnect whose catch-up went unanswered.
12443
+ * - Silent self-repair (realtime 24): a connection that says it is up but is dead is reopened
12444
+ * quietly (socket-liveness.ts; the shared worker runs its own); `status().repair` is
12445
+ * `'silent'` meanwhile, so the banner stays away unless the repair fails twice.
11174
12446
  *
11175
12447
  * The socket is duck-typed (socket.io-client's `Socket` fits), so this package takes no
11176
12448
  * dependency on socket.io-client. It never decides what a viewer may see: every room is gated by
@@ -11577,6 +12849,8 @@ export declare interface SupportTicketDetail extends SupportTicket {
11577
12849
  }>;
11578
12850
  history: Array<{
11579
12851
  id: number;
12852
+ /** The activity action (screen-share-start / -watch / -stop fold into one line). */
12853
+ action?: string | null;
11580
12854
  text: string;
11581
12855
  user: string | null;
11582
12856
  user_name: string | null;
@@ -11627,6 +12901,19 @@ export declare function SupportView({ initialTicketId, onTicketChange, className
11627
12901
  */
11628
12902
  export declare type SynonymGroups = ReadonlyArray<ReadonlyArray<string>>;
11629
12903
 
12904
+ /**
12905
+ * Puts what is waiting on the signed-in person in the browser tab: "(3) My Work · App" in
12906
+ * the title and a small numbered dot on the tab icon (the host's own icon, white-label
12907
+ * included). The number is the My Work figure — records you own, approvals and
12908
+ * questions — and follows it live. Profile → Display → "Count in the tab" turns it off.
12909
+ *
12910
+ * Mount ONCE per app shell (inside the query, Nivaro and realtime providers); renders nothing.
12911
+ * `extra` adds host-side items the My Work figure does not hold.
12912
+ */
12913
+ export declare function TabCountHost({ extra }: {
12914
+ extra?: number;
12915
+ }): null;
12916
+
11630
12917
  declare type TabKey = 'catalog' | 'rules' | 'subscriptions' | 'history' | 'widget_alerts' | 'widget_alert_history' | 'anomaly_rules' | 'anomaly_history';
11631
12918
 
11632
12919
  /**
@@ -11835,6 +13122,23 @@ declare interface TopicPresence {
11835
13122
  signalReplying: (active: boolean) => void;
11836
13123
  }
11837
13124
 
13125
+ declare interface TopInsertResult<T> {
13126
+ rows: T[];
13127
+ /** New rows waiting above (shown once the person is at the top or presses the pill). */
13128
+ held: number;
13129
+ }
13130
+
13131
+ export declare interface TopInserts<T> {
13132
+ rows: T[];
13133
+ held: number;
13134
+ /** Show the held rows (scrolls the feed to the top). */
13135
+ reveal: () => void;
13136
+ /** Put on the feed's root element (its nearest scrolling ancestor is watched). */
13137
+ rootRef: (el: HTMLElement | null) => void;
13138
+ /** Keys that slid in with the last reveal (for the entrance animation). */
13139
+ arrived: ReadonlySet<string>;
13140
+ }
13141
+
11838
13142
  /** Install the listeners. Safe to call more than once. */
11839
13143
  export declare function trackActivity(): void;
11840
13144
 
@@ -12029,6 +13333,22 @@ export declare interface Typing {
12029
13333
  setTyping: (active: boolean) => void;
12030
13334
  }
12031
13335
 
13336
+ declare interface UiState {
13337
+ /** The narrow-screen sheet is open. */
13338
+ sheet: boolean;
13339
+ /** Pins someone else changed while the rows were not on screen (live, no read). */
13340
+ localChanged: ReadonlySet<string>;
13341
+ /** The viewport is wide enough to dock. */
13342
+ wide: boolean;
13343
+ /** What the dock knows, for the header icon: changed pins + unread mentions. */
13344
+ changed: number;
13345
+ unreadMentions: number;
13346
+ /** A dock is mounted in this app (the header icon renders nothing without one). */
13347
+ mounted: boolean;
13348
+ /** Pins this tab marked seen, and when (an answer read before the mark landed stays quiet). */
13349
+ seenLocal: ReadonlyMap<string, number>;
13350
+ }
13351
+
12032
13352
  /** What is unsaved right now — the leave-page prompt, the changes tray and
12033
13353
  * the host's own dirty indicator all read this one breakdown. */
12034
13354
  declare interface UnsavedSummary {
@@ -12050,6 +13370,9 @@ declare interface UnsavedWorkOptions {
12050
13370
  saveForReload?: () => boolean | Promise<boolean>;
12051
13371
  }
12052
13372
 
13373
+ /** Footer text for a live figure's freshness; null before the first answer. */
13374
+ export declare function updatedAgoLabel(at: number | null | undefined, now?: number): string | null;
13375
+
12053
13376
  /** The ids an update covers: one, a coalesced list, or null = "too many — refresh it all". */
12054
13377
  export declare function updateItemIds(ev: CollectionUpdateEvent): Array<string | number> | null;
12055
13378
 
@@ -12159,9 +13482,13 @@ export declare function useAutoRecord(opts?: {
12159
13482
  disabled?: boolean;
12160
13483
  }): void;
12161
13484
 
13485
+ export declare function useAutoRefreshPref(scope: string): [boolean, (on: boolean) => void];
13486
+
12162
13487
  /** Available actions per collection, for the viewer. */
12163
13488
  export declare function useAvailableBulkActions(collections: string[]): UseQueryResult<NoInfer<Record<string, AvailableBulkAction[]>>, Error>;
12164
13489
 
13490
+ export declare function useBackgroundArm(updatedAt: number | undefined, resetKey?: string): number;
13491
+
12165
13492
  declare interface UseBackgroundRun {
12166
13493
  phase: BackgroundPhase;
12167
13494
  /** The usual duration the server knows, ms. */
@@ -12190,6 +13517,14 @@ declare interface UseBackgroundRunOptions {
12190
13517
  onGone?: () => void;
12191
13518
  }
12192
13519
 
13520
+ /**
13521
+ * The change chip for one figure. `storeKey` names the person and the figure
13522
+ * (`<user id>:<figure key>`); `value` is what the figure shows now — pass null while it is
13523
+ * loading or failed (a placeholder is never a baseline). Returns null for non-count values and
13524
+ * while nothing has moved.
13525
+ */
13526
+ export declare function useChangeChip(storeKey: string, value: string | null | undefined, enabled?: boolean): DeltaChip | null;
13527
+
12193
13528
  export declare function useChannelAdmin(channelId: number | null): {
12194
13529
  update: UseMutationResult<unknown, Error, {
12195
13530
  name?: string;
@@ -12264,7 +13599,7 @@ export declare function useChatRooms(): {
12264
13599
 
12265
13600
  export declare function useChatSearch(q: string, filters?: ChatSearchFilters): {
12266
13601
  hits: ChatSearchHit[];
12267
- meaning: "model" | "words" | null;
13602
+ meaning: "words" | "model" | null;
12268
13603
  loading: boolean;
12269
13604
  };
12270
13605
 
@@ -12412,6 +13747,8 @@ export declare function useFormStatus(form: UseNivaroFormReturn): FormStatus;
12412
13747
 
12413
13748
  export declare function useGridFlush(): GridFlushContextValue | null;
12414
13749
 
13750
+ export declare function useGridPresence(opts: GridPresenceOptions): GridPresence;
13751
+
12415
13752
  export declare function useHelpVideo(id: string | null): UseQueryResult<NoInfer<HelpVideoDto>, Error>;
12416
13753
 
12417
13754
  /**
@@ -12535,6 +13872,37 @@ export declare function useLayoutEditingQuiet(editing: boolean): {
12535
13872
  settle: (saved: Promise<unknown>) => void;
12536
13873
  };
12537
13874
 
13875
+ export declare function useLineLocks(opts: {
13876
+ /** The line collection (the inline grid's related collection). */
13877
+ collection: string | null | undefined;
13878
+ /** The saved lines on screen. */
13879
+ rowIds: string[];
13880
+ /** The parent collection has line locks on, and this grid is editable. */
13881
+ enabled: boolean;
13882
+ }): LineLocks;
13883
+
13884
+ /** Who else has this list open (empty for non-administrators — the server sends them nothing). */
13885
+ export declare function useListViewers(kind: 'list' | 'queue', id: string | number | null | undefined, enabled?: boolean,
13886
+ /** Who "me" is, for hosts outside an ItemEditAuthContext (a page header). */
13887
+ selfId?: string): ListViewer[];
13888
+
13889
+ export declare function useLiveCalendar<T>(opts: LiveCalendarOptions<T>): LiveCalendar<T>;
13890
+
13891
+ /**
13892
+ * Fade in what changed under the element when `armKey` changes (pass the time the screen's data
13893
+ * was refreshed in the background — not on first load). Returns a callback ref for the element.
13894
+ * Changes seen up to 0.6 s before the arm and for `windowMs` after it fade; anything else (the
13895
+ * first render, typing, opening a menu) does not. Order does not matter: an arm set in an
13896
+ * effect after the refreshed rows were drawn still fades them.
13897
+ */
13898
+ export declare function useLiveFade(armKey: unknown, opts?: LiveFadeOptions): (el: HTMLElement | null) => void;
13899
+
13900
+ /**
13901
+ * Join the admin `jobs` watch room and re-read `keys` once per quiet window after a run
13902
+ * starts or finishes. Returns whether events can arrive (hosts keep a slow poll as the net).
13903
+ */
13904
+ export declare function useLiveJobs(opts: LiveJobsOptions): boolean;
13905
+
12538
13906
  /**
12539
13907
  * A list read (`readItems` query), kept current: rows others change are re-read as the viewer
12540
13908
  * and patched in place, rows that stop matching leave, deletes drop out, and anything whose
@@ -12543,6 +13911,9 @@ export declare function useLayoutEditingQuiet(editing: boolean): {
12543
13911
  */
12544
13912
  export declare function useLiveList<T extends Record<string, unknown> = Record<string, unknown>>(collection: string | null | undefined, query?: Query<T>, opts?: LiveListOptions): LiveListResult<T>;
12545
13913
 
13914
+ /** The person's live-updates setting; re-renders when it changes (any tab). */
13915
+ export declare function useLivePreference(): LivePreference;
13916
+
12546
13917
  /** Whether a bridge is mounted for this QueryClient (tagged queries refresh on events). */
12547
13918
  export declare function useLiveQueriesOn(): boolean;
12548
13919
 
@@ -12570,6 +13941,17 @@ export declare function useLiveRefetchInterval(base: number | false | undefined,
12570
13941
  enabled?: boolean;
12571
13942
  }): number | false | undefined;
12572
13943
 
13944
+ /**
13945
+ * Re-read `keys` through their normal routes when `topic` pokes (or `onReady`'s source does),
13946
+ * at most once per quiet window per tab. Only mounted (active) queries refetch; the rest are
13947
+ * marked stale. Without a realtime adapter nothing is poked and the queries keep their own poll.
13948
+ */
13949
+ export declare function useLiveRefresh(opts: LiveRefreshOptions): void;
13950
+
13951
+ export declare function useLiveSearchResults<T extends SearchRow>(opts: LiveSearchOptions<T>): LiveSearchState<T>;
13952
+
13953
+ export declare function useLiveWidget(opts: LiveWidgetOptions): boolean;
13954
+
12573
13955
  /**
12574
13956
  * Mark read. The server upserts against UNIQUE(user, room), so the old
12575
13957
  * select-then-insert dance (and the per-room promise chain that stopped it
@@ -12672,6 +14054,9 @@ export declare type UseNivaroFormReturn = {
12672
14054
  */
12673
14055
  export declare function useNotificationSoundPreference(): string;
12674
14056
 
14057
+ /** A "now" that ticks (countdowns and "ago" labels move without a refetch). */
14058
+ export declare function useNowTick(everyMs?: number, enabled?: boolean): number;
14059
+
12675
14060
  /**
12676
14061
  * Online-user set for presence dots in user pickers (#284); consumers get a
12677
14062
  * Set of upper-cased user ids. Shares the chat's ['presence-online'] entry —
@@ -12721,6 +14106,16 @@ summary: IntegrationPartnersSummary;
12721
14106
  partners: IntegrationPartnerCard[];
12722
14107
  }>, Error>;
12723
14108
 
14109
+ /**
14110
+ * The record-link click handler every surface uses. Pass the click (for the new-tab rule)
14111
+ * and, from a list, the list's records in order (for ↑ / ↓ in the sheet). Returns what it did.
14112
+ */
14113
+ export declare function usePeekOrOpen(): (target: PeekTarget, e?: (ClickLike & {
14114
+ preventDefault?: () => void;
14115
+ }) | null, opts?: {
14116
+ list?: PeekTarget[];
14117
+ }) => PeekDecision;
14118
+
12724
14119
  export declare function usePeerReadAt(room: string | null): string | null;
12725
14120
 
12726
14121
  export declare function usePersonProfile(userId: string | null | undefined): UseQueryResult<NoInfer<PersonProfileData | null>, Error>;
@@ -12797,6 +14192,9 @@ export declare function UserChip({ userId, size, children }: {
12797
14192
  /** The host's connection state, or null when the host gives none (no realtime, or no status). */
12798
14193
  export declare function useRealtimeStatus(): RealtimeStatus | null;
12799
14194
 
14195
+ /** The agents on one record right now; [] when there are none or live presence is quiet. */
14196
+ export declare function useRecordAgents(collection: string | null | undefined, item: string | number | null | undefined): RecordAgent[];
14197
+
12800
14198
  /** Integration events about one record, newest first, one page at a time. */
12801
14199
  export declare function useRecordIntegrationActivity(collection: string, item: string, page: number): UseQueryResult<NoInfer<{
12802
14200
  entries: IntegrationEvent[];
@@ -12804,8 +14202,15 @@ page: number;
12804
14202
  has_more: boolean;
12805
14203
  }>, Error>;
12806
14204
 
12807
- /** Names of the OTHER people currently signalling `kind` on this record. */
12808
- export declare function useRecordSignalPeers(collection: string | null | undefined, item: string | number | null | undefined, kind: RecordSignalKind): string[];
14205
+ /** The app's record sheet, or null when the host mounted none. */
14206
+ export declare function useRecordPeek(): RecordPeekApi | null;
14207
+
14208
+ /** Names of the OTHER people currently signalling `kind` on this record. `field`: only the
14209
+ * signals about that field's comment thread (null = only the record's own thread); omitted =
14210
+ * every signal of the kind this viewer receives. */
14211
+ export declare function useRecordSignalPeers(collection: string | null | undefined, item: string | number | null | undefined, kind: RecordSignalKind, opts?: {
14212
+ field?: string | null;
14213
+ }): string[];
12809
14214
 
12810
14215
  /**
12811
14216
  * While `active`, tell the record's other viewers (start now, then every SIGNAL_BEAT_MS);
@@ -12846,6 +14251,10 @@ export declare function useRequiredVideos(): UseQueryResult<NoInfer<HelpVideoDto
12846
14251
  */
12847
14252
  export declare function userErrorMessage(err: unknown, fallback?: string): string;
12848
14253
 
14254
+ export declare function useResolvedFindings(opts: ResolvedFindingsOptions): {
14255
+ resolved: ReadonlyMap<string, ResolvedMark>;
14256
+ };
14257
+
12849
14258
  export declare function useRoomMembership(): {
12850
14259
  join: UseMutationResult<unknown, Error, string, unknown>;
12851
14260
  leave: UseMutationResult<unknown, Error, string, unknown>;
@@ -12921,10 +14330,19 @@ export declare function UserRosterCluster({ users, showSingleName, nameLabel, st
12921
14330
  declare interface UserSyncOptions {
12922
14331
  /** The host refetches whatever it keeps preferences in (the admin's auth user). */
12923
14332
  onPrefsChanged?: () => void;
14333
+ /** The host refetches its signed-in user (permissions, menus). Default: onPrefsChanged,
14334
+ * which every host already points at its auth user. */
14335
+ onAccessChanged?: () => void;
12924
14336
  }
12925
14337
 
12926
14338
  export declare function useScopeDimensions(): ScopeDimensionLite[];
12927
14339
 
14340
+ /** Hook form: the latest `run` is called on every screen refresh while mounted. */
14341
+ export declare function useScreenLoader(run: Loader, enabled?: boolean): void;
14342
+
14343
+ /** The refresh state for a button or a status line. */
14344
+ export declare function useScreenRefreshState(): ScreenRefreshState;
14345
+
12928
14346
  export declare function useSectionState(form: UseNivaroFormReturn, defaultCollapsed?: string[]): SectionState;
12929
14347
 
12930
14348
  /**
@@ -12943,6 +14361,19 @@ export declare function useSessionRecorder(options?: SessionRecorderOptions): vo
12943
14361
  /** Write one staleness setting: a number of hours, 0 (not monitored) or null (back to default). */
12944
14362
  export declare function useSetImportCadence(): UseMutationResult<unknown, Error, Record<string, number | null>, unknown>;
12945
14363
 
14364
+ /**
14365
+ * `settleRows` with the person's pointer, focus and interactions wired in. A departed row
14366
+ * leaves at the first moment when the person has interacted (pointer down or a key) since it
14367
+ * left, the list is not held (pointer and focus outside it), and nothing holds the row.
14368
+ */
14369
+ export declare function useSettledRows<T>(rows: readonly T[] | undefined, keyOf: (row: T) => string, opts?: SettledRowsOptions): SettledRows<T>;
14370
+
14371
+ /**
14372
+ * A live screen says what it shows (the latest list is read only when the page goes and right
14373
+ * after a reload, so this costs nothing per render beyond a ref write).
14374
+ */
14375
+ export declare function useShownRecords(records: ShownRecord[] | null | undefined | (() => ShownRecord[] | null | undefined)): void;
14376
+
12946
14377
  export declare function useSignalAction(): UseMutationResult<IntegrationActionResult[], Error, {
12947
14378
  signal: string;
12948
14379
  row_keys: string[];
@@ -13004,6 +14435,15 @@ emoji: string;
13004
14435
  */
13005
14436
  export declare function useTopicPresence(topic: string | null | undefined, selfId?: string | null): TopicPresence;
13006
14437
 
14438
+ /**
14439
+ * `holdTopInserts` wired to the feed's scroller. `resetKey` (a filter, a page) starts over:
14440
+ * whatever the new view's first answer is shows as it is.
14441
+ */
14442
+ export declare function useTopInserts<T>(rows: readonly T[] | undefined, keyOf: (row: T) => string, opts?: {
14443
+ enabled?: boolean;
14444
+ resetKey?: string;
14445
+ }): TopInserts<T>;
14446
+
13007
14447
  /** "Beth is writing a note" on a record's comment thread, both directions. */
13008
14448
  export declare function useTyping(collection: string | null | undefined, item: string | number | null | undefined): Typing;
13009
14449
 
@@ -13019,6 +14459,9 @@ export declare function useUnreadChirp(totalUnread: number, rooms?: RoomInfo[]):
13019
14459
  * pushed reload — the latest function is always the one called). */
13020
14460
  export declare function useUnsavedWork(dirty: boolean, label?: string, saveForReload?: () => boolean | Promise<boolean>): void;
13021
14461
 
14462
+ /** `updatedAgoLabel` that re-reads the clock every 5 s while `active` (hovered / focused). */
14463
+ export declare function useUpdatedAgo(at: number | null | undefined, active: boolean): string | null;
14464
+
13022
14465
  /** Directory of users to add to a private channel. */
13023
14466
  export declare function useUserSearch(search: string, enabled: boolean): {
13024
14467
  users: NoInfer<{
@@ -13032,8 +14475,20 @@ export declare function useUserSearch(search: string, enabled: boolean): {
13032
14475
 
13033
14476
  export declare function useUserSync(opts?: UserSyncOptions): void;
13034
14477
 
14478
+ export declare function useWatchActions(): WatchActions & {
14479
+ prefs: WatchPrefs;
14480
+ };
14481
+
13035
14482
  export declare function useWatchFields(form: UseNivaroFormReturn, fields: string[]): Record<string, unknown>;
13036
14483
 
14484
+ /** The stored list (pins + dock). Null client (no provider) = an empty, inert list. */
14485
+ export declare function useWatchPrefs(): {
14486
+ prefs: WatchPrefs;
14487
+ ready: boolean;
14488
+ };
14489
+
14490
+ export declare function useWatchUi(): UiState;
14491
+
13037
14492
  /**
13038
14493
  * Authoring-time check. The point of separating this from evaluation is that
13039
14494
  * a formula can be told it is wrong while it is being written, instead of
@@ -13205,6 +14660,259 @@ export declare interface WalkStep {
13205
14660
  text: string | null;
13206
14661
  }
13207
14662
 
14663
+ declare interface WatchActions {
14664
+ isPinned: (collection: string, id: string | number) => boolean;
14665
+ pin: (collection: string, id: string | number) => Promise<void>;
14666
+ unpin: (collection: string, id: string | number) => Promise<void>;
14667
+ toggle: (collection: string, id: string | number) => Promise<boolean>;
14668
+ setDock: (patchDock: Partial<WatchDockPrefs>) => void;
14669
+ reorder: (keys: string[]) => void;
14670
+ markSeen: (keys?: string[]) => void;
14671
+ full: boolean;
14672
+ setSettings: (patch: Partial<WatchSettings>) => Promise<void>;
14673
+ addAlert: (input: {
14674
+ collection: string;
14675
+ id: string;
14676
+ kind: WatchAlertKind;
14677
+ step?: string;
14678
+ field?: string;
14679
+ label?: string;
14680
+ repeat: boolean;
14681
+ }) => Promise<void>;
14682
+ removeAlert: (alertId: string) => Promise<void>;
14683
+ createTeam: (input: {
14684
+ name: string;
14685
+ members: string[];
14686
+ reports?: boolean;
14687
+ remove_completed?: boolean;
14688
+ }) => Promise<string | null>;
14689
+ editTeam: (id: string, patch: {
14690
+ name?: string;
14691
+ members?: string[];
14692
+ remove_completed?: boolean;
14693
+ }) => Promise<void>;
14694
+ /** Undo a removal: the record goes back on the list (and stays). */
14695
+ restoreRemoved: (collection: string, id: string, teamId?: string) => Promise<void>;
14696
+ deleteTeam: (id: string) => Promise<void>;
14697
+ leaveTeam: (id: string) => Promise<void>;
14698
+ /** An administrator takes over a list whose maker is gone; answers the list's new id. */
14699
+ takeOverTeam: (id: string) => Promise<string | null>;
14700
+ teamPin: (teamId: string, collection: string, id: string) => Promise<void>;
14701
+ teamUnpin: (teamId: string, collection: string, id: string) => Promise<void>;
14702
+ teamSeen: (teamId: string, keys?: string[]) => void;
14703
+ }
14704
+
14705
+ declare type WatchAlertKind = 'step' | 'field' | 'overdue';
14706
+
14707
+ declare interface WatchAlertRef {
14708
+ id: string;
14709
+ /** "collection:id" of the record. */
14710
+ key: string;
14711
+ kind: WatchAlertKind;
14712
+ step: string | null;
14713
+ field: string | null;
14714
+ label: string | null;
14715
+ repeat: boolean;
14716
+ fired_at: string | null;
14717
+ }
14718
+
14719
+ export declare function WatchDock(): JSX.Element | null;
14720
+
14721
+ declare interface WatchDockPrefs {
14722
+ state: DockState;
14723
+ width: number;
14724
+ tab: DockTab;
14725
+ sort: DockSort;
14726
+ }
14727
+
14728
+ export declare const watchKeys: {
14729
+ all: readonly ["watch-list"];
14730
+ prefs: readonly ["watch-list", "prefs"];
14731
+ rows: (sig: string) => readonly ["watch-list", "rows", string];
14732
+ summary: (sig: string) => readonly ["watch-list", "summary", string];
14733
+ waiting: readonly ["watch-list", "waiting"];
14734
+ mentions: readonly ["watch-list", "mentions"];
14735
+ team: (id: string, sig: string) => readonly ["watch-list", "team", string, string];
14736
+ alertOptions: (collection: string, id: string) => readonly ["watch-list", "alert-options", string, string];
14737
+ };
14738
+
14739
+ /**
14740
+ * The app-header icon for the watch list (rt5 #1). Wide screens: it opens a closed or
14741
+ * minimized dock and closes an open one. Narrow screens (and phones): it opens the dock as a
14742
+ * sheet. A small dot says a pinned record changed, or a mention waits, while the list was
14743
+ * out of sight. Renders nothing in an app without a dock.
14744
+ *
14745
+ * `variant`: 'rail' = the admin's dark icon rail; 'bar' = a light/dark top bar.
14746
+ */
14747
+ export declare function WatchListButton({ variant, className, ringClass }: {
14748
+ variant?: 'rail' | 'bar';
14749
+ className?: string;
14750
+ /** The dot's ring = the bar's own background, so the dot reads as cut out of it. */
14751
+ ringClass?: string;
14752
+ }): JSX.Element | null;
14753
+
14754
+ export declare function WatchPinButton({ collection, itemId, shortcut, size, className }: {
14755
+ collection: string;
14756
+ itemId: string | number | null | undefined;
14757
+ shortcut?: boolean;
14758
+ size?: 'sm' | 'md';
14759
+ className?: string;
14760
+ }): JSX.Element | null;
14761
+
14762
+ declare interface WatchPinRef {
14763
+ key: string;
14764
+ collection: string;
14765
+ id: string;
14766
+ pinned_at: string;
14767
+ /** Added automatically (the record landed on the person's step). */
14768
+ auto?: boolean;
14769
+ /** When the record was completed (the list removes completed records). */
14770
+ done_at?: string | null;
14771
+ }
14772
+
14773
+ declare interface WatchPrefs {
14774
+ pins: WatchPinRef[];
14775
+ dock: WatchDockPrefs;
14776
+ replies_seen_at: string | null;
14777
+ max: number;
14778
+ settings: WatchSettings;
14779
+ alerts: WatchAlertRef[];
14780
+ teams: WatchTeam[];
14781
+ /** Taken off because they were completed (7 days, Undo puts one back). */
14782
+ removed: WatchRemovedRef[];
14783
+ /** How many direct reports the person has (a manager may add their team in one go). */
14784
+ direct_reports?: number;
14785
+ /** The signed-in person (only on the prefs read). */
14786
+ me?: {
14787
+ id: string;
14788
+ name: string;
14789
+ };
14790
+ }
14791
+
14792
+ /** A record taken off because it was completed ("Recently removed", 7 days). */
14793
+ declare interface WatchRemovedRef {
14794
+ key: string;
14795
+ collection: string;
14796
+ id: string;
14797
+ title: string | null;
14798
+ done_at: string;
14799
+ removed_at: string;
14800
+ }
14801
+
14802
+ declare interface WatchSettings {
14803
+ desktop: boolean;
14804
+ auto_add: boolean;
14805
+ auto_remove: boolean;
14806
+ digest: boolean;
14807
+ /** Completed records leave the list (24 h after, or once seen); 7 days to undo. */
14808
+ remove_completed: boolean;
14809
+ }
14810
+
14811
+ declare interface WatchTeam {
14812
+ id: string;
14813
+ name: string;
14814
+ owner: {
14815
+ id: string;
14816
+ name: string;
14817
+ };
14818
+ members: Array<{
14819
+ id: string;
14820
+ name: string;
14821
+ }>;
14822
+ pins: Array<{
14823
+ key: string;
14824
+ collection: string;
14825
+ id: string;
14826
+ pinned_at: string;
14827
+ by: string;
14828
+ done_at?: string | null;
14829
+ }>;
14830
+ /** The owner's switch: completed records leave this list. */
14831
+ remove_completed?: boolean;
14832
+ removed?: WatchRemovedRef[];
14833
+ can_manage: boolean;
14834
+ is_member: boolean;
14835
+ /** Its maker can no longer sign in: read-only until an administrator takes it over. */
14836
+ owner_gone?: boolean;
14837
+ can_take_over?: boolean;
14838
+ }
14839
+
14840
+ export declare const watchUi: {
14841
+ publish(counts: {
14842
+ changed: number;
14843
+ unreadMentions: number;
14844
+ }): void;
14845
+ setMounted(mounted: boolean): void;
14846
+ openSheet: () => void;
14847
+ closeSheet: () => void;
14848
+ markLocal(keys: string[]): void;
14849
+ noteSeen(keys: string[] | null, pins: string[]): void;
14850
+ clearLocal(keys?: string[]): void;
14851
+ };
14852
+
14853
+ /** Hosts mark their own chrome (menu button, title row, toolbars) with this. */
14854
+ export declare const WIDGET_IMAGE_IGNORE_ATTR = "data-widget-image-ignore";
14855
+
14856
+ export declare interface WidgetImageInput {
14857
+ title: string;
14858
+ /** When the figures were read; defaults to now. */
14859
+ asOf?: Date | number | string;
14860
+ /** Dashboard-level filters (field/op/value). */
14861
+ dashboardFilters?: Array<{
14862
+ field: string;
14863
+ op?: string;
14864
+ value: unknown;
14865
+ }> | null;
14866
+ /** Report date range. */
14867
+ dateRange?: {
14868
+ preset?: string;
14869
+ start?: string;
14870
+ end?: string;
14871
+ } | null;
14872
+ /** Report entity filters. */
14873
+ entityFilters?: Array<{
14874
+ field: string;
14875
+ values: Array<string | number>;
14876
+ labels?: string[];
14877
+ }> | null;
14878
+ /** The widget's own filter (object or JSON text). */
14879
+ widgetFilter?: unknown;
14880
+ /** The widget's own `{field, op, value}` rules (report widgets). */
14881
+ widgetRules?: Array<{
14882
+ field?: string;
14883
+ op?: string;
14884
+ value?: unknown;
14885
+ }> | null;
14886
+ /** Extra plain-word lines a host wants on the picture. */
14887
+ extra?: string[];
14888
+ labels?: SentenceLabels;
14889
+ }
14890
+
14891
+ export declare interface WidgetImageLabel {
14892
+ title: string;
14893
+ asOf: string;
14894
+ /** Every filter in effect, one plain sentence each; empty = none. */
14895
+ filters: string[];
14896
+ }
14897
+
14898
+ /**
14899
+ * The ⋯ menu on a dashboard / report widget: "Copy as image" and "Download
14900
+ * PNG". The picture is the widget as it is on screen, in the light theme on
14901
+ * white, with the title, "As of <time>" and the filters in effect printed on
14902
+ * top — ready for an email or Teams message.
14903
+ *
14904
+ * `getTarget` returns the widget card element; the host marks its own chrome
14905
+ * (title row, buttons) with `data-widget-image-ignore` so it is left out.
14906
+ * `label` is read when the item is chosen, so it always carries the filters
14907
+ * in effect right then.
14908
+ */
14909
+ export declare function WidgetImageMenu({ getTarget, label, className, align }: {
14910
+ getTarget: () => HTMLElement | null;
14911
+ label: WidgetImageInput | (() => WidgetImageInput);
14912
+ className?: string;
14913
+ align?: 'start' | 'center' | 'end';
14914
+ }): JSX.Element;
14915
+
13208
14916
  export declare function WidgetSlot({ widgetId, inputBindings, itemDraft, itemCollection, ready, label, defaultExpanded, frameless, apiBase: apiBaseProp, compact, strip, onClientAction, onWidgetType, onContentChange }: WidgetSlotProps): JSX.Element | null;
13209
14917
 
13210
14918
  declare interface WidgetSlotProps {