@aiquants/virtualscroll 3.8.0 → 3.8.2
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/CHANGELOG.md +75 -0
- package/README.md +61 -6
- package/dist/VirtualScroll.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1496 -1489
- package/dist/styles/virtualscroll.css +1 -1
- package/dist/styles/virtualscroll.standalone.css +1 -1
- package/package.json +1 -1
- package/src/VirtualScroll.tsx +176 -76
- package/src/styles/virtualscroll.css +22 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { twMerge as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as j, jsxs as Bt, Fragment as jr } from "react/jsx-runtime";
|
|
2
|
+
import Hn, { memo as $n, forwardRef as Ar, useState as Ce, useRef as f, useCallback as x, useImperativeHandle as Dr, useMemo as ve, useLayoutEffect as Qe, useEffect as $, useId as Xn, useSyncExternalStore as qn, createElement as _r } from "react";
|
|
3
|
+
import { twMerge as Ct } from "tailwind-merge";
|
|
4
|
+
const yn = ["en", "ja"], qr = ["scrollUp", "scrollDown", "scrollLeft", "scrollRight", "scrollToTop", "scrollToBottom", "noItems"], Yn = Object.freeze({
|
|
5
5
|
en: Object.freeze({
|
|
6
6
|
scrollUp: "Scroll up",
|
|
7
7
|
scrollDown: "Scroll down",
|
|
@@ -20,38 +20,38 @@ const Tn = ["en", "ja"], Wr = ["scrollUp", "scrollDown", "scrollLeft", "scrollRi
|
|
|
20
20
|
scrollToBottom: "末尾へ",
|
|
21
21
|
noItems: "項目がありません"
|
|
22
22
|
})
|
|
23
|
-
}),
|
|
23
|
+
}), Bn = (t) => yn.includes(t), Yr = (t) => typeof t == "string" ? JSON.stringify(t) : t === null ? "null" : typeof t, Wn = (t) => {
|
|
24
24
|
if (t === void 0)
|
|
25
25
|
return "en";
|
|
26
|
-
if (
|
|
26
|
+
if (Bn(t))
|
|
27
27
|
return t;
|
|
28
|
-
const e =
|
|
29
|
-
throw new RangeError(`[virtualscroll] locale must be one of ${e}; got ${
|
|
30
|
-
},
|
|
31
|
-
const r =
|
|
28
|
+
const e = yn.map((r) => JSON.stringify(r)).join(", ");
|
|
29
|
+
throw new RangeError(`[virtualscroll] locale must be one of ${e}; got ${Yr(t)}`);
|
|
30
|
+
}, Un = (t) => qr.includes(t), In = (t, e) => {
|
|
31
|
+
const r = Yn[Wn(t)];
|
|
32
32
|
if (e === void 0)
|
|
33
33
|
return r;
|
|
34
34
|
if (e === null || typeof e != "object")
|
|
35
|
-
throw new RangeError(`[virtualscroll] labels must be an object; got ${
|
|
35
|
+
throw new RangeError(`[virtualscroll] labels must be an object; got ${Yr(e)}`);
|
|
36
36
|
const n = Object.getPrototypeOf(e);
|
|
37
37
|
if (n !== Object.prototype && n !== null)
|
|
38
38
|
throw new RangeError(`[virtualscroll] labels must be a plain object (prototype Object.prototype or null); got ${Array.isArray(e) ? "an array" : "an object with a non-plain prototype"}`);
|
|
39
39
|
const i = new Set(Object.keys(e));
|
|
40
40
|
for (const o of i)
|
|
41
|
-
if (!
|
|
42
|
-
throw new RangeError(`[virtualscroll] labels.${o} is not a known label key; expected one of ${
|
|
41
|
+
if (!Un(o))
|
|
42
|
+
throw new RangeError(`[virtualscroll] labels.${o} is not a known label key; expected one of ${qr.join(", ")}`);
|
|
43
43
|
const s = { ...r };
|
|
44
|
-
for (const o of
|
|
44
|
+
for (const o of qr) {
|
|
45
45
|
const l = i.has(o) ? e[o] : void 0;
|
|
46
46
|
if (l !== void 0) {
|
|
47
47
|
if (typeof l != "string" || l.trim() === "")
|
|
48
|
-
throw new RangeError(`[virtualscroll] labels.${o} must be a non-blank string; got ${
|
|
48
|
+
throw new RangeError(`[virtualscroll] labels.${o} must be a non-blank string; got ${Yr(l)}`);
|
|
49
49
|
s[o] = l;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
return Object.freeze(s);
|
|
53
53
|
};
|
|
54
|
-
class
|
|
54
|
+
class C {
|
|
55
55
|
level;
|
|
56
56
|
prefix;
|
|
57
57
|
impl;
|
|
@@ -64,7 +64,7 @@ class A {
|
|
|
64
64
|
constructor(e = 2, r = "[virtualscroll]", n = console) {
|
|
65
65
|
this.level = e, this.prefix = r, this.impl = n;
|
|
66
66
|
}
|
|
67
|
-
static instance = new
|
|
67
|
+
static instance = new C(2, "[virtualscroll]");
|
|
68
68
|
/**
|
|
69
69
|
* @method setLevel
|
|
70
70
|
* @description Updates the current log level for the static instance.
|
|
@@ -72,7 +72,7 @@ class A {
|
|
|
72
72
|
* @param {LogLevel} level - The new log level.
|
|
73
73
|
*/
|
|
74
74
|
static setLevel(e) {
|
|
75
|
-
|
|
75
|
+
C.instance.setLevel(e);
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* @method setLevel
|
|
@@ -90,7 +90,7 @@ class A {
|
|
|
90
90
|
* @param {ILogger} impl - The new logger implementation.
|
|
91
91
|
*/
|
|
92
92
|
static setImplementation(e) {
|
|
93
|
-
|
|
93
|
+
C.instance.setImplementation(e);
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* @method setImplementation
|
|
@@ -108,7 +108,7 @@ class A {
|
|
|
108
108
|
* @param {string} prefix - The new prefix.
|
|
109
109
|
*/
|
|
110
110
|
static setPrefix(e) {
|
|
111
|
-
|
|
111
|
+
C.instance.setPrefix(e);
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
114
|
* @method setPrefix
|
|
@@ -127,7 +127,7 @@ class A {
|
|
|
127
127
|
* @returns {boolean} True if a message at `level` would be emitted. / `level` のメッセージが出力されるなら true。
|
|
128
128
|
*/
|
|
129
129
|
static isEnabled(e) {
|
|
130
|
-
return
|
|
130
|
+
return C.instance.isEnabled(e);
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
133
|
* @method isEnabled
|
|
@@ -172,51 +172,51 @@ class A {
|
|
|
172
172
|
return typeof e == "string" ? [`${this.prefix} ${e}`] : [this.prefix, e];
|
|
173
173
|
}
|
|
174
174
|
static debug(e, ...r) {
|
|
175
|
-
|
|
175
|
+
C.instance.debug(e, ...r);
|
|
176
176
|
}
|
|
177
177
|
debug(e, ...r) {
|
|
178
|
-
this.level <= 0 && this.impl.debug(...this.formatMessage(
|
|
178
|
+
this.level <= 0 && this.impl.debug(...this.formatMessage(C.resolveLazy(e)), ...r.map(C.resolveLazy));
|
|
179
179
|
}
|
|
180
180
|
static info(e, ...r) {
|
|
181
|
-
|
|
181
|
+
C.instance.info(e, ...r);
|
|
182
182
|
}
|
|
183
183
|
info(e, ...r) {
|
|
184
|
-
this.level <= 1 && this.impl.info(...this.formatMessage(
|
|
184
|
+
this.level <= 1 && this.impl.info(...this.formatMessage(C.resolveLazy(e)), ...r.map(C.resolveLazy));
|
|
185
185
|
}
|
|
186
186
|
static warn(e, ...r) {
|
|
187
|
-
|
|
187
|
+
C.instance.warn(e, ...r);
|
|
188
188
|
}
|
|
189
189
|
warn(e, ...r) {
|
|
190
|
-
this.level <= 2 && this.impl.warn(...this.formatMessage(
|
|
190
|
+
this.level <= 2 && this.impl.warn(...this.formatMessage(C.resolveLazy(e)), ...r.map(C.resolveLazy));
|
|
191
191
|
}
|
|
192
192
|
static error(e, ...r) {
|
|
193
|
-
|
|
193
|
+
C.instance.error(e, ...r);
|
|
194
194
|
}
|
|
195
195
|
error(e, ...r) {
|
|
196
|
-
this.level <= 3 && this.impl.error(...this.formatMessage(
|
|
196
|
+
this.level <= 3 && this.impl.error(...this.formatMessage(C.resolveLazy(e)), ...r.map(C.resolveLazy));
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
const
|
|
200
|
-
if (!
|
|
199
|
+
const Tn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePointerCapture == "function" && typeof t.hasPointerCapture == "function", Rn = (t, e) => Tn(t) && t.hasPointerCapture(e), Sr = (t, e) => {
|
|
200
|
+
if (!Tn(t))
|
|
201
201
|
return "unsupported";
|
|
202
202
|
try {
|
|
203
203
|
return t.setPointerCapture(e), "captured";
|
|
204
204
|
} catch (r) {
|
|
205
205
|
return (typeof r == "object" && r !== null && "name" in r ? r.name : void 0) === "NotFoundError" ? "inactive-pointer" : "rejected";
|
|
206
206
|
}
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
},
|
|
207
|
+
}, rr = (t, e) => {
|
|
208
|
+
Rn(t, e) && t.releasePointerCapture(e);
|
|
209
|
+
}, an = {
|
|
210
210
|
active: !1,
|
|
211
211
|
offsetX: 0,
|
|
212
212
|
offsetY: 0,
|
|
213
213
|
distance: 0,
|
|
214
214
|
direction: 0,
|
|
215
215
|
pointerId: null
|
|
216
|
-
},
|
|
216
|
+
}, zr = 6, Gn = 8, jn = ({ dragState: t, normalizedDistance: e }) => {
|
|
217
217
|
const r = 1 + e * 0.18, n = 0.16 + e * 0.24, i = 0.38 + e * 0.28, s = t.active ? "80ms ease-out" : "220ms ease";
|
|
218
|
-
return /* @__PURE__ */
|
|
219
|
-
/* @__PURE__ */
|
|
218
|
+
return /* @__PURE__ */ Bt(jr, { children: [
|
|
219
|
+
/* @__PURE__ */ j(
|
|
220
220
|
"div",
|
|
221
221
|
{
|
|
222
222
|
className: "aqvs-tap-scroll-circle-visual-outer",
|
|
@@ -228,7 +228,7 @@ const Pn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePo
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
),
|
|
231
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ j(
|
|
232
232
|
"div",
|
|
233
233
|
{
|
|
234
234
|
className: "aqvs-tap-scroll-circle-inner",
|
|
@@ -241,92 +241,92 @@ const Pn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePo
|
|
|
241
241
|
}
|
|
242
242
|
)
|
|
243
243
|
] });
|
|
244
|
-
},
|
|
245
|
-
|
|
246
|
-
const [
|
|
244
|
+
}, Kr = $n(
|
|
245
|
+
Ar(({ onDragChange: t, className: e, maxVisualDistance: r = 160, size: n = 40, style: i, opacity: s = 1, renderVisual: o, axis: l = "y" }, d) => {
|
|
246
|
+
const [h, b] = Ce(an), M = f(null), I = f(null), w = f({ x: 0, y: 0 }), R = f(null), ne = f(0), X = x(
|
|
247
247
|
(z) => {
|
|
248
|
-
|
|
248
|
+
b(z), t(z);
|
|
249
249
|
},
|
|
250
250
|
[t]
|
|
251
|
-
), pe =
|
|
252
|
-
(z,
|
|
253
|
-
const { x:
|
|
251
|
+
), pe = x(
|
|
252
|
+
(z, Y, ie = !1) => {
|
|
253
|
+
const { x: et, y: ce } = w.current, Se = z - et, At = Y - ce;
|
|
254
254
|
let ue, le;
|
|
255
255
|
if (l === "xy")
|
|
256
|
-
ue = Math.hypot(
|
|
256
|
+
ue = Math.hypot(Se, At), le = ue < zr ? 0 : 1;
|
|
257
257
|
else {
|
|
258
|
-
const _e = l === "x" ?
|
|
259
|
-
ue = Math.abs(_e), le = ue <
|
|
258
|
+
const _e = l === "x" ? Se : At;
|
|
259
|
+
ue = Math.abs(_e), le = ue < zr ? 0 : _e < 0 ? -1 : 1;
|
|
260
260
|
}
|
|
261
261
|
const vt = ne.current;
|
|
262
|
-
let
|
|
263
|
-
const
|
|
264
|
-
le === 0 ? vt !== 0 && ue <
|
|
265
|
-
active: ie || ue >=
|
|
266
|
-
offsetX:
|
|
267
|
-
offsetY:
|
|
262
|
+
let it = le;
|
|
263
|
+
const ct = zr + Gn;
|
|
264
|
+
le === 0 ? vt !== 0 && ue < ct ? it = vt : (it = 0, ie || (ne.current = 0)) : le !== vt && vt !== 0 && ue < ct ? it = vt : ne.current = le, X({
|
|
265
|
+
active: ie || ue >= zr,
|
|
266
|
+
offsetX: Se,
|
|
267
|
+
offsetY: At,
|
|
268
268
|
distance: ue,
|
|
269
|
-
direction:
|
|
269
|
+
direction: it,
|
|
270
270
|
pointerId: M.current
|
|
271
271
|
});
|
|
272
272
|
},
|
|
273
|
-
[
|
|
274
|
-
),
|
|
273
|
+
[X, l]
|
|
274
|
+
), Ae = x((z) => {
|
|
275
275
|
if (z === null)
|
|
276
276
|
return;
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
}, []), D =
|
|
277
|
+
const Y = R.current;
|
|
278
|
+
Y !== null && rr(Y, z);
|
|
279
|
+
}, []), D = x(
|
|
280
280
|
(z = !1) => {
|
|
281
|
-
z &&
|
|
281
|
+
z && Ae(M.current), M.current = null, I.current = null, ne.current = 0, X(an);
|
|
282
282
|
},
|
|
283
|
-
[
|
|
284
|
-
),
|
|
283
|
+
[X, Ae]
|
|
284
|
+
), k = x(
|
|
285
285
|
(z) => {
|
|
286
286
|
if (M.current !== null && M.current !== z.pointerId) {
|
|
287
|
-
|
|
287
|
+
I.current = { pointerId: z.pointerId, clientX: z.clientX, clientY: z.clientY }, z.preventDefault(), z.stopPropagation();
|
|
288
288
|
return;
|
|
289
289
|
}
|
|
290
290
|
z.preventDefault(), z.stopPropagation();
|
|
291
|
-
const
|
|
292
|
-
w.current = { x: ie + ce / 2, y:
|
|
291
|
+
const Y = R.current ?? z.currentTarget, { left: ie, top: et, width: ce, height: Se } = Y.getBoundingClientRect();
|
|
292
|
+
w.current = { x: ie + ce / 2, y: et + Se / 2 }, M.current = z.pointerId, Sr(Y, z.pointerId), pe(z.clientX, z.clientY, !0);
|
|
293
293
|
},
|
|
294
294
|
[pe]
|
|
295
|
-
), ae =
|
|
295
|
+
), ae = x(
|
|
296
296
|
(z) => {
|
|
297
297
|
if (M.current !== z.pointerId) {
|
|
298
|
-
|
|
298
|
+
I.current !== null && I.current.pointerId === z.pointerId && (I.current = { pointerId: z.pointerId, clientX: z.clientX, clientY: z.clientY });
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
301
|
z.preventDefault(), pe(z.clientX, z.clientY);
|
|
302
302
|
},
|
|
303
303
|
[pe]
|
|
304
|
-
), L =
|
|
304
|
+
), L = x(
|
|
305
305
|
(z) => {
|
|
306
306
|
if (M.current !== z.pointerId) {
|
|
307
|
-
|
|
307
|
+
I.current !== null && I.current.pointerId === z.pointerId && (I.current = null);
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
z.preventDefault(), z.stopPropagation();
|
|
311
|
-
const
|
|
312
|
-
if (
|
|
313
|
-
|
|
311
|
+
const Y = I.current;
|
|
312
|
+
if (I.current = null, Y !== null) {
|
|
313
|
+
Ae(z.pointerId);
|
|
314
314
|
const ie = R.current;
|
|
315
|
-
if (ie === null ||
|
|
316
|
-
M.current =
|
|
315
|
+
if (ie === null || Sr(ie, Y.pointerId) !== "inactive-pointer") {
|
|
316
|
+
M.current = Y.pointerId, pe(Y.clientX, Y.clientY, !0);
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
D(!0);
|
|
321
321
|
},
|
|
322
|
-
[D,
|
|
323
|
-
), N =
|
|
322
|
+
[D, Ae, pe]
|
|
323
|
+
), N = x(
|
|
324
324
|
(z) => {
|
|
325
325
|
z.target === z.currentTarget && M.current === z.pointerId && D(!1);
|
|
326
326
|
},
|
|
327
327
|
[D]
|
|
328
328
|
);
|
|
329
|
-
|
|
329
|
+
Dr(
|
|
330
330
|
d,
|
|
331
331
|
() => ({
|
|
332
332
|
reset: () => {
|
|
@@ -336,67 +336,67 @@ const Pn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePo
|
|
|
336
336
|
}),
|
|
337
337
|
[D]
|
|
338
338
|
);
|
|
339
|
-
const P = Math.min(Math.max(s, 0), 1),
|
|
339
|
+
const P = Math.min(Math.max(s, 0), 1), J = n / 64, K = Math.min(h.distance, r) / r, q = h.direction * K * 10 * J;
|
|
340
340
|
let oe;
|
|
341
341
|
if (l === "xy") {
|
|
342
|
-
const z =
|
|
343
|
-
oe = `translate(${
|
|
344
|
-
} else l === "x" ? oe = `translateX(${
|
|
345
|
-
const
|
|
346
|
-
dragState:
|
|
342
|
+
const z = h.distance, Y = z === 0 ? 0 : q * h.offsetX / z, ie = z === 0 ? 0 : q * h.offsetY / z;
|
|
343
|
+
oe = `translate(${Y}px, ${ie}px)`;
|
|
344
|
+
} else l === "x" ? oe = `translateX(${q}px)` : oe = `translateY(${q}px)`;
|
|
345
|
+
const ee = o ?? jn, ge = {
|
|
346
|
+
dragState: h,
|
|
347
347
|
normalizedDistance: K,
|
|
348
|
-
sizeScale:
|
|
348
|
+
sizeScale: J,
|
|
349
349
|
size: n,
|
|
350
350
|
opacity: P
|
|
351
|
-
},
|
|
351
|
+
}, Je = {
|
|
352
352
|
...i,
|
|
353
353
|
width: n,
|
|
354
354
|
height: n,
|
|
355
355
|
transform: oe
|
|
356
356
|
};
|
|
357
|
-
return
|
|
357
|
+
return Je.opacity = P, /* @__PURE__ */ j(
|
|
358
358
|
"div",
|
|
359
359
|
{
|
|
360
360
|
ref: R,
|
|
361
361
|
"data-testid": "virtual-scroll-tap-circle",
|
|
362
|
-
className:
|
|
363
|
-
style:
|
|
362
|
+
className: Ct("aqvs-tap-scroll-circle", e),
|
|
363
|
+
style: Je,
|
|
364
364
|
tabIndex: -1,
|
|
365
|
-
onPointerDown:
|
|
365
|
+
onPointerDown: k,
|
|
366
366
|
onPointerMove: ae,
|
|
367
367
|
onPointerUp: L,
|
|
368
368
|
onPointerCancel: L,
|
|
369
369
|
onLostPointerCapture: N,
|
|
370
370
|
role: "presentation",
|
|
371
|
-
children:
|
|
371
|
+
children: ee(ge)
|
|
372
372
|
}
|
|
373
373
|
);
|
|
374
374
|
})
|
|
375
375
|
);
|
|
376
|
-
|
|
377
|
-
const se = (t, e, r) => Math.max(e, Math.min(r, t)),
|
|
378
|
-
const r = e === "x", n = t.getBoundingClientRect(), i = r ? n.width : n.height, s = (
|
|
379
|
-
const M = Number.parseFloat(
|
|
376
|
+
Kr.displayName = "TapScrollCircle";
|
|
377
|
+
const se = (t, e, r) => Math.max(e, Math.min(r, t)), Br = (t, e) => {
|
|
378
|
+
const r = e === "x", n = t.getBoundingClientRect(), i = r ? n.width : n.height, s = (b) => {
|
|
379
|
+
const M = Number.parseFloat(b);
|
|
380
380
|
return Number.isFinite(M) ? M : 0;
|
|
381
|
-
}, o = window.getComputedStyle(t), l = s(r ? o.width : o.height), d = l > 0 ? l + s(r ? o.paddingLeft : o.paddingTop) + s(r ? o.paddingRight : o.paddingBottom) + s(r ? o.borderLeftWidth : o.borderTopWidth) + s(r ? o.borderRightWidth : o.borderBottomWidth) : 0,
|
|
382
|
-
return
|
|
383
|
-
},
|
|
381
|
+
}, o = window.getComputedStyle(t), l = s(r ? o.width : o.height), d = l > 0 ? l + s(r ? o.paddingLeft : o.paddingTop) + s(r ? o.paddingRight : o.paddingBottom) + s(r ? o.borderLeftWidth : o.borderTopWidth) + s(r ? o.borderRightWidth : o.borderBottomWidth) : 0, h = d > 0 ? d : r ? t.offsetWidth : t.offsetHeight;
|
|
382
|
+
return h <= 0 || i <= 0 ? 1 : i / h;
|
|
383
|
+
}, Mr = "virtualscroll:tap-scroll-cancel", cn = 20, Kn = 250, Zn = 60, Qn = 20, Jn = 20, Pn = {
|
|
384
384
|
/** 速度が最大に達する引き距離 (px)。`maxVisualDistance` の既定値。 */
|
|
385
385
|
maxDistance: 240,
|
|
386
386
|
/** 最小速度倍率 (ビューポート比)。 */
|
|
387
387
|
minSpeedMultiplier: 0.2
|
|
388
|
-
},
|
|
388
|
+
}, ei = Pn.maxDistance, ln = { active: !1, offsetX: 0, offsetY: 0, distance: 0, direction: 0, pointerId: null }, Fr = 2.2, ti = 8, ri = 120, En = 1 / 10, Yt = {
|
|
389
389
|
enabled: !0,
|
|
390
390
|
size: 40,
|
|
391
391
|
offsetX: -80,
|
|
392
392
|
offsetY: 0,
|
|
393
393
|
className: void 0,
|
|
394
|
-
maxVisualDistance:
|
|
395
|
-
minSpeedMultiplier:
|
|
394
|
+
maxVisualDistance: ei,
|
|
395
|
+
minSpeedMultiplier: Pn.minSpeedMultiplier,
|
|
396
396
|
opacity: 0.9,
|
|
397
397
|
renderVisual: void 0,
|
|
398
398
|
maxSpeedCurve: void 0
|
|
399
|
-
},
|
|
399
|
+
}, ni = (t) => t ? {
|
|
400
400
|
mainSizeKey: "width",
|
|
401
401
|
crossSizeKey: "height",
|
|
402
402
|
positionKey: "left",
|
|
@@ -414,70 +414,70 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
414
414
|
arrowIcons: ["▲", "▼"],
|
|
415
415
|
directionClass: "aqvs-scrollbar-vertical",
|
|
416
416
|
orientation: "vertical"
|
|
417
|
-
},
|
|
418
|
-
const r = t?.maxSpeedMultiplier, n = typeof r == "number" ? r :
|
|
417
|
+
}, Wr = (t, e) => {
|
|
418
|
+
const r = t?.maxSpeedMultiplier, n = typeof r == "number" ? r : ai(e);
|
|
419
419
|
return {
|
|
420
|
-
enabled: t?.enabled ??
|
|
421
|
-
size: t?.size ??
|
|
422
|
-
offsetX: t?.offsetX ??
|
|
423
|
-
offsetY: t?.offsetY ??
|
|
424
|
-
className: t?.className ??
|
|
425
|
-
maxVisualDistance: t?.maxVisualDistance ??
|
|
420
|
+
enabled: t?.enabled ?? Yt.enabled,
|
|
421
|
+
size: t?.size ?? Yt.size,
|
|
422
|
+
offsetX: t?.offsetX ?? Yt.offsetX,
|
|
423
|
+
offsetY: t?.offsetY ?? Yt.offsetY,
|
|
424
|
+
className: t?.className ?? Yt.className,
|
|
425
|
+
maxVisualDistance: t?.maxVisualDistance ?? Yt.maxVisualDistance,
|
|
426
426
|
maxSpeedMultiplier: n,
|
|
427
|
-
minSpeedMultiplier: Math.max(t?.minSpeedMultiplier ??
|
|
428
|
-
opacity: se(t?.opacity ??
|
|
429
|
-
renderVisual: t?.renderVisual ??
|
|
430
|
-
maxSpeedCurve: t?.maxSpeedCurve ??
|
|
427
|
+
minSpeedMultiplier: Math.max(t?.minSpeedMultiplier ?? Yt.minSpeedMultiplier, 0),
|
|
428
|
+
opacity: se(t?.opacity ?? Yt.opacity, 0, 1),
|
|
429
|
+
renderVisual: t?.renderVisual ?? Yt.renderVisual,
|
|
430
|
+
maxSpeedCurve: t?.maxSpeedCurve ?? Yt.maxSpeedCurve
|
|
431
431
|
};
|
|
432
|
-
},
|
|
433
|
-
const i = f(null), s = f(null), o = f(null), l =
|
|
432
|
+
}, ii = ({ isDragging: t, isThumbHovered: e, enableThumbDrag: r }) => ve(() => r ? t ? "dragging" : e ? "hover" : "idle" : "disabled", [r, t, e]), si = ({ canUseArrowButtons: t, enableArrowButtons: e, resetTapScroll: r, scrollByStep: n }) => {
|
|
433
|
+
const i = f(null), s = f(null), o = f(null), l = x(() => {
|
|
434
434
|
i.current !== null && (window.clearInterval(i.current), i.current = null), s.current !== null && (window.clearTimeout(s.current), s.current = null), o.current !== null && (window.removeEventListener("pointerup", o.current), window.removeEventListener("pointercancel", o.current), window.removeEventListener("blur", o.current), o.current = null);
|
|
435
|
-
}, []), d =
|
|
435
|
+
}, []), d = x(() => {
|
|
436
436
|
l();
|
|
437
|
-
}, [l]),
|
|
438
|
-
(M) => (
|
|
437
|
+
}, [l]), h = x(
|
|
438
|
+
(M) => (I) => {
|
|
439
439
|
if (!t)
|
|
440
440
|
return;
|
|
441
|
-
|
|
441
|
+
I.cancelable && I.preventDefault(), I.stopPropagation(), r(), l(), n(M), s.current = window.setTimeout(() => {
|
|
442
442
|
i.current = window.setInterval(() => {
|
|
443
443
|
n(M);
|
|
444
|
-
},
|
|
445
|
-
},
|
|
444
|
+
}, Zn);
|
|
445
|
+
}, Kn);
|
|
446
446
|
const w = () => l();
|
|
447
447
|
o.current = w, window.addEventListener("pointerup", w), window.addEventListener("pointercancel", w), window.addEventListener("blur", w);
|
|
448
448
|
},
|
|
449
449
|
[t, l, r, n]
|
|
450
|
-
),
|
|
451
|
-
(M) => (
|
|
452
|
-
e && (
|
|
450
|
+
), b = x(
|
|
451
|
+
(M) => (I) => {
|
|
452
|
+
e && (I.key === "Enter" || I.key === " " || I.key === "Spacebar") && (I.preventDefault(), n(M));
|
|
453
453
|
},
|
|
454
454
|
[e, n]
|
|
455
455
|
);
|
|
456
|
-
return
|
|
456
|
+
return $(() => {
|
|
457
457
|
t || l();
|
|
458
|
-
}, [t, l]),
|
|
458
|
+
}, [t, l]), $(() => () => {
|
|
459
459
|
l();
|
|
460
|
-
}, [l]), { handleArrowPointerDown:
|
|
461
|
-
},
|
|
462
|
-
const l = Math.max(
|
|
463
|
-
let D =
|
|
460
|
+
}, [l]), { handleArrowPointerDown: h, handleArrowPointerUp: d, handleArrowKeyDown: b };
|
|
461
|
+
}, oi = 700, tr = (t, e) => typeof t == "number" && Number.isFinite(t) ? t : e, Ur = ({ distance: t, maxDistance: e, viewportSize: r, minSpeedMultiplier: n, maxSpeedMultiplier: i, hasCustomMaxSpeedMultiplier: s, curve: o }) => {
|
|
462
|
+
const l = Math.max(tr(t, 0), 0), d = tr(e, 0), h = d > 0 ? Math.min(l, d) / d : 1, b = Math.max(tr(r, 0), 0), M = Math.max(tr(n, 0), 0), I = Math.max(tr(i, 0), 0), w = Math.max(b * M, 40), R = s ? w : 1200, ne = Math.max(b * I, R), X = o ? Math.max(tr(o.exponentialScale, I), 0) : 0, pe = o ? Math.min(ne, Math.max(b * X, w)) : ne, Ae = Math.max(pe, w);
|
|
463
|
+
let D = h ** 1.1;
|
|
464
464
|
if (o) {
|
|
465
|
-
const ae = Math.min(Math.max(
|
|
465
|
+
const ae = Math.min(Math.max(tr(o.exponentialSteepness, 0), 0), oi);
|
|
466
466
|
if (ae === 0)
|
|
467
|
-
D =
|
|
467
|
+
D = h;
|
|
468
468
|
else {
|
|
469
469
|
const L = Math.expm1(ae) || 1;
|
|
470
|
-
D = Math.min(Math.max(Math.expm1(ae *
|
|
470
|
+
D = Math.min(Math.max(Math.expm1(ae * h) / L, 0), 1);
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
const
|
|
474
|
-
return w + (
|
|
475
|
-
},
|
|
473
|
+
const k = Math.min(Math.max(tr(o?.easedOffset, 0), 0), 1);
|
|
474
|
+
return w + (Ae - w) * (k + (1 - k) * D);
|
|
475
|
+
}, ai = (t) => {
|
|
476
476
|
if (!t || t <= 0)
|
|
477
|
-
return
|
|
478
|
-
const e = Math.max(1, t), r = Math.log10(e), n =
|
|
479
|
-
return se(n,
|
|
480
|
-
},
|
|
477
|
+
return Fr;
|
|
478
|
+
const e = Math.max(1, t), r = Math.log10(e), n = Fr + r * ti;
|
|
479
|
+
return se(n, Fr, ri);
|
|
480
|
+
}, zn = ({
|
|
481
481
|
contentSize: t,
|
|
482
482
|
viewportSize: e,
|
|
483
483
|
scrollPosition: r,
|
|
@@ -487,82 +487,82 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
487
487
|
enableArrowButtons: o = !0,
|
|
488
488
|
enableArrowButtonTabStops: l = !0,
|
|
489
489
|
horizontal: d = !1,
|
|
490
|
-
enableHorizontalTapCircle:
|
|
491
|
-
stretchMainSize:
|
|
490
|
+
enableHorizontalTapCircle: h = !1,
|
|
491
|
+
stretchMainSize: b = !1,
|
|
492
492
|
scrollBarWidth: M = 12,
|
|
493
|
-
className:
|
|
493
|
+
className: I,
|
|
494
494
|
ariaControls: w,
|
|
495
495
|
tapScrollCircleOptions: R,
|
|
496
496
|
itemCount: ne,
|
|
497
|
-
renderThumbOverlay:
|
|
497
|
+
renderThumbOverlay: X,
|
|
498
498
|
visibleStartIndex: pe,
|
|
499
|
-
visibleEndIndex:
|
|
499
|
+
visibleEndIndex: Ae,
|
|
500
500
|
locale: D,
|
|
501
|
-
labels:
|
|
501
|
+
labels: k
|
|
502
502
|
}) => {
|
|
503
|
-
const [ae, L] =
|
|
503
|
+
const [ae, L] = Ce(!1), [N, P] = Ce(!1), [J, K] = Ce(!1), q = f(null), oe = f({
|
|
504
504
|
pointerId: null,
|
|
505
505
|
startThumbPosition: 0,
|
|
506
506
|
startClientX: 0,
|
|
507
507
|
startClientY: 0,
|
|
508
508
|
scale: 1,
|
|
509
509
|
captureTarget: null
|
|
510
|
-
}),
|
|
511
|
-
enabled:
|
|
512
|
-
size:
|
|
510
|
+
}), ee = f({ pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1 }), ge = f(r), Je = f(n), z = f(ln), Y = f(null), ie = f(null), et = f(null), ce = f(0), Se = f(0), At = ve(() => Wr(R, ne), [ne, R]), ue = ve(() => ni(d), [d]), le = ve(() => In(D, k), [D, k]), vt = d ? [le.scrollLeft, le.scrollRight] : [le.scrollUp, le.scrollDown], {
|
|
511
|
+
enabled: it,
|
|
512
|
+
size: ct,
|
|
513
513
|
offsetX: _e,
|
|
514
|
-
offsetY:
|
|
515
|
-
className:
|
|
516
|
-
maxVisualDistance:
|
|
514
|
+
offsetY: st,
|
|
515
|
+
className: tt,
|
|
516
|
+
maxVisualDistance: rt,
|
|
517
517
|
maxSpeedMultiplier: fe,
|
|
518
518
|
minSpeedMultiplier: ze,
|
|
519
519
|
opacity: $e,
|
|
520
520
|
renderVisual: F,
|
|
521
|
-
maxSpeedCurve:
|
|
522
|
-
} =
|
|
521
|
+
maxSpeedCurve: Ye
|
|
522
|
+
} = At, Z = f({
|
|
523
523
|
viewportSize: e,
|
|
524
524
|
maxScrollPosition: Math.max(t - e, 0),
|
|
525
525
|
scrollBarVisible: t > e,
|
|
526
|
-
effectiveTapMaxDistance: Math.max(
|
|
526
|
+
effectiveTapMaxDistance: Math.max(rt, 1),
|
|
527
527
|
tapCircleMaxSpeedMultiplier: fe,
|
|
528
528
|
tapCircleMinSpeedMultiplier: ze,
|
|
529
|
-
tapCircleMaxSpeedCurve:
|
|
529
|
+
tapCircleMaxSpeedCurve: Ye,
|
|
530
530
|
tapScrollCircleOptions: R,
|
|
531
531
|
effectiveTrackLength: 0,
|
|
532
532
|
onScroll: n,
|
|
533
533
|
scrollPosition: r
|
|
534
|
-
}), { mainSizeKey:
|
|
535
|
-
|
|
534
|
+
}), { mainSizeKey: bt, crossSizeKey: B, positionKey: E, selectDelta: lt, getPointerCoordinate: Pe, arrowIcons: A, directionClass: ut, orientation: yt } = ue, Dt = Math.max(rt, 1), dt = e / t, p = Math.max(e - M * 2, 0), _ = dt * p, he = Math.min(Math.max(cn, _ || 0), p || cn), U = Math.max(t - e, 0), re = Math.max(p - he, 0), De = U <= 0 || re <= 0 ? 0 : se(r / U * re, 0, re), Be = De + he / 2, xe = t > e || ae, Ue = xe && o;
|
|
535
|
+
Qe(() => {
|
|
536
536
|
Z.current = {
|
|
537
537
|
viewportSize: e,
|
|
538
|
-
maxScrollPosition:
|
|
539
|
-
scrollBarVisible:
|
|
538
|
+
maxScrollPosition: U,
|
|
539
|
+
scrollBarVisible: xe,
|
|
540
540
|
effectiveTapMaxDistance: Dt,
|
|
541
541
|
tapCircleMaxSpeedMultiplier: fe,
|
|
542
542
|
tapCircleMinSpeedMultiplier: ze,
|
|
543
|
-
tapCircleMaxSpeedCurve:
|
|
543
|
+
tapCircleMaxSpeedCurve: Ye,
|
|
544
544
|
tapScrollCircleOptions: R,
|
|
545
545
|
effectiveTrackLength: re,
|
|
546
546
|
onScroll: n,
|
|
547
547
|
scrollPosition: r
|
|
548
548
|
};
|
|
549
|
-
}),
|
|
549
|
+
}), Qe(() => {
|
|
550
550
|
ge.current = r;
|
|
551
|
-
}, [r]),
|
|
552
|
-
|
|
553
|
-
}, [n]),
|
|
551
|
+
}, [r]), Qe(() => {
|
|
552
|
+
Je.current = n;
|
|
553
|
+
}, [n]), $(() => {
|
|
554
554
|
i || P(!1);
|
|
555
555
|
}, [i]);
|
|
556
|
-
const
|
|
556
|
+
const we = ii({ isDragging: ae, isThumbHovered: N, enableThumbDrag: i }), Le = x((u, V) => {
|
|
557
557
|
const O = Z.current, me = V ?? ge.current;
|
|
558
|
-
if (
|
|
559
|
-
const
|
|
560
|
-
if (typeof
|
|
561
|
-
return ge.current =
|
|
558
|
+
if (Je.current) {
|
|
559
|
+
const Ke = Je.current(u, me);
|
|
560
|
+
if (typeof Ke == "number" && Number.isFinite(Ke))
|
|
561
|
+
return ge.current = Ke, Ke;
|
|
562
562
|
}
|
|
563
|
-
const ke = typeof u == "function" ? u(me) : u, He = Math.max(O.maxScrollPosition, 0),
|
|
564
|
-
return ge.current =
|
|
565
|
-
}, []),
|
|
563
|
+
const ke = typeof u == "function" ? u(me) : u, He = Math.max(O.maxScrollPosition, 0), It = O.scrollBarVisible ? se(ke, 0, He) : 0;
|
|
564
|
+
return ge.current = It, It;
|
|
565
|
+
}, []), ft = x(
|
|
566
566
|
(u) => {
|
|
567
567
|
const V = Z.current, O = ge.current;
|
|
568
568
|
if (!V.scrollBarVisible || V.maxScrollPosition <= 0) {
|
|
@@ -571,24 +571,24 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
571
571
|
}
|
|
572
572
|
if (u === 0)
|
|
573
573
|
return { nextPosition: O, actualDelta: 0, reachedBoundary: !1 };
|
|
574
|
-
const ke = Le((Tt) => se(Tt + u, 0, V.maxScrollPosition), O), He = ke - O,
|
|
574
|
+
const ke = Le((Tt) => se(Tt + u, 0, V.maxScrollPosition), O), He = ke - O, It = u < 0 && O + u <= 0, Ke = u > 0 && O + u >= V.maxScrollPosition, Ft = u < 0 && (ke <= 0 || It && He === 0) || u > 0 && (ke >= V.maxScrollPosition || Ke && He === 0);
|
|
575
575
|
return { nextPosition: ke, actualDelta: He, reachedBoundary: Ft };
|
|
576
576
|
},
|
|
577
577
|
[Le]
|
|
578
|
-
),
|
|
578
|
+
), ot = x(
|
|
579
579
|
(u, V) => {
|
|
580
580
|
u.current += V;
|
|
581
581
|
const O = Math.max(Z.current.maxScrollPosition, 0);
|
|
582
582
|
O > 0 && (u.current = se(u.current, -O, O));
|
|
583
|
-
const me =
|
|
583
|
+
const me = ft(u.current);
|
|
584
584
|
return u.current -= me.actualDelta, me.reachedBoundary && (u.current = 0), me;
|
|
585
585
|
},
|
|
586
|
-
[
|
|
587
|
-
), Fe =
|
|
588
|
-
ie.current !== null && (window.cancelAnimationFrame(ie.current), ie.current = null),
|
|
589
|
-
}, []),
|
|
590
|
-
z.current = { ...
|
|
591
|
-
}, [Fe]),
|
|
586
|
+
[ft]
|
|
587
|
+
), Fe = x(() => {
|
|
588
|
+
ie.current !== null && (window.cancelAnimationFrame(ie.current), ie.current = null), et.current = null, ce.current = 0, Se.current = 0;
|
|
589
|
+
}, []), Ge = x(() => {
|
|
590
|
+
z.current = { ...ln }, K(!1), Y.current?.reset(), Fe();
|
|
591
|
+
}, [Fe]), be = x(
|
|
592
592
|
(u) => {
|
|
593
593
|
const V = z.current, O = Z.current;
|
|
594
594
|
if (!V.active || V.direction === 0) {
|
|
@@ -599,12 +599,12 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
599
599
|
Fe();
|
|
600
600
|
return;
|
|
601
601
|
}
|
|
602
|
-
const me =
|
|
603
|
-
if (
|
|
604
|
-
ie.current = window.requestAnimationFrame(
|
|
602
|
+
const me = et.current ?? u, ke = Math.max((u - me) / 1e3, 0), He = Math.min(ke, En);
|
|
603
|
+
if (et.current = u, He <= 0) {
|
|
604
|
+
ie.current = window.requestAnimationFrame(be);
|
|
605
605
|
return;
|
|
606
606
|
}
|
|
607
|
-
const
|
|
607
|
+
const It = Ur({
|
|
608
608
|
distance: V.distance,
|
|
609
609
|
maxDistance: O.effectiveTapMaxDistance,
|
|
610
610
|
viewportSize: O.viewportSize,
|
|
@@ -613,75 +613,75 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
613
613
|
hasCustomMaxSpeedMultiplier: typeof O.tapScrollCircleOptions?.maxSpeedMultiplier == "number",
|
|
614
614
|
curve: O.tapCircleMaxSpeedCurve
|
|
615
615
|
});
|
|
616
|
-
|
|
617
|
-
const { reachedBoundary:
|
|
618
|
-
if (
|
|
616
|
+
Se.current !== V.direction && (Se.current = V.direction, ce.current = 0);
|
|
617
|
+
const { reachedBoundary: Ke } = ot(ce, V.direction * It * He);
|
|
618
|
+
if (Ke) {
|
|
619
619
|
Fe();
|
|
620
620
|
return;
|
|
621
621
|
}
|
|
622
|
-
ie.current = window.requestAnimationFrame(
|
|
622
|
+
ie.current = window.requestAnimationFrame(be);
|
|
623
623
|
},
|
|
624
|
-
[
|
|
625
|
-
),
|
|
626
|
-
ie.current === null && (
|
|
627
|
-
}, [
|
|
628
|
-
|
|
624
|
+
[ot, Fe]
|
|
625
|
+
), Me = x(() => {
|
|
626
|
+
ie.current === null && (et.current = null, ce.current = 0, ie.current = window.requestAnimationFrame(be));
|
|
627
|
+
}, [be]);
|
|
628
|
+
$(() => {
|
|
629
629
|
const u = z.current;
|
|
630
|
-
!u.active || u.direction === 0 ||
|
|
631
|
-
}, [t, e,
|
|
630
|
+
!u.active || u.direction === 0 || Me();
|
|
631
|
+
}, [t, e, Me]), $(() => () => {
|
|
632
632
|
Fe();
|
|
633
633
|
}, [Fe]);
|
|
634
|
-
const
|
|
634
|
+
const je = x(
|
|
635
635
|
(u) => {
|
|
636
|
-
z.current = u, K(u.active), u.active && u.direction !== 0 ?
|
|
636
|
+
z.current = u, K(u.active), u.active && u.direction !== 0 ? Me() : Fe();
|
|
637
637
|
},
|
|
638
|
-
[
|
|
638
|
+
[Me, Fe]
|
|
639
639
|
);
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
}, [
|
|
640
|
+
$(() => {
|
|
641
|
+
it || Ge();
|
|
642
|
+
}, [Ge, it]), $(() => {
|
|
643
643
|
const u = (V) => {
|
|
644
644
|
const me = V.detail?.paneId;
|
|
645
|
-
me && w && me !== w ||
|
|
645
|
+
me && w && me !== w || Ge();
|
|
646
646
|
};
|
|
647
|
-
return window.addEventListener(
|
|
648
|
-
window.removeEventListener(
|
|
647
|
+
return window.addEventListener(Mr, u), () => {
|
|
648
|
+
window.removeEventListener(Mr, u);
|
|
649
649
|
};
|
|
650
|
-
}, [w,
|
|
651
|
-
if (!
|
|
650
|
+
}, [w, Ge]), $(() => {
|
|
651
|
+
if (!it)
|
|
652
652
|
return;
|
|
653
653
|
const u = (V) => {
|
|
654
654
|
if (!z.current.active || z.current.pointerId === V.pointerId)
|
|
655
655
|
return;
|
|
656
656
|
const O = V.target;
|
|
657
657
|
if (!(O instanceof Node)) {
|
|
658
|
-
|
|
658
|
+
Ge();
|
|
659
659
|
return;
|
|
660
660
|
}
|
|
661
|
-
|
|
661
|
+
Y.current?.getElement()?.contains(O) || Ge();
|
|
662
662
|
};
|
|
663
663
|
return document.addEventListener("pointerdown", u, !0), () => {
|
|
664
664
|
document.removeEventListener("pointerdown", u, !0);
|
|
665
665
|
};
|
|
666
|
-
}, [
|
|
666
|
+
}, [Ge, it]);
|
|
667
667
|
const Ee = (u) => {
|
|
668
|
-
if (!
|
|
668
|
+
if (!xe || re <= 0 || U <= 0)
|
|
669
669
|
return 0;
|
|
670
670
|
const V = se(u, 0, re);
|
|
671
|
-
return se(V / re *
|
|
672
|
-
}, S =
|
|
671
|
+
return se(V / re * U, 0, U);
|
|
672
|
+
}, S = x((u) => {
|
|
673
673
|
const { scrollBarVisible: V, effectiveTrackLength: O, maxScrollPosition: me } = Z.current;
|
|
674
|
-
if (
|
|
674
|
+
if (C.debug("[ScrollBar] calculateScrollPositionFromThumb", () => ({ thumbPos: u, trackLen: O, maxScroll: me })), O <= 0 || me <= 0)
|
|
675
675
|
return null;
|
|
676
676
|
const ke = se(u, 0, O);
|
|
677
677
|
return se(ke / O * me, 0, me);
|
|
678
|
-
}, []), T =
|
|
678
|
+
}, []), T = x((u) => Br(u, d ? "x" : "y"), [d]), Ve = x(
|
|
679
679
|
(u) => {
|
|
680
680
|
const V = oe.current;
|
|
681
681
|
if (V.pointerId !== u.pointerId)
|
|
682
682
|
return;
|
|
683
|
-
const O = u.clientX - V.startClientX, me = u.clientY - V.startClientY, ke =
|
|
684
|
-
|
|
683
|
+
const O = u.clientX - V.startClientX, me = u.clientY - V.startClientY, ke = lt(O, me) / (V.scale || 1);
|
|
684
|
+
C.debug("[ScrollBar] handleThumbPointerMove", () => ({
|
|
685
685
|
delta: ke,
|
|
686
686
|
startThumbPosition: V.startThumbPosition,
|
|
687
687
|
clientY: u.clientY,
|
|
@@ -691,35 +691,35 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
691
691
|
const He = S(V.startThumbPosition + ke);
|
|
692
692
|
He !== null && Le(He), u.cancelable && u.preventDefault();
|
|
693
693
|
},
|
|
694
|
-
[
|
|
695
|
-
), Xe =
|
|
694
|
+
[lt, S, Le]
|
|
695
|
+
), Xe = x(
|
|
696
696
|
(u) => {
|
|
697
697
|
const V = oe.current;
|
|
698
698
|
if (V.pointerId === u.pointerId)
|
|
699
|
-
if (document.removeEventListener("pointermove", Ve), document.removeEventListener("pointerup", Xe), document.removeEventListener("pointercancel", Xe), V.captureTarget !== null &&
|
|
700
|
-
const O =
|
|
699
|
+
if (document.removeEventListener("pointermove", Ve), document.removeEventListener("pointerup", Xe), document.removeEventListener("pointercancel", Xe), V.captureTarget !== null && rr(V.captureTarget, u.pointerId), oe.current = { pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1, captureTarget: null }, L(!1), q.current) {
|
|
700
|
+
const O = q.current.getBoundingClientRect();
|
|
701
701
|
u.clientX >= O.left && u.clientX <= O.right && u.clientY >= O.top && u.clientY <= O.bottom || P(!1);
|
|
702
702
|
} else
|
|
703
703
|
P(!1);
|
|
704
704
|
},
|
|
705
705
|
[Ve]
|
|
706
706
|
);
|
|
707
|
-
|
|
707
|
+
$(() => () => {
|
|
708
708
|
document.removeEventListener("pointermove", Ve), document.removeEventListener("pointerup", Xe), document.removeEventListener("pointercancel", Xe);
|
|
709
709
|
}, [Ve, Xe]);
|
|
710
|
-
const
|
|
710
|
+
const We = f(0), at = f(0), ht = x(
|
|
711
711
|
(u) => {
|
|
712
|
-
const V = Math.max(Math.round(Z.current.viewportSize /
|
|
713
|
-
|
|
712
|
+
const V = Math.max(Math.round(Z.current.viewportSize / Jn), Qn);
|
|
713
|
+
at.current !== u && (at.current = u, We.current = 0), ot(We, u * V);
|
|
714
714
|
},
|
|
715
|
-
[
|
|
716
|
-
), { handleArrowPointerDown: ye, handleArrowPointerUp:
|
|
717
|
-
canUseArrowButtons:
|
|
715
|
+
[ot]
|
|
716
|
+
), { handleArrowPointerDown: ye, handleArrowPointerUp: Pt, handleArrowKeyDown: Qt } = si({
|
|
717
|
+
canUseArrowButtons: Ue,
|
|
718
718
|
enableArrowButtons: o,
|
|
719
|
-
resetTapScroll:
|
|
720
|
-
scrollByStep:
|
|
721
|
-
}),
|
|
722
|
-
if (!
|
|
719
|
+
resetTapScroll: Ge,
|
|
720
|
+
scrollByStep: ht
|
|
721
|
+
}), lr = (u) => {
|
|
722
|
+
if (!xe)
|
|
723
723
|
return;
|
|
724
724
|
if (!i) {
|
|
725
725
|
u.preventDefault(), u.stopPropagation();
|
|
@@ -727,8 +727,8 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
727
727
|
}
|
|
728
728
|
if (u.pointerType === "mouse" && u.button !== 0 || u.ctrlKey)
|
|
729
729
|
return;
|
|
730
|
-
|
|
731
|
-
const V = u.currentTarget, O = T(V), me =
|
|
730
|
+
Ge();
|
|
731
|
+
const V = u.currentTarget, O = T(V), me = Sr(V, u.pointerId) === "captured" ? V : null;
|
|
732
732
|
oe.current = {
|
|
733
733
|
pointerId: u.pointerId,
|
|
734
734
|
startThumbPosition: De,
|
|
@@ -737,8 +737,8 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
737
737
|
scale: O,
|
|
738
738
|
captureTarget: me
|
|
739
739
|
}, document.addEventListener("pointermove", Ve), document.addEventListener("pointerup", Xe), document.addEventListener("pointercancel", Xe), L(!0), P(!0), u.preventDefault(), u.stopPropagation();
|
|
740
|
-
},
|
|
741
|
-
if (!
|
|
740
|
+
}, Ie = (u) => {
|
|
741
|
+
if (!xe)
|
|
742
742
|
return;
|
|
743
743
|
if (!s) {
|
|
744
744
|
u.preventDefault(), u.stopPropagation();
|
|
@@ -747,150 +747,150 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
747
747
|
if (u.pointerType === "mouse" && u.button !== 0 || u.ctrlKey)
|
|
748
748
|
return;
|
|
749
749
|
const V = u.currentTarget, O = V.getBoundingClientRect(), me = Pe(u), ke = T(V), He = (me - (d ? O.left : O.top)) / ke;
|
|
750
|
-
|
|
751
|
-
const
|
|
752
|
-
Le(
|
|
750
|
+
Ge();
|
|
751
|
+
const It = He - he / 2, Ke = Ee(It);
|
|
752
|
+
Le(Ke), Sr(V, u.pointerId), ee.current = {
|
|
753
753
|
pointerId: u.pointerId,
|
|
754
|
-
startThumbPosition:
|
|
754
|
+
startThumbPosition: It,
|
|
755
755
|
startClientX: u.clientX,
|
|
756
756
|
startClientY: u.clientY,
|
|
757
757
|
scale: ke
|
|
758
758
|
}, u.preventDefault(), u.stopPropagation();
|
|
759
759
|
}, wt = () => {
|
|
760
|
-
|
|
761
|
-
},
|
|
762
|
-
const V =
|
|
760
|
+
ee.current = { pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1 };
|
|
761
|
+
}, nr = (u) => {
|
|
762
|
+
const V = ee.current;
|
|
763
763
|
if (V.pointerId !== u.pointerId)
|
|
764
764
|
return;
|
|
765
765
|
if (u.pointerType === "mouse" && u.buttons === 0) {
|
|
766
766
|
wt();
|
|
767
767
|
return;
|
|
768
768
|
}
|
|
769
|
-
const O = u.clientX - V.startClientX, me = u.clientY - V.startClientY, ke =
|
|
769
|
+
const O = u.clientX - V.startClientX, me = u.clientY - V.startClientY, ke = lt(O, me) / (V.scale || 1), He = Ee(V.startThumbPosition + ke);
|
|
770
770
|
Le(He), u.cancelable && u.preventDefault();
|
|
771
|
-
},
|
|
772
|
-
|
|
773
|
-
},
|
|
774
|
-
|
|
775
|
-
},
|
|
776
|
-
u.target === u.currentTarget &&
|
|
777
|
-
},
|
|
778
|
-
const V = `calc(50% - ${
|
|
771
|
+
}, Jt = (u) => {
|
|
772
|
+
ee.current.pointerId === u.pointerId && (rr(u.currentTarget, u.pointerId), wt(), u.preventDefault(), u.stopPropagation());
|
|
773
|
+
}, Wt = (u) => {
|
|
774
|
+
ee.current.pointerId === u.pointerId && (rr(u.currentTarget, u.pointerId), wt());
|
|
775
|
+
}, Te = (u) => {
|
|
776
|
+
u.target === u.currentTarget && ee.current.pointerId === u.pointerId && wt();
|
|
777
|
+
}, Et = ve(() => se((J ? 1 : 0.8) * $e, 0, 1), [J, $e]), Ut = ve(() => {
|
|
778
|
+
const V = `calc(50% - ${ct / 2}px + ${st}px)`;
|
|
779
779
|
return {
|
|
780
780
|
left: _e,
|
|
781
781
|
top: V
|
|
782
782
|
};
|
|
783
|
-
}, [_e,
|
|
783
|
+
}, [_e, st, ct]), ir = (u, V, O, me) => /* @__PURE__ */ j(
|
|
784
784
|
"button",
|
|
785
785
|
{
|
|
786
786
|
type: "button",
|
|
787
787
|
tabIndex: l ? 0 : -1,
|
|
788
788
|
className: "aqvs-scrollbar-arrow-button",
|
|
789
789
|
style: {
|
|
790
|
-
[
|
|
791
|
-
[
|
|
790
|
+
[bt]: M,
|
|
791
|
+
[B]: M
|
|
792
792
|
},
|
|
793
793
|
"aria-label": V,
|
|
794
794
|
onPointerDown: ye(u),
|
|
795
|
-
onPointerUp:
|
|
796
|
-
onPointerLeave:
|
|
797
|
-
onPointerCancel:
|
|
798
|
-
onKeyDown:
|
|
795
|
+
onPointerUp: Pt,
|
|
796
|
+
onPointerLeave: Pt,
|
|
797
|
+
onPointerCancel: Pt,
|
|
798
|
+
onKeyDown: Qt(u),
|
|
799
799
|
"aria-disabled": !o,
|
|
800
|
-
disabled: !
|
|
801
|
-
children: /* @__PURE__ */
|
|
800
|
+
disabled: !Ue,
|
|
801
|
+
children: /* @__PURE__ */ j("span", { "aria-hidden": "true", children: O })
|
|
802
802
|
},
|
|
803
803
|
me
|
|
804
|
-
), St =
|
|
805
|
-
orientation:
|
|
804
|
+
), St = X && xe ? {
|
|
805
|
+
orientation: yt,
|
|
806
806
|
scrollPosition: r,
|
|
807
|
-
maxScrollPosition:
|
|
807
|
+
maxScrollPosition: U,
|
|
808
808
|
contentSize: t,
|
|
809
809
|
viewportSize: e,
|
|
810
810
|
thumbSize: he,
|
|
811
811
|
thumbPosition: De,
|
|
812
|
-
thumbCenter:
|
|
812
|
+
thumbCenter: Be,
|
|
813
813
|
trackSize: p,
|
|
814
814
|
isDragging: ae,
|
|
815
|
-
isTapScrollActive:
|
|
815
|
+
isTapScrollActive: J,
|
|
816
816
|
visibleStartIndex: pe,
|
|
817
|
-
visibleEndIndex:
|
|
817
|
+
visibleEndIndex: Ae
|
|
818
818
|
} : null;
|
|
819
|
-
return /* @__PURE__ */
|
|
819
|
+
return /* @__PURE__ */ Bt(
|
|
820
820
|
"div",
|
|
821
821
|
{
|
|
822
|
-
className:
|
|
822
|
+
className: Ct("aqvs-scrollbar", ut, I),
|
|
823
823
|
style: {
|
|
824
824
|
// 自己計測ペインの縦バーはインライン主軸寸を書かない (ラチェット遮断 — ペイン仕様 §2.5)。
|
|
825
825
|
// 横バーは stretch が主軸を寸法決めできないため常に書く
|
|
826
|
-
...
|
|
827
|
-
[
|
|
826
|
+
...b && !d ? {} : { [bt]: e },
|
|
827
|
+
[B]: M
|
|
828
828
|
},
|
|
829
|
-
"data-visible":
|
|
829
|
+
"data-visible": xe ? "true" : "false",
|
|
830
830
|
role: "scrollbar",
|
|
831
831
|
tabIndex: -1,
|
|
832
832
|
"aria-controls": w,
|
|
833
833
|
"aria-valuenow": r,
|
|
834
834
|
"aria-valuemin": 0,
|
|
835
|
-
"aria-valuemax":
|
|
835
|
+
"aria-valuemax": U,
|
|
836
836
|
"aria-orientation": d ? "horizontal" : "vertical",
|
|
837
837
|
children: [
|
|
838
|
-
(!d ||
|
|
839
|
-
|
|
838
|
+
(!d || h) && xe && it && /* @__PURE__ */ j(
|
|
839
|
+
Kr,
|
|
840
840
|
{
|
|
841
841
|
axis: d ? "x" : "y",
|
|
842
|
-
ref:
|
|
843
|
-
className:
|
|
844
|
-
size:
|
|
842
|
+
ref: Y,
|
|
843
|
+
className: Ct("aqvs-scrollbar-tap-circle-wrapper", tt),
|
|
844
|
+
size: ct,
|
|
845
845
|
maxVisualDistance: Dt,
|
|
846
|
-
style:
|
|
847
|
-
opacity:
|
|
846
|
+
style: Ut,
|
|
847
|
+
opacity: Et,
|
|
848
848
|
renderVisual: F,
|
|
849
|
-
onDragChange:
|
|
849
|
+
onDragChange: je
|
|
850
850
|
},
|
|
851
851
|
"tap-circle"
|
|
852
852
|
),
|
|
853
|
-
|
|
854
|
-
/* @__PURE__ */
|
|
853
|
+
ir(-1, vt[0], A[0], "arrow-start"),
|
|
854
|
+
/* @__PURE__ */ Bt(
|
|
855
855
|
"div",
|
|
856
856
|
{
|
|
857
857
|
className: "aqvs-scrollbar-track",
|
|
858
858
|
style: {
|
|
859
859
|
borderRadius: M / 2
|
|
860
860
|
},
|
|
861
|
-
onPointerDown:
|
|
862
|
-
onPointerMove:
|
|
863
|
-
onPointerUp:
|
|
864
|
-
onPointerCancel:
|
|
865
|
-
onLostPointerCapture:
|
|
861
|
+
onPointerDown: Ie,
|
|
862
|
+
onPointerMove: nr,
|
|
863
|
+
onPointerUp: Jt,
|
|
864
|
+
onPointerCancel: Wt,
|
|
865
|
+
onLostPointerCapture: Te,
|
|
866
866
|
"aria-disabled": !s,
|
|
867
867
|
children: [
|
|
868
|
-
St && /* @__PURE__ */
|
|
869
|
-
/* @__PURE__ */
|
|
868
|
+
St && /* @__PURE__ */ j("div", { className: "aqvs-scrollbar-overlay", "aria-hidden": !0, children: X?.(St) }, "overlay"),
|
|
869
|
+
/* @__PURE__ */ j(
|
|
870
870
|
"div",
|
|
871
871
|
{
|
|
872
872
|
className: "aqvs-scrollbar-thumb-wrapper",
|
|
873
873
|
style: {
|
|
874
|
-
[
|
|
874
|
+
[bt]: he,
|
|
875
875
|
[E]: De,
|
|
876
876
|
...d ? { top: 0, bottom: 0 } : { left: 0, right: 0 }
|
|
877
877
|
},
|
|
878
|
-
"data-visible":
|
|
879
|
-
onPointerDown:
|
|
878
|
+
"data-visible": xe || ae ? "true" : "false",
|
|
879
|
+
onPointerDown: lr,
|
|
880
880
|
role: "slider",
|
|
881
881
|
"aria-orientation": d ? "horizontal" : "vertical",
|
|
882
882
|
"aria-valuenow": r,
|
|
883
883
|
"aria-valuemin": 0,
|
|
884
|
-
"aria-valuemax":
|
|
884
|
+
"aria-valuemax": U,
|
|
885
885
|
"aria-disabled": !i,
|
|
886
886
|
tabIndex: -1,
|
|
887
|
-
children: /* @__PURE__ */
|
|
887
|
+
children: /* @__PURE__ */ j(
|
|
888
888
|
"div",
|
|
889
889
|
{
|
|
890
|
-
ref:
|
|
891
|
-
className:
|
|
890
|
+
ref: q,
|
|
891
|
+
className: Ct("aqvs-scrollbar-thumb", d ? "aqvs-scrollbar-thumb-horizontal" : "aqvs-scrollbar-thumb-vertical"),
|
|
892
892
|
"data-testid": "aqvs-scrollbar-thumb",
|
|
893
|
-
"data-thumb-state":
|
|
893
|
+
"data-thumb-state": we,
|
|
894
894
|
style: {
|
|
895
895
|
borderRadius: M - 1,
|
|
896
896
|
cursor: i ? "pointer" : "default"
|
|
@@ -911,15 +911,15 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
911
911
|
},
|
|
912
912
|
"track"
|
|
913
913
|
),
|
|
914
|
-
|
|
914
|
+
ir(1, vt[1], A[1], "arrow-end")
|
|
915
915
|
]
|
|
916
916
|
}
|
|
917
917
|
);
|
|
918
|
-
},
|
|
918
|
+
}, ci = ({ offsetX: t, offsetY: e, maxDistance: r, x: n, y: i }) => {
|
|
919
919
|
const s = Number.isFinite(t) ? t : 0, o = Number.isFinite(e) ? e : 0, l = Math.hypot(s, o);
|
|
920
920
|
if (l === 0)
|
|
921
921
|
return { x: 0, y: 0 };
|
|
922
|
-
const d =
|
|
922
|
+
const d = Ur({
|
|
923
923
|
distance: l,
|
|
924
924
|
maxDistance: r,
|
|
925
925
|
viewportSize: n.viewportSize,
|
|
@@ -927,7 +927,7 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
927
927
|
maxSpeedMultiplier: n.maxSpeedMultiplier,
|
|
928
928
|
hasCustomMaxSpeedMultiplier: n.hasCustomMaxSpeedMultiplier,
|
|
929
929
|
curve: n.curve
|
|
930
|
-
}),
|
|
930
|
+
}), h = Ur({
|
|
931
931
|
distance: l,
|
|
932
932
|
maxDistance: r,
|
|
933
933
|
viewportSize: i.viewportSize,
|
|
@@ -936,8 +936,8 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
936
936
|
hasCustomMaxSpeedMultiplier: i.hasCustomMaxSpeedMultiplier,
|
|
937
937
|
curve: i.curve
|
|
938
938
|
});
|
|
939
|
-
return { x: d * s / l, y:
|
|
940
|
-
},
|
|
939
|
+
return { x: d * s / l, y: h * o / l };
|
|
940
|
+
}, Yi = (t) => {
|
|
941
941
|
const { quantum: e, resetOnDirectionChange: r = !0 } = t;
|
|
942
942
|
if (!(Number.isFinite(e) && e > 0))
|
|
943
943
|
throw new TypeError(`[createResidualQuantizer] quantum must be a finite positive number, received ${e}`);
|
|
@@ -955,7 +955,7 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
955
955
|
n = 0;
|
|
956
956
|
}
|
|
957
957
|
};
|
|
958
|
-
},
|
|
958
|
+
}, li = 16, un = (t, e, r) => e === 1 ? t * li : e === 2 ? t * r : t, ui = (t, e) => {
|
|
959
959
|
const r = t.shiftKey && t.deltaX === 0, n = r ? t.deltaY : t.deltaX, i = r ? 0 : t.deltaY, s = n !== 0 && Math.abs(n) >= Math.abs(i);
|
|
960
960
|
return {
|
|
961
961
|
// ❗ ズームでもデルタは潰さない。ここは**事実だけ**を報告し、「横取りしない」という
|
|
@@ -964,21 +964,21 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
964
964
|
// どのテストも検出できなくなる (変異解析で実証済み)。
|
|
965
965
|
isZoomGesture: t.ctrlKey,
|
|
966
966
|
isHorizontalDominant: s,
|
|
967
|
-
horizontalDelta:
|
|
968
|
-
verticalDelta:
|
|
967
|
+
horizontalDelta: un(n, t.deltaMode, e),
|
|
968
|
+
verticalDelta: un(i, t.deltaMode, e)
|
|
969
969
|
};
|
|
970
|
-
},
|
|
971
|
-
|
|
972
|
-
},
|
|
970
|
+
}, Nn = /* @__PURE__ */ new WeakSet(), dn = (t) => {
|
|
971
|
+
Nn.add(t);
|
|
972
|
+
}, di = (t) => Nn.has(t), fi = ["mouse", "pen", "touch"], kr = (t, e) => !(t === "mouse" || t === "pen" || t === "touch") || e.includes(t), hi = (t) => t === "mouse" || t === "pen", xr = {
|
|
973
973
|
maxVelocity: 6,
|
|
974
974
|
minVelocity: 0.02,
|
|
975
975
|
deceleration: 25e-4,
|
|
976
976
|
velocitySampleWindow: 90,
|
|
977
977
|
startVelocityThreshold: 0.04
|
|
978
|
-
},
|
|
978
|
+
}, Nr = (t, e, r) => {
|
|
979
979
|
for (const [n, i, s] of e)
|
|
980
980
|
r === "add" ? t.addEventListener(n, i, s) : t.removeEventListener(n, i, s);
|
|
981
|
-
},
|
|
981
|
+
}, mi = Ar(
|
|
982
982
|
({
|
|
983
983
|
children: t,
|
|
984
984
|
contentSize: e,
|
|
@@ -989,44 +989,44 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
989
989
|
enableTrackClick: o = !0,
|
|
990
990
|
enableArrowButtons: l = !0,
|
|
991
991
|
enableArrowButtonTabStops: d = !0,
|
|
992
|
-
enablePointerDrag:
|
|
993
|
-
pointerDragInputs:
|
|
992
|
+
enablePointerDrag: h = !0,
|
|
993
|
+
pointerDragInputs: b = fi,
|
|
994
994
|
onScroll: M,
|
|
995
|
-
className:
|
|
995
|
+
className: I,
|
|
996
996
|
testId: w,
|
|
997
997
|
style: R,
|
|
998
998
|
background: ne,
|
|
999
|
-
tapScrollCircleOptions:
|
|
999
|
+
tapScrollCircleOptions: X,
|
|
1000
1000
|
inertiaOptions: pe,
|
|
1001
|
-
itemCount:
|
|
1001
|
+
itemCount: Ae,
|
|
1002
1002
|
renderThumbOverlay: D,
|
|
1003
|
-
wheelSpeedMultiplier:
|
|
1003
|
+
wheelSpeedMultiplier: k = 1,
|
|
1004
1004
|
overscrollBehavior: ae = "auto",
|
|
1005
1005
|
onWheelHorizontal: L,
|
|
1006
1006
|
onPanHorizontal: N,
|
|
1007
1007
|
contentInsets: P,
|
|
1008
|
-
visibleStartIndex:
|
|
1008
|
+
visibleStartIndex: J,
|
|
1009
1009
|
visibleEndIndex: K,
|
|
1010
|
-
renderOverlay:
|
|
1010
|
+
renderOverlay: q,
|
|
1011
1011
|
initialScrollPosition: oe = 0,
|
|
1012
|
-
contentProps:
|
|
1012
|
+
contentProps: ee,
|
|
1013
1013
|
locale: ge,
|
|
1014
|
-
labels:
|
|
1014
|
+
labels: Je
|
|
1015
1015
|
}, z) => {
|
|
1016
|
-
const
|
|
1017
|
-
|
|
1016
|
+
const Y = f(Number.isFinite(oe) ? Math.max(0, oe) : 0), ie = f(null), et = f(null), ce = r === void 0, [Se, At] = Ce(0), ue = r ?? Se, le = f(null);
|
|
1017
|
+
Qe(() => {
|
|
1018
1018
|
if (!ce)
|
|
1019
1019
|
return;
|
|
1020
|
-
const p =
|
|
1020
|
+
const p = et.current;
|
|
1021
1021
|
if (!p)
|
|
1022
1022
|
return;
|
|
1023
1023
|
const _ = () => {
|
|
1024
|
-
const
|
|
1025
|
-
if (
|
|
1026
|
-
|
|
1024
|
+
const U = p.offsetHeight;
|
|
1025
|
+
if (U > 0) {
|
|
1026
|
+
At((re) => re === U ? re : U);
|
|
1027
1027
|
return;
|
|
1028
1028
|
}
|
|
1029
|
-
p.offsetParent !== null && e > 0 && le.current !== "zero" && (le.current = "zero",
|
|
1029
|
+
p.offsetParent !== null && e > 0 && le.current !== "zero" && (le.current = "zero", C.warn("[ScrollPane] The self-measured viewport is 0px. Give the scroll pane's host element a definite height (e.g. h-full, flex-1 + min-h-0, an explicit px height), or pass viewportSize explicitly."));
|
|
1030
1030
|
};
|
|
1031
1031
|
if (_(), typeof ResizeObserver != "function")
|
|
1032
1032
|
return;
|
|
@@ -1034,21 +1034,21 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
1034
1034
|
return he.observe(p), () => {
|
|
1035
1035
|
he.disconnect();
|
|
1036
1036
|
};
|
|
1037
|
-
}, [e, ce]),
|
|
1038
|
-
ce && n?.(
|
|
1039
|
-
}, [ce,
|
|
1037
|
+
}, [e, ce]), Qe(() => {
|
|
1038
|
+
ce && n?.(Se);
|
|
1039
|
+
}, [ce, Se, n]), Qe(() => {
|
|
1040
1040
|
if (ce)
|
|
1041
1041
|
return;
|
|
1042
1042
|
const p = ie.current;
|
|
1043
1043
|
if (!p)
|
|
1044
1044
|
return;
|
|
1045
1045
|
const _ = () => {
|
|
1046
|
-
const
|
|
1047
|
-
if (
|
|
1046
|
+
const U = p.clientHeight;
|
|
1047
|
+
if (U <= 0 || Math.abs(U - ue) <= 1)
|
|
1048
1048
|
return;
|
|
1049
|
-
const re = `${ue}/${
|
|
1050
|
-
le.current !== re && (le.current = re,
|
|
1051
|
-
`[ScrollPane] viewportSize=${ue} but the host band is ${
|
|
1049
|
+
const re = `${ue}/${U}`;
|
|
1050
|
+
le.current !== re && (le.current = re, C.warn(
|
|
1051
|
+
`[ScrollPane] viewportSize=${ue} but the host band is ${U}px. The clip window, max scroll position, thumb mapping, rendered row count and scrollability all derive from viewportSize, so they are now wrong. Omit viewportSize to let the pane measure itself.`
|
|
1052
1052
|
));
|
|
1053
1053
|
};
|
|
1054
1054
|
if (_(), typeof ResizeObserver != "function")
|
|
@@ -1059,175 +1059,175 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
1059
1059
|
};
|
|
1060
1060
|
}, [ce, ue]);
|
|
1061
1061
|
const vt = f(L);
|
|
1062
|
-
|
|
1062
|
+
$(() => {
|
|
1063
1063
|
vt.current = L;
|
|
1064
1064
|
}, [L]);
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1067
|
-
|
|
1065
|
+
const it = f(N);
|
|
1066
|
+
$(() => {
|
|
1067
|
+
it.current = N;
|
|
1068
1068
|
}, [N]);
|
|
1069
|
-
const
|
|
1069
|
+
const ct = f({
|
|
1070
1070
|
frame: null,
|
|
1071
1071
|
velocity: 0,
|
|
1072
1072
|
lastTimestamp: null,
|
|
1073
1073
|
generation: 0
|
|
1074
|
-
}), _e =
|
|
1074
|
+
}), _e = ve(
|
|
1075
1075
|
() => ({
|
|
1076
|
-
maxVelocity: pe?.maxVelocity ??
|
|
1077
|
-
minVelocity: pe?.minVelocity ??
|
|
1078
|
-
deceleration: pe?.deceleration ??
|
|
1079
|
-
velocitySampleWindow: pe?.velocitySampleWindow ??
|
|
1080
|
-
startVelocityThreshold: pe?.startVelocityThreshold ??
|
|
1076
|
+
maxVelocity: pe?.maxVelocity ?? xr.maxVelocity,
|
|
1077
|
+
minVelocity: pe?.minVelocity ?? xr.minVelocity,
|
|
1078
|
+
deceleration: pe?.deceleration ?? xr.deceleration,
|
|
1079
|
+
velocitySampleWindow: pe?.velocitySampleWindow ?? xr.velocitySampleWindow,
|
|
1080
|
+
startVelocityThreshold: pe?.startVelocityThreshold ?? xr.startVelocityThreshold
|
|
1081
1081
|
}),
|
|
1082
1082
|
[pe]
|
|
1083
|
-
),
|
|
1083
|
+
), st = ve(() => ({
|
|
1084
1084
|
top: Math.max(0, P?.top ?? 0),
|
|
1085
1085
|
bottom: Math.max(0, P?.bottom ?? 0)
|
|
1086
1086
|
}), [P]);
|
|
1087
|
-
|
|
1087
|
+
C.debug("[ScrollPane] ScrollPane rendered", () => ({
|
|
1088
1088
|
contentSize: e,
|
|
1089
1089
|
viewportSize: ue,
|
|
1090
1090
|
scrollBarWidth: i,
|
|
1091
|
-
className:
|
|
1091
|
+
className: I,
|
|
1092
1092
|
style: R,
|
|
1093
|
-
tapScrollCircleOptions:
|
|
1093
|
+
tapScrollCircleOptions: X,
|
|
1094
1094
|
inertiaOptions: pe,
|
|
1095
|
-
enablePointerDrag:
|
|
1096
|
-
contentInsets:
|
|
1095
|
+
enablePointerDrag: h,
|
|
1096
|
+
contentInsets: st
|
|
1097
1097
|
}));
|
|
1098
|
-
const
|
|
1098
|
+
const tt = f({ contentSize: e, viewportSize: ue }), rt = ve(() => e > ue, [e, ue]), fe = x(
|
|
1099
1099
|
(p, _) => {
|
|
1100
|
-
let he = _ ??
|
|
1101
|
-
_ && !(Number.isFinite(_.contentSize) && Number.isFinite(_.viewportSize)) && (
|
|
1102
|
-
const { contentSize:
|
|
1103
|
-
if (
|
|
1104
|
-
return
|
|
1105
|
-
const
|
|
1106
|
-
if (!Number.isFinite(
|
|
1107
|
-
return
|
|
1108
|
-
const
|
|
1109
|
-
return
|
|
1100
|
+
let he = _ ?? tt.current;
|
|
1101
|
+
_ && !(Number.isFinite(_.contentSize) && Number.isFinite(_.viewportSize)) && (C.warn("[ScrollPane] scrollTo received non-finite dimsOverride; falling back to the committed dims", { dimsOverride: _ }), he = tt.current);
|
|
1102
|
+
const { contentSize: U, viewportSize: re } = he, De = U > re, Be = Y.current;
|
|
1103
|
+
if (C.debug("[ScrollPane] scrollTo called", () => ({ newPosition: p, contentSize: U, viewportSize: re, currentIsScrollable: De, prevPosition: Be })), !De)
|
|
1104
|
+
return Y.current !== 0 && (Y.current = 0, M?.(0, Be)), Y.current;
|
|
1105
|
+
const xe = typeof p == "function" ? p(Y.current) : p;
|
|
1106
|
+
if (!Number.isFinite(xe))
|
|
1107
|
+
return C.warn("[ScrollPane] scrollTo received a non-finite position; keeping the current position", { nextPosition: xe }), Y.current;
|
|
1108
|
+
const Ue = Math.max(U - re, 0), we = se(xe, 0, Ue);
|
|
1109
|
+
return Y.current !== we && (Y.current = we, M?.(we, Be)), Y.current;
|
|
1110
1110
|
},
|
|
1111
1111
|
[M]
|
|
1112
1112
|
), ze = f(fe);
|
|
1113
|
-
|
|
1113
|
+
$(() => {
|
|
1114
1114
|
ze.current = fe;
|
|
1115
1115
|
}, [fe]);
|
|
1116
|
-
const $e =
|
|
1117
|
-
const p =
|
|
1116
|
+
const $e = x(() => {
|
|
1117
|
+
const p = ct.current;
|
|
1118
1118
|
p.generation += 1, p.frame !== null && cancelAnimationFrame(p.frame), p.frame = null, p.velocity = 0, p.lastTimestamp = null;
|
|
1119
1119
|
}, []), F = f($e);
|
|
1120
|
-
|
|
1120
|
+
$(() => {
|
|
1121
1121
|
F.current = $e;
|
|
1122
|
-
}, [$e]),
|
|
1122
|
+
}, [$e]), $(() => () => {
|
|
1123
1123
|
F.current();
|
|
1124
1124
|
}, []);
|
|
1125
|
-
const
|
|
1125
|
+
const Ye = x(
|
|
1126
1126
|
(p) => {
|
|
1127
|
-
if (!
|
|
1127
|
+
if (!rt)
|
|
1128
1128
|
return;
|
|
1129
|
-
const { maxVelocity: _, minVelocity: he, deceleration:
|
|
1129
|
+
const { maxVelocity: _, minVelocity: he, deceleration: U, startVelocityThreshold: re } = _e, De = se(p, -_, _);
|
|
1130
1130
|
if (Math.abs(De) < re)
|
|
1131
1131
|
return;
|
|
1132
|
-
$e(),
|
|
1133
|
-
const
|
|
1134
|
-
const
|
|
1135
|
-
if (
|
|
1132
|
+
$e(), ct.current.velocity = De, ct.current.lastTimestamp = null;
|
|
1133
|
+
const Be = ct.current.generation, xe = (Ue) => {
|
|
1134
|
+
const we = ct.current;
|
|
1135
|
+
if (we.generation !== Be)
|
|
1136
1136
|
return;
|
|
1137
|
-
if (
|
|
1138
|
-
|
|
1137
|
+
if (we.lastTimestamp === null) {
|
|
1138
|
+
we.lastTimestamp = Ue, we.frame = requestAnimationFrame(xe);
|
|
1139
1139
|
return;
|
|
1140
1140
|
}
|
|
1141
|
-
const Le =
|
|
1142
|
-
if (
|
|
1143
|
-
|
|
1141
|
+
const Le = Ue - we.lastTimestamp;
|
|
1142
|
+
if (we.lastTimestamp = Ue, Le <= 0) {
|
|
1143
|
+
we.frame = requestAnimationFrame(xe);
|
|
1144
1144
|
return;
|
|
1145
1145
|
}
|
|
1146
|
-
const
|
|
1147
|
-
let
|
|
1148
|
-
const Fe =
|
|
1149
|
-
|
|
1150
|
-
const
|
|
1151
|
-
if (
|
|
1146
|
+
const ft = we.velocity;
|
|
1147
|
+
let ot = ft;
|
|
1148
|
+
const Fe = U * Le;
|
|
1149
|
+
ft > 0 ? ot = Math.max(0, ft - Fe) : ft < 0 && (ot = Math.min(0, ft + Fe));
|
|
1150
|
+
const be = (ft + ot) / 2 * Le, Me = Y.current;
|
|
1151
|
+
if (be !== 0 && ze.current((Xe) => Xe + be), ct.current.generation !== Be)
|
|
1152
1152
|
return;
|
|
1153
|
-
const
|
|
1154
|
-
|
|
1155
|
-
const Ve =
|
|
1156
|
-
if (Math.abs(
|
|
1153
|
+
const je = Y.current, { contentSize: Ee, viewportSize: S } = tt.current, T = Math.max(Ee - S, 0);
|
|
1154
|
+
we.velocity = ot;
|
|
1155
|
+
const Ve = je === Me || je <= 0 && ot <= 0 || je >= T && ot >= 0;
|
|
1156
|
+
if (Math.abs(ot) < he || Ve) {
|
|
1157
1157
|
$e();
|
|
1158
1158
|
return;
|
|
1159
1159
|
}
|
|
1160
|
-
|
|
1160
|
+
we.frame = requestAnimationFrame(xe);
|
|
1161
1161
|
};
|
|
1162
|
-
|
|
1162
|
+
ct.current.frame = requestAnimationFrame(xe);
|
|
1163
1163
|
},
|
|
1164
|
-
[
|
|
1165
|
-
), Z = f(
|
|
1166
|
-
|
|
1167
|
-
Z.current =
|
|
1168
|
-
}, [
|
|
1169
|
-
|
|
1170
|
-
}, [e, ue]),
|
|
1171
|
-
const p =
|
|
1164
|
+
[rt, _e, $e]
|
|
1165
|
+
), Z = f(Ye);
|
|
1166
|
+
$(() => {
|
|
1167
|
+
Z.current = Ye;
|
|
1168
|
+
}, [Ye]), Qe(() => {
|
|
1169
|
+
tt.current = { contentSize: e, viewportSize: ue };
|
|
1170
|
+
}, [e, ue]), Qe(() => {
|
|
1171
|
+
const p = et.current;
|
|
1172
1172
|
if (!p) return;
|
|
1173
1173
|
const _ = () => {
|
|
1174
|
-
p.scrollTop !== 0 && (
|
|
1174
|
+
p.scrollTop !== 0 && (C.debug("[ScrollPane] Native scroll detected, resetting to 0", () => ({ scrollTop: p.scrollTop })), p.scrollTop = 0), p.scrollLeft !== 0 && (p.scrollLeft = 0);
|
|
1175
1175
|
};
|
|
1176
1176
|
return p.addEventListener("scroll", _), () => p.removeEventListener("scroll", _);
|
|
1177
|
-
}, []),
|
|
1178
|
-
if (
|
|
1179
|
-
|
|
1177
|
+
}, []), Qe(() => {
|
|
1178
|
+
if (rt) {
|
|
1179
|
+
C.debug("[ScrollPane] Adjusting scroll position due to content or viewport size change", () => ({ contentSize: e, viewportSize: ue, scrollPosition: Y.current }));
|
|
1180
1180
|
const p = se(e - ue, 0, e);
|
|
1181
|
-
|
|
1181
|
+
Y.current > p && fe(p);
|
|
1182
1182
|
} else
|
|
1183
1183
|
fe(0);
|
|
1184
|
-
}, [
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
}, [
|
|
1189
|
-
const
|
|
1184
|
+
}, [rt, fe, e, ue]);
|
|
1185
|
+
const bt = f({ isScrollable: rt, viewportSize: ue, wheelSpeedMultiplier: k, overscrollBehavior: ae });
|
|
1186
|
+
Qe(() => {
|
|
1187
|
+
bt.current = { isScrollable: rt, viewportSize: ue, wheelSpeedMultiplier: k, overscrollBehavior: ae };
|
|
1188
|
+
}, [rt, ue, k, ae]);
|
|
1189
|
+
const B = x(
|
|
1190
1190
|
(p) => {
|
|
1191
|
-
if (
|
|
1191
|
+
if (di(p))
|
|
1192
1192
|
return !1;
|
|
1193
|
-
const { isScrollable: _, viewportSize: he, wheelSpeedMultiplier:
|
|
1193
|
+
const { isScrollable: _, viewportSize: he, wheelSpeedMultiplier: U, overscrollBehavior: re } = bt.current, De = ui(p, he);
|
|
1194
1194
|
if (De.isZoomGesture)
|
|
1195
1195
|
return !1;
|
|
1196
1196
|
if (De.isHorizontalDominant)
|
|
1197
|
-
return vt.current ? (
|
|
1197
|
+
return vt.current ? (dn(p), p.preventDefault(), $e(), vt.current(De.horizontalDelta), !0) : !1;
|
|
1198
1198
|
if (!_ || De.verticalDelta === 0)
|
|
1199
1199
|
return !1;
|
|
1200
|
-
let
|
|
1201
|
-
if (
|
|
1202
|
-
const
|
|
1203
|
-
if (
|
|
1200
|
+
let Be = De.verticalDelta;
|
|
1201
|
+
if (U !== 1 && (Be *= U), re !== "contain") {
|
|
1202
|
+
const xe = Y.current, Ue = Math.max(tt.current.contentSize - he, 0);
|
|
1203
|
+
if (Be > 0 && xe >= Ue || Be < 0 && xe <= 0)
|
|
1204
1204
|
return !1;
|
|
1205
1205
|
}
|
|
1206
|
-
return
|
|
1206
|
+
return dn(p), p.preventDefault(), $e(), C.debug("[ScrollPane] wheel event", () => ({ deltaY: Be, scrollPosition: Y.current, wheelSpeedMultiplier: U, deltaMode: p.deltaMode, scrollTop: et.current?.scrollTop })), fe((xe) => xe + Be), !0;
|
|
1207
1207
|
},
|
|
1208
1208
|
[fe, $e]
|
|
1209
1209
|
);
|
|
1210
|
-
|
|
1211
|
-
const p = (
|
|
1212
|
-
U
|
|
1210
|
+
$(() => {
|
|
1211
|
+
const p = (U) => {
|
|
1212
|
+
B(U);
|
|
1213
1213
|
}, _ = () => {
|
|
1214
1214
|
$e();
|
|
1215
1215
|
}, he = ie.current;
|
|
1216
1216
|
return he && (he.addEventListener("wheel", p, { passive: !1 }), he.addEventListener("pointerdown", _, { capture: !0, passive: !0 })), () => {
|
|
1217
1217
|
he && (he.removeEventListener("wheel", p), he.removeEventListener("pointerdown", _, { capture: !0 }));
|
|
1218
1218
|
};
|
|
1219
|
-
}, [
|
|
1219
|
+
}, [B, $e]), Dr(
|
|
1220
1220
|
z,
|
|
1221
1221
|
() => ({
|
|
1222
1222
|
scrollTo: (p, _) => ($e(), fe(p, _)),
|
|
1223
|
-
getScrollPosition: () =>
|
|
1223
|
+
getScrollPosition: () => Y.current,
|
|
1224
1224
|
getContentSize: () => e,
|
|
1225
1225
|
getViewportSize: () => ue,
|
|
1226
|
-
applyWheel:
|
|
1226
|
+
applyWheel: B
|
|
1227
1227
|
}),
|
|
1228
|
-
[fe, e, ue, $e,
|
|
1228
|
+
[fe, e, ue, $e, B]
|
|
1229
1229
|
);
|
|
1230
|
-
const E =
|
|
1230
|
+
const E = Xn(), lt = ee?.id ?? E, Pe = f({
|
|
1231
1231
|
pointerType: "",
|
|
1232
1232
|
pointerId: null,
|
|
1233
1233
|
startClientY: 0,
|
|
@@ -1240,32 +1240,32 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
1240
1240
|
velocitySamples: [],
|
|
1241
1241
|
scale: 1,
|
|
1242
1242
|
scaleX: 1
|
|
1243
|
-
}),
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
}, [
|
|
1247
|
-
|
|
1248
|
-
}, [
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
}, [
|
|
1243
|
+
}), A = f(h), ut = f(b);
|
|
1244
|
+
$(() => {
|
|
1245
|
+
A.current = h;
|
|
1246
|
+
}, [h]), $(() => {
|
|
1247
|
+
ut.current = b;
|
|
1248
|
+
}, [b]);
|
|
1249
|
+
const yt = f(rt);
|
|
1250
|
+
$(() => {
|
|
1251
|
+
yt.current = rt;
|
|
1252
|
+
}, [rt]);
|
|
1253
1253
|
const Dt = f(_e);
|
|
1254
|
-
|
|
1254
|
+
$(() => {
|
|
1255
1255
|
Dt.current = _e;
|
|
1256
|
-
}, [_e]),
|
|
1256
|
+
}, [_e]), $(() => {
|
|
1257
1257
|
const p = Pe.current;
|
|
1258
|
-
if (
|
|
1258
|
+
if (h && rt && (p.pointerId === null || kr(p.pointerType, b)) || p.pointerId === null)
|
|
1259
1259
|
return;
|
|
1260
|
-
const _ =
|
|
1260
|
+
const _ = et.current;
|
|
1261
1261
|
p.clickResetTimer !== null && (window.clearTimeout(p.clickResetTimer), p.clickResetTimer = null);
|
|
1262
|
-
const he = p.isDragging && p.shouldCancelNextClick,
|
|
1263
|
-
p.pointerId = null, p.pointerType = "", p.startClientY = 0, p.startScroll = 0, p.isDragging = !1, p.shouldCancelNextClick = he, p.velocitySamples = [], p.scale = 1, _ !== null &&
|
|
1264
|
-
}, [
|
|
1265
|
-
const p =
|
|
1262
|
+
const he = p.isDragging && p.shouldCancelNextClick, U = p.pointerId;
|
|
1263
|
+
p.pointerId = null, p.pointerType = "", p.startClientY = 0, p.startScroll = 0, p.isDragging = !1, p.shouldCancelNextClick = he, p.velocitySamples = [], p.scale = 1, _ !== null && rr(_, U);
|
|
1264
|
+
}, [h, b, rt]), $(() => {
|
|
1265
|
+
const p = et.current;
|
|
1266
1266
|
if (!p)
|
|
1267
1267
|
return;
|
|
1268
|
-
const _ = 6, he = () => typeof performance < "u" && typeof performance.now == "function" ? performance.now() : Date.now(),
|
|
1268
|
+
const _ = 6, he = () => typeof performance < "u" && typeof performance.now == "function" ? performance.now() : Date.now(), U = () => {
|
|
1269
1269
|
const S = Pe.current;
|
|
1270
1270
|
S.pointerId = null, S.pointerType = "", S.startClientY = 0, S.startScroll = 0, S.isDragging = !1, S.velocitySamples = [], S.scale = 1;
|
|
1271
1271
|
}, re = () => {
|
|
@@ -1275,41 +1275,41 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
1275
1275
|
const T = Pe.current, Ve = he();
|
|
1276
1276
|
T.velocitySamples.push({ clientY: S, time: Ve });
|
|
1277
1277
|
const Xe = Dt.current.velocitySampleWindow;
|
|
1278
|
-
T.velocitySamples = T.velocitySamples.filter((
|
|
1279
|
-
},
|
|
1278
|
+
T.velocitySamples = T.velocitySamples.filter((We) => Ve - We.time <= Xe);
|
|
1279
|
+
}, Be = (S) => S instanceof HTMLElement && S.closest("[data-scrollpane-ignore-drag='true']") !== null, xe = (S) => {
|
|
1280
1280
|
const T = Pe.current;
|
|
1281
1281
|
T.shouldCancelNextClick && (S.preventDefault(), S.stopPropagation(), T.shouldCancelNextClick = !1);
|
|
1282
|
-
},
|
|
1282
|
+
}, Ue = (S) => {
|
|
1283
1283
|
const T = Pe.current;
|
|
1284
|
-
T.isDragging || (T.isDragging = !0, T.shouldCancelNextClick = !0,
|
|
1285
|
-
},
|
|
1284
|
+
T.isDragging || (T.isDragging = !0, T.shouldCancelNextClick = !0, Rn(p, S.pointerId) || Sr(p, S.pointerId), De(S.clientY));
|
|
1285
|
+
}, we = (S) => S.isTrusted || S.target === p, Le = (S) => {
|
|
1286
1286
|
const T = Pe.current;
|
|
1287
|
-
|
|
1288
|
-
},
|
|
1287
|
+
rr(p, S), T.shouldCancelNextClick = !1, re(), U();
|
|
1288
|
+
}, ft = (S) => {
|
|
1289
1289
|
const T = Pe.current;
|
|
1290
1290
|
if (T.pointerId !== S.pointerId)
|
|
1291
1291
|
return;
|
|
1292
|
-
if (S.buttons === 0 &&
|
|
1292
|
+
if (S.buttons === 0 && hi(S.pointerType)) {
|
|
1293
1293
|
Le(S.pointerId);
|
|
1294
1294
|
return;
|
|
1295
1295
|
}
|
|
1296
|
-
if (!(
|
|
1296
|
+
if (!(A.current && yt.current) || !kr(S.pointerType, ut.current))
|
|
1297
1297
|
return;
|
|
1298
1298
|
if (!T.isDragging) {
|
|
1299
|
-
const
|
|
1300
|
-
if (Math.max(
|
|
1299
|
+
const at = Math.abs(S.clientY - T.startClientY), ht = it.current ? Math.abs(S.clientX - T.startClientX) : 0;
|
|
1300
|
+
if (Math.max(at, ht) < _ || (Ue(S), !T.isDragging))
|
|
1301
1301
|
return;
|
|
1302
1302
|
}
|
|
1303
1303
|
De(S.clientY);
|
|
1304
1304
|
const Ve = (S.clientY - T.startClientY) / (T.scale || 1), Xe = T.startScroll - Ve;
|
|
1305
1305
|
ze.current(Xe);
|
|
1306
|
-
const
|
|
1307
|
-
if (
|
|
1308
|
-
const
|
|
1309
|
-
T.lastPanClientX = S.clientX,
|
|
1306
|
+
const We = it.current;
|
|
1307
|
+
if (We) {
|
|
1308
|
+
const at = S.clientX - T.lastPanClientX;
|
|
1309
|
+
T.lastPanClientX = S.clientX, at !== 0 && We(-at / (T.scaleX || 1));
|
|
1310
1310
|
}
|
|
1311
1311
|
S.cancelable && S.preventDefault();
|
|
1312
|
-
},
|
|
1312
|
+
}, ot = () => {
|
|
1313
1313
|
const S = Pe.current;
|
|
1314
1314
|
return S.pointerId !== null || !S.shouldCancelNextClick ? !1 : (re(), S.clickResetTimer = window.setTimeout(() => {
|
|
1315
1315
|
const T = Pe.current;
|
|
@@ -1318,68 +1318,68 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
1318
1318
|
}, Fe = (S) => {
|
|
1319
1319
|
const T = Pe.current;
|
|
1320
1320
|
if (T.pointerId !== S.pointerId) {
|
|
1321
|
-
|
|
1321
|
+
ot();
|
|
1322
1322
|
return;
|
|
1323
1323
|
}
|
|
1324
1324
|
T.isDragging && T.shouldCancelNextClick && S.cancelable && (S.preventDefault(), S.stopPropagation()), T.isDragging && De(S.clientY);
|
|
1325
1325
|
let Ve = 0;
|
|
1326
1326
|
if (T.isDragging && T.velocitySamples.length >= 2) {
|
|
1327
|
-
const
|
|
1328
|
-
if (
|
|
1329
|
-
const
|
|
1330
|
-
Ve = -(
|
|
1327
|
+
const We = T.velocitySamples, at = Dt.current.velocitySampleWindow, ht = We[We.length - 1], ye = We.find((Pt) => ht.time - Pt.time <= at) ?? We[0];
|
|
1328
|
+
if (ht && ye && ht.time !== ye.time) {
|
|
1329
|
+
const Pt = ht.clientY - ye.clientY, Qt = ht.time - ye.time;
|
|
1330
|
+
Ve = -(Pt / Qt) / (T.scale || 1);
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
1333
|
re(), T.shouldCancelNextClick && (T.clickResetTimer = window.setTimeout(() => {
|
|
1334
|
-
const
|
|
1335
|
-
|
|
1334
|
+
const We = Pe.current;
|
|
1335
|
+
We.shouldCancelNextClick = !1, We.clickResetTimer = null;
|
|
1336
1336
|
}, 0));
|
|
1337
1337
|
const Xe = Dt.current.startVelocityThreshold;
|
|
1338
|
-
|
|
1339
|
-
},
|
|
1338
|
+
U(), rr(p, S.pointerId), Math.abs(Ve) >= Xe && Z.current?.(Ve);
|
|
1339
|
+
}, Ge = (S) => {
|
|
1340
1340
|
if (Pe.current.pointerId !== null) {
|
|
1341
1341
|
if (!S.isPrimary || S.pointerType !== Pe.current.pointerType)
|
|
1342
1342
|
return;
|
|
1343
1343
|
Le(Pe.current.pointerId);
|
|
1344
1344
|
}
|
|
1345
|
-
if (Pe.current.shouldCancelNextClick && (re(), Pe.current.shouldCancelNextClick = !1), !(
|
|
1345
|
+
if (Pe.current.shouldCancelNextClick && (re(), Pe.current.shouldCancelNextClick = !1), !(A.current && yt.current) || !kr(S.pointerType, ut.current) || S.button !== 0 && S.pointerType === "mouse" || S.ctrlKey || S.metaKey || S.altKey || Be(S.target))
|
|
1346
1346
|
return;
|
|
1347
|
-
window.dispatchEvent(new CustomEvent(
|
|
1347
|
+
window.dispatchEvent(new CustomEvent(Mr, { detail: { paneId: E } })), F.current?.();
|
|
1348
1348
|
const T = Pe.current;
|
|
1349
|
-
re(), T.pointerId = S.pointerId, T.pointerType = S.pointerType, T.startClientY = S.clientY, T.startClientX = S.clientX, T.lastPanClientX = S.clientX, T.startScroll =
|
|
1350
|
-
},
|
|
1349
|
+
re(), T.pointerId = S.pointerId, T.pointerType = S.pointerType, T.startClientY = S.clientY, T.startClientX = S.clientX, T.lastPanClientX = S.clientX, T.startScroll = Y.current, T.scale = Br(p, "y"), T.scaleX = it.current ? Br(p, "x") : 1, T.isDragging = !1, T.shouldCancelNextClick = !1, T.velocitySamples = [];
|
|
1350
|
+
}, be = (S) => {
|
|
1351
1351
|
if (Pe.current.pointerId !== S.pointerId) {
|
|
1352
|
-
|
|
1352
|
+
ot();
|
|
1353
1353
|
return;
|
|
1354
1354
|
}
|
|
1355
|
-
|
|
1356
|
-
},
|
|
1357
|
-
["click",
|
|
1358
|
-
["pointerdown",
|
|
1355
|
+
we(S) && Le(S.pointerId);
|
|
1356
|
+
}, je = [
|
|
1357
|
+
["click", xe, !0],
|
|
1358
|
+
["pointerdown", Ge, { passive: !1 }],
|
|
1359
1359
|
["lostpointercapture", (S) => {
|
|
1360
1360
|
S.target !== p || Pe.current.pointerId !== S.pointerId || Le(S.pointerId);
|
|
1361
1361
|
}, void 0]
|
|
1362
1362
|
], Ee = [
|
|
1363
|
-
["pointermove",
|
|
1363
|
+
["pointermove", ft, { passive: !1 }],
|
|
1364
1364
|
["pointerup", Fe, void 0],
|
|
1365
|
-
["pointercancel",
|
|
1365
|
+
["pointercancel", be, void 0]
|
|
1366
1366
|
];
|
|
1367
|
-
return
|
|
1368
|
-
|
|
1367
|
+
return Nr(p, je, "add"), Nr(window, Ee, "add"), () => {
|
|
1368
|
+
Nr(p, je, "remove"), Nr(window, Ee, "remove");
|
|
1369
1369
|
const S = Pe.current;
|
|
1370
|
-
S.pointerId !== null &&
|
|
1370
|
+
S.pointerId !== null && rr(p, S.pointerId), re(), U();
|
|
1371
1371
|
};
|
|
1372
1372
|
}, [E]);
|
|
1373
|
-
const
|
|
1373
|
+
const dt = x(
|
|
1374
1374
|
(p) => ($e(), fe(p)),
|
|
1375
1375
|
[fe, $e]
|
|
1376
1376
|
);
|
|
1377
|
-
return /* @__PURE__ */
|
|
1378
|
-
/* @__PURE__ */
|
|
1377
|
+
return /* @__PURE__ */ Bt("div", { ref: ie, "data-testid": w, "data-self-measured": ce ? "true" : void 0, className: Ct("aqvs-scroll-pane", I), style: R, children: [
|
|
1378
|
+
/* @__PURE__ */ Bt(
|
|
1379
1379
|
"div",
|
|
1380
1380
|
{
|
|
1381
|
-
ref:
|
|
1382
|
-
className:
|
|
1381
|
+
ref: et,
|
|
1382
|
+
className: Ct("aqvs-scroll-pane-content"),
|
|
1383
1383
|
"data-testid": "aqvs-scroll-pane-content",
|
|
1384
1384
|
style: {
|
|
1385
1385
|
// ❗ 自己計測モードでは高さを書かない。CSS の `height: 100%` (= ルートの確定高さ) が
|
|
@@ -1387,8 +1387,8 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
1387
1387
|
// フィードバックループが構造的に起こらず、初回 paint の時点でも帯は実寸で正しい
|
|
1388
1388
|
// (数値の反映だけが 1 コミット遅れる)。明示モードは従来どおり px を書く。
|
|
1389
1389
|
height: ce ? void 0 : ue,
|
|
1390
|
-
paddingTop:
|
|
1391
|
-
paddingBottom:
|
|
1390
|
+
paddingTop: st.top,
|
|
1391
|
+
paddingBottom: st.bottom,
|
|
1392
1392
|
// スクロール不能時 (contentSize <= viewportSize) は touch-action を通常に戻し、
|
|
1393
1393
|
// 短いリスト上のタッチがページ全体のパンを妨げるデッドゾーン化を防ぐ。
|
|
1394
1394
|
// 直接操作 (指・ペン) のドラッグを許可していない場合も付けない。
|
|
@@ -1402,47 +1402,47 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
1402
1402
|
// 同一条件で揃えてあるため状態としても一貫している。
|
|
1403
1403
|
// 非同期コンテンツを先読みして確保する挙動は意図的に入れていない
|
|
1404
1404
|
// (空のペインがページのパンを殺すデッドゾーンになり、そちらの実害の方が大きいため)。
|
|
1405
|
-
...
|
|
1405
|
+
...h && rt && b.some((p) => p === "touch" || p === "pen") ? { touchAction: "none" } : {}
|
|
1406
1406
|
},
|
|
1407
|
-
...
|
|
1408
|
-
id:
|
|
1407
|
+
...ee,
|
|
1408
|
+
id: lt,
|
|
1409
1409
|
children: [
|
|
1410
1410
|
ne,
|
|
1411
|
-
t(
|
|
1411
|
+
t(Y.current)
|
|
1412
1412
|
]
|
|
1413
1413
|
}
|
|
1414
1414
|
),
|
|
1415
|
-
/* @__PURE__ */
|
|
1416
|
-
|
|
1415
|
+
/* @__PURE__ */ j(
|
|
1416
|
+
zn,
|
|
1417
1417
|
{
|
|
1418
1418
|
contentSize: e,
|
|
1419
1419
|
viewportSize: ue,
|
|
1420
1420
|
stretchMainSize: ce,
|
|
1421
|
-
scrollPosition:
|
|
1422
|
-
onScroll:
|
|
1421
|
+
scrollPosition: Y.current,
|
|
1422
|
+
onScroll: dt,
|
|
1423
1423
|
enableThumbDrag: s,
|
|
1424
1424
|
enableTrackClick: o,
|
|
1425
1425
|
enableArrowButtons: l,
|
|
1426
1426
|
enableArrowButtonTabStops: d,
|
|
1427
1427
|
scrollBarWidth: i,
|
|
1428
|
-
ariaControls:
|
|
1429
|
-
tapScrollCircleOptions:
|
|
1430
|
-
itemCount:
|
|
1428
|
+
ariaControls: lt,
|
|
1429
|
+
tapScrollCircleOptions: X,
|
|
1430
|
+
itemCount: Ae,
|
|
1431
1431
|
renderThumbOverlay: D,
|
|
1432
|
-
visibleStartIndex:
|
|
1432
|
+
visibleStartIndex: J,
|
|
1433
1433
|
visibleEndIndex: K,
|
|
1434
1434
|
locale: ge,
|
|
1435
|
-
labels:
|
|
1435
|
+
labels: Je
|
|
1436
1436
|
},
|
|
1437
1437
|
"scrollbar"
|
|
1438
1438
|
),
|
|
1439
|
-
|
|
1439
|
+
q?.()
|
|
1440
1440
|
] });
|
|
1441
1441
|
}
|
|
1442
|
-
),
|
|
1443
|
-
const i = Math.max(n / 2, 1), s = 1 + e * 0.65, o = Math.max(0.65, 1 - e * 0.25), l = t.direction * e * 26 * r, d = 0.8 + e * 0.18,
|
|
1444
|
-
return /* @__PURE__ */
|
|
1445
|
-
/* @__PURE__ */
|
|
1442
|
+
), fn = (t, e, r) => Math.min(Math.max(t, e), r), Bi = ({ dragState: t, normalizedDistance: e, sizeScale: r, size: n }) => {
|
|
1443
|
+
const i = Math.max(n / 2, 1), s = 1 + e * 0.65, o = Math.max(0.65, 1 - e * 0.25), l = t.direction * e * 26 * r, d = 0.8 + e * 0.18, h = 3 * r, b = 6 * r, M = 22 * r, I = Math.abs(l) + b, w = l > 0 ? h : -Math.abs(l) - h, R = Math.max(2.5, 3 * r), ne = fn(t.offsetX, -i, i), X = fn(t.offsetY, -i, i), pe = i * 0.35, Ae = ne / i * pe, D = X / i * pe, k = Ae * 0.45, ae = D * 0.45, L = Math.max(M * 0.38, 6), N = 0.65 + e * 0.2, P = t.active;
|
|
1444
|
+
return /* @__PURE__ */ Bt(jr, { children: [
|
|
1445
|
+
/* @__PURE__ */ j(
|
|
1446
1446
|
"div",
|
|
1447
1447
|
{
|
|
1448
1448
|
className: "aqvs-tap-scroll-circle-gradient",
|
|
@@ -1452,39 +1452,39 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
1454
|
),
|
|
1455
|
-
/* @__PURE__ */
|
|
1455
|
+
/* @__PURE__ */ j(
|
|
1456
1456
|
"div",
|
|
1457
1457
|
{
|
|
1458
1458
|
className: "aqvs-sample-visual-pupil",
|
|
1459
1459
|
style: {
|
|
1460
1460
|
width: M,
|
|
1461
1461
|
height: M,
|
|
1462
|
-
transform: `translate(calc(-50% + ${
|
|
1462
|
+
transform: `translate(calc(-50% + ${Ae}px), calc(-50% + ${D}px)) scale(${o}, ${d * s})`,
|
|
1463
1463
|
transition: P ? "70ms transform ease-out" : "200ms ease transform"
|
|
1464
1464
|
}
|
|
1465
1465
|
}
|
|
1466
1466
|
),
|
|
1467
|
-
/* @__PURE__ */
|
|
1467
|
+
/* @__PURE__ */ j(
|
|
1468
1468
|
"div",
|
|
1469
1469
|
{
|
|
1470
1470
|
className: "aqvs-sample-visual-highlight",
|
|
1471
1471
|
style: {
|
|
1472
1472
|
width: L,
|
|
1473
1473
|
height: L,
|
|
1474
|
-
transform: `translate(calc(-50% + ${
|
|
1474
|
+
transform: `translate(calc(-50% + ${k}px), calc(-50% + ${ae}px)) scale(${o}, ${s})`,
|
|
1475
1475
|
opacity: N,
|
|
1476
1476
|
boxShadow: "0 0 8px rgba(255,255,255,0.45)",
|
|
1477
1477
|
transition: P ? "120ms opacity 150ms, 120ms transform ease-out ease-out" : "220ms ease transform, 240ms opacity ease"
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
1480
|
),
|
|
1481
|
-
/* @__PURE__ */
|
|
1481
|
+
/* @__PURE__ */ j(
|
|
1482
1482
|
"div",
|
|
1483
1483
|
{
|
|
1484
1484
|
className: "aqvs-sample-visual-rod",
|
|
1485
1485
|
style: {
|
|
1486
1486
|
width: R,
|
|
1487
|
-
height:
|
|
1487
|
+
height: I,
|
|
1488
1488
|
transform: `translate(-50%, ${w}px)`,
|
|
1489
1489
|
opacity: e,
|
|
1490
1490
|
transition: P ? "40ms height, 60ms opacity ease-out ease-out" : "200ms ease height, 120ms ease opacity"
|
|
@@ -1492,16 +1492,16 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
1492
1492
|
}
|
|
1493
1493
|
)
|
|
1494
1494
|
] });
|
|
1495
|
-
},
|
|
1495
|
+
}, hr = 100, pi = (t) => {
|
|
1496
1496
|
if (!Number.isFinite(t))
|
|
1497
1497
|
return 0n;
|
|
1498
1498
|
const e = Math.trunc(t);
|
|
1499
1499
|
return e <= 0 ? 0n : BigInt(e);
|
|
1500
|
-
},
|
|
1500
|
+
}, Hr = (t, e) => {
|
|
1501
1501
|
if (!Number.isFinite(t))
|
|
1502
1502
|
throw new Error(`valueFn returned a non-finite value at index ${e}: ${t}`);
|
|
1503
1503
|
return t;
|
|
1504
|
-
},
|
|
1504
|
+
}, mr = (t) => {
|
|
1505
1505
|
if (t <= 0 || !Number.isFinite(t))
|
|
1506
1506
|
return 0;
|
|
1507
1507
|
const e = Math.trunc(t);
|
|
@@ -1510,7 +1510,7 @@ const se = (t, e, r) => Math.max(e, Math.min(r, t)), Gr = (t, e) => {
|
|
|
1510
1510
|
const r = BigInt(e) & -BigInt(e);
|
|
1511
1511
|
return Number(r);
|
|
1512
1512
|
};
|
|
1513
|
-
class
|
|
1513
|
+
class Zt {
|
|
1514
1514
|
/**
|
|
1515
1515
|
* @private
|
|
1516
1516
|
* @property {Map<number, number>} tree - The Map storing the Fenwick tree structure, specifically the sums of deltas. It is 1-indexed.
|
|
@@ -1580,30 +1580,30 @@ class er {
|
|
|
1580
1580
|
throw new RangeError(`[FenwickMapTree] options.baseValue must be a finite number >= 0, received ${l}.`);
|
|
1581
1581
|
if (i > 0 && l !== void 0) {
|
|
1582
1582
|
if (s = l, n?.materialize) {
|
|
1583
|
-
const d = n?.sampleRange ?? { from: 0, to: Math.min(
|
|
1584
|
-
let
|
|
1585
|
-
|
|
1583
|
+
const d = n?.sampleRange ?? { from: 0, to: Math.min(hr - 1, i - 1) };
|
|
1584
|
+
let h = Math.max(0, Math.trunc(d.from)), b = Math.min(Math.trunc(d.to), i - 1);
|
|
1585
|
+
h > b && (h = 0, b = Math.min(hr - 1, i - 1)), o = { from: h, values: Zt._collectValidatedValues(r, h, b) };
|
|
1586
1586
|
}
|
|
1587
1587
|
} else if (i > 0) {
|
|
1588
1588
|
const d = n?.sampleRange ?? {
|
|
1589
1589
|
from: 0,
|
|
1590
|
-
to: Math.min(
|
|
1590
|
+
to: Math.min(hr - 1, i - 1)
|
|
1591
1591
|
};
|
|
1592
|
-
let
|
|
1593
|
-
if (
|
|
1594
|
-
s =
|
|
1592
|
+
let h = Math.max(0, Math.trunc(d.from)), b = Math.min(Math.trunc(d.to), i - 1);
|
|
1593
|
+
if (h > b && (h = 0, b = Math.min(hr - 1, i - 1)), i > hr)
|
|
1594
|
+
s = Zt._sampleBaseValueStrided(r, i, hr), n?.materialize && (o = { from: h, values: Zt._collectValidatedValues(r, h, b) });
|
|
1595
1595
|
else {
|
|
1596
|
-
const M =
|
|
1597
|
-
s =
|
|
1596
|
+
const M = Zt._collectValidatedValues(r, h, b);
|
|
1597
|
+
s = Zt._modeOrMedian([...M]), n?.materialize && (o = { from: h, values: M });
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
1600
|
if (this.size = i, this.tree = /* @__PURE__ */ new Map(), this.deltas = /* @__PURE__ */ new Map(), this.total = void 0, this.valueFn = r, this.baseValue = s, o)
|
|
1601
1601
|
for (let d = 0; d < o.values.length; d++) {
|
|
1602
|
-
const
|
|
1603
|
-
if (
|
|
1602
|
+
const h = o.from + d;
|
|
1603
|
+
if (h >= this.size)
|
|
1604
1604
|
break;
|
|
1605
|
-
const
|
|
1606
|
-
|
|
1605
|
+
const b = o.values[d] - this.baseValue;
|
|
1606
|
+
b !== 0 && (this.deltas.set(h, b), this._updateTree(h, b));
|
|
1607
1607
|
}
|
|
1608
1608
|
this.total = this.getTotal();
|
|
1609
1609
|
}
|
|
@@ -1634,7 +1634,7 @@ class er {
|
|
|
1634
1634
|
static _collectValidatedValues(e, r, n) {
|
|
1635
1635
|
const i = [];
|
|
1636
1636
|
for (let s = r; s <= n; s++)
|
|
1637
|
-
i.push(
|
|
1637
|
+
i.push(Hr(e(s), s));
|
|
1638
1638
|
return i;
|
|
1639
1639
|
}
|
|
1640
1640
|
/**
|
|
@@ -1660,9 +1660,9 @@ class er {
|
|
|
1660
1660
|
}
|
|
1661
1661
|
if (s > e.length * 0.2) {
|
|
1662
1662
|
const o = [];
|
|
1663
|
-
for (const [d,
|
|
1664
|
-
|
|
1665
|
-
const l = o.reduce((d,
|
|
1663
|
+
for (const [d, h] of i.entries())
|
|
1664
|
+
h === s && o.push(d);
|
|
1665
|
+
const l = o.reduce((d, h) => d + h, 0);
|
|
1666
1666
|
n = Math.floor(l / o.length);
|
|
1667
1667
|
}
|
|
1668
1668
|
return n;
|
|
@@ -1684,8 +1684,8 @@ class er {
|
|
|
1684
1684
|
i % 2 === 0 && (i += 1);
|
|
1685
1685
|
const s = [];
|
|
1686
1686
|
for (let o = 0; o < r && s.length < n; o += i)
|
|
1687
|
-
s.push(
|
|
1688
|
-
return
|
|
1687
|
+
s.push(Hr(e(o), o));
|
|
1688
|
+
return Zt._modeOrMedian(s);
|
|
1689
1689
|
}
|
|
1690
1690
|
/**
|
|
1691
1691
|
* @method update
|
|
@@ -1757,7 +1757,7 @@ class er {
|
|
|
1757
1757
|
let n = e + 1;
|
|
1758
1758
|
for (; n <= this.size; ) {
|
|
1759
1759
|
this.tree.set(n, (this.tree.get(n) ?? 0) + r);
|
|
1760
|
-
const i =
|
|
1760
|
+
const i = mr(n);
|
|
1761
1761
|
if (i === 0)
|
|
1762
1762
|
break;
|
|
1763
1763
|
n += i;
|
|
@@ -1801,7 +1801,7 @@ class er {
|
|
|
1801
1801
|
let e = 0, r = this.size;
|
|
1802
1802
|
for (; r > 0; ) {
|
|
1803
1803
|
e += this.tree.get(r) ?? 0;
|
|
1804
|
-
const n =
|
|
1804
|
+
const n = mr(r);
|
|
1805
1805
|
if (n === 0)
|
|
1806
1806
|
break;
|
|
1807
1807
|
r -= n;
|
|
@@ -1818,7 +1818,7 @@ class er {
|
|
|
1818
1818
|
*/
|
|
1819
1819
|
_materialize(e, r = !0) {
|
|
1820
1820
|
if (this.valueFn) {
|
|
1821
|
-
const n = this.deltas.get(e) ?? 0, s =
|
|
1821
|
+
const n = this.deltas.get(e) ?? 0, s = Hr(this.valueFn(e), e) - this.baseValue;
|
|
1822
1822
|
if (s !== n && (s === 0 ? this.deltas.delete(e) : this.deltas.set(e, s), r)) {
|
|
1823
1823
|
const o = s - n;
|
|
1824
1824
|
this._updateTree(e, o);
|
|
@@ -1840,9 +1840,9 @@ class er {
|
|
|
1840
1840
|
const i = e.ranges;
|
|
1841
1841
|
if (i && i.length > 0) {
|
|
1842
1842
|
for (const l of i) {
|
|
1843
|
-
const d = Math.max(0, Math.trunc(l.from)),
|
|
1844
|
-
for (let
|
|
1845
|
-
this._materialize(
|
|
1843
|
+
const d = Math.max(0, Math.trunc(l.from)), h = Math.min(Math.trunc(l.to), this.size - 1);
|
|
1844
|
+
for (let b = d; b <= h; b++)
|
|
1845
|
+
this._materialize(b);
|
|
1846
1846
|
}
|
|
1847
1847
|
if (r === void 0)
|
|
1848
1848
|
return;
|
|
@@ -1922,17 +1922,17 @@ class er {
|
|
|
1922
1922
|
_findIndexLarge(e, r, n) {
|
|
1923
1923
|
if (this.size === 0)
|
|
1924
1924
|
return { index: -1, total: this.total ?? 0, cumulative: void 0, currentValue: void 0, safeIndex: void 0 };
|
|
1925
|
-
const i =
|
|
1925
|
+
const i = pi(this.size);
|
|
1926
1926
|
if (i === 0n)
|
|
1927
1927
|
return { index: -1, total: this.total ?? 0, cumulative: void 0, currentValue: void 0, safeIndex: void 0 };
|
|
1928
1928
|
this._materializeRanges(r.materializeOption);
|
|
1929
1929
|
const s = r.materializeOption?.materialize === !0;
|
|
1930
1930
|
for (; ; ) {
|
|
1931
|
-
let o = 0n, l = i - 1n, d,
|
|
1931
|
+
let o = 0n, l = i - 1n, d, h, b = this.total;
|
|
1932
1932
|
for (; o <= l; ) {
|
|
1933
1933
|
const w = o + l >> 1n, R = Number(w), ne = this.prefixSum(R);
|
|
1934
|
-
if (
|
|
1935
|
-
if (d = w,
|
|
1934
|
+
if (b = ne.total, n ? ne.cumulative >= e : ne.cumulative <= e)
|
|
1935
|
+
if (d = w, h = ne, n) {
|
|
1936
1936
|
if (w === 0n)
|
|
1937
1937
|
break;
|
|
1938
1938
|
l = w - 1n;
|
|
@@ -1946,15 +1946,15 @@ class er {
|
|
|
1946
1946
|
l = w - 1n;
|
|
1947
1947
|
}
|
|
1948
1948
|
}
|
|
1949
|
-
const M =
|
|
1950
|
-
if (s &&
|
|
1951
|
-
const w = this.deltas.get(
|
|
1952
|
-
if (this._materialize(
|
|
1949
|
+
const M = h, I = d !== void 0 ? Number(d) : -1;
|
|
1950
|
+
if (s && I >= 0) {
|
|
1951
|
+
const w = this.deltas.get(I) ?? 0;
|
|
1952
|
+
if (this._materialize(I), (this.deltas.get(I) ?? 0) !== w)
|
|
1953
1953
|
continue;
|
|
1954
1954
|
}
|
|
1955
1955
|
return {
|
|
1956
|
-
index:
|
|
1957
|
-
total:
|
|
1956
|
+
index: I,
|
|
1957
|
+
total: b,
|
|
1958
1958
|
cumulative: M?.cumulative,
|
|
1959
1959
|
currentValue: M?.currentValue,
|
|
1960
1960
|
safeIndex: M?.safeIndex
|
|
@@ -1980,10 +1980,10 @@ class er {
|
|
|
1980
1980
|
for (; o > 0; ) {
|
|
1981
1981
|
const d = this.tree.get(o) ?? 0;
|
|
1982
1982
|
s += d;
|
|
1983
|
-
const
|
|
1984
|
-
if (
|
|
1983
|
+
const h = mr(o);
|
|
1984
|
+
if (h === 0)
|
|
1985
1985
|
break;
|
|
1986
|
-
o -=
|
|
1986
|
+
o -= h;
|
|
1987
1987
|
}
|
|
1988
1988
|
const l = i?.materialize ? this.get(n) : (this.deltas.get(n) || 0) + this.baseValue;
|
|
1989
1989
|
return { cumulative: s + this.baseValue * (n + 1), total: this.total, currentValue: l, safeIndex: n };
|
|
@@ -2019,7 +2019,7 @@ class er {
|
|
|
2019
2019
|
else {
|
|
2020
2020
|
this.total = this._computeTreeTotal();
|
|
2021
2021
|
const n = this.prefixSum(this.getSize() - 1);
|
|
2022
|
-
n.cumulative !== n.total &&
|
|
2022
|
+
n.cumulative !== n.total && C.error("Inconsistent Fenwick Tree state");
|
|
2023
2023
|
}
|
|
2024
2024
|
return this.total;
|
|
2025
2025
|
}
|
|
@@ -2043,7 +2043,7 @@ class er {
|
|
|
2043
2043
|
let s = n + 1;
|
|
2044
2044
|
for (; s <= this.size; ) {
|
|
2045
2045
|
r.set(s, (r.get(s) ?? 0) + i);
|
|
2046
|
-
const o =
|
|
2046
|
+
const o = mr(s);
|
|
2047
2047
|
if (o === 0)
|
|
2048
2048
|
break;
|
|
2049
2049
|
s += o;
|
|
@@ -2126,7 +2126,7 @@ class er {
|
|
|
2126
2126
|
this.size = r, this.rebuildTree();
|
|
2127
2127
|
}
|
|
2128
2128
|
const i = this.prefixSum(this.getSize() - 1);
|
|
2129
|
-
i.cumulative !== i.total &&
|
|
2129
|
+
i.cumulative !== i.total && C.error("Inconsistent Fenwick Tree state");
|
|
2130
2130
|
}
|
|
2131
2131
|
/**
|
|
2132
2132
|
* @private
|
|
@@ -2160,14 +2160,14 @@ class er {
|
|
|
2160
2160
|
_propagateDeltaToGrownNodes(e, r, n, i) {
|
|
2161
2161
|
let s = e + 1;
|
|
2162
2162
|
for (; s <= n; ) {
|
|
2163
|
-
const o =
|
|
2163
|
+
const o = mr(s);
|
|
2164
2164
|
if (o === 0)
|
|
2165
2165
|
break;
|
|
2166
2166
|
s += o;
|
|
2167
2167
|
}
|
|
2168
2168
|
for (; s <= i; ) {
|
|
2169
2169
|
this.tree.set(s, (this.tree.get(s) ?? 0) + r);
|
|
2170
|
-
const o =
|
|
2170
|
+
const o = mr(s);
|
|
2171
2171
|
if (o === 0)
|
|
2172
2172
|
break;
|
|
2173
2173
|
s += o;
|
|
@@ -2183,7 +2183,7 @@ class er {
|
|
|
2183
2183
|
*/
|
|
2184
2184
|
_growSize(e, r) {
|
|
2185
2185
|
if (this.size = r, this.deltas.size > 0) {
|
|
2186
|
-
const n =
|
|
2186
|
+
const n = Zt._minCoveredLowBound(e, r);
|
|
2187
2187
|
if (e - n < this.deltas.size)
|
|
2188
2188
|
for (let s = n; s < e; s++) {
|
|
2189
2189
|
const o = this.deltas.get(s);
|
|
@@ -2261,20 +2261,20 @@ class er {
|
|
|
2261
2261
|
return this._findIndex(e, r ?? {}, !1);
|
|
2262
2262
|
}
|
|
2263
2263
|
}
|
|
2264
|
-
const
|
|
2264
|
+
const gi = (t, e) => {
|
|
2265
2265
|
const r = t?.sampleRange, n = e?.sampleRange;
|
|
2266
2266
|
return r === n ? !1 : r && n ? r.from !== n.from || r.to !== n.to : !0;
|
|
2267
|
-
},
|
|
2267
|
+
}, Vn = (t, e, r) => {
|
|
2268
2268
|
const n = Number.isFinite(t) && t > 0 ? Math.trunc(t) : 0, i = f(null), s = f({ size: n, valueOrFn: e, options: r });
|
|
2269
|
-
i.current === null && (i.current = new
|
|
2270
|
-
const o = i.current, l = s.current, d = l.size !== n,
|
|
2271
|
-
if (
|
|
2272
|
-
const
|
|
2273
|
-
|
|
2274
|
-
} else d && (r?.debug &&
|
|
2269
|
+
i.current === null && (i.current = new Zt(n, e, r));
|
|
2270
|
+
const o = i.current, l = s.current, d = l.size !== n, h = l.valueOrFn !== e, b = gi(l.options, r) || l.options?.baseValue !== r?.baseValue, M = l.size === 0 && n > 0 && (!i.current || i.current.base === 0);
|
|
2271
|
+
if (h || b) {
|
|
2272
|
+
const I = r?.resetOnValueFnChange ?? !0;
|
|
2273
|
+
b || h && I || M ? (r?.debug && C.debug("[useFenwickMapTree] reset", { valueOrFnChanged: h, optionsChanged: b }), o.reset(n, e, r)) : (d && (r?.debug && C.debug("[useFenwickMapTree] resize (with valueFn change)", { from: l.size, to: n }), o.changeSize(n)), r?.debug && C.debug("[useFenwickMapTree] setValueFn (no reset)", { valueOrFnChanged: h }), o.setValueFn(e, { reset: !1 })), s.current = { size: n, valueOrFn: e, options: r };
|
|
2274
|
+
} else d && (r?.debug && C.debug("[useFenwickMapTree] resize", { from: l.size, to: n }), M ? o.reset(n, e, r) : o.changeSize(n), s.current = { size: n, valueOrFn: e, options: r });
|
|
2275
2275
|
return o;
|
|
2276
2276
|
};
|
|
2277
|
-
class
|
|
2277
|
+
class bi {
|
|
2278
2278
|
key;
|
|
2279
2279
|
value;
|
|
2280
2280
|
prev = null;
|
|
@@ -2283,7 +2283,7 @@ class pi {
|
|
|
2283
2283
|
this.key = e, this.value = r;
|
|
2284
2284
|
}
|
|
2285
2285
|
}
|
|
2286
|
-
class
|
|
2286
|
+
class $r {
|
|
2287
2287
|
head = null;
|
|
2288
2288
|
tail = null;
|
|
2289
2289
|
/**
|
|
@@ -2324,58 +2324,58 @@ class Yr {
|
|
|
2324
2324
|
this.remove(e), this.addToTail(e);
|
|
2325
2325
|
}
|
|
2326
2326
|
}
|
|
2327
|
-
function
|
|
2328
|
-
const e = f(/* @__PURE__ */ new Map()), r = f(new
|
|
2329
|
-
|
|
2327
|
+
function xi(t) {
|
|
2328
|
+
const e = f(/* @__PURE__ */ new Map()), r = f(new $r()), n = Math.floor(t), i = f(n);
|
|
2329
|
+
$(() => {
|
|
2330
2330
|
if (i.current = n, Number.isNaN(n) || n < 0) {
|
|
2331
|
-
|
|
2331
|
+
C.warn(`useLruCache: invalid capacity ${t}; the cache will not store any entries.`), e.current.clear(), r.current = new $r();
|
|
2332
2332
|
return;
|
|
2333
2333
|
}
|
|
2334
2334
|
if (Number.isFinite(n))
|
|
2335
2335
|
for (; e.current.size > n; ) {
|
|
2336
|
-
const
|
|
2337
|
-
if (
|
|
2338
|
-
e.current.delete(
|
|
2336
|
+
const b = r.current.removeHead();
|
|
2337
|
+
if (b)
|
|
2338
|
+
e.current.delete(b.key);
|
|
2339
2339
|
else
|
|
2340
2340
|
break;
|
|
2341
2341
|
}
|
|
2342
2342
|
}, [t, n]);
|
|
2343
|
-
const s =
|
|
2344
|
-
const M = e.current.get(
|
|
2343
|
+
const s = x((b) => {
|
|
2344
|
+
const M = e.current.get(b);
|
|
2345
2345
|
if (M)
|
|
2346
2346
|
return r.current.moveToTail(M), M.value;
|
|
2347
|
-
}, []), o =
|
|
2348
|
-
const
|
|
2349
|
-
if (Number.isNaN(
|
|
2347
|
+
}, []), o = x((b, M) => {
|
|
2348
|
+
const I = i.current;
|
|
2349
|
+
if (Number.isNaN(I) || I <= 0)
|
|
2350
2350
|
return;
|
|
2351
|
-
let w = e.current.get(
|
|
2351
|
+
let w = e.current.get(b);
|
|
2352
2352
|
if (w)
|
|
2353
2353
|
w.value = M, r.current.moveToTail(w);
|
|
2354
2354
|
else {
|
|
2355
|
-
if (e.current.size >=
|
|
2355
|
+
if (e.current.size >= I) {
|
|
2356
2356
|
const R = r.current.removeHead();
|
|
2357
2357
|
R && e.current.delete(R.key);
|
|
2358
2358
|
}
|
|
2359
|
-
w = new
|
|
2359
|
+
w = new bi(b, M), e.current.set(b, w), r.current.addToTail(w);
|
|
2360
2360
|
}
|
|
2361
|
-
}, []), l =
|
|
2362
|
-
const M = e.current.get(
|
|
2363
|
-
M && (r.current.remove(M), e.current.delete(
|
|
2364
|
-
}, []),
|
|
2365
|
-
e.current.clear(), r.current = new
|
|
2361
|
+
}, []), l = x((b) => e.current.has(b), []), d = x((b) => {
|
|
2362
|
+
const M = e.current.get(b);
|
|
2363
|
+
M && (r.current.remove(M), e.current.delete(b));
|
|
2364
|
+
}, []), h = x(() => {
|
|
2365
|
+
e.current.clear(), r.current = new $r();
|
|
2366
2366
|
}, []);
|
|
2367
|
-
return
|
|
2367
|
+
return ve(() => ({ get: s, set: o, has: l, remove: d, clear: h }), [s, o, l, d, h]);
|
|
2368
2368
|
}
|
|
2369
|
-
const
|
|
2370
|
-
const { get: t, set: e, has: r, clear: n } =
|
|
2371
|
-
return
|
|
2372
|
-
},
|
|
2369
|
+
const vi = 1e4, Wi = () => {
|
|
2370
|
+
const { get: t, set: e, has: r, clear: n } = xi(vi);
|
|
2371
|
+
return ve(() => ({ get: t, set: e, has: r, clear: n }), [t, e, r, n]);
|
|
2372
|
+
}, Ui = (t, e) => {
|
|
2373
2373
|
const r = f(e), n = f(t);
|
|
2374
|
-
|
|
2374
|
+
Qe(() => {
|
|
2375
2375
|
r.current = e, n.current = t;
|
|
2376
2376
|
}, [e, t]);
|
|
2377
2377
|
const i = f(/* @__PURE__ */ new WeakMap());
|
|
2378
|
-
return
|
|
2378
|
+
return x((s) => {
|
|
2379
2379
|
if (!s || i.current.has(s))
|
|
2380
2380
|
return;
|
|
2381
2381
|
const o = (l) => {
|
|
@@ -2385,72 +2385,72 @@ const xi = 1e4, Hi = () => {
|
|
|
2385
2385
|
i.current.get(s) === o && (s.removeEventListener("wheel", o), i.current.delete(s));
|
|
2386
2386
|
};
|
|
2387
2387
|
}, []);
|
|
2388
|
-
},
|
|
2388
|
+
}, hn = -200, mn = { active: !1, offsetX: 0, offsetY: 0, distance: 0, direction: 0, pointerId: null }, wi = (t) => {
|
|
2389
2389
|
const e = f(t);
|
|
2390
2390
|
e.current = t;
|
|
2391
|
-
const r = f(
|
|
2392
|
-
o.current !== null && (window.cancelAnimationFrame(o.current), o.current = null), l.current = null, d.current = { residual: 0, direction: 0 },
|
|
2393
|
-
}, []), M =
|
|
2394
|
-
const
|
|
2395
|
-
|
|
2391
|
+
const r = f(mn), n = f(null), [i, s] = Ce(!1), o = f(null), l = f(null), d = f({ residual: 0, direction: 0 }), h = f({ residual: 0, direction: 0 }), b = x(() => {
|
|
2392
|
+
o.current !== null && (window.cancelAnimationFrame(o.current), o.current = null), l.current = null, d.current = { residual: 0, direction: 0 }, h.current = { residual: 0, direction: 0 };
|
|
2393
|
+
}, []), M = x((D, k, ae, L, N, P) => {
|
|
2394
|
+
const J = k > 0 ? 1 : k < 0 ? -1 : 0;
|
|
2395
|
+
J !== 0 && J !== D.direction && (D.direction = J, D.residual = 0), D.residual += k * ae;
|
|
2396
2396
|
const K = Math.max(N(), 0);
|
|
2397
2397
|
K > 0 && (D.residual = se(D.residual, -K, K));
|
|
2398
|
-
const
|
|
2399
|
-
if (
|
|
2398
|
+
const q = D.residual;
|
|
2399
|
+
if (q === 0)
|
|
2400
2400
|
return { actualDelta: 0, atBoundary: !1 };
|
|
2401
|
-
const oe = L(),
|
|
2401
|
+
const oe = L(), ee = P(q), ge = ee - oe;
|
|
2402
2402
|
D.residual -= ge;
|
|
2403
|
-
const
|
|
2404
|
-
return
|
|
2405
|
-
}, []),
|
|
2403
|
+
const Je = q < 0 && oe + q <= 0, z = q > 0 && oe + q >= K, Y = q < 0 && (ee <= 0 || Je && ge === 0) || q > 0 && (ee >= K || z && ge === 0);
|
|
2404
|
+
return Y && (D.residual = 0), { actualDelta: ge, atBoundary: Y };
|
|
2405
|
+
}, []), I = x(
|
|
2406
2406
|
(D) => {
|
|
2407
|
-
const
|
|
2407
|
+
const k = e.current, ae = r.current;
|
|
2408
2408
|
if (!ae.active || ae.direction === 0) {
|
|
2409
|
-
|
|
2409
|
+
b();
|
|
2410
2410
|
return;
|
|
2411
2411
|
}
|
|
2412
|
-
const L = l.current ?? D, N = Math.max((D - L) / 1e3, 0), P = Math.min(N,
|
|
2412
|
+
const L = l.current ?? D, N = Math.max((D - L) / 1e3, 0), P = Math.min(N, En);
|
|
2413
2413
|
if (l.current = D, P <= 0) {
|
|
2414
|
-
o.current = window.requestAnimationFrame(
|
|
2414
|
+
o.current = window.requestAnimationFrame(I);
|
|
2415
2415
|
return;
|
|
2416
2416
|
}
|
|
2417
|
-
const
|
|
2418
|
-
K.actualDelta !== 0 && (
|
|
2419
|
-
const
|
|
2420
|
-
if (oe &&
|
|
2421
|
-
|
|
2417
|
+
const J = ci({ offsetX: ae.offsetX, offsetY: ae.offsetY, maxDistance: k.maxDistance, x: k.xSpeedParams, y: k.ySpeedParams }), K = M(d.current, J.x, P, k.getHx, k.getMaxHx, (ge) => k.applyHxRef.current(k.getHx() + ge));
|
|
2418
|
+
K.actualDelta !== 0 && (k.pendingColAnchorRef.current = null);
|
|
2419
|
+
const q = M(h.current, J.y, P, k.getVy, k.getMaxVy, k.applyVy), oe = k.getMaxHx() <= 0 || K.atBoundary || ae.offsetX === 0, ee = k.getMaxVy() <= 0 || q.atBoundary || ae.offsetY === 0;
|
|
2420
|
+
if (oe && ee) {
|
|
2421
|
+
b();
|
|
2422
2422
|
return;
|
|
2423
2423
|
}
|
|
2424
|
-
o.current = window.requestAnimationFrame(
|
|
2424
|
+
o.current = window.requestAnimationFrame(I);
|
|
2425
2425
|
},
|
|
2426
|
-
[
|
|
2427
|
-
), w =
|
|
2428
|
-
o.current === null && (l.current = null, d.current = { residual: 0, direction: 0 },
|
|
2429
|
-
}, [
|
|
2430
|
-
r.current = { ...
|
|
2431
|
-
}, [
|
|
2426
|
+
[b, M]
|
|
2427
|
+
), w = x(() => {
|
|
2428
|
+
o.current === null && (l.current = null, d.current = { residual: 0, direction: 0 }, h.current = { residual: 0, direction: 0 }, o.current = window.requestAnimationFrame(I));
|
|
2429
|
+
}, [I]), R = x(() => {
|
|
2430
|
+
r.current = { ...mn }, s(!1), n.current?.reset(), b();
|
|
2431
|
+
}, [b]), ne = x(
|
|
2432
2432
|
(D) => {
|
|
2433
|
-
r.current = D, s(D.active), D.active && D.direction !== 0 ? w() :
|
|
2433
|
+
r.current = D, s(D.active), D.active && D.direction !== 0 ? w() : b();
|
|
2434
2434
|
},
|
|
2435
|
-
[w,
|
|
2436
|
-
), { enabled:
|
|
2437
|
-
return
|
|
2435
|
+
[w, b]
|
|
2436
|
+
), { enabled: X, xExtentFreshness: pe, yExtentFreshness: Ae } = t;
|
|
2437
|
+
return $(() => {
|
|
2438
2438
|
const D = r.current;
|
|
2439
2439
|
!D.active || D.direction === 0 || w();
|
|
2440
|
-
}, [pe,
|
|
2440
|
+
}, [pe, Ae, w]), $(() => {
|
|
2441
2441
|
const D = () => {
|
|
2442
2442
|
R();
|
|
2443
2443
|
};
|
|
2444
|
-
return window.addEventListener(
|
|
2445
|
-
window.removeEventListener(
|
|
2444
|
+
return window.addEventListener(Mr, D), () => {
|
|
2445
|
+
window.removeEventListener(Mr, D);
|
|
2446
2446
|
};
|
|
2447
|
-
}, [R]),
|
|
2448
|
-
if (!
|
|
2447
|
+
}, [R]), $(() => {
|
|
2448
|
+
if (!X)
|
|
2449
2449
|
return;
|
|
2450
|
-
const D = (
|
|
2451
|
-
if (!r.current.active || r.current.pointerId ===
|
|
2450
|
+
const D = (k) => {
|
|
2451
|
+
if (!r.current.active || r.current.pointerId === k.pointerId)
|
|
2452
2452
|
return;
|
|
2453
|
-
const ae =
|
|
2453
|
+
const ae = k.target;
|
|
2454
2454
|
if (!(ae instanceof Node)) {
|
|
2455
2455
|
R();
|
|
2456
2456
|
return;
|
|
@@ -2460,34 +2460,56 @@ const xi = 1e4, Hi = () => {
|
|
|
2460
2460
|
return document.addEventListener("pointerdown", D, !0), () => {
|
|
2461
2461
|
document.removeEventListener("pointerdown", D, !0);
|
|
2462
2462
|
};
|
|
2463
|
-
}, [
|
|
2464
|
-
|
|
2465
|
-
}, [
|
|
2466
|
-
|
|
2467
|
-
}, [
|
|
2468
|
-
},
|
|
2463
|
+
}, [X, R]), $(() => {
|
|
2464
|
+
X || R();
|
|
2465
|
+
}, [X, R]), $(() => () => {
|
|
2466
|
+
b();
|
|
2467
|
+
}, [b]), { isTapActive: i, handleTapCircleDragChange: ne, tapCircleHandleRef: n };
|
|
2468
|
+
}, Ze = (t, e) => e <= 0 ? 0 : se(t, 0, e - 1), pn = (t) => ({
|
|
2469
2469
|
top: Math.max(0, t?.top ?? 0),
|
|
2470
2470
|
bottom: Math.max(0, t?.bottom ?? 0)
|
|
2471
|
-
}),
|
|
2471
|
+
}), Rt = (t, e) => t <= e ? 0 : t - e, cr = (t, e) => t <= 0 ? 0 : t + e, yr = 1e3, Gr = 2e3, Cn = 1048576, Si = (t, e) => {
|
|
2472
2472
|
if (!(Number.isFinite(e) && e > 0))
|
|
2473
2473
|
throw new RangeError(`[VirtualScroll] devicePixelRatio must be a finite number > 0, received ${e}`);
|
|
2474
2474
|
return Math.round(t * e) / e;
|
|
2475
|
-
},
|
|
2475
|
+
}, Mi = (t) => {
|
|
2476
2476
|
const e = t.ownerDocument.defaultView;
|
|
2477
2477
|
if (e === null)
|
|
2478
2478
|
throw new Error("[VirtualScroll] the items wrapper belongs to a document without a window, so it has no device-pixel ratio");
|
|
2479
2479
|
return e;
|
|
2480
|
-
},
|
|
2480
|
+
}, An = () => {
|
|
2481
|
+
}, yi = () => null, Ii = () => typeof window > "u" ? null : window, Ti = (t, e) => {
|
|
2482
|
+
if (typeof t.matchMedia != "function")
|
|
2483
|
+
return An;
|
|
2484
|
+
let r = t.matchMedia(`(resolution: ${t.devicePixelRatio}dppx)`);
|
|
2485
|
+
const n = () => {
|
|
2486
|
+
r.removeEventListener("change", n), r = t.matchMedia(`(resolution: ${t.devicePixelRatio}dppx)`), r.addEventListener("change", n), e();
|
|
2487
|
+
};
|
|
2488
|
+
return r.addEventListener("change", n), () => {
|
|
2489
|
+
r.removeEventListener("change", n);
|
|
2490
|
+
};
|
|
2491
|
+
}, Ri = ({ translateY: t, children: e }) => {
|
|
2492
|
+
const [r, n] = Ce(Ii), i = x((h) => r === null ? An : Ti(r, h), [r]), s = x(() => r === null ? null : r.devicePixelRatio, [r]), o = qn(i, s, yi), l = x(
|
|
2493
|
+
(h) => {
|
|
2494
|
+
if (h === null)
|
|
2495
|
+
return;
|
|
2496
|
+
const b = Mi(h);
|
|
2497
|
+
b !== r && n(b);
|
|
2498
|
+
},
|
|
2499
|
+
[r]
|
|
2500
|
+
), d = o === null ? t : Si(t, o);
|
|
2501
|
+
return /* @__PURE__ */ j("div", { ref: l, className: "aqvs-items-wrapper", style: { top: 0, transform: `translateY(${d}px)`, willChange: "transform" }, children: e });
|
|
2502
|
+
}, Pi = 40, vr = (t) => {
|
|
2481
2503
|
if (!Number.isFinite(t)) return 0n;
|
|
2482
2504
|
const e = Math.trunc(t);
|
|
2483
2505
|
return e <= 0 ? 0n : BigInt(e);
|
|
2484
|
-
},
|
|
2485
|
-
const d =
|
|
2506
|
+
}, Ei = (t, e, r, n, i, s, o, l) => {
|
|
2507
|
+
const d = vr(n);
|
|
2486
2508
|
if (d === 0n)
|
|
2487
2509
|
return { renderingStartIndex: 0, renderingEndIndex: 0, visibleStartIndex: 0, visibleEndIndex: 0 };
|
|
2488
|
-
const
|
|
2510
|
+
const h = (L) => L < 0n ? 0n : L >= d ? d - 1n : L, b = { materializeOption: { materialize: !1 } }, { index: M, cumulative: I } = s.findIndexAtOrAfter(t, b);
|
|
2489
2511
|
let w;
|
|
2490
|
-
M === -1 ? w = d - 1n : (
|
|
2512
|
+
M === -1 ? w = d - 1n : (I === t ? w = vr(M + 1) : w = vr(M), w >= d && (w = d - 1n)), t <= 0 && (w = 0n), l && t >= o && (w = d - 1n);
|
|
2491
2513
|
const R = (L) => {
|
|
2492
2514
|
const N = Number(L);
|
|
2493
2515
|
if (!Number.isSafeInteger(N))
|
|
@@ -2495,52 +2517,52 @@ const xi = 1e4, Hi = () => {
|
|
|
2495
2517
|
const { cumulative: P } = s.prefixSum(N, { materializeOption: { materialize: !1 } });
|
|
2496
2518
|
if (!Number.isFinite(P))
|
|
2497
2519
|
return null;
|
|
2498
|
-
const { index:
|
|
2499
|
-
if (
|
|
2520
|
+
const { index: J } = s.findIndexAtOrAfter(P + 0.5, { materializeOption: { materialize: !1 } });
|
|
2521
|
+
if (J === -1)
|
|
2500
2522
|
return null;
|
|
2501
|
-
const K =
|
|
2523
|
+
const K = vr(J);
|
|
2502
2524
|
return K > L ? K : null;
|
|
2503
2525
|
}, ne = (L) => {
|
|
2504
|
-
let N = 0, P = L,
|
|
2526
|
+
let N = 0, P = L, J = L, K = 0n, q = 0;
|
|
2505
2527
|
for (; P < d && N < e; ) {
|
|
2506
|
-
const oe = Number(P),
|
|
2507
|
-
if (N +=
|
|
2528
|
+
const oe = Number(P), ee = i(oe);
|
|
2529
|
+
if (N += ee, J = P, P += 1n, K += 1n, !Number.isFinite(ee) || ee < 0)
|
|
2508
2530
|
break;
|
|
2509
|
-
if (
|
|
2510
|
-
if (
|
|
2511
|
-
const ge = R(
|
|
2531
|
+
if (ee === 0) {
|
|
2532
|
+
if (q += 1, q > yr) {
|
|
2533
|
+
const ge = R(J);
|
|
2512
2534
|
if (ge !== null && ge > P)
|
|
2513
|
-
P = ge,
|
|
2535
|
+
P = ge, q = 0;
|
|
2514
2536
|
else if (ge !== null && ge === P && i(Number(P)) > 0)
|
|
2515
|
-
|
|
2537
|
+
q = 0;
|
|
2516
2538
|
else
|
|
2517
2539
|
break;
|
|
2518
2540
|
}
|
|
2519
2541
|
} else
|
|
2520
|
-
|
|
2542
|
+
q = 0;
|
|
2521
2543
|
}
|
|
2522
|
-
return K === 0n && (
|
|
2544
|
+
return K === 0n && (J = L), { height: N, end: J };
|
|
2523
2545
|
};
|
|
2524
|
-
let { height:
|
|
2525
|
-
if (
|
|
2526
|
-
let L = w, N =
|
|
2546
|
+
let { height: X, end: pe } = ne(w);
|
|
2547
|
+
if (X < e && w > 0n) {
|
|
2548
|
+
let L = w, N = X, P = 0;
|
|
2527
2549
|
for (; L > 0n && N < e; ) {
|
|
2528
2550
|
L -= 1n;
|
|
2529
|
-
const K = Number(L),
|
|
2530
|
-
if (N +=
|
|
2551
|
+
const K = Number(L), q = i(K);
|
|
2552
|
+
if (N += q, !Number.isFinite(q) || q < 0)
|
|
2531
2553
|
break;
|
|
2532
|
-
if (
|
|
2533
|
-
if (P += 1, P >
|
|
2554
|
+
if (q === 0) {
|
|
2555
|
+
if (P += 1, P > yr) {
|
|
2534
2556
|
const oe = Number(L);
|
|
2535
2557
|
if (!Number.isSafeInteger(oe))
|
|
2536
2558
|
break;
|
|
2537
|
-
const { cumulative:
|
|
2538
|
-
if (!Number.isFinite(
|
|
2559
|
+
const { cumulative: ee } = s.prefixSum(oe, { materializeOption: { materialize: !1 } });
|
|
2560
|
+
if (!Number.isFinite(ee))
|
|
2539
2561
|
break;
|
|
2540
|
-
const { index: ge } = s.findIndexAtOrAfter(
|
|
2541
|
-
if (
|
|
2542
|
-
L =
|
|
2543
|
-
else if (
|
|
2562
|
+
const { index: ge } = s.findIndexAtOrAfter(ee - 0.5, { materializeOption: { materialize: !1 } }), Je = ge === -1 ? -1n : vr(ge);
|
|
2563
|
+
if (Je >= 0n && Je < L)
|
|
2564
|
+
L = Je + 1n, P = 0;
|
|
2565
|
+
else if (Je === L && L >= 1n && i(Number(L - 1n)) > 0)
|
|
2544
2566
|
P = 0;
|
|
2545
2567
|
else
|
|
2546
2568
|
break;
|
|
@@ -2548,45 +2570,45 @@ const xi = 1e4, Hi = () => {
|
|
|
2548
2570
|
} else
|
|
2549
2571
|
P = 0;
|
|
2550
2572
|
}
|
|
2551
|
-
w =
|
|
2552
|
-
const
|
|
2553
|
-
|
|
2573
|
+
w = h(L);
|
|
2574
|
+
const J = ne(w);
|
|
2575
|
+
X = J.height, pe = J.end;
|
|
2554
2576
|
}
|
|
2555
|
-
const
|
|
2577
|
+
const Ae = h(w), D = h(pe), k = h(Ae - BigInt(Math.max(0, r))), ae = h(D + BigInt(Math.max(0, r)));
|
|
2556
2578
|
return {
|
|
2557
|
-
renderingStartIndex:
|
|
2558
|
-
renderingEndIndex:
|
|
2559
|
-
visibleStartIndex:
|
|
2560
|
-
visibleEndIndex:
|
|
2579
|
+
renderingStartIndex: Ze(Number(k), n),
|
|
2580
|
+
renderingEndIndex: Ze(Number(ae), n),
|
|
2581
|
+
visibleStartIndex: Ze(Number(Ae), n),
|
|
2582
|
+
visibleEndIndex: Ze(Number(D), n)
|
|
2561
2583
|
};
|
|
2562
|
-
},
|
|
2584
|
+
}, Dn = (t, e, r, n, i, s, o) => {
|
|
2563
2585
|
if (n === 0)
|
|
2564
2586
|
return { renderingStartIndex: 0, renderingEndIndex: 0, visibleStartIndex: 0, visibleEndIndex: 0 };
|
|
2565
2587
|
const l = Number.isFinite(o), d = l ? Math.min(Math.max(0, t), o) : Math.max(0, t);
|
|
2566
2588
|
if (n >= Number.MAX_SAFE_INTEGER)
|
|
2567
|
-
return
|
|
2568
|
-
const { index:
|
|
2569
|
-
let w =
|
|
2570
|
-
if (
|
|
2571
|
-
w =
|
|
2572
|
-
else if (w ===
|
|
2573
|
-
R =
|
|
2589
|
+
return Ei(d, e, r, n, i, s, o, l);
|
|
2590
|
+
const { index: h, cumulative: b, currentValue: M } = s.findIndexAtOrAfter(d, { materializeOption: { materialize: !1 } }), I = h === -1 ? e <= 0 || (b ?? 0) < d + (M ?? 0) ? n - 1 : 0 : h;
|
|
2591
|
+
let w = Ze(I, n), R = 0;
|
|
2592
|
+
if (h !== -1 && b === d)
|
|
2593
|
+
w = Ze(h + 1, n), R = 0;
|
|
2594
|
+
else if (w === h && b !== void 0 && M !== void 0)
|
|
2595
|
+
R = b - M - d;
|
|
2574
2596
|
else {
|
|
2575
2597
|
const { cumulative: L, currentValue: N } = s.prefixSum(w, { materializeOption: { materialize: !1 } });
|
|
2576
2598
|
R = (L ?? 0) - (N ?? 0) - d;
|
|
2577
2599
|
}
|
|
2578
|
-
const ne = R,
|
|
2579
|
-
let P = L,
|
|
2580
|
-
for (; P < n &&
|
|
2581
|
-
const
|
|
2582
|
-
if (
|
|
2600
|
+
const ne = R, X = (L, N) => {
|
|
2601
|
+
let P = L, J = N, K = 0;
|
|
2602
|
+
for (; P < n && J < e; ) {
|
|
2603
|
+
const q = i(P);
|
|
2604
|
+
if (J += q, P++, !Number.isFinite(q) || q < 0)
|
|
2583
2605
|
break;
|
|
2584
|
-
if (
|
|
2585
|
-
if (K++, K >
|
|
2586
|
-
const { cumulative: oe } = s.prefixSum(P - 1, { materializeOption: { materialize: !1 } }), { index:
|
|
2587
|
-
if (
|
|
2588
|
-
P =
|
|
2589
|
-
else if (
|
|
2606
|
+
if (q === 0) {
|
|
2607
|
+
if (K++, K > yr) {
|
|
2608
|
+
const { cumulative: oe } = s.prefixSum(P - 1, { materializeOption: { materialize: !1 } }), { index: ee } = Number.isFinite(oe) ? s.findIndexAtOrAfter(oe + 0.5, { materializeOption: { materialize: !1 } }) : { index: -1 };
|
|
2609
|
+
if (ee > P)
|
|
2610
|
+
P = ee, K = 0;
|
|
2611
|
+
else if (ee === P && i(P) > 0)
|
|
2590
2612
|
K = 0;
|
|
2591
2613
|
else
|
|
2592
2614
|
break;
|
|
@@ -2594,9 +2616,9 @@ const xi = 1e4, Hi = () => {
|
|
|
2594
2616
|
} else
|
|
2595
2617
|
K = 0;
|
|
2596
2618
|
}
|
|
2597
|
-
return { cursor: P, height:
|
|
2598
|
-
}, pe =
|
|
2599
|
-
let
|
|
2619
|
+
return { cursor: P, height: J };
|
|
2620
|
+
}, pe = X(w, R);
|
|
2621
|
+
let Ae = pe.cursor;
|
|
2600
2622
|
if (R = pe.height, R < e && w > 0) {
|
|
2601
2623
|
let L = R + Math.abs(Math.min(0, ne)), N = w - 1, P = 0;
|
|
2602
2624
|
for (; N >= 0 && L < e; ) {
|
|
@@ -2606,8 +2628,8 @@ const xi = 1e4, Hi = () => {
|
|
|
2606
2628
|
break;
|
|
2607
2629
|
}
|
|
2608
2630
|
if (K === 0) {
|
|
2609
|
-
if (P++, P >
|
|
2610
|
-
const { cumulative:
|
|
2631
|
+
if (P++, P > yr) {
|
|
2632
|
+
const { cumulative: q } = s.prefixSum(N, { materializeOption: { materialize: !1 } }), { index: oe } = Number.isFinite(q) ? s.findIndexAtOrAfter(q - 0.5, { materializeOption: { materialize: !1 } }) : { index: -1 };
|
|
2611
2633
|
if (oe !== -1 && oe < N) {
|
|
2612
2634
|
N = oe, P = 0;
|
|
2613
2635
|
continue;
|
|
@@ -2623,15 +2645,15 @@ const xi = 1e4, Hi = () => {
|
|
|
2623
2645
|
P = 0;
|
|
2624
2646
|
N--;
|
|
2625
2647
|
}
|
|
2626
|
-
w =
|
|
2627
|
-
const
|
|
2628
|
-
|
|
2648
|
+
w = Ze(N + 1, n);
|
|
2649
|
+
const J = X(w, 0);
|
|
2650
|
+
Ae = J.cursor, R = J.height;
|
|
2629
2651
|
}
|
|
2630
|
-
const D =
|
|
2631
|
-
return { renderingStartIndex: D, renderingEndIndex: ae, visibleStartIndex: w, visibleEndIndex:
|
|
2632
|
-
},
|
|
2652
|
+
const D = Ze(w - r, n), k = Ze(Math.max(Ae - 1, w), n), ae = Ze(k + r, n);
|
|
2653
|
+
return { renderingStartIndex: D, renderingEndIndex: ae, visibleStartIndex: w, visibleEndIndex: k };
|
|
2654
|
+
}, gn = (t, e, r) => {
|
|
2633
2655
|
const n = Math.max(0, e ?? 0), i = f({ last: 0, id: null, arg: null }).current;
|
|
2634
|
-
return
|
|
2656
|
+
return $(
|
|
2635
2657
|
() => () => {
|
|
2636
2658
|
if (i.id !== null && (cancelAnimationFrame(i.id), i.id = null), i.arg !== null && t.current) {
|
|
2637
2659
|
try {
|
|
@@ -2643,7 +2665,7 @@ const xi = 1e4, Hi = () => {
|
|
|
2643
2665
|
}
|
|
2644
2666
|
},
|
|
2645
2667
|
[i, t, r]
|
|
2646
|
-
),
|
|
2668
|
+
), x(
|
|
2647
2669
|
(s) => {
|
|
2648
2670
|
if (i.arg = s, i.id !== null) return;
|
|
2649
2671
|
const o = (l) => {
|
|
@@ -2653,8 +2675,8 @@ const xi = 1e4, Hi = () => {
|
|
|
2653
2675
|
if (t.current)
|
|
2654
2676
|
try {
|
|
2655
2677
|
r(t.current, i.arg);
|
|
2656
|
-
} catch (
|
|
2657
|
-
console.error("[useThrottledInvoker] Error invoking callback",
|
|
2678
|
+
} catch (h) {
|
|
2679
|
+
console.error("[useThrottledInvoker] Error invoking callback", h);
|
|
2658
2680
|
}
|
|
2659
2681
|
i.arg = null, i.last = l;
|
|
2660
2682
|
}
|
|
@@ -2664,16 +2686,16 @@ const xi = 1e4, Hi = () => {
|
|
|
2664
2686
|
},
|
|
2665
2687
|
[n, r, t, i]
|
|
2666
2688
|
);
|
|
2667
|
-
},
|
|
2668
|
-
const M =
|
|
2669
|
-
|
|
2689
|
+
}, zi = Hn.memo(({ index: t, top: e, height: r, item: n, children: i, clipItemHeight: s, enableKeyboardNavigation: o, onKeyDown: l, onEscapeKeyDown: d, onFocus: h, registerItemRef: b }) => {
|
|
2690
|
+
const M = x((X) => b(t, X), [t, b]), I = x((X) => l(X, t), [t, l]), w = x((X) => d?.(X, t), [t, d]), R = x(() => h(t), [t, h]), ne = x((X) => {
|
|
2691
|
+
X.currentTarget.focus({ preventScroll: !0 });
|
|
2670
2692
|
}, []);
|
|
2671
2693
|
return (
|
|
2672
2694
|
// 行ラッパーの role は消費側の複合ウィジェット契約 (listbox / tree / grid — README「Composite widget
|
|
2673
2695
|
// roles」) の所有物で、パッケージが既定 role を課すと衝突する。キー/フォーカス結線は
|
|
2674
2696
|
// enableKeyboardNavigation の行ナビゲーション機構そのもの。
|
|
2675
2697
|
// biome-ignore lint/a11y/noStaticElementInteractions: role は消費側の複合ウィジェット契約の所有物 (上記)
|
|
2676
|
-
/* @__PURE__ */
|
|
2698
|
+
/* @__PURE__ */ j(
|
|
2677
2699
|
"div",
|
|
2678
2700
|
{
|
|
2679
2701
|
ref: M,
|
|
@@ -2687,14 +2709,14 @@ const xi = 1e4, Hi = () => {
|
|
|
2687
2709
|
},
|
|
2688
2710
|
tabIndex: o ? -1 : void 0,
|
|
2689
2711
|
onPointerDown: o ? ne : void 0,
|
|
2690
|
-
onKeyDownCapture: o ?
|
|
2712
|
+
onKeyDownCapture: o ? I : void 0,
|
|
2691
2713
|
onKeyDown: o && d ? w : void 0,
|
|
2692
2714
|
onFocusCapture: o ? R : void 0,
|
|
2693
2715
|
children: i(n, t)
|
|
2694
2716
|
}
|
|
2695
2717
|
)
|
|
2696
2718
|
);
|
|
2697
|
-
}),
|
|
2719
|
+
}), Ni = ({
|
|
2698
2720
|
itemCount: t,
|
|
2699
2721
|
getItem: e,
|
|
2700
2722
|
getItemKey: r,
|
|
@@ -2704,76 +2726,76 @@ const xi = 1e4, Hi = () => {
|
|
|
2704
2726
|
className: o,
|
|
2705
2727
|
testId: l,
|
|
2706
2728
|
onScroll: d,
|
|
2707
|
-
onRangeChange:
|
|
2708
|
-
children:
|
|
2729
|
+
onRangeChange: h,
|
|
2730
|
+
children: b,
|
|
2709
2731
|
background: M,
|
|
2710
|
-
initialScrollIndex:
|
|
2732
|
+
initialScrollIndex: I,
|
|
2711
2733
|
initialScrollOffset: w,
|
|
2712
2734
|
initialScrollAnchor: R,
|
|
2713
2735
|
callbackThrottleMs: ne = 5,
|
|
2714
|
-
contentInsets:
|
|
2736
|
+
contentInsets: X,
|
|
2715
2737
|
onItemFocus: pe,
|
|
2716
|
-
scrollBarOptions:
|
|
2738
|
+
scrollBarOptions: Ae,
|
|
2717
2739
|
behaviorOptions: D,
|
|
2718
|
-
onWheelHorizontal:
|
|
2740
|
+
onWheelHorizontal: k,
|
|
2719
2741
|
onPanHorizontal: ae,
|
|
2720
2742
|
horizontalKeyInputs: L,
|
|
2721
|
-
horizontalKeyStep: N =
|
|
2743
|
+
horizontalKeyStep: N = Pi,
|
|
2722
2744
|
contentProps: P,
|
|
2723
|
-
liveRegion:
|
|
2745
|
+
liveRegion: J,
|
|
2724
2746
|
locale: K,
|
|
2725
|
-
labels:
|
|
2747
|
+
labels: q
|
|
2726
2748
|
}, oe) => {
|
|
2727
|
-
const { width:
|
|
2749
|
+
const { width: ee, enableThumbDrag: ge, enableTrackClick: Je, enableArrowButtons: z, enableArrowButtonTabStops: Y, enableScrollToTopBottomButtons: ie, renderThumbOverlay: et, tapScrollCircleOptions: ce } = Ae ?? {}, Se = ve(() => In(K, q), [K, q]), { enablePointerDrag: At, pointerDragInputs: ue, enableKeyboardNavigation: le = !0, enableEscapeRowReturn: vt = !1, wheelSpeedMultiplier: it, inertiaOptions: ct, overscrollBehavior: _e, clipItemHeight: st = !1, resetOnGetItemHeightChange: tt = !1 } = D ?? {}, [rt, fe] = Ce(0), ze = i ?? rt, $e = x((c) => {
|
|
2728
2750
|
fe((g) => g === c ? g : c);
|
|
2729
|
-
}, []), F = f(null),
|
|
2751
|
+
}, []), F = f(null), Ye = f({
|
|
2730
2752
|
renderingStartIndex: 0,
|
|
2731
2753
|
renderingEndIndex: 0,
|
|
2732
2754
|
visibleStartIndex: 0,
|
|
2733
2755
|
visibleEndIndex: 0,
|
|
2734
2756
|
scrollPosition: 0,
|
|
2735
2757
|
totalHeight: 0
|
|
2736
|
-
}), Z = f(R && t > 0 ? { index: se(Math.trunc(R.index), 0, t - 1), align: "top", offset: -Math.max(0, R.offsetPx ?? 0) } : null),
|
|
2737
|
-
|
|
2738
|
-
if (
|
|
2739
|
-
|
|
2758
|
+
}), Z = f(R && t > 0 ? { index: se(Math.trunc(R.index), 0, t - 1), align: "top", offset: -Math.max(0, R.offsetPx ?? 0) } : null), bt = f(!1), B = f(!0);
|
|
2759
|
+
$(() => {
|
|
2760
|
+
if (B.current) {
|
|
2761
|
+
B.current = !1;
|
|
2740
2762
|
return;
|
|
2741
2763
|
}
|
|
2742
|
-
|
|
2743
|
-
}, [
|
|
2744
|
-
const E =
|
|
2745
|
-
const g = R?.index ??
|
|
2746
|
-
return { from: Math.max(0,
|
|
2747
|
-
}), Pe =
|
|
2764
|
+
tt && (Z.current = null);
|
|
2765
|
+
}, [tt, n]);
|
|
2766
|
+
const E = ve(() => pn(X), [X]), [lt] = Ce(() => {
|
|
2767
|
+
const g = R?.index ?? I, v = typeof g == "number" && Number.isFinite(g) ? Math.max(0, Math.trunc(g)) : 0;
|
|
2768
|
+
return { from: Math.max(0, v - 50), to: v + 50 };
|
|
2769
|
+
}), Pe = ve(
|
|
2748
2770
|
// 目的: Fenwick Tree のオプション設定
|
|
2749
2771
|
// 依存関係: resetOnGetItemHeightChange, initialSampleRange (マウント時固定)
|
|
2750
2772
|
// itemCount には依存させない (依存させると追記のたびに options 参照が変わり、計測済み高さが全消去される)。
|
|
2751
2773
|
// この useMemo により sampleRange を毎レンダー新規生成しない = 参照同一性由来の破壊的 reset を防ぐ。
|
|
2752
2774
|
() => ({
|
|
2753
|
-
sampleRange:
|
|
2754
|
-
resetOnValueFnChange:
|
|
2775
|
+
sampleRange: lt,
|
|
2776
|
+
resetOnValueFnChange: tt,
|
|
2755
2777
|
materialize: !0
|
|
2756
2778
|
}),
|
|
2757
|
-
[
|
|
2758
|
-
),
|
|
2779
|
+
[tt, lt]
|
|
2780
|
+
), A = Vn(t, n, Pe), [ut] = Ce(() => {
|
|
2759
2781
|
let c = 0, g = 0;
|
|
2760
2782
|
if (R && t > 0) {
|
|
2761
|
-
const
|
|
2762
|
-
c =
|
|
2763
|
-
} else if (typeof
|
|
2764
|
-
const
|
|
2765
|
-
c =
|
|
2766
|
-
} else typeof w == "number" && (c =
|
|
2783
|
+
const v = se(Math.trunc(R.index), 0, t - 1), W = Math.max(0, R.offsetPx ?? 0), G = se(v - s * 2, 0, t - 1), Q = se(v + s * 2, 0, t - 1), te = v > 0 || W > 0 ? { materializeOption: { materialize: !0, ranges: [{ from: G, to: Q }] } } : void 0, { cumulative: Re, total: qe, currentValue: Oe } = A.prefixSum(v, te), Ne = Math.max(Re - Oe + W, 0);
|
|
2784
|
+
c = cr(Ne, E.top), g = qe ?? A.getTotal();
|
|
2785
|
+
} else if (typeof I == "number") {
|
|
2786
|
+
const v = se(I, 0, t - 1), W = se(v - s * 2, 0, t - 1), G = se(v + s * 2, 0, t - 1), Q = I > 0 ? { materializeOption: { materialize: !0, ranges: [{ from: W, to: G }] } } : void 0, { cumulative: te, total: Re, currentValue: qe } = A.prefixSum(I, Q), Oe = Math.max(te - qe, 0);
|
|
2787
|
+
c = cr(Oe, E.top), g = Re ?? A.getTotal();
|
|
2788
|
+
} else typeof w == "number" && (c = cr(Math.max(w, 0), E.top)), g = A.getTotal();
|
|
2767
2789
|
return { position: c, total: g };
|
|
2768
|
-
}), [
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
}, [
|
|
2772
|
-
const
|
|
2773
|
-
T.current !== t && (T.current = t, S.current = !0),
|
|
2774
|
-
|
|
2775
|
-
}, [
|
|
2776
|
-
const Ve =
|
|
2790
|
+
}), [yt, Dt] = Ce(ut.position), [dt, p] = Ce(ut.total), _ = f(ut.position), he = f(E.top), U = f(d ?? void 0), re = f(h ?? void 0), De = f(k), Be = (L?.length ?? 0) > 0, xe = !!k;
|
|
2791
|
+
$(() => {
|
|
2792
|
+
Be && (le || C.warn("[VirtualScroll] horizontalKeyInputs is set but behaviorOptions.enableKeyboardNavigation is false; horizontal keyboard scrolling is disabled because the row key handler is not mounted."), xe || C.warn("[VirtualScroll] horizontalKeyInputs is set but onWheelHorizontal is missing; horizontal keyboard scrolling is disabled because the package does not own the horizontal axis."), Number.isFinite(N) && N > 0 || C.warn(`[VirtualScroll] horizontalKeyStep must be a finite positive number, received ${N}. Horizontal arrow keys are left untouched.`));
|
|
2793
|
+
}, [Be, xe, le, N]);
|
|
2794
|
+
const Ue = f(/* @__PURE__ */ new Map()), we = f(null), Le = f(null), [ft, ot] = Ce(null), [Fe, Ge] = Ce(!1), be = f(null), Me = f(!1), je = f(0), Ee = f(!1), S = f(!1), T = f(t);
|
|
2795
|
+
T.current !== t && (T.current = t, S.current = !0), Qe(() => {
|
|
2796
|
+
U.current = d ?? void 0, re.current = h ?? void 0, De.current = k;
|
|
2797
|
+
}, [h, d, k]);
|
|
2798
|
+
const Ve = x(
|
|
2777
2799
|
(c) => {
|
|
2778
2800
|
if (le && c && typeof c.focus == "function")
|
|
2779
2801
|
try {
|
|
@@ -2783,96 +2805,96 @@ const xi = 1e4, Hi = () => {
|
|
|
2783
2805
|
}
|
|
2784
2806
|
},
|
|
2785
2807
|
[le]
|
|
2786
|
-
), Xe =
|
|
2787
|
-
c(g,
|
|
2788
|
-
}, []),
|
|
2808
|
+
), Xe = x((c, { position: g, totalHeight: v }) => {
|
|
2809
|
+
c(g, v);
|
|
2810
|
+
}, []), We = gn(U, ne, Xe), at = x((c, g) => {
|
|
2789
2811
|
c(g);
|
|
2790
|
-
}, []),
|
|
2812
|
+
}, []), ht = gn(re, ne, at), ye = f(E.top);
|
|
2791
2813
|
ye.current = E.top;
|
|
2792
|
-
const
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
}), []),
|
|
2796
|
-
le || (
|
|
2814
|
+
const Pt = f(We);
|
|
2815
|
+
Pt.current = We, $(() => (bt.current = !1, () => {
|
|
2816
|
+
bt.current = !0, be.current && (clearTimeout(be.current), be.current = null);
|
|
2817
|
+
}), []), $(() => {
|
|
2818
|
+
le || (Ue.current.clear(), we.current = null, Le.current = null);
|
|
2797
2819
|
}, [le]);
|
|
2798
|
-
const
|
|
2820
|
+
const Qt = x(
|
|
2799
2821
|
(c, g) => {
|
|
2800
2822
|
if (!g) {
|
|
2801
|
-
|
|
2823
|
+
Ue.current.delete(c);
|
|
2802
2824
|
return;
|
|
2803
2825
|
}
|
|
2804
|
-
le && (
|
|
2826
|
+
le && (Ue.current.set(c, g), we.current === c && (we.current = null, Le.current = c, Ve(g)));
|
|
2805
2827
|
},
|
|
2806
2828
|
[le, Ve]
|
|
2807
|
-
),
|
|
2829
|
+
), lr = 0.01, Ie = f({
|
|
2808
2830
|
rafId: null,
|
|
2809
2831
|
loopActive: !1,
|
|
2810
2832
|
idleFrames: 0,
|
|
2811
|
-
lastRenderedPosition:
|
|
2812
|
-
}), wt =
|
|
2813
|
-
const c =
|
|
2833
|
+
lastRenderedPosition: ut.position
|
|
2834
|
+
}), wt = x(() => {
|
|
2835
|
+
const c = Ie.current;
|
|
2814
2836
|
c.rafId !== null && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(c.rafId), c.rafId = null, c.loopActive = !1, c.idleFrames = 0;
|
|
2815
2837
|
}, []);
|
|
2816
|
-
|
|
2838
|
+
$(
|
|
2817
2839
|
() => () => {
|
|
2818
2840
|
wt();
|
|
2819
2841
|
},
|
|
2820
2842
|
[wt]
|
|
2821
2843
|
);
|
|
2822
|
-
const
|
|
2823
|
-
}),
|
|
2824
|
-
const c =
|
|
2844
|
+
const nr = f(() => {
|
|
2845
|
+
}), Jt = x(() => {
|
|
2846
|
+
const c = Ie.current;
|
|
2825
2847
|
c.rafId = null;
|
|
2826
|
-
const g = _.current,
|
|
2827
|
-
if (Dt((
|
|
2848
|
+
const g = _.current, v = Rt(g, ye.current), W = A.getTotal();
|
|
2849
|
+
if (Dt((Q) => Math.abs(Q - g) < lr ? Q : g), Math.abs(c.lastRenderedPosition - g) >= lr ? (Pt.current({ position: v, totalHeight: W }), c.lastRenderedPosition = g, c.idleFrames = 0) : c.idleFrames += 1, c.idleFrames >= 2) {
|
|
2828
2850
|
wt();
|
|
2829
2851
|
return;
|
|
2830
2852
|
}
|
|
2831
2853
|
if (typeof requestAnimationFrame == "function") {
|
|
2832
|
-
c.rafId = requestAnimationFrame((
|
|
2854
|
+
c.rafId = requestAnimationFrame((Q) => nr.current(Q));
|
|
2833
2855
|
return;
|
|
2834
2856
|
}
|
|
2835
2857
|
c.loopActive = !1;
|
|
2836
|
-
}, [
|
|
2837
|
-
|
|
2838
|
-
const
|
|
2839
|
-
const c =
|
|
2858
|
+
}, [A, wt]);
|
|
2859
|
+
nr.current = Jt;
|
|
2860
|
+
const Wt = x(() => {
|
|
2861
|
+
const c = Ie.current;
|
|
2840
2862
|
if (c.idleFrames = 0, !c.loopActive) {
|
|
2841
2863
|
if (c.loopActive = !0, typeof requestAnimationFrame == "function") {
|
|
2842
|
-
c.rafId = requestAnimationFrame(
|
|
2864
|
+
c.rafId = requestAnimationFrame(Jt);
|
|
2843
2865
|
return;
|
|
2844
2866
|
}
|
|
2845
2867
|
c.loopActive = !1;
|
|
2846
2868
|
}
|
|
2847
|
-
}, [
|
|
2869
|
+
}, [Jt]), Te = x(
|
|
2848
2870
|
(c, g) => {
|
|
2849
|
-
const
|
|
2850
|
-
if (_.current = c,
|
|
2851
|
-
|
|
2871
|
+
const v = g?.immediate ?? !1, W = Rt(c, E.top);
|
|
2872
|
+
if (_.current = c, v) {
|
|
2873
|
+
Ie.current.lastRenderedPosition = c, Ie.current.idleFrames = 0, Dt(c), We({ position: W, totalHeight: A.getTotal() });
|
|
2852
2874
|
return;
|
|
2853
2875
|
}
|
|
2854
|
-
|
|
2876
|
+
Wt();
|
|
2855
2877
|
},
|
|
2856
|
-
[
|
|
2857
|
-
),
|
|
2858
|
-
const
|
|
2859
|
-
if (!
|
|
2878
|
+
[Wt, A, E.top, We]
|
|
2879
|
+
), Et = x((c, g = 0) => {
|
|
2880
|
+
const v = F.current;
|
|
2881
|
+
if (!v)
|
|
2860
2882
|
return c;
|
|
2861
|
-
const
|
|
2862
|
-
|
|
2863
|
-
const G =
|
|
2864
|
-
return
|
|
2865
|
-
}, []),
|
|
2866
|
-
|
|
2867
|
-
if (!
|
|
2868
|
-
if (
|
|
2869
|
-
const c =
|
|
2870
|
-
|
|
2883
|
+
const W = v.getScrollPosition();
|
|
2884
|
+
je.current += 1;
|
|
2885
|
+
const G = v.getContentSize() + g, Q = v.getViewportSize(), te = v.scrollTo(c, { contentSize: G, viewportSize: Q });
|
|
2886
|
+
return te === W && (je.current = Math.max(0, je.current - 1)), Math.abs(te - c) > 0.5 && (Ee.current = !0), te;
|
|
2887
|
+
}, []), Ut = f(!1);
|
|
2888
|
+
$(() => {
|
|
2889
|
+
if (!Ut.current)
|
|
2890
|
+
if (Ut.current = !0, R == null && typeof I != "number" && typeof w == "number") {
|
|
2891
|
+
const c = cr(Math.max(w, 0), E.top), g = Math.abs(c - _.current) > 0.5;
|
|
2892
|
+
Te(c, { immediate: !0 }), g && F.current?.scrollTo(c);
|
|
2871
2893
|
} else
|
|
2872
|
-
|
|
2873
|
-
}, [R,
|
|
2874
|
-
const c =
|
|
2875
|
-
if (
|
|
2894
|
+
Te(_.current, { immediate: !0 });
|
|
2895
|
+
}, [R, I, w, E.top, Te]), $(() => {
|
|
2896
|
+
const c = A.getTotal();
|
|
2897
|
+
if (dt !== c) {
|
|
2876
2898
|
p(c);
|
|
2877
2899
|
return;
|
|
2878
2900
|
}
|
|
@@ -2880,170 +2902,170 @@ const xi = 1e4, Hi = () => {
|
|
|
2880
2902
|
Ee.current = !1;
|
|
2881
2903
|
const g = F.current;
|
|
2882
2904
|
if (g && Math.abs(g.getScrollPosition() - _.current) > 0.5) {
|
|
2883
|
-
const
|
|
2884
|
-
Ee.current = !1,
|
|
2905
|
+
const v = Et(_.current);
|
|
2906
|
+
Ee.current = !1, Te(v, { immediate: !0 });
|
|
2885
2907
|
}
|
|
2886
2908
|
}
|
|
2887
|
-
}, [
|
|
2909
|
+
}, [A, dt, t, Et, Te]), $(() => {
|
|
2888
2910
|
if (Z.current !== null) {
|
|
2889
|
-
const { index: c, align: g, offset:
|
|
2890
|
-
if (G !== void 0 &&
|
|
2891
|
-
const
|
|
2892
|
-
let
|
|
2893
|
-
g === "bottom" ?
|
|
2894
|
-
const
|
|
2895
|
-
Math.abs(Oe - _.current) > 1 && (
|
|
2911
|
+
const { index: c, align: g, offset: v } = Z.current, W = Ze(c, t), { cumulative: G, currentValue: Q } = A.prefixSum(W, { materializeOption: { materialize: !1 } });
|
|
2912
|
+
if (G !== void 0 && Q !== void 0) {
|
|
2913
|
+
const te = Math.max(G - Q, 0);
|
|
2914
|
+
let Re = te;
|
|
2915
|
+
g === "bottom" ? Re = G - ze : g === "center" && (Re = te + Q / 2 - ze / 2), v && (Re -= v), Re = Math.max(0, Re);
|
|
2916
|
+
const qe = Math.max(0, dt + E.top + E.bottom - ze), Oe = Math.min(cr(Re, E.top), qe);
|
|
2917
|
+
Math.abs(Oe - _.current) > 1 && (C.debug("[VirtualScroll] Drift correction", {
|
|
2896
2918
|
from: _.current,
|
|
2897
2919
|
to: Oe,
|
|
2898
|
-
targetIndex:
|
|
2899
|
-
}),
|
|
2920
|
+
targetIndex: W
|
|
2921
|
+
}), je.current === 0 && (je.current += 1), F.current?.scrollTo(Oe), Te(Oe, { immediate: !0 }));
|
|
2900
2922
|
}
|
|
2901
2923
|
}
|
|
2902
2924
|
S.current = !1;
|
|
2903
|
-
}, [
|
|
2925
|
+
}, [dt, A, t, E.top, Te, ze, E.bottom]), $(() => {
|
|
2904
2926
|
const c = he.current;
|
|
2905
2927
|
if (c === E.top || (he.current = E.top, Z.current))
|
|
2906
2928
|
return;
|
|
2907
|
-
const g =
|
|
2908
|
-
_.current =
|
|
2909
|
-
}, [E.top,
|
|
2910
|
-
const
|
|
2929
|
+
const g = Rt(_.current, c), v = cr(g, E.top);
|
|
2930
|
+
_.current = v, F.current?.scrollTo(v), Te(v, { immediate: !0 });
|
|
2931
|
+
}, [E.top, Te]);
|
|
2932
|
+
const ir = x(
|
|
2911
2933
|
(c, g) => {
|
|
2912
2934
|
if (t === 0)
|
|
2913
2935
|
return;
|
|
2914
|
-
const
|
|
2915
|
-
|
|
2916
|
-
let
|
|
2917
|
-
if (
|
|
2918
|
-
const
|
|
2919
|
-
|
|
2936
|
+
const v = Ze(c, t), W = A.get(v), G = g - W, Q = A.update(v, g);
|
|
2937
|
+
Q !== void 0 && p(Q), C.debug("[VirtualScroll] Updated item size manually", { index: v, size: g, total: Q });
|
|
2938
|
+
let te = Z.current ? Z.current.index : null;
|
|
2939
|
+
if (te === null) {
|
|
2940
|
+
const Re = _.current, qe = pn(X).top, Oe = Rt(Re, qe), { index: Ne, cumulative: xt } = A.findIndexAtOrAfter(Oe, { materializeOption: { materialize: !1 } });
|
|
2941
|
+
te = xt !== void 0 && xt === Oe ? Ne + 1 : Ne;
|
|
2920
2942
|
}
|
|
2921
|
-
if (
|
|
2922
|
-
const
|
|
2923
|
-
|
|
2943
|
+
if (te !== -1 && v < te && G !== 0) {
|
|
2944
|
+
const Re = _.current, qe = Re + G;
|
|
2945
|
+
Et(qe, G), Te(qe, { immediate: !0 }), C.debug("[VirtualScroll] Adjusted scroll for layout shift (manual update)", { from: Re, to: qe, causedByIndex: v, delta: G, activeVisibleStartIndex: te });
|
|
2924
2946
|
}
|
|
2925
2947
|
},
|
|
2926
|
-
[
|
|
2927
|
-
), St =
|
|
2948
|
+
[A, t, Et, Te, X]
|
|
2949
|
+
), St = x(
|
|
2928
2950
|
(c, g) => {
|
|
2929
2951
|
if (!F.current || t === 0)
|
|
2930
2952
|
return;
|
|
2931
|
-
const
|
|
2932
|
-
if (
|
|
2953
|
+
const v = Ze(c, t), W = Ze(v - s * 2, t), G = Ze(v + s * 2, t), { cumulative: Q, total: te, currentValue: Re } = A.prefixSum(v, { materializeOption: { materialize: !0, ranges: [{ from: W, to: G }] } });
|
|
2954
|
+
if (C.debug("[VirtualScroll] Scrolling to index:", v, "ItemBottom:", Q, "Total height:", te, "ItemHeight:", Re, "safeIndexFrom:", W, "safeIndexTo:", G), !te)
|
|
2933
2955
|
return;
|
|
2934
|
-
const
|
|
2935
|
-
let Oe =
|
|
2936
|
-
g?.align === "bottom" ? Oe =
|
|
2937
|
-
const Ne =
|
|
2956
|
+
const qe = Math.max(Q - Re, 0);
|
|
2957
|
+
let Oe = qe;
|
|
2958
|
+
g?.align === "bottom" ? Oe = Q - ze : g?.align === "center" && (Oe = qe + Re / 2 - ze / 2), g?.offset && (Oe -= g.offset), Oe = Math.max(0, Oe);
|
|
2959
|
+
const Ne = cr(Oe, E.top), xt = F.current?.getContentSize() ?? te + E.top + E.bottom, pt = Math.max(0, xt - ze), gt = Math.min(Ne, pt);
|
|
2938
2960
|
Z.current = {
|
|
2939
|
-
index:
|
|
2961
|
+
index: v,
|
|
2940
2962
|
align: g?.align,
|
|
2941
2963
|
offset: g?.offset
|
|
2942
2964
|
};
|
|
2943
|
-
const
|
|
2944
|
-
|
|
2965
|
+
const ar = F.current?.getScrollPosition() ?? -1, gr = Math.abs(ar - gt) > 0.5;
|
|
2966
|
+
Me.current = !1, je.current = 0, gr && (Me.current = !0, je.current += 1, F.current?.scrollTo(gt)), p(te), Te(gt, { immediate: !0 }), C.debug("[VirtualScroll] Setting scroll position to:", gt, { original: Ne, max: pt });
|
|
2945
2967
|
},
|
|
2946
|
-
[
|
|
2968
|
+
[A, s, t, E.top, E.bottom, ze, Te]
|
|
2947
2969
|
), u = f(R && t === 0 ? R : null);
|
|
2948
|
-
|
|
2970
|
+
$(() => {
|
|
2949
2971
|
const c = u.current;
|
|
2950
2972
|
!c || t === 0 || (u.current = null, St(se(Math.trunc(c.index), 0, t - 1), { align: "top", offset: -Math.max(0, c.offsetPx ?? 0) }));
|
|
2951
2973
|
}, [t, St]);
|
|
2952
|
-
const V =
|
|
2974
|
+
const V = x(
|
|
2953
2975
|
(c) => {
|
|
2954
2976
|
if (!F.current || t === 0)
|
|
2955
2977
|
return;
|
|
2956
|
-
const g =
|
|
2957
|
-
St(
|
|
2978
|
+
const g = A.getTotal(), v = se(Math.floor(c), 0, g), { index: W, cumulative: G, currentValue: Q } = A.findIndexAtOrAfter(v, { materializeOption: { materialize: !1 } }), Re = (G ?? 0) - (Q ?? 0) - v;
|
|
2979
|
+
St(W, { offset: Re });
|
|
2958
2980
|
},
|
|
2959
|
-
[
|
|
2960
|
-
), O =
|
|
2981
|
+
[A, t, St]
|
|
2982
|
+
), O = x(() => {
|
|
2961
2983
|
if (t === 0)
|
|
2962
2984
|
return null;
|
|
2963
|
-
const c =
|
|
2985
|
+
const c = Rt(_.current, E.top), { index: g, cumulative: v, currentValue: W } = A.findIndexAtOrAfter(c, { materializeOption: { materialize: !1 } });
|
|
2964
2986
|
if (g === -1)
|
|
2965
2987
|
return { index: t - 1, offsetPx: 0 };
|
|
2966
|
-
if (
|
|
2988
|
+
if (v === c)
|
|
2967
2989
|
return { index: se(g + 1, 0, t - 1), offsetPx: 0 };
|
|
2968
|
-
const G = (
|
|
2990
|
+
const G = (v ?? 0) - (W ?? 0);
|
|
2969
2991
|
return { index: g, offsetPx: Math.max(0, c - G) };
|
|
2970
|
-
}, [
|
|
2992
|
+
}, [A, t, E.top]), me = x(
|
|
2971
2993
|
(c) => {
|
|
2972
|
-
const g =
|
|
2973
|
-
V(
|
|
2974
|
-
const
|
|
2975
|
-
return
|
|
2994
|
+
const g = Rt(_.current, E.top), v = typeof c == "function" ? c(g) : c;
|
|
2995
|
+
V(v);
|
|
2996
|
+
const W = F.current?.getScrollPosition(), G = typeof W == "number" ? W : _.current;
|
|
2997
|
+
return Te(G), Rt(G, ye.current);
|
|
2976
2998
|
},
|
|
2977
|
-
[E.top, V,
|
|
2978
|
-
), ke =
|
|
2999
|
+
[E.top, V, Te]
|
|
3000
|
+
), ke = x((c) => {
|
|
2979
3001
|
const g = F.current;
|
|
2980
3002
|
if (!g)
|
|
2981
|
-
return
|
|
2982
|
-
const
|
|
2983
|
-
return
|
|
2984
|
-
}, []), He =
|
|
3003
|
+
return Rt(_.current, ye.current);
|
|
3004
|
+
const v = g.scrollTo((W) => W + c);
|
|
3005
|
+
return Rt(v, ye.current);
|
|
3006
|
+
}, []), He = x((c) => F.current?.applyWheel(c) ?? !1, []), It = x(
|
|
2985
3007
|
(c, g) => {
|
|
2986
|
-
|
|
2987
|
-
const
|
|
2988
|
-
|
|
2989
|
-
const
|
|
2990
|
-
|
|
3008
|
+
C.debug("[VirtualScroll] Scroll position changed:", c);
|
|
3009
|
+
const v = Me.current;
|
|
3010
|
+
v && (Me.current = !1);
|
|
3011
|
+
const W = je.current > 0;
|
|
3012
|
+
W && (je.current = 0);
|
|
2991
3013
|
const G = S.current && T.current === t;
|
|
2992
|
-
if (
|
|
2993
|
-
if (
|
|
3014
|
+
if (v || W || G || (Z.current = null), Te(c), ie) {
|
|
3015
|
+
if (v || W)
|
|
2994
3016
|
return;
|
|
2995
|
-
const
|
|
2996
|
-
if (
|
|
2997
|
-
const
|
|
2998
|
-
|
|
2999
|
-
|
|
3017
|
+
const Q = c - g;
|
|
3018
|
+
if (C.debug("[VirtualScroll] Scroll diff:", Q, "New:", c, "Prev:", g), Math.abs(Q) > 1) {
|
|
3019
|
+
const te = Q > 0 ? "down" : "up";
|
|
3020
|
+
ot(te), Ge(!0), C.debug("[VirtualScroll] Showing scroll buttons. Direction:", te), be.current && clearTimeout(be.current), be.current = setTimeout(() => {
|
|
3021
|
+
Ge(!1), C.debug("[VirtualScroll] Hiding scroll buttons");
|
|
3000
3022
|
}, 2e3);
|
|
3001
3023
|
}
|
|
3002
3024
|
}
|
|
3003
3025
|
},
|
|
3004
|
-
[
|
|
3005
|
-
),
|
|
3006
|
-
const c =
|
|
3007
|
-
return
|
|
3026
|
+
[Te, ie, t]
|
|
3027
|
+
), Ke = ve(() => Rt(yt, E.top), [E.top, yt]), Ft = ve(() => {
|
|
3028
|
+
const c = A.getTotal(), g = Dn(Ke, ze, s, t, n, A, c);
|
|
3029
|
+
return C.debug("[VirtualScroll] Calculated rendering range:", () => ({
|
|
3008
3030
|
...g,
|
|
3009
|
-
scrollPosition:
|
|
3031
|
+
scrollPosition: Ke,
|
|
3010
3032
|
renderingContentSize: c,
|
|
3011
3033
|
overscanCount: s,
|
|
3012
3034
|
viewportSize: ze
|
|
3013
3035
|
})), g;
|
|
3014
|
-
}, [
|
|
3036
|
+
}, [Ke, ze, s, t, n, A]), { renderingStartIndex: Tt, renderingEndIndex: Lt, visibleStartIndex: kt, visibleEndIndex: Ht } = Ft, Mt = x(
|
|
3015
3037
|
(c, g) => {
|
|
3016
3038
|
if (!le || t === 0)
|
|
3017
3039
|
return;
|
|
3018
|
-
const
|
|
3040
|
+
const v = Ze(c, t);
|
|
3019
3041
|
if (!(g?.ensureVisible ?? !0)) {
|
|
3020
|
-
const pt =
|
|
3021
|
-
pt && (
|
|
3042
|
+
const pt = Ue.current.get(v);
|
|
3043
|
+
pt && (we.current = null, Le.current = v, Ve(pt));
|
|
3022
3044
|
return;
|
|
3023
3045
|
}
|
|
3024
|
-
const G =
|
|
3025
|
-
if (
|
|
3026
|
-
St(
|
|
3027
|
-
const pt =
|
|
3028
|
-
pt ? (
|
|
3046
|
+
const G = A.prefixSum(v, { materializeOption: { materialize: !1 } }), Q = G.currentValue, te = Math.max(G.cumulative - Q, 0), Re = te + Q, qe = Rt(_.current, E.top), Oe = qe + ze;
|
|
3047
|
+
if (te < qe || Re > Oe) {
|
|
3048
|
+
St(v);
|
|
3049
|
+
const pt = Ue.current.get(v);
|
|
3050
|
+
pt ? (we.current = null, Le.current = v, Ve(pt)) : we.current = v;
|
|
3029
3051
|
return;
|
|
3030
3052
|
}
|
|
3031
|
-
const xt =
|
|
3053
|
+
const xt = Ue.current.get(v);
|
|
3032
3054
|
if (xt) {
|
|
3033
|
-
|
|
3055
|
+
we.current = null, Le.current = v, Ve(xt);
|
|
3034
3056
|
return;
|
|
3035
3057
|
}
|
|
3036
|
-
|
|
3058
|
+
we.current = v;
|
|
3037
3059
|
},
|
|
3038
|
-
[le, t,
|
|
3039
|
-
),
|
|
3060
|
+
[le, t, A, E.top, St, Ve, ze]
|
|
3061
|
+
), Gt = x(
|
|
3040
3062
|
(c, g) => {
|
|
3041
3063
|
if (!(!le || c.defaultPrevented) && !(c.altKey || c.metaKey || c.ctrlKey) && c.target === c.currentTarget && !c.currentTarget.isContentEditable) {
|
|
3042
3064
|
if (c.key === "ArrowLeft" || c.key === "ArrowRight") {
|
|
3043
|
-
const
|
|
3044
|
-
if (!
|
|
3065
|
+
const v = De.current;
|
|
3066
|
+
if (!v || c.shiftKey || !L?.includes("arrow") || !(Number.isFinite(N) && N > 0))
|
|
3045
3067
|
return;
|
|
3046
|
-
c.preventDefault(),
|
|
3068
|
+
c.preventDefault(), v(c.key === "ArrowLeft" ? -N : N);
|
|
3047
3069
|
return;
|
|
3048
3070
|
}
|
|
3049
3071
|
if (c.key === "ArrowDown") {
|
|
@@ -3057,20 +3079,20 @@ const xi = 1e4, Hi = () => {
|
|
|
3057
3079
|
if (c.key === "PageDown") {
|
|
3058
3080
|
if (g < t - 1) {
|
|
3059
3081
|
c.preventDefault();
|
|
3060
|
-
const { visibleStartIndex:
|
|
3061
|
-
Mt(
|
|
3082
|
+
const { visibleStartIndex: v, visibleEndIndex: W } = Ye.current, G = Math.max(W - v + 1, 1), Q = Math.max(G, 1), te = Ze(Math.min(g + Q, t - 1), t);
|
|
3083
|
+
Mt(te);
|
|
3062
3084
|
}
|
|
3063
3085
|
return;
|
|
3064
3086
|
}
|
|
3065
3087
|
if (c.key === "PageUp" && g > 0) {
|
|
3066
3088
|
c.preventDefault();
|
|
3067
|
-
const { visibleStartIndex:
|
|
3068
|
-
Mt(
|
|
3089
|
+
const { visibleStartIndex: v, visibleEndIndex: W } = Ye.current, G = Math.max(W - v + 1, 1), Q = Math.max(G, 1), te = Ze(g - Q, t);
|
|
3090
|
+
Mt(te);
|
|
3069
3091
|
}
|
|
3070
3092
|
}
|
|
3071
3093
|
},
|
|
3072
3094
|
[le, t, Mt, L, N]
|
|
3073
|
-
),
|
|
3095
|
+
), pr = x(
|
|
3074
3096
|
/**
|
|
3075
3097
|
* Returns focus from an element inside the row back to the row wrapper on Escape.
|
|
3076
3098
|
* 行内要素の Escape で行ラッパーへフォーカスを戻す処理。
|
|
@@ -3081,162 +3103,149 @@ const xi = 1e4, Hi = () => {
|
|
|
3081
3103
|
(c, g) => {
|
|
3082
3104
|
if (c.key !== "Escape" || c.defaultPrevented || c.nativeEvent.isComposing || c.target === c.currentTarget)
|
|
3083
3105
|
return;
|
|
3084
|
-
const
|
|
3085
|
-
|
|
3106
|
+
const v = c.target;
|
|
3107
|
+
v instanceof HTMLInputElement || v instanceof HTMLTextAreaElement || v instanceof HTMLSelectElement || v.isContentEditable || (c.preventDefault(), Mt(g));
|
|
3086
3108
|
},
|
|
3087
3109
|
[Mt]
|
|
3088
|
-
),
|
|
3110
|
+
), zt = x(
|
|
3089
3111
|
(c) => {
|
|
3090
3112
|
if (!le)
|
|
3091
3113
|
return;
|
|
3092
|
-
const g =
|
|
3093
|
-
|
|
3114
|
+
const g = Ze(c, t);
|
|
3115
|
+
we.current = null, Le.current = g, pe?.(g);
|
|
3094
3116
|
},
|
|
3095
3117
|
[le, t, pe]
|
|
3096
3118
|
);
|
|
3097
|
-
|
|
3098
|
-
const c = F.current?.getScrollPosition() ?? 0, g = _.current,
|
|
3099
|
-
|
|
3119
|
+
$(() => {
|
|
3120
|
+
const c = F.current?.getScrollPosition() ?? 0, g = _.current, v = Rt(g, E.top);
|
|
3121
|
+
C.debug("[VirtualScroll] Range change effect triggered", () => ({
|
|
3100
3122
|
renderingStartIndex: Tt,
|
|
3101
3123
|
renderingEndIndex: Lt,
|
|
3102
3124
|
visibleStartIndex: kt,
|
|
3103
3125
|
visibleEndIndex: Ht,
|
|
3104
|
-
scrollPositionState:
|
|
3126
|
+
scrollPositionState: yt,
|
|
3105
3127
|
paneScrollPosition: g,
|
|
3106
|
-
logicalScrollPosition:
|
|
3107
|
-
contentSize:
|
|
3128
|
+
logicalScrollPosition: v,
|
|
3129
|
+
contentSize: dt,
|
|
3108
3130
|
scrollPaneScrollPosition: c
|
|
3109
|
-
})),
|
|
3131
|
+
})), ht({
|
|
3110
3132
|
renderingStartIndex: Tt,
|
|
3111
3133
|
renderingEndIndex: Lt,
|
|
3112
3134
|
visibleStartIndex: kt,
|
|
3113
3135
|
visibleEndIndex: Ht,
|
|
3114
|
-
scrollPosition:
|
|
3115
|
-
totalHeight:
|
|
3136
|
+
scrollPosition: v,
|
|
3137
|
+
totalHeight: dt
|
|
3116
3138
|
});
|
|
3117
|
-
}, [
|
|
3118
|
-
const $t =
|
|
3139
|
+
}, [dt, Lt, Tt, E.top, ht, yt, Ht, kt]);
|
|
3140
|
+
const $t = x(() => {
|
|
3119
3141
|
if (!ie)
|
|
3120
3142
|
return null;
|
|
3121
|
-
const c = Fe &&
|
|
3122
|
-
return /* @__PURE__ */
|
|
3143
|
+
const c = Fe && ft !== null;
|
|
3144
|
+
return /* @__PURE__ */ j("div", { className: "aqvs-scroll-to-edge-overlay", "data-visible": c, inert: !c, children: ft === "up" ? /* @__PURE__ */ j("div", { className: "aqvs-scroll-to-edge-button-container aqvs-scroll-to-edge-button-container-top", children: /* @__PURE__ */ j(
|
|
3123
3145
|
"button",
|
|
3124
3146
|
{
|
|
3125
3147
|
type: "button",
|
|
3126
3148
|
className: "aqvs-scroll-to-edge-button",
|
|
3127
3149
|
tabIndex: c ? 0 : -1,
|
|
3128
|
-
onClick: (
|
|
3129
|
-
|
|
3150
|
+
onClick: (v) => {
|
|
3151
|
+
v.stopPropagation(), Me.current = !0, St(0), Ge(!1);
|
|
3130
3152
|
},
|
|
3131
|
-
children:
|
|
3153
|
+
children: Se.scrollToTop
|
|
3132
3154
|
}
|
|
3133
|
-
) }) : /* @__PURE__ */
|
|
3155
|
+
) }) : /* @__PURE__ */ j("div", { className: "aqvs-scroll-to-edge-button-container aqvs-scroll-to-edge-button-container-bottom", children: /* @__PURE__ */ j(
|
|
3134
3156
|
"button",
|
|
3135
3157
|
{
|
|
3136
3158
|
type: "button",
|
|
3137
3159
|
className: "aqvs-scroll-to-edge-button",
|
|
3138
3160
|
tabIndex: c ? 0 : -1,
|
|
3139
|
-
onClick: (
|
|
3140
|
-
|
|
3161
|
+
onClick: (v) => {
|
|
3162
|
+
v.stopPropagation(), Me.current = !0, St(t - 1), Ge(!1);
|
|
3141
3163
|
},
|
|
3142
|
-
children:
|
|
3164
|
+
children: Se.scrollToBottom
|
|
3143
3165
|
}
|
|
3144
3166
|
) }) });
|
|
3145
|
-
}, [ie, Fe,
|
|
3167
|
+
}, [ie, Fe, ft, St, t, Se]), Xt = f(0), { visibleItems: Ot, renderAnchor: qt } = ve(() => {
|
|
3146
3168
|
if (t === 0)
|
|
3147
3169
|
return {
|
|
3148
|
-
visibleItems: /* @__PURE__ */
|
|
3170
|
+
visibleItems: /* @__PURE__ */ j("div", { className: "aqvs-no-items-container", children: /* @__PURE__ */ j("div", { className: "aqvs-no-items-text", children: Se.noItems }) }),
|
|
3149
3171
|
renderAnchor: 0
|
|
3150
3172
|
};
|
|
3151
|
-
const c =
|
|
3152
|
-
Number.isFinite(G) && Math.abs(G - Xt.current) >
|
|
3153
|
-
const
|
|
3154
|
-
let
|
|
3173
|
+
const c = Ze(Tt, t), g = Ze(Lt, t), { cumulative: v, currentValue: W } = A.prefixSum(c, { materializeOption: { materialize: !1 } }), G = v - W;
|
|
3174
|
+
Number.isFinite(G) && Math.abs(G - Xt.current) > Cn && (Xt.current = G);
|
|
3175
|
+
const Q = Xt.current, te = [], Re = [];
|
|
3176
|
+
let qe = 0, Oe = G;
|
|
3155
3177
|
for (let Ne = c; Ne <= g; Ne++) {
|
|
3156
|
-
if (
|
|
3157
|
-
|
|
3178
|
+
if (Re.length >= Gr) {
|
|
3179
|
+
C.warn("[VirtualScroll] Rendered item count reached the safety cap; truncating render window.", { cap: Gr, safeRenderingStartIndex: c, safeRenderingEndIndex: g });
|
|
3158
3180
|
break;
|
|
3159
3181
|
}
|
|
3160
|
-
const xt = n(Ne), pt =
|
|
3161
|
-
|
|
3162
|
-
const
|
|
3163
|
-
|
|
3164
|
-
/* @__PURE__ */
|
|
3165
|
-
|
|
3182
|
+
const xt = n(Ne), pt = A.get(Ne), gt = xt - pt;
|
|
3183
|
+
gt !== 0 && te.push({ index: Ne, value: xt });
|
|
3184
|
+
const ar = Oe + qe, gr = r ? r(Ne) : Ne;
|
|
3185
|
+
Re.push(
|
|
3186
|
+
/* @__PURE__ */ j(
|
|
3187
|
+
zi,
|
|
3166
3188
|
{
|
|
3167
3189
|
index: Ne,
|
|
3168
|
-
top:
|
|
3190
|
+
top: ar - Q,
|
|
3169
3191
|
height: xt,
|
|
3170
3192
|
item: e(Ne),
|
|
3171
|
-
clipItemHeight:
|
|
3193
|
+
clipItemHeight: st,
|
|
3172
3194
|
enableKeyboardNavigation: le,
|
|
3173
|
-
onKeyDown:
|
|
3174
|
-
onEscapeKeyDown: vt ?
|
|
3175
|
-
onFocus:
|
|
3176
|
-
registerItemRef:
|
|
3177
|
-
children:
|
|
3195
|
+
onKeyDown: Gt,
|
|
3196
|
+
onEscapeKeyDown: vt ? pr : void 0,
|
|
3197
|
+
onFocus: zt,
|
|
3198
|
+
registerItemRef: Qt,
|
|
3199
|
+
children: b
|
|
3178
3200
|
},
|
|
3179
|
-
|
|
3201
|
+
gr
|
|
3180
3202
|
)
|
|
3181
|
-
),
|
|
3203
|
+
), qe += gt, Oe += pt;
|
|
3182
3204
|
}
|
|
3183
|
-
return
|
|
3184
|
-
if (
|
|
3205
|
+
return te.length > 0 && Promise.resolve().then(() => {
|
|
3206
|
+
if (bt.current)
|
|
3185
3207
|
return;
|
|
3186
3208
|
let Ne = 0;
|
|
3187
|
-
for (const
|
|
3188
|
-
if (
|
|
3189
|
-
const
|
|
3190
|
-
Ne +=
|
|
3209
|
+
for (const gt of te)
|
|
3210
|
+
if (gt.index < kt) {
|
|
3211
|
+
const ar = A.get(gt.index);
|
|
3212
|
+
Ne += gt.value - ar;
|
|
3191
3213
|
}
|
|
3192
|
-
const xt =
|
|
3193
|
-
if (
|
|
3214
|
+
const xt = A.updates(te);
|
|
3215
|
+
if (bt.current || typeof xt != "number")
|
|
3194
3216
|
return;
|
|
3195
|
-
p(xt),
|
|
3217
|
+
p(xt), C.debug("[VirtualScroll] Updated heights for items", te, "New total height:", xt);
|
|
3196
3218
|
const pt = F.current?.getScrollPosition() ?? _.current;
|
|
3197
3219
|
if (Ne !== 0) {
|
|
3198
|
-
const
|
|
3199
|
-
|
|
3200
|
-
} else pt !== _.current &&
|
|
3201
|
-
}), { visibleItems:
|
|
3220
|
+
const gt = pt + Ne;
|
|
3221
|
+
Et(gt, Ne), Te(gt, { immediate: !0 }), C.debug("[VirtualScroll] Adjusted scroll for layout shift (auto update)", { from: pt, to: gt, shiftAmount: Ne });
|
|
3222
|
+
} else pt !== _.current && Te(pt);
|
|
3223
|
+
}), { visibleItems: Re, renderAnchor: Q };
|
|
3202
3224
|
}, [
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3225
|
+
b,
|
|
3226
|
+
st,
|
|
3227
|
+
dt,
|
|
3206
3228
|
le,
|
|
3207
3229
|
t,
|
|
3208
|
-
|
|
3230
|
+
A,
|
|
3209
3231
|
e,
|
|
3210
3232
|
r,
|
|
3211
3233
|
n,
|
|
3212
|
-
Nt,
|
|
3213
|
-
Kt,
|
|
3214
|
-
vt,
|
|
3215
|
-
gr,
|
|
3216
3234
|
zt,
|
|
3217
|
-
|
|
3235
|
+
Gt,
|
|
3236
|
+
vt,
|
|
3237
|
+
pr,
|
|
3238
|
+
Et,
|
|
3239
|
+
Qt,
|
|
3218
3240
|
Lt,
|
|
3219
3241
|
Tt,
|
|
3220
|
-
|
|
3221
|
-
|
|
3242
|
+
Se,
|
|
3243
|
+
Te,
|
|
3222
3244
|
kt
|
|
3223
|
-
]),
|
|
3224
|
-
if (c === null)
|
|
3225
|
-
return;
|
|
3226
|
-
const g = wi(c);
|
|
3227
|
-
let x;
|
|
3228
|
-
const k = () => {
|
|
3229
|
-
x?.removeEventListener("change", k);
|
|
3230
|
-
const $ = g.devicePixelRatio;
|
|
3231
|
-
nr($), x = typeof g.matchMedia == "function" ? g.matchMedia(`(resolution: ${$}dppx)`) : void 0, x?.addEventListener("change", k);
|
|
3232
|
-
};
|
|
3233
|
-
return k(), () => {
|
|
3234
|
-
x?.removeEventListener("change", k);
|
|
3235
|
-
};
|
|
3236
|
-
}, []), lr = b(
|
|
3245
|
+
]), sr = x(
|
|
3237
3246
|
(c) => {
|
|
3238
|
-
const g = (ne ?? 0) > 0,
|
|
3239
|
-
if (
|
|
3247
|
+
const g = (ne ?? 0) > 0, v = Math.abs(c - yt), W = g && v > 0.5 ? yt : c, G = Rt(W, E.top);
|
|
3248
|
+
if (C.debug("[VirtualScroll] Rendering visible items", () => ({
|
|
3240
3249
|
currentScrollPosition: c,
|
|
3241
3250
|
effectiveScrollPosition: G,
|
|
3242
3251
|
renderingStartIndex: Tt,
|
|
@@ -3244,78 +3253,76 @@ const xi = 1e4, Hi = () => {
|
|
|
3244
3253
|
itemCount: t,
|
|
3245
3254
|
viewportSize: ze,
|
|
3246
3255
|
callbackThrottleMs: ne,
|
|
3247
|
-
diff:
|
|
3248
|
-
rawEffectiveScrollPosition:
|
|
3256
|
+
diff: v,
|
|
3257
|
+
rawEffectiveScrollPosition: W
|
|
3249
3258
|
})), t === 0)
|
|
3250
3259
|
return Ot;
|
|
3251
|
-
const
|
|
3260
|
+
const Q = E.top + qt - W, te = E.bottom > 0 ? /* @__PURE__ */ j(
|
|
3252
3261
|
"div",
|
|
3253
3262
|
{
|
|
3254
3263
|
className: "aqvs-bottom-inset",
|
|
3255
3264
|
style: {
|
|
3256
3265
|
// ラッパー座標での bottom インセット位置 = コンテンツ総高さ (最終行の下端) - アンカー。
|
|
3257
|
-
top:
|
|
3266
|
+
top: A.getTotal() - qt,
|
|
3258
3267
|
height: E.bottom
|
|
3259
3268
|
}
|
|
3260
3269
|
},
|
|
3261
3270
|
"virtualscroll-bottom-inset"
|
|
3262
3271
|
) : null;
|
|
3263
|
-
return
|
|
3264
|
-
containerTop:
|
|
3265
|
-
|
|
3266
|
-
wrapperTranslateY: Q,
|
|
3267
|
-
logicalScrollPosition: Ze,
|
|
3272
|
+
return C.debug("[VirtualScroll] Rendering items", () => ({
|
|
3273
|
+
containerTop: Q,
|
|
3274
|
+
logicalScrollPosition: Ke,
|
|
3268
3275
|
resolvedInsets: E,
|
|
3269
3276
|
effectiveScrollPosition: G
|
|
3270
|
-
})), /* @__PURE__ */
|
|
3277
|
+
})), /* @__PURE__ */ Bt(Ri, { translateY: Q, children: [
|
|
3271
3278
|
Ot,
|
|
3272
|
-
|
|
3279
|
+
te
|
|
3273
3280
|
] });
|
|
3274
3281
|
},
|
|
3275
|
-
[ne, t,
|
|
3276
|
-
),
|
|
3282
|
+
[ne, t, A, Ke, qt, Lt, Tt, E, yt, ze, Ot]
|
|
3283
|
+
), jt = ve(
|
|
3277
3284
|
() => ({
|
|
3278
3285
|
renderingStartIndex: Ft.renderingStartIndex,
|
|
3279
3286
|
renderingEndIndex: Ft.renderingEndIndex,
|
|
3280
3287
|
visibleStartIndex: Ft.visibleStartIndex,
|
|
3281
3288
|
visibleEndIndex: Ft.visibleEndIndex,
|
|
3282
|
-
scrollPosition:
|
|
3283
|
-
totalHeight:
|
|
3289
|
+
scrollPosition: Ke,
|
|
3290
|
+
totalHeight: A.getTotal()
|
|
3284
3291
|
// contentSize (State) ではなく最新値を反映
|
|
3285
3292
|
}),
|
|
3286
3293
|
// contentSize を依存に含めることで、updateItemSize/updates 等で木の総高さが変わった際に
|
|
3287
3294
|
// (fenwickTree は安定参照のため getTotal() の変化だけでは再計算されない) 総高さを再取得する。
|
|
3288
|
-
[Ft,
|
|
3295
|
+
[Ft, Ke, A, dt]
|
|
3289
3296
|
);
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
}, [
|
|
3293
|
-
const [
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
}, [
|
|
3297
|
-
const
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
}, [
|
|
3301
|
-
if (!(
|
|
3302
|
-
|
|
3297
|
+
$(() => {
|
|
3298
|
+
Ye.current = jt;
|
|
3299
|
+
}, [jt]);
|
|
3300
|
+
const [Nt, er] = Ce(""), Kt = f(J);
|
|
3301
|
+
Qe(() => {
|
|
3302
|
+
Kt.current = J;
|
|
3303
|
+
}, [J]);
|
|
3304
|
+
const mt = J?.debounceMs ?? 400, ur = Number.isFinite(mt) && mt >= 0, Vt = J !== void 0;
|
|
3305
|
+
$(() => {
|
|
3306
|
+
Vt && !ur && C.warn(`[VirtualScroll] liveRegion.debounceMs must be a finite number >= 0, received ${mt}. Announcements are disabled.`);
|
|
3307
|
+
}, [Vt, ur, mt]), $(() => {
|
|
3308
|
+
if (!(Vt && ur)) {
|
|
3309
|
+
er("");
|
|
3303
3310
|
return;
|
|
3304
3311
|
}
|
|
3305
3312
|
const c = setTimeout(() => {
|
|
3306
|
-
const g =
|
|
3313
|
+
const g = Kt.current?.format;
|
|
3307
3314
|
if (!g)
|
|
3308
3315
|
return;
|
|
3309
|
-
const
|
|
3310
|
-
|
|
3311
|
-
},
|
|
3316
|
+
const v = g({ visibleStartIndex: kt, visibleEndIndex: Ht, itemCount: t });
|
|
3317
|
+
er(v);
|
|
3318
|
+
}, mt);
|
|
3312
3319
|
return () => clearTimeout(c);
|
|
3313
|
-
}, [
|
|
3320
|
+
}, [Vt, ur, mt, kt, Ht, t]), Dr(
|
|
3314
3321
|
oe,
|
|
3315
3322
|
() => ({
|
|
3316
3323
|
getScrollPosition: () => {
|
|
3317
3324
|
const c = F.current?.getScrollPosition();
|
|
3318
|
-
return typeof c == "number" ?
|
|
3325
|
+
return typeof c == "number" ? Rt(c, ye.current) : -1;
|
|
3319
3326
|
},
|
|
3320
3327
|
getContentSize: () => F.current?.getContentSize() ?? -1,
|
|
3321
3328
|
getViewportSize: () => F.current?.getViewportSize() ?? -1,
|
|
@@ -3323,74 +3330,74 @@ const xi = 1e4, Hi = () => {
|
|
|
3323
3330
|
scrollBy: ke,
|
|
3324
3331
|
applyWheel: He,
|
|
3325
3332
|
scrollToIndex: St,
|
|
3326
|
-
getFenwickTreeTotalHeight: () =>
|
|
3327
|
-
getFenwickSize: () =>
|
|
3333
|
+
getFenwickTreeTotalHeight: () => A.getTotal(),
|
|
3334
|
+
getFenwickSize: () => A.getSize(),
|
|
3328
3335
|
focusItemAtIndex: Mt,
|
|
3329
|
-
getRange: () =>
|
|
3336
|
+
getRange: () => Ye.current,
|
|
3330
3337
|
getScrollAnchor: O,
|
|
3331
|
-
updateItemSize:
|
|
3338
|
+
updateItemSize: ir
|
|
3332
3339
|
}),
|
|
3333
|
-
[me, ke, He, St,
|
|
3340
|
+
[me, ke, He, St, A, Mt, O, ir]
|
|
3334
3341
|
);
|
|
3335
|
-
const
|
|
3336
|
-
|
|
3342
|
+
const Ir = A.getTotal() + E.top + E.bottom, or = /* @__PURE__ */ j(
|
|
3343
|
+
mi,
|
|
3337
3344
|
{
|
|
3338
3345
|
ref: F,
|
|
3339
|
-
contentSize:
|
|
3346
|
+
contentSize: Ir,
|
|
3340
3347
|
viewportSize: i,
|
|
3341
3348
|
onViewportSizeChange: $e,
|
|
3342
3349
|
className: o,
|
|
3343
3350
|
testId: l,
|
|
3344
|
-
onScroll:
|
|
3351
|
+
onScroll: It,
|
|
3345
3352
|
background: M,
|
|
3346
3353
|
tapScrollCircleOptions: ce,
|
|
3347
|
-
inertiaOptions:
|
|
3354
|
+
inertiaOptions: ct,
|
|
3348
3355
|
overscrollBehavior: _e,
|
|
3349
3356
|
itemCount: t,
|
|
3350
|
-
scrollBarWidth:
|
|
3357
|
+
scrollBarWidth: ee,
|
|
3351
3358
|
enableThumbDrag: ge,
|
|
3352
|
-
enableTrackClick:
|
|
3359
|
+
enableTrackClick: Je,
|
|
3353
3360
|
enableArrowButtons: z,
|
|
3354
|
-
enableArrowButtonTabStops:
|
|
3355
|
-
enablePointerDrag:
|
|
3361
|
+
enableArrowButtonTabStops: Y,
|
|
3362
|
+
enablePointerDrag: At,
|
|
3356
3363
|
pointerDragInputs: ue,
|
|
3357
|
-
renderThumbOverlay:
|
|
3358
|
-
wheelSpeedMultiplier:
|
|
3359
|
-
onWheelHorizontal:
|
|
3364
|
+
renderThumbOverlay: et,
|
|
3365
|
+
wheelSpeedMultiplier: it,
|
|
3366
|
+
onWheelHorizontal: k,
|
|
3360
3367
|
onPanHorizontal: ae,
|
|
3361
3368
|
contentInsets: E,
|
|
3362
3369
|
contentProps: P,
|
|
3363
3370
|
visibleStartIndex: kt,
|
|
3364
3371
|
visibleEndIndex: Ht,
|
|
3365
3372
|
renderOverlay: $t,
|
|
3366
|
-
initialScrollPosition:
|
|
3373
|
+
initialScrollPosition: ut.position,
|
|
3367
3374
|
locale: K,
|
|
3368
|
-
labels:
|
|
3369
|
-
children:
|
|
3375
|
+
labels: q,
|
|
3376
|
+
children: sr
|
|
3370
3377
|
}
|
|
3371
3378
|
);
|
|
3372
|
-
return
|
|
3373
|
-
|
|
3374
|
-
/* @__PURE__ */
|
|
3375
|
-
] }) :
|
|
3376
|
-
},
|
|
3379
|
+
return Vt ? /* @__PURE__ */ Bt(jr, { children: [
|
|
3380
|
+
or,
|
|
3381
|
+
/* @__PURE__ */ j("div", { className: "aqvs-live-region", role: "status", "aria-live": "polite", "aria-atomic": "true", "data-aqvs-live-region": "", children: Nt })
|
|
3382
|
+
] }) : or;
|
|
3383
|
+
}, Vi = Ar(Ni), wr = 262144, bn = 3, Ci = 32768, xn = 128, vn = 128, wn = 128, Sn = 128, Xr = 10, Ai = (t, e) => Math.max(1, Math.floor((t ?? Ci) / Math.max(1, e))), Di = (t, e, r, n, i) => {
|
|
3377
3384
|
let s = 0, o = 0, l = Math.max(0, Math.min(n, r - 1));
|
|
3378
|
-
for (; l < r && s < t && o <
|
|
3385
|
+
for (; l < r && s < t && o < Gr; )
|
|
3379
3386
|
s += e(l), o += 1, l += 1;
|
|
3380
3387
|
return Math.max(1, o + 2 * i + 2);
|
|
3381
|
-
},
|
|
3382
|
-
if (!(Number.isInteger(t) && t >= 0 && t <=
|
|
3388
|
+
}, Vr = (t, e, r) => {
|
|
3389
|
+
if (!(Number.isInteger(t) && t >= 0 && t <= wr)) {
|
|
3383
3390
|
const n = e === "row" ? "getRowHeight" : "getColWidth", i = e === "row" ? "rows" : "columns";
|
|
3384
3391
|
throw new RangeError(
|
|
3385
|
-
`[VirtualGrid] ${n}(${r}) returned ${t} — must be an integer in [0, ${
|
|
3392
|
+
`[VirtualGrid] ${n}(${r}) returned ${t} — must be an integer in [0, ${wr}] (0 = hidden). Round fractional sizes to whole pixels and split content larger than ${wr} px across several ${i}: a larger track could push cell positions past the 2^25 px layout-coordinate limit of browsers.`
|
|
3386
3393
|
);
|
|
3387
3394
|
}
|
|
3388
3395
|
return t;
|
|
3389
|
-
},
|
|
3390
|
-
const d =
|
|
3396
|
+
}, Li = (t, e, r, n, i, s, o, l) => {
|
|
3397
|
+
const d = Dn(t, e, r, n, i, s, o);
|
|
3391
3398
|
if (n === 0)
|
|
3392
3399
|
return { renderingColStart: 0, renderingColEnd: 0, visibleColStart: 0, visibleColEnd: 0, colAnchor: 0 };
|
|
3393
|
-
const
|
|
3400
|
+
const h = se(d.renderingStartIndex, 0, n - 1), { cumulative: b, currentValue: M } = s.prefixSum(h, { materializeOption: { materialize: !1 } }), I = b - M, w = Number.isFinite(I) && Math.abs(I - l) > Cn ? I : l;
|
|
3394
3401
|
return {
|
|
3395
3402
|
renderingColStart: d.renderingStartIndex,
|
|
3396
3403
|
renderingColEnd: d.renderingEndIndex,
|
|
@@ -3398,30 +3405,30 @@ const xi = 1e4, Hi = () => {
|
|
|
3398
3405
|
visibleColEnd: d.visibleEndIndex,
|
|
3399
3406
|
colAnchor: w
|
|
3400
3407
|
};
|
|
3401
|
-
},
|
|
3408
|
+
}, Mn = [], Oi = (t, e, r, n, i) => {
|
|
3402
3409
|
const s = [], o = [];
|
|
3403
3410
|
if (e < t)
|
|
3404
3411
|
return { columns: s, widthUpdates: o, truncated: 0 };
|
|
3405
3412
|
const l = n.prefixSum(t, { materializeOption: { materialize: !1 } });
|
|
3406
|
-
let d = l.cumulative - l.currentValue,
|
|
3407
|
-
for (;
|
|
3413
|
+
let d = l.cumulative - l.currentValue, h = 0, b = t;
|
|
3414
|
+
for (; b <= e; ) {
|
|
3408
3415
|
if (s.length >= i)
|
|
3409
|
-
return { columns: s, widthUpdates: o, truncated: e -
|
|
3410
|
-
const M = r(
|
|
3411
|
-
if (M !==
|
|
3412
|
-
s.push({ col:
|
|
3416
|
+
return { columns: s, widthUpdates: o, truncated: e - b + 1 };
|
|
3417
|
+
const M = r(b), I = n.get(b);
|
|
3418
|
+
if (M !== I && o.push({ index: b, value: M }), M > 0) {
|
|
3419
|
+
s.push({ col: b, left: d, width: M }), d += I, h = 0, b += 1;
|
|
3413
3420
|
continue;
|
|
3414
3421
|
}
|
|
3415
|
-
if (d +=
|
|
3422
|
+
if (d += I, h += 1, b += 1, h > yr) {
|
|
3416
3423
|
const w = n.findIndexAtOrAfter(d + 0.5, { materializeOption: { materialize: !1 } });
|
|
3417
|
-
if (w.index === -1 || w.index <=
|
|
3424
|
+
if (w.index === -1 || w.index <= b || !Number.isSafeInteger(w.index))
|
|
3418
3425
|
break;
|
|
3419
3426
|
const R = n.prefixSum(w.index, { materializeOption: { materialize: !1 } });
|
|
3420
|
-
d = R.cumulative - R.currentValue,
|
|
3427
|
+
d = R.cumulative - R.currentValue, b = w.index, h = 0;
|
|
3421
3428
|
}
|
|
3422
3429
|
}
|
|
3423
3430
|
return { columns: s, widthUpdates: o, truncated: 0 };
|
|
3424
|
-
},
|
|
3431
|
+
}, _i = (t, e, r) => {
|
|
3425
3432
|
const n = [], i = [];
|
|
3426
3433
|
let s = 0;
|
|
3427
3434
|
for (let o = 0; o < t; o += 1) {
|
|
@@ -3429,15 +3436,15 @@ const xi = 1e4, Hi = () => {
|
|
|
3429
3436
|
l !== d && i.push({ index: o, value: l }), l > 0 && n.push({ col: o, left: s, width: l }), s += d;
|
|
3430
3437
|
}
|
|
3431
3438
|
return { columns: n, widthUpdates: i, width: s };
|
|
3432
|
-
},
|
|
3439
|
+
}, Fi = (t, e, r, n) => {
|
|
3433
3440
|
const i = [], s = [];
|
|
3434
3441
|
let o = 0;
|
|
3435
3442
|
for (let l = t - e; l < t; l += 1) {
|
|
3436
|
-
const d = r(l),
|
|
3437
|
-
d !==
|
|
3443
|
+
const d = r(l), h = n.get(l);
|
|
3444
|
+
d !== h && s.push({ index: l, value: d }), d > 0 && i.push({ col: l, left: o, width: d }), o += h;
|
|
3438
3445
|
}
|
|
3439
3446
|
return { columns: i, widthUpdates: s, width: o };
|
|
3440
|
-
},
|
|
3447
|
+
}, Cr = (t, e, r) => Math.min(t, Math.max(0, r - e)), ki = { renderingColStart: 0, renderingColEnd: 0, visibleColStart: 0, visibleColEnd: 0, colAnchor: 0, key: "0:0:0" }, Hi = ({
|
|
3441
3448
|
rowCount: t,
|
|
3442
3449
|
colCount: e,
|
|
3443
3450
|
getRowHeight: r,
|
|
@@ -3447,139 +3454,139 @@ const xi = 1e4, Hi = () => {
|
|
|
3447
3454
|
children: o,
|
|
3448
3455
|
getCellProps: l,
|
|
3449
3456
|
getRowProps: d,
|
|
3450
|
-
contentProps:
|
|
3451
|
-
background:
|
|
3457
|
+
contentProps: h,
|
|
3458
|
+
background: b,
|
|
3452
3459
|
contentInsets: M,
|
|
3453
|
-
onRowFocus:
|
|
3460
|
+
onRowFocus: I,
|
|
3454
3461
|
frozenLeadingCols: w = 0,
|
|
3455
3462
|
frozenLeadingRows: R = 0,
|
|
3456
3463
|
frozenTrailingCols: ne = 0,
|
|
3457
|
-
frozenTrailingRows:
|
|
3464
|
+
frozenTrailingRows: X = 0,
|
|
3458
3465
|
horizontalKeyInputs: pe,
|
|
3459
|
-
horizontalKeyStep:
|
|
3466
|
+
horizontalKeyStep: Ae,
|
|
3460
3467
|
onScroll: D,
|
|
3461
|
-
onRangeChange:
|
|
3468
|
+
onRangeChange: k,
|
|
3462
3469
|
onRenderTruncated: ae,
|
|
3463
3470
|
callbackThrottleMs: L,
|
|
3464
3471
|
initialScrollAnchor: N,
|
|
3465
|
-
overscanRows: P =
|
|
3466
|
-
overscanCols:
|
|
3472
|
+
overscanRows: P = bn,
|
|
3473
|
+
overscanCols: J = bn,
|
|
3467
3474
|
viewportSize: K,
|
|
3468
|
-
__maxRenderedCells:
|
|
3475
|
+
__maxRenderedCells: q,
|
|
3469
3476
|
behaviorOptions: oe,
|
|
3470
|
-
scrollBarOptions:
|
|
3477
|
+
scrollBarOptions: ee,
|
|
3471
3478
|
liveRegion: ge,
|
|
3472
|
-
locale:
|
|
3479
|
+
locale: Je,
|
|
3473
3480
|
labels: z,
|
|
3474
|
-
className:
|
|
3481
|
+
className: Y,
|
|
3475
3482
|
testId: ie
|
|
3476
|
-
},
|
|
3477
|
-
const ce = f(null),
|
|
3478
|
-
|
|
3483
|
+
}, et) => {
|
|
3484
|
+
const ce = f(null), Se = f(null), At = f(r);
|
|
3485
|
+
At.current = r;
|
|
3479
3486
|
const ue = f(n);
|
|
3480
3487
|
ue.current = n;
|
|
3481
|
-
const le = oe?.resetOnGetColWidthChange === !0,
|
|
3482
|
-
(a) =>
|
|
3483
|
-
[
|
|
3484
|
-
),
|
|
3485
|
-
(a) =>
|
|
3486
|
-
[
|
|
3487
|
-
),
|
|
3488
|
-
if (
|
|
3489
|
-
throw new RangeError(`[VirtualGrid] behaviorOptions.defaultColWidth must be an integer in [0, ${
|
|
3490
|
-
return { resetOnValueFnChange: le, baseValue:
|
|
3491
|
-
}, [le,
|
|
3492
|
-
if (!(Number.isInteger(w) && w >= 0 && w <=
|
|
3493
|
-
throw new RangeError(`[VirtualGrid] frozenLeadingCols must be an integer in [0, ${
|
|
3494
|
-
const F = Math.min(w, e),
|
|
3495
|
-
if (!(Number.isInteger(ne) && ne >= 0 && ne <=
|
|
3496
|
-
throw new RangeError(`[VirtualGrid] frozenTrailingCols must be an integer in [0, ${
|
|
3497
|
-
const Z = Math.min(ne, e - F),
|
|
3498
|
-
if (!(Number.isInteger(R) && R >= 0 && R <=
|
|
3499
|
-
throw new RangeError(`[VirtualGrid] frozenLeadingRows must be an integer in [0, ${
|
|
3500
|
-
const
|
|
3501
|
-
if (!(Number.isInteger(
|
|
3502
|
-
throw new RangeError(`[VirtualGrid] frozenTrailingRows must be an integer in [0, ${
|
|
3503
|
-
const E = Math.min(
|
|
3504
|
-
if (
|
|
3488
|
+
const le = oe?.resetOnGetColWidthChange === !0, it = oe?.resetOnGetItemHeightChange === !0 ? r : null, ct = le ? n : null, _e = x(
|
|
3489
|
+
(a) => Vr(At.current(a), "row", a),
|
|
3490
|
+
[it]
|
|
3491
|
+
), st = x(
|
|
3492
|
+
(a) => Vr(ue.current(a), "col", a),
|
|
3493
|
+
[ct]
|
|
3494
|
+
), tt = oe?.defaultColWidth, rt = ve(() => {
|
|
3495
|
+
if (tt !== void 0 && !(Number.isInteger(tt) && tt >= 0 && tt <= wr))
|
|
3496
|
+
throw new RangeError(`[VirtualGrid] behaviorOptions.defaultColWidth must be an integer in [0, ${wr}], received ${tt}.`);
|
|
3497
|
+
return { resetOnValueFnChange: le, baseValue: tt };
|
|
3498
|
+
}, [le, tt]), fe = Vn(e, st, rt), [ze, $e] = Ce(0);
|
|
3499
|
+
if (!(Number.isInteger(w) && w >= 0 && w <= xn))
|
|
3500
|
+
throw new RangeError(`[VirtualGrid] frozenLeadingCols must be an integer in [0, ${xn}], received ${w}.`);
|
|
3501
|
+
const F = Math.min(w, e), Ye = f(0);
|
|
3502
|
+
if (!(Number.isInteger(ne) && ne >= 0 && ne <= wn))
|
|
3503
|
+
throw new RangeError(`[VirtualGrid] frozenTrailingCols must be an integer in [0, ${wn}], received ${ne}.`);
|
|
3504
|
+
const Z = Math.min(ne, e - F), bt = f(0);
|
|
3505
|
+
if (!(Number.isInteger(R) && R >= 0 && R <= vn))
|
|
3506
|
+
throw new RangeError(`[VirtualGrid] frozenLeadingRows must be an integer in [0, ${vn}], received ${R}.`);
|
|
3507
|
+
const B = Math.min(R, t);
|
|
3508
|
+
if (!(Number.isInteger(X) && X >= 0 && X <= Sn))
|
|
3509
|
+
throw new RangeError(`[VirtualGrid] frozenTrailingRows must be an integer in [0, ${Sn}], received ${X}.`);
|
|
3510
|
+
const E = Math.min(X, t - B), lt = Math.max(0, t - B - E), Pe = f(!1), A = f(0), ut = f(0), [yt, Dt] = Ce(0), { frozenRows: dt, frozenHeight: p } = ve(() => {
|
|
3511
|
+
if (B === 0)
|
|
3505
3512
|
return { frozenRows: [], frozenHeight: 0 };
|
|
3506
3513
|
const a = [];
|
|
3507
|
-
let
|
|
3508
|
-
for (let
|
|
3509
|
-
const
|
|
3510
|
-
|
|
3514
|
+
let m = 0;
|
|
3515
|
+
for (let y = 0; y < B; y += 1) {
|
|
3516
|
+
const H = _e(y);
|
|
3517
|
+
H > 0 && a.push({ row: y, top: m, height: H }), m += H;
|
|
3511
3518
|
}
|
|
3512
|
-
return { frozenRows: a, frozenHeight:
|
|
3513
|
-
}, [
|
|
3514
|
-
|
|
3515
|
-
const [_, he] =
|
|
3519
|
+
return { frozenRows: a, frozenHeight: m };
|
|
3520
|
+
}, [B, yt, _e]);
|
|
3521
|
+
A.current = p;
|
|
3522
|
+
const [_, he] = Ce(0), { trailingRows: U, trailingHeight: re } = ve(() => {
|
|
3516
3523
|
if (E === 0)
|
|
3517
3524
|
return { trailingRows: [], trailingHeight: 0 };
|
|
3518
3525
|
const a = [];
|
|
3519
|
-
let
|
|
3520
|
-
for (let
|
|
3521
|
-
const
|
|
3522
|
-
|
|
3526
|
+
let m = 0;
|
|
3527
|
+
for (let y = t - E; y < t; y += 1) {
|
|
3528
|
+
const H = _e(y);
|
|
3529
|
+
H > 0 && a.push({ row: y, top: m, height: H }), m += H;
|
|
3523
3530
|
}
|
|
3524
|
-
return { trailingRows: a, trailingHeight:
|
|
3531
|
+
return { trailingRows: a, trailingHeight: m };
|
|
3525
3532
|
}, [E, t, _, _e]);
|
|
3526
|
-
|
|
3527
|
-
const De =
|
|
3528
|
-
|
|
3529
|
-
const
|
|
3530
|
-
if (
|
|
3531
|
-
|
|
3533
|
+
ut.current = re;
|
|
3534
|
+
const De = x((a) => _e(a + B), [_e, B]), Be = f(I);
|
|
3535
|
+
Be.current = I;
|
|
3536
|
+
const xe = I !== void 0, Ue = ve(() => xe ? (a) => Be.current?.(a + B) : void 0, [B, xe]), we = p, Le = re, [ft, ot] = Ce(B), Fe = f(null), Ge = f(!1);
|
|
3537
|
+
if (ft !== B) {
|
|
3538
|
+
ot(B), Ge.current = !0;
|
|
3532
3539
|
const a = ce.current?.getScrollAnchor() ?? null;
|
|
3533
|
-
Fe.current = a === null ? null : { row: a.index +
|
|
3540
|
+
Fe.current = a === null ? null : { row: a.index + ft, offsetPx: a.offsetPx };
|
|
3534
3541
|
}
|
|
3535
|
-
const
|
|
3542
|
+
const be = f(0), Me = f(0), je = f(!1), [Ee, S] = Ce(ki), T = f(Ee);
|
|
3536
3543
|
T.current = Ee;
|
|
3537
|
-
const Ve = f(0), [Xe,
|
|
3538
|
-
|
|
3539
|
-
const
|
|
3540
|
-
typeof a == "number" && Number.isFinite(a) && (
|
|
3544
|
+
const Ve = f(0), [Xe, We] = Ce(() => fe.getTotal() ?? 0), at = f(Xe);
|
|
3545
|
+
at.current = Xe;
|
|
3546
|
+
const ht = x((a) => {
|
|
3547
|
+
typeof a == "number" && Number.isFinite(a) && (at.current = a, We(a));
|
|
3541
3548
|
}, []);
|
|
3542
|
-
|
|
3549
|
+
Qe(() => {
|
|
3543
3550
|
const a = fe.getTotal();
|
|
3544
|
-
typeof a == "number" && Number.isFinite(a) && a !==
|
|
3551
|
+
typeof a == "number" && Number.isFinite(a) && a !== at.current && ht(a);
|
|
3545
3552
|
});
|
|
3546
|
-
const ye =
|
|
3547
|
-
wt.current =
|
|
3548
|
-
const
|
|
3549
|
-
Pe.current =
|
|
3550
|
-
const
|
|
3551
|
-
|
|
3552
|
-
if (
|
|
3553
|
+
const ye = ee?.width ?? 12, Pt = K === void 0 ? null : { width: Math.max(0, Math.round(K.width) - ye), height: Math.max(0, Math.round(K.height) - ye) }, [Qt, lr] = Ce({ width: 0, height: 0 }), Ie = Pt ?? Qt, wt = f(Ie);
|
|
3554
|
+
wt.current = Ie;
|
|
3555
|
+
const nr = Ie.height > 0 && Ie.height - p - re <= 0;
|
|
3556
|
+
Pe.current = nr;
|
|
3557
|
+
const Jt = Pt !== null;
|
|
3558
|
+
Qe(() => {
|
|
3559
|
+
if (Jt)
|
|
3553
3560
|
return;
|
|
3554
|
-
const a =
|
|
3561
|
+
const a = Se.current;
|
|
3555
3562
|
if (a === null)
|
|
3556
3563
|
return;
|
|
3557
|
-
const
|
|
3558
|
-
const
|
|
3559
|
-
|
|
3564
|
+
const m = () => {
|
|
3565
|
+
const H = Math.max(0, Math.round(a.clientWidth) - ye), de = Math.max(0, Math.round(a.clientHeight) - ye);
|
|
3566
|
+
lr((nt) => nt.width === H && nt.height === de ? nt : { width: H, height: de });
|
|
3560
3567
|
};
|
|
3561
|
-
|
|
3562
|
-
const
|
|
3563
|
-
return
|
|
3564
|
-
}, [ye,
|
|
3565
|
-
const
|
|
3566
|
-
const a =
|
|
3567
|
-
a !== null && a.style.setProperty("--aqvs-grid-hx-residual", `${Ve.current -
|
|
3568
|
-
}, []),
|
|
3569
|
-
const a =
|
|
3570
|
-
if (F > 0 && (
|
|
3571
|
-
const
|
|
3572
|
-
|
|
3568
|
+
m();
|
|
3569
|
+
const y = new ResizeObserver(m);
|
|
3570
|
+
return y.observe(a), () => y.disconnect();
|
|
3571
|
+
}, [ye, Jt]);
|
|
3572
|
+
const Wt = x(() => {
|
|
3573
|
+
const a = Se.current;
|
|
3574
|
+
a !== null && a.style.setProperty("--aqvs-grid-hx-residual", `${Ve.current - be.current}px`);
|
|
3575
|
+
}, []), Te = x(() => Math.max(0, wt.current.width - Ye.current - bt.current), []), Et = x(() => Math.max(0, at.current - Ye.current - bt.current - Te()), [Te]), Ut = x(() => {
|
|
3576
|
+
const a = Te(), m = Li(Ye.current + be.current, a, J, e, st, fe, at.current, T.current.colAnchor);
|
|
3577
|
+
if (F > 0 && (m.renderingColStart = Math.max(m.renderingColStart, F), m.visibleColStart = Math.max(m.visibleColStart, F)), Z > 0) {
|
|
3578
|
+
const H = e - Z - 1;
|
|
3579
|
+
m.renderingColEnd = Math.min(m.renderingColEnd, H), m.visibleColEnd = Math.min(m.visibleColEnd, H);
|
|
3573
3580
|
}
|
|
3574
|
-
(F > 0 || Z > 0) && (a <= 0 ||
|
|
3575
|
-
const
|
|
3576
|
-
|
|
3577
|
-
}, [
|
|
3581
|
+
(F > 0 || Z > 0) && (a <= 0 || m.renderingColStart > m.renderingColEnd) && (m.renderingColStart = e, m.renderingColEnd = e - 1, m.visibleColStart = e, m.visibleColEnd = e - 1);
|
|
3582
|
+
const y = `${m.renderingColStart}:${m.renderingColEnd}:${m.colAnchor}`;
|
|
3583
|
+
y !== T.current.key && S({ ...m, key: y });
|
|
3584
|
+
}, [J, e, st, fe, F, Z, Te]), [ir, St] = Ce(0), u = f(null), V = x(() => {
|
|
3578
3585
|
u.current === null && (u.current = requestAnimationFrame(() => {
|
|
3579
|
-
u.current = null, St(
|
|
3586
|
+
u.current = null, St(be.current);
|
|
3580
3587
|
}));
|
|
3581
3588
|
}, []);
|
|
3582
|
-
|
|
3589
|
+
$(
|
|
3583
3590
|
() => () => {
|
|
3584
3591
|
u.current !== null && cancelAnimationFrame(u.current);
|
|
3585
3592
|
},
|
|
@@ -3587,384 +3594,384 @@ const xi = 1e4, Hi = () => {
|
|
|
3587
3594
|
);
|
|
3588
3595
|
const O = f(D);
|
|
3589
3596
|
O.current = D;
|
|
3590
|
-
const me = f(
|
|
3591
|
-
me.current =
|
|
3597
|
+
const me = f(k);
|
|
3598
|
+
me.current = k;
|
|
3592
3599
|
const ke = f(ae);
|
|
3593
3600
|
ke.current = ae;
|
|
3594
|
-
const He = f(null), [
|
|
3595
|
-
Ft !==
|
|
3596
|
-
const Lt = N === void 0 || t === 0 ? 0 : se(Math.trunc(N.row), 0, t - 1), kt =
|
|
3601
|
+
const He = f(null), [It, Ke] = Ce(null), [Ft, Tt] = Ce(Ie.height);
|
|
3602
|
+
Ft !== Ie.height && (Tt(Ie.height), Ke(null));
|
|
3603
|
+
const Lt = N === void 0 || t === 0 ? 0 : se(Math.trunc(N.row), 0, t - 1), kt = ve(() => {
|
|
3597
3604
|
const a = He.current?.renderingStartIndex ?? Lt;
|
|
3598
|
-
return
|
|
3599
|
-
}, [
|
|
3605
|
+
return Di(Math.max(0, Ie.height - A.current - ut.current), _e, t, a, P);
|
|
3606
|
+
}, [Ie.height, _e, t, Lt, P, we, Le]), Ht = It ?? kt, Mt = x(() => {
|
|
3600
3607
|
const a = He.current;
|
|
3601
3608
|
if (a === null)
|
|
3602
3609
|
return null;
|
|
3603
|
-
const
|
|
3610
|
+
const m = T.current;
|
|
3604
3611
|
return {
|
|
3605
3612
|
renderingRowStart: a.renderingStartIndex,
|
|
3606
3613
|
renderingRowEnd: a.renderingEndIndex,
|
|
3607
3614
|
visibleRowStart: a.visibleStartIndex,
|
|
3608
3615
|
visibleRowEnd: a.visibleEndIndex,
|
|
3609
|
-
renderingColStart:
|
|
3610
|
-
renderingColEnd:
|
|
3611
|
-
visibleColStart:
|
|
3612
|
-
visibleColEnd:
|
|
3613
|
-
scrollX:
|
|
3614
|
-
scrollY:
|
|
3615
|
-
totalWidth:
|
|
3616
|
+
renderingColStart: m.renderingColStart,
|
|
3617
|
+
renderingColEnd: m.renderingColEnd,
|
|
3618
|
+
visibleColStart: m.visibleColStart,
|
|
3619
|
+
visibleColEnd: m.visibleColEnd,
|
|
3620
|
+
scrollX: be.current,
|
|
3621
|
+
scrollY: Me.current,
|
|
3622
|
+
totalWidth: at.current,
|
|
3616
3623
|
// 帯高は鮮度加算 (格納はスクロール木のみ — 帯行リサイズ後も総高が正しい。R1 是正。
|
|
3617
3624
|
// 3.5.0: 末尾帯高 H_T も同じ鮮度規律で加算)
|
|
3618
|
-
totalHeight: a.totalHeight +
|
|
3625
|
+
totalHeight: a.totalHeight + A.current + ut.current
|
|
3619
3626
|
};
|
|
3620
|
-
}, []),
|
|
3627
|
+
}, []), Gt = x(() => {
|
|
3621
3628
|
const a = Mt();
|
|
3622
3629
|
a !== null && me.current?.(a);
|
|
3623
|
-
}, [Mt]),
|
|
3630
|
+
}, [Mt]), pr = x(
|
|
3624
3631
|
(a) => {
|
|
3625
|
-
const
|
|
3626
|
-
return
|
|
3632
|
+
const m = Et(), y = se(a, 0, m);
|
|
3633
|
+
return y !== be.current && (be.current = y, Wt(), Ut(), V(), O.current?.({ x: y, y: Me.current })), y;
|
|
3627
3634
|
},
|
|
3628
|
-
[
|
|
3629
|
-
),
|
|
3630
|
-
|
|
3631
|
-
Ve.current = Ee.colAnchor,
|
|
3632
|
-
}, [Ee,
|
|
3633
|
-
He.current !== null &&
|
|
3634
|
-
}, [p, re,
|
|
3635
|
-
const $t = f(null), Xt =
|
|
3635
|
+
[Wt, Ut, V, Et]
|
|
3636
|
+
), zt = f(pr);
|
|
3637
|
+
zt.current = pr, Qe(() => {
|
|
3638
|
+
Ve.current = Ee.colAnchor, Wt(), Gt();
|
|
3639
|
+
}, [Ee, Wt, Gt]), Qe(() => {
|
|
3640
|
+
He.current !== null && Gt();
|
|
3641
|
+
}, [p, re, Gt]);
|
|
3642
|
+
const $t = f(null), Xt = x(
|
|
3636
3643
|
(a) => {
|
|
3637
|
-
const
|
|
3638
|
-
return (a.alignX === "end" ?
|
|
3644
|
+
const m = se(a.col, 0, Math.max(0, e - 1)), y = fe.prefixSum(m, { materializeOption: { materialize: !1 } }), H = y.cumulative - y.currentValue, de = y.currentValue, nt = Te();
|
|
3645
|
+
return (a.alignX === "end" ? H + de - Ye.current - nt : a.alignX === "center" ? H + de / 2 - Ye.current - nt / 2 : H - Ye.current) + a.offsetX;
|
|
3639
3646
|
},
|
|
3640
|
-
[fe, e,
|
|
3641
|
-
), Ot = f(null), qt =
|
|
3647
|
+
[fe, e, Te]
|
|
3648
|
+
), Ot = f(null), qt = x(() => {
|
|
3642
3649
|
const a = Ot.current;
|
|
3643
|
-
Ot.current = null, !(a === null || a.length === 0) && (
|
|
3644
|
-
}, [fe,
|
|
3650
|
+
Ot.current = null, !(a === null || a.length === 0) && (ht(fe.updates(a)), $e((m) => m + 1));
|
|
3651
|
+
}, [fe, ht]), sr = f({ count: 0, warned: !1 }), { frozenColumns: jt, frozenWidth: Nt } = ve(() => {
|
|
3645
3652
|
if (F === 0)
|
|
3646
|
-
return
|
|
3647
|
-
const { columns: a, widthUpdates:
|
|
3648
|
-
if (
|
|
3649
|
-
const
|
|
3650
|
-
|
|
3653
|
+
return sr.current.count = 0, sr.current.warned = !1, { frozenColumns: Mn, frozenWidth: 0 };
|
|
3654
|
+
const { columns: a, widthUpdates: m, width: y } = _i(F, st, fe);
|
|
3655
|
+
if (m.length > 0) {
|
|
3656
|
+
const H = sr.current;
|
|
3657
|
+
H.count >= Xr ? H.warned || (H.warned = !0, C.warn("[VirtualGrid] getColWidth keeps disagreeing with its own previous values inside the frozen band; width self-heal is suspended until a converged pass re-arms it (unstable accessor).", {
|
|
3651
3658
|
frozenCols: F,
|
|
3652
|
-
pendingUpdates:
|
|
3653
|
-
})) : (
|
|
3659
|
+
pendingUpdates: m.length
|
|
3660
|
+
})) : (H.count += 1, Ot.current = [...Ot.current ?? [], ...m], Promise.resolve().then(qt));
|
|
3654
3661
|
} else
|
|
3655
|
-
|
|
3656
|
-
return { frozenColumns: a, frozenWidth:
|
|
3657
|
-
}, [F, ze,
|
|
3658
|
-
|
|
3659
|
-
F > 0 ?
|
|
3660
|
-
}, [
|
|
3661
|
-
const
|
|
3662
|
+
sr.current.count = 0, sr.current.warned = !1;
|
|
3663
|
+
return { frozenColumns: a, frozenWidth: y };
|
|
3664
|
+
}, [F, ze, st, fe, qt]);
|
|
3665
|
+
Ye.current = Nt, Qe(() => {
|
|
3666
|
+
F > 0 ? Se.current?.style.setProperty("--aqvs-grid-frozen-width", `${Nt}px`) : Se.current?.style.removeProperty("--aqvs-grid-frozen-width");
|
|
3667
|
+
}, [Nt, F]);
|
|
3668
|
+
const er = f({ count: 0, warned: !1 }), { trailingColumns: Kt, trailingWidth: mt } = ve(() => {
|
|
3662
3669
|
if (Z === 0)
|
|
3663
|
-
return
|
|
3664
|
-
const { columns: a, widthUpdates:
|
|
3665
|
-
if (
|
|
3666
|
-
const
|
|
3667
|
-
|
|
3670
|
+
return er.current.count = 0, er.current.warned = !1, { trailingColumns: Mn, trailingWidth: 0 };
|
|
3671
|
+
const { columns: a, widthUpdates: m, width: y } = Fi(e, Z, st, fe);
|
|
3672
|
+
if (m.length > 0) {
|
|
3673
|
+
const H = er.current;
|
|
3674
|
+
H.count >= Xr ? H.warned || (H.warned = !0, C.warn("[VirtualGrid] getColWidth keeps disagreeing with its own previous values inside the trailing band; width self-heal is suspended until a converged pass re-arms it (unstable accessor).", {
|
|
3668
3675
|
trailingCols: Z,
|
|
3669
|
-
pendingUpdates:
|
|
3670
|
-
})) : (
|
|
3676
|
+
pendingUpdates: m.length
|
|
3677
|
+
})) : (H.count += 1, Ot.current = [...Ot.current ?? [], ...m], Promise.resolve().then(qt));
|
|
3671
3678
|
} else
|
|
3672
|
-
|
|
3673
|
-
return { trailingColumns: a, trailingWidth:
|
|
3674
|
-
}, [Z, e, ze,
|
|
3675
|
-
|
|
3676
|
-
Z > 0 ?
|
|
3677
|
-
}, [
|
|
3678
|
-
const
|
|
3679
|
+
er.current.count = 0, er.current.warned = !1;
|
|
3680
|
+
return { trailingColumns: a, trailingWidth: y };
|
|
3681
|
+
}, [Z, e, ze, st, fe, qt]);
|
|
3682
|
+
bt.current = mt, Qe(() => {
|
|
3683
|
+
Z > 0 ? Se.current?.style.setProperty("--aqvs-grid-trailing-width", `${mt}px`) : Se.current?.style.removeProperty("--aqvs-grid-trailing-width");
|
|
3684
|
+
}, [mt, Z]);
|
|
3685
|
+
const ur = ve(() => ({ ...ee, tapScrollCircleOptions: { ...ee?.tapScrollCircleOptions, enabled: !1 } }), [ee]), Vt = ee?.tapScrollCircleOptions, Ir = typeof Vt?.maxSpeedMultiplier == "number", or = ve(
|
|
3679
3686
|
() => ({
|
|
3680
|
-
...
|
|
3681
|
-
offsetX:
|
|
3682
|
-
offsetY:
|
|
3687
|
+
...Vt,
|
|
3688
|
+
offsetX: Vt?.offsetX === void 0 ? hn : Vt.offsetX,
|
|
3689
|
+
offsetY: Vt?.offsetY === void 0 ? hn : Vt.offsetY
|
|
3683
3690
|
}),
|
|
3684
|
-
[
|
|
3685
|
-
),
|
|
3686
|
-
viewportSize: Math.max(0,
|
|
3687
|
-
minSpeedMultiplier:
|
|
3688
|
-
maxSpeedMultiplier:
|
|
3689
|
-
hasCustomMaxSpeedMultiplier:
|
|
3690
|
-
curve:
|
|
3691
|
-
},
|
|
3692
|
-
viewportSize: Math.max(0,
|
|
3693
|
-
minSpeedMultiplier:
|
|
3694
|
-
maxSpeedMultiplier:
|
|
3695
|
-
hasCustomMaxSpeedMultiplier:
|
|
3696
|
-
curve:
|
|
3697
|
-
},
|
|
3691
|
+
[Vt]
|
|
3692
|
+
), c = ve(() => Wr(or, Math.max(0, e - F - Z)), [or, e, F, Z]), g = ve(() => Wr(or, lt), [or, lt]), v = c.enabled, W = Math.max(c.maxVisualDistance, 1), G = {
|
|
3693
|
+
viewportSize: Math.max(0, Ie.width - Nt - mt),
|
|
3694
|
+
minSpeedMultiplier: c.minSpeedMultiplier,
|
|
3695
|
+
maxSpeedMultiplier: c.maxSpeedMultiplier,
|
|
3696
|
+
hasCustomMaxSpeedMultiplier: Ir,
|
|
3697
|
+
curve: c.maxSpeedCurve
|
|
3698
|
+
}, Q = {
|
|
3699
|
+
viewportSize: Math.max(0, Ie.height - p - re),
|
|
3700
|
+
minSpeedMultiplier: g.minSpeedMultiplier,
|
|
3701
|
+
maxSpeedMultiplier: g.maxSpeedMultiplier,
|
|
3702
|
+
hasCustomMaxSpeedMultiplier: Ir,
|
|
3703
|
+
curve: g.maxSpeedCurve
|
|
3704
|
+
}, te = x(() => be.current, []), Re = x(() => {
|
|
3698
3705
|
const a = ce.current;
|
|
3699
3706
|
if (a === null)
|
|
3700
|
-
return
|
|
3701
|
-
const
|
|
3702
|
-
return
|
|
3703
|
-
}, []),
|
|
3707
|
+
return Me.current;
|
|
3708
|
+
const m = a.getScrollPosition();
|
|
3709
|
+
return m < 0 ? Me.current : m;
|
|
3710
|
+
}, []), qe = x(() => {
|
|
3704
3711
|
const a = ce.current;
|
|
3705
3712
|
return a === null ? 0 : Math.max(0, Math.max(0, a.getContentSize()) - Math.max(0, a.getViewportSize()));
|
|
3706
|
-
}, []),
|
|
3707
|
-
const
|
|
3708
|
-
if (
|
|
3709
|
-
return
|
|
3710
|
-
const
|
|
3711
|
-
return
|
|
3712
|
-
}, []),
|
|
3713
|
-
enabled:
|
|
3714
|
-
maxDistance:
|
|
3715
|
-
xSpeedParams:
|
|
3716
|
-
ySpeedParams:
|
|
3717
|
-
applyHxRef:
|
|
3718
|
-
getHx:
|
|
3719
|
-
getMaxHx:
|
|
3720
|
-
applyVy:
|
|
3721
|
-
getVy:
|
|
3722
|
-
getMaxVy:
|
|
3713
|
+
}, []), Oe = x((a) => {
|
|
3714
|
+
const m = ce.current;
|
|
3715
|
+
if (m === null)
|
|
3716
|
+
return Me.current;
|
|
3717
|
+
const y = m.scrollBy(a);
|
|
3718
|
+
return Me.current = y, y;
|
|
3719
|
+
}, []), Ne = Et() > 0 || qe() > 0, xt = `${Xe}:${Nt}:${mt}:${Ie.width}:${Ee.key}`, pt = `${t}:${It ?? -1}:${p}:${re}:${Ie.height}`, { isTapActive: gt, handleTapCircleDragChange: ar, tapCircleHandleRef: gr } = wi({
|
|
3720
|
+
enabled: v && Ne,
|
|
3721
|
+
maxDistance: W,
|
|
3722
|
+
xSpeedParams: G,
|
|
3723
|
+
ySpeedParams: Q,
|
|
3724
|
+
applyHxRef: zt,
|
|
3725
|
+
getHx: te,
|
|
3726
|
+
getMaxHx: Et,
|
|
3727
|
+
applyVy: Oe,
|
|
3728
|
+
getVy: Re,
|
|
3729
|
+
getMaxVy: qe,
|
|
3723
3730
|
pendingColAnchorRef: $t,
|
|
3724
|
-
xExtentFreshness:
|
|
3725
|
-
yExtentFreshness:
|
|
3726
|
-
}),
|
|
3727
|
-
|
|
3731
|
+
xExtentFreshness: xt,
|
|
3732
|
+
yExtentFreshness: pt
|
|
3733
|
+
}), Ln = ve(() => se((gt ? 1 : 0.8) * c.opacity, 0, 1), [gt, c.opacity]);
|
|
3734
|
+
Qe(() => {
|
|
3728
3735
|
const a = $t.current;
|
|
3729
|
-
a === null ?
|
|
3730
|
-
}, [
|
|
3731
|
-
const
|
|
3732
|
-
|
|
3733
|
-
if (
|
|
3736
|
+
a === null ? zt.current(be.current) : zt.current(Xt(a)), Ut();
|
|
3737
|
+
}, [Ie.width, Xe, ze, Nt, mt, Ut, Xt]);
|
|
3738
|
+
const Zr = f(!1);
|
|
3739
|
+
Qe(() => {
|
|
3740
|
+
if (Zr.current || N === void 0 || e === 0)
|
|
3734
3741
|
return;
|
|
3735
|
-
|
|
3742
|
+
Zr.current = !0;
|
|
3736
3743
|
const a = se(Math.trunc(N.col), 0, e - 1);
|
|
3737
3744
|
if (a < F || a >= e - Z)
|
|
3738
3745
|
return;
|
|
3739
|
-
const
|
|
3740
|
-
$t.current =
|
|
3746
|
+
const m = { col: a, alignX: "start", offsetX: Math.max(0, N.offsetX) };
|
|
3747
|
+
$t.current = m, zt.current(Xt(m));
|
|
3741
3748
|
}, [N, e, Xt, F, Z]);
|
|
3742
|
-
const
|
|
3743
|
-
|
|
3744
|
-
}, []),
|
|
3749
|
+
const On = x((a) => {
|
|
3750
|
+
Me.current = a, je.current = !0, O.current?.({ x: be.current, y: a });
|
|
3751
|
+
}, []), Qr = x(
|
|
3745
3752
|
(a) => {
|
|
3746
|
-
if (
|
|
3747
|
-
He.current = { renderingStartIndex: t, renderingEndIndex: t - 1, visibleStartIndex: t, visibleEndIndex: t - 1, scrollPosition: 0, totalHeight:
|
|
3753
|
+
if (lt === 0 || Pe.current)
|
|
3754
|
+
He.current = { renderingStartIndex: t, renderingEndIndex: t - 1, visibleStartIndex: t, visibleEndIndex: t - 1, scrollPosition: 0, totalHeight: lt === 0 ? 0 : a.totalHeight }, Me.current = 0;
|
|
3748
3755
|
else {
|
|
3749
|
-
const
|
|
3756
|
+
const m = B;
|
|
3750
3757
|
He.current = {
|
|
3751
|
-
renderingStartIndex: a.renderingStartIndex +
|
|
3752
|
-
renderingEndIndex: a.renderingEndIndex +
|
|
3753
|
-
visibleStartIndex: a.visibleStartIndex +
|
|
3754
|
-
visibleEndIndex: a.visibleEndIndex +
|
|
3758
|
+
renderingStartIndex: a.renderingStartIndex + m,
|
|
3759
|
+
renderingEndIndex: a.renderingEndIndex + m,
|
|
3760
|
+
visibleStartIndex: a.visibleStartIndex + m,
|
|
3761
|
+
visibleEndIndex: a.visibleEndIndex + m,
|
|
3755
3762
|
scrollPosition: a.scrollPosition,
|
|
3756
3763
|
totalHeight: a.totalHeight
|
|
3757
|
-
},
|
|
3764
|
+
}, Me.current = a.scrollPosition;
|
|
3758
3765
|
}
|
|
3759
|
-
|
|
3760
|
-
const
|
|
3761
|
-
return
|
|
3762
|
-
}),
|
|
3766
|
+
Ke((m) => {
|
|
3767
|
+
const y = Math.max(1, a.renderingEndIndex - a.renderingStartIndex + 1);
|
|
3768
|
+
return y === m ? m : y;
|
|
3769
|
+
}), Gt();
|
|
3763
3770
|
},
|
|
3764
|
-
[
|
|
3765
|
-
),
|
|
3766
|
-
$t.current = null,
|
|
3767
|
-
}, []),
|
|
3768
|
-
const a = Math.max(0,
|
|
3771
|
+
[Gt, B, lt, t]
|
|
3772
|
+
), Jr = x((a) => {
|
|
3773
|
+
$t.current = null, zt.current(be.current + a);
|
|
3774
|
+
}, []), en = Ai(q, Ht + dt.length + U.length), Lr = f({ count: 0, warned: !1 }), { placedColumns: Tr, truncatedCols: Rr } = ve(() => {
|
|
3775
|
+
const a = Math.max(0, Ie.width - Nt - mt);
|
|
3769
3776
|
if (e === 0 || a <= 0)
|
|
3770
3777
|
return { placedColumns: [], truncatedCols: 0 };
|
|
3771
3778
|
if (Ee.renderingColStart > Ee.renderingColEnd)
|
|
3772
3779
|
return { placedColumns: [], truncatedCols: 0 };
|
|
3773
|
-
const
|
|
3774
|
-
if (
|
|
3775
|
-
const
|
|
3776
|
-
|
|
3780
|
+
const m = Math.max(1, en - jt.length - Kt.length), { columns: y, widthUpdates: H, truncated: de } = Oi(se(Ee.renderingColStart, 0, e - 1), se(Ee.renderingColEnd, 0, e - 1), st, fe, m);
|
|
3781
|
+
if (H.length > 0) {
|
|
3782
|
+
const nt = Lr.current;
|
|
3783
|
+
nt.count >= Xr ? nt.warned || (nt.warned = !0, C.warn("[VirtualGrid] getColWidth keeps disagreeing with its own previous values; width self-heal is suspended until a converged (zero-deviation) pass re-arms it (unstable accessor — the accessor must be index-stable while the ordering is unchanged).", {
|
|
3777
3784
|
window: Ee.key,
|
|
3778
|
-
pendingUpdates:
|
|
3779
|
-
})) : (
|
|
3785
|
+
pendingUpdates: H.length
|
|
3786
|
+
})) : (nt.count += 1, Ot.current = [...Ot.current ?? [], ...H], Promise.resolve().then(qt));
|
|
3780
3787
|
} else
|
|
3781
|
-
|
|
3782
|
-
return { placedColumns:
|
|
3783
|
-
}, [Ee, e,
|
|
3784
|
-
|
|
3785
|
-
if (
|
|
3786
|
-
const a = `${Ee.key}:${
|
|
3787
|
-
a !==
|
|
3788
|
+
Lr.current.count = 0, Lr.current.warned = !1;
|
|
3789
|
+
return { placedColumns: y, truncatedCols: de };
|
|
3790
|
+
}, [Ee, e, Ie.width, Nt, mt, jt.length, Kt.length, ze, st, fe, en, qt]), tn = f("");
|
|
3791
|
+
$(() => {
|
|
3792
|
+
if (Rr > 0) {
|
|
3793
|
+
const a = `${Ee.key}:${Rr}`;
|
|
3794
|
+
a !== tn.current && (tn.current = a, ke.current?.({ renderedCells: (Tr.length + jt.length + Kt.length) * (Ht + dt.length + U.length), droppedCols: Rr }));
|
|
3788
3795
|
}
|
|
3789
|
-
}, [
|
|
3790
|
-
const
|
|
3796
|
+
}, [Rr, Ee.key, Tr.length, jt.length, Kt.length, Ht, dt.length, U.length]);
|
|
3797
|
+
const rn = Ee.colAnchor, Or = x(
|
|
3791
3798
|
(a) => {
|
|
3792
|
-
const
|
|
3793
|
-
const _t = l?.(a, de),
|
|
3794
|
-
return /* @__PURE__ */
|
|
3799
|
+
const m = d?.(a), y = _e(a) === 0, H = y ? null : Tr.map(({ col: de, left: nt, width: fr }) => {
|
|
3800
|
+
const _t = l?.(a, de), br = { ..._t?.style, left: nt - rn, width: fr };
|
|
3801
|
+
return /* @__PURE__ */ _r("div", { ..._t, key: s ? s(a, de) : de, className: Ct("aqvs-grid-cell", _t?.className), style: br }, o(i(a, de), a, de));
|
|
3795
3802
|
});
|
|
3796
|
-
return F === 0 && Z === 0 ? /* @__PURE__ */
|
|
3797
|
-
|
|
3798
|
-
const _t = l?.(a, de),
|
|
3799
|
-
return /* @__PURE__ */
|
|
3803
|
+
return F === 0 && Z === 0 ? /* @__PURE__ */ j("div", { ...m, className: Ct("aqvs-grid-row", m?.className), style: m?.style, children: H }) : /* @__PURE__ */ Bt("div", { ...m, "data-aqvs-frozen-row": F > 0 ? "" : void 0, className: Ct("aqvs-grid-row aqvs-grid-row-frozen-host", m?.className), style: m?.style, children: [
|
|
3804
|
+
y ? null : jt.map(({ col: de, left: nt, width: fr }) => {
|
|
3805
|
+
const _t = l?.(a, de), br = { ..._t?.style, left: nt, width: fr };
|
|
3806
|
+
return /* @__PURE__ */ _r("div", { ..._t, "data-aqvs-frozen-cell": "", key: s ? s(a, de) : de, className: Ct("aqvs-grid-cell", _t?.className), style: br }, o(i(a, de), a, de));
|
|
3800
3807
|
}),
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
const _t = l?.(a, de),
|
|
3804
|
-
return /* @__PURE__ */
|
|
3808
|
+
y ? null : /* @__PURE__ */ j("div", { className: "aqvs-grid-row-scroll", children: /* @__PURE__ */ j("div", { className: "aqvs-grid-row-scroll-inner", children: H }) }),
|
|
3809
|
+
y || Z === 0 ? null : /* @__PURE__ */ j("div", { className: "aqvs-grid-row-trailing", children: /* @__PURE__ */ j("div", { className: "aqvs-grid-row-trailing-inner", children: Kt.map(({ col: de, left: nt, width: fr }) => {
|
|
3810
|
+
const _t = l?.(a, de), br = { ..._t?.style, left: nt, width: fr };
|
|
3811
|
+
return /* @__PURE__ */ _r("div", { ..._t, "data-aqvs-trailing-cell": "", key: s ? s(a, de) : de, className: Ct("aqvs-grid-cell", _t?.className), style: br }, o(i(a, de), a, de));
|
|
3805
3812
|
}) }) })
|
|
3806
3813
|
] });
|
|
3807
3814
|
},
|
|
3808
|
-
[
|
|
3809
|
-
), [
|
|
3810
|
-
|
|
3811
|
-
const
|
|
3812
|
-
const a =
|
|
3815
|
+
[Tr, jt, Kt, F, Z, rn, d, l, s, i, o, _e]
|
|
3816
|
+
), [_n, Fn] = Ce(""), dr = f(null), nn = f(ge);
|
|
3817
|
+
nn.current = ge;
|
|
3818
|
+
const Pr = x(() => {
|
|
3819
|
+
const a = nn.current;
|
|
3813
3820
|
if (a === void 0)
|
|
3814
3821
|
return;
|
|
3815
|
-
const
|
|
3816
|
-
Number.isFinite(
|
|
3817
|
-
|
|
3818
|
-
const
|
|
3819
|
-
|
|
3820
|
-
const de = a.buildMessage(
|
|
3821
|
-
return de ===
|
|
3822
|
+
const m = a.debounceMs ?? 400;
|
|
3823
|
+
Number.isFinite(m) && m >= 0 && (dr.current !== null && window.clearTimeout(dr.current), dr.current = window.setTimeout(() => {
|
|
3824
|
+
dr.current = null;
|
|
3825
|
+
const y = Mt();
|
|
3826
|
+
y !== null && Fn((H) => {
|
|
3827
|
+
const de = a.buildMessage(y);
|
|
3828
|
+
return de === H ? H : de;
|
|
3822
3829
|
});
|
|
3823
|
-
},
|
|
3824
|
-
}, [Mt]),
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
}, [
|
|
3830
|
+
}, m));
|
|
3831
|
+
}, [Mt]), Er = ge?.debounceMs ?? 400, sn = Number.isFinite(Er) && Er >= 0, on = ge !== void 0;
|
|
3832
|
+
$(() => {
|
|
3833
|
+
on && !sn && C.warn(`[VirtualGrid] liveRegion.debounceMs must be a finite number >= 0, received ${Er}. Announcements are disabled.`);
|
|
3834
|
+
}, [on, sn, Er]), $(
|
|
3828
3835
|
() => () => {
|
|
3829
|
-
|
|
3836
|
+
dr.current !== null && window.clearTimeout(dr.current);
|
|
3830
3837
|
},
|
|
3831
3838
|
[]
|
|
3832
|
-
),
|
|
3833
|
-
|
|
3834
|
-
}, [Ee,
|
|
3835
|
-
const
|
|
3839
|
+
), $(() => {
|
|
3840
|
+
Pr();
|
|
3841
|
+
}, [Ee, Pr]);
|
|
3842
|
+
const kn = x(
|
|
3836
3843
|
(a) => {
|
|
3837
|
-
|
|
3844
|
+
Qr(a), Pr();
|
|
3838
3845
|
},
|
|
3839
|
-
[
|
|
3846
|
+
[Qr, Pr]
|
|
3840
3847
|
);
|
|
3841
|
-
return
|
|
3842
|
-
|
|
3848
|
+
return Dr(
|
|
3849
|
+
et,
|
|
3843
3850
|
() => ({
|
|
3844
3851
|
scrollTo: (a) => {
|
|
3845
|
-
const
|
|
3846
|
-
let
|
|
3847
|
-
a.y !== void 0 &&
|
|
3848
|
-
let
|
|
3849
|
-
return a.x !== void 0 && ($t.current = null,
|
|
3852
|
+
const m = ce.current;
|
|
3853
|
+
let y = Me.current;
|
|
3854
|
+
a.y !== void 0 && m !== null && (m.scrollTo(a.y), y = m.getScrollPosition(), Me.current = y);
|
|
3855
|
+
let H = be.current;
|
|
3856
|
+
return a.x !== void 0 && ($t.current = null, H = zt.current(a.x)), { x: H, y };
|
|
3850
3857
|
},
|
|
3851
3858
|
scrollBy: (a) => {
|
|
3852
|
-
const
|
|
3853
|
-
let
|
|
3854
|
-
a.y !== void 0 && a.y !== 0 &&
|
|
3855
|
-
let
|
|
3856
|
-
return a.x !== void 0 && a.x !== 0 && ($t.current = null,
|
|
3859
|
+
const m = ce.current;
|
|
3860
|
+
let y = Me.current;
|
|
3861
|
+
a.y !== void 0 && a.y !== 0 && m !== null && (y = m.scrollBy(a.y), Me.current = y);
|
|
3862
|
+
let H = be.current;
|
|
3863
|
+
return a.x !== void 0 && a.x !== 0 && ($t.current = null, H = zt.current(be.current + a.x)), { x: H, y };
|
|
3857
3864
|
},
|
|
3858
|
-
scrollToCell: (a,
|
|
3859
|
-
const
|
|
3860
|
-
if (
|
|
3865
|
+
scrollToCell: (a, m, y) => {
|
|
3866
|
+
const H = ce.current;
|
|
3867
|
+
if (H !== null && t > 0) {
|
|
3861
3868
|
const de = se(Math.trunc(a), 0, t - 1);
|
|
3862
|
-
de >=
|
|
3869
|
+
de >= B && de < t - E && H.scrollToIndex(de - B, { align: y?.alignY ?? "top", offset: y?.offsetY });
|
|
3863
3870
|
}
|
|
3864
3871
|
if (e > 0) {
|
|
3865
|
-
const de = se(Math.trunc(
|
|
3872
|
+
const de = se(Math.trunc(m), 0, e - 1);
|
|
3866
3873
|
if (de >= F && de < e - Z) {
|
|
3867
|
-
const
|
|
3868
|
-
$t.current =
|
|
3874
|
+
const nt = { col: de, alignX: y?.alignX ?? "start", offsetX: y?.offsetX ?? 0 };
|
|
3875
|
+
$t.current = nt, zt.current(Xt(nt));
|
|
3869
3876
|
}
|
|
3870
3877
|
}
|
|
3871
3878
|
},
|
|
3872
|
-
getScrollPosition: () =>
|
|
3879
|
+
getScrollPosition: () => je.current || ce.current !== null ? { x: be.current, y: ce.current?.getScrollPosition() ?? Me.current } : { x: -1, y: -1 },
|
|
3873
3880
|
getScrollAnchor: () => {
|
|
3874
3881
|
if (t === 0 || e === 0)
|
|
3875
3882
|
return null;
|
|
3876
3883
|
const a = ce.current?.getScrollAnchor() ?? null;
|
|
3877
3884
|
if (a === null)
|
|
3878
3885
|
return null;
|
|
3879
|
-
const
|
|
3880
|
-
if (
|
|
3881
|
-
return { row: a.index +
|
|
3882
|
-
if (
|
|
3883
|
-
return { row: a.index +
|
|
3884
|
-
const
|
|
3885
|
-
return { row: a.index +
|
|
3886
|
+
const m = Ye.current + be.current, y = fe.findIndexAtOrAfter(m, { materializeOption: { materialize: !1 } });
|
|
3887
|
+
if (y.index === -1)
|
|
3888
|
+
return { row: a.index + B, col: e - 1, offsetX: 0, offsetY: a.offsetPx };
|
|
3889
|
+
if (y.cumulative === m)
|
|
3890
|
+
return { row: a.index + B, col: se(y.index + 1, 0, e - 1), offsetX: 0, offsetY: a.offsetPx };
|
|
3891
|
+
const H = (y.cumulative ?? 0) - (y.currentValue ?? 0);
|
|
3892
|
+
return { row: a.index + B, col: y.index, offsetX: Math.max(0, m - H), offsetY: a.offsetPx };
|
|
3886
3893
|
},
|
|
3887
3894
|
getViewportSize: () => ({ width: wt.current.width, height: wt.current.height }),
|
|
3888
3895
|
// 縦はインセット込みの行側 getContentSize を単一情報源にする (range.totalHeight は木総高のみ)。
|
|
3889
3896
|
// 3.5.0: height = H_F + 埋め込み + H_T
|
|
3890
|
-
getContentSize: () => ({ width:
|
|
3897
|
+
getContentSize: () => ({ width: at.current, height: ce.current === null ? 0 : A.current + ut.current + Math.max(0, ce.current.getContentSize()) }),
|
|
3891
3898
|
getRange: Mt,
|
|
3892
|
-
updateRowSize: (a,
|
|
3893
|
-
|
|
3899
|
+
updateRowSize: (a, m) => {
|
|
3900
|
+
Vr(m, "row", a), Math.trunc(a) < B ? Dt((y) => y + 1) : E > 0 && Math.trunc(a) >= t - E ? he((y) => y + 1) : ce.current?.updateItemSize(Math.trunc(a) - B, m);
|
|
3894
3901
|
},
|
|
3895
|
-
updateColSize: (a,
|
|
3896
|
-
|
|
3902
|
+
updateColSize: (a, m) => {
|
|
3903
|
+
Vr(m, "col", a), ht(fe.update(se(Math.trunc(a), 0, Math.max(0, e - 1)), m)), $e((y) => y + 1);
|
|
3897
3904
|
},
|
|
3898
3905
|
getFrozenSize: () => ({
|
|
3899
3906
|
cols: F,
|
|
3900
|
-
width:
|
|
3901
|
-
rows:
|
|
3902
|
-
height:
|
|
3907
|
+
width: Ye.current,
|
|
3908
|
+
rows: B,
|
|
3909
|
+
height: A.current,
|
|
3903
3910
|
trailingCols: Z,
|
|
3904
3911
|
trailingRows: E,
|
|
3905
|
-
trailingWidth:
|
|
3906
|
-
trailingHeight:
|
|
3912
|
+
trailingWidth: bt.current,
|
|
3913
|
+
trailingHeight: ut.current,
|
|
3907
3914
|
// vis は単一 JS 源ヘルパーの呼び出しのみ (式の再導出禁止 — 3.5.0 プラン §2.1-4)
|
|
3908
|
-
trailingVisibleWidth:
|
|
3909
|
-
trailingVisibleHeight:
|
|
3915
|
+
trailingVisibleWidth: Cr(bt.current, Ye.current, wt.current.width),
|
|
3916
|
+
trailingVisibleHeight: Cr(ut.current, A.current, wt.current.height)
|
|
3910
3917
|
}),
|
|
3911
3918
|
applyWheel: (a) => ce.current?.applyWheel(a) ?? !1,
|
|
3912
|
-
focusRowAtIndex: (a,
|
|
3913
|
-
const
|
|
3914
|
-
|
|
3919
|
+
focusRowAtIndex: (a, m) => {
|
|
3920
|
+
const y = Math.trunc(a);
|
|
3921
|
+
y < B ? Se.current?.querySelector(`[data-aqvs-frozen-band-row="${y}"]`)?.focus() : E > 0 && y >= t - E ? Se.current?.querySelector(`[data-aqvs-trailing-band-row="${y}"]`)?.focus() : ce.current?.focusItemAtIndex(y - B, m);
|
|
3915
3922
|
}
|
|
3916
3923
|
}),
|
|
3917
|
-
[t, e, fe, Mt,
|
|
3918
|
-
), /* @__PURE__ */
|
|
3919
|
-
|
|
3924
|
+
[t, e, fe, Mt, ht, Xt, F, B, Z, E]
|
|
3925
|
+
), /* @__PURE__ */ Bt("div", { ref: Se, className: Ct("aqvs-grid", B > 0 ? "aqvs-grid-has-frozen-rows" : "", E > 0 ? "aqvs-grid-has-trailing-rows" : "", Y), "data-testid": ie, children: [
|
|
3926
|
+
B > 0 ? (
|
|
3920
3927
|
// 凍結行帯 (行凍結設計 §4-2): グリッド所有の帯外バンド — 行本体は renderRow を
|
|
3921
3928
|
// そのまま再利用する (F > 0 の凍結セル / クリップ / hx 残差 var は継承で無償追随
|
|
3922
3929
|
// = 4 象限コーナーの成立点)。top は木絶対プレフィックス、高さ 0 行は DOM 非生成
|
|
3923
|
-
/* @__PURE__ */
|
|
3930
|
+
/* @__PURE__ */ j("div", { className: "aqvs-grid-frozen-rows", style: { height: p }, "data-testid": ie ? `${ie}-frozen-rows` : void 0, children: dt.map(({ row: a, top: m, height: y }) => (
|
|
3924
3931
|
// 行ラッパーの role は消費側の複合ウィジェット契約 (listbox / tree / grid — README
|
|
3925
3932
|
// 「Composite widget roles」) の所有物で、パッケージが既定 role を課すと衝突する。
|
|
3926
3933
|
// フォーカス結線は focusRowAtIndex ↔ onRowFocus 往復のバンド版そのもの。右インセット
|
|
3927
3934
|
// (right: scrollBarWidth + overflow クリップ) は縦バーコーナーの予約 — ペインの
|
|
3928
3935
|
// クリップ箱 (root − バー幅) と帯のクリップ箱を一致させる (R1 是正)。
|
|
3929
3936
|
// biome-ignore lint/a11y/noStaticElementInteractions: role は消費側の複合ウィジェット契約の所有物 (上記)
|
|
3930
|
-
/* @__PURE__ */
|
|
3937
|
+
/* @__PURE__ */ j("div", { "data-aqvs-frozen-band-row": a, className: "aqvs-grid-frozen-band-row", style: { top: m, height: y, right: ye }, tabIndex: -1, onFocus: () => I?.(a), children: Or(a) }, a)
|
|
3931
3938
|
)) })
|
|
3932
3939
|
) : null,
|
|
3933
|
-
/* @__PURE__ */
|
|
3934
|
-
|
|
3940
|
+
/* @__PURE__ */ j("div", { className: "aqvs-grid-main", "data-testid": ie ? `${ie}-main` : void 0, children: /* @__PURE__ */ j(
|
|
3941
|
+
Vi,
|
|
3935
3942
|
{
|
|
3936
3943
|
ref: ce,
|
|
3937
|
-
itemCount:
|
|
3938
|
-
getItem: (a) => a +
|
|
3939
|
-
getItemKey: (a) => a +
|
|
3944
|
+
itemCount: nr ? 0 : lt,
|
|
3945
|
+
getItem: (a) => a + B,
|
|
3946
|
+
getItemKey: (a) => a + B,
|
|
3940
3947
|
getItemHeight: De,
|
|
3941
3948
|
overscanCount: P,
|
|
3942
|
-
viewportSize:
|
|
3949
|
+
viewportSize: Ie.height > 0 ? Math.max(0, Ie.height - p - re) : void 0,
|
|
3943
3950
|
callbackThrottleMs: L,
|
|
3944
3951
|
behaviorOptions: oe,
|
|
3945
|
-
scrollBarOptions:
|
|
3946
|
-
contentProps:
|
|
3947
|
-
background:
|
|
3952
|
+
scrollBarOptions: ur,
|
|
3953
|
+
contentProps: h,
|
|
3954
|
+
background: b,
|
|
3948
3955
|
contentInsets: M,
|
|
3949
|
-
onItemFocus:
|
|
3956
|
+
onItemFocus: Ue,
|
|
3950
3957
|
horizontalKeyInputs: pe,
|
|
3951
|
-
horizontalKeyStep:
|
|
3958
|
+
horizontalKeyStep: Ae,
|
|
3952
3959
|
initialScrollAnchor: (
|
|
3953
3960
|
// トグル済みなら視点保存 (捕捉アンカー) のみ — 捕捉 null は undefined (先頭)
|
|
3954
3961
|
// へ落とし、消費済みマウント props の蘇りを断つ (R2 是正)。未トグルのみ
|
|
3955
3962
|
// マウント props の凍結行 no-op 付き −R 変換 (列の §8 no-op と同文)
|
|
3956
|
-
|
|
3963
|
+
Ge.current ? Fe.current !== null && Fe.current.row >= B && lt > 0 ? { index: Fe.current.row - B, offsetPx: Fe.current.offsetPx } : void 0 : N !== void 0 && lt > 0 && Math.trunc(N.row) >= B && Math.trunc(N.row) < t - E ? { index: Math.trunc(N.row) - B, offsetPx: N.offsetY } : void 0
|
|
3957
3964
|
),
|
|
3958
|
-
onScroll:
|
|
3959
|
-
onRangeChange:
|
|
3960
|
-
onWheelHorizontal:
|
|
3961
|
-
onPanHorizontal:
|
|
3962
|
-
locale:
|
|
3965
|
+
onScroll: On,
|
|
3966
|
+
onRangeChange: kn,
|
|
3967
|
+
onWheelHorizontal: Jr,
|
|
3968
|
+
onPanHorizontal: Jr,
|
|
3969
|
+
locale: Je,
|
|
3963
3970
|
labels: z,
|
|
3964
3971
|
testId: ie ? `${ie}-rows` : void 0,
|
|
3965
|
-
children:
|
|
3972
|
+
children: Or
|
|
3966
3973
|
},
|
|
3967
|
-
|
|
3974
|
+
B
|
|
3968
3975
|
) }),
|
|
3969
3976
|
E > 0 ? (
|
|
3970
3977
|
// 末尾行帯 (3.5.0 プラン §6.1-17): .aqvs-grid-main の**後**・hbar の**前**の兄弟
|
|
@@ -3973,91 +3980,91 @@ const xi = 1e4, Hi = () => {
|
|
|
3973
3980
|
// inner はインライン木高 H_T の bottom 定着 — 帯上端 = extent − H_T_vis が全構成で
|
|
3974
3981
|
// 成立し、重複縮退では帯の**末尾**行が可視に残る。行本体は renderRow 逐語再利用
|
|
3975
3982
|
// (先頭列 / 末尾列の帯構造を継承し 4 象限コーナー全種が無償で成立)
|
|
3976
|
-
/* @__PURE__ */
|
|
3983
|
+
/* @__PURE__ */ j("div", { className: "aqvs-grid-trailing-rows", style: { height: Cr(re, p, Ie.height) }, "data-testid": ie ? `${ie}-trailing-rows` : void 0, children: /* @__PURE__ */ j("div", { className: "aqvs-grid-trailing-rows-inner", style: { height: re }, children: U.map(({ row: a, top: m, height: y }) => (
|
|
3977
3984
|
// 帯行は帯ローカル top + right: scrollBarWidth (縦バーコーナーの予約 — 先頭帯行と
|
|
3978
3985
|
// 同文) + tabIndex −1 + onFocus フル行 index (focusRowAtIndex ↔ onRowFocus 往復)。
|
|
3979
3986
|
// biome-ignore lint/a11y/noStaticElementInteractions: role は消費側の複合ウィジェット契約の所有物 (先頭帯行と同文)
|
|
3980
|
-
/* @__PURE__ */
|
|
3987
|
+
/* @__PURE__ */ j("div", { "data-aqvs-trailing-band-row": a, className: "aqvs-grid-trailing-band-row", style: { top: m, height: y, right: ye }, tabIndex: -1, onFocus: () => I?.(a), children: Or(a) }, a)
|
|
3981
3988
|
)) }) })
|
|
3982
3989
|
) : null,
|
|
3983
|
-
/* @__PURE__ */
|
|
3984
|
-
|
|
3990
|
+
/* @__PURE__ */ j("div", { className: "aqvs-grid-hbar-strip", style: { height: ye, paddingRight: Z > 0 ? ye + Cr(mt, Nt, Ie.width) : ye }, "data-testid": ie ? `${ie}-hbar` : void 0, children: /* @__PURE__ */ j(
|
|
3991
|
+
zn,
|
|
3985
3992
|
{
|
|
3986
3993
|
horizontal: !0,
|
|
3987
|
-
contentSize: Math.max(0, Xe -
|
|
3988
|
-
viewportSize: Math.max(0,
|
|
3989
|
-
scrollPosition:
|
|
3994
|
+
contentSize: Math.max(0, Xe - Nt - mt),
|
|
3995
|
+
viewportSize: Math.max(0, Ie.width - Nt - mt),
|
|
3996
|
+
scrollPosition: ir,
|
|
3990
3997
|
itemCount: Math.max(0, e - F - Z),
|
|
3991
|
-
tapScrollCircleOptions:
|
|
3992
|
-
onScroll: (a,
|
|
3993
|
-
enableThumbDrag:
|
|
3994
|
-
enableTrackClick:
|
|
3995
|
-
enableArrowButtons:
|
|
3996
|
-
enableArrowButtonTabStops:
|
|
3998
|
+
tapScrollCircleOptions: ee?.tapScrollCircleOptions,
|
|
3999
|
+
onScroll: (a, m) => ($t.current = null, zt.current(typeof a == "function" ? a(m ?? be.current) : a)),
|
|
4000
|
+
enableThumbDrag: ee?.enableThumbDrag,
|
|
4001
|
+
enableTrackClick: ee?.enableTrackClick,
|
|
4002
|
+
enableArrowButtons: ee?.enableArrowButtons,
|
|
4003
|
+
enableArrowButtonTabStops: ee?.enableArrowButtonTabStops,
|
|
3997
4004
|
scrollBarWidth: ye,
|
|
3998
|
-
locale:
|
|
4005
|
+
locale: Je,
|
|
3999
4006
|
labels: z
|
|
4000
4007
|
}
|
|
4001
4008
|
) }),
|
|
4002
|
-
|
|
4009
|
+
v && Ne && // 統合 2 軸タップサークルの 3 アーム配置則: (C) 可視上限
|
|
4003
4010
|
// `100% − (sbw + size)` / (R) 到達性 `100% − sbw + off` / (Q) 遠象限床
|
|
4004
4011
|
// `75% − size/2`。全アームが root 寸・sbw・size・オフセットのみに依存 —
|
|
4005
4012
|
// 帯幅非依存 (凍結トグル不変)。wrapper は純配置で transition を持たない
|
|
4006
4013
|
// (フェードはサークルルートのインライン opacity — §8.7)。hbar strip の後・
|
|
4007
4014
|
// live region の前 = 共有 z-50 層の DOM 後勝ちで最前
|
|
4008
|
-
/* @__PURE__ */
|
|
4015
|
+
/* @__PURE__ */ j(
|
|
4009
4016
|
"div",
|
|
4010
4017
|
{
|
|
4011
4018
|
className: "aqvs-grid-tap-circle-wrapper",
|
|
4012
4019
|
"data-aqvs-grid-tap-circle": "",
|
|
4013
4020
|
style: {
|
|
4014
|
-
left: `min(calc(100% - ${ye +
|
|
4015
|
-
top: `min(calc(100% - ${ye +
|
|
4021
|
+
left: `min(calc(100% - ${ye + c.size}px), max(calc(100% - ${ye}px + ${c.offsetX}px), calc(75% - ${c.size / 2}px)))`,
|
|
4022
|
+
top: `min(calc(100% - ${ye + c.size}px), max(calc(100% - ${ye}px + ${c.offsetY}px), calc(75% - ${c.size / 2}px)))`
|
|
4016
4023
|
},
|
|
4017
|
-
children: /* @__PURE__ */
|
|
4018
|
-
|
|
4024
|
+
children: /* @__PURE__ */ j(
|
|
4025
|
+
Kr,
|
|
4019
4026
|
{
|
|
4020
4027
|
axis: "xy",
|
|
4021
|
-
ref:
|
|
4022
|
-
className:
|
|
4023
|
-
size:
|
|
4024
|
-
maxVisualDistance:
|
|
4025
|
-
opacity:
|
|
4026
|
-
renderVisual:
|
|
4027
|
-
onDragChange:
|
|
4028
|
+
ref: gr,
|
|
4029
|
+
className: Ct("aqvs-grid-tap-circle", c.className),
|
|
4030
|
+
size: c.size,
|
|
4031
|
+
maxVisualDistance: W,
|
|
4032
|
+
opacity: Ln,
|
|
4033
|
+
renderVisual: c.renderVisual,
|
|
4034
|
+
onDragChange: ar
|
|
4028
4035
|
}
|
|
4029
4036
|
)
|
|
4030
4037
|
}
|
|
4031
4038
|
),
|
|
4032
|
-
ge !== void 0 ? /* @__PURE__ */
|
|
4039
|
+
ge !== void 0 ? /* @__PURE__ */ j("div", { className: "aqvs-grid-live-region", "aria-live": "polite", "data-testid": ie ? `${ie}-live` : void 0, children: _n }) : null
|
|
4033
4040
|
] });
|
|
4034
|
-
},
|
|
4041
|
+
}, Gi = Ar(Hi);
|
|
4035
4042
|
export {
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4043
|
+
Zt as FenwickMapTree,
|
|
4044
|
+
xn as MAX_FROZEN_LEADING_COLS,
|
|
4045
|
+
vn as MAX_FROZEN_LEADING_ROWS,
|
|
4046
|
+
wn as MAX_FROZEN_TRAILING_COLS,
|
|
4047
|
+
Sn as MAX_FROZEN_TRAILING_ROWS,
|
|
4048
|
+
Ci as MAX_RENDERED_CELLS,
|
|
4049
|
+
wr as MAX_TRACK_SIZE,
|
|
4050
|
+
zn as ScrollBar,
|
|
4051
|
+
mi as ScrollPane,
|
|
4052
|
+
Pn as TAP_SCROLL_SPEED_DEFAULTS,
|
|
4053
|
+
Yn as VIRTUAL_SCROLL_LABEL_CATALOGS,
|
|
4054
|
+
qr as VIRTUAL_SCROLL_LABEL_KEYS,
|
|
4055
|
+
yn as VIRTUAL_SCROLL_LOCALES,
|
|
4056
|
+
Gi as VirtualGrid,
|
|
4057
|
+
Vi as VirtualScroll,
|
|
4058
|
+
ai as computeAutoTapScrollMaxSpeedMultiplier,
|
|
4059
|
+
Ur as computeTapScrollSpeed,
|
|
4060
|
+
ci as computeTapScrollVelocity,
|
|
4061
|
+
Yi as createResidualQuantizer,
|
|
4055
4062
|
se as minmax,
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
+
In as resolveVirtualScrollLabels,
|
|
4064
|
+
Wn as resolveVirtualScrollLocale,
|
|
4065
|
+
Bi as tapScrollCircleSampleVisual,
|
|
4066
|
+
Vn as useFenwickMapTree,
|
|
4067
|
+
Wi as useHeightCache,
|
|
4068
|
+
xi as useLruCache,
|
|
4069
|
+
Ui as useWheelBridge
|
|
4063
4070
|
};
|