@nivaro/react 0.3.137 → 0.3.138

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 (49) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +95 -4
  4. package/dist/index.js +748 -743
  5. package/dist/shared/components/CollectionBrowserView.js +392 -389
  6. package/dist/shared/components/DelegateCoverLine.js +80 -87
  7. package/dist/shared/components/ItemEditForm.js +589 -588
  8. package/dist/shared/components/MyWorkView.js +284 -286
  9. package/dist/shared/components/NotificationBell.js +251 -205
  10. package/dist/shared/components/ai/AiAnalyticsView.js +878 -417
  11. package/dist/shared/components/ai/AiPlanCard.js +164 -122
  12. package/dist/shared/components/ai/AiPlanUndo.js +291 -0
  13. package/dist/shared/components/ai/call-log/CallDrawer.js +357 -0
  14. package/dist/shared/components/ai/call-log/RawJson.js +126 -0
  15. package/dist/shared/components/ai/call-log/ThreadView.js +223 -0
  16. package/dist/shared/components/ai/call-log/TranscriptView.js +227 -0
  17. package/dist/shared/components/ai/call-log/controls.js +364 -0
  18. package/dist/shared/components/ai/call-log/format.js +46 -0
  19. package/dist/shared/components/ai/call-log/url.js +105 -0
  20. package/dist/shared/components/chat/chat-core.js +422 -346
  21. package/dist/shared/components/integrations/IntegrationObligationsView.js +98 -98
  22. package/dist/shared/components/integrations/RecordIntegrationPreview.js +102 -93
  23. package/dist/shared/components/integrations/console/api.js +11 -1
  24. package/dist/shared/components/item-edit/HeaderRollupExplainer.js +5 -1
  25. package/dist/shared/components/item-edit/RecordLiveSync.js +241 -229
  26. package/dist/shared/components/item-edit/RecordRecapChanges.js +166 -0
  27. package/dist/shared/components/item-edit/RecordRecapStrip.js +254 -84
  28. package/dist/shared/components/item-edit/live-related.js +34 -18
  29. package/dist/shared/components/panels/RevisionsPanel.js +735 -683
  30. package/dist/shared/components/queue/QueueWorklist.js +323 -316
  31. package/dist/shared/components/support/SupportRequestDialog.js +198 -181
  32. package/dist/shared/components/trackers/use-tracker-link.js +74 -65
  33. package/dist/shared/lib/config-update-refresh.js +34 -0
  34. package/dist/shared/lib/config-watch.js +17 -17
  35. package/dist/shared/lib/gap-refresh.js +49 -0
  36. package/dist/shared/lib/integration-dots.js +8 -8
  37. package/dist/shared/lib/live-ops.js +26 -23
  38. package/dist/shared/lib/live-pickers.js +1 -1
  39. package/dist/shared/lib/live-queries.js +223 -195
  40. package/dist/shared/lib/live.js +56 -51
  41. package/dist/shared/lib/obligation-banner.js +11 -10
  42. package/dist/shared/lib/obligation-filters.js +22 -18
  43. package/dist/shared/lib/obligation-reason-text.js +18 -8
  44. package/dist/shared/lib/presence-hooks.js +133 -132
  45. package/dist/shared/lib/reconnect-resync.js +90 -0
  46. package/dist/shared/lib/record-room-holds.js +43 -0
  47. package/dist/shared/lib/socket-realtime.js +116 -105
  48. package/dist/shared/lib/user-sync.js +1 -6
  49. package/package.json +1 -1
@@ -1,8 +1,9 @@
1
1
  import { useQueryClient as O, useQuery as f } from "@tanstack/react-query";
2
- import { useCallback as K, useState as g, useEffect as p, useMemo as A } from "react";
3
- import { useNivaroClient as I, useItemEditAuth as L, useOptionalNivaroClient as Q } from "../../context.js";
2
+ import { useCallback as K, useState as C, useEffect as g, useMemo as L } from "react";
3
+ import { useNivaroClient as M, useItemEditAuth as A, useOptionalNivaroClient as E } from "../../context.js";
4
4
  import { get as k } from "../../lib/commands.js";
5
- import { deadCreatesFor as P, shownTrackers as R } from "./tracker-model.js";
5
+ import { useLiveOps as P } from "../../lib/live-ops.js";
6
+ import { deadCreatesFor as R, shownTrackers as j } from "./tracker-model.js";
6
7
  const l = {
7
8
  all: ["trackers"],
8
9
  featurePublic: () => ["trackers", "feature", "public"],
@@ -17,41 +18,41 @@ const l = {
17
18
  projects: (e, t) => ["trackers", "projects", e, t],
18
19
  labels: (e, t) => ["trackers", "labels", e, t],
19
20
  users: (e, t, n) => ["trackers", "users", e, t, n]
20
- }, j = (e) => {
21
+ }, D = (e) => {
21
22
  var n;
22
23
  const t = e;
23
24
  return (t == null ? void 0 : t.status) ?? ((n = t == null ? void 0 : t.response) == null ? void 0 : n.status);
24
25
  };
25
- async function D(e) {
26
+ async function N(e) {
26
27
  var t;
27
28
  try {
28
29
  return !!((t = (await e.request(k("/trackers/feature/public"))).data) != null && t.enabled);
29
30
  } catch (n) {
30
- if (j(n) === 404) return !1;
31
+ if (D(n) === 404) return !1;
31
32
  throw n;
32
33
  }
33
34
  }
34
- function N() {
35
- const e = Q(), t = f({
35
+ function W() {
36
+ const e = E(), t = f({
36
37
  queryKey: l.featurePublic(),
37
- queryFn: () => D(e),
38
+ queryFn: () => N(e),
38
39
  enabled: !!e,
39
40
  staleTime: 6e4,
40
41
  retry: !1
41
42
  });
42
43
  return { on: t.data === !0, loading: t.isLoading };
43
44
  }
44
- function W(e, t) {
45
+ function $(e, t) {
45
46
  return (e ?? []).filter((n) => {
46
47
  var r, a;
47
48
  return n.is_active !== !1 && ((a = (r = n.sync) == null ? void 0 : r.sources) == null ? void 0 : a[t]) !== !1;
48
49
  });
49
50
  }
50
- const $ = (e) => e.request(k("/trackers")).then((t) => t.data ?? []);
51
- function U(e, t) {
52
- const n = I(), { isAdmin: r } = L(), a = f({
51
+ const U = (e) => e.request(k("/trackers")).then((t) => t.data ?? []);
52
+ function z(e, t) {
53
+ const n = M(), { isAdmin: r } = A(), a = f({
53
54
  queryKey: l.connections(),
54
- queryFn: () => $(n),
55
+ queryFn: () => U(n),
55
56
  enabled: t.enabled && r,
56
57
  staleTime: 6e4,
57
58
  retry: !1
@@ -64,80 +65,88 @@ function U(e, t) {
64
65
  staleTime: 6e4,
65
66
  retry: !1
66
67
  });
67
- return { connections: A(() => t.enabled ? r ? W(a.data, e) : u.data ?? [] : [], [t.enabled, r, a.data, u.data, e]), loading: r ? a.isLoading : u.isLoading };
68
+ return { connections: L(() => t.enabled ? r ? $(a.data, e) : u.data ?? [] : [], [t.enabled, r, a.data, u.data, e]), loading: r ? a.isLoading : u.isLoading };
68
69
  }
69
- const z = 12e4, B = 4e3;
70
- function G(e, t) {
71
- const [n, r] = g(null), [a, u] = g(!1);
72
- p(() => {
70
+ const B = 12e4, G = 4e3;
71
+ function H(e, t) {
72
+ const [n, r] = C(null), [a, u] = C(!1);
73
+ g(() => {
73
74
  e && (r(null), u(!1));
74
- }, [e]), p(() => {
75
+ }, [e]), g(() => {
75
76
  if (n == null) return;
76
- const o = Math.max(0, n + z - Date.now()), y = window.setTimeout(() => {
77
+ const c = Math.max(0, n + B - Date.now()), y = window.setTimeout(() => {
77
78
  r(null), u(!0);
78
- }, o);
79
+ }, c);
79
80
  return () => window.clearTimeout(y);
80
81
  }, [n]);
81
- const c = K(() => {
82
+ const o = K(() => {
82
83
  u(!1), r(Date.now()), t();
83
84
  }, [t]), s = n != null && !e;
84
85
  return {
85
86
  creating: s,
86
87
  stalled: a && !e,
87
- pollMs: s ? B : !1,
88
- markCreating: c,
89
- checkAgain: c
88
+ pollMs: s ? G : !1,
89
+ markCreating: o,
90
+ checkAgain: o
90
91
  };
91
92
  }
92
- function Z(e, t = {}) {
93
- const n = I(), r = O(), { isAdmin: a } = L(), c = N().on && !!(e != null && e.id), s = (e == null ? void 0 : e.kind) ?? "record", o = (e == null ? void 0 : e.id) ?? "", y = t.mayCreate !== !1, { connections: q } = U(s, {
94
- enabled: c && y,
95
- sourceId: o
93
+ function te(e, t = {}) {
94
+ const n = M(), r = O(), { isAdmin: a } = A(), o = W().on && !!(e != null && e.id), s = (e == null ? void 0 : e.kind) ?? "record", c = (e == null ? void 0 : e.id) ?? "", y = t.mayCreate !== !1, { connections: q } = z(s, {
95
+ enabled: o && y,
96
+ sourceId: c
96
97
  }), T = K(() => {
97
- r.invalidateQueries({ queryKey: l.linksFor(s, o) }), r.invalidateQueries({ queryKey: l.sourceLinks(s, o) }), a && r.invalidateQueries({ queryKey: l.deadOutbox() });
98
- }, [r, s, o, a]), [w, M] = g(!1), F = f({
99
- queryKey: l.linksFor(s, o),
98
+ r.invalidateQueries({ queryKey: l.linksFor(s, c) }), r.invalidateQueries({ queryKey: l.sourceLinks(s, c) }), a && r.invalidateQueries({ queryKey: l.deadOutbox() });
99
+ }, [r, s, c, a]);
100
+ P(
101
+ o ? "trackers" : null,
102
+ () => {
103
+ r.invalidateQueries({ queryKey: l.linksFor(s, c) }), r.invalidateQueries({ queryKey: l.sourceLinks(s, c) });
104
+ },
105
+ { debounceMs: 1500 }
106
+ );
107
+ const [v, I] = C(!1), w = f({
108
+ queryKey: l.linksFor(s, c),
100
109
  queryFn: () => n.request(
101
- k("/trackers/links/for", { source_kind: s, source_id: o })
110
+ k("/trackers/links/for", { source_kind: s, source_id: c })
102
111
  ).then((i) => i.data ?? []),
103
- enabled: c,
112
+ enabled: o,
104
113
  staleTime: 3e4,
105
114
  retry: !1,
106
- refetchInterval: w
107
- }), m = c && a && s !== "issue" && y, _ = f({
108
- queryKey: l.sourceLinks(s, o),
115
+ refetchInterval: v
116
+ }), m = o && a && s !== "issue" && y, _ = f({
117
+ queryKey: l.sourceLinks(s, c),
109
118
  queryFn: () => n.request(
110
- k(`/trackers/links/source/${s}/${encodeURIComponent(o)}`)
119
+ k(`/trackers/links/source/${s}/${encodeURIComponent(c)}`)
111
120
  ).then((i) => i.data ?? []),
112
121
  enabled: m,
113
122
  staleTime: 3e4,
114
123
  retry: !1,
115
- refetchInterval: w
116
- }), b = c ? F.data ?? [] : [], S = new Set(
124
+ refetchInterval: v
125
+ }), b = o ? w.data ?? [] : [], Q = new Set(
117
126
  b.map((i) => i.connection).filter((i) => i != null)
118
- ), C = c && a ? (_.data ?? []).find(
119
- (i) => S.has(i.connection) || q.some((E) => E.id === i.connection)
120
- ) ?? null : null, h = b.length > 0 || !!C, v = f({
127
+ ), p = o && a ? (_.data ?? []).find(
128
+ (i) => Q.has(i.connection) || q.some((x) => x.id === i.connection)
129
+ ) ?? null : null, h = b.length > 0 || !!p, F = f({
121
130
  queryKey: l.deadOutbox(),
122
131
  queryFn: () => n.request(k("/trackers/outbox", { status: "dead" })).then((i) => i.data ?? []),
123
- enabled: m && !h && F.isSuccess,
132
+ enabled: m && !h && w.isSuccess,
124
133
  staleTime: 6e4,
125
134
  retry: !1
126
- }), d = G(h, T);
127
- p(() => M(d.pollMs), [d.pollMs]);
128
- const x = A(
129
- () => m && !h ? P(v.data, { kind: s, id: o }) : [],
130
- [m, h, s, o, v.data]
135
+ }), d = H(h, T);
136
+ g(() => I(d.pollMs), [d.pollMs]);
137
+ const S = L(
138
+ () => m && !h ? R(F.data, { kind: s, id: c }) : [],
139
+ [m, h, s, c, F.data]
131
140
  );
132
141
  return {
133
- on: c,
142
+ on: o,
134
143
  isAdmin: a,
135
- connections: c ? q : [],
136
- canCreate: c && y && q.length > 0,
144
+ connections: o ? q : [],
145
+ canCreate: o && y && q.length > 0,
137
146
  chips: b,
138
- shown: R(b, C),
139
- link: C,
140
- failed: x,
147
+ shown: j(b, p),
148
+ link: p,
149
+ failed: S,
141
150
  creating: d.creating,
142
151
  slow: d.stalled,
143
152
  markCreating: d.markCreating,
@@ -146,14 +155,14 @@ function Z(e, t = {}) {
146
155
  };
147
156
  }
148
157
  export {
149
- B as CREATE_POLL_MS,
150
- z as CREATE_WAIT_MS,
151
- $ as fetchTrackerConnections,
152
- D as fetchTrackerFeature,
153
- W as syncingConnections,
158
+ G as CREATE_POLL_MS,
159
+ B as CREATE_WAIT_MS,
160
+ U as fetchTrackerConnections,
161
+ N as fetchTrackerFeature,
162
+ $ as syncingConnections,
154
163
  l as trackerQueryKeys,
155
- G as useCreateWait,
156
- Z as useSourceTracker,
157
- U as useTrackerConnections,
158
- N as useTrackerFeature
164
+ H as useCreateWait,
165
+ te as useSourceTracker,
166
+ z as useTrackerConnections,
167
+ W as useTrackerFeature
159
168
  };
@@ -0,0 +1,34 @@
1
+ import { useQueryClient as v } from "@tanstack/react-query";
2
+ import { useEffect as w } from "react";
3
+ const l = "nvr:config-update";
4
+ function N(n, o) {
5
+ return n ? o.some((e) => !!e && e === n) : !0;
6
+ }
7
+ function J(n, o, e = {}) {
8
+ const r = v(), i = e.enabled !== !1, s = e.jitterMs ?? 1500, c = JSON.stringify(n), f = JSON.stringify(o);
9
+ w(() => {
10
+ if (!i || typeof window > "u") return;
11
+ const d = JSON.parse(c), m = JSON.parse(f);
12
+ let t = null;
13
+ const a = (y) => {
14
+ var u;
15
+ const p = (u = y.detail) == null ? void 0 : u.collection;
16
+ !N(p, d) || t || (t = setTimeout(
17
+ () => {
18
+ t = null;
19
+ for (const h of m)
20
+ r.invalidateQueries({ queryKey: h, refetchType: "active" }, { cancelRefetch: !1 });
21
+ },
22
+ Math.floor(Math.random() * Math.max(0, s))
23
+ ));
24
+ };
25
+ return window.addEventListener(l, a), () => {
26
+ window.removeEventListener(l, a), t && clearTimeout(t);
27
+ };
28
+ }, [r, i, s, c, f]);
29
+ }
30
+ export {
31
+ l as CONFIG_UPDATE_WINDOW_EVENT,
32
+ N as configUpdateTouches,
33
+ J as useConfigUpdateRefresh
34
+ };
@@ -3,32 +3,32 @@ import { useLiveOps as b } from "./live-ops.js";
3
3
  function y(n, t) {
4
4
  return `cfg-${n}:${t}`;
5
5
  }
6
- const l = (n, t) => n != null && t != null && String(n).toLowerCase() === String(t).toLowerCase();
6
+ const d = (n, t) => n != null && t != null && String(n).toLowerCase() === String(t).toLowerCase();
7
7
  function S(n, t, o) {
8
8
  var i;
9
- const r = typeof t.part == "string" && t.part ? t.part : "several", e = t.by, a = e && e.id != null ? { id: String(e.id), name: typeof e.name == "string" ? e.name : "Someone" } : null;
9
+ const r = typeof t.part == "string" && t.part ? t.part : "several", e = t.by, s = e && e.id != null ? { id: String(e.id), name: typeof e.name == "string" ? e.name : "Someone" } : null;
10
10
  return n ? {
11
- by: l((i = n.by) == null ? void 0 : i.id, a == null ? void 0 : a.id) || !n.by && !a ? a : null,
11
+ by: d((i = n.by) == null ? void 0 : i.id, s == null ? void 0 : s.id) || !n.by && !s ? s : null,
12
12
  part: n.part === r ? r : "several",
13
13
  at: o,
14
14
  count: n.count + 1
15
- } : { by: a, part: r, at: o, count: 1 };
15
+ } : { by: s, part: r, at: o, count: 1 };
16
16
  }
17
17
  function $(n, t, o = {}) {
18
- const [r, e] = p(null), a = m(null), s = t != null && t !== "" ? y(n, t) : null, { meId: i, onChange: u } = o;
18
+ const [r, e] = p(null), s = m(null), c = t != null && t !== "" ? y(n, t) : null, { meId: i, onChange: u } = o;
19
19
  b(
20
- s,
21
- (c) => {
22
- if (c != null && c.by && l(c.by.id, i)) return;
23
- const g = S(a.current, c ?? {}, Date.now());
24
- a.current = g, e(g), u == null || u(g);
20
+ c,
21
+ (a) => {
22
+ if (a != null && a.reconnect || a != null && a.by && d(a.by.id, i)) return;
23
+ const g = S(s.current, a ?? {}, Date.now());
24
+ s.current = g, e(g), u == null || u(g);
25
25
  },
26
26
  { enabled: o.enabled !== !1, debounceMs: 250 }
27
27
  );
28
- const f = w(() => {
29
- a.current = null, e(null);
28
+ const l = w(() => {
29
+ s.current = null, e(null);
30
30
  }, []);
31
- return { change: r, clear: f };
31
+ return { change: r, clear: l };
32
32
  }
33
33
  const h = {
34
34
  state: "changed a state",
@@ -67,7 +67,7 @@ const C = /* @__PURE__ */ new Set([
67
67
  "sort",
68
68
  "updated_at"
69
69
  ]);
70
- function d(n) {
70
+ function f(n) {
71
71
  const t = {};
72
72
  for (const o of Object.keys(n).sort()) C.has(o) || (t[o] = n[o]);
73
73
  try {
@@ -77,10 +77,10 @@ function d(n) {
77
77
  }
78
78
  }
79
79
  function W(n, t) {
80
- const o = new Map((n ?? []).map((e) => [String(e.id), d(e)])), r = [];
80
+ const o = new Map((n ?? []).map((e) => [String(e.id), f(e)])), r = [];
81
81
  for (const e of t ?? []) {
82
- const a = String(e.id), s = o.get(a);
83
- s != null && s !== d(e) && r.push(a);
82
+ const s = String(e.id), c = o.get(s);
83
+ c != null && c !== f(e) && r.push(s);
84
84
  }
85
85
  return r;
86
86
  }
@@ -0,0 +1,49 @@
1
+ import { useRef as s, useEffect as l } from "react";
2
+ function a() {
3
+ return typeof document > "u" || document.visibilityState !== "hidden";
4
+ }
5
+ function d(o, r) {
6
+ const u = r.now ?? (() => Date.now()), c = r.isVisible ?? a;
7
+ let t = Number.NEGATIVE_INFINITY, n = null, e = !1;
8
+ const i = () => {
9
+ if (n = null, !c()) {
10
+ e = !0;
11
+ return;
12
+ }
13
+ e = !1, t = u(), o();
14
+ };
15
+ return {
16
+ poke() {
17
+ if (n) return;
18
+ const f = t + r.gapMs - u();
19
+ f <= 0 ? i() : n = setTimeout(i, f);
20
+ },
21
+ resume() {
22
+ !n && e && c() && i();
23
+ },
24
+ cancel() {
25
+ n && clearTimeout(n), n = null, e = !1;
26
+ }
27
+ };
28
+ }
29
+ function p(o, r, u = !0) {
30
+ const c = s(o);
31
+ c.current = o;
32
+ const t = s(null);
33
+ return l(() => {
34
+ if (!u) return;
35
+ const e = d(() => c.current(), { gapMs: r });
36
+ t.current = e;
37
+ const i = () => e.resume();
38
+ return typeof document < "u" && document.addEventListener("visibilitychange", i), () => {
39
+ typeof document < "u" && document.removeEventListener("visibilitychange", i), e.cancel(), t.current === e && (t.current = null);
40
+ };
41
+ }, [r, u]), s(() => {
42
+ var e;
43
+ return (e = t.current) == null ? void 0 : e.poke();
44
+ }).current;
45
+ }
46
+ export {
47
+ d as createGapRefresher,
48
+ p as useGapRefresh
49
+ };
@@ -1,14 +1,14 @@
1
- import { toneForOutcome as s } from "./obligation-filters.js";
1
+ import { toneForObligation as s } from "./obligation-filters.js";
2
2
  const r = { danger: 3, warning: 2, positive: 1, neutral: 0 };
3
- function u(c) {
4
- const e = /* @__PURE__ */ new Map();
5
- for (const o of c) {
3
+ function a(i) {
4
+ const n = /* @__PURE__ */ new Map();
5
+ for (const o of i) {
6
6
  if (o.outcome === "superseded") continue;
7
- const t = s(o.outcome), n = e.get(o.api);
8
- (!n || r[t] > r[n]) && e.set(o.api, t);
7
+ const t = s(o), e = n.get(o.api);
8
+ (!e || r[t] > r[e]) && n.set(o.api, t);
9
9
  }
10
- return [...e.entries()].map(([o, t]) => ({ api: o, tone: t }));
10
+ return [...n.entries()].map(([o, t]) => ({ api: o, tone: t }));
11
11
  }
12
12
  export {
13
- u as dotsForRecord
13
+ a as dotsForRecord
14
14
  };
@@ -1,41 +1,44 @@
1
1
  import { useRef as m, useEffect as l, useState as h } from "react";
2
2
  import { useLiveEvent as S } from "./live.js";
3
3
  import { useOptionalRealtime as b } from "./realtime.js";
4
- function O(t, c, n = {}) {
5
- const s = b(), u = n.enabled !== !1 && !!t, r = m(n.match);
6
- r.current = n.match, l(() => {
7
- if (!(!s || !u || !t))
8
- return s.emit("ops:join", { topic: t }), () => s.emit("ops:leave", { topic: t });
9
- }, [s, u, t]), S(
4
+ import { useResync as w } from "./reconnect-resync.js";
5
+ function j(t, u, n = {}) {
6
+ const c = b(), r = n.enabled !== !1 && !!t, s = m(n.match);
7
+ s.current = n.match;
8
+ const o = m(u);
9
+ o.current = u, l(() => {
10
+ if (!(!c || !r || !t))
11
+ return c.emit("ops:join", { topic: t }), () => c.emit("ops:leave", { topic: t });
12
+ }, [c, r, t]), S(
10
13
  "ops:changed",
11
14
  (e) => {
12
- c(e ?? {});
15
+ u(e ?? {});
13
16
  },
14
17
  {
15
- enabled: u,
18
+ enabled: r,
16
19
  debounceMs: n.debounceMs ?? 300,
17
20
  includeOwn: !0,
18
- match: (e) => (e == null ? void 0 : e.topic) === t && (!r.current || r.current(e ?? {}))
21
+ match: (e) => (e == null ? void 0 : e.topic) === t && (!s.current || s.current(e ?? {}))
19
22
  }
20
- );
23
+ ), w(() => o.current({ topic: t, reconnect: !0 }), { enabled: r });
21
24
  }
22
- function R(t, c = 4e3) {
23
- const n = m(null), [s, u] = h(() => /* @__PURE__ */ new Set()), r = (t ?? []).map(String).join("\0");
25
+ function y(t, u = 4e3) {
26
+ const n = m(null), [c, r] = h(() => /* @__PURE__ */ new Set()), s = (t ?? []).map(String).join("\0");
24
27
  return l(() => {
25
- const e = new Set(r ? r.split("\0") : []), i = n.current;
26
- if (n.current = e, !i || i.size === 0) return;
27
- const f = [...e].filter((o) => !i.has(o));
28
- f.length !== 0 && (u((o) => /* @__PURE__ */ new Set([...o, ...f])), setTimeout(
29
- () => u((o) => {
30
- const a = new Set(o);
31
- for (const d of f) a.delete(d);
28
+ const o = new Set(s ? s.split("\0") : []), e = n.current;
29
+ if (n.current = o, !e || e.size === 0) return;
30
+ const i = [...o].filter((f) => !e.has(f));
31
+ i.length !== 0 && (r((f) => /* @__PURE__ */ new Set([...f, ...i])), setTimeout(
32
+ () => r((f) => {
33
+ const a = new Set(f);
34
+ for (const d of i) a.delete(d);
32
35
  return a;
33
36
  }),
34
- c
37
+ u
35
38
  ));
36
- }, [r, c]), s;
39
+ }, [s, u]), c;
37
40
  }
38
41
  export {
39
- R as useFreshIds,
40
- O as useLiveOps
42
+ y as useFreshIds,
43
+ j as useLiveOps
41
44
  };
@@ -1,6 +1,6 @@
1
1
  import { liveQueryMeta as r } from "./live-queries.js";
2
2
  function i(e) {
3
- return e ? r({ reads: [e], staleOnly: !0 }) : void 0;
3
+ return e ? r({ reads: [e], staleOnly: !0, aspects: ["$picker"] }) : void 0;
4
4
  }
5
5
  export {
6
6
  i as pickerOptionsMeta