@declarion/react 0.51.0 → 0.53.0

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 (37) hide show
  1. package/dist-lib/{DraggableChildrenTable-CJCjc_cd.js → DraggableChildrenTable-BQZTvZaU.js} +35 -35
  2. package/dist-lib/{Grid-DUjbQg3r.js → Grid-B9Tiytbd.js} +28 -28
  3. package/dist-lib/{LayoutRenderer-DbdxC-Bq.js → LayoutRenderer-D_v9OD_A.js} +920 -922
  4. package/dist-lib/{ListCardsBody-C8ofksQb.js → ListCardsBody-dRnXsQ7A.js} +14 -14
  5. package/dist-lib/{MarkdownRenderer-B9_5fwuE.js → MarkdownRenderer-BCyrsLrd.js} +10 -10
  6. package/dist-lib/{record-documents-key-8fdm7C10.js → RecordIdBadge-CGxPR-8q.js} +1 -4
  7. package/dist-lib/{RefreshControl-C-8UCyau.js → RefreshControl-CV8nGACW.js} +120 -122
  8. package/dist-lib/{SmartDetailPage.impl-DWjNQ052.js → SmartDetailPage.impl-DWprVNMb.js} +376 -377
  9. package/dist-lib/{SmartListPage.impl-yKBK7a8b.js → SmartListPage.impl-BwWURGwa.js} +1098 -1099
  10. package/dist-lib/{SmartRecordListPage.impl-DRpU_DOC.js → SmartRecordListPage.impl-BKKBShAg.js} +183 -183
  11. package/dist-lib/{SortHeaderMenu-CbihbEGd.js → SortHeaderMenu-pgi4sxMs.js} +1 -1
  12. package/dist-lib/{action-dispatch-C28UhXXA.js → action-dispatch-DlHTYag7.js} +382 -382
  13. package/dist-lib/api/events.d.ts +27 -5
  14. package/dist-lib/{cardProjection-Bp_ZPLUE.js → cardProjection-C7Orz841.js} +146 -204
  15. package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -1
  16. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +2 -2
  17. package/dist-lib/components/pages/list/useListQuery.d.ts +6 -1
  18. package/dist-lib/components/shared/RefreshControl.d.ts +7 -1
  19. package/dist-lib/components/shared/useOwnRefresh.d.ts +9 -0
  20. package/dist-lib/{field-classification-CeYJlsNq.js → field-classification-EY8CFF3P.js} +301 -320
  21. package/dist-lib/{format-count-C3N-WxEy.js → format-count-BHkaDr9V.js} +245 -245
  22. package/dist-lib/hooks/useMutations.d.ts +1 -1
  23. package/dist-lib/hooks/useSSE.d.ts +24 -4
  24. package/dist-lib/index.js +1541 -1832
  25. package/dist-lib/lib/document-templates.d.ts +1 -1
  26. package/dist-lib/lib/realtime-reconcile.d.ts +43 -0
  27. package/dist-lib/{peekDraftStore-D3sowXga.js → peekDraftStore-1pIajluX.js} +36 -36
  28. package/dist-lib/{registry-p6CejATt.js → registry-C5ug25M8.js} +507 -507
  29. package/dist-lib/stores/realtime.d.ts +20 -0
  30. package/dist-lib/testing.js +35 -35
  31. package/dist-lib/{useCurrentScreen-74x5yJNb.js → useCurrentScreen-BdnZq8vZ.js} +2504 -1557
  32. package/dist-lib/{useListQuery-D75bgLLz.js → useListQuery-BxgrPZIB.js} +13 -10
  33. package/dist-lib/{useProperties-C5fZp12D.js → useProperties-Bhi9Wn5O.js} +25 -25
  34. package/dist-lib/useTabSearchMirror-Dl5x0xKu.js +177 -0
  35. package/dist-lib/{value-DKekzcjz.js → value-Rp-5W3o8.js} +25 -25
  36. package/package.json +7 -7
  37. package/dist-lib/useTabSearchMirror-D_wzoYRz.js +0 -406
@@ -1,20 +1,20 @@
1
- import { Dn as e, Tn as t, ur as n, zn as r } from "./useCurrentScreen-74x5yJNb.js";
1
+ import { Pr as e, Yn as t, Zn as n, lr as r } from "./useCurrentScreen-BdnZq8vZ.js";
2
2
  import { t as i } from "./Check-DAfMbQIw.js";
3
- import { f as a, m as o, p as s, r as c } from "./action-dispatch-C28UhXXA.js";
4
- import { t as l } from "./cardProjection-Bp_ZPLUE.js";
5
- import { t as u } from "./SmartListPage.impl-yKBK7a8b.js";
3
+ import { f as a, m as o, p as s, r as c } from "./action-dispatch-DlHTYag7.js";
4
+ import { t as l } from "./cardProjection-C7Orz841.js";
5
+ import { t as u } from "./SmartListPage.impl-BwWURGwa.js";
6
6
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
7
  //#region src/components/pages/list/ListCardRow.tsx
8
- function p(t, n, r) {
9
- if (t.startsWith("$status.")) {
10
- let r = t.slice(8), i = n.status_groups?.[r];
11
- return i ? e(i.name) || r : t;
8
+ function p(e, t, r) {
9
+ if (e.startsWith("$status.")) {
10
+ let r = e.slice(8), i = t.status_groups?.[r];
11
+ return i ? n(i.name) || r : e;
12
12
  }
13
- if (t.startsWith("$property.")) {
14
- let r = t.slice(10), i = n.properties?.[r];
15
- return i ? e(i.name) || r : t;
13
+ if (e.startsWith("$property.")) {
14
+ let r = e.slice(10), i = t.properties?.[r];
15
+ return i ? n(i.name) || r : e;
16
16
  }
17
- return o(n, t, r);
17
+ return o(t, e, r);
18
18
  }
19
19
  function m(e, t, n) {
20
20
  if (e.startsWith("$status.")) {
@@ -37,10 +37,10 @@ function h(t, i, a) {
37
37
  children: "-"
38
38
  });
39
39
  let l = a.statuses.find((e) => e.code === c.status_code);
40
- return /* @__PURE__ */ d(n, {
40
+ return /* @__PURE__ */ d(e, {
41
41
  tone: l?.color ?? "slate",
42
42
  size: "xs",
43
- children: e(l?.name) || c.status_code
43
+ children: n(l?.name) || c.status_code
44
44
  });
45
45
  }
46
46
  if (t.startsWith("$property.")) {
@@ -1,4 +1,4 @@
1
- import { H as e, et as t } from "./useCurrentScreen-74x5yJNb.js";
1
+ import { Et as e, mt as t } from "./useCurrentScreen-BdnZq8vZ.js";
2
2
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
3
3
  import i, { defaultUrlTransform as a } from "react-markdown";
4
4
  import o from "remark-breaks";
@@ -11,26 +11,26 @@ function d(e) {
11
11
  function f(e) {
12
12
  return e.startsWith("/") || e.startsWith("https://") || e.startsWith("http://") ? e : null;
13
13
  }
14
- function p({ href: e, children: r }) {
15
- return t(e) ? /* @__PURE__ */ n("a", {
16
- href: e,
14
+ function p({ href: t, children: r }) {
15
+ return e(t) ? /* @__PURE__ */ n("a", {
16
+ href: t,
17
17
  target: "_blank",
18
18
  rel: "noopener noreferrer",
19
19
  children: r
20
20
  }) : /* @__PURE__ */ n("a", {
21
- href: e,
21
+ href: t,
22
22
  children: r
23
23
  });
24
24
  }
25
- function m(t) {
25
+ function m(e) {
26
26
  return {
27
27
  img({ src: i, alt: a }) {
28
- let o = e(i);
28
+ let o = t(i);
29
29
  if (!o) return /* @__PURE__ */ n("img", {
30
30
  src: i,
31
31
  alt: a ?? ""
32
32
  });
33
- let s = t[o], c = s?.presigned_url ?? s?.url, l = c ? f(c) : null;
33
+ let s = e[o], c = s?.presigned_url ?? s?.url, l = c ? f(c) : null;
34
34
  return l ? /* @__PURE__ */ n("img", {
35
35
  src: l,
36
36
  alt: a ?? s.filename ?? ""
@@ -43,12 +43,12 @@ function m(t) {
43
43
  });
44
44
  },
45
45
  a({ href: i, children: a }) {
46
- let o = e(i);
46
+ let o = t(i);
47
47
  if (!o) return /* @__PURE__ */ n(p, {
48
48
  href: i,
49
49
  children: a
50
50
  });
51
- let s = t[o], c = s?.presigned_url ?? s?.url, l = c ? f(c) : null;
51
+ let s = e[o], c = s?.presigned_url ?? s?.url, l = c ? f(c) : null;
52
52
  return l ? /* @__PURE__ */ n("a", {
53
53
  href: l,
54
54
  target: "_blank",
@@ -21,7 +21,4 @@ function s({ value: s }) {
21
21
  });
22
22
  }
23
23
  //#endregion
24
- //#region src/lib/record-documents-key.ts
25
- var c = "record-documents";
26
- //#endregion
27
- export { s as n, c as t };
24
+ export { s as t };
@@ -1,12 +1,12 @@
1
1
  import { s as e } from "./DynamicIcon-DW5krHuX.js";
2
- import { $n as t, dr as n, ir as r, pt as i, rr as a, ur as o } from "./useCurrentScreen-74x5yJNb.js";
3
- import { A as s, B as c, C as l } from "./field-classification-CeYJlsNq.js";
4
- import { useCallback as u, useEffect as d, useId as f, useMemo as p, useRef as m, useState as h } from "react";
5
- import { useLocation as g } from "react-router";
6
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
7
- import { createPortal as b } from "react-dom";
2
+ import { Cr as t, Dr as n, Fr as r, Ht as i, Or as a, Pr as o } from "./useCurrentScreen-BdnZq8vZ.js";
3
+ import { D as s, L as c, b as l, c as u } from "./field-classification-EY8CFF3P.js";
4
+ import { useCallback as d, useEffect as f, useId as p, useMemo as m, useRef as h, useState as g } from "react";
5
+ import { useLocation as _ } from "react-router";
6
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
7
+ import { createPortal as x } from "react-dom";
8
8
  //#region src/components/primitives/Avatar.tsx
9
- function x({ name: e, size: t = 22, color: n }) {
9
+ function S({ name: e, size: t = 22, color: n }) {
10
10
  let r = e.split(/\s+/).map((e) => e[0]).slice(0, 2).join("").toUpperCase(), i = e.split("").reduce((e, t) => e + t.charCodeAt(0), 0), a = [
11
11
  "#DCE4F6",
12
12
  "#E4DCF6",
@@ -17,7 +17,7 @@ function x({ name: e, size: t = 22, color: n }) {
17
17
  "#F1F6DC",
18
18
  "#F6DCF1"
19
19
  ], o = n || a[i % a.length];
20
- return /* @__PURE__ */ v("span", {
20
+ return /* @__PURE__ */ y("span", {
21
21
  style: {
22
22
  display: "inline-flex",
23
23
  alignItems: "center",
@@ -36,36 +36,36 @@ function x({ name: e, size: t = 22, color: n }) {
36
36
  }
37
37
  //#endregion
38
38
  //#region src/components/primitives/Tooltip.tsx
39
- var ee = 350, S = 80, C = 260, w = 6, T = 4;
40
- function E(e, t) {
41
- let [n, r] = h(!1), [i, a] = h(null), o = m(null), s = m(null), c = m(null), l = f(), p = u(() => {
39
+ var ee = 350, C = 80, w = 260, T = 6, E = 4;
40
+ function D(e, t) {
41
+ let [n, r] = g(!1), [i, a] = g(null), o = h(null), s = h(null), c = h(null), l = p(), u = d(() => {
42
42
  s.current && clearTimeout(s.current), c.current && clearTimeout(c.current), s.current = null, c.current = null;
43
- }, []), g = u(() => {
43
+ }, []), m = d(() => {
44
44
  let t = e.current;
45
45
  if (!t) return;
46
- let n = t.getBoundingClientRect(), r = o.current, i = r?.offsetWidth ?? C, s = r?.offsetHeight ?? 0, c = n.left + n.width / 2 - i / 2;
47
- c = Math.max(T, Math.min(c, window.innerWidth - i - T));
48
- let l = n.top - w - s < T ? n.bottom + w : n.top - w - s;
46
+ let n = t.getBoundingClientRect(), r = o.current, i = r?.offsetWidth ?? w, s = r?.offsetHeight ?? 0, c = n.left + n.width / 2 - i / 2;
47
+ c = Math.max(E, Math.min(c, window.innerWidth - i - E));
48
+ let l = n.top - T - s < E ? n.bottom + T : n.top - T - s;
49
49
  a({
50
50
  left: c,
51
51
  top: l
52
52
  });
53
- }, [e]), _ = u((e) => {
54
- t && (p(), e ? r(!0) : s.current = setTimeout(() => r(!0), ee));
55
- }, [p, t]), y = u(() => {
56
- p(), c.current = setTimeout(() => r(!1), S);
57
- }, [p]);
58
- d(() => {
53
+ }, [e]), _ = d((e) => {
54
+ t && (u(), e ? r(!0) : s.current = setTimeout(() => r(!0), ee));
55
+ }, [u, t]), v = d(() => {
56
+ u(), c.current = setTimeout(() => r(!1), C);
57
+ }, [u]);
58
+ f(() => {
59
59
  if (!n) {
60
60
  a(null);
61
61
  return;
62
62
  }
63
- g();
64
- let e = () => g();
63
+ m();
64
+ let e = () => m();
65
65
  return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
66
66
  window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
67
67
  };
68
- }, [n, g]), d(() => p, [p]), d(() => {
68
+ }, [n, m]), f(() => u, [u]), f(() => {
69
69
  if (!n) return;
70
70
  let t = (t) => {
71
71
  let n = e.current;
@@ -73,12 +73,12 @@ function E(e, t) {
73
73
  };
74
74
  return document.addEventListener("pointerdown", t, !0), () => document.removeEventListener("pointerdown", t, !0);
75
75
  }, [n, e]);
76
- let x = {
76
+ let b = {
77
77
  position: "fixed",
78
78
  left: i?.left ?? 0,
79
79
  top: i?.top ?? 0,
80
80
  zIndex: 1e3,
81
- maxWidth: C,
81
+ maxWidth: w,
82
82
  padding: "5px 8px",
83
83
  borderRadius: 6,
84
84
  background: "var(--surface-inverse, #1f2430)",
@@ -89,31 +89,31 @@ function E(e, t) {
89
89
  pointerEvents: "none",
90
90
  visibility: i ? "visible" : "hidden",
91
91
  whiteSpace: "normal"
92
- }, E = n && t ? b(/* @__PURE__ */ v("div", {
92
+ }, S = n && t ? x(/* @__PURE__ */ y("div", {
93
93
  ref: o,
94
94
  id: l,
95
95
  role: "tooltip",
96
- style: x,
96
+ style: b,
97
97
  children: t
98
98
  }), document.body) : null;
99
99
  return {
100
100
  open: n,
101
101
  triggerHandlers: {
102
102
  onMouseEnter: () => _(!1),
103
- onMouseLeave: y,
103
+ onMouseLeave: v,
104
104
  onFocus: () => _(!0),
105
- onBlur: y,
105
+ onBlur: v,
106
106
  onPointerUp: (e) => {
107
- e.pointerType === "mouse" || !t || (p(), r((e) => !e));
107
+ e.pointerType === "mouse" || !t || (u(), r((e) => !e));
108
108
  }
109
109
  },
110
110
  describedBy: n && t ? l : void 0,
111
- portal: E
111
+ portal: S
112
112
  };
113
113
  }
114
- function D({ content: e, children: t, triggerProps: n }) {
115
- let r = m(null), { triggerHandlers: i, describedBy: a, portal: o } = E(r, e);
116
- return e ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("span", {
114
+ function O({ content: e, children: t, triggerProps: n }) {
115
+ let r = h(null), { triggerHandlers: i, describedBy: a, portal: o } = D(r, e);
116
+ return e ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("span", {
117
117
  ...n,
118
118
  ref: r,
119
119
  "aria-describedby": a,
@@ -124,12 +124,12 @@ function D({ content: e, children: t, triggerProps: n }) {
124
124
  },
125
125
  ...i,
126
126
  children: t
127
- }), o] }) : /* @__PURE__ */ v(_, { children: t });
127
+ }), o] }) : /* @__PURE__ */ y(v, { children: t });
128
128
  }
129
- function O({ label: t, size: n = 14, ...r }) {
130
- return /* @__PURE__ */ v(D, {
129
+ function k({ label: t, size: n = 14, ...r }) {
130
+ return /* @__PURE__ */ y(O, {
131
131
  content: t,
132
- children: /* @__PURE__ */ v("span", {
132
+ children: /* @__PURE__ */ y("span", {
133
133
  tabIndex: 0,
134
134
  role: "note",
135
135
  "aria-label": t,
@@ -140,61 +140,61 @@ function O({ label: t, size: n = 14, ...r }) {
140
140
  color: "var(--text-3)",
141
141
  cursor: "help"
142
142
  },
143
- children: /* @__PURE__ */ v(e.info, { size: n })
143
+ children: /* @__PURE__ */ y(e.info, { size: n })
144
144
  })
145
145
  });
146
146
  }
147
147
  //#endregion
148
148
  //#region src/lib/branding.ts
149
- var k = "branding";
150
- function A(e, t) {
149
+ var A = "branding";
150
+ function j(e, t) {
151
151
  return e?.parameters.find((e) => e.code === t)?.value;
152
152
  }
153
- function j(e) {
154
- return M(A(e, k));
155
- }
156
153
  function M(e) {
157
- if (P(e)) return e;
154
+ return N(j(e, A));
158
155
  }
159
156
  function N(e) {
160
- let t = j(e)?.identity;
161
- return P(t) ? t : void 0;
157
+ if (F(e)) return e;
162
158
  }
163
159
  function P(e) {
164
- return !!e && typeof e == "object" && !Array.isArray(e);
160
+ let t = M(e)?.identity;
161
+ return F(t) ? t : void 0;
165
162
  }
166
163
  function F(e) {
164
+ return !!e && typeof e == "object" && !Array.isArray(e);
165
+ }
166
+ function I(e) {
167
167
  if (!e) return !1;
168
168
  let t = e.trim();
169
169
  return t ? t.startsWith("/") || t.startsWith("http://") || t.startsWith("https://") || t.startsWith("data:image/") : !1;
170
170
  }
171
171
  //#endregion
172
172
  //#region src/hooks/useBranding.ts
173
- function I() {
174
- let e = c(k);
173
+ function L() {
174
+ let e = c(A);
175
175
  return {
176
- branding: M(e.value),
176
+ branding: N(e.value),
177
177
  isLoading: e.loading
178
178
  };
179
179
  }
180
- function L() {
181
- return I().branding?.identity;
182
- }
183
180
  function R() {
184
- return I().branding?.chrome;
181
+ return L().branding?.identity;
182
+ }
183
+ function z() {
184
+ return L().branding?.chrome;
185
185
  }
186
186
  //#endregion
187
187
  //#region src/hooks/useBrandingChrome.ts
188
- function z() {
189
- let e = i(), t = R();
188
+ function B() {
189
+ let e = i(), t = z();
190
190
  return (e.enabled ? t?.embed?.viewport : t?.full?.viewport) ?? "auto";
191
191
  }
192
- function B(e, t) {
192
+ function V(e, t) {
193
193
  return typeof e == "number" && Number.isFinite(e) && e > 0 ? e : t;
194
194
  }
195
- function V() {
196
- let e = i(), t = R(), n = e.enabled ? t?.embed?.breakpoints : t?.full?.breakpoints, r = n?.phone_max, a = n?.tablet_max, o = n?.landscape_phone_max_height;
197
- return p(() => H({
195
+ function H() {
196
+ let e = i(), t = z(), n = e.enabled ? t?.embed?.breakpoints : t?.full?.breakpoints, r = n?.phone_max, a = n?.tablet_max, o = n?.landscape_phone_max_height;
197
+ return m(() => U({
198
198
  phone_max: r,
199
199
  tablet_max: a,
200
200
  landscape_phone_max_height: o
@@ -204,17 +204,17 @@ function V() {
204
204
  o
205
205
  ]);
206
206
  }
207
- function H(e) {
208
- let t = B(e?.phone_max, r.phoneMax), n = B(e?.tablet_max, r.tabletMax), i = t < n;
209
- return i || console.error(`branding.chrome breakpoints: phone_max (${t}) must be below tablet_max (${n}), or no viewport can ever resolve to the tablet class. Both bounds fall back to the SDK defaults.`), {
210
- phoneMax: i ? t : r.phoneMax,
211
- tabletMax: i ? n : r.tabletMax,
212
- landscapePhoneMaxHeight: B(e?.landscape_phone_max_height, r.landscapePhoneMaxHeight)
207
+ function U(e) {
208
+ let t = V(e?.phone_max, a.phoneMax), n = V(e?.tablet_max, a.tabletMax), r = t < n;
209
+ return r || console.error(`branding.chrome breakpoints: phone_max (${t}) must be below tablet_max (${n}), or no viewport can ever resolve to the tablet class. Both bounds fall back to the SDK defaults.`), {
210
+ phoneMax: r ? t : a.phoneMax,
211
+ tabletMax: r ? n : a.tabletMax,
212
+ landscapePhoneMaxHeight: V(e?.landscape_phone_max_height, a.landscapePhoneMaxHeight)
213
213
  };
214
214
  }
215
- function U(e) {
216
- let t = i(), n = R();
217
- return p(() => {
215
+ function W(e) {
216
+ let t = i(), n = z();
217
+ return m(() => {
218
218
  let r = { ...t.enabled ? n?.embed?.surfaces?.[e] : n?.full?.surfaces?.[e] };
219
219
  return {
220
220
  ...r,
@@ -226,9 +226,9 @@ function U(e) {
226
226
  e
227
227
  ]);
228
228
  }
229
- function W() {
230
- let e = R();
231
- return p(() => {
229
+ function G() {
230
+ let e = z();
231
+ return m(() => {
232
232
  let t = { ...e?.full?.shell };
233
233
  return {
234
234
  ...t,
@@ -238,11 +238,11 @@ function W() {
238
238
  }
239
239
  //#endregion
240
240
  //#region src/lib/scroll-restoration.ts
241
- var G = "scroll", K = 120, q = 24, J = 600;
242
- function Y(e, t) {
241
+ var K = "scroll", q = 120, J = 24, Y = 600;
242
+ function X(e, t) {
243
243
  return Number.isFinite(e) ? Math.max(0, Math.min(e, Number.isFinite(t) && t > 0 ? t : 0)) : 0;
244
244
  }
245
- function X(e, t, n) {
245
+ function Z(e, t, n) {
246
246
  let r = Number.isFinite(e) ? e : 0;
247
247
  if (t) {
248
248
  let e = n[t.index];
@@ -258,33 +258,33 @@ function X(e, t, n) {
258
258
  offset: r
259
259
  };
260
260
  }
261
- function Z(e, t, n, r) {
261
+ function Q(e, t, n, r) {
262
262
  if (!e) return null;
263
263
  if (e.key) {
264
264
  let i = t.indexOf(e.key);
265
265
  if (i >= 0) {
266
266
  let t = n(i);
267
- if (t !== void 0) return Y(t + e.delta, r);
267
+ if (t !== void 0) return X(t + e.delta, r);
268
268
  }
269
269
  }
270
- return Y(e.offset, r);
270
+ return X(e.offset, r);
271
271
  }
272
- function Q(e = G) {
273
- let t = g(), n = m(null);
272
+ function te(e = K) {
273
+ let t = _(), n = h(null);
274
274
  if (n.current === null) {
275
275
  let r = l(t), i = s.getState().read(r, e);
276
276
  n.current = i && Number.isFinite(i.offset) ? Math.max(0, i.offset) : 0;
277
277
  }
278
278
  return n.current;
279
279
  }
280
- function te(e) {
280
+ function ne(e) {
281
281
  let t = 0, n = null, r = () => {
282
282
  n = null, t = Date.now(), e();
283
283
  };
284
284
  return {
285
285
  trigger() {
286
286
  let e = Date.now() - t;
287
- e >= K ? r() : n === null && (n = setTimeout(r, K - e));
287
+ e >= q ? r() : n === null && (n = setTimeout(r, q - e));
288
288
  },
289
289
  flush() {
290
290
  n !== null && (clearTimeout(n), n = null), e();
@@ -294,15 +294,15 @@ function te(e) {
294
294
  }
295
295
  };
296
296
  }
297
- function ne(e) {
298
- let { virtualizer: t, scrollElementRef: n, rowKeys: r } = e, i = e.stateKey ?? "scroll", a = e.enabled ?? !0, o = g(), c = l(o), u = m(t);
297
+ function re(e) {
298
+ let { virtualizer: t, scrollElementRef: n, rowKeys: r } = e, i = e.stateKey ?? "scroll", a = e.enabled ?? !0, o = _(), c = l(o), u = h(t);
299
299
  u.current = t;
300
- let f = m(r);
301
- f.current = r;
302
- let p = m(null);
303
- d(() => {
300
+ let d = h(r);
301
+ d.current = r;
302
+ let p = h(null);
303
+ f(() => {
304
304
  p.current !== c && (p.current = null);
305
- }, [c]), d(() => {
305
+ }, [c]), f(() => {
306
306
  if (!a) return;
307
307
  let e = u.current;
308
308
  if (!e || r.length === 0) return;
@@ -314,14 +314,14 @@ function ne(e) {
314
314
  });
315
315
  return;
316
316
  }
317
- let o = 0, l = 0, d = NaN, m = () => {
317
+ let o = 0, l = 0, f = NaN, m = () => {
318
318
  let e = u.current;
319
319
  if (!e) return;
320
- let n = Z(t, f.current, (t) => e.getOffsetForIndex(t, "start")?.[0], e.getTotalSize());
321
- n !== null && (Number.isNaN(d) || Math.abs(n - d) > 1) && (e.scrollToOffset(n, {
320
+ let n = Q(t, d.current, (t) => e.getOffsetForIndex(t, "start")?.[0], e.getTotalSize());
321
+ n !== null && (Number.isNaN(f) || Math.abs(n - f) > 1) && (e.scrollToOffset(n, {
322
322
  align: "start",
323
323
  behavior: "auto"
324
- }), d = n, l++ < q && (o = requestAnimationFrame(m)));
324
+ }), f = n, l++ < J && (o = requestAnimationFrame(m)));
325
325
  };
326
326
  return m(), () => {
327
327
  o && cancelAnimationFrame(o);
@@ -335,14 +335,14 @@ function ne(e) {
335
335
  let t = u.current;
336
336
  if (!t) return null;
337
337
  let n = e.scrollTop, r = n > 0 ? n : t.scrollOffset ?? 0;
338
- return X(r, t.getVirtualItemForOffset(r), f.current);
338
+ return Z(r, t.getVirtualItemForOffset(r), d.current);
339
339
  });
340
340
  }
341
341
  function $(e, t, n, r, i) {
342
- let a = m(i);
343
- a.current = i, d(() => {
342
+ let a = h(i);
343
+ a.current = i, f(() => {
344
344
  if (!t) return;
345
- let i = 0, o = J, c = null, l = null, u = (e) => {
345
+ let i = 0, o = Y, c = null, l = null, u = (e) => {
346
346
  let t = a.current(e);
347
347
  t && s.getState().set(n, r, t);
348
348
  }, d = () => l?.trigger(), f = () => {
@@ -351,7 +351,7 @@ function $(e, t, n, r, i) {
351
351
  o-- > 0 && (i = requestAnimationFrame(f));
352
352
  return;
353
353
  }
354
- c = t, l = te(() => u(t)), t.addEventListener("scroll", d, { passive: !0 });
354
+ c = t, l = ne(() => u(t)), t.addEventListener("scroll", d, { passive: !0 });
355
355
  };
356
356
  return f(), () => {
357
357
  i && cancelAnimationFrame(i), c && c.removeEventListener("scroll", d), l?.flush();
@@ -363,11 +363,11 @@ function $(e, t, n, r, i) {
363
363
  r
364
364
  ]);
365
365
  }
366
- function re(e) {
367
- let { scrollElementRef: t } = e, n = e.stateKey ?? "scroll", r = e.enabled ?? !0, i = g(), a = l(i), o = m(null);
368
- d(() => {
366
+ function ie(e) {
367
+ let { scrollElementRef: t } = e, n = e.stateKey ?? "scroll", r = e.enabled ?? !0, i = _(), a = l(i), o = h(null);
368
+ f(() => {
369
369
  if (!r || o.current === a) return;
370
- let e = 0, i = J, c = () => {
370
+ let e = 0, i = Y, c = () => {
371
371
  let r = t.current;
372
372
  if (!r) {
373
373
  i-- > 0 && (e = requestAnimationFrame(c));
@@ -393,38 +393,36 @@ function re(e) {
393
393
  }
394
394
  //#endregion
395
395
  //#region src/components/shared/RefreshControl.tsx
396
- function ie({ liveObject: r, realtime: i = !0 }) {
397
- let { isPhone: s } = a(), c = r.isLive ? s ? void 0 : "Live" : "Updates paused";
398
- return /* @__PURE__ */ y("span", {
396
+ function ae({ liveObject: i, realtime: a = !0 }) {
397
+ let { isPhone: s } = n(), { refreshing: c, refresh: l } = u(i.refetch), d = i.isLive ? s ? void 0 : "Live" : "Updates paused";
398
+ return /* @__PURE__ */ b("span", {
399
399
  style: {
400
400
  display: "inline-flex",
401
401
  alignItems: "center",
402
402
  gap: 8
403
403
  },
404
- children: [/* @__PURE__ */ v(n, {
405
- icon: r.isFetching ? /* @__PURE__ */ v("span", {
404
+ children: [/* @__PURE__ */ y(r, {
405
+ icon: c ? /* @__PURE__ */ y("span", {
406
406
  "data-testid": "refresh-spinner",
407
407
  style: { display: "inline-flex" },
408
- children: /* @__PURE__ */ v(t, { size: 14 })
409
- }) : /* @__PURE__ */ v(e.refresh, { size: 14 }),
408
+ children: /* @__PURE__ */ y(t, { size: 14 })
409
+ }) : /* @__PURE__ */ y(e.refresh, { size: 14 }),
410
410
  title: "Refresh",
411
- disabled: r.isLoading || r.isFetching,
412
- onClick: () => {
413
- r.refetch();
414
- }
415
- }), i && /* @__PURE__ */ v("span", {
411
+ disabled: i.isLoading || c,
412
+ onClick: l
413
+ }), a && /* @__PURE__ */ y("span", {
416
414
  "data-testid": "live-indicator",
417
415
  role: "status",
418
- "aria-label": r.isLive ? "Live" : "Updates paused",
419
- title: r.isLive ? "This view updates automatically in realtime." : "Realtime updates are paused. Refresh manually to load the latest data.",
420
- children: /* @__PURE__ */ v(o, {
421
- tone: r.isLive ? "emerald" : "amber",
416
+ "aria-label": i.isLive ? "Live" : "Updates paused",
417
+ title: i.isLive ? "This view updates automatically in realtime." : "Realtime updates are paused. Refresh manually to load the latest data.",
418
+ children: /* @__PURE__ */ y(o, {
419
+ tone: i.isLive ? "emerald" : "amber",
422
420
  size: "xs",
423
421
  dot: !0,
424
- children: c
422
+ children: d
425
423
  })
426
424
  })]
427
425
  });
428
426
  }
429
427
  //#endregion
430
- export { x as _, ne as a, W as c, L as d, N as f, E as g, D as h, Q as i, z as l, O as m, G as n, V as o, F as p, re as r, U as s, ie as t, I as u };
428
+ export { S as _, re as a, G as c, R as d, P as f, D as g, O as h, te as i, B as l, k as m, K as n, H as o, I as p, ie as r, W as s, ae as t, L as u };