@nivaro/react 0.3.116 → 0.3.118

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +140 -14
  4. package/dist/index.js +488 -485
  5. package/dist/shared/components/ActivityEntry.js +130 -125
  6. package/dist/shared/components/AgentPresenceChip.js +36 -26
  7. package/dist/shared/components/CellCopyLayer.js +50 -45
  8. package/dist/shared/components/CollectionBrowserView.js +3855 -3785
  9. package/dist/shared/components/FilePreviewLightbox.js +96 -58
  10. package/dist/shared/components/InStep.js +18 -17
  11. package/dist/shared/components/ItemEditForm.js +4220 -4175
  12. package/dist/shared/components/JobsTray.js +8 -8
  13. package/dist/shared/components/LiveNewMatchesPill.js +21 -14
  14. package/dist/shared/components/LiveOffNote.js +3 -2
  15. package/dist/shared/components/LiveRowMark.js +53 -23
  16. package/dist/shared/components/LiveTraceView.js +162 -123
  17. package/dist/shared/components/MyWorkView.js +320 -299
  18. package/dist/shared/components/NotificationBell.js +14 -14
  19. package/dist/shared/components/OverflowRail.js +1 -1
  20. package/dist/shared/components/PageRenderer.js +120 -116
  21. package/dist/shared/components/ProfileView.js +203 -202
  22. package/dist/shared/components/RealtimeStatusBanner.js +31 -29
  23. package/dist/shared/components/RecordDrilldownSheet.js +7 -7
  24. package/dist/shared/components/RecordHoverCard.js +102 -84
  25. package/dist/shared/components/RecordReadView.js +146 -146
  26. package/dist/shared/components/ReportView.js +1086 -1091
  27. package/dist/shared/components/ScreenRefreshButton.js +34 -32
  28. package/dist/shared/components/TipLayer.js +65 -58
  29. package/dist/shared/components/WidgetImageMenu.js +83 -43
  30. package/dist/shared/components/activity/RecordActivityStream.js +175 -173
  31. package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
  32. package/dist/shared/components/cbv/column-totals.js +62 -57
  33. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
  34. package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
  35. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
  36. package/dist/shared/components/charts/category-axis.js +93 -0
  37. package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
  38. package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
  39. package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
  40. package/dist/shared/components/collections-directory/page-model.js +72 -67
  41. package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
  42. package/dist/shared/components/integrations/SendStatus.js +65 -59
  43. package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
  44. package/dist/shared/components/integrations/console/SignalCard.js +237 -230
  45. package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
  46. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +131 -92
  47. package/dist/shared/components/item-edit/CloneDialog.js +191 -161
  48. package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
  49. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
  50. package/dist/shared/components/item-edit/FieldComments.js +54 -53
  51. package/dist/shared/components/item-edit/FieldPointer.js +82 -67
  52. package/dist/shared/components/item-edit/FieldRow.js +106 -100
  53. package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
  54. package/dist/shared/components/item-edit/FilePickerField.js +452 -387
  55. package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
  56. package/dist/shared/components/item-edit/HeaderTools.js +94 -85
  57. package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
  58. package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
  59. package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
  60. package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
  61. package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
  62. package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
  63. package/dist/shared/components/item-edit/RecalcValue.js +57 -32
  64. package/dist/shared/components/item-edit/RecordHelpChip.js +21 -22
  65. package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
  66. package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
  67. package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
  68. package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
  69. package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
  70. package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
  71. package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
  72. package/dist/shared/components/item-edit/SectionPresence.js +18 -10
  73. package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
  74. package/dist/shared/components/item-edit/UserChip.js +1 -1
  75. package/dist/shared/components/item-edit/file-live.js +69 -54
  76. package/dist/shared/components/item-edit/layout-switch.js +98 -89
  77. package/dist/shared/components/item-edit/partner-needs.js +12 -12
  78. package/dist/shared/components/item-edit/removed-line.js +31 -25
  79. package/dist/shared/components/layout-editor/pickers/field-picker.js +112 -104
  80. package/dist/shared/components/list/ListViewers.js +46 -35
  81. package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
  82. package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
  83. package/dist/shared/components/panels/AlertBanners.js +82 -72
  84. package/dist/shared/components/panels/BranchLanes.js +22 -22
  85. package/dist/shared/components/panels/CommentImages.js +123 -102
  86. package/dist/shared/components/panels/CommentPanel.js +186 -185
  87. package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
  88. package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
  89. package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
  90. package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
  91. package/dist/shared/components/pipeline/BindingStartStateSettings.js +163 -0
  92. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
  93. package/dist/shared/components/pipeline/PipelineEditorView.js +320 -299
  94. package/dist/shared/components/profile/AgentNameField.js +107 -81
  95. package/dist/shared/components/profile/AgentsPanel.js +184 -184
  96. package/dist/shared/components/profile/PersonAccess.js +599 -495
  97. package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
  98. package/dist/shared/components/profile/SignedInDevices.js +17 -17
  99. package/dist/shared/components/profile/primitives.js +1 -1
  100. package/dist/shared/components/queue/OwnerAvatars.js +91 -54
  101. package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
  102. package/dist/shared/components/queue/QueueWorklist.js +1002 -983
  103. package/dist/shared/components/support/AssignRules.js +1733 -0
  104. package/dist/shared/components/support/PersonPick.js +88 -0
  105. package/dist/shared/components/support/RequestList.js +790 -0
  106. package/dist/shared/components/support/ScreenShare.js +158 -152
  107. package/dist/shared/components/support/SupportRequestDialog.js +50 -48
  108. package/dist/shared/components/support/SupportView.js +140 -246
  109. package/dist/shared/components/support/TicketDetailSheet.js +82 -75
  110. package/dist/shared/components/support/TicketSlowScreens.js +9 -9
  111. package/dist/shared/components/support/assign-rules-text.js +171 -0
  112. package/dist/shared/components/support/support-list.js +125 -0
  113. package/dist/shared/components/ui/SimpleSelect.js +28 -20
  114. package/dist/shared/components/ui/checkbox.js +6 -6
  115. package/dist/shared/components/ui/select.js +43 -39
  116. package/dist/shared/components/ui/sheet.js +9 -9
  117. package/dist/shared/components/ui/switch.js +12 -11
  118. package/dist/shared/components/watch-list/WatchDock.js +532 -459
  119. package/dist/shared/components/watch-list/WatchExtras.js +332 -286
  120. package/dist/shared/components/watch-list/WatchRows.js +164 -140
  121. package/dist/shared/lib/activity-sentence.js +103 -91
  122. package/dist/shared/lib/agent-presence.js +27 -21
  123. package/dist/shared/lib/approval-progress.js +2 -2
  124. package/dist/shared/lib/copy-rules.js +31 -24
  125. package/dist/shared/lib/derived-causes.js +113 -78
  126. package/dist/shared/lib/grid-cursors.js +26 -26
  127. package/dist/shared/lib/label-flash.js +27 -0
  128. package/dist/shared/lib/list-return.js +137 -125
  129. package/dist/shared/lib/live-deltas.js +40 -34
  130. package/dist/shared/lib/live-groups.js +56 -52
  131. package/dist/shared/lib/live-preference.js +64 -59
  132. package/dist/shared/lib/live-screen.js +223 -192
  133. package/dist/shared/lib/partner-failure.js +11 -11
  134. package/dist/shared/lib/rollup-recalc.js +68 -64
  135. package/dist/shared/lib/screen-refresh.js +74 -68
  136. package/dist/shared/lib/screen-share.js +108 -104
  137. package/dist/shared/lib/send-status.js +77 -61
  138. package/dist/shared/lib/text-diff-window.js +29 -0
  139. package/dist/shared/lib/use-query-entry.js +17 -0
  140. package/dist/shared/lib/watch-list.js +210 -209
  141. package/dist/shared/lib/widget-image-render.js +72 -49
  142. package/package.json +1 -1
@@ -1,38 +1,38 @@
1
- import { useRef as K, useState as _, useEffect as S, useLayoutEffect as A } from "react";
2
- import { useListAnchors as G, ROW_HOLD_MAX_MS as C, GROUP_ANCHOR_PREFIX as H } from "./live-list-flow.js";
3
- import { liveMotionAllowed as O } from "./live-preference.js";
4
- const v = (t) => t.flatMap((n) => [`${H}${n.key}`, ...n.rows]);
5
- function T(t, n, i) {
6
- const s = { held: !1, groups: n, gone: [], moving: /* @__PURE__ */ new Map() }, u = v(t);
1
+ import { useRef as K, useState as A, useEffect as S, useLayoutEffect as _ } from "react";
2
+ import { useListAnchors as G, ROW_HOLD_MAX_MS as T, GROUP_ANCHOR_PREFIX as C } from "./live-list-flow.js";
3
+ import { liveMotionAllowed as H } from "./live-preference.js";
4
+ const R = (t) => t.flatMap((n) => [`${C}${n.key}`, ...n.rows]);
5
+ function O(t, n, i) {
6
+ const r = { held: !1, groups: n, gone: [], moving: /* @__PURE__ */ new Map() }, u = R(t);
7
7
  let c = -1;
8
8
  for (const e of i) e != null && (c = Math.max(c, u.indexOf(e)));
9
- if (c < 0) return s;
10
- const f = v(n);
9
+ if (c < 0) return r;
10
+ const f = R(n);
11
11
  let l = f.length > c;
12
12
  for (let e = 0; l && e <= c; e++) u[e] !== f[e] && (l = !1);
13
- if (l) return s;
13
+ if (l) return r;
14
14
  const g = /* @__PURE__ */ new Map();
15
15
  for (const e of n) for (const a of e.rows) g.set(a, e.key);
16
- const p = [], r = /* @__PURE__ */ new Map();
16
+ const p = [], s = /* @__PURE__ */ new Map();
17
17
  for (const e of t)
18
18
  for (const a of e.rows) {
19
19
  const y = g.get(a);
20
- y == null ? p.push(a) : y !== e.key && r.set(a, y);
20
+ y == null ? p.push(a) : y !== e.key && s.set(a, y);
21
21
  }
22
22
  return {
23
23
  held: !0,
24
24
  groups: t.map((e) => ({ key: e.key, rows: [...e.rows] })),
25
25
  gone: p,
26
- moving: r
26
+ moving: s
27
27
  };
28
28
  }
29
29
  function I(t) {
30
30
  return `Now in ${t} — it moves there when you move the pointer away`;
31
31
  }
32
- function X(t, n, i, s = {}) {
33
- const u = s.enabled !== !1, c = K({ groups: [], rowByKey: /* @__PURE__ */ new Map(), groupByKey: /* @__PURE__ */ new Map() }), f = K(!1), [, l] = _(0), g = G(i, u, () => {
32
+ function N(t, n, i, r = {}) {
33
+ const u = r.enabled !== !1, c = K({ groups: [], rowByKey: /* @__PURE__ */ new Map(), groupByKey: /* @__PURE__ */ new Map() }), f = K(!1), [, l] = A(0), g = G(i, u, () => {
34
34
  f.current && l((o) => o + 1);
35
- }), p = t.map((o) => ({ key: o.key, rows: o.rows.map(n) })), r = c.current, e = u && r.resetKey === s.resetKey ? T(r.groups, p, g.current()) : null, a = !!(e != null && e.held), y = s.maxHoldMs ?? C;
35
+ }), p = t.map((o) => ({ key: o.key, rows: o.rows.map(n) })), s = c.current, e = u && s.resetKey === r.resetKey ? O(s.groups, p, g.current()) : null, a = !!(e != null && e.held), y = r.maxHoldMs ?? T;
36
36
  S(() => {
37
37
  if (f.current = a, !a) return;
38
38
  const o = setTimeout(() => {
@@ -40,22 +40,22 @@ function X(t, n, i, s = {}) {
40
40
  }, y);
41
41
  return () => clearTimeout(o);
42
42
  }, [a, y, g]);
43
- const h = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map();
43
+ const d = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
44
44
  for (const o of t) {
45
- M.set(o.key, o);
46
- for (const w of o.rows) h.set(n(w), w);
45
+ m.set(o.key, o);
46
+ for (const w of o.rows) d.set(n(w), w);
47
47
  }
48
- let k, m;
49
- e != null && e.held ? (m = e.groups, k = e.groups.map((o) => ({
48
+ let k, h;
49
+ e != null && e.held ? (h = e.groups, k = e.groups.map((o) => ({
50
50
  key: o.key,
51
- group: M.get(o.key) ?? null,
52
- rows: o.rows.map((w) => h.get(w) ?? r.rowByKey.get(w)).filter((w) => w !== void 0)
53
- }))) : (m = p, k = t.map((o) => ({ key: o.key, group: o, rows: o.rows }))), S(() => {
54
- const o = new Map(h);
55
- for (const w of m)
56
- for (const d of w.rows)
57
- !o.has(d) && r.rowByKey.has(d) && o.set(d, r.rowByKey.get(d));
58
- c.current = { groups: m, rowByKey: o, groupByKey: M, resetKey: s.resetKey };
51
+ group: m.get(o.key) ?? null,
52
+ rows: o.rows.map((w) => d.get(w) ?? s.rowByKey.get(w)).filter((w) => w !== void 0)
53
+ }))) : (h = p, k = t.map((o) => ({ key: o.key, group: o, rows: o.rows }))), S(() => {
54
+ const o = new Map(d);
55
+ for (const w of h)
56
+ for (const M of w.rows)
57
+ !o.has(M) && s.rowByKey.has(M) && o.set(M, s.rowByKey.get(M));
58
+ c.current = { groups: h, rowByKey: o, groupByKey: m, resetKey: r.resetKey };
59
59
  });
60
60
  const b = new Set((e == null ? void 0 : e.gone) ?? []), B = (e == null ? void 0 : e.moving) ?? /* @__PURE__ */ new Map();
61
61
  return {
@@ -65,58 +65,62 @@ function X(t, n, i, s = {}) {
65
65
  holding: a
66
66
  };
67
67
  }
68
- const R = 280, $ = 60;
68
+ const v = 280, $ = 60;
69
69
  function x(t, n, i = $) {
70
- const s = [];
70
+ const r = [];
71
71
  for (const [u, c] of n) {
72
72
  const f = t.get(u);
73
73
  if (f == null) continue;
74
74
  const l = f - c;
75
- Math.abs(l) > 1 && s.push({ key: u, dy: l });
75
+ Math.abs(l) > 1 && r.push({ key: u, dy: l });
76
76
  }
77
- return s.length > i ? [] : s;
77
+ return r.length > i ? [] : r;
78
78
  }
79
79
  function E(t) {
80
80
  const n = /* @__PURE__ */ new Map(), i = t.getBoundingClientRect().top;
81
- for (const s of t.querySelectorAll("[data-row-key]")) {
82
- const u = s.getAttribute("data-row-key");
83
- u != null && !n.has(u) && n.set(u, s.getBoundingClientRect().top - i);
81
+ for (const r of t.querySelectorAll("[data-row-key]")) {
82
+ const u = r.getAttribute("data-row-key");
83
+ u != null && !n.has(u) && n.set(u, r.getBoundingClientRect().top - i);
84
84
  }
85
85
  return n;
86
86
  }
87
- function N(t, n, i = {}) {
88
- const s = K(null), u = i.enabled !== !1;
89
- A(() => {
87
+ function X(t, n, i = {}) {
88
+ const r = K(null), u = i.enabled !== !1;
89
+ _(() => {
90
90
  const c = t.current;
91
91
  if (!c || !u) {
92
- s.current = null;
92
+ r.current = null;
93
93
  return;
94
94
  }
95
- const f = s.current;
95
+ const f = r.current;
96
96
  if (f && f.sig === n && f.reset === i.resetKey) return;
97
97
  const l = E(c);
98
- if (s.current = { sig: n, reset: i.resetKey, tops: l }, !f || f.reset !== i.resetKey || !O()) return;
98
+ if (r.current = { sig: n, reset: i.resetKey, tops: l }, !f || f.reset !== i.resetKey || !H()) return;
99
99
  const g = x(f.tops, l);
100
100
  if (g.length === 0) return;
101
101
  const p = [];
102
- for (const { key: r, dy: e } of g) {
103
- const a = typeof CSS < "u" && CSS.escape ? CSS.escape(r) : r, y = c.querySelector(`[data-row-key="${a}"]`);
104
- y && (y.style.transition = "none", y.style.transform = `translateY(${e}px)`, p.push(y));
102
+ for (const { key: s, dy: e } of g) {
103
+ const a = typeof CSS < "u" && CSS.escape ? CSS.escape(s) : s, y = c.querySelector(`[data-row-key="${a}"]`);
104
+ if (!y) continue;
105
+ const d = y.tagName === "TR" ? Array.from(y.children) : [y];
106
+ for (const m of d)
107
+ m.style.transition = "none", m.style.transform = `translateY(${e}px)`, p.push(m);
105
108
  }
106
109
  c.offsetHeight;
107
- for (const r of p)
108
- r.style.transition = `transform ${R}ms cubic-bezier(0.22, 1, 0.36, 1)`, r.style.transform = "";
110
+ for (const s of p)
111
+ s.style.transition = `transform ${v}ms cubic-bezier(0.22, 1, 0.36, 1)`, s.style.transform = "";
109
112
  setTimeout(() => {
110
- for (const r of p) r.style.transition = "";
111
- }, R + 40);
113
+ for (const s of p)
114
+ s.style.transition = "", s.style.transform = "";
115
+ }, v + 40);
112
116
  });
113
117
  }
114
118
  export {
115
119
  $ as GLIDE_MAX_ROWS,
116
- R as GLIDE_MS,
120
+ v as GLIDE_MS,
117
121
  x as glideMoves,
118
122
  I as movingRowTitle,
119
- T as planGroupHold,
120
- N as useRowGlide,
121
- X as useSteadyGroups
123
+ O as planGroupHold,
124
+ X as useRowGlide,
125
+ N as useSteadyGroups
122
126
  };
@@ -4,14 +4,18 @@ const q = {
4
4
  normal: "Normal",
5
5
  calm: "Calm",
6
6
  off: "Off"
7
- }, m = "nvr:live-mode", v = 3e3;
8
- function s(e) {
7
+ }, G = {
8
+ normal: "Changes appear as they happen, with a short fade.",
9
+ calm: "No fades or marks; lists keep their order until you pause.",
10
+ off: "Nothing moves until you press ↻."
11
+ }, m = "nvr:live-mode", E = 3e3;
12
+ function c(e) {
9
13
  return e === "calm" || e === "normal" || e === "off" ? e : null;
10
14
  }
11
- function G(e, t) {
12
- const o = s(e);
15
+ function K(e, t) {
16
+ const o = c(e);
13
17
  if (o) return { mode: o, source: "own" };
14
- const n = s(t);
18
+ const n = c(t);
15
19
  return n ? { mode: n, source: "role" } : { mode: "normal", source: "default" };
16
20
  }
17
21
  const T = /* @__PURE__ */ new Set([
@@ -41,10 +45,10 @@ const T = /* @__PURE__ */ new Set([
41
45
  // rt7 #9 — someone's big save is recalculating this record's totals.
42
46
  "record:recalc"
43
47
  ]);
44
- function K(e, t = A()) {
48
+ function Q(e, t = A()) {
45
49
  return t === "normal" ? !1 : T.has(e) ? !0 : t === "off" && V.has(e);
46
50
  }
47
- function Q(e, t = A()) {
51
+ function U(e, t = A()) {
48
52
  if (t !== "off") return !0;
49
53
  if (!e || typeof e.collection != "string") return !1;
50
54
  const o = e.collection, n = Array.isArray(e.changed_fields) ? e.changed_fields : null;
@@ -52,50 +56,50 @@ function Q(e, t = A()) {
52
56
  (u) => u != null && u !== "*" && k(o, u, n)
53
57
  );
54
58
  }
55
- let r = { mode: P() ?? "normal", source: "default" };
56
- const f = /* @__PURE__ */ new Set();
57
- let y = !1;
58
- function P() {
59
+ let r = { mode: N() ?? "normal", source: "default" };
60
+ const l = /* @__PURE__ */ new Set();
61
+ let g = !1;
62
+ function N() {
59
63
  try {
60
- return typeof localStorage > "u" ? null : s(localStorage.getItem(m));
64
+ return typeof localStorage > "u" ? null : c(localStorage.getItem(m));
61
65
  } catch {
62
66
  return null;
63
67
  }
64
68
  }
65
- function h(e) {
69
+ function v(e) {
66
70
  if (typeof document > "u") return;
67
71
  const t = document.documentElement;
68
72
  e === "normal" ? t.removeAttribute("data-live-mode") : t.setAttribute("data-live-mode", e);
69
73
  }
70
74
  function L() {
71
- y || typeof window > "u" || (y = !0, window.addEventListener("storage", (e) => {
75
+ g || typeof window > "u" || (g = !0, window.addEventListener("storage", (e) => {
72
76
  if (e.key !== m) return;
73
- const t = s(e.newValue);
77
+ const t = c(e.newValue);
74
78
  t && t !== r.mode && S({ mode: t, source: r.source }, !1);
75
79
  }));
76
80
  }
77
81
  function S(e, t) {
78
82
  const o = e.mode !== r.mode || e.source !== r.source;
79
- if (r = e, h(e.mode), t)
83
+ if (r = e, v(e.mode), t)
80
84
  try {
81
85
  localStorage.setItem(m, e.mode);
82
86
  } catch {
83
87
  }
84
- if (o) for (const n of f) n();
88
+ if (o) for (const n of l) n();
85
89
  }
86
- h(r.mode);
90
+ v(r.mode);
87
91
  function A() {
88
92
  return r.mode;
89
93
  }
90
- function U(e, t = "own") {
94
+ function W(e, t = "own") {
91
95
  L(), S({ mode: e, source: t }, !0);
92
96
  }
93
- function b(e) {
94
- return L(), f.add(e), () => {
95
- f.delete(e);
97
+ function D(e) {
98
+ return L(), l.add(e), () => {
99
+ l.delete(e);
96
100
  };
97
101
  }
98
- function D(e) {
102
+ function O(e) {
99
103
  return {
100
104
  mode: e.mode,
101
105
  source: e.source,
@@ -105,15 +109,15 @@ function D(e) {
105
109
  quiet: e.mode !== "normal"
106
110
  };
107
111
  }
108
- function O() {
112
+ function P() {
109
113
  const e = _(
110
- b,
114
+ D,
111
115
  () => r,
112
116
  () => r
113
117
  );
114
- return D(e);
118
+ return O(e);
115
119
  }
116
- function B() {
120
+ function b() {
117
121
  var e;
118
122
  try {
119
123
  return typeof window < "u" && !!((e = window.matchMedia) != null && e.call(window, "(prefers-reduced-motion: reduce)").matches);
@@ -121,64 +125,65 @@ function B() {
121
125
  return !1;
122
126
  }
123
127
  }
124
- function W() {
125
- return r.mode === "normal" && !B();
128
+ function Y() {
129
+ return r.mode === "normal" && !b();
126
130
  }
127
- let a = 0, E = !1;
131
+ let f = 0, h = !1;
128
132
  function C() {
129
- if (E || typeof document > "u") return;
130
- E = !0;
133
+ if (h || typeof document > "u") return;
134
+ h = !0;
131
135
  const e = () => {
132
- a = Date.now();
136
+ f = Date.now();
133
137
  };
134
138
  for (const t of ["pointermove", "pointerdown", "wheel", "keydown", "touchstart"])
135
139
  document.addEventListener(t, e, { capture: !0, passive: !0 });
136
140
  }
137
- function N(e, t, o = v) {
141
+ function B(e, t, o = E) {
138
142
  return e - t >= o;
139
143
  }
140
- function Y(e, t = v) {
141
- const { calm: o } = O(), n = e && o, [p, u] = M(!1);
144
+ function j(e, t = E) {
145
+ const { calm: o } = P(), n = e && o, [p, u] = M(!1);
142
146
  return I(() => {
143
147
  if (!n || typeof document > "u") {
144
148
  u(!1);
145
149
  return;
146
150
  }
147
151
  C();
148
- let i = null, d = !1;
152
+ let i = null, a = !1;
149
153
  const w = () => {
150
154
  i = null;
151
- const c = t - (Date.now() - a);
152
- if (c > 0) {
153
- i = setTimeout(w, c);
155
+ const s = t - (Date.now() - f);
156
+ if (s > 0) {
157
+ i = setTimeout(w, s);
154
158
  return;
155
159
  }
156
- d = !1, u(!1);
157
- }, l = () => {
158
- d || (d = !0, u(!0)), i || (i = setTimeout(w, t));
159
- }, g = ["pointermove", "pointerdown", "wheel", "keydown", "touchstart"];
160
- for (const c of g) document.addEventListener(c, l, { capture: !0, passive: !0 });
161
- return N(Date.now(), a, t) || l(), () => {
162
- for (const c of g) document.removeEventListener(c, l, { capture: !0 });
160
+ a = !1, u(!1);
161
+ }, d = () => {
162
+ a || (a = !0, u(!0)), i || (i = setTimeout(w, t));
163
+ }, y = ["pointermove", "pointerdown", "wheel", "keydown", "touchstart"];
164
+ for (const s of y) document.addEventListener(s, d, { capture: !0, passive: !0 });
165
+ return B(Date.now(), f, t) || d(), () => {
166
+ for (const s of y) document.removeEventListener(s, d, { capture: !0 });
163
167
  i && clearTimeout(i);
164
168
  };
165
169
  }, [n, t]), n && p;
166
170
  }
167
171
  export {
168
- v as LIVE_CALM_PAUSE_MS,
172
+ E as LIVE_CALM_PAUSE_MS,
169
173
  V as LIVE_DATA_EVENTS,
174
+ G as LIVE_MODE_HINTS,
170
175
  q as LIVE_MODE_LABELS,
171
176
  T as LIVE_PRESENCE_EVENTS,
172
177
  A as getLiveMode,
173
- Q as liveCollectionEventPasses,
174
- K as liveEventQuiet,
175
- W as liveMotionAllowed,
176
- N as livePausedAt,
177
- D as livePreferenceOf,
178
- s as parseLiveMode,
179
- G as resolveLiveMode,
180
- U as setLiveMode,
181
- b as subscribeLiveMode,
182
- Y as useLiveBusy,
183
- O as useLivePreference
178
+ U as liveCollectionEventPasses,
179
+ Q as liveEventQuiet,
180
+ Y as liveMotionAllowed,
181
+ B as livePausedAt,
182
+ O as livePreferenceOf,
183
+ c as parseLiveMode,
184
+ K as resolveLiveMode,
185
+ W as setLiveMode,
186
+ D as subscribeLiveMode,
187
+ j as useLiveBusy,
188
+ P as useLivePreference
184
189
  };