@nivaro/react 0.3.114 → 0.3.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/dist/components/ScreenShareHost.js +24 -0
  2. package/dist/full.css +50 -2
  3. package/dist/hooks/useSessionRecorder.js +61 -60
  4. package/dist/index.d.ts +1728 -22
  5. package/dist/index.js +1091 -950
  6. package/dist/shared/components/ActivityEntry.js +209 -97
  7. package/dist/shared/components/AgentPresenceChip.js +51 -0
  8. package/dist/shared/components/AnnouncementBanner.js +56 -41
  9. package/dist/shared/components/AutolinkedText.js +98 -85
  10. package/dist/shared/components/BroadcastView.js +149 -141
  11. package/dist/shared/components/CacheStamp.js +78 -30
  12. package/dist/shared/components/CollectionBrowserView.js +4909 -4182
  13. package/dist/shared/components/ConfigChangeStrip.js +63 -0
  14. package/dist/shared/components/ConfigReachNote.js +107 -0
  15. package/dist/shared/components/ConformanceView.js +389 -319
  16. package/dist/shared/components/DataTable.js +612 -551
  17. package/dist/shared/components/DelegateCoverLine.js +164 -0
  18. package/dist/shared/components/EnvironmentNotice.js +56 -65
  19. package/dist/shared/components/FilePreviewLightbox.js +89 -43
  20. package/dist/shared/components/FindingFixedMark.js +23 -0
  21. package/dist/shared/components/GridPresenceLine.js +100 -0
  22. package/dist/shared/components/IdleReloadWatcher.js +82 -43
  23. package/dist/shared/components/InStep.js +46 -0
  24. package/dist/shared/components/ItemEditForm.js +5504 -4889
  25. package/dist/shared/components/LiveAnnouncer.js +62 -0
  26. package/dist/shared/components/LiveCount.js +54 -0
  27. package/dist/shared/components/LiveFigure.js +28 -0
  28. package/dist/shared/components/LiveListControls.js +114 -0
  29. package/dist/shared/components/LiveNewMatchesPill.js +25 -0
  30. package/dist/shared/components/LiveOffNote.js +44 -0
  31. package/dist/shared/components/LivePreferenceHost.js +42 -0
  32. package/dist/shared/components/LiveRowMark.js +25 -20
  33. package/dist/shared/components/LiveTraceView.js +257 -0
  34. package/dist/shared/components/MapView.js +30 -29
  35. package/dist/shared/components/MatrixEditor.js +497 -462
  36. package/dist/shared/components/MyWorkView.js +346 -272
  37. package/dist/shared/components/NotificationBell.js +215 -201
  38. package/dist/shared/components/OverflowRail.js +326 -0
  39. package/dist/shared/components/PageRenderer.js +636 -599
  40. package/dist/shared/components/PresenceDot.js +21 -0
  41. package/dist/shared/components/ProfileView.js +656 -536
  42. package/dist/shared/components/RealtimeStatusBanner.js +25 -25
  43. package/dist/shared/components/RecentRecordsRail.js +51 -48
  44. package/dist/shared/components/RecordCompare.js +241 -150
  45. package/dist/shared/components/RecordDrilldownSheet.js +66 -64
  46. package/dist/shared/components/RecordGridEditor.js +350 -311
  47. package/dist/shared/components/RecordHoverCard.js +147 -0
  48. package/dist/shared/components/RecordPeekHost.js +111 -0
  49. package/dist/shared/components/RecordReadView.js +414 -412
  50. package/dist/shared/components/RelativeTime.js +16 -0
  51. package/dist/shared/components/ReportView.js +1396 -1304
  52. package/dist/shared/components/ScreenRefreshButton.js +77 -0
  53. package/dist/shared/components/TabCountHost.js +10 -0
  54. package/dist/shared/components/TickerNumber.js +19 -18
  55. package/dist/shared/components/TipLayer.js +70 -58
  56. package/dist/shared/components/WidgetImageMenu.js +59 -0
  57. package/dist/shared/components/WidgetSlot.js +571 -524
  58. package/dist/shared/components/activity/RecordActivityStream.js +317 -0
  59. package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
  60. package/dist/shared/components/cbv/approval-changed.js +20 -0
  61. package/dist/shared/components/cbv/changed-by-others.js +251 -0
  62. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
  63. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  65. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  66. package/dist/shared/components/change-proposals/types.js +4 -0
  67. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  68. package/dist/shared/components/chat/Composer.js +276 -298
  69. package/dist/shared/components/chat/room-due.js +13 -0
  70. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  71. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  72. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  73. package/dist/shared/components/imports/ImportConsole.js +159 -155
  74. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  75. package/dist/shared/components/integrations/SendStatus.js +202 -0
  76. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  77. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  78. package/dist/shared/components/integrations/console/SignalCard.js +84 -77
  79. package/dist/shared/components/integrations/console/api.js +161 -117
  80. package/dist/shared/components/integrations/console/tone.js +15 -12
  81. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  82. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  83. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  84. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  85. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  86. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  87. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  88. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  89. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  90. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  91. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  92. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  93. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  94. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  95. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  96. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  97. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  98. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  99. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  100. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  101. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  102. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  103. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  104. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  105. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  106. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  107. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  108. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  109. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  110. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  111. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  112. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  113. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  114. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  115. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  116. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  117. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  118. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  119. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  120. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  121. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  122. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  123. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  124. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  125. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  126. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  127. package/dist/shared/components/item-edit/file-live.js +77 -0
  128. package/dist/shared/components/item-edit/file-processing.js +87 -0
  129. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  130. package/dist/shared/components/item-edit/live-related.js +23 -0
  131. package/dist/shared/components/item-edit/live-title.js +66 -0
  132. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  133. package/dist/shared/components/item-edit/removed-line.js +58 -0
  134. package/dist/shared/components/item-edit/render-stability.js +70 -59
  135. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  136. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  137. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  138. package/dist/shared/components/list/InlineEdit.js +504 -208
  139. package/dist/shared/components/list/ListViewers.js +81 -0
  140. package/dist/shared/components/list/PhonePager.js +50 -0
  141. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  142. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  143. package/dist/shared/components/merge/merge-values.js +110 -0
  144. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  145. package/dist/shared/components/notifications/NotificationCenterView.js +389 -323
  146. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  147. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  148. package/dist/shared/components/notifications/bundles.js +21 -19
  149. package/dist/shared/components/notifications/resolved-line.js +25 -0
  150. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  151. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  152. package/dist/shared/components/panels/AlertBanners.js +132 -0
  153. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  154. package/dist/shared/components/panels/BranchLanes.js +82 -54
  155. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  156. package/dist/shared/components/panels/CommentImages.js +219 -0
  157. package/dist/shared/components/panels/CommentPanel.js +649 -530
  158. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  159. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  160. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  161. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  162. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  163. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  164. package/dist/shared/components/panels/SlaClock.js +130 -99
  165. package/dist/shared/components/panels/TaskPanel.js +308 -287
  166. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  167. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  168. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  169. package/dist/shared/components/pipeline/PipelineEditorView.js +2050 -1942
  170. package/dist/shared/components/profile/AgentNameField.js +141 -0
  171. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  172. package/dist/shared/components/profile/PersonAccess.js +398 -330
  173. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  174. package/dist/shared/components/profile/PersonProfile.js +81 -73
  175. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  176. package/dist/shared/components/queue/OwnerAvatars.js +9 -9
  177. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  178. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  179. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  180. package/dist/shared/components/queue/QueueWorklist.js +2407 -1950
  181. package/dist/shared/components/queue/worklist-helpers.js +10 -6
  182. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  183. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  184. package/dist/shared/components/support/ReportProblem.js +1 -0
  185. package/dist/shared/components/support/ScreenShare.js +554 -0
  186. package/dist/shared/components/support/SupportView.js +160 -129
  187. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  188. package/dist/shared/components/ui/popover.js +53 -29
  189. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  190. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  191. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  192. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  193. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  194. package/dist/shared/lib/activity-sentence.js +87 -75
  195. package/dist/shared/lib/agent-presence.js +46 -0
  196. package/dist/shared/lib/approval-progress.js +49 -0
  197. package/dist/shared/lib/attention-prefs.js +27 -0
  198. package/dist/shared/lib/cell-locks.js +56 -0
  199. package/dist/shared/lib/co-edit.js +166 -0
  200. package/dist/shared/lib/coedit-registry.js +44 -0
  201. package/dist/shared/lib/comment-awareness.js +124 -0
  202. package/dist/shared/lib/comment-images.js +45 -0
  203. package/dist/shared/lib/config-watch.js +94 -0
  204. package/dist/shared/lib/copy-rules.js +65 -0
  205. package/dist/shared/lib/count-step.js +30 -0
  206. package/dist/shared/lib/deadline-ticker.js +68 -0
  207. package/dist/shared/lib/derived-causes.js +115 -0
  208. package/dist/shared/lib/draft-store.js +114 -85
  209. package/dist/shared/lib/error-hints.js +1 -0
  210. package/dist/shared/lib/field-merge.js +126 -0
  211. package/dist/shared/lib/filter-sentence.js +10 -10
  212. package/dist/shared/lib/focus-mode.js +16 -12
  213. package/dist/shared/lib/grid-cursors.js +77 -0
  214. package/dist/shared/lib/grid-presence.js +182 -0
  215. package/dist/shared/lib/idle-reload.js +100 -73
  216. package/dist/shared/lib/in-step.js +45 -0
  217. package/dist/shared/lib/integration-chip.js +19 -18
  218. package/dist/shared/lib/keep-row-focus.js +43 -0
  219. package/dist/shared/lib/line-locks.js +141 -0
  220. package/dist/shared/lib/line-split.js +41 -0
  221. package/dist/shared/lib/linked-changes.js +150 -0
  222. package/dist/shared/lib/list-return.js +231 -0
  223. package/dist/shared/lib/list-viewers.js +52 -0
  224. package/dist/shared/lib/live-announcer.js +86 -0
  225. package/dist/shared/lib/live-counts.js +85 -0
  226. package/dist/shared/lib/live-data-changed.js +108 -0
  227. package/dist/shared/lib/live-deltas.js +81 -0
  228. package/dist/shared/lib/live-findings.js +113 -0
  229. package/dist/shared/lib/live-groups.js +122 -0
  230. package/dist/shared/lib/live-link-labels.js +162 -0
  231. package/dist/shared/lib/live-list-flow.js +334 -0
  232. package/dist/shared/lib/live-list.js +143 -129
  233. package/dist/shared/lib/live-moves.js +51 -0
  234. package/dist/shared/lib/live-ops.js +26 -26
  235. package/dist/shared/lib/live-pickers.js +7 -0
  236. package/dist/shared/lib/live-preference.js +184 -0
  237. package/dist/shared/lib/live-queries.js +226 -181
  238. package/dist/shared/lib/live-screen.js +333 -0
  239. package/dist/shared/lib/live-search.js +108 -0
  240. package/dist/shared/lib/live-seen.js +35 -0
  241. package/dist/shared/lib/live-views.js +100 -0
  242. package/dist/shared/lib/live.js +159 -133
  243. package/dist/shared/lib/missed-updates.js +198 -0
  244. package/dist/shared/lib/newer-file.js +56 -0
  245. package/dist/shared/lib/notification-sound.js +42 -20
  246. package/dist/shared/lib/obligation-banner.js +17 -17
  247. package/dist/shared/lib/own-writes.js +59 -41
  248. package/dist/shared/lib/picker-badges.js +94 -0
  249. package/dist/shared/lib/presence-signals.js +131 -84
  250. package/dist/shared/lib/rail-menu-context.js +9 -0
  251. package/dist/shared/lib/realtime.js +49 -24
  252. package/dist/shared/lib/record-gaps.js +85 -0
  253. package/dist/shared/lib/record-outbox.js +369 -222
  254. package/dist/shared/lib/record-peek.js +75 -0
  255. package/dist/shared/lib/record-tabs.js +92 -72
  256. package/dist/shared/lib/relative-ticker.js +42 -0
  257. package/dist/shared/lib/request-gate.js +119 -119
  258. package/dist/shared/lib/rollup-recalc.js +107 -0
  259. package/dist/shared/lib/room-gaps.js +40 -36
  260. package/dist/shared/lib/row-surface.js +7 -0
  261. package/dist/shared/lib/rum.js +137 -87
  262. package/dist/shared/lib/save-progress.js +20 -0
  263. package/dist/shared/lib/scheduled-countdown.js +67 -0
  264. package/dist/shared/lib/screen-refresh.js +160 -0
  265. package/dist/shared/lib/screen-share.js +234 -0
  266. package/dist/shared/lib/seen-since.js +74 -0
  267. package/dist/shared/lib/selection-watch.js +205 -0
  268. package/dist/shared/lib/send-status.js +132 -0
  269. package/dist/shared/lib/send-view.js +23 -0
  270. package/dist/shared/lib/socket-liveness.js +155 -0
  271. package/dist/shared/lib/socket-realtime.js +168 -140
  272. package/dist/shared/lib/state-census.js +53 -0
  273. package/dist/shared/lib/summary-mode.js +61 -39
  274. package/dist/shared/lib/tab-attention.js +143 -32
  275. package/dist/shared/lib/table-density.js +64 -0
  276. package/dist/shared/lib/table-pins.js +20 -18
  277. package/dist/shared/lib/track-travel.js +40 -0
  278. package/dist/shared/lib/unseen-changes.js +68 -0
  279. package/dist/shared/lib/upload-file.js +62 -0
  280. package/dist/shared/lib/upload-presence.js +127 -0
  281. package/dist/shared/lib/urgent-chime.js +65 -0
  282. package/dist/shared/lib/use-below-md.js +29 -0
  283. package/dist/shared/lib/use-online-users.js +32 -11
  284. package/dist/shared/lib/user-sync.js +155 -39
  285. package/dist/shared/lib/waiting-count.js +44 -0
  286. package/dist/shared/lib/watch-desktop.js +83 -0
  287. package/dist/shared/lib/watch-list.js +447 -0
  288. package/dist/shared/lib/widget-image-render.js +64 -0
  289. package/dist/shared/lib/widget-image.js +111 -0
  290. package/dist/shared/lib/worker-socket.js +130 -104
  291. package/dist/shared/lib/write-to-screen.js +133 -0
  292. package/package.json +1 -1
  293. package/styles.css +49 -1
@@ -1,66 +1,70 @@
1
1
  function M(c) {
2
- const n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), i = { gaps: 0, missed: 0, replayed: 0, refetched: 0 }, m = c.graceMs ?? 1500, g = (s) => {
3
- const e = o.get(s);
4
- e && (e.timer && clearTimeout(e.timer), o.delete(s));
5
- }, S = (s) => {
6
- const e = o.get(s);
2
+ const n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), i = { gaps: 0, missed: 0, replayed: 0, refetched: 0 }, a = c.graceMs ?? 1500, g = (r) => {
3
+ const e = o.get(r);
4
+ e && (e.timer && clearTimeout(e.timer), o.delete(r));
5
+ }, S = (r) => {
6
+ const e = o.get(r);
7
7
  if (e) {
8
8
  if (e.timer = null, e.missing.size === 0) {
9
- o.delete(s);
9
+ o.delete(r);
10
10
  return;
11
11
  }
12
- e.asked = !0, c.request({ room: s, cursor: e.fromSeq, missed: e.missing.size });
12
+ e.asked = !0, c.request({ room: r, cursor: e.fromSeq, missed: e.missing.size });
13
13
  }
14
14
  };
15
15
  return {
16
- observe(s) {
17
- if (!s || typeof s != "object") return;
18
- const e = s;
16
+ observe(r) {
17
+ if (!r || typeof r != "object") return;
18
+ const e = r;
19
19
  if (typeof e._room != "string" || typeof e._rseq != "number") return;
20
- const t = e._room, r = e._rseq, a = typeof e._rseq_min == "number" ? e._rseq_min : r, q = typeof e._seq == "number" ? e._seq : 0, f = n.get(t);
21
- if (!f) {
22
- n.set(t, { rseq: r, seq: q });
20
+ const t = e._room, s = e._rseq, q = typeof e._rseq_min == "number" ? e._rseq_min : s, f = typeof e._seq == "number" ? e._seq : 0, u = n.get(t);
21
+ if (!u) {
22
+ n.set(t, { rseq: s, seq: f });
23
23
  return;
24
24
  }
25
25
  const d = o.get(t);
26
- if (d) for (let l = a; l <= r; l++) d.missing.delete(l);
27
- if (d && d.missing.size === 0 && !d.asked && g(t), r <= f.rseq) {
28
- r < f.rseq && a === 1 && n.set(t, { rseq: r, seq: q });
26
+ if (d) for (let l = q; l <= s; l++) d.missing.delete(l);
27
+ if (d && d.missing.size === 0 && !d.asked && g(t), s <= u.rseq) {
28
+ s < u.rseq && q === 1 && n.set(t, { rseq: s, seq: f });
29
29
  return;
30
30
  }
31
- if (a > f.rseq + 1) {
32
- const l = f.rseq + 1, h = a - 1, y = h - l + 1;
31
+ if (q > u.rseq + 1) {
32
+ const l = u.rseq + 1, h = q - 1, y = h - l + 1;
33
33
  if (i.gaps++, i.missed += y, y > 200)
34
34
  g(t), i.refetched++, c.refetch([t]);
35
35
  else {
36
- const u = o.get(t) ?? {
37
- fromSeq: f.seq,
38
- toSeq: q,
36
+ const m = o.get(t) ?? {
37
+ fromSeq: u.seq,
38
+ toSeq: f,
39
39
  missing: /* @__PURE__ */ new Set(),
40
40
  timer: null,
41
41
  asked: !1
42
42
  };
43
- for (let p = l; p <= h; p++) u.missing.add(p);
44
- u.toSeq = Math.max(u.toSeq, q), o.set(t, u), !u.timer && !u.asked && (u.timer = setTimeout(() => S(t), m));
43
+ for (let p = l; p <= h; p++) m.missing.add(p);
44
+ m.toSeq = Math.max(m.toSeq, f), o.set(t, m), !m.timer && !m.asked && (m.timer = setTimeout(() => S(t), a));
45
45
  }
46
46
  }
47
- n.set(t, { rseq: r, seq: Math.max(f.seq, q) });
47
+ n.set(t, { rseq: s, seq: Math.max(u.seq, f) });
48
48
  },
49
- replayed(s) {
50
- const e = s == null ? void 0 : s.room;
49
+ replayed(r) {
50
+ const e = r == null ? void 0 : r.room;
51
51
  if (typeof e != "string") return;
52
52
  const t = o.get(e);
53
53
  if (g(e), !!t) {
54
- if (s.full) {
54
+ if (r.full) {
55
55
  i.refetched++, c.refetch([e]);
56
56
  return;
57
57
  }
58
- for (const r of s.events ?? [])
59
- typeof (r == null ? void 0 : r.seq) != "number" || r.seq <= t.fromSeq || !(typeof r.rseq == "number" ? t.missing.has(r.rseq) : t.toSeq === 0 || r.seq < t.toSeq) || (i.replayed++, c.dispatch(r.event, { ...r.payload, _seq: r.seq }));
58
+ for (const s of r.events ?? []) {
59
+ if (typeof (s == null ? void 0 : s.seq) != "number" || s.seq <= t.fromSeq || !(typeof s.rseq == "number" ? t.missing.has(s.rseq) : t.toSeq === 0 || s.seq < t.toSeq)) continue;
60
+ i.replayed++;
61
+ const f = typeof s.iseq == "number" ? { _iseq: s.iseq } : {};
62
+ c.dispatch(s.event, { ...s.payload, _seq: s.seq, ...f });
63
+ }
60
64
  }
61
65
  },
62
- reset(s) {
63
- const e = s ?? [.../* @__PURE__ */ new Set([...n.keys(), ...o.keys()])];
66
+ reset(r) {
67
+ const e = r ?? [.../* @__PURE__ */ new Set([...n.keys(), ...o.keys()])];
64
68
  for (const t of e)
65
69
  g(t), n.delete(t);
66
70
  },
@@ -72,7 +76,7 @@ function M(c) {
72
76
  function _(c) {
73
77
  return { collection: c, item: null, items: null, many: !0, count: 0, coalesced: !0 };
74
78
  }
75
- function k(c) {
79
+ function b(c) {
76
80
  const n = [];
77
81
  for (const o of c)
78
82
  if (o.startsWith("collection:"))
@@ -81,10 +85,10 @@ function k(c) {
81
85
  payload: _(o.slice(11))
82
86
  });
83
87
  else if (o.startsWith("record:")) {
84
- const i = o.slice(7), m = i.indexOf(":");
85
- m > 0 && n.push({
88
+ const i = o.slice(7), a = i.indexOf(":");
89
+ a > 0 && n.push({
86
90
  event: "collection:update",
87
- payload: { collection: i.slice(0, m), item: i.slice(m + 1) }
91
+ payload: { collection: i.slice(0, a), item: i.slice(a + 1) }
88
92
  });
89
93
  } else o.startsWith("chat:") && n.push({ event: "chat:message", payload: { room: o.slice(5), touch: !0 } });
90
94
  return n;
@@ -92,5 +96,5 @@ function k(c) {
92
96
  export {
93
97
  _ as coarseCollectionUpdate,
94
98
  M as createRoomGapTracker,
95
- k as refetchEventsFor
99
+ b as refetchEventsFor
96
100
  };
@@ -0,0 +1,7 @@
1
+ const r = "bg-card", o = "hover:bg-[color:color-mix(in_srgb,hsl(var(--card))_96%,rgb(var(--nvr-cyan-rgb)))] dark:hover:bg-[color:color-mix(in_srgb,hsl(var(--card))_92%,rgb(var(--nvr-cyan-rgb)))]", c = "bg-[color:color-mix(in_srgb,hsl(var(--card))_92%,rgb(var(--nvr-cyan-rgb)))] dark:bg-[color:color-mix(in_srgb,hsl(var(--card))_84%,rgb(var(--nvr-cyan-rgb)))]", a = "bg-inherit";
2
+ export {
3
+ a as PINNED_CELL_SURFACE,
4
+ r as ROW_SURFACE,
5
+ o as ROW_SURFACE_HOVER,
6
+ c as ROW_SURFACE_SELECTED
7
+ };
@@ -1,47 +1,58 @@
1
- import { isSignedOut as E, isSignedOutError as T, noteUnauthorized as k } from "./signed-out.js";
2
- let m = !1, p, c = (e) => e;
3
- const o = [];
4
- let h = null, v = "/api", f, w = null, d = 0, g = null;
5
- function y(e) {
1
+ import { startMissedUpdateDetector as L } from "./missed-updates.js";
2
+ import { isSignedOut as k, isSignedOutError as A, noteUnauthorized as O } from "./signed-out.js";
3
+ import { startWriteToScreen as C } from "./write-to-screen.js";
4
+ const I = ["navigate", "reload", "back_forward", "prerender"];
5
+ function B(e) {
6
+ return I.includes(e) ? e : "navigate";
7
+ }
8
+ const N = 1e3;
9
+ function R(e, n) {
10
+ return n != null && e - n >= 0 && e - n < N ? "back_forward" : "navigate";
11
+ }
12
+ const T = "nvr-rum-last-route";
13
+ let y = null, S = null, w = !1, b, d = (e) => e;
14
+ const c = [];
15
+ let g = null, E = "/api", h, p = null, l = 0, v = null;
16
+ function $(e) {
6
17
  const n = e.tagName.toLowerCase(), t = (e.textContent ?? "").trim().slice(0, 40), i = e.getAttribute("aria-label"), r = e.getAttribute("data-testid");
7
18
  return `${n}${r ? `[${r}]` : ""}${i ? ` '${i}'` : t ? ` '${t}'` : ""}`;
8
19
  }
9
- function _(e) {
20
+ function W(e) {
10
21
  typeof window > "u" || window.addEventListener(
11
22
  "click",
12
23
  (n) => {
13
24
  const t = n.target instanceof Element ? n.target.closest('button, a, [role="button"], input, [data-testid]') : null;
14
- t && (t === w ? (d++, d === 3 && (s({
25
+ t && (t === p ? (l++, l === 3 && (f({
15
26
  kind: "rage",
16
- route: `${e()} :: ${y(t)}`.slice(0, 300),
17
- duration_ms: d
18
- }), u())) : (w = t, d = 1), g && clearTimeout(g), g = setTimeout(() => {
19
- w = null, d = 0;
27
+ route: `${e()} :: ${$(t)}`.slice(0, 300),
28
+ duration_ms: l
29
+ }), s())) : (p = t, l = 1), v && clearTimeout(v), v = setTimeout(() => {
30
+ p = null, l = 0;
20
31
  }, 600));
21
32
  },
22
33
  { capture: !0, passive: !0 }
23
34
  );
24
35
  }
25
- const $ = 1e3, M = 1e4, b = 3;
26
- function D(e = b, n = M) {
36
+ const P = 1e3, x = 1e4, D = 3;
37
+ function K(e = D, n = x) {
27
38
  let t = [];
28
39
  return (i) => (t = t.filter((r) => i - r < n), t.push(i), t.length >= e ? (t = [], !0) : !1);
29
40
  }
30
- function A(e) {
41
+ function U(e) {
31
42
  if (typeof window > "u" || typeof MutationObserver > "u") return;
32
- const n = D();
43
+ const n = K();
33
44
  window.addEventListener(
34
45
  "click",
35
46
  (t) => {
36
47
  const i = t.target instanceof Element ? t.target.closest('button, a[href], [role="button"]') : null;
37
48
  if (!i || i.disabled || i.closest(".nvr-no-record")) return;
38
49
  const r = window.location.href;
39
- let l = !1;
40
- const a = new MutationObserver(() => {
41
- l = !0;
50
+ let a = !1;
51
+ const u = new MutationObserver(() => {
52
+ a = !0;
42
53
  });
43
54
  try {
44
- a.observe(document.body, {
55
+ u.observe(document.body, {
45
56
  subtree: !0,
46
57
  childList: !0,
47
58
  attributes: !0,
@@ -51,55 +62,59 @@ function A(e) {
51
62
  return;
52
63
  }
53
64
  setTimeout(() => {
54
- a.disconnect(), !(l || window.location.href !== r) && n(Date.now()) && (s({
65
+ u.disconnect(), !(a || window.location.href !== r) && n(Date.now()) && (f({
55
66
  kind: "dead",
56
- route: `${e()} :: ${y(i)}`.slice(0, 300),
57
- duration_ms: b
58
- }), u());
59
- }, $);
67
+ route: `${e()} :: ${$(i)}`.slice(0, 300),
68
+ duration_ms: D
69
+ }), s());
70
+ }, P);
60
71
  },
61
72
  { capture: !0, passive: !0 }
62
73
  );
63
74
  }
64
- function u() {
65
- if (o.length === 0) return;
66
- if (E()) {
67
- o.length = 0;
68
- return;
69
- }
70
- const e = JSON.stringify({ events: o.splice(0, o.length) });
71
- try {
72
- const n = f == null ? void 0 : f();
73
- !n && typeof navigator.sendBeacon == "function" && navigator.sendBeacon(`${v}/rum`, new Blob([e], { type: "application/json" })) || fetch(`${v}/rum`, {
74
- method: "POST",
75
- credentials: "include",
76
- headers: {
77
- "Content-Type": "application/json",
78
- ...n ? { Authorization: `Bearer ${n}` } : {}
79
- },
80
- body: e,
81
- keepalive: !0
82
- }).then(async (i) => {
83
- if (i.status !== 401) return;
84
- const r = await i.json().catch(() => null);
85
- T({ status: 401, response: r }) && k(!1);
86
- }).catch(() => {
87
- });
88
- } catch {
75
+ function s() {
76
+ if (c.length !== 0) {
77
+ if (k()) {
78
+ c.length = 0;
79
+ return;
80
+ }
81
+ _("/rum", { events: c.splice(0, c.length) });
89
82
  }
90
83
  }
91
- function s(e) {
92
- o.push({
84
+ function _(e, n) {
85
+ if (!k())
86
+ try {
87
+ const t = JSON.stringify(n), i = h == null ? void 0 : h();
88
+ !i && typeof navigator.sendBeacon == "function" && navigator.sendBeacon(`${E}${e}`, new Blob([t], { type: "application/json" })) || fetch(`${E}${e}`, {
89
+ method: "POST",
90
+ credentials: "include",
91
+ headers: {
92
+ "Content-Type": "application/json",
93
+ ...i ? { Authorization: `Bearer ${i}` } : {}
94
+ },
95
+ body: t,
96
+ keepalive: !0
97
+ }).then(async (a) => {
98
+ if (a.status !== 401) return;
99
+ const u = await a.json().catch(() => null);
100
+ A({ status: 401, response: u }) && O(!1);
101
+ }).catch(() => {
102
+ });
103
+ } catch {
104
+ }
105
+ }
106
+ function f(e) {
107
+ c.push({
93
108
  ...e,
94
- app: p,
109
+ app: b,
95
110
  vw: typeof window > "u" ? void 0 : window.innerWidth
96
- }), o.length >= 10 ? u() : (h && clearTimeout(h), h = setTimeout(u, 1e4));
111
+ }), c.length >= 10 ? s() : (g && clearTimeout(g), g = setTimeout(s, 1e4));
97
112
  }
98
- const C = /^[A-Za-z0-9._:-]{1,80}$/, L = /^[0-9A-Fa-f-]{36}$/;
99
- function B(e) {
100
- if (!m || !C.test(e.key)) return;
101
- const n = e.roleId && L.test(e.roleId) ? e.roleId.toUpperCase() : void 0;
102
- s({
113
+ const q = /^[A-Za-z0-9._:-]{1,80}$/, j = /^[0-9A-Fa-f-]{36}$/;
114
+ function Y(e) {
115
+ if (!w || !q.test(e.key)) return;
116
+ const n = e.roleId && j.test(e.roleId) ? e.roleId.toUpperCase() : void 0;
117
+ f({
103
118
  kind: "widget",
104
119
  route: `widget:${e.key}`,
105
120
  widget: e.key,
@@ -108,53 +123,88 @@ function B(e) {
108
123
  paint_ms: Math.max(0, Math.round(e.paintMs))
109
124
  });
110
125
  }
111
- function O(e) {
112
- if (!m || typeof window > "u" || document.visibilityState === "hidden") return;
126
+ function G(e) {
127
+ if (!w || typeof window > "u" || document.visibilityState === "hidden") return;
113
128
  const n = performance.now();
114
129
  let t = !1;
115
130
  const i = () => {
116
131
  document.visibilityState === "hidden" && (t = !0);
117
132
  };
118
- document.addEventListener("visibilitychange", i), requestAnimationFrame(() => {
133
+ document.addEventListener("visibilitychange", i);
134
+ const r = d(e), a = R(n, S), u = y;
135
+ y = r, requestAnimationFrame(() => {
119
136
  requestAnimationFrame(() => {
120
137
  if (document.removeEventListener("visibilitychange", i), t) return;
121
- const r = Math.round(performance.now() - n);
122
- s({ route: c(e), kind: "route", duration_ms: r });
138
+ const o = Math.round(performance.now() - n);
139
+ f({
140
+ route: r,
141
+ kind: "route",
142
+ duration_ms: o,
143
+ nav: a,
144
+ ...a === "back_forward" && u && u !== r ? { prev: u } : {}
145
+ });
123
146
  });
124
147
  });
125
148
  }
126
- function I(e) {
127
- if (m || typeof window > "u" || typeof performance > "u") return;
128
- m = !0, p = e == null ? void 0 : e.app, e != null && e.routePattern && (c = e.routePattern), e != null && e.apiBase && (v = e.apiBase), f = e == null ? void 0 : e.getToken, _(() => c(window.location.pathname)), A(() => c(window.location.pathname));
129
- const n = performance.getEntriesByType("navigation")[0];
130
- let t = null;
149
+ function J(e) {
150
+ if (w || typeof window > "u" || typeof performance > "u") return;
151
+ w = !0, b = e == null ? void 0 : e.app, e != null && e.routePattern && (d = e.routePattern), e != null && e.apiBase && (E = e.apiBase), h = e == null ? void 0 : e.getToken, W(() => d(window.location.pathname)), U(() => d(window.location.pathname)), window.addEventListener("popstate", () => {
152
+ S = performance.now();
153
+ });
154
+ let n = null;
155
+ try {
156
+ n = sessionStorage.getItem(T);
157
+ } catch {
158
+ n = null;
159
+ }
160
+ y = d(window.location.pathname), L({
161
+ routePattern: (o) => d(o),
162
+ send: (o) => _("/realtime/missed-updates", o)
163
+ }), C({
164
+ screen: () => d(window.location.pathname),
165
+ send: (o) => _("/rum/screen-timing", { app: b, samples: o })
166
+ });
167
+ const t = performance.getEntriesByType("navigation")[0];
168
+ let i = null;
131
169
  try {
132
- new PerformanceObserver((l) => {
133
- const a = l.getEntries().at(-1);
134
- (a == null ? void 0 : a.startTime) != null && (t = Math.round(a.startTime));
170
+ new PerformanceObserver((M) => {
171
+ const m = M.getEntries().at(-1);
172
+ (m == null ? void 0 : m.startTime) != null && (i = Math.round(m.startTime));
135
173
  }).observe({ type: "largest-contentful-paint", buffered: !0 });
136
174
  } catch {
137
175
  }
176
+ const r = d(window.location.pathname), a = B(t == null ? void 0 : t.type);
138
177
  setTimeout(() => {
139
- const r = performance.getEntriesByName("first-contentful-paint")[0];
140
- s({
141
- route: c(window.location.pathname),
178
+ const o = performance.getEntriesByName("first-contentful-paint")[0];
179
+ f({
180
+ route: r,
142
181
  kind: "load",
143
- ttfb_ms: n ? Math.round(n.responseStart) : void 0,
144
- fcp_ms: r ? Math.round(r.startTime) : void 0,
145
- lcp_ms: t ?? void 0,
146
- duration_ms: n ? Math.round(n.loadEventEnd || n.domContentLoadedEventEnd) : void 0
182
+ nav: a,
183
+ ...a === "back_forward" && n && n !== r ? { prev: n.slice(0, 300) } : {},
184
+ ttfb_ms: t ? Math.round(t.responseStart) : void 0,
185
+ fcp_ms: o ? Math.round(o.startTime) : void 0,
186
+ lcp_ms: i ?? void 0,
187
+ duration_ms: t ? Math.round(t.loadEventEnd || t.domContentLoadedEventEnd) : void 0
147
188
  });
148
- }, 6e3), window.addEventListener("pagehide", u), document.addEventListener("visibilitychange", () => {
149
- document.visibilityState === "hidden" && u();
189
+ }, 6e3), window.addEventListener("pagehide", () => {
190
+ try {
191
+ sessionStorage.setItem(T, d(window.location.pathname));
192
+ } catch {
193
+ }
194
+ }), window.addEventListener("pagehide", s), document.addEventListener("visibilitychange", () => {
195
+ document.visibilityState === "hidden" && s();
150
196
  });
151
197
  }
152
198
  export {
153
- b as DEAD_BURST,
154
- $ as DEAD_WAIT_MS,
155
- M as DEAD_WINDOW_MS,
156
- D as createDeadClickCounter,
157
- O as rumRouteChange,
158
- B as rumWidget,
159
- I as startRum
199
+ D as DEAD_BURST,
200
+ P as DEAD_WAIT_MS,
201
+ x as DEAD_WINDOW_MS,
202
+ N as POPSTATE_WINDOW_MS,
203
+ K as createDeadClickCounter,
204
+ B as navKindOf,
205
+ R as routeNavKind,
206
+ G as rumRouteChange,
207
+ Y as rumWidget,
208
+ _ as sendTelemetry,
209
+ J as startRum
160
210
  };
@@ -0,0 +1,20 @@
1
+ const c = 20;
2
+ function s() {
3
+ return `sv${typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID().replace(/-/g, "") : `${Date.now().toString(36)}${Math.random().toString(36).slice(2, 12)}`}`.slice(0, 40);
4
+ }
5
+ function d(n, t) {
6
+ return t ? `${n}${n.includes("?") ? "&" : "?"}save_progress=${encodeURIComponent(t)}` : n;
7
+ }
8
+ const i = (n, t, r) => n === 1 ? t : r;
9
+ function l(n, t, r = { one: "line", many: "lines" }) {
10
+ const o = Math.max(0, Math.round((n == null ? void 0 : n.total) ?? t)), a = i(o, r.one, r.many);
11
+ if (!n || n.done == null) return `Saving ${o.toLocaleString()} ${a}…`;
12
+ const e = Math.min(o, Math.max(0, Math.round(n.done)));
13
+ return n.phase === "totals" || e >= o && !n.finished ? "Updating totals…" : `Saving ${e.toLocaleString()} of ${o.toLocaleString()} ${a}…`;
14
+ }
15
+ export {
16
+ c as SAVE_PROGRESS_MIN_ROWS,
17
+ s as newSaveId,
18
+ l as saveProgressText,
19
+ d as withSaveId
20
+ };
@@ -0,0 +1,67 @@
1
+ import { countdownText as s } from "./deadline-ticker.js";
2
+ const d = /* @__PURE__ */ new Set(["pending", "applying", "executed", "failed", "undone"]);
3
+ function m(r, n) {
4
+ const e = n ? new Set(n.map((t) => t.field)) : null, i = (t) => t ? new Date(t).getTime() : 0, u = (t) => t.status === "pending" || t.status === "applying";
5
+ return (r ?? []).filter((t) => d.has(t.status ?? "pending")).map((t) => ({
6
+ ...t,
7
+ changes: Object.fromEntries(
8
+ Object.entries(t.changes ?? {}).filter(([o]) => !e || e.has(o))
9
+ )
10
+ })).filter((t) => Object.keys(t.changes ?? {}).length > 0).filter((t) => Number.isFinite(new Date(t.scheduled_at).getTime())).sort((t, o) => u(t) !== u(o) ? u(t) ? -1 : 1 : u(t) ? i(t.scheduled_at) - i(o.scheduled_at) : i(o.executed_at) - i(t.executed_at));
11
+ }
12
+ function h(r, n) {
13
+ for (const e of r) {
14
+ if (e.status === "applying") return { kind: "applying", row: e };
15
+ if ((e.status ?? "pending") === "pending")
16
+ return g(e.scheduled_at, n) ? { kind: e.auto_apply === !1 ? "waiting-admin" : "applying", row: e } : { kind: "pending", row: e };
17
+ }
18
+ for (const e of r) {
19
+ if (e.status === "executed") return { kind: "applied", row: e };
20
+ if (e.status === "failed") return { kind: "failed", row: e };
21
+ }
22
+ return null;
23
+ }
24
+ function p(r, n, e) {
25
+ const i = Object.keys(r);
26
+ if (i.length === 0) return "A change";
27
+ const u = i[0];
28
+ if (i.length > 1) {
29
+ const o = i.length - 1;
30
+ return `${n(u)} and ${o} more field${o === 1 ? "" : "s"} change`;
31
+ }
32
+ const t = r[u];
33
+ return t == null || t === "" ? `${n(u)} is cleared` : `${n(u)} changes to ${e(u, t)}`;
34
+ }
35
+ const c = (r, n) => r.getFullYear() === n.getFullYear() && r.getMonth() === n.getMonth() && r.getDate() === n.getDate();
36
+ function w(r, n, e) {
37
+ const i = new Date(r), u = new Date(n), t = i.toLocaleTimeString(e, { hour: "numeric", minute: "2-digit" });
38
+ if (c(i, u)) return t;
39
+ const o = new Date(u);
40
+ if (o.setDate(u.getDate() + 1), c(i, o)) return `tomorrow ${t}`;
41
+ const a = (i.getTime() - n) / 864e5;
42
+ return a > 0 && a < 6 ? `${i.toLocaleDateString(e, { weekday: "short" })} ${t}` : `${i.toLocaleDateString(e, {
43
+ month: "short",
44
+ day: "numeric",
45
+ ...i.getFullYear() !== u.getFullYear() ? { year: "numeric" } : {}
46
+ })}, ${t}`;
47
+ }
48
+ function $(r, n) {
49
+ const e = new Date(r).getTime();
50
+ return Number.isFinite(e) ? e > n ? `in ${s(e - n)}` : n - e < 6e4 ? "due now" : `due ${s(n - e)} ago` : "";
51
+ }
52
+ function g(r, n) {
53
+ const e = new Date(r).getTime();
54
+ return Number.isFinite(e) && e <= n;
55
+ }
56
+ function D(r, n, e) {
57
+ return `${r} at ${n}${e ? ` (scheduled by ${e})` : ""}`;
58
+ }
59
+ export {
60
+ p as changeSentence,
61
+ h as chipOf,
62
+ $ as countdownPart,
63
+ D as fullSentence,
64
+ g as isDue,
65
+ m as readableRecent,
66
+ w as whenText
67
+ };