@nivaro/react 0.3.114 → 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 (281) 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 +1717 -21
  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 +1 -0
  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/change-proposals/ChangeProposalsPanel.js +320 -0
  62. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  63. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  65. package/dist/shared/components/change-proposals/types.js +4 -0
  66. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  67. package/dist/shared/components/chat/Composer.js +276 -298
  68. package/dist/shared/components/chat/room-due.js +13 -0
  69. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  70. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  71. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  72. package/dist/shared/components/imports/ImportConsole.js +159 -155
  73. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  74. package/dist/shared/components/integrations/SendStatus.js +202 -0
  75. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  76. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  77. package/dist/shared/components/integrations/console/api.js +161 -117
  78. package/dist/shared/components/integrations/console/tone.js +15 -12
  79. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  80. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  81. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  82. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  83. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  84. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  85. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  86. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  87. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  88. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  89. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  90. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  91. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  92. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  93. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  94. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  95. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  96. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  97. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  98. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  99. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  100. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  101. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  102. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  103. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  104. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  105. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  106. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  107. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  108. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  109. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  110. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  111. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  112. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  113. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  114. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  115. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  116. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  117. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  118. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  119. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  120. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  121. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  122. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  123. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  124. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  125. package/dist/shared/components/item-edit/file-live.js +77 -0
  126. package/dist/shared/components/item-edit/file-processing.js +87 -0
  127. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  128. package/dist/shared/components/item-edit/live-related.js +23 -0
  129. package/dist/shared/components/item-edit/live-title.js +66 -0
  130. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  131. package/dist/shared/components/item-edit/removed-line.js +58 -0
  132. package/dist/shared/components/item-edit/render-stability.js +70 -59
  133. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  134. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  135. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  136. package/dist/shared/components/list/InlineEdit.js +504 -208
  137. package/dist/shared/components/list/ListViewers.js +81 -0
  138. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  139. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  140. package/dist/shared/components/merge/merge-values.js +110 -0
  141. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  142. package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
  143. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  144. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  145. package/dist/shared/components/notifications/bundles.js +21 -19
  146. package/dist/shared/components/notifications/resolved-line.js +25 -0
  147. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  148. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  149. package/dist/shared/components/panels/AlertBanners.js +132 -0
  150. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  151. package/dist/shared/components/panels/BranchLanes.js +82 -54
  152. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  153. package/dist/shared/components/panels/CommentImages.js +219 -0
  154. package/dist/shared/components/panels/CommentPanel.js +649 -530
  155. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  156. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  157. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  158. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  159. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  160. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  161. package/dist/shared/components/panels/SlaClock.js +130 -99
  162. package/dist/shared/components/panels/TaskPanel.js +308 -287
  163. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  164. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  165. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  166. package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
  167. package/dist/shared/components/profile/AgentNameField.js +141 -0
  168. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  169. package/dist/shared/components/profile/PersonAccess.js +398 -330
  170. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  171. package/dist/shared/components/profile/PersonProfile.js +81 -73
  172. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  173. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  174. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  175. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  176. package/dist/shared/components/queue/QueueWorklist.js +1927 -1635
  177. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  178. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  179. package/dist/shared/components/support/ReportProblem.js +1 -0
  180. package/dist/shared/components/support/ScreenShare.js +554 -0
  181. package/dist/shared/components/support/SupportView.js +160 -129
  182. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  183. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  184. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  185. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  186. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  187. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  188. package/dist/shared/lib/activity-sentence.js +87 -75
  189. package/dist/shared/lib/agent-presence.js +46 -0
  190. package/dist/shared/lib/approval-progress.js +49 -0
  191. package/dist/shared/lib/attention-prefs.js +27 -0
  192. package/dist/shared/lib/cell-locks.js +56 -0
  193. package/dist/shared/lib/co-edit.js +166 -0
  194. package/dist/shared/lib/coedit-registry.js +44 -0
  195. package/dist/shared/lib/comment-awareness.js +124 -0
  196. package/dist/shared/lib/comment-images.js +45 -0
  197. package/dist/shared/lib/config-watch.js +94 -0
  198. package/dist/shared/lib/copy-rules.js +65 -0
  199. package/dist/shared/lib/count-step.js +30 -0
  200. package/dist/shared/lib/deadline-ticker.js +68 -0
  201. package/dist/shared/lib/derived-causes.js +115 -0
  202. package/dist/shared/lib/draft-store.js +114 -85
  203. package/dist/shared/lib/error-hints.js +1 -0
  204. package/dist/shared/lib/field-merge.js +126 -0
  205. package/dist/shared/lib/filter-sentence.js +10 -10
  206. package/dist/shared/lib/focus-mode.js +16 -12
  207. package/dist/shared/lib/grid-cursors.js +77 -0
  208. package/dist/shared/lib/grid-presence.js +182 -0
  209. package/dist/shared/lib/idle-reload.js +100 -73
  210. package/dist/shared/lib/in-step.js +45 -0
  211. package/dist/shared/lib/integration-chip.js +19 -18
  212. package/dist/shared/lib/line-locks.js +141 -0
  213. package/dist/shared/lib/line-split.js +41 -0
  214. package/dist/shared/lib/linked-changes.js +150 -0
  215. package/dist/shared/lib/list-return.js +231 -0
  216. package/dist/shared/lib/list-viewers.js +52 -0
  217. package/dist/shared/lib/live-announcer.js +86 -0
  218. package/dist/shared/lib/live-counts.js +85 -0
  219. package/dist/shared/lib/live-data-changed.js +108 -0
  220. package/dist/shared/lib/live-deltas.js +81 -0
  221. package/dist/shared/lib/live-findings.js +113 -0
  222. package/dist/shared/lib/live-groups.js +122 -0
  223. package/dist/shared/lib/live-link-labels.js +162 -0
  224. package/dist/shared/lib/live-list-flow.js +334 -0
  225. package/dist/shared/lib/live-list.js +143 -129
  226. package/dist/shared/lib/live-moves.js +51 -0
  227. package/dist/shared/lib/live-ops.js +26 -26
  228. package/dist/shared/lib/live-pickers.js +7 -0
  229. package/dist/shared/lib/live-preference.js +184 -0
  230. package/dist/shared/lib/live-queries.js +226 -181
  231. package/dist/shared/lib/live-screen.js +333 -0
  232. package/dist/shared/lib/live-search.js +108 -0
  233. package/dist/shared/lib/live-seen.js +35 -0
  234. package/dist/shared/lib/live-views.js +100 -0
  235. package/dist/shared/lib/live.js +159 -133
  236. package/dist/shared/lib/missed-updates.js +198 -0
  237. package/dist/shared/lib/newer-file.js +56 -0
  238. package/dist/shared/lib/notification-sound.js +42 -20
  239. package/dist/shared/lib/own-writes.js +59 -41
  240. package/dist/shared/lib/picker-badges.js +94 -0
  241. package/dist/shared/lib/presence-signals.js +131 -84
  242. package/dist/shared/lib/realtime.js +49 -24
  243. package/dist/shared/lib/record-gaps.js +85 -0
  244. package/dist/shared/lib/record-outbox.js +369 -222
  245. package/dist/shared/lib/record-peek.js +75 -0
  246. package/dist/shared/lib/record-tabs.js +92 -72
  247. package/dist/shared/lib/relative-ticker.js +42 -0
  248. package/dist/shared/lib/request-gate.js +119 -119
  249. package/dist/shared/lib/rollup-recalc.js +107 -0
  250. package/dist/shared/lib/room-gaps.js +40 -36
  251. package/dist/shared/lib/rum.js +137 -87
  252. package/dist/shared/lib/save-progress.js +20 -0
  253. package/dist/shared/lib/scheduled-countdown.js +67 -0
  254. package/dist/shared/lib/screen-refresh.js +160 -0
  255. package/dist/shared/lib/screen-share.js +234 -0
  256. package/dist/shared/lib/seen-since.js +74 -0
  257. package/dist/shared/lib/selection-watch.js +205 -0
  258. package/dist/shared/lib/send-status.js +132 -0
  259. package/dist/shared/lib/send-view.js +23 -0
  260. package/dist/shared/lib/socket-liveness.js +155 -0
  261. package/dist/shared/lib/socket-realtime.js +168 -140
  262. package/dist/shared/lib/state-census.js +53 -0
  263. package/dist/shared/lib/summary-mode.js +61 -39
  264. package/dist/shared/lib/tab-attention.js +143 -32
  265. package/dist/shared/lib/table-density.js +64 -0
  266. package/dist/shared/lib/track-travel.js +40 -0
  267. package/dist/shared/lib/unseen-changes.js +68 -0
  268. package/dist/shared/lib/upload-file.js +33 -0
  269. package/dist/shared/lib/upload-presence.js +127 -0
  270. package/dist/shared/lib/urgent-chime.js +65 -0
  271. package/dist/shared/lib/use-online-users.js +32 -11
  272. package/dist/shared/lib/user-sync.js +155 -39
  273. package/dist/shared/lib/waiting-count.js +44 -0
  274. package/dist/shared/lib/watch-desktop.js +83 -0
  275. package/dist/shared/lib/watch-list.js +447 -0
  276. package/dist/shared/lib/widget-image-render.js +64 -0
  277. package/dist/shared/lib/widget-image.js +111 -0
  278. package/dist/shared/lib/worker-socket.js +130 -104
  279. package/dist/shared/lib/write-to-screen.js +133 -0
  280. package/package.json +1 -1
  281. package/styles.css +49 -1
@@ -0,0 +1,62 @@
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { useContext as h, useState as v, useRef as s, useEffect as u } from "react";
3
+ import { ItemEditAuthContext as g } from "../context.js";
4
+ import { useAttentionPrefs as b } from "../lib/attention-prefs.js";
5
+ import { expandCoalesced as y, isOwnEvent as w } from "../lib/live.js";
6
+ import { createAnnouncer as x } from "../lib/live-announcer.js";
7
+ import { useOptionalRealtime as A } from "../lib/realtime.js";
8
+ function S() {
9
+ const i = A(), { userId: l } = h(g), { announce: n } = b(), [m, p] = v(""), c = s(!1), o = s(null), a = s(l);
10
+ return a.current = l, u(() => {
11
+ const e = x({
12
+ verbosity: n,
13
+ say: (t) => {
14
+ c.current = !c.current, p(c.current ? t : `${t}​`);
15
+ }
16
+ });
17
+ return o.current = e, () => {
18
+ e.dispose(), o.current = null;
19
+ };
20
+ }, []), u(() => {
21
+ var e;
22
+ (e = o.current) == null || e.setVerbosity(n);
23
+ }, [n]), u(() => {
24
+ if (!(!i || n === "off"))
25
+ return i.on("collection:update", (e) => {
26
+ const t = e;
27
+ if (!t || typeof t != "object" || typeof t.collection != "string") return;
28
+ const f = o.current;
29
+ if (f)
30
+ for (const r of y(t))
31
+ w(r, a.current) || f.note({
32
+ action: r.action ?? null,
33
+ item: r.item ?? null,
34
+ bulk: r.bulk,
35
+ fields: r.changed_fields ?? null
36
+ });
37
+ });
38
+ }, [i, n]), /* @__PURE__ */ d(
39
+ "div",
40
+ {
41
+ role: "status",
42
+ "aria-live": "polite",
43
+ "aria-atomic": "true",
44
+ "data-live-announcer": !0,
45
+ style: {
46
+ position: "fixed",
47
+ width: 1,
48
+ height: 1,
49
+ margin: -1,
50
+ padding: 0,
51
+ overflow: "hidden",
52
+ clip: "rect(0 0 0 0)",
53
+ whiteSpace: "nowrap",
54
+ border: 0
55
+ },
56
+ children: m
57
+ }
58
+ );
59
+ }
60
+ export {
61
+ S as LiveAnnouncer
62
+ };
@@ -0,0 +1,54 @@
1
+ import { jsxs as x, jsx as y } from "react/jsx-runtime";
2
+ import { useRef as o, useState as h, useLayoutEffect as E, useEffect as A } from "react";
3
+ import { liveMotionAllowed as v } from "../lib/live-preference.js";
4
+ const s = 220;
5
+ function w() {
6
+ return !v();
7
+ }
8
+ function M(r) {
9
+ return r == null ? "" : String(r);
10
+ }
11
+ function b({ value: r, format: a, className: g }) {
12
+ const e = M(r), l = o(e), [n, u] = h(null), f = o(null), d = o(null), p = o(0);
13
+ E(() => {
14
+ const t = l.current;
15
+ if (l.current = e, t === e || t === "" || e === "" || w()) {
16
+ u(null);
17
+ return;
18
+ }
19
+ p.current += 1, u({ text: t, id: p.current });
20
+ const i = f.current;
21
+ i && typeof i.animate == "function" && i.animate([{ opacity: 0 }, { opacity: 1 }], { duration: s, easing: "ease-out" });
22
+ }, [e]), A(() => {
23
+ if (!n) return;
24
+ const t = d.current;
25
+ t && typeof t.animate == "function" && t.animate([{ opacity: 1 }, { opacity: 0 }], {
26
+ duration: s,
27
+ easing: "ease-out",
28
+ fill: "forwards"
29
+ });
30
+ const i = setTimeout(
31
+ () => u((c) => c && c.id === n.id ? null : c),
32
+ s + 30
33
+ );
34
+ return () => clearTimeout(i);
35
+ }, [n]);
36
+ const m = (t) => a && t !== "" ? a(/^-?\d+(\.\d+)?$/.test(t) ? Number(t) : t) : t;
37
+ return /* @__PURE__ */ x("span", { className: g, style: { display: "inline-grid" }, "data-live-count": e, children: [
38
+ n && /* @__PURE__ */ y(
39
+ "span",
40
+ {
41
+ ref: d,
42
+ "aria-hidden": "true",
43
+ style: { gridArea: "1 / 1", pointerEvents: "none", opacity: 0 },
44
+ children: m(n.text)
45
+ }
46
+ ),
47
+ /* @__PURE__ */ y("span", { ref: f, style: { gridArea: "1 / 1" }, children: m(e) })
48
+ ] });
49
+ }
50
+ export {
51
+ b as LiveCount,
52
+ M as countText,
53
+ w as reducedMotion
54
+ };
@@ -0,0 +1,28 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { useRef as n, useEffect as c } from "react";
3
+ import { liveMotionAllowed as f } from "../lib/live-preference.js";
4
+ function g({
5
+ value: r,
6
+ children: i,
7
+ className: a
8
+ }) {
9
+ const e = n(null), t = n(r);
10
+ return c(() => {
11
+ if (Object.is(t.current, r)) return;
12
+ t.current = r;
13
+ const o = e.current;
14
+ !o || typeof o.animate != "function" || !f() || o.animate(
15
+ [
16
+ {
17
+ boxShadow: "0 0 0 3px rgba(0, 206, 255, 0.28)",
18
+ backgroundColor: "rgba(0, 206, 255, 0.22)"
19
+ },
20
+ { boxShadow: "0 0 0 3px rgba(0, 206, 255, 0)", backgroundColor: "rgba(0, 206, 255, 0)" }
21
+ ],
22
+ { duration: 1800, easing: "ease-out" }
23
+ );
24
+ }, [r]), /* @__PURE__ */ u("span", { ref: e, className: a, style: { borderRadius: 3 }, "data-live-figure": !0, children: i ?? r });
25
+ }
26
+ export {
27
+ g as LiveFigure
28
+ };
@@ -0,0 +1,114 @@
1
+ import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
+ import { CirclePause as m, CirclePlay as p, RefreshCw as h, ChevronRight as f } from "lucide-react";
3
+ import { useRef as x, useState as v, useLayoutEffect as g } from "react";
4
+ function C({
5
+ paused: s,
6
+ held: t,
7
+ onToggle: n,
8
+ className: e
9
+ }) {
10
+ const o = "inline-flex h-8 w-[7.5rem] shrink-0 items-center justify-center gap-1.5 rounded-md border px-2 text-[12px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/60";
11
+ if (!s)
12
+ return /* @__PURE__ */ c(
13
+ "button",
14
+ {
15
+ type: "button",
16
+ onClick: n,
17
+ "aria-pressed": !1,
18
+ "data-live-pause": !0,
19
+ "data-tip": "Live updates are on. Pause them to work through this list without it changing; changes wait until you resume.",
20
+ className: `${o} border-slate-200 bg-white text-slate-600 hover:bg-slate-50 hover:text-slate-800 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300 dark:hover:bg-slate-800 dark:hover:text-slate-100 ${e ?? ""}`,
21
+ children: [
22
+ /* @__PURE__ */ i(m, { className: "h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
23
+ /* @__PURE__ */ i("span", { children: "Pause live" })
24
+ ]
25
+ }
26
+ );
27
+ const l = t.toLocaleString("en-US"), a = t > 0 ? `Live updates are paused. ${l} ${t === 1 ? "change is" : "changes are"} waiting — click to apply ${t === 1 ? "it" : "them"} and resume.` : "Live updates are paused. Nothing is waiting yet — click to resume.";
28
+ return /* @__PURE__ */ c(
29
+ "button",
30
+ {
31
+ type: "button",
32
+ onClick: n,
33
+ "aria-pressed": !0,
34
+ "aria-label": t > 0 ? `Resume live updates, ${l} waiting` : "Resume live updates",
35
+ "data-live-pause": "paused",
36
+ "data-tip": a,
37
+ className: `${o} border-amber-300 bg-amber-50 text-amber-800 hover:bg-amber-100 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300 dark:hover:bg-amber-500/20 ${e ?? ""}`,
38
+ children: [
39
+ /* @__PURE__ */ i(p, { className: "h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
40
+ /* @__PURE__ */ i("span", { children: "Paused" }),
41
+ t > 0 && /* @__PURE__ */ i(
42
+ "span",
43
+ {
44
+ "data-live-pause-count": !0,
45
+ className: "min-w-[18px] rounded-full bg-amber-200/80 px-1.5 text-center text-[11px] font-semibold tabular-nums text-amber-900 dark:bg-amber-400/20 dark:text-amber-200",
46
+ children: t > 999 ? "999+" : t
47
+ }
48
+ )
49
+ ]
50
+ }
51
+ );
52
+ }
53
+ function k(s, t = 8) {
54
+ const n = s.querySelector("table");
55
+ if (!n) return null;
56
+ let e = n.parentElement;
57
+ for (; e && e !== s; ) {
58
+ const r = getComputedStyle(e).overflowY;
59
+ if (r === "auto" || r === "scroll") break;
60
+ e = e.parentElement;
61
+ }
62
+ const o = (e && e !== s ? e : n).getBoundingClientRect(), l = s.getBoundingClientRect(), a = n.querySelector("tfoot"), u = a ? a.getBoundingClientRect().height : 0;
63
+ return Math.max(
64
+ t,
65
+ Math.round(l.bottom - Math.min(o.bottom, l.bottom) + u + t)
66
+ );
67
+ }
68
+ function N({
69
+ label: s,
70
+ onShow: t,
71
+ className: n
72
+ }) {
73
+ const e = x(null), [o, l] = v(null);
74
+ return g(() => {
75
+ var b;
76
+ const a = (b = e.current) == null ? void 0 : b.parentElement;
77
+ if (!a) return;
78
+ const u = () => l(k(a));
79
+ u();
80
+ const r = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
81
+ r == null || r.observe(a);
82
+ const d = a.querySelector("tfoot");
83
+ return d && (r == null || r.observe(d)), () => r == null ? void 0 : r.disconnect();
84
+ }, []), /* @__PURE__ */ i(
85
+ "div",
86
+ {
87
+ ref: e,
88
+ style: o != null ? { bottom: o } : void 0,
89
+ className: `pointer-events-none absolute inset-x-0 z-[8] flex justify-center px-4 ${o != null ? "" : n ?? "bottom-16"}`,
90
+ children: /* @__PURE__ */ c(
91
+ "button",
92
+ {
93
+ type: "button",
94
+ onClick: t,
95
+ "data-live-burst": !0,
96
+ className: "nvr-pop-in group pointer-events-auto inline-flex h-8 min-w-0 max-w-full items-center gap-1.5 rounded-full border border-nvr-cyan/40 bg-white px-3 text-[12px] text-slate-700 shadow-[0_8px_22px_-6px_rgba(15,23,42,0.32),0_2px_6px_-2px_rgba(15,23,42,0.16)] transition-colors hover:border-nvr-cyan/70 hover:bg-[#f2fcff] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/60 dark:border-nvr-cyan/50 dark:bg-[#0f2530] dark:text-slate-100 dark:shadow-[0_10px_28px_-6px_rgba(0,0,0,0.9),0_3px_8px_-2px_rgba(0,0,0,0.7),0_0_0_1px_rgba(255,255,255,0.06)] dark:hover:bg-[#123140]",
97
+ children: [
98
+ /* @__PURE__ */ i(h, { className: "h-3 w-3 shrink-0 text-[#007a99] dark:text-nvr-cyan", "aria-hidden": !0 }),
99
+ /* @__PURE__ */ i("span", { className: "min-w-[5rem] truncate", children: s }),
100
+ /* @__PURE__ */ c("span", { className: "ml-1 inline-flex shrink-0 items-center font-semibold text-[#007a99] underline-offset-2 group-hover:underline dark:text-nvr-cyan", children: [
101
+ "Show",
102
+ /* @__PURE__ */ i(f, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
103
+ ] })
104
+ ]
105
+ }
106
+ )
107
+ }
108
+ );
109
+ }
110
+ export {
111
+ N as LiveBurstPill,
112
+ C as LivePauseButton,
113
+ k as burstPillBottom
114
+ };
@@ -0,0 +1,25 @@
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { newMatchesText as a } from "../lib/live-search.js";
3
+ function o({
4
+ count: n,
5
+ onShow: r,
6
+ className: i
7
+ }) {
8
+ return /* @__PURE__ */ e("div", { className: `sticky top-0 z-10 h-0 overflow-visible ${i ?? ""}`, "data-live-new": !0, children: /* @__PURE__ */ e("div", { className: "flex justify-center pt-2", children: n > 0 && /* @__PURE__ */ e("output", { "aria-live": "polite", children: /* @__PURE__ */ t(
9
+ "button",
10
+ {
11
+ type: "button",
12
+ onClick: r,
13
+ className: "inline-flex items-center gap-1.5 rounded-full border border-nvr-cyan/40 bg-white px-3 py-1 text-[12px] text-slate-700 shadow-sm transition-colors hover:bg-nvr-cyan/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan dark:bg-card dark:text-foreground dark:hover:bg-nvr-cyan/15",
14
+ children: [
15
+ /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 rounded-full bg-nvr-cyan", "aria-hidden": !0 }),
16
+ a(n),
17
+ /* @__PURE__ */ e("span", { "aria-hidden": !0, children: "·" }),
18
+ /* @__PURE__ */ e("span", { className: "font-medium underline underline-offset-2", children: "Show" })
19
+ ]
20
+ }
21
+ ) }) }) });
22
+ }
23
+ export {
24
+ o as LiveNewMatchesPill
25
+ };
@@ -0,0 +1,44 @@
1
+ import { jsx as o, jsxs as i } from "react/jsx-runtime";
2
+ import { CirclePause as d } from "lucide-react";
3
+ import { useLivePreference as s } from "../lib/live-preference.js";
4
+ import { cn as t } from "../lib/utils.js";
5
+ const a = "Live updates are off — others’ changes show when you press ↻ or open the page again. Change it in Profile → Display.";
6
+ function h({
7
+ variant: e = "header",
8
+ className: r
9
+ }) {
10
+ const { off: n } = s();
11
+ return n ? e === "dot" ? /* @__PURE__ */ o(
12
+ "span",
13
+ {
14
+ "aria-hidden": !0,
15
+ "data-live-off-note": "dot",
16
+ className: t(
17
+ "absolute bottom-1 right-1 h-1.5 w-1.5 rounded-full bg-slate-400 ring-2 ring-[#0f172a]",
18
+ r
19
+ )
20
+ }
21
+ ) : /* @__PURE__ */ i(
22
+ "span",
23
+ {
24
+ role: "note",
25
+ "data-live-off-note": e,
26
+ "data-tip": a,
27
+ "aria-label": a,
28
+ className: t(
29
+ "inline-flex h-6 shrink-0 select-none items-center gap-1 whitespace-nowrap rounded-full border px-2 text-[11px] font-medium leading-none",
30
+ e === "header" && "border-slate-200 bg-white text-slate-500 dark:border-border dark:bg-card dark:text-muted-foreground",
31
+ e === "bar" && "border-current opacity-70",
32
+ r
33
+ ),
34
+ children: [
35
+ /* @__PURE__ */ o(d, { "aria-hidden": !0, className: "h-3 w-3" }),
36
+ "Live updates off"
37
+ ]
38
+ }
39
+ ) : null;
40
+ }
41
+ export {
42
+ a as LIVE_OFF_TIP,
43
+ h as LiveOffNote
44
+ };
@@ -0,0 +1,42 @@
1
+ import { useQueryClient as d, useQuery as a } from "@tanstack/react-query";
2
+ import { useEffect as m } from "react";
3
+ import { useOptionalNivaroClient as y } from "../context.js";
4
+ import { get as c } from "../lib/commands.js";
5
+ import { useLiveEvent as v } from "../lib/live.js";
6
+ import { parseLiveMode as p, setLiveMode as q, resolveLiveMode as h } from "../lib/live-preference.js";
7
+ import { useUrgentChime as L } from "../lib/urgent-chime.js";
8
+ function b() {
9
+ var u;
10
+ const t = y(), f = d(), s = a({
11
+ queryKey: ["nvr-profile-prefs"],
12
+ queryFn: () => t.request(c("/users/me")).then((e) => {
13
+ var r;
14
+ return ((r = e.data) == null ? void 0 : r.preferences) ?? {};
15
+ }),
16
+ enabled: !!t,
17
+ staleTime: 6e4,
18
+ retry: !1
19
+ }), o = a({
20
+ queryKey: ["live-preference-default"],
21
+ queryFn: () => t.request(c("/live-preference/default")).then((e) => {
22
+ var r;
23
+ return p((r = e.data) == null ? void 0 : r.mode);
24
+ }).catch(() => null),
25
+ enabled: !!t,
26
+ staleTime: 5 * 6e4,
27
+ retry: !1
28
+ });
29
+ v("prefs:changed", (e) => {
30
+ const r = Array.isArray(e == null ? void 0 : e.keys) ? e.keys : null;
31
+ (!r || r.includes("live_mode")) && f.invalidateQueries({ queryKey: ["live-preference-default"] });
32
+ }), L(s.data);
33
+ const n = (u = s.data) == null ? void 0 : u.live_mode, i = s.isSuccess && (o.isSuccess || o.isError), l = o.data ?? null;
34
+ return m(() => {
35
+ if (!i) return;
36
+ const e = h(n, l);
37
+ q(e.mode, e.source);
38
+ }, [i, n, l]), null;
39
+ }
40
+ export {
41
+ b as LivePreferenceHost
42
+ };
@@ -1,30 +1,35 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { Lock as l } from "lucide-react";
3
- import { lockLabel as t } from "../lib/live-list.js";
4
- function f({
5
- lock: e,
6
- isNew: r,
7
- dataAttr: i = "data-live-mark",
8
- hang: s = !1
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { EyeOff as f, ArrowDownUp as c, Lock as d } from "lucide-react";
3
+ import { movingRowTitle as p } from "../lib/live-groups.js";
4
+ import { lockLabel as w } from "../lib/live-list.js";
5
+ import { GONE_ROW_TITLE as x } from "../lib/live-list-flow.js";
6
+ function k({
7
+ lock: a,
8
+ isNew: s,
9
+ gone: e,
10
+ movingTo: l,
11
+ dataAttr: n = "data-live-mark",
12
+ hang: m = !1
9
13
  }) {
10
- if (!e && !r) return null;
11
- const n = { [i]: e ? "lock" : "new" };
12
- return /* @__PURE__ */ a(
14
+ const r = !e && l != null;
15
+ if (!a && !s && !e && !r) return null;
16
+ const o = e ? "gone" : r ? "moving" : a ? "lock" : "new", i = e ? x : r ? p(l) : a ? w(a) : "New — just added to this list";
17
+ return /* @__PURE__ */ t(
13
18
  "span",
14
19
  {
15
- ...n,
16
- "data-tip": e ? t(e) : "New — just added to this list",
17
- className: `inline-flex h-4 w-4 shrink-0 items-center justify-center ${s ? "-ml-[22px]" : ""}`,
18
- children: e ? /* @__PURE__ */ a(
19
- l,
20
+ [n]: o,
21
+ "data-tip": i,
22
+ className: `inline-flex h-4 w-4 shrink-0 items-center justify-center ${m ? "-ml-[22px]" : ""}`,
23
+ children: e ? /* @__PURE__ */ t(f, { className: "h-3 w-3 text-slate-700 dark:text-slate-100", "aria-label": i }) : r ? /* @__PURE__ */ t(c, { className: "h-3 w-3 text-[#0089ad] dark:text-nvr-cyan", "aria-label": i }) : a ? /* @__PURE__ */ t(
24
+ d,
20
25
  {
21
- className: `h-3 w-3 ${e.is_mine ? "text-slate-400" : "text-amber-500"}`,
22
- "aria-label": t(e)
26
+ className: `h-3 w-3 ${a.is_mine ? "text-slate-400" : "text-amber-500"}`,
27
+ "aria-label": i
23
28
  }
24
- ) : /* @__PURE__ */ a("span", { className: "h-1.5 w-1.5 rounded-full bg-nvr-cyan", "aria-label": "New" })
29
+ ) : /* @__PURE__ */ t("span", { className: "h-1.5 w-1.5 rounded-full bg-nvr-cyan", role: "img", "aria-label": "New" })
25
30
  }
26
31
  );
27
32
  }
28
33
  export {
29
- f as LiveRowMark
34
+ k as LiveRowMark
30
35
  };