@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.
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +140 -14
- package/dist/index.js +488 -485
- package/dist/shared/components/ActivityEntry.js +130 -125
- package/dist/shared/components/AgentPresenceChip.js +36 -26
- package/dist/shared/components/CellCopyLayer.js +50 -45
- package/dist/shared/components/CollectionBrowserView.js +3855 -3785
- package/dist/shared/components/FilePreviewLightbox.js +96 -58
- package/dist/shared/components/InStep.js +18 -17
- package/dist/shared/components/ItemEditForm.js +4220 -4175
- package/dist/shared/components/JobsTray.js +8 -8
- package/dist/shared/components/LiveNewMatchesPill.js +21 -14
- package/dist/shared/components/LiveOffNote.js +3 -2
- package/dist/shared/components/LiveRowMark.js +53 -23
- package/dist/shared/components/LiveTraceView.js +162 -123
- package/dist/shared/components/MyWorkView.js +320 -299
- package/dist/shared/components/NotificationBell.js +14 -14
- package/dist/shared/components/OverflowRail.js +1 -1
- package/dist/shared/components/PageRenderer.js +120 -116
- package/dist/shared/components/ProfileView.js +203 -202
- package/dist/shared/components/RealtimeStatusBanner.js +31 -29
- package/dist/shared/components/RecordDrilldownSheet.js +7 -7
- package/dist/shared/components/RecordHoverCard.js +102 -84
- package/dist/shared/components/RecordReadView.js +146 -146
- package/dist/shared/components/ReportView.js +1086 -1091
- package/dist/shared/components/ScreenRefreshButton.js +34 -32
- package/dist/shared/components/TipLayer.js +65 -58
- package/dist/shared/components/WidgetImageMenu.js +83 -43
- package/dist/shared/components/activity/RecordActivityStream.js +175 -173
- package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
- package/dist/shared/components/cbv/column-totals.js +62 -57
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
- package/dist/shared/components/charts/category-axis.js +93 -0
- package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
- package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
- package/dist/shared/components/collections-directory/page-model.js +72 -67
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
- package/dist/shared/components/integrations/SendStatus.js +65 -59
- package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
- package/dist/shared/components/integrations/console/SignalCard.js +237 -230
- package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +131 -92
- package/dist/shared/components/item-edit/CloneDialog.js +191 -161
- package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
- package/dist/shared/components/item-edit/FieldComments.js +54 -53
- package/dist/shared/components/item-edit/FieldPointer.js +82 -67
- package/dist/shared/components/item-edit/FieldRow.js +106 -100
- package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
- package/dist/shared/components/item-edit/FilePickerField.js +452 -387
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
- package/dist/shared/components/item-edit/HeaderTools.js +94 -85
- package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
- package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
- package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
- package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
- package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
- package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
- package/dist/shared/components/item-edit/RecalcValue.js +57 -32
- package/dist/shared/components/item-edit/RecordHelpChip.js +21 -22
- package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
- package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
- package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
- package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
- package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
- package/dist/shared/components/item-edit/SectionPresence.js +18 -10
- package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
- package/dist/shared/components/item-edit/UserChip.js +1 -1
- package/dist/shared/components/item-edit/file-live.js +69 -54
- package/dist/shared/components/item-edit/layout-switch.js +98 -89
- package/dist/shared/components/item-edit/partner-needs.js +12 -12
- package/dist/shared/components/item-edit/removed-line.js +31 -25
- package/dist/shared/components/layout-editor/pickers/field-picker.js +112 -104
- package/dist/shared/components/list/ListViewers.js +46 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
- package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
- package/dist/shared/components/panels/AlertBanners.js +82 -72
- package/dist/shared/components/panels/BranchLanes.js +22 -22
- package/dist/shared/components/panels/CommentImages.js +123 -102
- package/dist/shared/components/panels/CommentPanel.js +186 -185
- package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
- package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
- package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
- package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
- package/dist/shared/components/pipeline/BindingStartStateSettings.js +163 -0
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
- package/dist/shared/components/pipeline/PipelineEditorView.js +320 -299
- package/dist/shared/components/profile/AgentNameField.js +107 -81
- package/dist/shared/components/profile/AgentsPanel.js +184 -184
- package/dist/shared/components/profile/PersonAccess.js +599 -495
- package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
- package/dist/shared/components/profile/SignedInDevices.js +17 -17
- package/dist/shared/components/profile/primitives.js +1 -1
- package/dist/shared/components/queue/OwnerAvatars.js +91 -54
- package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
- package/dist/shared/components/queue/QueueWorklist.js +1002 -983
- package/dist/shared/components/support/AssignRules.js +1733 -0
- package/dist/shared/components/support/PersonPick.js +88 -0
- package/dist/shared/components/support/RequestList.js +790 -0
- package/dist/shared/components/support/ScreenShare.js +158 -152
- package/dist/shared/components/support/SupportRequestDialog.js +50 -48
- package/dist/shared/components/support/SupportView.js +140 -246
- package/dist/shared/components/support/TicketDetailSheet.js +82 -75
- package/dist/shared/components/support/TicketSlowScreens.js +9 -9
- package/dist/shared/components/support/assign-rules-text.js +171 -0
- package/dist/shared/components/support/support-list.js +125 -0
- package/dist/shared/components/ui/SimpleSelect.js +28 -20
- package/dist/shared/components/ui/checkbox.js +6 -6
- package/dist/shared/components/ui/select.js +43 -39
- package/dist/shared/components/ui/sheet.js +9 -9
- package/dist/shared/components/ui/switch.js +12 -11
- package/dist/shared/components/watch-list/WatchDock.js +532 -459
- package/dist/shared/components/watch-list/WatchExtras.js +332 -286
- package/dist/shared/components/watch-list/WatchRows.js +164 -140
- package/dist/shared/lib/activity-sentence.js +103 -91
- package/dist/shared/lib/agent-presence.js +27 -21
- package/dist/shared/lib/approval-progress.js +2 -2
- package/dist/shared/lib/copy-rules.js +31 -24
- package/dist/shared/lib/derived-causes.js +113 -78
- package/dist/shared/lib/grid-cursors.js +26 -26
- package/dist/shared/lib/label-flash.js +27 -0
- package/dist/shared/lib/list-return.js +137 -125
- package/dist/shared/lib/live-deltas.js +40 -34
- package/dist/shared/lib/live-groups.js +56 -52
- package/dist/shared/lib/live-preference.js +64 -59
- package/dist/shared/lib/live-screen.js +223 -192
- package/dist/shared/lib/partner-failure.js +11 -11
- package/dist/shared/lib/rollup-recalc.js +68 -64
- package/dist/shared/lib/screen-refresh.js +74 -68
- package/dist/shared/lib/screen-share.js +108 -104
- package/dist/shared/lib/send-status.js +77 -61
- package/dist/shared/lib/text-diff-window.js +29 -0
- package/dist/shared/lib/use-query-entry.js +17 -0
- package/dist/shared/lib/watch-list.js +210 -209
- package/dist/shared/lib/widget-image-render.js +72 -49
- package/package.json +1 -1
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { useRef as K, useState as
|
|
2
|
-
import { useListAnchors as G, ROW_HOLD_MAX_MS as
|
|
3
|
-
import { liveMotionAllowed as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
const
|
|
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
|
|
10
|
-
const f =
|
|
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
|
|
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 = [],
|
|
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 &&
|
|
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:
|
|
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
|
|
33
|
-
const 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) })),
|
|
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
|
|
43
|
+
const d = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
|
|
44
44
|
for (const o of t) {
|
|
45
|
-
|
|
46
|
-
for (const w of o.rows)
|
|
45
|
+
m.set(o.key, o);
|
|
46
|
+
for (const w of o.rows) d.set(n(w), w);
|
|
47
47
|
}
|
|
48
|
-
let k,
|
|
49
|
-
e != null && e.held ? (
|
|
48
|
+
let k, h;
|
|
49
|
+
e != null && e.held ? (h = e.groups, k = e.groups.map((o) => ({
|
|
50
50
|
key: o.key,
|
|
51
|
-
group:
|
|
52
|
-
rows: o.rows.map((w) =>
|
|
53
|
-
}))) : (
|
|
54
|
-
const o = new Map(
|
|
55
|
-
for (const w of
|
|
56
|
-
for (const
|
|
57
|
-
!o.has(
|
|
58
|
-
c.current = { groups:
|
|
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
|
|
68
|
+
const v = 280, $ = 60;
|
|
69
69
|
function x(t, n, i = $) {
|
|
70
|
-
const
|
|
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 &&
|
|
75
|
+
Math.abs(l) > 1 && r.push({ key: u, dy: l });
|
|
76
76
|
}
|
|
77
|
-
return
|
|
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
|
|
82
|
-
const u =
|
|
83
|
-
u != null && !n.has(u) && n.set(u,
|
|
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
|
|
88
|
-
const
|
|
89
|
-
|
|
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
|
-
|
|
92
|
+
r.current = null;
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
const f =
|
|
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 (
|
|
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:
|
|
103
|
-
const a = typeof CSS < "u" && CSS.escape ? CSS.escape(
|
|
104
|
-
|
|
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
|
|
108
|
-
|
|
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
|
|
111
|
-
|
|
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
|
-
|
|
120
|
+
v as GLIDE_MS,
|
|
117
121
|
x as glideMoves,
|
|
118
122
|
I as movingRowTitle,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
},
|
|
8
|
-
|
|
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
|
|
12
|
-
const o =
|
|
15
|
+
function K(e, t) {
|
|
16
|
+
const o = c(e);
|
|
13
17
|
if (o) return { mode: o, source: "own" };
|
|
14
|
-
const n =
|
|
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
|
|
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
|
|
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:
|
|
56
|
-
const
|
|
57
|
-
let
|
|
58
|
-
function
|
|
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 :
|
|
64
|
+
return typeof localStorage > "u" ? null : c(localStorage.getItem(m));
|
|
61
65
|
} catch {
|
|
62
66
|
return null;
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
|
-
function
|
|
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
|
-
|
|
75
|
+
g || typeof window > "u" || (g = !0, window.addEventListener("storage", (e) => {
|
|
72
76
|
if (e.key !== m) return;
|
|
73
|
-
const t =
|
|
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,
|
|
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
|
|
88
|
+
if (o) for (const n of l) n();
|
|
85
89
|
}
|
|
86
|
-
|
|
90
|
+
v(r.mode);
|
|
87
91
|
function A() {
|
|
88
92
|
return r.mode;
|
|
89
93
|
}
|
|
90
|
-
function
|
|
94
|
+
function W(e, t = "own") {
|
|
91
95
|
L(), S({ mode: e, source: t }, !0);
|
|
92
96
|
}
|
|
93
|
-
function
|
|
94
|
-
return L(),
|
|
95
|
-
|
|
97
|
+
function D(e) {
|
|
98
|
+
return L(), l.add(e), () => {
|
|
99
|
+
l.delete(e);
|
|
96
100
|
};
|
|
97
101
|
}
|
|
98
|
-
function
|
|
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
|
|
112
|
+
function P() {
|
|
109
113
|
const e = _(
|
|
110
|
-
|
|
114
|
+
D,
|
|
111
115
|
() => r,
|
|
112
116
|
() => r
|
|
113
117
|
);
|
|
114
|
-
return
|
|
118
|
+
return O(e);
|
|
115
119
|
}
|
|
116
|
-
function
|
|
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
|
|
125
|
-
return r.mode === "normal" && !
|
|
128
|
+
function Y() {
|
|
129
|
+
return r.mode === "normal" && !b();
|
|
126
130
|
}
|
|
127
|
-
let
|
|
131
|
+
let f = 0, h = !1;
|
|
128
132
|
function C() {
|
|
129
|
-
if (
|
|
130
|
-
|
|
133
|
+
if (h || typeof document > "u") return;
|
|
134
|
+
h = !0;
|
|
131
135
|
const e = () => {
|
|
132
|
-
|
|
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
|
|
141
|
+
function B(e, t, o = E) {
|
|
138
142
|
return e - t >= o;
|
|
139
143
|
}
|
|
140
|
-
function
|
|
141
|
-
const { calm: o } =
|
|
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,
|
|
152
|
+
let i = null, a = !1;
|
|
149
153
|
const w = () => {
|
|
150
154
|
i = null;
|
|
151
|
-
const
|
|
152
|
-
if (
|
|
153
|
-
i = setTimeout(w,
|
|
155
|
+
const s = t - (Date.now() - f);
|
|
156
|
+
if (s > 0) {
|
|
157
|
+
i = setTimeout(w, s);
|
|
154
158
|
return;
|
|
155
159
|
}
|
|
156
|
-
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
},
|
|
160
|
-
for (const
|
|
161
|
-
return
|
|
162
|
-
for (const
|
|
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
|
-
|
|
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
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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
|
};
|