@aiquants/virtualscroll 3.11.1 → 3.11.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 +44 -0
- package/README.md +6 -4
- package/dist/ScrollBar.d.ts.map +1 -1
- package/dist/ScrollPane.d.ts.map +1 -1
- package/dist/TapScrollCircle.d.ts.map +1 -1
- package/dist/VirtualGrid.d.ts.map +1 -1
- package/dist/VirtualScroll.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1619 -1465
- package/dist/residualQuantizer.d.ts.map +1 -1
- package/dist/useGridTapScroll.d.ts.map +1 -1
- package/dist/useWheelBridge.d.ts.map +1 -1
- package/package.json +4 -1
- package/src/ScrollBar.tsx +61 -34
- package/src/ScrollPane.tsx +16 -0
- package/src/TapScrollCircle.tsx +8 -0
- package/src/VirtualGrid.tsx +70 -0
- package/src/VirtualScroll.tsx +47 -17
- package/src/residualQuantizer.ts +14 -0
- package/src/useGridTapScroll.ts +35 -9
- package/src/useWheelBridge.ts +14 -0
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import Jn, { useState as
|
|
1
|
+
import { jsx as Z, jsxs as Zt, Fragment as pn } from "react/jsx-runtime";
|
|
2
|
+
import Jn, { useState as Ce, useCallback as p, useSyncExternalStore as ei, memo as ti, forwardRef as Qr, useRef as u, useImperativeHandle as Jr, useMemo as ge, useLayoutEffect as We, useEffect as W, useId as ri, useReducer as ni, createElement as rn } from "react";
|
|
3
3
|
import { twMerge as Ot } from "tailwind-merge";
|
|
4
4
|
const ii = 1e-6, _n = (t, e, r) => {
|
|
5
5
|
if (!(Number.isFinite(e) && e > 0))
|
|
@@ -30,7 +30,7 @@ const ii = 1e-6, _n = (t, e, r) => {
|
|
|
30
30
|
n.subscribers.delete(e), n.subscribers.size === 0 && n.disarm !== null && (n.disarm(), n.disarm = null);
|
|
31
31
|
};
|
|
32
32
|
}, Fn = (t) => {
|
|
33
|
-
const [e, r] =
|
|
33
|
+
const [e, r] = Ce(ai), n = p((l) => e === null ? On : li(e, l), [e]), i = p(() => e === null ? null : e.devicePixelRatio, [e]), s = ei(n, i, oi), a = p(
|
|
34
34
|
(l) => {
|
|
35
35
|
if (l === null)
|
|
36
36
|
return;
|
|
@@ -110,7 +110,7 @@ const ii = 1e-6, _n = (t, e, r) => {
|
|
|
110
110
|
}
|
|
111
111
|
return Object.freeze(s);
|
|
112
112
|
};
|
|
113
|
-
class
|
|
113
|
+
class L {
|
|
114
114
|
level;
|
|
115
115
|
prefix;
|
|
116
116
|
impl;
|
|
@@ -123,7 +123,7 @@ class F {
|
|
|
123
123
|
constructor(e = 2, r = "[virtualscroll]", n = console) {
|
|
124
124
|
this.level = e, this.prefix = r, this.impl = n;
|
|
125
125
|
}
|
|
126
|
-
static instance = new
|
|
126
|
+
static instance = new L(2, "[virtualscroll]");
|
|
127
127
|
/**
|
|
128
128
|
* @method setLevel
|
|
129
129
|
* @description Updates the current log level for the static instance.
|
|
@@ -131,7 +131,7 @@ class F {
|
|
|
131
131
|
* @param {LogLevel} level - The new log level.
|
|
132
132
|
*/
|
|
133
133
|
static setLevel(e) {
|
|
134
|
-
|
|
134
|
+
L.instance.setLevel(e);
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
137
|
* @method setLevel
|
|
@@ -149,7 +149,7 @@ class F {
|
|
|
149
149
|
* @param {ILogger} impl - The new logger implementation.
|
|
150
150
|
*/
|
|
151
151
|
static setImplementation(e) {
|
|
152
|
-
|
|
152
|
+
L.instance.setImplementation(e);
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
155
|
* @method setImplementation
|
|
@@ -168,7 +168,7 @@ class F {
|
|
|
168
168
|
* @returns {boolean} True if a message at `level` would be emitted. / `level` のメッセージが出力されるなら true。
|
|
169
169
|
*/
|
|
170
170
|
static isEnabled(e) {
|
|
171
|
-
return
|
|
171
|
+
return L.instance.isEnabled(e);
|
|
172
172
|
}
|
|
173
173
|
/**
|
|
174
174
|
* @method isEnabled
|
|
@@ -213,25 +213,25 @@ class F {
|
|
|
213
213
|
return typeof e == "string" ? [`${this.prefix} ${e}`] : [this.prefix, e];
|
|
214
214
|
}
|
|
215
215
|
static debug(e, ...r) {
|
|
216
|
-
|
|
216
|
+
L.instance.debug(e, ...r);
|
|
217
217
|
}
|
|
218
218
|
debug(e, ...r) {
|
|
219
|
-
this.level <= 0 && this.impl.debug(...this.formatMessage(
|
|
219
|
+
this.level <= 0 && this.impl.debug(...this.formatMessage(L.resolveLazy(e)), ...r.map(L.resolveLazy));
|
|
220
220
|
}
|
|
221
221
|
info(e, ...r) {
|
|
222
|
-
this.level <= 1 && this.impl.info(...this.formatMessage(
|
|
222
|
+
this.level <= 1 && this.impl.info(...this.formatMessage(L.resolveLazy(e)), ...r.map(L.resolveLazy));
|
|
223
223
|
}
|
|
224
224
|
static warn(e, ...r) {
|
|
225
|
-
|
|
225
|
+
L.instance.warn(e, ...r);
|
|
226
226
|
}
|
|
227
227
|
warn(e, ...r) {
|
|
228
|
-
this.level <= 2 && this.impl.warn(...this.formatMessage(
|
|
228
|
+
this.level <= 2 && this.impl.warn(...this.formatMessage(L.resolveLazy(e)), ...r.map(L.resolveLazy));
|
|
229
229
|
}
|
|
230
230
|
static error(e, ...r) {
|
|
231
|
-
|
|
231
|
+
L.instance.error(e, ...r);
|
|
232
232
|
}
|
|
233
233
|
error(e, ...r) {
|
|
234
|
-
this.level <= 3 && this.impl.error(...this.formatMessage(
|
|
234
|
+
this.level <= 3 && this.impl.error(...this.formatMessage(L.resolveLazy(e)), ...r.map(L.resolveLazy));
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
const Xn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePointerCapture == "function" && typeof t.hasPointerCapture == "function", Bn = (t, e) => Xn(t) && t.hasPointerCapture(e), _r = (t, e) => {
|
|
@@ -254,7 +254,7 @@ const Xn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePo
|
|
|
254
254
|
}, Wr = 6, hi = 8, pi = ({ dragState: t, normalizedDistance: e }) => {
|
|
255
255
|
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";
|
|
256
256
|
return /* @__PURE__ */ Zt(pn, { children: [
|
|
257
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ Z(
|
|
258
258
|
"div",
|
|
259
259
|
{
|
|
260
260
|
className: "aqvs-tap-scroll-circle-visual-outer",
|
|
@@ -266,7 +266,7 @@ const Xn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePo
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
),
|
|
269
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ Z(
|
|
270
270
|
"div",
|
|
271
271
|
{
|
|
272
272
|
className: "aqvs-tap-scroll-circle-inner",
|
|
@@ -281,146 +281,154 @@ const Xn = (t) => typeof t.setPointerCapture == "function" && typeof t.releasePo
|
|
|
281
281
|
] });
|
|
282
282
|
}, mn = ti(
|
|
283
283
|
Qr(({ onDragChange: t, className: e, maxVisualDistance: r = 160, size: n = 40, style: i, opacity: s = 1, renderVisual: a, axis: l = "y" }, f) => {
|
|
284
|
-
const [
|
|
284
|
+
const [g, x] = Ce(bn), S = u(null), N = u(null), M = u({ x: 0, y: 0 }), _ = u(null), F = u(0), J = p(
|
|
285
285
|
(C) => {
|
|
286
|
-
|
|
286
|
+
x(C), t(C);
|
|
287
287
|
},
|
|
288
288
|
[t]
|
|
289
|
-
),
|
|
290
|
-
(C,
|
|
291
|
-
const { x: He, y: ce } =
|
|
292
|
-
let
|
|
289
|
+
), ie = p(
|
|
290
|
+
(C, K, ee = !1) => {
|
|
291
|
+
const { x: He, y: ce } = M.current, Pe = C - He, Rt = K - ce;
|
|
292
|
+
let ne, st;
|
|
293
293
|
if (l === "xy")
|
|
294
|
-
|
|
294
|
+
ne = Math.hypot(Pe, Rt), st = ne < Wr ? 0 : 1;
|
|
295
295
|
else {
|
|
296
|
-
const
|
|
297
|
-
|
|
296
|
+
const Ve = l === "x" ? Pe : Rt;
|
|
297
|
+
ne = Math.abs(Ve), st = ne < Wr ? 0 : Ve < 0 ? -1 : 1;
|
|
298
298
|
}
|
|
299
|
-
const
|
|
300
|
-
let
|
|
299
|
+
const wt = F.current;
|
|
300
|
+
let we = st;
|
|
301
301
|
const Ke = Wr + hi;
|
|
302
|
-
st === 0 ?
|
|
303
|
-
active:
|
|
302
|
+
st === 0 ? wt !== 0 && ne < Ke ? we = wt : (we = 0, ee || (F.current = 0)) : st !== wt && wt !== 0 && ne < Ke ? we = wt : F.current = st, J({
|
|
303
|
+
active: ee || ne >= Wr,
|
|
304
304
|
offsetX: Pe,
|
|
305
305
|
offsetY: Rt,
|
|
306
|
-
distance:
|
|
307
|
-
direction:
|
|
308
|
-
pointerId:
|
|
306
|
+
distance: ne,
|
|
307
|
+
direction: we,
|
|
308
|
+
pointerId: S.current
|
|
309
309
|
});
|
|
310
310
|
},
|
|
311
|
-
[
|
|
312
|
-
),
|
|
311
|
+
[J, l]
|
|
312
|
+
), ze = p((C) => {
|
|
313
313
|
if (C === null)
|
|
314
314
|
return;
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
}, []),
|
|
315
|
+
const K = _.current;
|
|
316
|
+
K !== null && dr(K, C);
|
|
317
|
+
}, []), $ = p(
|
|
318
318
|
(C = !1) => {
|
|
319
|
-
C &&
|
|
319
|
+
C && ze(S.current), S.current = null, N.current = null, F.current = 0, J(bn);
|
|
320
320
|
},
|
|
321
|
-
[
|
|
322
|
-
),
|
|
321
|
+
[J, ze]
|
|
322
|
+
), I = p(
|
|
323
323
|
(C) => {
|
|
324
|
-
if (
|
|
324
|
+
if (S.current !== null && S.current !== C.pointerId) {
|
|
325
325
|
N.current = { pointerId: C.pointerId, clientX: C.clientX, clientY: C.clientY }, C.preventDefault(), C.stopPropagation();
|
|
326
326
|
return;
|
|
327
327
|
}
|
|
328
328
|
C.preventDefault(), C.stopPropagation();
|
|
329
|
-
const
|
|
330
|
-
|
|
329
|
+
const K = _.current ?? C.currentTarget, { left: ee, top: He, width: ce, height: Pe } = K.getBoundingClientRect();
|
|
330
|
+
M.current = { x: ee + ce / 2, y: He + Pe / 2 }, S.current = C.pointerId, _r(K, C.pointerId), ie(C.clientX, C.clientY, !0);
|
|
331
331
|
},
|
|
332
|
-
[
|
|
333
|
-
),
|
|
332
|
+
[ie]
|
|
333
|
+
), R = p(
|
|
334
334
|
(C) => {
|
|
335
|
-
if (
|
|
335
|
+
if (S.current !== C.pointerId) {
|
|
336
336
|
N.current !== null && N.current.pointerId === C.pointerId && (N.current = { pointerId: C.pointerId, clientX: C.clientX, clientY: C.clientY });
|
|
337
337
|
return;
|
|
338
338
|
}
|
|
339
|
-
C.preventDefault(),
|
|
339
|
+
C.preventDefault(), ie(C.clientX, C.clientY);
|
|
340
340
|
},
|
|
341
|
-
[
|
|
342
|
-
),
|
|
341
|
+
[ie]
|
|
342
|
+
), X = p(
|
|
343
343
|
(C) => {
|
|
344
|
-
if (
|
|
344
|
+
if (S.current !== C.pointerId) {
|
|
345
345
|
N.current !== null && N.current.pointerId === C.pointerId && (N.current = null);
|
|
346
346
|
return;
|
|
347
347
|
}
|
|
348
348
|
C.preventDefault(), C.stopPropagation();
|
|
349
|
-
const
|
|
350
|
-
if (N.current = null,
|
|
351
|
-
|
|
352
|
-
const
|
|
353
|
-
if (
|
|
354
|
-
|
|
349
|
+
const K = N.current;
|
|
350
|
+
if (N.current = null, K !== null) {
|
|
351
|
+
ze(C.pointerId);
|
|
352
|
+
const ee = _.current;
|
|
353
|
+
if (ee === null || _r(ee, K.pointerId) !== "inactive-pointer") {
|
|
354
|
+
S.current = K.pointerId, ie(K.clientX, K.clientY, !0);
|
|
355
355
|
return;
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
|
|
358
|
+
$(!0);
|
|
359
359
|
},
|
|
360
|
-
[
|
|
361
|
-
),
|
|
360
|
+
[$, ze, ie]
|
|
361
|
+
), B = p(
|
|
362
362
|
(C) => {
|
|
363
|
-
C.target === C.currentTarget &&
|
|
363
|
+
C.target === C.currentTarget && S.current === C.pointerId && $(!1);
|
|
364
364
|
},
|
|
365
|
-
[
|
|
365
|
+
[$]
|
|
366
366
|
);
|
|
367
367
|
Jr(
|
|
368
368
|
f,
|
|
369
369
|
() => ({
|
|
370
|
+
/**
|
|
371
|
+
* Returns the circle to its resting state and reports it through `onDragChange`.
|
|
372
|
+
* サークルを静止の状態へ戻し、`onDragChange` で知らせる処理。
|
|
373
|
+
*/
|
|
370
374
|
reset: () => {
|
|
371
|
-
|
|
375
|
+
$(!0);
|
|
372
376
|
},
|
|
373
|
-
|
|
377
|
+
/**
|
|
378
|
+
* Reads the circle's root element (null while it is not mounted).
|
|
379
|
+
* サークルのルートの要素を読む処理 (マウントしていない間は null)。
|
|
380
|
+
*/
|
|
381
|
+
getElement: () => _.current
|
|
374
382
|
}),
|
|
375
|
-
[
|
|
383
|
+
[$]
|
|
376
384
|
);
|
|
377
|
-
const
|
|
378
|
-
let
|
|
385
|
+
const k = Math.min(Math.max(s, 0), 1), be = n / 64, se = Math.min(g.distance, r) / r, oe = g.direction * se * 10 * be;
|
|
386
|
+
let pe;
|
|
379
387
|
if (l === "xy") {
|
|
380
|
-
const C =
|
|
381
|
-
|
|
382
|
-
} else l === "x" ?
|
|
383
|
-
const xe = a ?? pi,
|
|
384
|
-
dragState:
|
|
385
|
-
normalizedDistance:
|
|
386
|
-
sizeScale:
|
|
388
|
+
const C = g.distance, K = C === 0 ? 0 : oe * g.offsetX / C, ee = C === 0 ? 0 : oe * g.offsetY / C;
|
|
389
|
+
pe = `translate(${K}px, ${ee}px)`;
|
|
390
|
+
} else l === "x" ? pe = `translateX(${oe}px)` : pe = `translateY(${oe}px)`;
|
|
391
|
+
const xe = a ?? pi, ke = {
|
|
392
|
+
dragState: g,
|
|
393
|
+
normalizedDistance: se,
|
|
394
|
+
sizeScale: be,
|
|
387
395
|
size: n,
|
|
388
|
-
opacity:
|
|
389
|
-
},
|
|
396
|
+
opacity: k
|
|
397
|
+
}, je = {
|
|
390
398
|
...i,
|
|
391
399
|
width: n,
|
|
392
400
|
height: n,
|
|
393
|
-
transform:
|
|
401
|
+
transform: pe
|
|
394
402
|
};
|
|
395
|
-
return
|
|
403
|
+
return je.opacity = k, /* @__PURE__ */ Z(
|
|
396
404
|
"div",
|
|
397
405
|
{
|
|
398
|
-
ref:
|
|
406
|
+
ref: _,
|
|
399
407
|
"data-testid": "virtual-scroll-tap-circle",
|
|
400
408
|
className: Ot("aqvs-tap-scroll-circle", e),
|
|
401
|
-
style:
|
|
409
|
+
style: je,
|
|
402
410
|
tabIndex: -1,
|
|
403
|
-
onPointerDown:
|
|
404
|
-
onPointerMove:
|
|
405
|
-
onPointerUp:
|
|
406
|
-
onPointerCancel:
|
|
407
|
-
onLostPointerCapture:
|
|
411
|
+
onPointerDown: I,
|
|
412
|
+
onPointerMove: R,
|
|
413
|
+
onPointerUp: X,
|
|
414
|
+
onPointerCancel: X,
|
|
415
|
+
onLostPointerCapture: B,
|
|
408
416
|
role: "presentation",
|
|
409
|
-
children: xe(
|
|
417
|
+
children: xe(ke)
|
|
410
418
|
}
|
|
411
419
|
);
|
|
412
420
|
})
|
|
413
421
|
);
|
|
414
422
|
mn.displayName = "TapScrollCircle";
|
|
415
|
-
const
|
|
416
|
-
const r = e === "x", n = t.getBoundingClientRect(), i = r ? n.width : n.height, s = (
|
|
417
|
-
const
|
|
418
|
-
return Number.isFinite(
|
|
419
|
-
}, a = window.getComputedStyle(t), l = s(r ? a.width : a.height), f = l > 0 ? l + s(r ? a.paddingLeft : a.paddingTop) + s(r ? a.paddingRight : a.paddingBottom) + s(r ? a.borderLeftWidth : a.borderTopWidth) + s(r ? a.borderRightWidth : a.borderBottomWidth) : 0,
|
|
420
|
-
return
|
|
423
|
+
const re = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
424
|
+
const r = e === "x", n = t.getBoundingClientRect(), i = r ? n.width : n.height, s = (x) => {
|
|
425
|
+
const S = Number.parseFloat(x);
|
|
426
|
+
return Number.isFinite(S) ? S : 0;
|
|
427
|
+
}, a = window.getComputedStyle(t), l = s(r ? a.width : a.height), f = l > 0 ? l + s(r ? a.paddingLeft : a.paddingTop) + s(r ? a.paddingRight : a.paddingBottom) + s(r ? a.borderLeftWidth : a.borderTopWidth) + s(r ? a.borderRightWidth : a.borderBottomWidth) : 0, g = f > 0 ? f : r ? t.offsetWidth : t.offsetHeight;
|
|
428
|
+
return g <= 0 || i <= 0 ? 1 : i / g;
|
|
421
429
|
}, qn = (t) => {
|
|
422
430
|
t.preventDefault();
|
|
423
|
-
}, Or = "virtualscroll:tap-scroll-cancel",
|
|
431
|
+
}, Or = "virtualscroll:tap-scroll-cancel", vn = 20, xn = 0.01, mi = (t, e) => e <= 0 || t <= 0 ? 0 : t >= e ? 1 : re(t / e, xn, 1 - xn), gi = 250, bi = 60, vi = 20, xi = 20, Yn = {
|
|
424
432
|
/** 速度が最大に達する引き距離 (px)。`maxVisualDistance` の既定値。 */
|
|
425
433
|
maxDistance: 240,
|
|
426
434
|
/** 最小速度倍率 (ビューポート比)。 */
|
|
@@ -440,7 +448,15 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
440
448
|
mainSizeKey: "width",
|
|
441
449
|
crossSizeKey: "height",
|
|
442
450
|
thumbTranslateFunction: "translateX",
|
|
451
|
+
/**
|
|
452
|
+
* Picks the component of a pointer drag along the horizontal bar.
|
|
453
|
+
* ポインタのドラッグの、横のバーに沿う成分を選ぶ処理。
|
|
454
|
+
*/
|
|
443
455
|
selectDelta: (e, r) => e,
|
|
456
|
+
/**
|
|
457
|
+
* Reads a pointer's coordinate along the horizontal bar.
|
|
458
|
+
* ポインタの、横のバーに沿う座標を読む処理。
|
|
459
|
+
*/
|
|
444
460
|
getPointerCoordinate: ({ clientX: e }) => e,
|
|
445
461
|
arrowIcons: ["◀", "▶"],
|
|
446
462
|
directionClass: "aqvs-scrollbar-horizontal",
|
|
@@ -449,7 +465,15 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
449
465
|
mainSizeKey: "height",
|
|
450
466
|
crossSizeKey: "width",
|
|
451
467
|
thumbTranslateFunction: "translateY",
|
|
468
|
+
/**
|
|
469
|
+
* Picks the component of a pointer drag along the vertical bar.
|
|
470
|
+
* ポインタのドラッグの、縦のバーに沿う成分を選ぶ処理。
|
|
471
|
+
*/
|
|
452
472
|
selectDelta: (e, r) => r,
|
|
473
|
+
/**
|
|
474
|
+
* Reads a pointer's coordinate along the vertical bar.
|
|
475
|
+
* ポインタの、縦のバーに沿う座標を読む処理。
|
|
476
|
+
*/
|
|
453
477
|
getPointerCoordinate: ({ clientY: e }) => e,
|
|
454
478
|
arrowIcons: ["▲", "▼"],
|
|
455
479
|
directionClass: "aqvs-scrollbar-vertical",
|
|
@@ -465,58 +489,71 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
465
489
|
maxVisualDistance: t?.maxVisualDistance ?? Kt.maxVisualDistance,
|
|
466
490
|
maxSpeedMultiplier: n,
|
|
467
491
|
minSpeedMultiplier: Math.max(t?.minSpeedMultiplier ?? Kt.minSpeedMultiplier, 0),
|
|
468
|
-
opacity:
|
|
492
|
+
opacity: re(t?.opacity ?? Kt.opacity, 0, 1),
|
|
469
493
|
renderVisual: t?.renderVisual ?? Kt.renderVisual,
|
|
470
494
|
maxSpeedCurve: t?.maxSpeedCurve ?? Kt.maxSpeedCurve
|
|
471
495
|
};
|
|
472
496
|
}, yi = ({ isDragging: t, isThumbHovered: e, enableThumbDrag: r }) => ge(() => r ? t ? "dragging" : e ? "hover" : "idle" : "disabled", [r, t, e]), Ii = ({ canUseArrowButtons: t, enableArrowButtons: e, keyboardOperable: r, resetTapScroll: n, scrollByStep: i }) => {
|
|
473
497
|
const s = u(null), a = u(null), l = u(null), f = p(() => {
|
|
474
498
|
s.current !== null && (window.clearInterval(s.current), s.current = null), a.current !== null && (window.clearTimeout(a.current), a.current = null), l.current !== null && (window.removeEventListener("pointerup", l.current), window.removeEventListener("pointercancel", l.current), window.removeEventListener("blur", l.current), l.current = null);
|
|
475
|
-
}, []),
|
|
499
|
+
}, []), g = p(() => {
|
|
476
500
|
f();
|
|
477
|
-
}, [f]),
|
|
478
|
-
(N) => (
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
501
|
+
}, [f]), x = p(
|
|
502
|
+
(N) => (
|
|
503
|
+
/**
|
|
504
|
+
* Handles a press on an arrow: one step at once, then a repeat while the press is held, ended by the release anywhere,
|
|
505
|
+
* a cancel or the window losing focus.
|
|
506
|
+
* 矢印の押下を扱う処理。すぐに 1 段進め、押している間は繰り返し、どこでの解放・取り消し・ウィンドウのフォーカスの喪失で止める。
|
|
507
|
+
*/
|
|
508
|
+
((M) => {
|
|
509
|
+
if (!t)
|
|
510
|
+
return;
|
|
511
|
+
M.cancelable && M.preventDefault(), M.stopPropagation(), n(), f(), i(N), a.current = window.setTimeout(() => {
|
|
512
|
+
s.current = window.setInterval(() => {
|
|
513
|
+
i(N);
|
|
514
|
+
}, bi);
|
|
515
|
+
}, gi);
|
|
516
|
+
const _ = () => f();
|
|
517
|
+
l.current = _, window.addEventListener("pointerup", _), window.addEventListener("pointercancel", _), window.addEventListener("blur", _);
|
|
518
|
+
})
|
|
519
|
+
),
|
|
489
520
|
[t, f, n, i]
|
|
490
|
-
),
|
|
491
|
-
(N) => (
|
|
492
|
-
|
|
493
|
-
|
|
521
|
+
), S = p(
|
|
522
|
+
(N) => (
|
|
523
|
+
/**
|
|
524
|
+
* Handles Enter and Space on a focused arrow as one step, unless the bar is pointer-only or its arrows are disabled.
|
|
525
|
+
* フォーカスした矢印での Enter と Space を 1 段として扱う処理 (バーがポインタ専用か矢印が無効なら何もしない)。
|
|
526
|
+
*/
|
|
527
|
+
((M) => {
|
|
528
|
+
e && r && (M.key === "Enter" || M.key === " " || M.key === "Spacebar") && (M.preventDefault(), i(N));
|
|
529
|
+
})
|
|
530
|
+
),
|
|
494
531
|
[e, r, i]
|
|
495
532
|
);
|
|
496
|
-
return
|
|
533
|
+
return W(() => {
|
|
497
534
|
t || f();
|
|
498
|
-
}, [t, f]),
|
|
535
|
+
}, [t, f]), W(() => () => {
|
|
499
536
|
f();
|
|
500
|
-
}, [f]), { handleArrowPointerDown:
|
|
537
|
+
}, [f]), { handleArrowPointerDown: x, handleArrowPointerUp: g, handleArrowKeyDown: S };
|
|
501
538
|
}, Pi = 700, ur = (t, e) => typeof t == "number" && Number.isFinite(t) ? t : e, fn = ({ distance: t, maxDistance: e, viewportSize: r, minSpeedMultiplier: n, maxSpeedMultiplier: i, hasCustomMaxSpeedMultiplier: s, curve: a }) => {
|
|
502
|
-
const l = Math.max(ur(t, 0), 0), f = ur(e, 0),
|
|
503
|
-
let
|
|
539
|
+
const l = Math.max(ur(t, 0), 0), f = ur(e, 0), g = f > 0 ? Math.min(l, f) / f : 1, x = Math.max(ur(r, 0), 0), S = Math.max(ur(n, 0), 0), N = Math.max(ur(i, 0), 0), M = Math.max(x * S, 40), _ = s ? M : 1200, F = Math.max(x * N, _), J = a ? Math.max(ur(a.exponentialScale, N), 0) : 0, ie = a ? Math.min(F, Math.max(x * J, M)) : F, ze = Math.max(ie, M);
|
|
540
|
+
let $ = g ** 1.1;
|
|
504
541
|
if (a) {
|
|
505
|
-
const
|
|
506
|
-
if (
|
|
507
|
-
|
|
542
|
+
const R = Math.min(Math.max(ur(a.exponentialSteepness, 0), 0), Pi);
|
|
543
|
+
if (R === 0)
|
|
544
|
+
$ = g;
|
|
508
545
|
else {
|
|
509
|
-
const
|
|
510
|
-
|
|
546
|
+
const X = Math.expm1(R) || 1;
|
|
547
|
+
$ = Math.min(Math.max(Math.expm1(R * g) / X, 0), 1);
|
|
511
548
|
}
|
|
512
549
|
}
|
|
513
|
-
const
|
|
514
|
-
return
|
|
550
|
+
const I = Math.min(Math.max(ur(a?.easedOffset, 0), 0), 1);
|
|
551
|
+
return M + (ze - M) * (I + (1 - I) * $);
|
|
515
552
|
}, Ei = (t) => {
|
|
516
553
|
if (!t || t <= 0)
|
|
517
554
|
return nn;
|
|
518
555
|
const e = Math.max(1, t), r = Math.log10(e), n = nn + r * Si;
|
|
519
|
-
return
|
|
556
|
+
return re(n, nn, Mi);
|
|
520
557
|
}, Un = ({
|
|
521
558
|
contentSize: t,
|
|
522
559
|
viewportSize: e,
|
|
@@ -527,239 +564,239 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
527
564
|
enableArrowButtons: a = !0,
|
|
528
565
|
enableArrowButtonTabStops: l = !0,
|
|
529
566
|
horizontal: f = !1,
|
|
530
|
-
enableHorizontalTapCircle:
|
|
531
|
-
stretchMainSize:
|
|
532
|
-
scrollBarWidth:
|
|
567
|
+
enableHorizontalTapCircle: g = !1,
|
|
568
|
+
stretchMainSize: x = !1,
|
|
569
|
+
scrollBarWidth: S = 12,
|
|
533
570
|
className: N,
|
|
534
|
-
ariaControls:
|
|
535
|
-
tapScrollCircleOptions:
|
|
536
|
-
itemCount:
|
|
537
|
-
renderThumbOverlay:
|
|
538
|
-
visibleStartIndex:
|
|
539
|
-
visibleEndIndex:
|
|
540
|
-
locale:
|
|
541
|
-
labels:
|
|
571
|
+
ariaControls: M,
|
|
572
|
+
tapScrollCircleOptions: _,
|
|
573
|
+
itemCount: F,
|
|
574
|
+
renderThumbOverlay: J,
|
|
575
|
+
visibleStartIndex: ie,
|
|
576
|
+
visibleEndIndex: ze,
|
|
577
|
+
locale: $,
|
|
578
|
+
labels: I
|
|
542
579
|
}) => {
|
|
543
|
-
const [
|
|
580
|
+
const [R, X] = Ce(!1), [B, k] = Ce(!1), [be, se] = Ce(!1), oe = u(null), pe = u({
|
|
544
581
|
pointerId: null,
|
|
545
582
|
startThumbPosition: 0,
|
|
546
583
|
startClientX: 0,
|
|
547
584
|
startClientY: 0,
|
|
548
585
|
scale: 1,
|
|
549
586
|
captureTarget: null
|
|
550
|
-
}), xe = u({ pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1 }),
|
|
551
|
-
enabled:
|
|
587
|
+
}), xe = u({ pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1 }), ke = u(r), je = u(n), C = u(wn), K = u(null), ee = u(null), He = u(null), ce = u(0), Pe = u(0), Rt = ge(() => dn(_, F), [F, _]), ne = ge(() => Ri(f), [f]), st = ge(() => $n($, I), [$, I]), wt = Ti(st, f), we = ge(() => new Intl.NumberFormat(Hn($), { style: "percent", maximumFractionDigits: 0 }), [$]), Ke = !l, {
|
|
588
|
+
enabled: Ve,
|
|
552
589
|
size: Ze,
|
|
553
590
|
offsetX: Qe,
|
|
554
591
|
offsetY: Vt,
|
|
555
|
-
className:
|
|
592
|
+
className: Se,
|
|
556
593
|
maxVisualDistance: yt,
|
|
557
594
|
maxSpeedMultiplier: $e,
|
|
558
595
|
minSpeedMultiplier: D,
|
|
559
596
|
opacity: ot,
|
|
560
|
-
renderVisual:
|
|
561
|
-
maxSpeedCurve:
|
|
562
|
-
} = Rt,
|
|
597
|
+
renderVisual: A,
|
|
598
|
+
maxSpeedCurve: ft
|
|
599
|
+
} = Rt, z = u({
|
|
563
600
|
viewportSize: e,
|
|
564
601
|
maxScrollPosition: Math.max(t - e, 0),
|
|
565
602
|
scrollBarVisible: t > e,
|
|
566
603
|
effectiveTapMaxDistance: Math.max(yt, 1),
|
|
567
604
|
tapCircleMaxSpeedMultiplier: $e,
|
|
568
605
|
tapCircleMinSpeedMultiplier: D,
|
|
569
|
-
tapCircleMaxSpeedCurve:
|
|
570
|
-
tapScrollCircleOptions:
|
|
606
|
+
tapCircleMaxSpeedCurve: ft,
|
|
607
|
+
tapScrollCircleOptions: _,
|
|
571
608
|
effectiveTrackLength: 0,
|
|
572
609
|
onScroll: n,
|
|
573
610
|
scrollPosition: r
|
|
574
|
-
}), { mainSizeKey:
|
|
575
|
-
|
|
576
|
-
|
|
611
|
+
}), { mainSizeKey: Ae, crossSizeKey: ht, thumbTranslateFunction: H, selectDelta: pt, getPointerCoordinate: At, arrowIcons: y, directionClass: Ht, orientation: mt } = ne, Xe = Math.max(yt, 1), St = e / t, $t = Math.max(e - S * 2, 0), v = St * $t, Y = Math.min(Math.max(vn, v || 0), $t || vn), te = Math.max(t - e, 0), le = Ke ? void 0 : we.format(mi(r, te)), ae = Math.max($t - Y, 0), Ee = te <= 0 || ae <= 0 ? 0 : re(r / te * ae, 0, ae), Te = Ee + Y / 2, { ratio: Me, attach: at } = Fn("[ScrollBar] the thumb"), Be = Me === null ? Ee : _n(Ee, Me, "none"), U = t > e || R, gt = U && a;
|
|
612
|
+
We(() => {
|
|
613
|
+
z.current = {
|
|
577
614
|
viewportSize: e,
|
|
578
|
-
maxScrollPosition:
|
|
615
|
+
maxScrollPosition: te,
|
|
579
616
|
scrollBarVisible: U,
|
|
580
617
|
effectiveTapMaxDistance: Xe,
|
|
581
618
|
tapCircleMaxSpeedMultiplier: $e,
|
|
582
619
|
tapCircleMinSpeedMultiplier: D,
|
|
583
|
-
tapCircleMaxSpeedCurve:
|
|
584
|
-
tapScrollCircleOptions:
|
|
585
|
-
effectiveTrackLength:
|
|
620
|
+
tapCircleMaxSpeedCurve: ft,
|
|
621
|
+
tapScrollCircleOptions: _,
|
|
622
|
+
effectiveTrackLength: ae,
|
|
586
623
|
onScroll: n,
|
|
587
624
|
scrollPosition: r
|
|
588
625
|
};
|
|
589
|
-
}),
|
|
590
|
-
|
|
591
|
-
}, [r]),
|
|
592
|
-
|
|
593
|
-
}, [n]),
|
|
594
|
-
i ||
|
|
626
|
+
}), We(() => {
|
|
627
|
+
ke.current = r;
|
|
628
|
+
}, [r]), We(() => {
|
|
629
|
+
je.current = n;
|
|
630
|
+
}, [n]), W(() => {
|
|
631
|
+
i || k(!1);
|
|
595
632
|
}, [i]);
|
|
596
|
-
const
|
|
597
|
-
const
|
|
598
|
-
if (
|
|
599
|
-
const
|
|
600
|
-
if (typeof
|
|
601
|
-
return
|
|
633
|
+
const ve = yi({ isDragging: R, isThumbHovered: B, enableThumbDrag: i }), Re = p((d, E) => {
|
|
634
|
+
const O = z.current, ue = E ?? ke.current;
|
|
635
|
+
if (je.current) {
|
|
636
|
+
const Oe = je.current(d, ue);
|
|
637
|
+
if (typeof Oe == "number" && Number.isFinite(Oe))
|
|
638
|
+
return ke.current = Oe, Oe;
|
|
602
639
|
}
|
|
603
|
-
const
|
|
604
|
-
return
|
|
605
|
-
}, []),
|
|
640
|
+
const De = typeof d == "function" ? d(ue) : d, tt = Math.max(O.maxScrollPosition, 0), de = O.scrollBarVisible ? re(De, 0, tt) : 0;
|
|
641
|
+
return ke.current = de, de;
|
|
642
|
+
}, []), Le = p(
|
|
606
643
|
(d) => {
|
|
607
|
-
const E =
|
|
644
|
+
const E = z.current, O = ke.current;
|
|
608
645
|
if (!E.scrollBarVisible || E.maxScrollPosition <= 0) {
|
|
609
|
-
const jt =
|
|
646
|
+
const jt = Re(0, O), It = jt - O;
|
|
610
647
|
return { nextPosition: jt, actualDelta: It, reachedBoundary: !0 };
|
|
611
648
|
}
|
|
612
649
|
if (d === 0)
|
|
613
|
-
return { nextPosition:
|
|
614
|
-
const
|
|
615
|
-
return { nextPosition:
|
|
650
|
+
return { nextPosition: O, actualDelta: 0, reachedBoundary: !1 };
|
|
651
|
+
const De = Re((jt) => re(jt + d, 0, E.maxScrollPosition), O), tt = De - O, de = d < 0 && O + d <= 0, Oe = d > 0 && O + d >= E.maxScrollPosition, vt = d < 0 && (De <= 0 || de && tt === 0) || d > 0 && (De >= E.maxScrollPosition || Oe && tt === 0);
|
|
652
|
+
return { nextPosition: De, actualDelta: tt, reachedBoundary: vt };
|
|
616
653
|
},
|
|
617
|
-
[
|
|
654
|
+
[Re]
|
|
618
655
|
), Et = p(
|
|
619
656
|
(d, E) => {
|
|
620
657
|
d.current += E;
|
|
621
|
-
const
|
|
622
|
-
|
|
623
|
-
const ue =
|
|
658
|
+
const O = Math.max(z.current.maxScrollPosition, 0);
|
|
659
|
+
O > 0 && (d.current = re(d.current, -O, O));
|
|
660
|
+
const ue = Le(d.current);
|
|
624
661
|
return d.current -= ue.actualDelta, ue.reachedBoundary && (d.current = 0), ue;
|
|
625
662
|
},
|
|
626
|
-
[
|
|
627
|
-
),
|
|
628
|
-
|
|
663
|
+
[Le]
|
|
664
|
+
), Ue = p(() => {
|
|
665
|
+
ee.current !== null && (window.cancelAnimationFrame(ee.current), ee.current = null), He.current = null, ce.current = 0, Pe.current = 0;
|
|
629
666
|
}, []), qe = p(() => {
|
|
630
|
-
C.current = { ...wn },
|
|
631
|
-
}, [
|
|
667
|
+
C.current = { ...wn }, se(!1), K.current?.reset(), Ue();
|
|
668
|
+
}, [Ue]), Je = p(
|
|
632
669
|
(d) => {
|
|
633
|
-
const E = C.current,
|
|
670
|
+
const E = C.current, O = z.current;
|
|
634
671
|
if (!E.active || E.direction === 0) {
|
|
635
|
-
|
|
672
|
+
Ue();
|
|
636
673
|
return;
|
|
637
674
|
}
|
|
638
|
-
if (!
|
|
639
|
-
|
|
675
|
+
if (!O.scrollBarVisible || O.maxScrollPosition <= 0) {
|
|
676
|
+
Ue();
|
|
640
677
|
return;
|
|
641
678
|
}
|
|
642
|
-
const ue = He.current ?? d,
|
|
679
|
+
const ue = He.current ?? d, De = Math.max((d - ue) / 1e3, 0), tt = Math.min(De, Wn);
|
|
643
680
|
if (He.current = d, tt <= 0) {
|
|
644
|
-
|
|
681
|
+
ee.current = window.requestAnimationFrame(Je);
|
|
645
682
|
return;
|
|
646
683
|
}
|
|
647
684
|
const de = fn({
|
|
648
685
|
distance: E.distance,
|
|
649
|
-
maxDistance:
|
|
650
|
-
viewportSize:
|
|
651
|
-
minSpeedMultiplier:
|
|
652
|
-
maxSpeedMultiplier:
|
|
653
|
-
hasCustomMaxSpeedMultiplier: typeof
|
|
654
|
-
curve:
|
|
686
|
+
maxDistance: O.effectiveTapMaxDistance,
|
|
687
|
+
viewportSize: O.viewportSize,
|
|
688
|
+
minSpeedMultiplier: O.tapCircleMinSpeedMultiplier,
|
|
689
|
+
maxSpeedMultiplier: O.tapCircleMaxSpeedMultiplier,
|
|
690
|
+
hasCustomMaxSpeedMultiplier: typeof O.tapScrollCircleOptions?.maxSpeedMultiplier == "number",
|
|
691
|
+
curve: O.tapCircleMaxSpeedCurve
|
|
655
692
|
});
|
|
656
693
|
Pe.current !== E.direction && (Pe.current = E.direction, ce.current = 0);
|
|
657
|
-
const { reachedBoundary:
|
|
658
|
-
if (
|
|
659
|
-
|
|
694
|
+
const { reachedBoundary: Oe } = Et(ce, E.direction * de * tt);
|
|
695
|
+
if (Oe) {
|
|
696
|
+
Ue();
|
|
660
697
|
return;
|
|
661
698
|
}
|
|
662
|
-
|
|
699
|
+
ee.current = window.requestAnimationFrame(Je);
|
|
663
700
|
},
|
|
664
|
-
[Et,
|
|
701
|
+
[Et, Ue]
|
|
665
702
|
), w = p(() => {
|
|
666
|
-
|
|
703
|
+
ee.current === null && (He.current = null, ce.current = 0, ee.current = window.requestAnimationFrame(Je));
|
|
667
704
|
}, [Je]);
|
|
668
|
-
|
|
705
|
+
W(() => {
|
|
669
706
|
const d = C.current;
|
|
670
707
|
!d.active || d.direction === 0 || w();
|
|
671
|
-
}, [t, e, w]),
|
|
672
|
-
|
|
673
|
-
}, [
|
|
674
|
-
const
|
|
708
|
+
}, [t, e, w]), W(() => () => {
|
|
709
|
+
Ue();
|
|
710
|
+
}, [Ue]);
|
|
711
|
+
const P = p(
|
|
675
712
|
(d) => {
|
|
676
|
-
C.current = d,
|
|
713
|
+
C.current = d, se(d.active), d.active && d.direction !== 0 ? w() : Ue();
|
|
677
714
|
},
|
|
678
|
-
[w,
|
|
715
|
+
[w, Ue]
|
|
679
716
|
);
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
}, [qe,
|
|
717
|
+
W(() => {
|
|
718
|
+
Ve || qe();
|
|
719
|
+
}, [qe, Ve]), W(() => {
|
|
683
720
|
const d = (E) => {
|
|
684
721
|
const ue = E.detail?.paneId;
|
|
685
|
-
ue &&
|
|
722
|
+
ue && M && ue !== M || qe();
|
|
686
723
|
};
|
|
687
724
|
return window.addEventListener(Or, d), () => {
|
|
688
725
|
window.removeEventListener(Or, d);
|
|
689
726
|
};
|
|
690
|
-
}, [
|
|
691
|
-
if (!
|
|
727
|
+
}, [M, qe]), W(() => {
|
|
728
|
+
if (!Ve)
|
|
692
729
|
return;
|
|
693
730
|
const d = (E) => {
|
|
694
731
|
if (!C.current.active || C.current.pointerId === E.pointerId)
|
|
695
732
|
return;
|
|
696
|
-
const
|
|
697
|
-
if (!(
|
|
733
|
+
const O = E.target;
|
|
734
|
+
if (!(O instanceof Node)) {
|
|
698
735
|
qe();
|
|
699
736
|
return;
|
|
700
737
|
}
|
|
701
|
-
|
|
738
|
+
K.current?.getElement()?.contains(O) || qe();
|
|
702
739
|
};
|
|
703
740
|
return document.addEventListener("pointerdown", d, !0), () => {
|
|
704
741
|
document.removeEventListener("pointerdown", d, !0);
|
|
705
742
|
};
|
|
706
|
-
}, [qe,
|
|
743
|
+
}, [qe, Ve]);
|
|
707
744
|
const Ye = (d) => {
|
|
708
|
-
if (!U ||
|
|
745
|
+
if (!U || ae <= 0 || te <= 0)
|
|
709
746
|
return 0;
|
|
710
|
-
const E =
|
|
711
|
-
return
|
|
712
|
-
},
|
|
713
|
-
const { scrollBarVisible: E, effectiveTrackLength:
|
|
714
|
-
if (
|
|
747
|
+
const E = re(d, 0, ae);
|
|
748
|
+
return re(E / ae * te, 0, te);
|
|
749
|
+
}, ye = p((d) => {
|
|
750
|
+
const { scrollBarVisible: E, effectiveTrackLength: O, maxScrollPosition: ue } = z.current;
|
|
751
|
+
if (L.debug("[ScrollBar] calculateScrollPositionFromThumb", () => ({ thumbPos: d, trackLen: O, maxScroll: ue })), O <= 0 || ue <= 0)
|
|
715
752
|
return null;
|
|
716
|
-
const
|
|
717
|
-
return
|
|
718
|
-
}, []),
|
|
753
|
+
const De = re(d, 0, O);
|
|
754
|
+
return re(De / O * ue, 0, ue);
|
|
755
|
+
}, []), Ge = p((d) => Zr(d, f ? "x" : "y"), [f]), et = p(
|
|
719
756
|
(d) => {
|
|
720
|
-
const E =
|
|
757
|
+
const E = pe.current;
|
|
721
758
|
if (E.pointerId !== d.pointerId)
|
|
722
759
|
return;
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
delta:
|
|
760
|
+
const O = d.clientX - E.startClientX, ue = d.clientY - E.startClientY, De = pt(O, ue) / (E.scale || 1);
|
|
761
|
+
L.debug("[ScrollBar] handleThumbPointerMove", () => ({
|
|
762
|
+
delta: De,
|
|
726
763
|
startThumbPosition: E.startThumbPosition,
|
|
727
764
|
clientY: d.clientY,
|
|
728
765
|
startClientY: E.startClientY,
|
|
729
|
-
metrics:
|
|
766
|
+
metrics: z.current
|
|
730
767
|
}));
|
|
731
|
-
const tt =
|
|
732
|
-
tt !== null &&
|
|
768
|
+
const tt = ye(E.startThumbPosition + De);
|
|
769
|
+
tt !== null && Re(tt), d.cancelable && d.preventDefault();
|
|
733
770
|
},
|
|
734
|
-
[
|
|
735
|
-
),
|
|
771
|
+
[pt, ye, Re]
|
|
772
|
+
), _e = p(
|
|
736
773
|
(d) => {
|
|
737
|
-
const E =
|
|
774
|
+
const E = pe.current;
|
|
738
775
|
if (E.pointerId === d.pointerId)
|
|
739
|
-
if (document.removeEventListener("pointermove", et), document.removeEventListener("pointerup",
|
|
740
|
-
const
|
|
741
|
-
d.clientX >=
|
|
776
|
+
if (document.removeEventListener("pointermove", et), document.removeEventListener("pointerup", _e), document.removeEventListener("pointercancel", _e), E.captureTarget !== null && dr(E.captureTarget, d.pointerId), pe.current = { pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1, captureTarget: null }, X(!1), oe.current) {
|
|
777
|
+
const O = oe.current.getBoundingClientRect();
|
|
778
|
+
d.clientX >= O.left && d.clientX <= O.right && d.clientY >= O.top && d.clientY <= O.bottom || k(!1);
|
|
742
779
|
} else
|
|
743
|
-
|
|
780
|
+
k(!1);
|
|
744
781
|
},
|
|
745
782
|
[et]
|
|
746
783
|
);
|
|
747
|
-
|
|
748
|
-
document.removeEventListener("pointermove", et), document.removeEventListener("pointerup",
|
|
749
|
-
}, [et,
|
|
750
|
-
const me = u(0),
|
|
784
|
+
W(() => () => {
|
|
785
|
+
document.removeEventListener("pointermove", et), document.removeEventListener("pointerup", _e), document.removeEventListener("pointercancel", _e);
|
|
786
|
+
}, [et, _e]);
|
|
787
|
+
const me = u(0), bt = u(0), Qt = p(
|
|
751
788
|
(d) => {
|
|
752
|
-
const E = Math.max(Math.round(
|
|
753
|
-
|
|
789
|
+
const E = Math.max(Math.round(z.current.viewportSize / xi), vi);
|
|
790
|
+
bt.current !== d && (bt.current = d, me.current = 0), Et(me, d * E);
|
|
754
791
|
},
|
|
755
792
|
[Et]
|
|
756
|
-
), { handleArrowPointerDown: hr, handleArrowPointerUp: Ft, handleArrowKeyDown:
|
|
757
|
-
canUseArrowButtons:
|
|
793
|
+
), { handleArrowPointerDown: hr, handleArrowPointerUp: Ft, handleArrowKeyDown: Mt } = Ii({
|
|
794
|
+
canUseArrowButtons: gt,
|
|
758
795
|
enableArrowButtons: a,
|
|
759
796
|
keyboardOperable: !Ke,
|
|
760
797
|
resetTapScroll: qe,
|
|
761
798
|
scrollByStep: Qt
|
|
762
|
-
}),
|
|
799
|
+
}), Dt = (d) => {
|
|
763
800
|
if (!U)
|
|
764
801
|
return;
|
|
765
802
|
if (!i) {
|
|
@@ -769,15 +806,15 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
769
806
|
if (d.pointerType === "mouse" && d.button !== 0 || d.ctrlKey)
|
|
770
807
|
return;
|
|
771
808
|
qe();
|
|
772
|
-
const E = d.currentTarget,
|
|
773
|
-
|
|
809
|
+
const E = d.currentTarget, O = Ge(E), ue = _r(E, d.pointerId) === "captured" ? E : null;
|
|
810
|
+
pe.current = {
|
|
774
811
|
pointerId: d.pointerId,
|
|
775
|
-
startThumbPosition:
|
|
812
|
+
startThumbPosition: Ee,
|
|
776
813
|
startClientX: d.clientX,
|
|
777
814
|
startClientY: d.clientY,
|
|
778
|
-
scale:
|
|
815
|
+
scale: O,
|
|
779
816
|
captureTarget: ue
|
|
780
|
-
}, document.addEventListener("pointermove", et), document.addEventListener("pointerup",
|
|
817
|
+
}, document.addEventListener("pointermove", et), document.addEventListener("pointerup", _e), document.addEventListener("pointercancel", _e), X(!0), k(!0), d.preventDefault(), d.stopPropagation();
|
|
781
818
|
}, Gt = (d) => {
|
|
782
819
|
if (!U)
|
|
783
820
|
return;
|
|
@@ -787,169 +824,169 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
787
824
|
}
|
|
788
825
|
if (d.pointerType === "mouse" && d.button !== 0 || d.ctrlKey)
|
|
789
826
|
return;
|
|
790
|
-
const E = d.currentTarget,
|
|
827
|
+
const E = d.currentTarget, O = E.getBoundingClientRect(), ue = At(d), De = Ge(E), tt = (ue - (f ? O.left : O.top)) / De;
|
|
791
828
|
qe();
|
|
792
|
-
const de = tt - Y / 2,
|
|
793
|
-
|
|
829
|
+
const de = tt - Y / 2, Oe = Ye(de);
|
|
830
|
+
Re(Oe), _r(E, d.pointerId), xe.current = {
|
|
794
831
|
pointerId: d.pointerId,
|
|
795
832
|
startThumbPosition: de,
|
|
796
833
|
startClientX: d.clientX,
|
|
797
834
|
startClientY: d.clientY,
|
|
798
|
-
scale:
|
|
835
|
+
scale: De
|
|
799
836
|
}, d.preventDefault(), d.stopPropagation();
|
|
800
|
-
},
|
|
837
|
+
}, zt = () => {
|
|
801
838
|
xe.current = { pointerId: null, startThumbPosition: 0, startClientX: 0, startClientY: 0, scale: 1 };
|
|
802
839
|
}, or = (d) => {
|
|
803
840
|
const E = xe.current;
|
|
804
841
|
if (E.pointerId !== d.pointerId)
|
|
805
842
|
return;
|
|
806
843
|
if (d.pointerType === "mouse" && d.buttons === 0) {
|
|
807
|
-
|
|
844
|
+
zt();
|
|
808
845
|
return;
|
|
809
846
|
}
|
|
810
|
-
const
|
|
811
|
-
|
|
847
|
+
const O = d.clientX - E.startClientX, ue = d.clientY - E.startClientY, De = pt(O, ue) / (E.scale || 1), tt = Ye(E.startThumbPosition + De);
|
|
848
|
+
Re(tt), d.cancelable && d.preventDefault();
|
|
812
849
|
}, Ir = (d) => {
|
|
813
|
-
xe.current.pointerId === d.pointerId && (dr(d.currentTarget, d.pointerId),
|
|
850
|
+
xe.current.pointerId === d.pointerId && (dr(d.currentTarget, d.pointerId), zt(), d.preventDefault(), d.stopPropagation());
|
|
814
851
|
}, kt = (d) => {
|
|
815
|
-
xe.current.pointerId === d.pointerId && (dr(d.currentTarget, d.pointerId),
|
|
816
|
-
},
|
|
817
|
-
d.target === d.currentTarget && xe.current.pointerId === d.pointerId &&
|
|
818
|
-
}, ar = ge(() =>
|
|
852
|
+
xe.current.pointerId === d.pointerId && (dr(d.currentTarget, d.pointerId), zt());
|
|
853
|
+
}, vr = (d) => {
|
|
854
|
+
d.target === d.currentTarget && xe.current.pointerId === d.pointerId && zt();
|
|
855
|
+
}, ar = ge(() => re((be ? 1 : 0.8) * ot, 0, 1), [be, ot]), Lt = ge(() => {
|
|
819
856
|
const E = `calc(50% - ${Ze / 2}px + ${Vt}px)`;
|
|
820
857
|
return {
|
|
821
858
|
left: Qe,
|
|
822
859
|
top: E
|
|
823
860
|
};
|
|
824
|
-
}, [Qe, Vt, Ze]), cr = (d, E,
|
|
861
|
+
}, [Qe, Vt, Ze]), cr = (d, E, O, ue) => /* @__PURE__ */ Z(
|
|
825
862
|
"button",
|
|
826
863
|
{
|
|
827
864
|
type: "button",
|
|
828
865
|
tabIndex: Ke ? -1 : 0,
|
|
829
866
|
className: "aqvs-scrollbar-arrow-button",
|
|
830
867
|
style: {
|
|
831
|
-
[
|
|
832
|
-
[
|
|
868
|
+
[Ae]: S,
|
|
869
|
+
[ht]: S
|
|
833
870
|
},
|
|
834
871
|
"aria-label": E,
|
|
835
872
|
onPointerDown: hr(d),
|
|
836
873
|
onPointerUp: Ft,
|
|
837
874
|
onPointerLeave: Ft,
|
|
838
875
|
onPointerCancel: Ft,
|
|
839
|
-
onKeyDown:
|
|
876
|
+
onKeyDown: Mt(d),
|
|
840
877
|
"aria-disabled": !a,
|
|
841
|
-
disabled: !
|
|
842
|
-
children: /* @__PURE__ */
|
|
878
|
+
disabled: !gt,
|
|
879
|
+
children: /* @__PURE__ */ Z("span", { "aria-hidden": "true", children: O })
|
|
843
880
|
},
|
|
844
881
|
ue
|
|
845
|
-
),
|
|
846
|
-
orientation:
|
|
882
|
+
), Xt = J && U ? {
|
|
883
|
+
orientation: mt,
|
|
847
884
|
scrollPosition: r,
|
|
848
|
-
maxScrollPosition:
|
|
885
|
+
maxScrollPosition: te,
|
|
849
886
|
contentSize: t,
|
|
850
887
|
viewportSize: e,
|
|
851
888
|
thumbSize: Y,
|
|
852
|
-
thumbPosition:
|
|
853
|
-
thumbCenter:
|
|
854
|
-
trackSize:
|
|
855
|
-
isDragging:
|
|
856
|
-
isTapScrollActive:
|
|
857
|
-
visibleStartIndex:
|
|
858
|
-
visibleEndIndex:
|
|
889
|
+
thumbPosition: Ee,
|
|
890
|
+
thumbCenter: Te,
|
|
891
|
+
trackSize: $t,
|
|
892
|
+
isDragging: R,
|
|
893
|
+
isTapScrollActive: be,
|
|
894
|
+
visibleStartIndex: ie,
|
|
895
|
+
visibleEndIndex: ze
|
|
859
896
|
} : null;
|
|
860
897
|
return /* @__PURE__ */ Zt(
|
|
861
898
|
"div",
|
|
862
899
|
{
|
|
863
|
-
className: Ot("aqvs-scrollbar",
|
|
900
|
+
className: Ot("aqvs-scrollbar", Ht, N),
|
|
864
901
|
style: {
|
|
865
902
|
// 自己計測ペインの縦バーはインライン主軸寸を書かない (ラチェット遮断 — ペイン仕様 §2.5)。
|
|
866
903
|
// 横バーは stretch が主軸を寸法決めできないため常に書く
|
|
867
|
-
...
|
|
868
|
-
[
|
|
904
|
+
...x && !f ? {} : { [Ae]: e },
|
|
905
|
+
[ht]: S
|
|
869
906
|
},
|
|
870
907
|
"data-visible": U ? "true" : "false",
|
|
871
908
|
role: "scrollbar",
|
|
872
|
-
"aria-label":
|
|
909
|
+
"aria-label": wt.bar,
|
|
873
910
|
"aria-hidden": Ke ? !0 : void 0,
|
|
874
911
|
tabIndex: Ke ? void 0 : -1,
|
|
875
912
|
onPointerDown: Ke ? qn : void 0,
|
|
876
|
-
"aria-controls":
|
|
913
|
+
"aria-controls": M,
|
|
877
914
|
"aria-valuenow": r,
|
|
878
915
|
"aria-valuemin": 0,
|
|
879
|
-
"aria-valuemax":
|
|
916
|
+
"aria-valuemax": te,
|
|
880
917
|
"aria-valuetext": le,
|
|
881
918
|
"aria-orientation": f ? "horizontal" : "vertical",
|
|
882
919
|
children: [
|
|
883
|
-
(!f ||
|
|
920
|
+
(!f || g) && U && Ve && /* @__PURE__ */ Z(
|
|
884
921
|
mn,
|
|
885
922
|
{
|
|
886
923
|
axis: f ? "x" : "y",
|
|
887
|
-
ref:
|
|
888
|
-
className: Ot("aqvs-scrollbar-tap-circle-wrapper",
|
|
924
|
+
ref: K,
|
|
925
|
+
className: Ot("aqvs-scrollbar-tap-circle-wrapper", Se),
|
|
889
926
|
size: Ze,
|
|
890
927
|
maxVisualDistance: Xe,
|
|
891
928
|
style: Lt,
|
|
892
929
|
opacity: ar,
|
|
893
|
-
renderVisual:
|
|
894
|
-
onDragChange:
|
|
930
|
+
renderVisual: A,
|
|
931
|
+
onDragChange: P
|
|
895
932
|
},
|
|
896
933
|
"tap-circle"
|
|
897
934
|
),
|
|
898
|
-
cr(-1,
|
|
935
|
+
cr(-1, wt.arrows[0], y[0], "arrow-start"),
|
|
899
936
|
/* @__PURE__ */ Zt(
|
|
900
937
|
"div",
|
|
901
938
|
{
|
|
902
939
|
className: "aqvs-scrollbar-track",
|
|
903
940
|
style: {
|
|
904
|
-
borderRadius:
|
|
941
|
+
borderRadius: S / 2
|
|
905
942
|
},
|
|
906
943
|
onPointerDown: Gt,
|
|
907
944
|
onPointerMove: or,
|
|
908
945
|
onPointerUp: Ir,
|
|
909
946
|
onPointerCancel: kt,
|
|
910
|
-
onLostPointerCapture:
|
|
947
|
+
onLostPointerCapture: vr,
|
|
911
948
|
"aria-disabled": !s,
|
|
912
949
|
children: [
|
|
913
|
-
|
|
914
|
-
/* @__PURE__ */
|
|
950
|
+
Xt && /* @__PURE__ */ Z("div", { className: "aqvs-scrollbar-overlay", "aria-hidden": !0, children: J?.(Xt) }, "overlay"),
|
|
951
|
+
/* @__PURE__ */ Z(
|
|
915
952
|
"div",
|
|
916
953
|
{
|
|
917
954
|
ref: at,
|
|
918
955
|
className: "aqvs-scrollbar-thumb-wrapper",
|
|
919
956
|
style: {
|
|
920
|
-
[
|
|
957
|
+
[Ae]: Y,
|
|
921
958
|
top: 0,
|
|
922
959
|
left: 0,
|
|
923
960
|
...f ? { bottom: 0 } : { right: 0 },
|
|
924
961
|
transform: `${H}(${Be}px)`
|
|
925
962
|
},
|
|
926
|
-
"data-visible": U ||
|
|
927
|
-
onPointerDown:
|
|
963
|
+
"data-visible": U || R ? "true" : "false",
|
|
964
|
+
onPointerDown: Dt,
|
|
928
965
|
role: "slider",
|
|
929
|
-
"aria-label":
|
|
966
|
+
"aria-label": wt.thumb,
|
|
930
967
|
"aria-orientation": f ? "horizontal" : "vertical",
|
|
931
968
|
"aria-valuenow": r,
|
|
932
969
|
"aria-valuemin": 0,
|
|
933
|
-
"aria-valuemax":
|
|
970
|
+
"aria-valuemax": te,
|
|
934
971
|
"aria-valuetext": le,
|
|
935
972
|
"aria-disabled": !i,
|
|
936
973
|
tabIndex: Ke ? void 0 : -1,
|
|
937
|
-
children: /* @__PURE__ */
|
|
974
|
+
children: /* @__PURE__ */ Z(
|
|
938
975
|
"div",
|
|
939
976
|
{
|
|
940
|
-
ref:
|
|
977
|
+
ref: oe,
|
|
941
978
|
className: Ot("aqvs-scrollbar-thumb", f ? "aqvs-scrollbar-thumb-horizontal" : "aqvs-scrollbar-thumb-vertical"),
|
|
942
979
|
"data-testid": "aqvs-scrollbar-thumb",
|
|
943
|
-
"data-thumb-state":
|
|
980
|
+
"data-thumb-state": ve,
|
|
944
981
|
style: {
|
|
945
|
-
borderRadius:
|
|
982
|
+
borderRadius: S - 1,
|
|
946
983
|
cursor: i ? "pointer" : "default"
|
|
947
984
|
},
|
|
948
985
|
onMouseEnter: () => {
|
|
949
|
-
i &&
|
|
986
|
+
i && k(!0);
|
|
950
987
|
},
|
|
951
988
|
onMouseLeave: () => {
|
|
952
|
-
i &&
|
|
989
|
+
i && k(!1);
|
|
953
990
|
}
|
|
954
991
|
},
|
|
955
992
|
"thumb"
|
|
@@ -961,7 +998,7 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
961
998
|
},
|
|
962
999
|
"track"
|
|
963
1000
|
),
|
|
964
|
-
cr(1,
|
|
1001
|
+
cr(1, wt.arrows[1], y[1], "arrow-end")
|
|
965
1002
|
]
|
|
966
1003
|
}
|
|
967
1004
|
);
|
|
@@ -977,7 +1014,7 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
977
1014
|
maxSpeedMultiplier: n.maxSpeedMultiplier,
|
|
978
1015
|
hasCustomMaxSpeedMultiplier: n.hasCustomMaxSpeedMultiplier,
|
|
979
1016
|
curve: n.curve
|
|
980
|
-
}),
|
|
1017
|
+
}), g = fn({
|
|
981
1018
|
distance: l,
|
|
982
1019
|
maxDistance: r,
|
|
983
1020
|
viewportSize: i.viewportSize,
|
|
@@ -986,13 +1023,19 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
986
1023
|
hasCustomMaxSpeedMultiplier: i.hasCustomMaxSpeedMultiplier,
|
|
987
1024
|
curve: i.curve
|
|
988
1025
|
});
|
|
989
|
-
return { x: f * s / l, y:
|
|
1026
|
+
return { x: f * s / l, y: g * a / l };
|
|
990
1027
|
}, ls = (t) => {
|
|
991
1028
|
const { quantum: e, resetOnDirectionChange: r = !0 } = t;
|
|
992
1029
|
if (!(Number.isFinite(e) && e > 0))
|
|
993
1030
|
throw new TypeError(`[createResidualQuantizer] quantum must be a finite positive number, received ${e}`);
|
|
994
1031
|
let n = 0;
|
|
995
1032
|
return {
|
|
1033
|
+
/**
|
|
1034
|
+
* Adds a delta to the residue and emits the whole quanta it holds (a non-finite delta, or one beyond
|
|
1035
|
+
* `Number.MAX_SAFE_INTEGER`, emits 0 and leaves the residue as it is).
|
|
1036
|
+
* 差分を残差へ足し、残差が持つ量子の整数倍を放出する処理 (非有限の差分と `Number.MAX_SAFE_INTEGER` を越える差分は 0 を放出し、
|
|
1037
|
+
* 残差を変えない)。
|
|
1038
|
+
*/
|
|
996
1039
|
push: (i) => {
|
|
997
1040
|
if (!Number.isFinite(i) || Math.abs(i) > Number.MAX_SAFE_INTEGER)
|
|
998
1041
|
return 0;
|
|
@@ -1000,7 +1043,15 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
1000
1043
|
const s = Math.trunc(n / e) * e + 0;
|
|
1001
1044
|
return n -= s, s;
|
|
1002
1045
|
},
|
|
1046
|
+
/**
|
|
1047
|
+
* Reads the residue not yet emitted.
|
|
1048
|
+
* まだ放出していない残差を読む処理。
|
|
1049
|
+
*/
|
|
1003
1050
|
peekResidue: () => n,
|
|
1051
|
+
/**
|
|
1052
|
+
* Drops the residue.
|
|
1053
|
+
* 残差を捨てる処理。
|
|
1054
|
+
*/
|
|
1004
1055
|
reset: () => {
|
|
1005
1056
|
n = 0;
|
|
1006
1057
|
}
|
|
@@ -1019,7 +1070,7 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
1019
1070
|
};
|
|
1020
1071
|
}, Gn = /* @__PURE__ */ new WeakSet(), Mn = (t) => {
|
|
1021
1072
|
Gn.add(t);
|
|
1022
|
-
}, Ai = (t) => Gn.has(t),
|
|
1073
|
+
}, Ai = (t) => Gn.has(t), Di = ["mouse", "pen", "touch"], sn = (t, e) => !(t === "mouse" || t === "pen" || t === "touch") || e.includes(t), zi = (t) => t === "mouse" || t === "pen", Dr = {
|
|
1023
1074
|
maxVelocity: 6,
|
|
1024
1075
|
minVelocity: 0.02,
|
|
1025
1076
|
deceleration: 25e-4,
|
|
@@ -1039,36 +1090,36 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
1039
1090
|
enableTrackClick: a = !0,
|
|
1040
1091
|
enableArrowButtons: l = !0,
|
|
1041
1092
|
enableArrowButtonTabStops: f = !0,
|
|
1042
|
-
enablePointerDrag:
|
|
1043
|
-
pointerDragInputs:
|
|
1044
|
-
onScroll:
|
|
1093
|
+
enablePointerDrag: g = !0,
|
|
1094
|
+
pointerDragInputs: x = Di,
|
|
1095
|
+
onScroll: S,
|
|
1045
1096
|
className: N,
|
|
1046
|
-
testId:
|
|
1047
|
-
style:
|
|
1048
|
-
background:
|
|
1049
|
-
tapScrollCircleOptions:
|
|
1050
|
-
inertiaOptions:
|
|
1051
|
-
itemCount:
|
|
1052
|
-
renderThumbOverlay:
|
|
1053
|
-
wheelSpeedMultiplier:
|
|
1054
|
-
overscrollBehavior:
|
|
1055
|
-
onWheelHorizontal:
|
|
1056
|
-
onPanHorizontal:
|
|
1057
|
-
contentInsets:
|
|
1058
|
-
visibleStartIndex:
|
|
1059
|
-
visibleEndIndex:
|
|
1060
|
-
renderOverlay:
|
|
1061
|
-
initialScrollPosition:
|
|
1097
|
+
testId: M,
|
|
1098
|
+
style: _,
|
|
1099
|
+
background: F,
|
|
1100
|
+
tapScrollCircleOptions: J,
|
|
1101
|
+
inertiaOptions: ie,
|
|
1102
|
+
itemCount: ze,
|
|
1103
|
+
renderThumbOverlay: $,
|
|
1104
|
+
wheelSpeedMultiplier: I = 1,
|
|
1105
|
+
overscrollBehavior: R = "auto",
|
|
1106
|
+
onWheelHorizontal: X,
|
|
1107
|
+
onPanHorizontal: B,
|
|
1108
|
+
contentInsets: k,
|
|
1109
|
+
visibleStartIndex: be,
|
|
1110
|
+
visibleEndIndex: se,
|
|
1111
|
+
renderOverlay: oe,
|
|
1112
|
+
initialScrollPosition: pe = 0,
|
|
1062
1113
|
contentProps: xe,
|
|
1063
|
-
locale:
|
|
1064
|
-
labels:
|
|
1114
|
+
locale: ke,
|
|
1115
|
+
labels: je
|
|
1065
1116
|
}, C) => {
|
|
1066
|
-
const
|
|
1067
|
-
!
|
|
1117
|
+
const K = u(Number.isFinite(pe) ? Math.max(0, pe) : 0), ee = u(null), He = u(null), ce = r === void 0, [Pe, Rt] = Ce(0), ne = r ?? Pe, st = u(null), wt = u(e), we = u(!1), Ke = p(() => {
|
|
1118
|
+
!we.current || wt.current <= 0 || st.current === "zero" || (st.current = "zero", L.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."));
|
|
1068
1119
|
}, []);
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
}, [e, Ke]),
|
|
1120
|
+
We(() => {
|
|
1121
|
+
wt.current = e, Ke();
|
|
1122
|
+
}, [e, Ke]), We(() => {
|
|
1072
1123
|
if (!ce)
|
|
1073
1124
|
return;
|
|
1074
1125
|
const v = He.current;
|
|
@@ -1077,48 +1128,48 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
1077
1128
|
const Y = () => {
|
|
1078
1129
|
const le = v.offsetHeight;
|
|
1079
1130
|
if (le > 0) {
|
|
1080
|
-
|
|
1131
|
+
we.current = !1, Rt((ae) => ae === le ? ae : le);
|
|
1081
1132
|
return;
|
|
1082
1133
|
}
|
|
1083
|
-
|
|
1134
|
+
we.current = v.offsetParent !== null, Ke();
|
|
1084
1135
|
};
|
|
1085
1136
|
Y();
|
|
1086
|
-
const
|
|
1087
|
-
return
|
|
1088
|
-
|
|
1137
|
+
const te = typeof ResizeObserver == "function" ? new ResizeObserver(Y) : null;
|
|
1138
|
+
return te?.observe(v), () => {
|
|
1139
|
+
te?.disconnect(), we.current = !1;
|
|
1089
1140
|
};
|
|
1090
|
-
}, [ce, Ke]),
|
|
1141
|
+
}, [ce, Ke]), We(() => {
|
|
1091
1142
|
ce && n?.(Pe);
|
|
1092
|
-
}, [ce, Pe, n]),
|
|
1143
|
+
}, [ce, Pe, n]), We(() => {
|
|
1093
1144
|
if (ce)
|
|
1094
1145
|
return;
|
|
1095
|
-
const v =
|
|
1146
|
+
const v = ee.current;
|
|
1096
1147
|
if (!v)
|
|
1097
1148
|
return;
|
|
1098
1149
|
const Y = () => {
|
|
1099
1150
|
const le = v.clientHeight;
|
|
1100
|
-
if (le <= 0 || Math.abs(le -
|
|
1151
|
+
if (le <= 0 || Math.abs(le - ne) <= 1)
|
|
1101
1152
|
return;
|
|
1102
|
-
const
|
|
1103
|
-
st.current !==
|
|
1104
|
-
`[ScrollPane] viewportSize=${
|
|
1153
|
+
const ae = `${ne}/${le}`;
|
|
1154
|
+
st.current !== ae && (st.current = ae, L.warn(
|
|
1155
|
+
`[ScrollPane] viewportSize=${ne} but the host band is ${le}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.`
|
|
1105
1156
|
));
|
|
1106
1157
|
};
|
|
1107
1158
|
if (Y(), typeof ResizeObserver != "function")
|
|
1108
1159
|
return;
|
|
1109
|
-
const
|
|
1110
|
-
return
|
|
1111
|
-
|
|
1160
|
+
const te = new ResizeObserver(Y);
|
|
1161
|
+
return te.observe(v), () => {
|
|
1162
|
+
te.disconnect();
|
|
1112
1163
|
};
|
|
1113
|
-
}, [ce,
|
|
1114
|
-
const
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
}, [
|
|
1118
|
-
const Ze = u(
|
|
1119
|
-
|
|
1120
|
-
Ze.current =
|
|
1121
|
-
}, [
|
|
1164
|
+
}, [ce, ne]);
|
|
1165
|
+
const Ve = u(X);
|
|
1166
|
+
W(() => {
|
|
1167
|
+
Ve.current = X;
|
|
1168
|
+
}, [X]);
|
|
1169
|
+
const Ze = u(B);
|
|
1170
|
+
W(() => {
|
|
1171
|
+
Ze.current = B;
|
|
1172
|
+
}, [B]);
|
|
1122
1173
|
const Qe = u({
|
|
1123
1174
|
frame: null,
|
|
1124
1175
|
velocity: 0,
|
|
@@ -1126,161 +1177,177 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
1126
1177
|
generation: 0
|
|
1127
1178
|
}), Vt = ge(
|
|
1128
1179
|
() => ({
|
|
1129
|
-
maxVelocity:
|
|
1130
|
-
minVelocity:
|
|
1131
|
-
deceleration:
|
|
1132
|
-
velocitySampleWindow:
|
|
1133
|
-
startVelocityThreshold:
|
|
1180
|
+
maxVelocity: ie?.maxVelocity ?? Dr.maxVelocity,
|
|
1181
|
+
minVelocity: ie?.minVelocity ?? Dr.minVelocity,
|
|
1182
|
+
deceleration: ie?.deceleration ?? Dr.deceleration,
|
|
1183
|
+
velocitySampleWindow: ie?.velocitySampleWindow ?? Dr.velocitySampleWindow,
|
|
1184
|
+
startVelocityThreshold: ie?.startVelocityThreshold ?? Dr.startVelocityThreshold
|
|
1134
1185
|
}),
|
|
1135
|
-
[
|
|
1136
|
-
),
|
|
1137
|
-
top: Math.max(0,
|
|
1138
|
-
bottom: Math.max(0,
|
|
1139
|
-
}), [
|
|
1140
|
-
|
|
1186
|
+
[ie]
|
|
1187
|
+
), Se = ge(() => ({
|
|
1188
|
+
top: Math.max(0, k?.top ?? 0),
|
|
1189
|
+
bottom: Math.max(0, k?.bottom ?? 0)
|
|
1190
|
+
}), [k]);
|
|
1191
|
+
L.debug("[ScrollPane] ScrollPane rendered", () => ({
|
|
1141
1192
|
contentSize: e,
|
|
1142
|
-
viewportSize:
|
|
1193
|
+
viewportSize: ne,
|
|
1143
1194
|
scrollBarWidth: i,
|
|
1144
1195
|
className: N,
|
|
1145
|
-
style:
|
|
1146
|
-
tapScrollCircleOptions:
|
|
1147
|
-
inertiaOptions:
|
|
1148
|
-
enablePointerDrag:
|
|
1149
|
-
contentInsets:
|
|
1196
|
+
style: _,
|
|
1197
|
+
tapScrollCircleOptions: J,
|
|
1198
|
+
inertiaOptions: ie,
|
|
1199
|
+
enablePointerDrag: g,
|
|
1200
|
+
contentInsets: Se
|
|
1150
1201
|
}));
|
|
1151
|
-
const yt = u({ contentSize: e, viewportSize:
|
|
1202
|
+
const yt = u({ contentSize: e, viewportSize: ne }), $e = ge(() => e > ne, [e, ne]), D = p(
|
|
1152
1203
|
(v, Y) => {
|
|
1153
|
-
let
|
|
1154
|
-
Y && !(Number.isFinite(Y.contentSize) && Number.isFinite(Y.viewportSize)) && (
|
|
1155
|
-
const { contentSize: le, viewportSize:
|
|
1156
|
-
if (
|
|
1157
|
-
return
|
|
1158
|
-
const
|
|
1159
|
-
if (!Number.isFinite(
|
|
1160
|
-
return
|
|
1161
|
-
const at = Math.max(le -
|
|
1162
|
-
return
|
|
1204
|
+
let te = Y ?? yt.current;
|
|
1205
|
+
Y && !(Number.isFinite(Y.contentSize) && Number.isFinite(Y.viewportSize)) && (L.warn("[ScrollPane] scrollTo received non-finite dimsOverride; falling back to the committed dims", { dimsOverride: Y }), te = yt.current);
|
|
1206
|
+
const { contentSize: le, viewportSize: ae } = te, Ee = le > ae, Te = K.current;
|
|
1207
|
+
if (L.debug("[ScrollPane] scrollTo called", () => ({ newPosition: v, contentSize: le, viewportSize: ae, currentIsScrollable: Ee, prevPosition: Te })), !Ee)
|
|
1208
|
+
return K.current !== 0 && (K.current = 0, S?.(0, Te)), K.current;
|
|
1209
|
+
const Me = typeof v == "function" ? v(K.current) : v;
|
|
1210
|
+
if (!Number.isFinite(Me))
|
|
1211
|
+
return L.warn("[ScrollPane] scrollTo received a non-finite position; keeping the current position", { nextPosition: Me }), K.current;
|
|
1212
|
+
const at = Math.max(le - ae, 0), Be = re(Me, 0, at);
|
|
1213
|
+
return K.current !== Be && (K.current = Be, S?.(Be, Te)), K.current;
|
|
1163
1214
|
},
|
|
1164
|
-
[
|
|
1215
|
+
[S]
|
|
1165
1216
|
), ot = u(D);
|
|
1166
|
-
|
|
1217
|
+
W(() => {
|
|
1167
1218
|
ot.current = D;
|
|
1168
1219
|
}, [D]);
|
|
1169
|
-
const
|
|
1220
|
+
const A = p(() => {
|
|
1170
1221
|
const v = Qe.current;
|
|
1171
1222
|
v.generation += 1, v.frame !== null && cancelAnimationFrame(v.frame), v.frame = null, v.velocity = 0, v.lastTimestamp = null;
|
|
1172
|
-
}, []),
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
}, [
|
|
1176
|
-
|
|
1223
|
+
}, []), ft = u(A);
|
|
1224
|
+
W(() => {
|
|
1225
|
+
ft.current = A;
|
|
1226
|
+
}, [A]), W(() => () => {
|
|
1227
|
+
ft.current();
|
|
1177
1228
|
}, []);
|
|
1178
|
-
const
|
|
1229
|
+
const z = p(
|
|
1179
1230
|
(v) => {
|
|
1180
1231
|
if (!$e)
|
|
1181
1232
|
return;
|
|
1182
|
-
const { maxVelocity: Y, minVelocity:
|
|
1183
|
-
if (Math.abs(
|
|
1233
|
+
const { maxVelocity: Y, minVelocity: te, deceleration: le, startVelocityThreshold: ae } = Vt, Ee = re(v, -Y, Y);
|
|
1234
|
+
if (Math.abs(Ee) < ae)
|
|
1184
1235
|
return;
|
|
1185
|
-
|
|
1186
|
-
const
|
|
1236
|
+
A(), Qe.current.velocity = Ee, Qe.current.lastTimestamp = null;
|
|
1237
|
+
const Te = Qe.current.generation, Me = (at) => {
|
|
1187
1238
|
const Be = Qe.current;
|
|
1188
|
-
if (Be.generation !==
|
|
1239
|
+
if (Be.generation !== Te)
|
|
1189
1240
|
return;
|
|
1190
1241
|
if (Be.lastTimestamp === null) {
|
|
1191
|
-
Be.lastTimestamp = at, Be.frame = requestAnimationFrame(
|
|
1242
|
+
Be.lastTimestamp = at, Be.frame = requestAnimationFrame(Me);
|
|
1192
1243
|
return;
|
|
1193
1244
|
}
|
|
1194
1245
|
const U = at - Be.lastTimestamp;
|
|
1195
1246
|
if (Be.lastTimestamp = at, U <= 0) {
|
|
1196
|
-
Be.frame = requestAnimationFrame(
|
|
1247
|
+
Be.frame = requestAnimationFrame(Me);
|
|
1197
1248
|
return;
|
|
1198
1249
|
}
|
|
1199
|
-
const
|
|
1200
|
-
let
|
|
1201
|
-
const
|
|
1202
|
-
|
|
1203
|
-
const Et = (
|
|
1204
|
-
if (Et !== 0 && ot.current((
|
|
1250
|
+
const gt = Be.velocity;
|
|
1251
|
+
let ve = gt;
|
|
1252
|
+
const Re = le * U;
|
|
1253
|
+
gt > 0 ? ve = Math.max(0, gt - Re) : gt < 0 && (ve = Math.min(0, gt + Re));
|
|
1254
|
+
const Et = (gt + ve) / 2 * U, Ue = K.current;
|
|
1255
|
+
if (Et !== 0 && ot.current((ye) => ye + Et), Qe.current.generation !== Te)
|
|
1205
1256
|
return;
|
|
1206
|
-
const qe =
|
|
1207
|
-
Be.velocity =
|
|
1208
|
-
const Ye = qe ===
|
|
1209
|
-
if (Math.abs(
|
|
1210
|
-
|
|
1257
|
+
const qe = K.current, { contentSize: Je, viewportSize: w } = yt.current, P = Math.max(Je - w, 0);
|
|
1258
|
+
Be.velocity = ve;
|
|
1259
|
+
const Ye = qe === Ue || qe <= 0 && ve <= 0 || qe >= P && ve >= 0;
|
|
1260
|
+
if (Math.abs(ve) < te || Ye) {
|
|
1261
|
+
A();
|
|
1211
1262
|
return;
|
|
1212
1263
|
}
|
|
1213
|
-
Be.frame = requestAnimationFrame(
|
|
1264
|
+
Be.frame = requestAnimationFrame(Me);
|
|
1214
1265
|
};
|
|
1215
|
-
Qe.current.frame = requestAnimationFrame(
|
|
1266
|
+
Qe.current.frame = requestAnimationFrame(Me);
|
|
1216
1267
|
},
|
|
1217
|
-
[$e, Vt,
|
|
1218
|
-
),
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
}, [
|
|
1222
|
-
yt.current = { contentSize: e, viewportSize:
|
|
1223
|
-
}, [e,
|
|
1268
|
+
[$e, Vt, A]
|
|
1269
|
+
), Ae = u(z);
|
|
1270
|
+
W(() => {
|
|
1271
|
+
Ae.current = z;
|
|
1272
|
+
}, [z]), We(() => {
|
|
1273
|
+
yt.current = { contentSize: e, viewportSize: ne };
|
|
1274
|
+
}, [e, ne]), We(() => {
|
|
1224
1275
|
const v = He.current;
|
|
1225
1276
|
if (!v) return;
|
|
1226
1277
|
const Y = () => {
|
|
1227
|
-
v.scrollTop !== 0 && (
|
|
1278
|
+
v.scrollTop !== 0 && (L.debug("[ScrollPane] Native scroll detected, resetting to 0", () => ({ scrollTop: v.scrollTop })), v.scrollTop = 0), v.scrollLeft !== 0 && (v.scrollLeft = 0);
|
|
1228
1279
|
};
|
|
1229
1280
|
return v.addEventListener("scroll", Y), () => v.removeEventListener("scroll", Y);
|
|
1230
|
-
}, []),
|
|
1281
|
+
}, []), We(() => {
|
|
1231
1282
|
if ($e) {
|
|
1232
|
-
|
|
1233
|
-
const v =
|
|
1234
|
-
|
|
1283
|
+
L.debug("[ScrollPane] Adjusting scroll position due to content or viewport size change", () => ({ contentSize: e, viewportSize: ne, scrollPosition: K.current }));
|
|
1284
|
+
const v = re(e - ne, 0, e);
|
|
1285
|
+
K.current > v && D(v);
|
|
1235
1286
|
} else
|
|
1236
1287
|
D(0);
|
|
1237
|
-
}, [$e, D, e,
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
}, [$e,
|
|
1288
|
+
}, [$e, D, e, ne]);
|
|
1289
|
+
const ht = u({ isScrollable: $e, viewportSize: ne, wheelSpeedMultiplier: I, overscrollBehavior: R });
|
|
1290
|
+
We(() => {
|
|
1291
|
+
ht.current = { isScrollable: $e, viewportSize: ne, wheelSpeedMultiplier: I, overscrollBehavior: R };
|
|
1292
|
+
}, [$e, ne, I, R]);
|
|
1242
1293
|
const H = p(
|
|
1243
1294
|
(v) => {
|
|
1244
1295
|
if (Ai(v))
|
|
1245
1296
|
return !1;
|
|
1246
|
-
const { isScrollable: Y, viewportSize:
|
|
1247
|
-
if (
|
|
1297
|
+
const { isScrollable: Y, viewportSize: te, wheelSpeedMultiplier: le, overscrollBehavior: ae } = ht.current, Ee = Vi(v, te);
|
|
1298
|
+
if (Ee.isZoomGesture)
|
|
1248
1299
|
return !1;
|
|
1249
|
-
if (
|
|
1250
|
-
return
|
|
1251
|
-
if (!Y ||
|
|
1300
|
+
if (Ee.isHorizontalDominant)
|
|
1301
|
+
return Ve.current ? (Mn(v), v.preventDefault(), A(), Ve.current(Ee.horizontalDelta), !0) : !1;
|
|
1302
|
+
if (!Y || Ee.verticalDelta === 0)
|
|
1252
1303
|
return !1;
|
|
1253
|
-
let
|
|
1254
|
-
if (le !== 1 && (
|
|
1255
|
-
const
|
|
1256
|
-
if (
|
|
1304
|
+
let Te = Ee.verticalDelta;
|
|
1305
|
+
if (le !== 1 && (Te *= le), ae !== "contain") {
|
|
1306
|
+
const Me = K.current, at = Math.max(yt.current.contentSize - te, 0);
|
|
1307
|
+
if (Te > 0 && Me >= at || Te < 0 && Me <= 0)
|
|
1257
1308
|
return !1;
|
|
1258
1309
|
}
|
|
1259
|
-
return Mn(v), v.preventDefault(),
|
|
1310
|
+
return Mn(v), v.preventDefault(), A(), L.debug("[ScrollPane] wheel event", () => ({ deltaY: Te, scrollPosition: K.current, wheelSpeedMultiplier: le, deltaMode: v.deltaMode, scrollTop: He.current?.scrollTop })), D((Me) => Me + Te), !0;
|
|
1260
1311
|
},
|
|
1261
|
-
[D,
|
|
1312
|
+
[D, A]
|
|
1262
1313
|
);
|
|
1263
|
-
|
|
1314
|
+
W(() => {
|
|
1264
1315
|
const v = (le) => {
|
|
1265
1316
|
H(le);
|
|
1266
1317
|
}, Y = () => {
|
|
1267
|
-
|
|
1268
|
-
},
|
|
1269
|
-
return
|
|
1270
|
-
|
|
1318
|
+
A();
|
|
1319
|
+
}, te = ee.current;
|
|
1320
|
+
return te && (te.addEventListener("wheel", v, { passive: !1 }), te.addEventListener("pointerdown", Y, { capture: !0, passive: !0 })), () => {
|
|
1321
|
+
te && (te.removeEventListener("wheel", v), te.removeEventListener("pointerdown", Y, { capture: !0 }));
|
|
1271
1322
|
};
|
|
1272
|
-
}, [H,
|
|
1323
|
+
}, [H, A]), Jr(
|
|
1273
1324
|
C,
|
|
1274
1325
|
() => ({
|
|
1275
|
-
|
|
1276
|
-
|
|
1326
|
+
/**
|
|
1327
|
+
* Stops any inertia, then jumps to a pane position (clamped); returns the applied position.
|
|
1328
|
+
* 慣性を止めてからペインの位置へ跳ぶ (クランプする) 処理。当てた位置を返す。
|
|
1329
|
+
*/
|
|
1330
|
+
scrollTo: (v, Y) => (A(), D(v, Y)),
|
|
1331
|
+
/**
|
|
1332
|
+
* Reads the pane position (synchronously fresh, from the position ref).
|
|
1333
|
+
* ペインの位置を読む処理 (位置の ref から読むので同期で最新)。
|
|
1334
|
+
*/
|
|
1335
|
+
getScrollPosition: () => K.current,
|
|
1336
|
+
/**
|
|
1337
|
+
* Reads the content size the pane was given.
|
|
1338
|
+
* ペインが受け取った中身の寸法を読む処理。
|
|
1339
|
+
*/
|
|
1277
1340
|
getContentSize: () => e,
|
|
1278
|
-
|
|
1341
|
+
/**
|
|
1342
|
+
* Reads the viewport size the pane uses (given or measured).
|
|
1343
|
+
* ペインが使う表示域の寸法 (与えられたか測ったもの) を読む処理。
|
|
1344
|
+
*/
|
|
1345
|
+
getViewportSize: () => ne,
|
|
1279
1346
|
applyWheel: H
|
|
1280
1347
|
}),
|
|
1281
|
-
[D, e,
|
|
1348
|
+
[D, e, ne, A, H]
|
|
1282
1349
|
);
|
|
1283
|
-
const
|
|
1350
|
+
const pt = ri(), At = xe?.id ?? pt, y = u({
|
|
1284
1351
|
pointerType: "",
|
|
1285
1352
|
pointerId: null,
|
|
1286
1353
|
startClientY: 0,
|
|
@@ -1293,141 +1360,141 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
1293
1360
|
velocitySamples: [],
|
|
1294
1361
|
scale: 1,
|
|
1295
1362
|
scaleX: 1
|
|
1296
|
-
}),
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
}, [
|
|
1300
|
-
|
|
1301
|
-
}, [
|
|
1363
|
+
}), Ht = u(g), mt = u(x);
|
|
1364
|
+
W(() => {
|
|
1365
|
+
Ht.current = g;
|
|
1366
|
+
}, [g]), W(() => {
|
|
1367
|
+
mt.current = x;
|
|
1368
|
+
}, [x]);
|
|
1302
1369
|
const Xe = u($e);
|
|
1303
|
-
|
|
1370
|
+
W(() => {
|
|
1304
1371
|
Xe.current = $e;
|
|
1305
1372
|
}, [$e]);
|
|
1306
|
-
const
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
}, [Vt]),
|
|
1373
|
+
const St = u(Vt);
|
|
1374
|
+
W(() => {
|
|
1375
|
+
St.current = Vt;
|
|
1376
|
+
}, [Vt]), W(() => {
|
|
1310
1377
|
const v = y.current;
|
|
1311
|
-
if (
|
|
1378
|
+
if (g && $e && (v.pointerId === null || sn(v.pointerType, x)) || v.pointerId === null)
|
|
1312
1379
|
return;
|
|
1313
1380
|
const Y = He.current;
|
|
1314
1381
|
v.clickResetTimer !== null && (window.clearTimeout(v.clickResetTimer), v.clickResetTimer = null);
|
|
1315
|
-
const
|
|
1316
|
-
v.pointerId = null, v.pointerType = "", v.startClientY = 0, v.startScroll = 0, v.isDragging = !1, v.shouldCancelNextClick =
|
|
1317
|
-
}, [
|
|
1382
|
+
const te = v.isDragging && v.shouldCancelNextClick, le = v.pointerId;
|
|
1383
|
+
v.pointerId = null, v.pointerType = "", v.startClientY = 0, v.startScroll = 0, v.isDragging = !1, v.shouldCancelNextClick = te, v.velocitySamples = [], v.scale = 1, Y !== null && dr(Y, le);
|
|
1384
|
+
}, [g, x, $e]), W(() => {
|
|
1318
1385
|
const v = He.current;
|
|
1319
1386
|
if (!v)
|
|
1320
1387
|
return;
|
|
1321
|
-
const Y = 6,
|
|
1388
|
+
const Y = 6, te = () => typeof performance < "u" && typeof performance.now == "function" ? performance.now() : Date.now(), le = () => {
|
|
1322
1389
|
const w = y.current;
|
|
1323
1390
|
w.pointerId = null, w.pointerType = "", w.startClientY = 0, w.startScroll = 0, w.isDragging = !1, w.velocitySamples = [], w.scale = 1;
|
|
1324
|
-
},
|
|
1391
|
+
}, ae = () => {
|
|
1325
1392
|
const w = y.current;
|
|
1326
1393
|
w.clickResetTimer !== null && (window.clearTimeout(w.clickResetTimer), w.clickResetTimer = null);
|
|
1327
|
-
},
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1332
|
-
},
|
|
1333
|
-
const
|
|
1334
|
-
|
|
1394
|
+
}, Ee = (w) => {
|
|
1395
|
+
const P = y.current, Ye = te();
|
|
1396
|
+
P.velocitySamples.push({ clientY: w, time: Ye });
|
|
1397
|
+
const ye = St.current.velocitySampleWindow;
|
|
1398
|
+
P.velocitySamples = P.velocitySamples.filter((Ge) => Ye - Ge.time <= ye);
|
|
1399
|
+
}, Te = (w) => w instanceof HTMLElement && w.closest("[data-scrollpane-ignore-drag='true']") !== null, Me = (w) => {
|
|
1400
|
+
const P = y.current;
|
|
1401
|
+
P.shouldCancelNextClick && (w.preventDefault(), w.stopPropagation(), P.shouldCancelNextClick = !1);
|
|
1335
1402
|
}, at = (w) => {
|
|
1336
|
-
const
|
|
1337
|
-
|
|
1403
|
+
const P = y.current;
|
|
1404
|
+
P.isDragging || (P.isDragging = !0, P.shouldCancelNextClick = !0, Bn(v, w.pointerId) || _r(v, w.pointerId), Ee(w.clientY));
|
|
1338
1405
|
}, Be = (w) => w.isTrusted || w.target === v, U = (w) => {
|
|
1339
|
-
const
|
|
1340
|
-
dr(v, w),
|
|
1341
|
-
},
|
|
1342
|
-
const
|
|
1343
|
-
if (
|
|
1406
|
+
const P = y.current;
|
|
1407
|
+
dr(v, w), P.shouldCancelNextClick = !1, ae(), le();
|
|
1408
|
+
}, gt = (w) => {
|
|
1409
|
+
const P = y.current;
|
|
1410
|
+
if (P.pointerId !== w.pointerId)
|
|
1344
1411
|
return;
|
|
1345
|
-
if (w.buttons === 0 &&
|
|
1412
|
+
if (w.buttons === 0 && zi(w.pointerType)) {
|
|
1346
1413
|
U(w.pointerId);
|
|
1347
1414
|
return;
|
|
1348
1415
|
}
|
|
1349
|
-
if (!(
|
|
1416
|
+
if (!(Ht.current && Xe.current) || !sn(w.pointerType, mt.current))
|
|
1350
1417
|
return;
|
|
1351
|
-
if (!
|
|
1352
|
-
const et = Math.abs(w.clientY -
|
|
1353
|
-
if (Math.max(et,
|
|
1418
|
+
if (!P.isDragging) {
|
|
1419
|
+
const et = Math.abs(w.clientY - P.startClientY), _e = Ze.current ? Math.abs(w.clientX - P.startClientX) : 0;
|
|
1420
|
+
if (Math.max(et, _e) < Y || (at(w), !P.isDragging))
|
|
1354
1421
|
return;
|
|
1355
1422
|
}
|
|
1356
|
-
|
|
1357
|
-
const Ye = (w.clientY -
|
|
1358
|
-
ot.current(
|
|
1359
|
-
const
|
|
1360
|
-
if (
|
|
1361
|
-
const et = w.clientX -
|
|
1362
|
-
|
|
1423
|
+
Ee(w.clientY);
|
|
1424
|
+
const Ye = (w.clientY - P.startClientY) / (P.scale || 1), ye = P.startScroll - Ye;
|
|
1425
|
+
ot.current(ye);
|
|
1426
|
+
const Ge = Ze.current;
|
|
1427
|
+
if (Ge) {
|
|
1428
|
+
const et = w.clientX - P.lastPanClientX;
|
|
1429
|
+
P.lastPanClientX = w.clientX, et !== 0 && Ge(-et / (P.scaleX || 1));
|
|
1363
1430
|
}
|
|
1364
1431
|
w.cancelable && w.preventDefault();
|
|
1365
|
-
},
|
|
1432
|
+
}, ve = () => {
|
|
1366
1433
|
const w = y.current;
|
|
1367
|
-
return w.pointerId !== null || !w.shouldCancelNextClick ? !1 : (
|
|
1368
|
-
const
|
|
1369
|
-
|
|
1434
|
+
return w.pointerId !== null || !w.shouldCancelNextClick ? !1 : (ae(), w.clickResetTimer = window.setTimeout(() => {
|
|
1435
|
+
const P = y.current;
|
|
1436
|
+
P.shouldCancelNextClick = !1, P.clickResetTimer = null;
|
|
1370
1437
|
}, 0), !0);
|
|
1371
|
-
},
|
|
1372
|
-
const
|
|
1373
|
-
if (
|
|
1374
|
-
|
|
1438
|
+
}, Re = (w) => {
|
|
1439
|
+
const P = y.current;
|
|
1440
|
+
if (P.pointerId !== w.pointerId) {
|
|
1441
|
+
ve();
|
|
1375
1442
|
return;
|
|
1376
1443
|
}
|
|
1377
|
-
|
|
1444
|
+
P.isDragging && P.shouldCancelNextClick && w.cancelable && (w.preventDefault(), w.stopPropagation()), P.isDragging && Ee(w.clientY);
|
|
1378
1445
|
let Ye = 0;
|
|
1379
|
-
if (
|
|
1380
|
-
const
|
|
1381
|
-
if (
|
|
1382
|
-
const
|
|
1383
|
-
Ye = -(
|
|
1446
|
+
if (P.isDragging && P.velocitySamples.length >= 2) {
|
|
1447
|
+
const Ge = P.velocitySamples, et = St.current.velocitySampleWindow, _e = Ge[Ge.length - 1], me = Ge.find((bt) => _e.time - bt.time <= et) ?? Ge[0];
|
|
1448
|
+
if (_e && me && _e.time !== me.time) {
|
|
1449
|
+
const bt = _e.clientY - me.clientY, Qt = _e.time - me.time;
|
|
1450
|
+
Ye = -(bt / Qt) / (P.scale || 1);
|
|
1384
1451
|
}
|
|
1385
1452
|
}
|
|
1386
|
-
|
|
1387
|
-
const
|
|
1388
|
-
|
|
1453
|
+
ae(), P.shouldCancelNextClick && (P.clickResetTimer = window.setTimeout(() => {
|
|
1454
|
+
const Ge = y.current;
|
|
1455
|
+
Ge.shouldCancelNextClick = !1, Ge.clickResetTimer = null;
|
|
1389
1456
|
}, 0));
|
|
1390
|
-
const
|
|
1391
|
-
le(), dr(v, w.pointerId), Math.abs(Ye) >=
|
|
1392
|
-
},
|
|
1457
|
+
const ye = St.current.startVelocityThreshold;
|
|
1458
|
+
le(), dr(v, w.pointerId), Math.abs(Ye) >= ye && Ae.current?.(Ye);
|
|
1459
|
+
}, Le = (w) => {
|
|
1393
1460
|
if (y.current.pointerId !== null) {
|
|
1394
1461
|
if (!w.isPrimary || w.pointerType !== y.current.pointerType)
|
|
1395
1462
|
return;
|
|
1396
1463
|
U(y.current.pointerId);
|
|
1397
1464
|
}
|
|
1398
|
-
if (y.current.shouldCancelNextClick && (
|
|
1465
|
+
if (y.current.shouldCancelNextClick && (ae(), y.current.shouldCancelNextClick = !1), !(Ht.current && Xe.current) || !sn(w.pointerType, mt.current) || w.button !== 0 && w.pointerType === "mouse" || w.ctrlKey || w.metaKey || w.altKey || Te(w.target))
|
|
1399
1466
|
return;
|
|
1400
|
-
window.dispatchEvent(new CustomEvent(Or, { detail: { paneId:
|
|
1401
|
-
const
|
|
1402
|
-
|
|
1467
|
+
window.dispatchEvent(new CustomEvent(Or, { detail: { paneId: pt } })), ft.current?.();
|
|
1468
|
+
const P = y.current;
|
|
1469
|
+
ae(), P.pointerId = w.pointerId, P.pointerType = w.pointerType, P.startClientY = w.clientY, P.startClientX = w.clientX, P.lastPanClientX = w.clientX, P.startScroll = K.current, P.scale = Zr(v, "y"), P.scaleX = Ze.current ? Zr(v, "x") : 1, P.isDragging = !1, P.shouldCancelNextClick = !1, P.velocitySamples = [];
|
|
1403
1470
|
}, Et = (w) => {
|
|
1404
1471
|
if (y.current.pointerId !== w.pointerId) {
|
|
1405
|
-
|
|
1472
|
+
ve();
|
|
1406
1473
|
return;
|
|
1407
1474
|
}
|
|
1408
1475
|
Be(w) && U(w.pointerId);
|
|
1409
1476
|
}, qe = [
|
|
1410
|
-
["click",
|
|
1411
|
-
["pointerdown",
|
|
1477
|
+
["click", Me, !0],
|
|
1478
|
+
["pointerdown", Le, { passive: !1 }],
|
|
1412
1479
|
["lostpointercapture", (w) => {
|
|
1413
1480
|
w.target !== v || y.current.pointerId !== w.pointerId || U(w.pointerId);
|
|
1414
1481
|
}, void 0]
|
|
1415
1482
|
], Je = [
|
|
1416
|
-
["pointermove",
|
|
1417
|
-
["pointerup",
|
|
1483
|
+
["pointermove", gt, { passive: !1 }],
|
|
1484
|
+
["pointerup", Re, void 0],
|
|
1418
1485
|
["pointercancel", Et, void 0]
|
|
1419
1486
|
];
|
|
1420
1487
|
return Ur(v, qe, "add"), Ur(window, Je, "add"), () => {
|
|
1421
1488
|
Ur(v, qe, "remove"), Ur(window, Je, "remove");
|
|
1422
1489
|
const w = y.current;
|
|
1423
|
-
w.pointerId !== null && dr(v, w.pointerId),
|
|
1490
|
+
w.pointerId !== null && dr(v, w.pointerId), ae(), le();
|
|
1424
1491
|
};
|
|
1425
|
-
}, [
|
|
1426
|
-
const
|
|
1427
|
-
(v) => (
|
|
1428
|
-
[D,
|
|
1492
|
+
}, [pt]);
|
|
1493
|
+
const $t = p(
|
|
1494
|
+
(v) => (A(), D(v)),
|
|
1495
|
+
[D, A]
|
|
1429
1496
|
);
|
|
1430
|
-
return /* @__PURE__ */ Zt("div", { ref:
|
|
1497
|
+
return /* @__PURE__ */ Zt("div", { ref: ee, "data-testid": M, "data-self-measured": ce ? "true" : void 0, className: Ot("aqvs-scroll-pane", N), style: _, children: [
|
|
1431
1498
|
/* @__PURE__ */ Zt(
|
|
1432
1499
|
"div",
|
|
1433
1500
|
{
|
|
@@ -1439,9 +1506,9 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
1439
1506
|
// レイアウトを所有することで、「計測した値を書き戻して自分のサイズを変える」
|
|
1440
1507
|
// フィードバックループが構造的に起こらず、初回 paint の時点でも帯は実寸で正しい
|
|
1441
1508
|
// (数値の反映だけが 1 コミット遅れる)。明示モードは従来どおり px を書く。
|
|
1442
|
-
height: ce ? void 0 :
|
|
1443
|
-
paddingTop:
|
|
1444
|
-
paddingBottom:
|
|
1509
|
+
height: ce ? void 0 : ne,
|
|
1510
|
+
paddingTop: Se.top,
|
|
1511
|
+
paddingBottom: Se.bottom,
|
|
1445
1512
|
// スクロール不能時 (contentSize <= viewportSize) は touch-action を通常に戻し、
|
|
1446
1513
|
// 短いリスト上のタッチがページ全体のパンを妨げるデッドゾーン化を防ぐ。
|
|
1447
1514
|
// 直接操作 (指・ペン) のドラッグを許可していない場合も付けない。
|
|
@@ -1455,92 +1522,92 @@ const te = (t, e, r) => Math.max(e, Math.min(r, t)), Zr = (t, e) => {
|
|
|
1455
1522
|
// 同一条件で揃えてあるため状態としても一貫している。
|
|
1456
1523
|
// 非同期コンテンツを先読みして確保する挙動は意図的に入れていない
|
|
1457
1524
|
// (空のペインがページのパンを殺すデッドゾーンになり、そちらの実害の方が大きいため)。
|
|
1458
|
-
...
|
|
1525
|
+
...g && $e && x.some((v) => v === "touch" || v === "pen") ? { touchAction: "none" } : {}
|
|
1459
1526
|
},
|
|
1460
1527
|
...xe,
|
|
1461
1528
|
id: At,
|
|
1462
1529
|
children: [
|
|
1463
|
-
|
|
1464
|
-
t(
|
|
1530
|
+
F,
|
|
1531
|
+
t(K.current)
|
|
1465
1532
|
]
|
|
1466
1533
|
}
|
|
1467
1534
|
),
|
|
1468
|
-
/* @__PURE__ */
|
|
1535
|
+
/* @__PURE__ */ Z(
|
|
1469
1536
|
Un,
|
|
1470
1537
|
{
|
|
1471
1538
|
contentSize: e,
|
|
1472
|
-
viewportSize:
|
|
1539
|
+
viewportSize: ne,
|
|
1473
1540
|
stretchMainSize: ce,
|
|
1474
|
-
scrollPosition:
|
|
1475
|
-
onScroll:
|
|
1541
|
+
scrollPosition: K.current,
|
|
1542
|
+
onScroll: $t,
|
|
1476
1543
|
enableThumbDrag: s,
|
|
1477
1544
|
enableTrackClick: a,
|
|
1478
1545
|
enableArrowButtons: l,
|
|
1479
1546
|
enableArrowButtonTabStops: f,
|
|
1480
1547
|
scrollBarWidth: i,
|
|
1481
1548
|
ariaControls: At,
|
|
1482
|
-
tapScrollCircleOptions:
|
|
1483
|
-
itemCount:
|
|
1484
|
-
renderThumbOverlay:
|
|
1485
|
-
visibleStartIndex:
|
|
1486
|
-
visibleEndIndex:
|
|
1487
|
-
locale:
|
|
1488
|
-
labels:
|
|
1549
|
+
tapScrollCircleOptions: J,
|
|
1550
|
+
itemCount: ze,
|
|
1551
|
+
renderThumbOverlay: $,
|
|
1552
|
+
visibleStartIndex: be,
|
|
1553
|
+
visibleEndIndex: se,
|
|
1554
|
+
locale: ke,
|
|
1555
|
+
labels: je
|
|
1489
1556
|
},
|
|
1490
1557
|
"scrollbar"
|
|
1491
1558
|
),
|
|
1492
|
-
|
|
1559
|
+
oe?.()
|
|
1493
1560
|
] });
|
|
1494
1561
|
}
|
|
1495
1562
|
), Tn = (t, e, r) => Math.min(Math.max(t, e), r), us = ({ dragState: t, normalizedDistance: e, sizeScale: r, size: n }) => {
|
|
1496
|
-
const i = Math.max(n / 2, 1), s = 1 + e * 0.65, a = Math.max(0.65, 1 - e * 0.25), l = t.direction * e * 26 * r, f = 0.8 + e * 0.18,
|
|
1563
|
+
const i = Math.max(n / 2, 1), s = 1 + e * 0.65, a = Math.max(0.65, 1 - e * 0.25), l = t.direction * e * 26 * r, f = 0.8 + e * 0.18, g = 3 * r, x = 6 * r, S = 22 * r, N = Math.abs(l) + x, M = l > 0 ? g : -Math.abs(l) - g, _ = Math.max(2.5, 3 * r), F = Tn(t.offsetX, -i, i), J = Tn(t.offsetY, -i, i), ie = i * 0.35, ze = F / i * ie, $ = J / i * ie, I = ze * 0.45, R = $ * 0.45, X = Math.max(S * 0.38, 6), B = 0.65 + e * 0.2, k = t.active;
|
|
1497
1564
|
return /* @__PURE__ */ Zt(pn, { children: [
|
|
1498
|
-
/* @__PURE__ */
|
|
1565
|
+
/* @__PURE__ */ Z(
|
|
1499
1566
|
"div",
|
|
1500
1567
|
{
|
|
1501
1568
|
className: "aqvs-tap-scroll-circle-gradient",
|
|
1502
1569
|
style: {
|
|
1503
1570
|
transform: `scale(${a}, ${s})`,
|
|
1504
|
-
transition:
|
|
1571
|
+
transition: k ? "40ms transform ease-out" : "200ms ease transform"
|
|
1505
1572
|
}
|
|
1506
1573
|
}
|
|
1507
1574
|
),
|
|
1508
|
-
/* @__PURE__ */
|
|
1575
|
+
/* @__PURE__ */ Z(
|
|
1509
1576
|
"div",
|
|
1510
1577
|
{
|
|
1511
1578
|
className: "aqvs-sample-visual-pupil",
|
|
1512
1579
|
style: {
|
|
1513
|
-
width:
|
|
1514
|
-
height:
|
|
1515
|
-
transform: `translate(calc(-50% + ${
|
|
1516
|
-
transition:
|
|
1580
|
+
width: S,
|
|
1581
|
+
height: S,
|
|
1582
|
+
transform: `translate(calc(-50% + ${ze}px), calc(-50% + ${$}px)) scale(${a}, ${f * s})`,
|
|
1583
|
+
transition: k ? "70ms transform ease-out" : "200ms ease transform"
|
|
1517
1584
|
}
|
|
1518
1585
|
}
|
|
1519
1586
|
),
|
|
1520
|
-
/* @__PURE__ */
|
|
1587
|
+
/* @__PURE__ */ Z(
|
|
1521
1588
|
"div",
|
|
1522
1589
|
{
|
|
1523
1590
|
className: "aqvs-sample-visual-highlight",
|
|
1524
1591
|
style: {
|
|
1525
|
-
width:
|
|
1526
|
-
height:
|
|
1527
|
-
transform: `translate(calc(-50% + ${
|
|
1528
|
-
opacity:
|
|
1592
|
+
width: X,
|
|
1593
|
+
height: X,
|
|
1594
|
+
transform: `translate(calc(-50% + ${I}px), calc(-50% + ${R}px)) scale(${a}, ${s})`,
|
|
1595
|
+
opacity: B,
|
|
1529
1596
|
boxShadow: "0 0 8px rgba(255,255,255,0.45)",
|
|
1530
|
-
transition:
|
|
1597
|
+
transition: k ? "120ms opacity 150ms, 120ms transform ease-out ease-out" : "220ms ease transform, 240ms opacity ease"
|
|
1531
1598
|
}
|
|
1532
1599
|
}
|
|
1533
1600
|
),
|
|
1534
|
-
/* @__PURE__ */
|
|
1601
|
+
/* @__PURE__ */ Z(
|
|
1535
1602
|
"div",
|
|
1536
1603
|
{
|
|
1537
1604
|
className: "aqvs-sample-visual-rod",
|
|
1538
1605
|
style: {
|
|
1539
|
-
width:
|
|
1606
|
+
width: _,
|
|
1540
1607
|
height: N,
|
|
1541
|
-
transform: `translate(-50%, ${
|
|
1608
|
+
transform: `translate(-50%, ${M}px)`,
|
|
1542
1609
|
opacity: e,
|
|
1543
|
-
transition:
|
|
1610
|
+
transition: k ? "40ms height, 60ms opacity ease-out ease-out" : "200ms ease height, 120ms ease opacity"
|
|
1544
1611
|
}
|
|
1545
1612
|
}
|
|
1546
1613
|
)
|
|
@@ -1633,26 +1700,26 @@ class sr {
|
|
|
1633
1700
|
if (i > 0 && l !== void 0) {
|
|
1634
1701
|
if (s = l, n?.materialize) {
|
|
1635
1702
|
const f = n?.sampleRange ?? { from: 0, to: Math.min(Rr - 1, i - 1) };
|
|
1636
|
-
let
|
|
1637
|
-
|
|
1703
|
+
let g = Math.max(0, Math.trunc(f.from)), x = Math.min(Math.trunc(f.to), i - 1);
|
|
1704
|
+
g > x && (g = 0, x = Math.min(Rr - 1, i - 1)), a = { from: g, values: sr._collectValidatedValues(r, g, x) };
|
|
1638
1705
|
}
|
|
1639
1706
|
} else if (i > 0) {
|
|
1640
1707
|
const f = n?.sampleRange ?? {
|
|
1641
1708
|
from: 0,
|
|
1642
1709
|
to: Math.min(Rr - 1, i - 1)
|
|
1643
1710
|
};
|
|
1644
|
-
let
|
|
1645
|
-
if (
|
|
1646
|
-
s = sr._sampleBaseValueStrided(r, i, Rr), n?.materialize && (a = { from:
|
|
1711
|
+
let g = Math.max(0, Math.trunc(f.from)), x = Math.min(Math.trunc(f.to), i - 1);
|
|
1712
|
+
if (g > x && (g = 0, x = Math.min(Rr - 1, i - 1)), i > Rr)
|
|
1713
|
+
s = sr._sampleBaseValueStrided(r, i, Rr), n?.materialize && (a = { from: g, values: sr._collectValidatedValues(r, g, x) });
|
|
1647
1714
|
else {
|
|
1648
|
-
const
|
|
1649
|
-
s = sr._modeOrMedian([...
|
|
1715
|
+
const S = sr._collectValidatedValues(r, g, x);
|
|
1716
|
+
s = sr._modeOrMedian([...S]), n?.materialize && (a = { from: g, values: S });
|
|
1650
1717
|
}
|
|
1651
1718
|
}
|
|
1652
1719
|
if (this.size = i, this.tree = /* @__PURE__ */ new Map(), this.deltas = /* @__PURE__ */ new Map(), this.total = void 0, this.valueFn = r, this.baseValue = s, a)
|
|
1653
1720
|
for (let f = 0; f < a.values.length; f++) {
|
|
1654
|
-
const
|
|
1655
|
-
|
|
1721
|
+
const g = a.from + f, x = a.values[f] - this.baseValue;
|
|
1722
|
+
x !== 0 && (this.deltas.set(g, x), this._updateTree(g, x));
|
|
1656
1723
|
}
|
|
1657
1724
|
this.total = this.getTotal(), this.revisionCount += 1;
|
|
1658
1725
|
}
|
|
@@ -1707,9 +1774,9 @@ class sr {
|
|
|
1707
1774
|
}
|
|
1708
1775
|
if (s > e.length * 0.2) {
|
|
1709
1776
|
const a = [];
|
|
1710
|
-
for (const [f,
|
|
1711
|
-
|
|
1712
|
-
const l = a.reduce((f,
|
|
1777
|
+
for (const [f, g] of i.entries())
|
|
1778
|
+
g === s && a.push(f);
|
|
1779
|
+
const l = a.reduce((f, g) => f + g, 0);
|
|
1713
1780
|
n = Math.floor(l / a.length);
|
|
1714
1781
|
}
|
|
1715
1782
|
return n;
|
|
@@ -1824,8 +1891,8 @@ class sr {
|
|
|
1824
1891
|
throw new Error(`Value must be a finite number: ${s}`);
|
|
1825
1892
|
if (s < 0)
|
|
1826
1893
|
throw new Error("Value cannot be negative.");
|
|
1827
|
-
const a = n.get(i), l = a === void 0 ? this.deltas.get(i) ?? 0 : a, f = l + this.baseValue,
|
|
1828
|
-
|
|
1894
|
+
const a = n.get(i), l = a === void 0 ? this.deltas.get(i) ?? 0 : a, f = l + this.baseValue, g = s - f;
|
|
1895
|
+
g !== 0 && r.push({ index: i, change: g }), n.set(i, l + g);
|
|
1829
1896
|
}
|
|
1830
1897
|
return r;
|
|
1831
1898
|
}
|
|
@@ -1876,9 +1943,9 @@ class sr {
|
|
|
1876
1943
|
const i = e.ranges;
|
|
1877
1944
|
if (i && i.length > 0) {
|
|
1878
1945
|
for (const l of i) {
|
|
1879
|
-
const f = Math.max(0, Math.trunc(l.from)),
|
|
1880
|
-
for (let
|
|
1881
|
-
this._materialize(
|
|
1946
|
+
const f = Math.max(0, Math.trunc(l.from)), g = Math.min(Math.trunc(l.to), this.size - 1);
|
|
1947
|
+
for (let x = f; x <= g; x++)
|
|
1948
|
+
this._materialize(x);
|
|
1882
1949
|
}
|
|
1883
1950
|
if (r === void 0)
|
|
1884
1951
|
return;
|
|
@@ -1960,36 +2027,36 @@ class sr {
|
|
|
1960
2027
|
this._materializeRanges(r.materializeOption);
|
|
1961
2028
|
const s = r.materializeOption?.materialize === !0;
|
|
1962
2029
|
for (; ; ) {
|
|
1963
|
-
let a = 0n, l = i - 1n, f,
|
|
2030
|
+
let a = 0n, l = i - 1n, f, g, x = this.total;
|
|
1964
2031
|
for (; a <= l; ) {
|
|
1965
|
-
const
|
|
1966
|
-
if (
|
|
1967
|
-
if (f =
|
|
1968
|
-
if (
|
|
2032
|
+
const M = a + l >> 1n, _ = Number(M), F = this.prefixSum(_);
|
|
2033
|
+
if (x = F.total, n ? F.cumulative >= e : F.cumulative <= e)
|
|
2034
|
+
if (f = M, g = F, n) {
|
|
2035
|
+
if (M === 0n)
|
|
1969
2036
|
break;
|
|
1970
|
-
l =
|
|
2037
|
+
l = M - 1n;
|
|
1971
2038
|
} else
|
|
1972
|
-
a =
|
|
2039
|
+
a = M + 1n;
|
|
1973
2040
|
else if (n)
|
|
1974
|
-
a =
|
|
2041
|
+
a = M + 1n;
|
|
1975
2042
|
else {
|
|
1976
|
-
if (
|
|
2043
|
+
if (M === 0n)
|
|
1977
2044
|
break;
|
|
1978
|
-
l =
|
|
2045
|
+
l = M - 1n;
|
|
1979
2046
|
}
|
|
1980
2047
|
}
|
|
1981
|
-
const
|
|
2048
|
+
const S = g, N = f !== void 0 ? Number(f) : -1;
|
|
1982
2049
|
if (s && N >= 0) {
|
|
1983
|
-
const
|
|
1984
|
-
if (this._materialize(N), (this.deltas.get(N) ?? 0) !==
|
|
2050
|
+
const M = this.deltas.get(N) ?? 0;
|
|
2051
|
+
if (this._materialize(N), (this.deltas.get(N) ?? 0) !== M)
|
|
1985
2052
|
continue;
|
|
1986
2053
|
}
|
|
1987
2054
|
return {
|
|
1988
2055
|
index: N,
|
|
1989
|
-
total:
|
|
1990
|
-
cumulative:
|
|
1991
|
-
currentValue:
|
|
1992
|
-
safeIndex:
|
|
2056
|
+
total: x,
|
|
2057
|
+
cumulative: S?.cumulative,
|
|
2058
|
+
currentValue: S?.currentValue,
|
|
2059
|
+
safeIndex: S?.safeIndex
|
|
1993
2060
|
};
|
|
1994
2061
|
}
|
|
1995
2062
|
}
|
|
@@ -2006,7 +2073,7 @@ class sr {
|
|
|
2006
2073
|
return { cumulative: 0, total: this.total, currentValue: 0, safeIndex: 0 };
|
|
2007
2074
|
if (this.size === 0)
|
|
2008
2075
|
return { cumulative: 0, total: this.getTotal(), currentValue: 0, safeIndex: 0 };
|
|
2009
|
-
const n =
|
|
2076
|
+
const n = re(Math.trunc(e), 0, this.size - 1), i = r?.materializeOption;
|
|
2010
2077
|
this._materializeRanges(i, n, !0);
|
|
2011
2078
|
let s = 0, a = n + 1;
|
|
2012
2079
|
for (; a > 0; ) {
|
|
@@ -2284,11 +2351,11 @@ const _i = (t, e) => {
|
|
|
2284
2351
|
}, jn = (t, e, r) => {
|
|
2285
2352
|
const n = Number.isFinite(t) && t > 0 ? Math.trunc(t) : 0, i = u(null), s = u({ size: n, valueOrFn: e, options: r });
|
|
2286
2353
|
i.current === null && (i.current = new sr(n, e, r));
|
|
2287
|
-
const a = i.current, l = s.current, f = l.size !== n,
|
|
2288
|
-
if (
|
|
2354
|
+
const a = i.current, l = s.current, f = l.size !== n, g = l.valueOrFn !== e, x = _i(l.options, r) || l.options?.baseValue !== r?.baseValue, S = l.size === 0 && n > 0 && (!i.current || i.current.base === 0);
|
|
2355
|
+
if (g || x) {
|
|
2289
2356
|
const N = r?.resetOnValueFnChange ?? !0;
|
|
2290
|
-
|
|
2291
|
-
} else f && (r?.debug &&
|
|
2357
|
+
x || g && N || S ? (r?.debug && L.debug("[useFenwickMapTree] reset", { valueOrFnChanged: g, optionsChanged: x }), a.reset(n, e, r)) : (f && (r?.debug && L.debug("[useFenwickMapTree] resize (with valueFn change)", { from: l.size, to: n }), a.changeSize(n)), r?.debug && L.debug("[useFenwickMapTree] setValueFn (no reset)", { valueOrFnChanged: g }), a.setValueFn(e, { reset: !1 })), s.current = { size: n, valueOrFn: e, options: r };
|
|
2358
|
+
} else f && (r?.debug && L.debug("[useFenwickMapTree] resize", { from: l.size, to: n }), S ? a.reset(n, e, r) : a.changeSize(n), s.current = { size: n, valueOrFn: e, options: r });
|
|
2292
2359
|
return a;
|
|
2293
2360
|
}, Oi = (t) => t + 1, Kn = (t) => {
|
|
2294
2361
|
const [e, r] = ni(Oi, 0), n = p(
|
|
@@ -2361,47 +2428,47 @@ class an {
|
|
|
2361
2428
|
}
|
|
2362
2429
|
function ki(t) {
|
|
2363
2430
|
const e = u(/* @__PURE__ */ new Map()), r = u(new an()), n = Math.floor(t), i = u(n);
|
|
2364
|
-
|
|
2431
|
+
W(() => {
|
|
2365
2432
|
if (i.current = n, Number.isNaN(n) || n < 0) {
|
|
2366
|
-
|
|
2433
|
+
L.warn(`useLruCache: invalid capacity ${t}; the cache will not store any entries.`), e.current.clear(), r.current = new an();
|
|
2367
2434
|
return;
|
|
2368
2435
|
}
|
|
2369
2436
|
if (Number.isFinite(n))
|
|
2370
|
-
for (let
|
|
2371
|
-
r.current.remove(
|
|
2437
|
+
for (let x = r.current.peekHead(); x !== null && e.current.size > n; x = r.current.peekHead())
|
|
2438
|
+
r.current.remove(x), e.current.delete(x.key);
|
|
2372
2439
|
}, [t, n]);
|
|
2373
|
-
const s = p((
|
|
2374
|
-
const
|
|
2375
|
-
if (
|
|
2376
|
-
return r.current.moveToTail(
|
|
2377
|
-
}, []), a = p((
|
|
2440
|
+
const s = p((x) => {
|
|
2441
|
+
const S = e.current.get(x);
|
|
2442
|
+
if (S)
|
|
2443
|
+
return r.current.moveToTail(S), S.value;
|
|
2444
|
+
}, []), a = p((x, S) => {
|
|
2378
2445
|
const N = i.current;
|
|
2379
2446
|
if (Number.isNaN(N) || N <= 0)
|
|
2380
2447
|
return;
|
|
2381
|
-
let
|
|
2382
|
-
if (
|
|
2383
|
-
|
|
2448
|
+
let M = e.current.get(x);
|
|
2449
|
+
if (M)
|
|
2450
|
+
M.value = S, r.current.moveToTail(M);
|
|
2384
2451
|
else {
|
|
2385
2452
|
if (e.current.size >= N) {
|
|
2386
|
-
const
|
|
2387
|
-
|
|
2453
|
+
const _ = r.current.removeHead();
|
|
2454
|
+
_ && e.current.delete(_.key);
|
|
2388
2455
|
}
|
|
2389
|
-
|
|
2456
|
+
M = new Fi(x, S), e.current.set(x, M), r.current.addToTail(M);
|
|
2390
2457
|
}
|
|
2391
|
-
}, []), l = p((
|
|
2392
|
-
const
|
|
2393
|
-
|
|
2394
|
-
}, []),
|
|
2458
|
+
}, []), l = p((x) => e.current.has(x), []), f = p((x) => {
|
|
2459
|
+
const S = e.current.get(x);
|
|
2460
|
+
S && (r.current.remove(S), e.current.delete(x));
|
|
2461
|
+
}, []), g = p(() => {
|
|
2395
2462
|
e.current.clear(), r.current = new an();
|
|
2396
2463
|
}, []);
|
|
2397
|
-
return ge(() => ({ get: s, set: a, has: l, remove: f, clear:
|
|
2464
|
+
return ge(() => ({ get: s, set: a, has: l, remove: f, clear: g }), [s, a, l, f, g]);
|
|
2398
2465
|
}
|
|
2399
2466
|
const Hi = 1e4, ds = () => {
|
|
2400
2467
|
const { get: t, set: e, has: r, clear: n } = ki(Hi);
|
|
2401
2468
|
return ge(() => ({ get: t, set: e, has: r, clear: n }), [t, e, r, n]);
|
|
2402
2469
|
}, fs = (t, e) => {
|
|
2403
2470
|
const r = u(e), n = u(t);
|
|
2404
|
-
|
|
2471
|
+
We(() => {
|
|
2405
2472
|
r.current = e, n.current = t;
|
|
2406
2473
|
}, [e, t]);
|
|
2407
2474
|
const i = u(/* @__PURE__ */ new WeakMap());
|
|
@@ -2418,97 +2485,101 @@ const Hi = 1e4, ds = () => {
|
|
|
2418
2485
|
}, Rn = -200, yn = { active: !1, offsetX: 0, offsetY: 0, distance: 0, direction: 0, pointerId: null }, $i = (t) => {
|
|
2419
2486
|
const e = u(t);
|
|
2420
2487
|
e.current = t;
|
|
2421
|
-
const r = u(yn), n = u(null), [i, s] =
|
|
2422
|
-
a.current !== null && (window.cancelAnimationFrame(a.current), a.current = null),
|
|
2423
|
-
}, []),
|
|
2424
|
-
const
|
|
2425
|
-
|
|
2426
|
-
const
|
|
2427
|
-
|
|
2428
|
-
const
|
|
2429
|
-
if (
|
|
2488
|
+
const r = u(yn), n = u(null), [i, s] = Ce(!1), a = u(null), l = u(!1), f = u(null), g = u({ residual: 0, direction: 0 }), x = u({ residual: 0, direction: 0 }), S = p(() => {
|
|
2489
|
+
a.current !== null && (window.cancelAnimationFrame(a.current), a.current = null), f.current = null, g.current = { residual: 0, direction: 0 }, x.current = { residual: 0, direction: 0 };
|
|
2490
|
+
}, []), N = p((I, R, X, B, k, be) => {
|
|
2491
|
+
const se = R > 0 ? 1 : R < 0 ? -1 : 0;
|
|
2492
|
+
se !== 0 && se !== I.direction && (I.direction = se, I.residual = 0), I.residual += R * X;
|
|
2493
|
+
const oe = Math.max(k(), 0);
|
|
2494
|
+
oe > 0 && (I.residual = re(I.residual, -oe, oe));
|
|
2495
|
+
const pe = I.residual;
|
|
2496
|
+
if (pe === 0)
|
|
2430
2497
|
return { actualDelta: 0, atBoundary: !1 };
|
|
2431
|
-
const
|
|
2432
|
-
|
|
2433
|
-
const
|
|
2434
|
-
return
|
|
2435
|
-
}, []),
|
|
2436
|
-
(
|
|
2437
|
-
const
|
|
2438
|
-
if (!
|
|
2439
|
-
|
|
2498
|
+
const xe = B(), ke = be(pe), je = ke - xe;
|
|
2499
|
+
I.residual -= je;
|
|
2500
|
+
const C = pe < 0 && xe + pe <= 0, K = pe > 0 && xe + pe >= oe, ee = pe < 0 && (ke <= 0 || C && je === 0) || pe > 0 && (ke >= oe || K && je === 0);
|
|
2501
|
+
return ee && (I.residual = 0), { actualDelta: je, atBoundary: ee };
|
|
2502
|
+
}, []), M = p(
|
|
2503
|
+
(I) => {
|
|
2504
|
+
const R = e.current, X = r.current;
|
|
2505
|
+
if (!l.current) {
|
|
2506
|
+
S();
|
|
2507
|
+
return;
|
|
2508
|
+
}
|
|
2509
|
+
if (!X.active || X.direction === 0) {
|
|
2510
|
+
S();
|
|
2440
2511
|
return;
|
|
2441
2512
|
}
|
|
2442
|
-
const
|
|
2443
|
-
if (
|
|
2444
|
-
a.current = window.requestAnimationFrame(
|
|
2513
|
+
const B = f.current ?? I, k = Math.max((I - B) / 1e3, 0), be = Math.min(k, Wn);
|
|
2514
|
+
if (f.current = I, be <= 0) {
|
|
2515
|
+
a.current = window.requestAnimationFrame(M);
|
|
2445
2516
|
return;
|
|
2446
2517
|
}
|
|
2447
|
-
const
|
|
2448
|
-
|
|
2449
|
-
const
|
|
2450
|
-
if (
|
|
2451
|
-
|
|
2518
|
+
const se = Ni({ offsetX: X.offsetX, offsetY: X.offsetY, maxDistance: R.maxDistance, x: R.xSpeedParams, y: R.ySpeedParams }), oe = N(g.current, se.x, be, R.getHx, R.getMaxHx, (je) => R.applyHxRef.current(R.getHx() + je));
|
|
2519
|
+
oe.actualDelta !== 0 && (R.pendingColAnchorRef.current = null);
|
|
2520
|
+
const pe = N(x.current, se.y, be, R.getVy, R.getMaxVy, R.applyVy), xe = R.getMaxHx() <= 0 || oe.atBoundary || X.offsetX === 0, ke = R.getMaxVy() <= 0 || pe.atBoundary || X.offsetY === 0;
|
|
2521
|
+
if (xe && ke) {
|
|
2522
|
+
S();
|
|
2452
2523
|
return;
|
|
2453
2524
|
}
|
|
2454
|
-
a.current = window.requestAnimationFrame(
|
|
2525
|
+
a.current = window.requestAnimationFrame(M);
|
|
2455
2526
|
},
|
|
2456
|
-
[
|
|
2457
|
-
),
|
|
2458
|
-
a.current === null && (
|
|
2459
|
-
}, [
|
|
2460
|
-
r.current = { ...yn }, s(!1), n.current?.reset(),
|
|
2461
|
-
}, [
|
|
2462
|
-
(
|
|
2463
|
-
r.current =
|
|
2527
|
+
[S, N]
|
|
2528
|
+
), _ = p(() => {
|
|
2529
|
+
a.current === null && (f.current = null, g.current = { residual: 0, direction: 0 }, x.current = { residual: 0, direction: 0 }, a.current = window.requestAnimationFrame(M));
|
|
2530
|
+
}, [M]), F = p(() => {
|
|
2531
|
+
r.current = { ...yn }, s(!1), n.current?.reset(), S();
|
|
2532
|
+
}, [S]), J = p(
|
|
2533
|
+
(I) => {
|
|
2534
|
+
r.current = I, s(I.active), I.active && I.direction !== 0 ? _() : S();
|
|
2464
2535
|
},
|
|
2465
|
-
[
|
|
2466
|
-
), { enabled:
|
|
2467
|
-
return
|
|
2468
|
-
const
|
|
2469
|
-
!
|
|
2470
|
-
}, [
|
|
2471
|
-
const
|
|
2472
|
-
|
|
2536
|
+
[_, S]
|
|
2537
|
+
), { enabled: ie, xExtentFreshness: ze, yExtentFreshness: $ } = t;
|
|
2538
|
+
return W(() => {
|
|
2539
|
+
const I = r.current;
|
|
2540
|
+
!I.active || I.direction === 0 || _();
|
|
2541
|
+
}, [ze, $, _]), W(() => {
|
|
2542
|
+
const I = () => {
|
|
2543
|
+
F();
|
|
2473
2544
|
};
|
|
2474
|
-
return window.addEventListener(Or,
|
|
2475
|
-
window.removeEventListener(Or,
|
|
2545
|
+
return window.addEventListener(Or, I), () => {
|
|
2546
|
+
window.removeEventListener(Or, I);
|
|
2476
2547
|
};
|
|
2477
|
-
}, [
|
|
2478
|
-
if (!
|
|
2548
|
+
}, [F]), W(() => {
|
|
2549
|
+
if (!ie)
|
|
2479
2550
|
return;
|
|
2480
|
-
const
|
|
2481
|
-
if (!r.current.active || r.current.pointerId ===
|
|
2551
|
+
const I = (R) => {
|
|
2552
|
+
if (!r.current.active || r.current.pointerId === R.pointerId)
|
|
2482
2553
|
return;
|
|
2483
|
-
const
|
|
2484
|
-
if (!(
|
|
2485
|
-
|
|
2554
|
+
const X = R.target;
|
|
2555
|
+
if (!(X instanceof Node)) {
|
|
2556
|
+
F();
|
|
2486
2557
|
return;
|
|
2487
2558
|
}
|
|
2488
|
-
n.current?.getElement()?.contains(
|
|
2559
|
+
n.current?.getElement()?.contains(X) || F();
|
|
2489
2560
|
};
|
|
2490
|
-
return document.addEventListener("pointerdown",
|
|
2491
|
-
document.removeEventListener("pointerdown",
|
|
2561
|
+
return document.addEventListener("pointerdown", I, !0), () => {
|
|
2562
|
+
document.removeEventListener("pointerdown", I, !0);
|
|
2492
2563
|
};
|
|
2493
|
-
}, [
|
|
2494
|
-
|
|
2495
|
-
}, [
|
|
2496
|
-
|
|
2497
|
-
}, [
|
|
2498
|
-
},
|
|
2564
|
+
}, [ie, F]), W(() => {
|
|
2565
|
+
ie || F();
|
|
2566
|
+
}, [ie, F]), We(() => (l.current = !0, () => {
|
|
2567
|
+
l.current = !1, S();
|
|
2568
|
+
}), [S]), { isTapActive: i, handleTapCircleDragChange: J, tapCircleHandleRef: n };
|
|
2569
|
+
}, lt = (t, e) => e <= 0 ? 0 : re(t, 0, e - 1), In = (t) => ({
|
|
2499
2570
|
top: Math.max(0, t?.top ?? 0),
|
|
2500
2571
|
bottom: Math.max(0, t?.bottom ?? 0)
|
|
2501
|
-
}),
|
|
2572
|
+
}), Tt = (t, e) => t <= e ? 0 : t - e, br = (t, e) => t <= 0 ? 0 : t + e, Fr = 1e3, hn = 2e3, Zn = 1048576, fr = 2 ** -10, Pn = (t) => t === "center" ? null : t === "bottom" ? "end" : "start", En = (t) => t !== null && t.panePosition <= 0 ? null : t, Xi = Object.freeze({ top: 0, bottom: 0 }), Bi = (t, e, r, n) => {
|
|
2502
2573
|
const i = e + n.top, s = e + r - n.bottom;
|
|
2503
2574
|
return t.top >= i - fr && t.bottom <= s + fr ? null : t.top < i || t.bottom - t.top > s - i ? { align: "top", offset: n.top } : { align: "bottom", offset: -n.bottom };
|
|
2504
2575
|
}, qi = (t, e, r) => t <= fr ? "start" : t >= e - fr ? "end" : r !== null && Math.abs(t - r.panePosition) <= fr ? r.edge : "none", Yi = ({ translateY: t, snapEdge: e, children: r, boundaryRef: n }) => {
|
|
2505
2576
|
const { ratio: i, attach: s } = Fn("[VirtualScroll] the items wrapper"), a = i === null ? t : _n(t, i, e);
|
|
2506
|
-
return /* @__PURE__ */
|
|
2577
|
+
return /* @__PURE__ */ Z("div", { ref: n, className: "aqvs-items-boundary", children: /* @__PURE__ */ Z("div", { ref: s, className: "aqvs-items-wrapper", style: { top: 0, transform: `translateY(${a}px)`, willChange: "transform" }, children: r }) });
|
|
2507
2578
|
}, Wi = 40, Gr = (t) => {
|
|
2508
2579
|
if (!Number.isFinite(t)) return 0n;
|
|
2509
2580
|
const e = Math.trunc(t);
|
|
2510
2581
|
return e <= 0 ? 0n : BigInt(e);
|
|
2511
|
-
},
|
|
2582
|
+
}, zr = (t, e, r) => {
|
|
2512
2583
|
const n = r - 1, i = t.findIndexAtOrAfter(e, it);
|
|
2513
2584
|
if (i.index === -1 || i.index > n || i.cumulative === void 0 || i.currentValue === void 0) {
|
|
2514
2585
|
const s = t.prefixSum(n, it);
|
|
@@ -2519,77 +2590,74 @@ const Hi = 1e4, ds = () => {
|
|
|
2519
2590
|
const a = Gr(n);
|
|
2520
2591
|
if (a === 0n)
|
|
2521
2592
|
return { renderingStartIndex: 0, renderingEndIndex: 0, visibleStartIndex: 0, visibleEndIndex: 0 };
|
|
2522
|
-
const l = (
|
|
2523
|
-
let
|
|
2524
|
-
const
|
|
2525
|
-
const
|
|
2526
|
-
if (!Number.isSafeInteger(
|
|
2593
|
+
const l = ($) => $ < 0n ? 0n : $ >= a ? a - 1n : $, f = zr(s, t, n);
|
|
2594
|
+
let g = l(Gr(f.index));
|
|
2595
|
+
const x = f.top - t, S = ($) => {
|
|
2596
|
+
const I = Number($);
|
|
2597
|
+
if (!Number.isSafeInteger(I))
|
|
2527
2598
|
return null;
|
|
2528
|
-
const { cumulative:
|
|
2529
|
-
if (!Number.isFinite(
|
|
2599
|
+
const { cumulative: R } = s.prefixSum(I, it);
|
|
2600
|
+
if (!Number.isFinite(R))
|
|
2530
2601
|
return null;
|
|
2531
|
-
const { index:
|
|
2532
|
-
if (
|
|
2602
|
+
const { index: X } = s.findIndexAtOrAfter(R + 0.5, it);
|
|
2603
|
+
if (X === -1)
|
|
2533
2604
|
return null;
|
|
2534
|
-
const
|
|
2535
|
-
return
|
|
2536
|
-
}, N = (
|
|
2537
|
-
let
|
|
2538
|
-
for (;
|
|
2539
|
-
const
|
|
2540
|
-
if (
|
|
2605
|
+
const B = Gr(X);
|
|
2606
|
+
return B > $ ? B : null;
|
|
2607
|
+
}, N = ($, I) => {
|
|
2608
|
+
let R = I, X = $, B = $, k = 0;
|
|
2609
|
+
for (; X < a && R < e; ) {
|
|
2610
|
+
const be = Number(X), se = i(be);
|
|
2611
|
+
if (R += se, B = X, X += 1n, !Number.isFinite(se) || se < 0)
|
|
2541
2612
|
break;
|
|
2542
|
-
if (
|
|
2543
|
-
if (
|
|
2544
|
-
const
|
|
2545
|
-
if (
|
|
2546
|
-
|
|
2547
|
-
else if (
|
|
2548
|
-
|
|
2613
|
+
if (se === 0) {
|
|
2614
|
+
if (k += 1, k > Fr) {
|
|
2615
|
+
const oe = S(B);
|
|
2616
|
+
if (oe !== null && oe > X)
|
|
2617
|
+
X = oe, k = 0;
|
|
2618
|
+
else if (oe !== null && oe === X && i(Number(X)) > 0)
|
|
2619
|
+
k = 0;
|
|
2549
2620
|
else
|
|
2550
2621
|
break;
|
|
2551
2622
|
}
|
|
2552
2623
|
} else
|
|
2553
|
-
|
|
2624
|
+
k = 0;
|
|
2554
2625
|
}
|
|
2555
|
-
return { height:
|
|
2626
|
+
return { height: R, end: B };
|
|
2556
2627
|
};
|
|
2557
|
-
let { height:
|
|
2558
|
-
if (
|
|
2559
|
-
let
|
|
2560
|
-
for (;
|
|
2561
|
-
|
|
2562
|
-
const
|
|
2563
|
-
if (
|
|
2628
|
+
let { height: M, end: _ } = N(g, x);
|
|
2629
|
+
if (M < e && g > 0n) {
|
|
2630
|
+
let $ = g, I = M + Math.abs(Math.min(0, x)), R = 0;
|
|
2631
|
+
for (; $ > 0n && I < e; ) {
|
|
2632
|
+
$ -= 1n;
|
|
2633
|
+
const B = Number($), k = i(B);
|
|
2634
|
+
if (I += k, !Number.isFinite(k) || k < 0)
|
|
2564
2635
|
break;
|
|
2565
|
-
if (
|
|
2566
|
-
if (
|
|
2567
|
-
if (!Number.isSafeInteger(
|
|
2636
|
+
if (k === 0) {
|
|
2637
|
+
if (R += 1, R > Fr) {
|
|
2638
|
+
if (!Number.isSafeInteger(B))
|
|
2568
2639
|
break;
|
|
2569
|
-
const { cumulative:
|
|
2570
|
-
if (
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
T = ie + 1n, P = 0;
|
|
2575
|
-
else if (ie === T && T >= 1n && i(Number(T - 1n)) > 0)
|
|
2576
|
-
P = 0;
|
|
2640
|
+
const { cumulative: be } = s.prefixSum(B, it), { index: se } = s.findIndexAtOrAfter(be - 0.5, it), oe = se === -1 ? -1n : Gr(se);
|
|
2641
|
+
if (oe >= 0n && oe < $)
|
|
2642
|
+
$ = oe + 1n, R = 0;
|
|
2643
|
+
else if (oe === $ && $ >= 1n && i(Number($ - 1n)) > 0)
|
|
2644
|
+
R = 0;
|
|
2577
2645
|
else
|
|
2578
2646
|
break;
|
|
2579
2647
|
}
|
|
2580
2648
|
} else
|
|
2581
|
-
|
|
2649
|
+
R = 0;
|
|
2582
2650
|
}
|
|
2583
|
-
|
|
2584
|
-
const
|
|
2585
|
-
|
|
2651
|
+
g = l($);
|
|
2652
|
+
const X = N(g, 0);
|
|
2653
|
+
M = X.height, _ = X.end;
|
|
2586
2654
|
}
|
|
2587
|
-
const
|
|
2655
|
+
const F = l(g), J = l(_), ie = l(F - BigInt(Math.max(0, r))), ze = l(J + BigInt(Math.max(0, r)));
|
|
2588
2656
|
return {
|
|
2589
|
-
renderingStartIndex:
|
|
2590
|
-
renderingEndIndex:
|
|
2591
|
-
visibleStartIndex:
|
|
2592
|
-
visibleEndIndex:
|
|
2657
|
+
renderingStartIndex: lt(Number(ie), n),
|
|
2658
|
+
renderingEndIndex: lt(Number(ze), n),
|
|
2659
|
+
visibleStartIndex: lt(Number(F), n),
|
|
2660
|
+
visibleEndIndex: lt(Number(J), n)
|
|
2593
2661
|
};
|
|
2594
2662
|
}, Qn = (t, e, r, n, i, s, a) => {
|
|
2595
2663
|
if (n === 0)
|
|
@@ -2597,65 +2665,65 @@ const Hi = 1e4, ds = () => {
|
|
|
2597
2665
|
const f = Number.isFinite(a) ? Math.min(Math.max(0, t), a) : Math.max(0, t);
|
|
2598
2666
|
if (n >= Number.MAX_SAFE_INTEGER)
|
|
2599
2667
|
return Ui(f, e, r, n, i, s);
|
|
2600
|
-
const
|
|
2601
|
-
let
|
|
2602
|
-
const N =
|
|
2603
|
-
let
|
|
2604
|
-
for (;
|
|
2605
|
-
const
|
|
2606
|
-
if (
|
|
2668
|
+
const g = zr(s, f, n);
|
|
2669
|
+
let x = g.index, S = g.top - f;
|
|
2670
|
+
const N = S, M = ($, I) => {
|
|
2671
|
+
let R = $, X = I, B = 0;
|
|
2672
|
+
for (; R < n && X < e; ) {
|
|
2673
|
+
const k = i(R);
|
|
2674
|
+
if (X += k, R++, !Number.isFinite(k) || k < 0)
|
|
2607
2675
|
break;
|
|
2608
|
-
if (
|
|
2609
|
-
if (
|
|
2610
|
-
const { cumulative:
|
|
2611
|
-
if (
|
|
2612
|
-
|
|
2613
|
-
else if (
|
|
2614
|
-
|
|
2676
|
+
if (k === 0) {
|
|
2677
|
+
if (B++, B > Fr) {
|
|
2678
|
+
const { cumulative: be } = s.prefixSum(R - 1, it), { index: se } = Number.isFinite(be) ? s.findIndexAtOrAfter(be + 0.5, it) : { index: -1 };
|
|
2679
|
+
if (se > R)
|
|
2680
|
+
R = se, B = 0;
|
|
2681
|
+
else if (se === R && i(R) > 0)
|
|
2682
|
+
B = 0;
|
|
2615
2683
|
else
|
|
2616
2684
|
break;
|
|
2617
2685
|
}
|
|
2618
2686
|
} else
|
|
2619
|
-
|
|
2687
|
+
B = 0;
|
|
2620
2688
|
}
|
|
2621
|
-
return { cursor:
|
|
2622
|
-
},
|
|
2623
|
-
let
|
|
2624
|
-
if (
|
|
2625
|
-
let
|
|
2626
|
-
for (;
|
|
2627
|
-
const
|
|
2628
|
-
if (
|
|
2629
|
-
|
|
2689
|
+
return { cursor: R, height: X };
|
|
2690
|
+
}, _ = M(x, S);
|
|
2691
|
+
let F = _.cursor;
|
|
2692
|
+
if (S = _.height, S < e && x > 0) {
|
|
2693
|
+
let $ = S + Math.abs(Math.min(0, N)), I = x - 1, R = 0;
|
|
2694
|
+
for (; I >= 0 && $ < e; ) {
|
|
2695
|
+
const B = i(I);
|
|
2696
|
+
if ($ += B, !Number.isFinite(B) || B < 0) {
|
|
2697
|
+
I--;
|
|
2630
2698
|
break;
|
|
2631
2699
|
}
|
|
2632
|
-
if (
|
|
2633
|
-
if (
|
|
2634
|
-
const { cumulative:
|
|
2635
|
-
if (
|
|
2636
|
-
|
|
2700
|
+
if (B === 0) {
|
|
2701
|
+
if (R++, R > Fr) {
|
|
2702
|
+
const { cumulative: k } = s.prefixSum(I, it), { index: be } = s.findIndexAtOrAfter(k - 0.5, it);
|
|
2703
|
+
if (be !== -1 && be < I) {
|
|
2704
|
+
I = be, R = 0;
|
|
2637
2705
|
continue;
|
|
2638
2706
|
}
|
|
2639
|
-
if (
|
|
2640
|
-
|
|
2707
|
+
if (be === I && I >= 1 && i(I - 1) > 0)
|
|
2708
|
+
R = 0;
|
|
2641
2709
|
else {
|
|
2642
|
-
|
|
2710
|
+
I--;
|
|
2643
2711
|
break;
|
|
2644
2712
|
}
|
|
2645
2713
|
}
|
|
2646
2714
|
} else
|
|
2647
|
-
|
|
2648
|
-
|
|
2715
|
+
R = 0;
|
|
2716
|
+
I--;
|
|
2649
2717
|
}
|
|
2650
|
-
|
|
2651
|
-
const
|
|
2652
|
-
|
|
2718
|
+
x = lt(I + 1, n);
|
|
2719
|
+
const X = M(x, 0);
|
|
2720
|
+
F = X.cursor, S = X.height;
|
|
2653
2721
|
}
|
|
2654
|
-
const
|
|
2655
|
-
return { renderingStartIndex:
|
|
2722
|
+
const J = lt(x - r, n), ie = lt(Math.max(F - 1, x), n), ze = lt(ie + r, n);
|
|
2723
|
+
return { renderingStartIndex: J, renderingEndIndex: ze, visibleStartIndex: x, visibleEndIndex: ie };
|
|
2656
2724
|
}, Nn = (t, e, r) => {
|
|
2657
|
-
const n = Math.max(0, e
|
|
2658
|
-
return
|
|
2725
|
+
const n = Math.max(0, e), i = u({ last: 0, id: null, arg: null }).current;
|
|
2726
|
+
return W(
|
|
2659
2727
|
() => () => {
|
|
2660
2728
|
if (i.id !== null && (cancelAnimationFrame(i.id), i.id = null), i.arg !== null && t.current) {
|
|
2661
2729
|
try {
|
|
@@ -2677,8 +2745,8 @@ const Hi = 1e4, ds = () => {
|
|
|
2677
2745
|
if (t.current)
|
|
2678
2746
|
try {
|
|
2679
2747
|
r(t.current, i.arg);
|
|
2680
|
-
} catch (
|
|
2681
|
-
console.error("[useThrottledInvoker] Error invoking callback",
|
|
2748
|
+
} catch (g) {
|
|
2749
|
+
console.error("[useThrottledInvoker] Error invoking callback", g);
|
|
2682
2750
|
}
|
|
2683
2751
|
i.arg = null, i.last = l;
|
|
2684
2752
|
}
|
|
@@ -2688,19 +2756,19 @@ const Hi = 1e4, ds = () => {
|
|
|
2688
2756
|
},
|
|
2689
2757
|
[n, r, t, i]
|
|
2690
2758
|
);
|
|
2691
|
-
}, Gi = Jn.memo(({ index: t, top: e, height: r, item: n, children: i, clipItemHeight: s, enableKeyboardNavigation: a, onKeyDown: l, onEscapeKeyDown: f, onFocus:
|
|
2692
|
-
const
|
|
2693
|
-
|
|
2759
|
+
}, Gi = Jn.memo(({ index: t, top: e, height: r, item: n, children: i, clipItemHeight: s, enableKeyboardNavigation: a, onKeyDown: l, onEscapeKeyDown: f, onFocus: g, registerItemRef: x }) => {
|
|
2760
|
+
const S = p((J) => x(t, J), [t, x]), N = p((J) => l(J, t), [t, l]), M = p((J) => f?.(J, t), [t, f]), _ = p(() => g(t), [t, g]), F = p((J) => {
|
|
2761
|
+
J.currentTarget.focus({ preventScroll: !0 });
|
|
2694
2762
|
}, []);
|
|
2695
2763
|
return (
|
|
2696
2764
|
// 行ラッパーの role は消費側の複合ウィジェット契約 (listbox / tree / grid — README「Composite widget
|
|
2697
2765
|
// roles」) の所有物で、パッケージが既定 role を課すと衝突する。キー/フォーカス結線は
|
|
2698
2766
|
// enableKeyboardNavigation の行ナビゲーション機構そのもの。
|
|
2699
2767
|
// biome-ignore lint/a11y/noStaticElementInteractions: role は消費側の複合ウィジェット契約の所有物 (上記)
|
|
2700
|
-
/* @__PURE__ */
|
|
2768
|
+
/* @__PURE__ */ Z(
|
|
2701
2769
|
"div",
|
|
2702
2770
|
{
|
|
2703
|
-
ref:
|
|
2771
|
+
ref: S,
|
|
2704
2772
|
"data-index": t,
|
|
2705
2773
|
"data-virtualscroll-item": "true",
|
|
2706
2774
|
className: "aqvs-item-container",
|
|
@@ -2710,10 +2778,10 @@ const Hi = 1e4, ds = () => {
|
|
|
2710
2778
|
overflow: s ? "hidden" : void 0
|
|
2711
2779
|
},
|
|
2712
2780
|
tabIndex: a ? -1 : void 0,
|
|
2713
|
-
onPointerDown: a ?
|
|
2781
|
+
onPointerDown: a ? F : void 0,
|
|
2714
2782
|
onKeyDownCapture: a ? N : void 0,
|
|
2715
|
-
onKeyDown: a && f ?
|
|
2716
|
-
onFocusCapture: a ?
|
|
2783
|
+
onKeyDown: a && f ? M : void 0,
|
|
2784
|
+
onFocusCapture: a ? _ : void 0,
|
|
2717
2785
|
children: i(n, t)
|
|
2718
2786
|
}
|
|
2719
2787
|
)
|
|
@@ -2728,46 +2796,46 @@ const Hi = 1e4, ds = () => {
|
|
|
2728
2796
|
className: a,
|
|
2729
2797
|
testId: l,
|
|
2730
2798
|
onScroll: f,
|
|
2731
|
-
onRangeChange:
|
|
2732
|
-
onScrollAdjust:
|
|
2733
|
-
children:
|
|
2799
|
+
onRangeChange: g,
|
|
2800
|
+
onScrollAdjust: x,
|
|
2801
|
+
children: S,
|
|
2734
2802
|
background: N,
|
|
2735
|
-
initialScrollIndex:
|
|
2736
|
-
initialScrollOffset:
|
|
2737
|
-
initialScrollAnchor:
|
|
2738
|
-
callbackThrottleMs:
|
|
2739
|
-
contentInsets:
|
|
2740
|
-
onItemFocus:
|
|
2741
|
-
scrollBarOptions:
|
|
2742
|
-
behaviorOptions:
|
|
2743
|
-
onWheelHorizontal:
|
|
2744
|
-
onPanHorizontal:
|
|
2745
|
-
horizontalKeyInputs:
|
|
2746
|
-
horizontalKeyStep:
|
|
2747
|
-
contentProps:
|
|
2748
|
-
liveRegion:
|
|
2749
|
-
locale:
|
|
2750
|
-
labels:
|
|
2803
|
+
initialScrollIndex: M,
|
|
2804
|
+
initialScrollOffset: _,
|
|
2805
|
+
initialScrollAnchor: F,
|
|
2806
|
+
callbackThrottleMs: J = 5,
|
|
2807
|
+
contentInsets: ie,
|
|
2808
|
+
onItemFocus: ze,
|
|
2809
|
+
scrollBarOptions: $,
|
|
2810
|
+
behaviorOptions: I,
|
|
2811
|
+
onWheelHorizontal: R,
|
|
2812
|
+
onPanHorizontal: X,
|
|
2813
|
+
horizontalKeyInputs: B,
|
|
2814
|
+
horizontalKeyStep: k = Wi,
|
|
2815
|
+
contentProps: be,
|
|
2816
|
+
liveRegion: se,
|
|
2817
|
+
locale: oe,
|
|
2818
|
+
labels: pe
|
|
2751
2819
|
}, xe) => {
|
|
2752
|
-
const { width:
|
|
2820
|
+
const { width: ke, enableThumbDrag: je, enableTrackClick: C, enableArrowButtons: K, enableArrowButtonTabStops: ee, enableScrollToTopBottomButtons: He, renderThumbOverlay: ce, tapScrollCircleOptions: Pe } = $ ?? {}, Rt = ee === !1, ne = ge(() => $n(oe, pe), [oe, pe]), { enablePointerDrag: st, pointerDragInputs: wt, enableKeyboardNavigation: we = !0, enableEscapeRowReturn: Ke = !1, wheelSpeedMultiplier: Ve, inertiaOptions: Ze, overscrollBehavior: Qe, clipItemHeight: Vt = !1, resetOnGetItemHeightChange: Se = !1 } = I ?? {}, [yt, $e] = Ce(0), D = i ?? yt, ot = p((c) => {
|
|
2753
2821
|
$e((h) => h === c ? h : c);
|
|
2754
|
-
}, []),
|
|
2822
|
+
}, []), A = u(null), ft = u({
|
|
2755
2823
|
renderingStartIndex: 0,
|
|
2756
2824
|
renderingEndIndex: 0,
|
|
2757
2825
|
visibleStartIndex: 0,
|
|
2758
2826
|
visibleEndIndex: 0,
|
|
2759
2827
|
scrollPosition: 0,
|
|
2760
2828
|
totalHeight: 0
|
|
2761
|
-
}),
|
|
2762
|
-
|
|
2763
|
-
if (
|
|
2764
|
-
|
|
2829
|
+
}), z = u(F && t > 0 ? { index: re(Math.trunc(F.index), 0, t - 1), align: "top", offset: -Math.max(0, F.offsetPx ?? 0) } : null), Ae = u(!1), ht = u(!0);
|
|
2830
|
+
W(() => {
|
|
2831
|
+
if (ht.current) {
|
|
2832
|
+
ht.current = !1;
|
|
2765
2833
|
return;
|
|
2766
2834
|
}
|
|
2767
|
-
|
|
2768
|
-
}, [
|
|
2769
|
-
const H = ge(() => In(
|
|
2770
|
-
const h =
|
|
2835
|
+
Se && (z.current = null);
|
|
2836
|
+
}, [Se, n]);
|
|
2837
|
+
const H = ge(() => In(ie), [ie]), [pt] = Ce(() => {
|
|
2838
|
+
const h = F?.index ?? M, m = typeof h == "number" && Number.isFinite(h) ? Math.max(0, Math.trunc(h)) : 0;
|
|
2771
2839
|
return { from: Math.max(0, m - 50), to: m + 50 };
|
|
2772
2840
|
}), At = ge(
|
|
2773
2841
|
// 目的: Fenwick Tree のオプション設定
|
|
@@ -2775,101 +2843,101 @@ const Hi = 1e4, ds = () => {
|
|
|
2775
2843
|
// itemCount には依存させない (依存させると追記のたびに options 参照が変わり、計測済み高さが全消去される)。
|
|
2776
2844
|
// この useMemo により sampleRange を毎レンダー新規生成しない = 参照同一性由来の破壊的 reset を防ぐ。
|
|
2777
2845
|
() => ({
|
|
2778
|
-
sampleRange:
|
|
2779
|
-
resetOnValueFnChange:
|
|
2846
|
+
sampleRange: pt,
|
|
2847
|
+
resetOnValueFnChange: Se,
|
|
2780
2848
|
materialize: !0
|
|
2781
2849
|
}),
|
|
2782
|
-
[
|
|
2783
|
-
), y = jn(t, n, At), { revision:
|
|
2850
|
+
[Se, pt]
|
|
2851
|
+
), y = jn(t, n, At), { revision: Ht, change: mt } = Kn(y), [Xe] = Ce(() => {
|
|
2784
2852
|
let c = 0, h = 0;
|
|
2785
|
-
if (
|
|
2786
|
-
const m =
|
|
2787
|
-
c = br(
|
|
2788
|
-
} else if (typeof
|
|
2789
|
-
const m =
|
|
2790
|
-
c = br(
|
|
2791
|
-
} else typeof
|
|
2853
|
+
if (F && t > 0) {
|
|
2854
|
+
const m = re(Math.trunc(F.index), 0, t - 1), V = Math.max(0, F.offsetPx ?? 0), q = re(m - s * 2, 0, t - 1), G = re(m + s * 2, 0, t - 1), j = m > 0 || V > 0 ? { materializeOption: { materialize: !0, ranges: [{ from: q, to: G }] } } : void 0, { cumulative: fe, currentValue: Fe } = y.prefixSum(m, j), ct = Math.max(fe - Fe + V, 0);
|
|
2855
|
+
c = br(ct, H.top), h = y.getTotal();
|
|
2856
|
+
} else if (typeof M == "number") {
|
|
2857
|
+
const m = re(M, 0, t - 1), V = re(m - s * 2, 0, t - 1), q = re(m + s * 2, 0, t - 1), G = M > 0 ? { materializeOption: { materialize: !0, ranges: [{ from: V, to: q }] } } : void 0, { cumulative: j, currentValue: fe } = y.prefixSum(M, G), Fe = Math.max(j - fe, 0);
|
|
2858
|
+
c = br(Fe, H.top), h = y.getTotal();
|
|
2859
|
+
} else typeof _ == "number" && (c = br(Math.max(_, 0), H.top)), h = y.getTotal();
|
|
2792
2860
|
return { position: c, total: h };
|
|
2793
|
-
}), [
|
|
2794
|
-
|
|
2795
|
-
}, []),
|
|
2796
|
-
const h =
|
|
2797
|
-
h === m || h !== null && m !== null && h.edge === m.edge && h.panePosition === m.panePosition || (
|
|
2861
|
+
}), [St, $t] = Ce(Xe.position), [v, Y] = Ce(Xe.total), [te, le] = Ce(() => F && t > 0 || typeof M == "number" ? En({ edge: "start", panePosition: Xe.position }) : null), ae = u(te), Ee = u(v), Te = p((c) => {
|
|
2862
|
+
Ee.current !== c && (Ee.current = c, Y(c));
|
|
2863
|
+
}, []), Me = p((c) => {
|
|
2864
|
+
const h = ae.current, m = En(c);
|
|
2865
|
+
h === m || h !== null && m !== null && h.edge === m.edge && h.panePosition === m.panePosition || (ae.current = m, le(m));
|
|
2798
2866
|
}, []), at = p(
|
|
2799
2867
|
(c, h) => {
|
|
2800
|
-
const m =
|
|
2801
|
-
m === null || Math.abs(m.panePosition - c) > fr ||
|
|
2868
|
+
const m = ae.current;
|
|
2869
|
+
m === null || Math.abs(m.panePosition - c) > fr || Me({ edge: m.edge, panePosition: h });
|
|
2802
2870
|
},
|
|
2803
|
-
[
|
|
2871
|
+
[Me]
|
|
2804
2872
|
), Be = p(() => {
|
|
2805
|
-
|
|
2806
|
-
}, [
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
}, [
|
|
2810
|
-
const Je = u(/* @__PURE__ */ new Map()), w = u(null),
|
|
2811
|
-
const c = me.current, h =
|
|
2873
|
+
ae.current !== null && Me(null);
|
|
2874
|
+
}, [Me]), U = u(Xe.position), gt = u(H.top), ve = u(f ?? void 0), Re = u(g ?? void 0), Le = u(x), Et = u(R), Ue = (B?.length ?? 0) > 0, qe = !!R;
|
|
2875
|
+
W(() => {
|
|
2876
|
+
Ue && (we || L.warn("[VirtualScroll] horizontalKeyInputs is set but behaviorOptions.enableKeyboardNavigation is false; horizontal keyboard scrolling is disabled because the row key handler is not mounted."), qe || L.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(k) && k > 0 || L.warn(`[VirtualScroll] horizontalKeyStep must be a finite positive number, received ${k}. Horizontal arrow keys are left untouched.`));
|
|
2877
|
+
}, [Ue, qe, we, k]);
|
|
2878
|
+
const Je = u(/* @__PURE__ */ new Map()), w = u(null), P = u(null), [Ye, ye] = Ce(null), [Ge, et] = Ce(!1), _e = u(null), me = u(null), bt = u(null), Qt = u(null), hr = p(() => {
|
|
2879
|
+
const c = me.current, h = bt.current, m = Qt.current;
|
|
2812
2880
|
if (c === null || h === null || m === null || c.dataset.visible !== "true")
|
|
2813
2881
|
return Xi;
|
|
2814
|
-
const V = Zr(c, "y"),
|
|
2815
|
-
return j + fe < D ? { top:
|
|
2816
|
-
}, [D]), Ft = u(!1),
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
}, [
|
|
2882
|
+
const V = Zr(c, "y"), q = m.getBoundingClientRect().top, G = h.getBoundingClientRect(), j = (G.top - q) / V, fe = (G.bottom - q) / V;
|
|
2883
|
+
return j + fe < D ? { top: re(fe, 0, D), bottom: 0 } : { top: 0, bottom: re(D - j, 0, D) };
|
|
2884
|
+
}, [D]), Ft = u(!1), Mt = u(0), Dt = u(!1), Gt = u(!1), zt = u(t);
|
|
2885
|
+
zt.current !== t && (zt.current = t, Gt.current = !0), We(() => {
|
|
2886
|
+
ve.current = f ?? void 0, Re.current = g ?? void 0, Le.current = x, Et.current = R;
|
|
2887
|
+
}, [g, f, x, R]);
|
|
2820
2888
|
const or = p(
|
|
2821
2889
|
(c) => {
|
|
2822
|
-
if (
|
|
2890
|
+
if (we && c && typeof c.focus == "function")
|
|
2823
2891
|
try {
|
|
2824
2892
|
c.focus({ preventScroll: !0 });
|
|
2825
2893
|
} catch {
|
|
2826
2894
|
c.focus();
|
|
2827
2895
|
}
|
|
2828
2896
|
},
|
|
2829
|
-
[
|
|
2897
|
+
[we]
|
|
2830
2898
|
), Ir = p((c, { position: h, totalHeight: m }) => {
|
|
2831
2899
|
c(h, m);
|
|
2832
|
-
}, []), kt = Nn(
|
|
2900
|
+
}, []), kt = Nn(ve, J, Ir), vr = p((c, h) => {
|
|
2833
2901
|
c(h);
|
|
2834
|
-
}, []), ar = Nn(
|
|
2902
|
+
}, []), ar = Nn(Re, J, vr), Lt = u(H.top);
|
|
2835
2903
|
Lt.current = H.top;
|
|
2836
2904
|
const cr = u(kt);
|
|
2837
|
-
cr.current = kt,
|
|
2838
|
-
|
|
2839
|
-
}), []),
|
|
2840
|
-
|
|
2841
|
-
}, [
|
|
2842
|
-
const
|
|
2905
|
+
cr.current = kt, W(() => (Ae.current = !1, () => {
|
|
2906
|
+
Ae.current = !0, _e.current && (clearTimeout(_e.current), _e.current = null);
|
|
2907
|
+
}), []), W(() => {
|
|
2908
|
+
we || (Je.current.clear(), w.current = null, P.current = null);
|
|
2909
|
+
}, [we]);
|
|
2910
|
+
const Xt = p(
|
|
2843
2911
|
(c, h) => {
|
|
2844
2912
|
if (!h) {
|
|
2845
2913
|
Je.current.delete(c);
|
|
2846
2914
|
return;
|
|
2847
2915
|
}
|
|
2848
|
-
|
|
2916
|
+
we && (Je.current.set(c, h), w.current === c && (w.current = null, P.current = c, or(h)));
|
|
2849
2917
|
},
|
|
2850
|
-
[
|
|
2918
|
+
[we, or]
|
|
2851
2919
|
), d = 0.01, E = u({
|
|
2852
2920
|
rafId: null,
|
|
2853
2921
|
loopActive: !1,
|
|
2854
2922
|
idleFrames: 0,
|
|
2855
2923
|
lastRenderedPosition: Xe.position
|
|
2856
|
-
}),
|
|
2924
|
+
}), O = p(() => {
|
|
2857
2925
|
const c = E.current;
|
|
2858
2926
|
c.rafId !== null && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(c.rafId), c.rafId = null, c.loopActive = !1, c.idleFrames = 0;
|
|
2859
2927
|
}, []);
|
|
2860
|
-
|
|
2928
|
+
W(
|
|
2861
2929
|
() => () => {
|
|
2862
|
-
|
|
2930
|
+
O();
|
|
2863
2931
|
},
|
|
2864
|
-
[
|
|
2932
|
+
[O]
|
|
2865
2933
|
);
|
|
2866
2934
|
const ue = u(() => {
|
|
2867
|
-
}),
|
|
2935
|
+
}), De = p(() => {
|
|
2868
2936
|
const c = E.current;
|
|
2869
2937
|
c.rafId = null;
|
|
2870
|
-
const h = U.current, m =
|
|
2871
|
-
if (
|
|
2872
|
-
|
|
2938
|
+
const h = U.current, m = Tt(h, Lt.current), V = y.getTotal();
|
|
2939
|
+
if ($t((G) => Math.abs(G - h) < d ? G : h), Math.abs(c.lastRenderedPosition - h) >= d ? (cr.current({ position: m, totalHeight: V }), c.lastRenderedPosition = h, c.idleFrames = 0) : c.idleFrames += 1, c.idleFrames >= 2) {
|
|
2940
|
+
O();
|
|
2873
2941
|
return;
|
|
2874
2942
|
}
|
|
2875
2943
|
if (typeof requestAnimationFrame == "function") {
|
|
@@ -2877,260 +2945,260 @@ const Hi = 1e4, ds = () => {
|
|
|
2877
2945
|
return;
|
|
2878
2946
|
}
|
|
2879
2947
|
c.loopActive = !1;
|
|
2880
|
-
}, [y,
|
|
2881
|
-
ue.current =
|
|
2948
|
+
}, [y, O]);
|
|
2949
|
+
ue.current = De;
|
|
2882
2950
|
const tt = p(() => {
|
|
2883
2951
|
const c = E.current;
|
|
2884
2952
|
if (c.idleFrames = 0, !c.loopActive) {
|
|
2885
2953
|
if (c.loopActive = !0, typeof requestAnimationFrame == "function") {
|
|
2886
|
-
c.rafId = requestAnimationFrame(
|
|
2954
|
+
c.rafId = requestAnimationFrame(De);
|
|
2887
2955
|
return;
|
|
2888
2956
|
}
|
|
2889
2957
|
c.loopActive = !1;
|
|
2890
2958
|
}
|
|
2891
|
-
}, [
|
|
2959
|
+
}, [De]), de = p(
|
|
2892
2960
|
(c, h) => {
|
|
2893
|
-
const m = h?.immediate ?? !1, V =
|
|
2961
|
+
const m = h?.immediate ?? !1, V = Tt(c, H.top);
|
|
2894
2962
|
if (U.current = c, m) {
|
|
2895
|
-
E.current.lastRenderedPosition = c, E.current.idleFrames = 0,
|
|
2963
|
+
E.current.lastRenderedPosition = c, E.current.idleFrames = 0, $t(c), kt({ position: V, totalHeight: y.getTotal() });
|
|
2896
2964
|
return;
|
|
2897
2965
|
}
|
|
2898
2966
|
tt();
|
|
2899
2967
|
},
|
|
2900
2968
|
[tt, y, H.top, kt]
|
|
2901
|
-
),
|
|
2902
|
-
const m =
|
|
2969
|
+
), Oe = p((c, h = 0) => {
|
|
2970
|
+
const m = A.current;
|
|
2903
2971
|
if (!m)
|
|
2904
2972
|
return c;
|
|
2905
2973
|
const V = m.getScrollPosition();
|
|
2906
|
-
|
|
2907
|
-
const
|
|
2908
|
-
return j === V && (
|
|
2909
|
-
}, []),
|
|
2910
|
-
const m =
|
|
2974
|
+
Mt.current += 1;
|
|
2975
|
+
const q = m.getContentSize() + h, G = m.getViewportSize(), j = m.scrollTo(c, { contentSize: q, viewportSize: G });
|
|
2976
|
+
return j === V && (Mt.current = Math.max(0, Mt.current - 1)), Math.abs(j - c) > 0.5 && (Dt.current = !0), j;
|
|
2977
|
+
}, []), vt = p((c, h) => {
|
|
2978
|
+
const m = A.current;
|
|
2911
2979
|
if (m === null) {
|
|
2912
2980
|
h();
|
|
2913
2981
|
return;
|
|
2914
2982
|
}
|
|
2915
2983
|
const V = m.getScrollPosition();
|
|
2916
2984
|
h();
|
|
2917
|
-
const
|
|
2918
|
-
if (
|
|
2985
|
+
const q = Le.current;
|
|
2986
|
+
if (q === void 0)
|
|
2919
2987
|
return;
|
|
2920
|
-
const G =
|
|
2921
|
-
j !== 0 &&
|
|
2988
|
+
const G = Tt(m.getScrollPosition(), Lt.current), j = G - Tt(V, Lt.current);
|
|
2989
|
+
j !== 0 && q({ position: G, delta: j, cause: c });
|
|
2922
2990
|
}, []), jt = u(!1);
|
|
2923
|
-
|
|
2991
|
+
W(() => {
|
|
2924
2992
|
if (!jt.current)
|
|
2925
|
-
if (jt.current = !0,
|
|
2926
|
-
const c = br(Math.max(
|
|
2927
|
-
de(c, { immediate: !0 }), h &&
|
|
2993
|
+
if (jt.current = !0, F == null && typeof M != "number" && typeof _ == "number") {
|
|
2994
|
+
const c = br(Math.max(_, 0), H.top), h = Math.abs(c - U.current) > 0.5;
|
|
2995
|
+
de(c, { immediate: !0 }), h && A.current?.scrollTo(c);
|
|
2928
2996
|
} else
|
|
2929
2997
|
de(U.current, { immediate: !0 });
|
|
2930
|
-
}, [
|
|
2998
|
+
}, [F, M, _, H.top, de]), W(() => {
|
|
2931
2999
|
const c = y.getTotal();
|
|
2932
3000
|
if (v !== c) {
|
|
2933
|
-
|
|
3001
|
+
Te(c);
|
|
2934
3002
|
return;
|
|
2935
3003
|
}
|
|
2936
|
-
if (
|
|
2937
|
-
|
|
2938
|
-
const h =
|
|
2939
|
-
h && Math.abs(h.getScrollPosition() - U.current) > 0.5 &&
|
|
2940
|
-
const m =
|
|
2941
|
-
|
|
3004
|
+
if (Dt.current) {
|
|
3005
|
+
Dt.current = !1;
|
|
3006
|
+
const h = A.current;
|
|
3007
|
+
h && Math.abs(h.getScrollPosition() - U.current) > 0.5 && vt("re-issue", () => {
|
|
3008
|
+
const m = Oe(U.current);
|
|
3009
|
+
Dt.current = !1, de(m, { immediate: !0 });
|
|
2942
3010
|
});
|
|
2943
3011
|
}
|
|
2944
|
-
}, [y, v, t,
|
|
2945
|
-
if (
|
|
2946
|
-
const { index: c, align: h, offset: m } =
|
|
2947
|
-
if (
|
|
2948
|
-
const j = Math.max(
|
|
3012
|
+
}, [y, v, t, vt, Oe, de]), W(() => {
|
|
3013
|
+
if (z.current !== null) {
|
|
3014
|
+
const { index: c, align: h, offset: m } = z.current, V = lt(c, t), { cumulative: q, currentValue: G } = y.prefixSum(V, it);
|
|
3015
|
+
if (q !== void 0 && G !== void 0) {
|
|
3016
|
+
const j = Math.max(q - G, 0);
|
|
2949
3017
|
let fe = j;
|
|
2950
|
-
h === "bottom" ? fe =
|
|
2951
|
-
const
|
|
2952
|
-
Math.abs(
|
|
3018
|
+
h === "bottom" ? fe = q - D : h === "center" && (fe = j + G / 2 - D / 2), m && (fe -= m), fe = Math.max(0, fe);
|
|
3019
|
+
const Fe = Math.max(0, v + H.top + H.bottom - D), ct = Math.min(br(fe, H.top), Fe);
|
|
3020
|
+
Math.abs(ct - U.current) > fr && (L.debug("[VirtualScroll] Drift correction", {
|
|
2953
3021
|
from: U.current,
|
|
2954
|
-
to:
|
|
3022
|
+
to: ct,
|
|
2955
3023
|
targetIndex: V
|
|
2956
|
-
}),
|
|
2957
|
-
|
|
2958
|
-
const
|
|
2959
|
-
|
|
3024
|
+
}), vt("drift", () => {
|
|
3025
|
+
Mt.current === 0 && (Mt.current += 1), A.current?.scrollTo(ct), de(ct, { immediate: !0 });
|
|
3026
|
+
const Ie = Pn(h);
|
|
3027
|
+
Me(Ie === null ? null : { edge: Ie, panePosition: ct });
|
|
2960
3028
|
}));
|
|
2961
3029
|
}
|
|
2962
3030
|
}
|
|
2963
3031
|
Gt.current = !1;
|
|
2964
|
-
}, [v, y, t, H.top,
|
|
2965
|
-
const c =
|
|
2966
|
-
if (c === H.top || (
|
|
3032
|
+
}, [v, y, t, H.top, vt, Me, de, D, H.bottom, Te]), W(() => {
|
|
3033
|
+
const c = gt.current;
|
|
3034
|
+
if (c === H.top || (gt.current = H.top, z.current))
|
|
2967
3035
|
return;
|
|
2968
|
-
const h =
|
|
2969
|
-
U.current = m,
|
|
3036
|
+
const h = Tt(U.current, c), m = br(h, H.top);
|
|
3037
|
+
U.current = m, A.current?.scrollTo(m), de(m, { immediate: !0 });
|
|
2970
3038
|
}, [H.top, de]);
|
|
2971
3039
|
const It = p(
|
|
2972
3040
|
(c, h) => {
|
|
2973
3041
|
if (t === 0)
|
|
2974
3042
|
return;
|
|
2975
|
-
const m =
|
|
2976
|
-
G !== void 0 &&
|
|
2977
|
-
let j =
|
|
3043
|
+
const m = lt(c, t), V = y.get(m), q = h - V, G = mt(() => y.update(m, h));
|
|
3044
|
+
G !== void 0 && Te(G), L.debug("[VirtualScroll] Updated item size manually", { index: m, size: h, total: G });
|
|
3045
|
+
let j = z.current ? z.current.index : null;
|
|
2978
3046
|
if (j === null) {
|
|
2979
|
-
const fe = U.current,
|
|
2980
|
-
j =
|
|
3047
|
+
const fe = U.current, Fe = In(ie).top, ct = Tt(fe, Fe);
|
|
3048
|
+
j = zr(y, ct, t).index;
|
|
2981
3049
|
}
|
|
2982
|
-
if (m < j &&
|
|
2983
|
-
const fe = U.current,
|
|
2984
|
-
|
|
2985
|
-
Fe
|
|
2986
|
-
}),
|
|
3050
|
+
if (m < j && q !== 0) {
|
|
3051
|
+
const fe = U.current, Fe = fe + q;
|
|
3052
|
+
vt("item-resize", () => {
|
|
3053
|
+
Oe(Fe, q), de(Fe, { immediate: !0 }), at(fe, Fe);
|
|
3054
|
+
}), L.debug("[VirtualScroll] Adjusted scroll for layout shift (manual update)", { from: fe, to: Fe, causedByIndex: m, delta: q, activeVisibleStartIndex: j });
|
|
2987
3055
|
}
|
|
2988
3056
|
},
|
|
2989
|
-
[y, t,
|
|
3057
|
+
[y, t, vt, at, mt, Oe, de, ie, Te]
|
|
2990
3058
|
), rt = p(
|
|
2991
3059
|
(c, h) => {
|
|
2992
|
-
if (!
|
|
3060
|
+
if (!A.current || t === 0)
|
|
2993
3061
|
return;
|
|
2994
|
-
const m =
|
|
3062
|
+
const m = lt(c, t);
|
|
2995
3063
|
let V;
|
|
2996
3064
|
if (h?.align === "nearest") {
|
|
2997
3065
|
const Yr = h.offset;
|
|
2998
3066
|
if (Yr !== void 0)
|
|
2999
3067
|
throw new RangeError(`[VirtualScroll] scrollToIndex: align "nearest" takes no offset (it lands the row at the edge of the band a visible scroll-to-edge pill leaves); received an offset of type ${typeof Yr}.`);
|
|
3000
|
-
const o = y.prefixSum(m, it),
|
|
3001
|
-
if (
|
|
3068
|
+
const o = y.prefixSum(m, it), b = Bi({ top: o.cumulative - o.currentValue, bottom: o.cumulative }, Tt(U.current, H.top), D, hr());
|
|
3069
|
+
if (b === null)
|
|
3002
3070
|
return;
|
|
3003
|
-
V =
|
|
3071
|
+
V = b;
|
|
3004
3072
|
} else
|
|
3005
3073
|
V = h;
|
|
3006
|
-
const
|
|
3007
|
-
if (
|
|
3074
|
+
const q = lt(m - s * 2, t), G = lt(m + s * 2, t), { cumulative: j, total: fe, currentValue: Fe } = mt(() => y.prefixSum(m, { materializeOption: { materialize: !0, ranges: [{ from: q, to: G }] } }));
|
|
3075
|
+
if (L.debug("[VirtualScroll] Scrolling to index:", m, "ItemBottom:", j, "Total height:", fe, "ItemHeight:", Fe, "safeIndexFrom:", q, "safeIndexTo:", G), !fe)
|
|
3008
3076
|
return;
|
|
3009
|
-
const
|
|
3010
|
-
let
|
|
3011
|
-
V?.align === "bottom" ?
|
|
3012
|
-
const
|
|
3013
|
-
|
|
3077
|
+
const ct = Math.max(j - Fe, 0);
|
|
3078
|
+
let Ie = ct;
|
|
3079
|
+
V?.align === "bottom" ? Ie = j - D : V?.align === "center" && (Ie = ct + Fe / 2 - D / 2), V?.offset && (Ie -= V.offset), Ie = Math.max(0, Ie);
|
|
3080
|
+
const Wt = br(Ie, H.top), xt = A.current?.getContentSize() ?? fe + H.top + H.bottom, dt = Math.max(0, xt - D), _t = Math.min(Wt, dt);
|
|
3081
|
+
z.current = {
|
|
3014
3082
|
index: m,
|
|
3015
3083
|
align: V?.align,
|
|
3016
3084
|
offset: V?.offset
|
|
3017
3085
|
};
|
|
3018
3086
|
const ir = Pn(V?.align);
|
|
3019
|
-
|
|
3020
|
-
const Mr = !E.current.loopActive && U.current === _t, Br =
|
|
3021
|
-
Ft.current = !1,
|
|
3087
|
+
Me(ir === null ? null : { edge: ir, panePosition: _t });
|
|
3088
|
+
const Mr = !E.current.loopActive && U.current === _t, Br = A.current?.getScrollPosition() ?? -1, qr = Math.abs(Br - _t) > fr;
|
|
3089
|
+
Ft.current = !1, Mt.current = 0, qr && (Ft.current = !0, Mt.current += 1, A.current?.scrollTo(_t)), Te(fe), Mr || de(_t, { immediate: !0 }), L.debug("[VirtualScroll] Setting scroll position to:", _t, { original: Wt, max: dt });
|
|
3022
3090
|
},
|
|
3023
|
-
[y, s, t, H.top, H.bottom, D,
|
|
3024
|
-
), Jt = u(
|
|
3025
|
-
|
|
3091
|
+
[y, s, t, H.top, H.bottom, D, mt, hr, Me, de, Te]
|
|
3092
|
+
), Jt = u(F && t === 0 ? F : null);
|
|
3093
|
+
W(() => {
|
|
3026
3094
|
const c = Jt.current;
|
|
3027
|
-
!c || t === 0 || (Jt.current = null, rt(
|
|
3095
|
+
!c || t === 0 || (Jt.current = null, rt(re(Math.trunc(c.index), 0, t - 1), { align: "top", offset: -Math.max(0, c.offsetPx ?? 0) }));
|
|
3028
3096
|
}, [t, rt]);
|
|
3029
|
-
const
|
|
3097
|
+
const Bt = p(
|
|
3030
3098
|
(c) => {
|
|
3031
|
-
if (!
|
|
3099
|
+
if (!A.current || t === 0)
|
|
3032
3100
|
return;
|
|
3033
|
-
const h = y.getTotal(), m =
|
|
3101
|
+
const h = y.getTotal(), m = re(Math.floor(c), 0, h), V = zr(y, m, t);
|
|
3034
3102
|
rt(V.index, { offset: V.top - m });
|
|
3035
3103
|
},
|
|
3036
3104
|
[y, t, rt]
|
|
3037
3105
|
), er = p(() => {
|
|
3038
3106
|
if (t === 0)
|
|
3039
3107
|
return null;
|
|
3040
|
-
const c =
|
|
3108
|
+
const c = Tt(U.current, H.top), h = zr(y, c, t);
|
|
3041
3109
|
return { index: h.index, offsetPx: Math.max(0, c - h.top) };
|
|
3042
3110
|
}, [y, t, H.top]), lr = p(
|
|
3043
3111
|
(c) => {
|
|
3044
|
-
const h =
|
|
3045
|
-
|
|
3046
|
-
const V =
|
|
3047
|
-
return de(
|
|
3112
|
+
const h = Tt(U.current, H.top), m = typeof c == "function" ? c(h) : c;
|
|
3113
|
+
Bt(m);
|
|
3114
|
+
const V = A.current?.getScrollPosition(), q = typeof V == "number" ? V : U.current;
|
|
3115
|
+
return de(q), Tt(q, Lt.current);
|
|
3048
3116
|
},
|
|
3049
|
-
[H.top,
|
|
3117
|
+
[H.top, Bt, de]
|
|
3050
3118
|
), tr = p((c) => {
|
|
3051
|
-
const h =
|
|
3119
|
+
const h = A.current;
|
|
3052
3120
|
if (!h)
|
|
3053
|
-
return
|
|
3121
|
+
return Tt(U.current, Lt.current);
|
|
3054
3122
|
const m = h.scrollTo((V) => V + c);
|
|
3055
|
-
return
|
|
3056
|
-
}, []), Nt = p((c) =>
|
|
3123
|
+
return Tt(m, Lt.current);
|
|
3124
|
+
}, []), Nt = p((c) => A.current?.applyWheel(c) ?? !1, []), pr = p(
|
|
3057
3125
|
(c, h) => {
|
|
3058
|
-
|
|
3126
|
+
L.debug("[VirtualScroll] Scroll position changed:", c);
|
|
3059
3127
|
const m = Ft.current;
|
|
3060
3128
|
m && (Ft.current = !1);
|
|
3061
|
-
const V =
|
|
3062
|
-
V && (
|
|
3063
|
-
const
|
|
3064
|
-
if (m || V ||
|
|
3129
|
+
const V = Mt.current > 0;
|
|
3130
|
+
V && (Mt.current = 0);
|
|
3131
|
+
const q = Gt.current && zt.current === t;
|
|
3132
|
+
if (m || V || q || (z.current = null, Be()), de(c), He) {
|
|
3065
3133
|
if (m || V)
|
|
3066
3134
|
return;
|
|
3067
3135
|
const G = c - h;
|
|
3068
|
-
if (
|
|
3136
|
+
if (L.debug("[VirtualScroll] Scroll diff:", G, "New:", c, "Prev:", h), Math.abs(G) > 1) {
|
|
3069
3137
|
const j = G > 0 ? "down" : "up";
|
|
3070
|
-
|
|
3071
|
-
et(!1),
|
|
3138
|
+
ye(j), et(!0), L.debug("[VirtualScroll] Showing scroll buttons. Direction:", j), _e.current && clearTimeout(_e.current), _e.current = setTimeout(() => {
|
|
3139
|
+
et(!1), L.debug("[VirtualScroll] Hiding scroll buttons");
|
|
3072
3140
|
}, 2e3);
|
|
3073
3141
|
}
|
|
3074
3142
|
}
|
|
3075
3143
|
},
|
|
3076
3144
|
[de, Be, He, t]
|
|
3077
|
-
), Ct = ge(() =>
|
|
3145
|
+
), Ct = ge(() => Tt(St, H.top), [H.top, St]), ut = ge(() => {
|
|
3078
3146
|
const c = y.getTotal(), h = Qn(Ct, D, s, t, n, y, c);
|
|
3079
|
-
return
|
|
3147
|
+
return L.debug("[VirtualScroll] Calculated rendering range:", () => ({
|
|
3080
3148
|
...h,
|
|
3081
3149
|
scrollPosition: Ct,
|
|
3082
3150
|
renderingContentSize: c,
|
|
3083
3151
|
overscanCount: s,
|
|
3084
3152
|
viewportSize: D
|
|
3085
3153
|
})), h;
|
|
3086
|
-
}, [Ct, D, s, t, n, y,
|
|
3154
|
+
}, [Ct, D, s, t, n, y, Ht]), { renderingStartIndex: rr, renderingEndIndex: Pt, visibleStartIndex: qt, visibleEndIndex: Yt } = ut, Ne = p(
|
|
3087
3155
|
(c, h) => {
|
|
3088
|
-
if (!
|
|
3156
|
+
if (!we || t === 0)
|
|
3089
3157
|
return;
|
|
3090
|
-
const m =
|
|
3158
|
+
const m = lt(c, t), V = h?.ensureVisible ?? !0;
|
|
3091
3159
|
V && rt(m, { align: "nearest" });
|
|
3092
|
-
const
|
|
3093
|
-
if (
|
|
3094
|
-
w.current = null,
|
|
3160
|
+
const q = Je.current.get(m);
|
|
3161
|
+
if (q) {
|
|
3162
|
+
w.current = null, P.current = m, or(q);
|
|
3095
3163
|
return;
|
|
3096
3164
|
}
|
|
3097
3165
|
V && (w.current = m);
|
|
3098
3166
|
},
|
|
3099
|
-
[
|
|
3100
|
-
),
|
|
3167
|
+
[we, t, rt, or]
|
|
3168
|
+
), xr = p(
|
|
3101
3169
|
(c, h) => {
|
|
3102
|
-
if (!(!
|
|
3170
|
+
if (!(!we || c.defaultPrevented) && !(c.altKey || c.metaKey || c.ctrlKey) && c.target === c.currentTarget && !c.currentTarget.isContentEditable) {
|
|
3103
3171
|
if (c.key === "ArrowLeft" || c.key === "ArrowRight") {
|
|
3104
3172
|
const m = Et.current;
|
|
3105
|
-
if (!m || c.shiftKey ||
|
|
3173
|
+
if (!m || c.shiftKey || !B?.includes("arrow") || !(Number.isFinite(k) && k > 0))
|
|
3106
3174
|
return;
|
|
3107
|
-
c.preventDefault(), m(c.key === "ArrowLeft" ? -
|
|
3175
|
+
c.preventDefault(), m(c.key === "ArrowLeft" ? -k : k);
|
|
3108
3176
|
return;
|
|
3109
3177
|
}
|
|
3110
3178
|
if (c.key === "ArrowDown") {
|
|
3111
|
-
h < t - 1 && (c.preventDefault(),
|
|
3179
|
+
h < t - 1 && (c.preventDefault(), Ne(h + 1));
|
|
3112
3180
|
return;
|
|
3113
3181
|
}
|
|
3114
3182
|
if (c.key === "ArrowUp") {
|
|
3115
|
-
h > 0 && (c.preventDefault(),
|
|
3183
|
+
h > 0 && (c.preventDefault(), Ne(h - 1));
|
|
3116
3184
|
return;
|
|
3117
3185
|
}
|
|
3118
3186
|
if (c.key === "PageDown") {
|
|
3119
3187
|
if (h < t - 1) {
|
|
3120
3188
|
c.preventDefault();
|
|
3121
|
-
const { visibleStartIndex: m, visibleEndIndex: V } =
|
|
3122
|
-
|
|
3189
|
+
const { visibleStartIndex: m, visibleEndIndex: V } = ft.current, q = Math.max(V - m + 1, 1), G = Math.max(q, 1), j = lt(Math.min(h + G, t - 1), t);
|
|
3190
|
+
Ne(j);
|
|
3123
3191
|
}
|
|
3124
3192
|
return;
|
|
3125
3193
|
}
|
|
3126
3194
|
if (c.key === "PageUp" && h > 0) {
|
|
3127
3195
|
c.preventDefault();
|
|
3128
|
-
const { visibleStartIndex: m, visibleEndIndex: V } =
|
|
3129
|
-
|
|
3196
|
+
const { visibleStartIndex: m, visibleEndIndex: V } = ft.current, q = Math.max(V - m + 1, 1), G = Math.max(q, 1), j = lt(h - G, t);
|
|
3197
|
+
Ne(j);
|
|
3130
3198
|
}
|
|
3131
3199
|
}
|
|
3132
3200
|
},
|
|
3133
|
-
[
|
|
3201
|
+
[we, t, Ne, B, k]
|
|
3134
3202
|
), Pr = p(
|
|
3135
3203
|
/**
|
|
3136
3204
|
* Returns focus from an element inside the row back to the row wrapper on Escape.
|
|
@@ -3143,26 +3211,26 @@ const Hi = 1e4, ds = () => {
|
|
|
3143
3211
|
if (c.key !== "Escape" || c.defaultPrevented || c.nativeEvent.isComposing || c.target === c.currentTarget)
|
|
3144
3212
|
return;
|
|
3145
3213
|
const m = c.target;
|
|
3146
|
-
m instanceof HTMLInputElement || m instanceof HTMLTextAreaElement || m instanceof HTMLSelectElement || m.isContentEditable || (c.preventDefault(),
|
|
3214
|
+
m instanceof HTMLInputElement || m instanceof HTMLTextAreaElement || m instanceof HTMLSelectElement || m.isContentEditable || (c.preventDefault(), Ne(h));
|
|
3147
3215
|
},
|
|
3148
|
-
[
|
|
3216
|
+
[Ne]
|
|
3149
3217
|
), Er = p(
|
|
3150
3218
|
(c) => {
|
|
3151
|
-
if (!
|
|
3219
|
+
if (!we)
|
|
3152
3220
|
return;
|
|
3153
|
-
const h =
|
|
3154
|
-
w.current = null,
|
|
3221
|
+
const h = lt(c, t);
|
|
3222
|
+
w.current = null, P.current = h, ze?.(h);
|
|
3155
3223
|
},
|
|
3156
|
-
[
|
|
3224
|
+
[we, t, ze]
|
|
3157
3225
|
);
|
|
3158
|
-
|
|
3159
|
-
const c =
|
|
3160
|
-
|
|
3226
|
+
W(() => {
|
|
3227
|
+
const c = A.current?.getScrollPosition() ?? 0, h = U.current, m = Tt(h, H.top);
|
|
3228
|
+
L.debug("[VirtualScroll] Range change effect triggered", () => ({
|
|
3161
3229
|
renderingStartIndex: rr,
|
|
3162
3230
|
renderingEndIndex: Pt,
|
|
3163
|
-
visibleStartIndex:
|
|
3164
|
-
visibleEndIndex:
|
|
3165
|
-
scrollPositionState:
|
|
3231
|
+
visibleStartIndex: qt,
|
|
3232
|
+
visibleEndIndex: Yt,
|
|
3233
|
+
scrollPositionState: St,
|
|
3166
3234
|
paneScrollPosition: h,
|
|
3167
3235
|
logicalScrollPosition: m,
|
|
3168
3236
|
contentSize: v,
|
|
@@ -3170,141 +3238,140 @@ const Hi = 1e4, ds = () => {
|
|
|
3170
3238
|
})), ar({
|
|
3171
3239
|
renderingStartIndex: rr,
|
|
3172
3240
|
renderingEndIndex: Pt,
|
|
3173
|
-
visibleStartIndex:
|
|
3174
|
-
visibleEndIndex:
|
|
3241
|
+
visibleStartIndex: qt,
|
|
3242
|
+
visibleEndIndex: Yt,
|
|
3175
3243
|
scrollPosition: m,
|
|
3176
3244
|
totalHeight: v
|
|
3177
3245
|
});
|
|
3178
|
-
}, [v, Pt, rr, H.top, ar,
|
|
3246
|
+
}, [v, Pt, rr, H.top, ar, St, Yt, qt]);
|
|
3179
3247
|
const en = p(() => {
|
|
3180
3248
|
if (!He)
|
|
3181
3249
|
return null;
|
|
3182
|
-
const c =
|
|
3183
|
-
return /* @__PURE__ */
|
|
3250
|
+
const c = Ge && Ye !== null, h = Ye === "up", m = c && !Rt ? 0 : -1;
|
|
3251
|
+
return /* @__PURE__ */ Z("div", { ref: me, className: "aqvs-scroll-to-edge-overlay", "data-visible": c, inert: !c, "aria-hidden": Rt ? !0 : void 0, onPointerDown: Rt ? qn : void 0, children: h ? /* @__PURE__ */ Z("div", { className: "aqvs-scroll-to-edge-button-container aqvs-scroll-to-edge-button-container-top", children: /* @__PURE__ */ Z(
|
|
3184
3252
|
"button",
|
|
3185
3253
|
{
|
|
3186
|
-
ref:
|
|
3254
|
+
ref: bt,
|
|
3187
3255
|
type: "button",
|
|
3188
3256
|
className: "aqvs-scroll-to-edge-button",
|
|
3189
3257
|
tabIndex: m,
|
|
3190
3258
|
onClick: (V) => {
|
|
3191
3259
|
V.stopPropagation(), Ft.current = !0, rt(0), et(!1);
|
|
3192
3260
|
},
|
|
3193
|
-
children:
|
|
3261
|
+
children: ne.scrollToTop
|
|
3194
3262
|
}
|
|
3195
|
-
) }) : /* @__PURE__ */
|
|
3263
|
+
) }) : /* @__PURE__ */ Z("div", { className: "aqvs-scroll-to-edge-button-container aqvs-scroll-to-edge-button-container-bottom", children: /* @__PURE__ */ Z(
|
|
3196
3264
|
"button",
|
|
3197
3265
|
{
|
|
3198
|
-
ref:
|
|
3266
|
+
ref: bt,
|
|
3199
3267
|
type: "button",
|
|
3200
3268
|
className: "aqvs-scroll-to-edge-button",
|
|
3201
3269
|
tabIndex: m,
|
|
3202
3270
|
onClick: (V) => {
|
|
3203
3271
|
V.stopPropagation(), Ft.current = !0, rt(t - 1), et(!1);
|
|
3204
3272
|
},
|
|
3205
|
-
children:
|
|
3273
|
+
children: ne.scrollToBottom
|
|
3206
3274
|
}
|
|
3207
3275
|
) }) });
|
|
3208
|
-
}, [He, Rt,
|
|
3276
|
+
}, [He, Rt, Ge, Ye, rt, t, ne]), Nr = u(0), { visibleItems: Cr, renderAnchor: mr } = ge(() => {
|
|
3209
3277
|
if (t === 0)
|
|
3210
3278
|
return {
|
|
3211
|
-
visibleItems: /* @__PURE__ */
|
|
3279
|
+
visibleItems: /* @__PURE__ */ Z("div", { className: "aqvs-no-items-container", children: /* @__PURE__ */ Z("div", { className: "aqvs-no-items-text", children: ne.noItems }) }),
|
|
3212
3280
|
renderAnchor: 0
|
|
3213
3281
|
};
|
|
3214
|
-
const c =
|
|
3215
|
-
Number.isFinite(
|
|
3282
|
+
const c = lt(rr, t), h = lt(Pt, t), { cumulative: m, currentValue: V } = y.prefixSum(c, it), q = m - V;
|
|
3283
|
+
Number.isFinite(q) && Math.abs(q - Nr.current) > Zn && (Nr.current = q);
|
|
3216
3284
|
const G = Nr.current, j = [], fe = [];
|
|
3217
|
-
let
|
|
3218
|
-
for (let
|
|
3285
|
+
let Fe = 0, ct = q;
|
|
3286
|
+
for (let Ie = c; Ie <= h; Ie++) {
|
|
3219
3287
|
if (fe.length >= hn) {
|
|
3220
|
-
|
|
3288
|
+
L.warn("[VirtualScroll] Rendered item count reached the safety cap; truncating render window.", { cap: hn, safeRenderingStartIndex: c, safeRenderingEndIndex: h });
|
|
3221
3289
|
break;
|
|
3222
3290
|
}
|
|
3223
|
-
const
|
|
3224
|
-
|
|
3225
|
-
const _t =
|
|
3291
|
+
const Wt = n(Ie), xt = y.get(Ie), dt = Wt - xt;
|
|
3292
|
+
dt !== 0 && j.push({ index: Ie, value: Wt });
|
|
3293
|
+
const _t = ct + Fe, ir = r ? r(Ie) : Ie;
|
|
3226
3294
|
fe.push(
|
|
3227
|
-
/* @__PURE__ */
|
|
3295
|
+
/* @__PURE__ */ Z(
|
|
3228
3296
|
Gi,
|
|
3229
3297
|
{
|
|
3230
|
-
index:
|
|
3298
|
+
index: Ie,
|
|
3231
3299
|
top: _t - G,
|
|
3232
|
-
height:
|
|
3233
|
-
item: e(
|
|
3300
|
+
height: Wt,
|
|
3301
|
+
item: e(Ie),
|
|
3234
3302
|
clipItemHeight: Vt,
|
|
3235
|
-
enableKeyboardNavigation:
|
|
3236
|
-
onKeyDown:
|
|
3303
|
+
enableKeyboardNavigation: we,
|
|
3304
|
+
onKeyDown: xr,
|
|
3237
3305
|
onEscapeKeyDown: Ke ? Pr : void 0,
|
|
3238
3306
|
onFocus: Er,
|
|
3239
|
-
registerItemRef:
|
|
3240
|
-
children:
|
|
3307
|
+
registerItemRef: Xt,
|
|
3308
|
+
children: S
|
|
3241
3309
|
},
|
|
3242
3310
|
ir
|
|
3243
3311
|
)
|
|
3244
|
-
),
|
|
3312
|
+
), Fe += dt, ct += xt;
|
|
3245
3313
|
}
|
|
3246
3314
|
return j.length > 0 && Promise.resolve().then(() => {
|
|
3247
|
-
if (
|
|
3315
|
+
if (Ae.current)
|
|
3248
3316
|
return;
|
|
3249
|
-
let
|
|
3250
|
-
for (const
|
|
3251
|
-
if (
|
|
3252
|
-
const _t = y.get(
|
|
3253
|
-
|
|
3317
|
+
let Ie = 0;
|
|
3318
|
+
for (const dt of j)
|
|
3319
|
+
if (dt.index < qt) {
|
|
3320
|
+
const _t = y.get(dt.index);
|
|
3321
|
+
Ie += dt.value - _t;
|
|
3254
3322
|
}
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
}), F.debug("[VirtualScroll] Adjusted scroll for layout shift (auto update)", { from: xt, to: ut, shiftAmount: Me });
|
|
3323
|
+
mt(() => y.updates(j));
|
|
3324
|
+
const Wt = y.getTotal();
|
|
3325
|
+
Te(Wt), L.debug("[VirtualScroll] Updated heights for items", j, "New total height:", Wt);
|
|
3326
|
+
const xt = A.current?.getScrollPosition() ?? U.current;
|
|
3327
|
+
if (Ie !== 0) {
|
|
3328
|
+
const dt = xt + Ie;
|
|
3329
|
+
vt("reconciliation", () => {
|
|
3330
|
+
Oe(dt, Ie), de(dt, { immediate: !0 }), at(xt, dt);
|
|
3331
|
+
}), L.debug("[VirtualScroll] Adjusted scroll for layout shift (auto update)", { from: xt, to: dt, shiftAmount: Ie });
|
|
3265
3332
|
} else xt !== U.current && de(xt);
|
|
3266
3333
|
}), { visibleItems: fe, renderAnchor: G };
|
|
3267
3334
|
}, [
|
|
3268
|
-
|
|
3335
|
+
vt,
|
|
3269
3336
|
at,
|
|
3270
|
-
|
|
3271
|
-
|
|
3337
|
+
mt,
|
|
3338
|
+
S,
|
|
3272
3339
|
Vt,
|
|
3273
|
-
|
|
3340
|
+
we,
|
|
3274
3341
|
t,
|
|
3275
3342
|
y,
|
|
3276
3343
|
e,
|
|
3277
3344
|
r,
|
|
3278
3345
|
n,
|
|
3279
3346
|
Er,
|
|
3280
|
-
|
|
3347
|
+
xr,
|
|
3281
3348
|
Ke,
|
|
3282
3349
|
Pr,
|
|
3283
|
-
|
|
3284
|
-
|
|
3350
|
+
Oe,
|
|
3351
|
+
Xt,
|
|
3285
3352
|
Pt,
|
|
3286
3353
|
rr,
|
|
3287
|
-
|
|
3288
|
-
|
|
3354
|
+
ne,
|
|
3355
|
+
Ht,
|
|
3289
3356
|
de,
|
|
3290
|
-
|
|
3291
|
-
|
|
3357
|
+
qt,
|
|
3358
|
+
Te
|
|
3292
3359
|
]), kr = p(
|
|
3293
3360
|
(c) => {
|
|
3294
|
-
const h =
|
|
3295
|
-
if (
|
|
3361
|
+
const h = J > 0, m = Math.abs(c - St), V = h && m > 0.5 ? St : c, q = Tt(V, H.top);
|
|
3362
|
+
if (L.debug("[VirtualScroll] Rendering visible items", () => ({
|
|
3296
3363
|
currentScrollPosition: c,
|
|
3297
|
-
effectiveScrollPosition:
|
|
3364
|
+
effectiveScrollPosition: q,
|
|
3298
3365
|
renderingStartIndex: rr,
|
|
3299
3366
|
renderingEndIndex: Pt,
|
|
3300
3367
|
itemCount: t,
|
|
3301
3368
|
viewportSize: D,
|
|
3302
|
-
callbackThrottleMs:
|
|
3369
|
+
callbackThrottleMs: J,
|
|
3303
3370
|
diff: m,
|
|
3304
3371
|
rawEffectiveScrollPosition: V
|
|
3305
3372
|
})), t === 0)
|
|
3306
3373
|
return Cr;
|
|
3307
|
-
const G = H.top + mr - V, j = y.getTotal(), fe = qi(V, j + H.top + H.bottom - D,
|
|
3374
|
+
const G = H.top + mr - V, j = y.getTotal(), fe = qi(V, j + H.top + H.bottom - D, te), Fe = H.bottom > 0 ? /* @__PURE__ */ Z(
|
|
3308
3375
|
"div",
|
|
3309
3376
|
{
|
|
3310
3377
|
className: "aqvs-bottom-inset",
|
|
@@ -3316,37 +3383,37 @@ const Hi = 1e4, ds = () => {
|
|
|
3316
3383
|
},
|
|
3317
3384
|
"virtualscroll-bottom-inset"
|
|
3318
3385
|
) : null;
|
|
3319
|
-
return
|
|
3386
|
+
return L.debug("[VirtualScroll] Rendering items", () => ({
|
|
3320
3387
|
containerTop: G,
|
|
3321
3388
|
snapEdge: fe,
|
|
3322
3389
|
logicalScrollPosition: Ct,
|
|
3323
3390
|
resolvedInsets: H,
|
|
3324
|
-
effectiveScrollPosition:
|
|
3391
|
+
effectiveScrollPosition: q
|
|
3325
3392
|
})), /* @__PURE__ */ Zt(Yi, { translateY: G, snapEdge: fe, boundaryRef: Qt, children: [
|
|
3326
3393
|
Cr,
|
|
3327
|
-
|
|
3394
|
+
Fe
|
|
3328
3395
|
] });
|
|
3329
3396
|
},
|
|
3330
|
-
[
|
|
3397
|
+
[te, J, t, y, Ct, mr, Pt, rr, H, St, D, Cr]
|
|
3331
3398
|
), wr = ge(() => ({
|
|
3332
|
-
renderingStartIndex:
|
|
3333
|
-
renderingEndIndex:
|
|
3334
|
-
visibleStartIndex:
|
|
3335
|
-
visibleEndIndex:
|
|
3399
|
+
renderingStartIndex: ut.renderingStartIndex,
|
|
3400
|
+
renderingEndIndex: ut.renderingEndIndex,
|
|
3401
|
+
visibleStartIndex: ut.visibleStartIndex,
|
|
3402
|
+
visibleEndIndex: ut.visibleEndIndex,
|
|
3336
3403
|
scrollPosition: Ct,
|
|
3337
3404
|
totalHeight: y.getTotal()
|
|
3338
|
-
}), [
|
|
3339
|
-
|
|
3340
|
-
|
|
3405
|
+
}), [ut, Ct, y, Ht]);
|
|
3406
|
+
W(() => {
|
|
3407
|
+
ft.current = wr;
|
|
3341
3408
|
}, [wr]);
|
|
3342
|
-
const [Hr, $r] =
|
|
3343
|
-
|
|
3344
|
-
Xr.current =
|
|
3345
|
-
}, [
|
|
3346
|
-
const nr =
|
|
3347
|
-
|
|
3348
|
-
gr && !Sr &&
|
|
3349
|
-
}, [gr, Sr, nr]),
|
|
3409
|
+
const [Hr, $r] = Ce(""), Xr = u(se);
|
|
3410
|
+
We(() => {
|
|
3411
|
+
Xr.current = se;
|
|
3412
|
+
}, [se]);
|
|
3413
|
+
const nr = se?.debounceMs ?? 400, Sr = Number.isFinite(nr) && nr >= 0, gr = se !== void 0;
|
|
3414
|
+
W(() => {
|
|
3415
|
+
gr && !Sr && L.warn(`[VirtualScroll] liveRegion.debounceMs must be a finite number >= 0, received ${nr}. Announcements are disabled.`);
|
|
3416
|
+
}, [gr, Sr, nr]), W(() => {
|
|
3350
3417
|
if (!(gr && Sr)) {
|
|
3351
3418
|
$r("");
|
|
3352
3419
|
return;
|
|
@@ -3355,36 +3422,61 @@ const Hi = 1e4, ds = () => {
|
|
|
3355
3422
|
const h = Xr.current?.format;
|
|
3356
3423
|
if (!h)
|
|
3357
3424
|
return;
|
|
3358
|
-
const m = h({ visibleStartIndex:
|
|
3425
|
+
const m = h({ visibleStartIndex: qt, visibleEndIndex: Yt, itemCount: t });
|
|
3359
3426
|
$r(m);
|
|
3360
3427
|
}, nr);
|
|
3361
3428
|
return () => clearTimeout(c);
|
|
3362
|
-
}, [gr, Sr, nr,
|
|
3429
|
+
}, [gr, Sr, nr, qt, Yt, t]), Jr(
|
|
3363
3430
|
xe,
|
|
3364
3431
|
() => ({
|
|
3432
|
+
/**
|
|
3433
|
+
* Reads the logical scroll position (the pane's position less the top inset), or the `-1` sentinel while the pane is
|
|
3434
|
+
* unconnected.
|
|
3435
|
+
* 論理スクロール位置 (ペインの位置から上のインセットを引いたもの) を読む処理。ペインが未接続の間は番兵の `-1`。
|
|
3436
|
+
*/
|
|
3365
3437
|
getScrollPosition: () => {
|
|
3366
|
-
const c =
|
|
3367
|
-
return typeof c == "number" ?
|
|
3438
|
+
const c = A.current?.getScrollPosition();
|
|
3439
|
+
return typeof c == "number" ? Tt(c, Lt.current) : -1;
|
|
3368
3440
|
},
|
|
3369
|
-
|
|
3370
|
-
|
|
3441
|
+
/**
|
|
3442
|
+
* Reads the pane's content size (insets included), or the `-1` sentinel while the pane is unconnected.
|
|
3443
|
+
* ペインの中身の寸法 (インセット込み) を読む処理。ペインが未接続の間は番兵の `-1`。
|
|
3444
|
+
*/
|
|
3445
|
+
getContentSize: () => A.current?.getContentSize() ?? -1,
|
|
3446
|
+
/**
|
|
3447
|
+
* Reads the pane's viewport size, or the `-1` sentinel while the pane is unconnected.
|
|
3448
|
+
* ペインの表示域の寸法を読む処理。ペインが未接続の間は番兵の `-1`。
|
|
3449
|
+
*/
|
|
3450
|
+
getViewportSize: () => A.current?.getViewportSize() ?? -1,
|
|
3371
3451
|
scrollTo: lr,
|
|
3372
3452
|
scrollBy: tr,
|
|
3373
3453
|
applyWheel: Nt,
|
|
3374
3454
|
scrollToIndex: rt,
|
|
3455
|
+
/**
|
|
3456
|
+
* Reads the total of the row-height tree (insets excluded).
|
|
3457
|
+
* 行の高さの木の合計 (インセットを除く) を読む処理。
|
|
3458
|
+
*/
|
|
3375
3459
|
getFenwickTreeTotalHeight: () => y.getTotal(),
|
|
3460
|
+
/**
|
|
3461
|
+
* Reads the number of rows the row-height tree holds.
|
|
3462
|
+
* 行の高さの木が持つ行の数を読む処理。
|
|
3463
|
+
*/
|
|
3376
3464
|
getFenwickSize: () => y.getSize(),
|
|
3377
|
-
focusItemAtIndex:
|
|
3378
|
-
|
|
3465
|
+
focusItemAtIndex: Ne,
|
|
3466
|
+
/**
|
|
3467
|
+
* Reads the range the last commit published (one render behind).
|
|
3468
|
+
* 最後の確定が公開した範囲 (描画 1 回ぶん遅れる) を読む処理。
|
|
3469
|
+
*/
|
|
3470
|
+
getRange: () => ft.current,
|
|
3379
3471
|
getScrollAnchor: er,
|
|
3380
3472
|
updateItemSize: It
|
|
3381
3473
|
}),
|
|
3382
|
-
[lr, tr, Nt, rt, y,
|
|
3474
|
+
[lr, tr, Nt, rt, y, Ne, er, It]
|
|
3383
3475
|
);
|
|
3384
|
-
const tn = y.getTotal() + H.top + H.bottom, Vr = /* @__PURE__ */
|
|
3476
|
+
const tn = y.getTotal() + H.top + H.bottom, Vr = /* @__PURE__ */ Z(
|
|
3385
3477
|
Li,
|
|
3386
3478
|
{
|
|
3387
|
-
ref:
|
|
3479
|
+
ref: A,
|
|
3388
3480
|
contentSize: tn,
|
|
3389
3481
|
viewportSize: i,
|
|
3390
3482
|
onViewportSizeChange: ot,
|
|
@@ -3396,33 +3488,33 @@ const Hi = 1e4, ds = () => {
|
|
|
3396
3488
|
inertiaOptions: Ze,
|
|
3397
3489
|
overscrollBehavior: Qe,
|
|
3398
3490
|
itemCount: t,
|
|
3399
|
-
scrollBarWidth:
|
|
3400
|
-
enableThumbDrag:
|
|
3491
|
+
scrollBarWidth: ke,
|
|
3492
|
+
enableThumbDrag: je,
|
|
3401
3493
|
enableTrackClick: C,
|
|
3402
|
-
enableArrowButtons:
|
|
3403
|
-
enableArrowButtonTabStops:
|
|
3494
|
+
enableArrowButtons: K,
|
|
3495
|
+
enableArrowButtonTabStops: ee,
|
|
3404
3496
|
enablePointerDrag: st,
|
|
3405
|
-
pointerDragInputs:
|
|
3497
|
+
pointerDragInputs: wt,
|
|
3406
3498
|
renderThumbOverlay: ce,
|
|
3407
|
-
wheelSpeedMultiplier:
|
|
3408
|
-
onWheelHorizontal:
|
|
3409
|
-
onPanHorizontal:
|
|
3499
|
+
wheelSpeedMultiplier: Ve,
|
|
3500
|
+
onWheelHorizontal: R,
|
|
3501
|
+
onPanHorizontal: X,
|
|
3410
3502
|
contentInsets: H,
|
|
3411
|
-
contentProps:
|
|
3412
|
-
visibleStartIndex:
|
|
3413
|
-
visibleEndIndex:
|
|
3503
|
+
contentProps: be,
|
|
3504
|
+
visibleStartIndex: qt,
|
|
3505
|
+
visibleEndIndex: Yt,
|
|
3414
3506
|
renderOverlay: en,
|
|
3415
3507
|
initialScrollPosition: Xe.position,
|
|
3416
|
-
locale:
|
|
3417
|
-
labels:
|
|
3508
|
+
locale: oe,
|
|
3509
|
+
labels: pe,
|
|
3418
3510
|
children: kr
|
|
3419
3511
|
}
|
|
3420
3512
|
);
|
|
3421
3513
|
return gr ? /* @__PURE__ */ Zt(pn, { children: [
|
|
3422
3514
|
Vr,
|
|
3423
|
-
/* @__PURE__ */
|
|
3515
|
+
/* @__PURE__ */ Z("div", { className: "aqvs-live-region", role: "status", "aria-live": "polite", "aria-atomic": "true", "data-aqvs-live-region": "", children: Hr })
|
|
3424
3516
|
] }) : Vr;
|
|
3425
|
-
}, Ki = Qr(ji), Lr = 262144, Cn = 3, Zi = 32768, Vn = 128, An = 128,
|
|
3517
|
+
}, Ki = Qr(ji), Lr = 262144, Cn = 3, Zi = 32768, Vn = 128, An = 128, Dn = 128, zn = 128, cn = 10, Qi = (t, e) => Math.max(1, Math.floor((t ?? Zi) / Math.max(1, e))), Ji = (t, e, r, n, i) => {
|
|
3426
3518
|
let s = 0, a = 0, l = Math.max(0, Math.min(n, r - 1));
|
|
3427
3519
|
for (; l < r && s < t && a < hn; )
|
|
3428
3520
|
s += e(l), a += 1, l += 1;
|
|
@@ -3439,31 +3531,31 @@ const Hi = 1e4, ds = () => {
|
|
|
3439
3531
|
const f = Qn(t, e, r, n, i, s, a);
|
|
3440
3532
|
if (n === 0)
|
|
3441
3533
|
return { renderingColStart: 0, renderingColEnd: 0, visibleColStart: 0, visibleColEnd: 0, colAnchor: 0 };
|
|
3442
|
-
const
|
|
3534
|
+
const g = re(f.renderingStartIndex, 0, n - 1), { cumulative: x, currentValue: S } = s.prefixSum(g, it), N = x - S, M = Number.isFinite(N) && Math.abs(N - l) > Zn ? N : l;
|
|
3443
3535
|
return {
|
|
3444
3536
|
renderingColStart: f.renderingStartIndex,
|
|
3445
3537
|
renderingColEnd: f.renderingEndIndex,
|
|
3446
3538
|
visibleColStart: f.visibleStartIndex,
|
|
3447
3539
|
visibleColEnd: f.visibleEndIndex,
|
|
3448
|
-
colAnchor:
|
|
3540
|
+
colAnchor: M
|
|
3449
3541
|
};
|
|
3450
3542
|
}, Ln = [], ts = (t, e, r, n, i) => {
|
|
3451
3543
|
const s = [], a = [], l = n.prefixSum(t, it);
|
|
3452
|
-
let f = l.cumulative - l.currentValue,
|
|
3453
|
-
for (;
|
|
3544
|
+
let f = l.cumulative - l.currentValue, g = 0, x = t;
|
|
3545
|
+
for (; x <= e; ) {
|
|
3454
3546
|
if (s.length >= i)
|
|
3455
|
-
return { columns: s, widthUpdates: a, truncated: e -
|
|
3456
|
-
const
|
|
3457
|
-
if (
|
|
3458
|
-
s.push({ col:
|
|
3547
|
+
return { columns: s, widthUpdates: a, truncated: e - x + 1 };
|
|
3548
|
+
const S = r(x), N = n.get(x);
|
|
3549
|
+
if (S !== N && a.push({ index: x, value: S }), S > 0) {
|
|
3550
|
+
s.push({ col: x, left: f, width: S }), f += N, g = 0, x += 1;
|
|
3459
3551
|
continue;
|
|
3460
3552
|
}
|
|
3461
|
-
if (f += N,
|
|
3462
|
-
const
|
|
3463
|
-
if (
|
|
3553
|
+
if (f += N, g += 1, x += 1, g > Fr) {
|
|
3554
|
+
const M = n.findIndexAtOrAfter(f + 0.5, it);
|
|
3555
|
+
if (M.index === -1 || M.index <= x || !Number.isSafeInteger(M.index))
|
|
3464
3556
|
break;
|
|
3465
|
-
const
|
|
3466
|
-
f =
|
|
3557
|
+
const _ = n.prefixSum(M.index, it);
|
|
3558
|
+
f = _.cumulative - _.currentValue, x = M.index, g = 0;
|
|
3467
3559
|
}
|
|
3468
3560
|
}
|
|
3469
3561
|
return { columns: s, widthUpdates: a, truncated: 0 };
|
|
@@ -3479,8 +3571,8 @@ const Hi = 1e4, ds = () => {
|
|
|
3479
3571
|
const i = [], s = [];
|
|
3480
3572
|
let a = 0;
|
|
3481
3573
|
for (let l = t - e; l < t; l += 1) {
|
|
3482
|
-
const f = r(l),
|
|
3483
|
-
f !==
|
|
3574
|
+
const f = r(l), g = n.get(l);
|
|
3575
|
+
f !== g && s.push({ index: l, value: f }), f > 0 && i.push({ col: l, left: a, width: f }), a += g;
|
|
3484
3576
|
}
|
|
3485
3577
|
return { columns: i, widthUpdates: s, width: a };
|
|
3486
3578
|
}, Kr = (t, e, r) => Math.min(t, Math.max(0, r - e)), is = { renderingColStart: 0, renderingColEnd: 0, visibleColStart: 0, visibleColEnd: 0, colAnchor: 0, key: "0:0:0" }, ss = ({
|
|
@@ -3493,268 +3585,268 @@ const Hi = 1e4, ds = () => {
|
|
|
3493
3585
|
children: a,
|
|
3494
3586
|
getCellProps: l,
|
|
3495
3587
|
getRowProps: f,
|
|
3496
|
-
contentProps:
|
|
3497
|
-
background:
|
|
3498
|
-
contentInsets:
|
|
3588
|
+
contentProps: g,
|
|
3589
|
+
background: x,
|
|
3590
|
+
contentInsets: S,
|
|
3499
3591
|
onRowFocus: N,
|
|
3500
|
-
frozenLeadingCols:
|
|
3501
|
-
frozenLeadingRows:
|
|
3502
|
-
frozenTrailingCols:
|
|
3503
|
-
frozenTrailingRows:
|
|
3504
|
-
horizontalKeyInputs:
|
|
3505
|
-
horizontalKeyStep:
|
|
3506
|
-
onScroll:
|
|
3507
|
-
onRangeChange:
|
|
3508
|
-
onRenderTruncated:
|
|
3509
|
-
callbackThrottleMs:
|
|
3510
|
-
initialScrollAnchor:
|
|
3511
|
-
overscanRows:
|
|
3512
|
-
overscanCols:
|
|
3513
|
-
viewportSize:
|
|
3514
|
-
__maxRenderedCells:
|
|
3515
|
-
behaviorOptions:
|
|
3592
|
+
frozenLeadingCols: M = 0,
|
|
3593
|
+
frozenLeadingRows: _ = 0,
|
|
3594
|
+
frozenTrailingCols: F = 0,
|
|
3595
|
+
frozenTrailingRows: J = 0,
|
|
3596
|
+
horizontalKeyInputs: ie,
|
|
3597
|
+
horizontalKeyStep: ze,
|
|
3598
|
+
onScroll: $,
|
|
3599
|
+
onRangeChange: I,
|
|
3600
|
+
onRenderTruncated: R,
|
|
3601
|
+
callbackThrottleMs: X,
|
|
3602
|
+
initialScrollAnchor: B,
|
|
3603
|
+
overscanRows: k = Cn,
|
|
3604
|
+
overscanCols: be = Cn,
|
|
3605
|
+
viewportSize: se,
|
|
3606
|
+
__maxRenderedCells: oe,
|
|
3607
|
+
behaviorOptions: pe,
|
|
3516
3608
|
scrollBarOptions: xe,
|
|
3517
|
-
liveRegion:
|
|
3518
|
-
locale:
|
|
3609
|
+
liveRegion: ke,
|
|
3610
|
+
locale: je,
|
|
3519
3611
|
labels: C,
|
|
3520
|
-
className:
|
|
3521
|
-
testId:
|
|
3612
|
+
className: K,
|
|
3613
|
+
testId: ee
|
|
3522
3614
|
}, He) => {
|
|
3523
3615
|
const ce = u(null), Pe = u(null), Rt = u(r);
|
|
3524
3616
|
Rt.current = r;
|
|
3525
|
-
const
|
|
3526
|
-
|
|
3527
|
-
const st =
|
|
3617
|
+
const ne = u(n);
|
|
3618
|
+
ne.current = n;
|
|
3619
|
+
const st = pe?.resetOnGetColWidthChange === !0, we = pe?.resetOnGetItemHeightChange === !0 ? r : null, Ke = st ? n : null, Ve = p(
|
|
3528
3620
|
(o) => jr(Rt.current(o), "row", o),
|
|
3529
|
-
[
|
|
3621
|
+
[we]
|
|
3530
3622
|
), Ze = p(
|
|
3531
|
-
(o) => jr(
|
|
3623
|
+
(o) => jr(ne.current(o), "col", o),
|
|
3532
3624
|
[Ke]
|
|
3533
|
-
), Qe =
|
|
3625
|
+
), Qe = pe?.defaultColWidth, Vt = ge(() => {
|
|
3534
3626
|
if (Qe !== void 0 && !(Number.isInteger(Qe) && Qe >= 0 && Qe <= Lr))
|
|
3535
3627
|
throw new RangeError(`[VirtualGrid] behaviorOptions.defaultColWidth must be an integer in [0, ${Lr}], received ${Qe}.`);
|
|
3536
3628
|
return { resetOnValueFnChange: st, baseValue: Qe };
|
|
3537
|
-
}, [st, Qe]),
|
|
3538
|
-
if (!(Number.isInteger(
|
|
3539
|
-
throw new RangeError(`[VirtualGrid] frozenLeadingCols must be an integer in [0, ${Vn}], received ${
|
|
3540
|
-
const D = Math.min(
|
|
3541
|
-
if (!(Number.isInteger(
|
|
3542
|
-
throw new RangeError(`[VirtualGrid] frozenTrailingCols must be an integer in [0, ${
|
|
3543
|
-
const
|
|
3544
|
-
if (!(Number.isInteger(
|
|
3545
|
-
throw new RangeError(`[VirtualGrid] frozenLeadingRows must be an integer in [0, ${An}], received ${
|
|
3546
|
-
const
|
|
3547
|
-
if (!(Number.isInteger(
|
|
3548
|
-
throw new RangeError(`[VirtualGrid] frozenTrailingRows must be an integer in [0, ${
|
|
3549
|
-
const
|
|
3550
|
-
if (
|
|
3629
|
+
}, [st, Qe]), Se = jn(e, Ze, Vt), { revision: yt, change: $e } = Kn(Se);
|
|
3630
|
+
if (!(Number.isInteger(M) && M >= 0 && M <= Vn))
|
|
3631
|
+
throw new RangeError(`[VirtualGrid] frozenLeadingCols must be an integer in [0, ${Vn}], received ${M}.`);
|
|
3632
|
+
const D = Math.min(M, e), ot = u(0);
|
|
3633
|
+
if (!(Number.isInteger(F) && F >= 0 && F <= Dn))
|
|
3634
|
+
throw new RangeError(`[VirtualGrid] frozenTrailingCols must be an integer in [0, ${Dn}], received ${F}.`);
|
|
3635
|
+
const A = Math.min(F, e - D), ft = u(0);
|
|
3636
|
+
if (!(Number.isInteger(_) && _ >= 0 && _ <= An))
|
|
3637
|
+
throw new RangeError(`[VirtualGrid] frozenLeadingRows must be an integer in [0, ${An}], received ${_}.`);
|
|
3638
|
+
const z = Math.min(_, t);
|
|
3639
|
+
if (!(Number.isInteger(J) && J >= 0 && J <= zn))
|
|
3640
|
+
throw new RangeError(`[VirtualGrid] frozenTrailingRows must be an integer in [0, ${zn}], received ${J}.`);
|
|
3641
|
+
const Ae = Math.min(J, t - z), ht = Math.max(0, t - z - Ae), H = u(!1), pt = u(0), At = u(0), [y, Ht] = Ce(0), { frozenRows: mt, frozenHeight: Xe } = ge(() => {
|
|
3642
|
+
if (z === 0)
|
|
3551
3643
|
return { frozenRows: [], frozenHeight: 0 };
|
|
3552
3644
|
const o = [];
|
|
3553
|
-
let
|
|
3554
|
-
for (let
|
|
3555
|
-
const
|
|
3556
|
-
|
|
3645
|
+
let b = 0;
|
|
3646
|
+
for (let T = 0; T < z; T += 1) {
|
|
3647
|
+
const Q = Ve(T);
|
|
3648
|
+
Q > 0 && o.push({ row: T, top: b, height: Q }), b += Q;
|
|
3557
3649
|
}
|
|
3558
|
-
return { frozenRows: o, frozenHeight:
|
|
3559
|
-
}, [
|
|
3560
|
-
|
|
3561
|
-
const [
|
|
3562
|
-
if (
|
|
3650
|
+
return { frozenRows: o, frozenHeight: b };
|
|
3651
|
+
}, [z, y, Ve]);
|
|
3652
|
+
pt.current = Xe;
|
|
3653
|
+
const [St, $t] = Ce(0), { trailingRows: v, trailingHeight: Y } = ge(() => {
|
|
3654
|
+
if (Ae === 0)
|
|
3563
3655
|
return { trailingRows: [], trailingHeight: 0 };
|
|
3564
3656
|
const o = [];
|
|
3565
|
-
let
|
|
3566
|
-
for (let
|
|
3567
|
-
const
|
|
3568
|
-
|
|
3657
|
+
let b = 0;
|
|
3658
|
+
for (let T = t - Ae; T < t; T += 1) {
|
|
3659
|
+
const Q = Ve(T);
|
|
3660
|
+
Q > 0 && o.push({ row: T, top: b, height: Q }), b += Q;
|
|
3569
3661
|
}
|
|
3570
|
-
return { trailingRows: o, trailingHeight:
|
|
3571
|
-
}, [
|
|
3662
|
+
return { trailingRows: o, trailingHeight: b };
|
|
3663
|
+
}, [Ae, t, St, Ve]);
|
|
3572
3664
|
At.current = Y;
|
|
3573
|
-
const
|
|
3665
|
+
const te = p((o) => Ve(o + z), [Ve, z]), le = u(N);
|
|
3574
3666
|
le.current = N;
|
|
3575
|
-
const
|
|
3576
|
-
if (at !==
|
|
3577
|
-
Be(
|
|
3667
|
+
const ae = N !== void 0, Ee = ge(() => ae ? (o) => le.current?.(o + z) : void 0, [z, ae]), Te = Xe, Me = Y, [at, Be] = Ce(z), U = u(null), gt = u(!1);
|
|
3668
|
+
if (at !== z) {
|
|
3669
|
+
Be(z), gt.current = !0;
|
|
3578
3670
|
const o = ce.current?.getScrollAnchor() ?? null;
|
|
3579
3671
|
U.current = o === null ? null : { row: o.index + at, offsetPx: o.offsetPx };
|
|
3580
3672
|
}
|
|
3581
|
-
const
|
|
3582
|
-
|
|
3583
|
-
const qe = u(0), [Je, w] =
|
|
3584
|
-
|
|
3673
|
+
const ve = u(0), Re = u(0), [Le, Et] = Ce(is), Ue = u(Le);
|
|
3674
|
+
Ue.current = Le;
|
|
3675
|
+
const qe = u(0), [Je, w] = Ce(() => Se.getTotal()), P = u(Je);
|
|
3676
|
+
P.current = Je;
|
|
3585
3677
|
const Ye = p((o) => {
|
|
3586
|
-
typeof o == "number" && Number.isFinite(o) && (
|
|
3678
|
+
typeof o == "number" && Number.isFinite(o) && (P.current = o, w(o));
|
|
3587
3679
|
}, []);
|
|
3588
|
-
|
|
3589
|
-
const o =
|
|
3590
|
-
typeof o == "number" && Number.isFinite(o) && o !==
|
|
3680
|
+
We(() => {
|
|
3681
|
+
const o = Se.getTotal();
|
|
3682
|
+
typeof o == "number" && Number.isFinite(o) && o !== P.current && Ye(o);
|
|
3591
3683
|
});
|
|
3592
|
-
const
|
|
3593
|
-
|
|
3684
|
+
const ye = xe?.width ?? 12, Ge = se === void 0 ? null : { width: Math.max(0, Math.round(se.width) - ye), height: Math.max(0, Math.round(se.height) - ye) }, [et, _e] = Ce({ width: 0, height: 0 }), me = Ge ?? { width: Math.max(0, et.width - ye), height: Math.max(0, et.height - ye) }, bt = u(me);
|
|
3685
|
+
bt.current = me;
|
|
3594
3686
|
const Qt = me.height > 0 && me.height - Xe - Y <= 0;
|
|
3595
3687
|
H.current = Qt;
|
|
3596
|
-
const hr =
|
|
3688
|
+
const hr = Ge !== null, Ft = p(
|
|
3597
3689
|
(o) => {
|
|
3598
3690
|
if (Pe.current = o, hr)
|
|
3599
3691
|
return () => {
|
|
3600
3692
|
Pe.current = null;
|
|
3601
3693
|
};
|
|
3602
|
-
const
|
|
3603
|
-
const
|
|
3604
|
-
|
|
3694
|
+
const b = () => {
|
|
3695
|
+
const Q = Math.round(o.clientWidth), he = Math.round(o.clientHeight);
|
|
3696
|
+
_e((nt) => nt.width === Q && nt.height === he ? nt : { width: Q, height: he });
|
|
3605
3697
|
};
|
|
3606
|
-
|
|
3607
|
-
const
|
|
3608
|
-
return
|
|
3609
|
-
|
|
3698
|
+
b();
|
|
3699
|
+
const T = new ResizeObserver(b);
|
|
3700
|
+
return T.observe(o), () => {
|
|
3701
|
+
T.disconnect(), Pe.current = null;
|
|
3610
3702
|
};
|
|
3611
3703
|
},
|
|
3612
3704
|
[hr]
|
|
3613
|
-
),
|
|
3705
|
+
), Mt = p(() => {
|
|
3614
3706
|
const o = Pe.current;
|
|
3615
|
-
o !== null && o.style.setProperty("--aqvs-grid-hx-residual", `${qe.current -
|
|
3616
|
-
}, []),
|
|
3617
|
-
const o =
|
|
3618
|
-
if (D > 0 && (
|
|
3619
|
-
const
|
|
3620
|
-
|
|
3707
|
+
o !== null && o.style.setProperty("--aqvs-grid-hx-residual", `${qe.current - ve.current}px`);
|
|
3708
|
+
}, []), Dt = p(() => Math.max(0, bt.current.width - ot.current - ft.current), []), Gt = p(() => Math.max(0, P.current - ot.current - ft.current - Dt()), [Dt]), zt = p(() => {
|
|
3709
|
+
const o = Dt(), b = es(ot.current + ve.current, o, be, e, Ze, Se, P.current, Ue.current.colAnchor);
|
|
3710
|
+
if (D > 0 && (b.renderingColStart = Math.max(b.renderingColStart, D), b.visibleColStart = Math.max(b.visibleColStart, D)), A > 0) {
|
|
3711
|
+
const Q = e - A - 1;
|
|
3712
|
+
b.renderingColEnd = Math.min(b.renderingColEnd, Q), b.visibleColEnd = Math.min(b.visibleColEnd, Q);
|
|
3621
3713
|
}
|
|
3622
|
-
(D > 0 ||
|
|
3623
|
-
const
|
|
3624
|
-
|
|
3625
|
-
}, [
|
|
3714
|
+
(D > 0 || A > 0) && (o <= 0 || b.renderingColStart > b.renderingColEnd) && (b.renderingColStart = e, b.renderingColEnd = e - 1, b.visibleColStart = e, b.visibleColEnd = e - 1);
|
|
3715
|
+
const T = `${b.renderingColStart}:${b.renderingColEnd}:${b.colAnchor}`;
|
|
3716
|
+
T !== Ue.current.key && Et({ ...b, key: T });
|
|
3717
|
+
}, [be, e, Ze, Se, D, A, Dt]), [or, Ir] = Ce(0), kt = u(null), vr = p(() => {
|
|
3626
3718
|
kt.current === null && (kt.current = requestAnimationFrame(() => {
|
|
3627
|
-
kt.current = null, Ir(
|
|
3719
|
+
kt.current = null, Ir(ve.current);
|
|
3628
3720
|
}));
|
|
3629
3721
|
}, []);
|
|
3630
|
-
|
|
3722
|
+
W(
|
|
3631
3723
|
() => () => {
|
|
3632
3724
|
kt.current !== null && cancelAnimationFrame(kt.current);
|
|
3633
3725
|
},
|
|
3634
3726
|
[]
|
|
3635
3727
|
);
|
|
3636
|
-
const ar = u(
|
|
3637
|
-
ar.current =
|
|
3638
|
-
const Lt = u(
|
|
3639
|
-
Lt.current =
|
|
3640
|
-
const cr = u(
|
|
3641
|
-
cr.current =
|
|
3642
|
-
const
|
|
3643
|
-
|
|
3644
|
-
const
|
|
3645
|
-
const o =
|
|
3646
|
-
return Ji(Math.max(0, me.height -
|
|
3647
|
-
}, [me.height,
|
|
3648
|
-
const o =
|
|
3728
|
+
const ar = u($);
|
|
3729
|
+
ar.current = $;
|
|
3730
|
+
const Lt = u(I);
|
|
3731
|
+
Lt.current = I;
|
|
3732
|
+
const cr = u(R);
|
|
3733
|
+
cr.current = R;
|
|
3734
|
+
const Xt = u(null), [d, E] = Ce(null), [O, ue] = Ce(me.height);
|
|
3735
|
+
O !== me.height && (ue(me.height), E(null));
|
|
3736
|
+
const De = B === void 0 || t === 0 ? 0 : re(Math.trunc(B.row), 0, t - 1), tt = ge(() => {
|
|
3737
|
+
const o = Xt.current?.renderingStartIndex ?? De;
|
|
3738
|
+
return Ji(Math.max(0, me.height - pt.current - At.current), Ve, t, o, k);
|
|
3739
|
+
}, [me.height, Ve, t, De, k, Te, Me]), de = d ?? tt, Oe = p(() => {
|
|
3740
|
+
const o = Xt.current;
|
|
3649
3741
|
if (o === null)
|
|
3650
3742
|
return null;
|
|
3651
|
-
const
|
|
3743
|
+
const b = Ue.current;
|
|
3652
3744
|
return {
|
|
3653
3745
|
renderingRowStart: o.renderingStartIndex,
|
|
3654
3746
|
renderingRowEnd: o.renderingEndIndex,
|
|
3655
3747
|
visibleRowStart: o.visibleStartIndex,
|
|
3656
3748
|
visibleRowEnd: o.visibleEndIndex,
|
|
3657
|
-
renderingColStart:
|
|
3658
|
-
renderingColEnd:
|
|
3659
|
-
visibleColStart:
|
|
3660
|
-
visibleColEnd:
|
|
3661
|
-
scrollX:
|
|
3662
|
-
scrollY:
|
|
3663
|
-
totalWidth:
|
|
3749
|
+
renderingColStart: b.renderingColStart,
|
|
3750
|
+
renderingColEnd: b.renderingColEnd,
|
|
3751
|
+
visibleColStart: b.visibleColStart,
|
|
3752
|
+
visibleColEnd: b.visibleColEnd,
|
|
3753
|
+
scrollX: ve.current,
|
|
3754
|
+
scrollY: Re.current,
|
|
3755
|
+
totalWidth: P.current,
|
|
3664
3756
|
// 帯高は鮮度加算 (格納はスクロール木のみ — 帯行リサイズ後も総高が正しい。R1 是正。
|
|
3665
3757
|
// 3.5.0: 末尾帯高 H_T も同じ鮮度規律で加算)
|
|
3666
|
-
totalHeight: o.totalHeight +
|
|
3758
|
+
totalHeight: o.totalHeight + pt.current + At.current
|
|
3667
3759
|
};
|
|
3668
|
-
}, []),
|
|
3669
|
-
const o =
|
|
3760
|
+
}, []), vt = p(() => {
|
|
3761
|
+
const o = Oe();
|
|
3670
3762
|
o !== null && Lt.current?.(o);
|
|
3671
|
-
}, [
|
|
3763
|
+
}, [Oe]), jt = p(
|
|
3672
3764
|
(o) => {
|
|
3673
|
-
const
|
|
3674
|
-
return
|
|
3765
|
+
const b = Gt(), T = re(o, 0, b);
|
|
3766
|
+
return T !== ve.current && (ve.current = T, Mt(), zt(), vr(), ar.current?.({ x: T, y: Re.current })), T;
|
|
3675
3767
|
},
|
|
3676
|
-
[
|
|
3768
|
+
[Mt, zt, vr, Gt]
|
|
3677
3769
|
), It = u(jt);
|
|
3678
|
-
It.current = jt,
|
|
3679
|
-
qe.current =
|
|
3680
|
-
}, [
|
|
3681
|
-
|
|
3682
|
-
}, [Xe, Y,
|
|
3770
|
+
It.current = jt, We(() => {
|
|
3771
|
+
qe.current = Le.colAnchor, Mt(), vt();
|
|
3772
|
+
}, [Le, Mt, vt]), We(() => {
|
|
3773
|
+
Xt.current !== null && vt();
|
|
3774
|
+
}, [Xe, Y, vt]);
|
|
3683
3775
|
const rt = u(null), Jt = p(
|
|
3684
3776
|
(o) => {
|
|
3685
|
-
const
|
|
3686
|
-
return (o.alignX === "end" ?
|
|
3777
|
+
const b = re(o.col, 0, Math.max(0, e - 1)), T = Se.prefixSum(b, it), Q = T.cumulative - T.currentValue, he = T.currentValue, nt = Dt();
|
|
3778
|
+
return (o.alignX === "end" ? Q + he - ot.current - nt : o.alignX === "center" ? Q + he / 2 - ot.current - nt / 2 : Q - ot.current) + o.offsetX;
|
|
3687
3779
|
},
|
|
3688
|
-
[
|
|
3689
|
-
),
|
|
3690
|
-
const o =
|
|
3691
|
-
|
|
3692
|
-
}, [
|
|
3780
|
+
[Se, e, Dt]
|
|
3781
|
+
), Bt = u(null), er = p(() => {
|
|
3782
|
+
const o = Bt.current;
|
|
3783
|
+
Bt.current = null, !(o === null || o.length === 0) && Ye($e(() => Se.updates(o)));
|
|
3784
|
+
}, [Se, $e, Ye]), lr = u({ count: 0, warned: !1 }), { frozenColumns: tr, frozenWidth: Nt } = ge(() => {
|
|
3693
3785
|
if (D === 0)
|
|
3694
3786
|
return lr.current.count = 0, lr.current.warned = !1, { frozenColumns: Ln, frozenWidth: 0 };
|
|
3695
|
-
const { columns: o, widthUpdates:
|
|
3696
|
-
if (
|
|
3697
|
-
const
|
|
3698
|
-
|
|
3787
|
+
const { columns: o, widthUpdates: b, width: T } = rs(D, Ze, Se);
|
|
3788
|
+
if (b.length > 0) {
|
|
3789
|
+
const Q = lr.current;
|
|
3790
|
+
Q.count >= cn ? Q.warned || (Q.warned = !0, L.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).", {
|
|
3699
3791
|
frozenCols: D,
|
|
3700
|
-
pendingUpdates:
|
|
3701
|
-
})) : (
|
|
3792
|
+
pendingUpdates: b.length
|
|
3793
|
+
})) : (Q.count += 1, Bt.current = [...Bt.current ?? [], ...b], Promise.resolve().then(er));
|
|
3702
3794
|
} else
|
|
3703
3795
|
lr.current.count = 0, lr.current.warned = !1;
|
|
3704
|
-
return { frozenColumns: o, frozenWidth:
|
|
3705
|
-
}, [D, yt, Ze,
|
|
3706
|
-
ot.current = Nt,
|
|
3796
|
+
return { frozenColumns: o, frozenWidth: T };
|
|
3797
|
+
}, [D, yt, Ze, Se, er]);
|
|
3798
|
+
ot.current = Nt, We(() => {
|
|
3707
3799
|
D > 0 ? Pe.current?.style.setProperty("--aqvs-grid-frozen-width", `${Nt}px`) : Pe.current?.style.removeProperty("--aqvs-grid-frozen-width");
|
|
3708
3800
|
}, [Nt, D]);
|
|
3709
|
-
const pr = u({ count: 0, warned: !1 }), { trailingColumns: Ct, trailingWidth:
|
|
3710
|
-
if (
|
|
3801
|
+
const pr = u({ count: 0, warned: !1 }), { trailingColumns: Ct, trailingWidth: ut } = ge(() => {
|
|
3802
|
+
if (A === 0)
|
|
3711
3803
|
return pr.current.count = 0, pr.current.warned = !1, { trailingColumns: Ln, trailingWidth: 0 };
|
|
3712
|
-
const { columns: o, widthUpdates:
|
|
3713
|
-
if (
|
|
3714
|
-
const
|
|
3715
|
-
|
|
3716
|
-
trailingCols:
|
|
3717
|
-
pendingUpdates:
|
|
3718
|
-
})) : (
|
|
3804
|
+
const { columns: o, widthUpdates: b, width: T } = ns(e, A, Ze, Se);
|
|
3805
|
+
if (b.length > 0) {
|
|
3806
|
+
const Q = pr.current;
|
|
3807
|
+
Q.count >= cn ? Q.warned || (Q.warned = !0, L.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).", {
|
|
3808
|
+
trailingCols: A,
|
|
3809
|
+
pendingUpdates: b.length
|
|
3810
|
+
})) : (Q.count += 1, Bt.current = [...Bt.current ?? [], ...b], Promise.resolve().then(er));
|
|
3719
3811
|
} else
|
|
3720
3812
|
pr.current.count = 0, pr.current.warned = !1;
|
|
3721
|
-
return { trailingColumns: o, trailingWidth:
|
|
3722
|
-
}, [
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
}, [
|
|
3726
|
-
const rr = ge(() => ({ ...xe, tapScrollCircleOptions: { ...xe?.tapScrollCircleOptions, enabled: !1 } }), [xe]), Pt = xe?.tapScrollCircleOptions,
|
|
3813
|
+
return { trailingColumns: o, trailingWidth: T };
|
|
3814
|
+
}, [A, e, yt, Ze, Se, er]);
|
|
3815
|
+
ft.current = ut, We(() => {
|
|
3816
|
+
A > 0 ? Pe.current?.style.setProperty("--aqvs-grid-trailing-width", `${ut}px`) : Pe.current?.style.removeProperty("--aqvs-grid-trailing-width");
|
|
3817
|
+
}, [ut, A]);
|
|
3818
|
+
const rr = ge(() => ({ ...xe, tapScrollCircleOptions: { ...xe?.tapScrollCircleOptions, enabled: !1 } }), [xe]), Pt = xe?.tapScrollCircleOptions, qt = typeof Pt?.maxSpeedMultiplier == "number", Yt = ge(
|
|
3727
3819
|
() => ({
|
|
3728
3820
|
...Pt,
|
|
3729
3821
|
offsetX: Pt?.offsetX === void 0 ? Rn : Pt.offsetX,
|
|
3730
3822
|
offsetY: Pt?.offsetY === void 0 ? Rn : Pt.offsetY
|
|
3731
3823
|
}),
|
|
3732
3824
|
[Pt]
|
|
3733
|
-
),
|
|
3734
|
-
viewportSize: Math.max(0, me.width - Nt -
|
|
3735
|
-
minSpeedMultiplier:
|
|
3736
|
-
maxSpeedMultiplier:
|
|
3737
|
-
hasCustomMaxSpeedMultiplier:
|
|
3738
|
-
curve:
|
|
3825
|
+
), Ne = ge(() => dn(Yt, Math.max(0, e - D - A)), [Yt, e, D, A]), xr = ge(() => dn(Yt, ht), [Yt, ht]), Pr = Ne.enabled, Er = Math.max(Ne.maxVisualDistance, 1), en = {
|
|
3826
|
+
viewportSize: Math.max(0, me.width - Nt - ut),
|
|
3827
|
+
minSpeedMultiplier: Ne.minSpeedMultiplier,
|
|
3828
|
+
maxSpeedMultiplier: Ne.maxSpeedMultiplier,
|
|
3829
|
+
hasCustomMaxSpeedMultiplier: qt,
|
|
3830
|
+
curve: Ne.maxSpeedCurve
|
|
3739
3831
|
}, Nr = {
|
|
3740
3832
|
viewportSize: Math.max(0, me.height - Xe - Y),
|
|
3741
|
-
minSpeedMultiplier:
|
|
3742
|
-
maxSpeedMultiplier:
|
|
3743
|
-
hasCustomMaxSpeedMultiplier:
|
|
3744
|
-
curve:
|
|
3745
|
-
}, Cr = p(() =>
|
|
3833
|
+
minSpeedMultiplier: xr.minSpeedMultiplier,
|
|
3834
|
+
maxSpeedMultiplier: xr.maxSpeedMultiplier,
|
|
3835
|
+
hasCustomMaxSpeedMultiplier: qt,
|
|
3836
|
+
curve: xr.maxSpeedCurve
|
|
3837
|
+
}, Cr = p(() => ve.current, []), mr = p(() => {
|
|
3746
3838
|
const o = ce.current;
|
|
3747
|
-
return o === null ?
|
|
3839
|
+
return o === null ? Re.current : o.getScrollPosition();
|
|
3748
3840
|
}, []), kr = p(() => {
|
|
3749
3841
|
const o = ce.current;
|
|
3750
3842
|
return o === null ? 0 : Math.max(0, Math.max(0, o.getContentSize()) - Math.max(0, o.getViewportSize()));
|
|
3751
3843
|
}, []), wr = p((o) => {
|
|
3752
|
-
const
|
|
3753
|
-
if (
|
|
3754
|
-
return
|
|
3755
|
-
const
|
|
3756
|
-
return
|
|
3757
|
-
}, []), Hr = Gt() > 0 || kr() > 0, $r = `${Je}:${Nt}:${
|
|
3844
|
+
const b = ce.current;
|
|
3845
|
+
if (b === null)
|
|
3846
|
+
return Re.current;
|
|
3847
|
+
const T = b.scrollBy(o);
|
|
3848
|
+
return Re.current = T, T;
|
|
3849
|
+
}, []), Hr = Gt() > 0 || kr() > 0, $r = `${Je}:${Nt}:${ut}:${me.width}:${Le.key}`, Xr = `${t}:${d ?? -1}:${Xe}:${Y}:${me.height}`, { isTapActive: nr, handleTapCircleDragChange: Sr, tapCircleHandleRef: gr } = $i({
|
|
3758
3850
|
enabled: Pr && Hr,
|
|
3759
3851
|
maxDistance: Er,
|
|
3760
3852
|
xSpeedParams: en,
|
|
@@ -3768,109 +3860,109 @@ const Hi = 1e4, ds = () => {
|
|
|
3768
3860
|
pendingColAnchorRef: rt,
|
|
3769
3861
|
xExtentFreshness: $r,
|
|
3770
3862
|
yExtentFreshness: Xr
|
|
3771
|
-
}), tn = ge(() =>
|
|
3772
|
-
|
|
3863
|
+
}), tn = ge(() => re((nr ? 1 : 0.8) * Ne.opacity, 0, 1), [nr, Ne.opacity]);
|
|
3864
|
+
We(() => {
|
|
3773
3865
|
const o = rt.current;
|
|
3774
|
-
o === null ? It.current(
|
|
3775
|
-
}, [me.width, Je, yt, Nt,
|
|
3866
|
+
o === null ? It.current(ve.current) : It.current(Jt(o)), zt();
|
|
3867
|
+
}, [me.width, Je, yt, Nt, ut, zt, Jt]);
|
|
3776
3868
|
const Vr = u(!1);
|
|
3777
|
-
|
|
3778
|
-
if (Vr.current ||
|
|
3869
|
+
We(() => {
|
|
3870
|
+
if (Vr.current || B === void 0 || e === 0)
|
|
3779
3871
|
return;
|
|
3780
3872
|
Vr.current = !0;
|
|
3781
|
-
const o =
|
|
3782
|
-
if (o < D || o >= e -
|
|
3873
|
+
const o = re(Math.trunc(B.col), 0, e - 1);
|
|
3874
|
+
if (o < D || o >= e - A)
|
|
3783
3875
|
return;
|
|
3784
|
-
const
|
|
3785
|
-
rt.current =
|
|
3786
|
-
}, [
|
|
3876
|
+
const b = { col: o, alignX: "start", offsetX: Math.max(0, B.offsetX) };
|
|
3877
|
+
rt.current = b, It.current(Jt(b));
|
|
3878
|
+
}, [B, e, Jt, D, A]);
|
|
3787
3879
|
const c = p((o) => {
|
|
3788
|
-
|
|
3880
|
+
Re.current = o, ar.current?.({ x: ve.current, y: o });
|
|
3789
3881
|
}, []), h = p(
|
|
3790
3882
|
(o) => {
|
|
3791
|
-
if (
|
|
3792
|
-
|
|
3883
|
+
if (ht === 0 || H.current)
|
|
3884
|
+
Xt.current = { renderingStartIndex: t, renderingEndIndex: t - 1, visibleStartIndex: t, visibleEndIndex: t - 1, scrollPosition: 0, totalHeight: ht === 0 ? 0 : o.totalHeight }, Re.current = 0;
|
|
3793
3885
|
else {
|
|
3794
|
-
const
|
|
3795
|
-
|
|
3796
|
-
renderingStartIndex: o.renderingStartIndex +
|
|
3797
|
-
renderingEndIndex: o.renderingEndIndex +
|
|
3798
|
-
visibleStartIndex: o.visibleStartIndex +
|
|
3799
|
-
visibleEndIndex: o.visibleEndIndex +
|
|
3886
|
+
const b = z;
|
|
3887
|
+
Xt.current = {
|
|
3888
|
+
renderingStartIndex: o.renderingStartIndex + b,
|
|
3889
|
+
renderingEndIndex: o.renderingEndIndex + b,
|
|
3890
|
+
visibleStartIndex: o.visibleStartIndex + b,
|
|
3891
|
+
visibleEndIndex: o.visibleEndIndex + b,
|
|
3800
3892
|
scrollPosition: o.scrollPosition,
|
|
3801
3893
|
totalHeight: o.totalHeight
|
|
3802
|
-
},
|
|
3894
|
+
}, Re.current = o.scrollPosition;
|
|
3803
3895
|
}
|
|
3804
|
-
E((
|
|
3805
|
-
const
|
|
3806
|
-
return
|
|
3807
|
-
}),
|
|
3896
|
+
E((b) => {
|
|
3897
|
+
const T = Math.max(1, o.renderingEndIndex - o.renderingStartIndex + 1);
|
|
3898
|
+
return T === b ? b : T;
|
|
3899
|
+
}), vt();
|
|
3808
3900
|
},
|
|
3809
|
-
[
|
|
3901
|
+
[vt, z, ht, t]
|
|
3810
3902
|
), m = p((o) => {
|
|
3811
|
-
rt.current = null, It.current(
|
|
3812
|
-
}, []), V = Qi(
|
|
3813
|
-
const o = Math.max(0, me.width - Nt -
|
|
3903
|
+
rt.current = null, It.current(ve.current + o);
|
|
3904
|
+
}, []), V = Qi(oe, de + mt.length + v.length), q = u({ count: 0, warned: !1 }), { placedColumns: G, truncatedCols: j } = ge(() => {
|
|
3905
|
+
const o = Math.max(0, me.width - Nt - ut);
|
|
3814
3906
|
if (e === 0 || o <= 0)
|
|
3815
3907
|
return { placedColumns: [], truncatedCols: 0 };
|
|
3816
|
-
if (
|
|
3908
|
+
if (Le.renderingColStart > Le.renderingColEnd)
|
|
3817
3909
|
return { placedColumns: [], truncatedCols: 0 };
|
|
3818
|
-
const
|
|
3819
|
-
if (
|
|
3820
|
-
const nt =
|
|
3821
|
-
nt.count >= cn ? nt.warned || (nt.warned = !0,
|
|
3822
|
-
window:
|
|
3823
|
-
pendingUpdates:
|
|
3824
|
-
})) : (nt.count += 1,
|
|
3910
|
+
const b = Math.max(1, V - tr.length - Ct.length), { columns: T, widthUpdates: Q, truncated: he } = ts(re(Le.renderingColStart, 0, e - 1), re(Le.renderingColEnd, 0, e - 1), Ze, Se, b);
|
|
3911
|
+
if (Q.length > 0) {
|
|
3912
|
+
const nt = q.current;
|
|
3913
|
+
nt.count >= cn ? nt.warned || (nt.warned = !0, L.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).", {
|
|
3914
|
+
window: Le.key,
|
|
3915
|
+
pendingUpdates: Q.length
|
|
3916
|
+
})) : (nt.count += 1, Bt.current = [...Bt.current ?? [], ...Q], Promise.resolve().then(er));
|
|
3825
3917
|
} else
|
|
3826
|
-
|
|
3827
|
-
return { placedColumns:
|
|
3828
|
-
}, [
|
|
3829
|
-
|
|
3918
|
+
q.current.count = 0, q.current.warned = !1;
|
|
3919
|
+
return { placedColumns: T, truncatedCols: he };
|
|
3920
|
+
}, [Le, e, me.width, Nt, ut, tr.length, Ct.length, yt, Ze, Se, V, er]), fe = u("");
|
|
3921
|
+
W(() => {
|
|
3830
3922
|
if (j > 0) {
|
|
3831
|
-
const o = `${
|
|
3832
|
-
o !== fe.current && (fe.current = o, cr.current?.({ renderedCells: (G.length + tr.length + Ct.length) * (de +
|
|
3923
|
+
const o = `${Le.key}:${j}`;
|
|
3924
|
+
o !== fe.current && (fe.current = o, cr.current?.({ renderedCells: (G.length + tr.length + Ct.length) * (de + mt.length + v.length), droppedCols: j }));
|
|
3833
3925
|
}
|
|
3834
|
-
}, [j,
|
|
3835
|
-
const
|
|
3926
|
+
}, [j, Le.key, G.length, tr.length, Ct.length, de, mt.length, v.length]);
|
|
3927
|
+
const Fe = Le.colAnchor, ct = p(
|
|
3836
3928
|
(o) => {
|
|
3837
|
-
const
|
|
3838
|
-
const Ut = l?.(o,
|
|
3839
|
-
return /* @__PURE__ */ rn("div", { ...Ut, key: s ? s(o,
|
|
3929
|
+
const b = f?.(o), T = Ve(o) === 0, Q = T ? null : G.map(({ col: he, left: nt, width: Tr }) => {
|
|
3930
|
+
const Ut = l?.(o, he), Ar = { ...Ut?.style, left: nt - Fe, width: Tr };
|
|
3931
|
+
return /* @__PURE__ */ rn("div", { ...Ut, key: s ? s(o, he) : he, className: Ot("aqvs-grid-cell", Ut?.className), style: Ar }, a(i(o, he), o, he));
|
|
3840
3932
|
});
|
|
3841
|
-
return D === 0 &&
|
|
3842
|
-
|
|
3843
|
-
const Ut = l?.(o,
|
|
3844
|
-
return /* @__PURE__ */ rn("div", { ...Ut, "data-aqvs-frozen-cell": "", key: s ? s(o,
|
|
3933
|
+
return D === 0 && A === 0 ? /* @__PURE__ */ Z("div", { ...b, className: Ot("aqvs-grid-row", b?.className), style: b?.style, children: Q }) : /* @__PURE__ */ Zt("div", { ...b, "data-aqvs-frozen-row": D > 0 ? "" : void 0, className: Ot("aqvs-grid-row aqvs-grid-row-frozen-host", b?.className), style: b?.style, children: [
|
|
3934
|
+
T ? null : tr.map(({ col: he, left: nt, width: Tr }) => {
|
|
3935
|
+
const Ut = l?.(o, he), Ar = { ...Ut?.style, left: nt, width: Tr };
|
|
3936
|
+
return /* @__PURE__ */ rn("div", { ...Ut, "data-aqvs-frozen-cell": "", key: s ? s(o, he) : he, className: Ot("aqvs-grid-cell", Ut?.className), style: Ar }, a(i(o, he), o, he));
|
|
3845
3937
|
}),
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
const Ut = l?.(o,
|
|
3849
|
-
return /* @__PURE__ */ rn("div", { ...Ut, "data-aqvs-trailing-cell": "", key: s ? s(o,
|
|
3938
|
+
T ? null : /* @__PURE__ */ Z("div", { className: "aqvs-grid-row-scroll", children: /* @__PURE__ */ Z("div", { className: "aqvs-grid-row-scroll-inner", children: Q }) }),
|
|
3939
|
+
T || A === 0 ? null : /* @__PURE__ */ Z("div", { className: "aqvs-grid-row-trailing", children: /* @__PURE__ */ Z("div", { className: "aqvs-grid-row-trailing-inner", children: Ct.map(({ col: he, left: nt, width: Tr }) => {
|
|
3940
|
+
const Ut = l?.(o, he), Ar = { ...Ut?.style, left: nt, width: Tr };
|
|
3941
|
+
return /* @__PURE__ */ rn("div", { ...Ut, "data-aqvs-trailing-cell": "", key: s ? s(o, he) : he, className: Ot("aqvs-grid-cell", Ut?.className), style: Ar }, a(i(o, he), o, he));
|
|
3850
3942
|
}) }) })
|
|
3851
3943
|
] });
|
|
3852
3944
|
},
|
|
3853
|
-
[G, tr, Ct, D,
|
|
3854
|
-
), [
|
|
3855
|
-
_t.current =
|
|
3945
|
+
[G, tr, Ct, D, A, Fe, f, l, s, i, a, Ve]
|
|
3946
|
+
), [Ie, Wt] = Ce(""), xt = u(null), dt = u(!1), _t = u(ke);
|
|
3947
|
+
_t.current = ke;
|
|
3856
3948
|
const ir = p(() => {
|
|
3857
3949
|
const o = _t.current;
|
|
3858
|
-
if (o === void 0 ||
|
|
3950
|
+
if (o === void 0 || dt.current)
|
|
3859
3951
|
return;
|
|
3860
|
-
const
|
|
3861
|
-
Number.isFinite(
|
|
3952
|
+
const b = o.debounceMs ?? 400;
|
|
3953
|
+
Number.isFinite(b) && b >= 0 && (xt.current !== null && window.clearTimeout(xt.current), xt.current = window.setTimeout(() => {
|
|
3862
3954
|
xt.current = null;
|
|
3863
|
-
const
|
|
3864
|
-
|
|
3865
|
-
},
|
|
3866
|
-
}, [
|
|
3867
|
-
|
|
3868
|
-
qr && !Br &&
|
|
3869
|
-
}, [qr, Br, Mr]),
|
|
3870
|
-
|
|
3871
|
-
}), []),
|
|
3955
|
+
const T = Oe();
|
|
3956
|
+
T !== null && Wt(o.buildMessage(T));
|
|
3957
|
+
}, b));
|
|
3958
|
+
}, [Oe]), Mr = ke?.debounceMs ?? 400, Br = Number.isFinite(Mr) && Mr >= 0, qr = ke !== void 0;
|
|
3959
|
+
W(() => {
|
|
3960
|
+
qr && !Br && L.warn(`[VirtualGrid] liveRegion.debounceMs must be a finite number >= 0, received ${Mr}. Announcements are disabled.`);
|
|
3961
|
+
}, [qr, Br, Mr]), W(() => (dt.current = !1, () => {
|
|
3962
|
+
dt.current = !0, xt.current !== null && window.clearTimeout(xt.current);
|
|
3963
|
+
}), []), W(() => {
|
|
3872
3964
|
ir();
|
|
3873
|
-
}, [
|
|
3965
|
+
}, [Le, ir]);
|
|
3874
3966
|
const Yr = p(
|
|
3875
3967
|
(o) => {
|
|
3876
3968
|
h(o), ir();
|
|
@@ -3880,159 +3972,221 @@ const Hi = 1e4, ds = () => {
|
|
|
3880
3972
|
return Jr(
|
|
3881
3973
|
He,
|
|
3882
3974
|
() => ({
|
|
3975
|
+
/**
|
|
3976
|
+
* Applies `y` through the embedded row list's `scrollTo` (it floors and pins a row anchor) and `x` through `applyHx`,
|
|
3977
|
+
* clearing any column anchor; returns the applied position.
|
|
3978
|
+
* `y` は埋め込みの行の一覧の `scrollTo` (切り捨てて行のアンカーを張る) で、`x` は列のアンカーを外して `applyHx` で当て、当てた位置を
|
|
3979
|
+
* 返す処理。
|
|
3980
|
+
*/
|
|
3883
3981
|
scrollTo: (o) => {
|
|
3884
|
-
const
|
|
3885
|
-
let
|
|
3886
|
-
o.y !== void 0 &&
|
|
3887
|
-
let
|
|
3888
|
-
return o.x !== void 0 && (rt.current = null,
|
|
3982
|
+
const b = ce.current;
|
|
3983
|
+
let T = Re.current;
|
|
3984
|
+
o.y !== void 0 && b !== null && (b.scrollTo(o.y), T = b.getScrollPosition(), Re.current = T);
|
|
3985
|
+
let Q = ve.current;
|
|
3986
|
+
return o.x !== void 0 && (rt.current = null, Q = It.current(o.x)), { x: Q, y: T };
|
|
3889
3987
|
},
|
|
3988
|
+
/**
|
|
3989
|
+
* Applies a non-zero `y` delta through `applyVy` and a non-zero `x` delta through `applyHx` (clearing any column anchor);
|
|
3990
|
+
* returns the applied position.
|
|
3991
|
+
* 0 でない `y` の差分は `applyVy` で、0 でない `x` の差分は列のアンカーを外して `applyHx` で当て、当てた位置を返す処理。
|
|
3992
|
+
*/
|
|
3890
3993
|
scrollBy: (o) => {
|
|
3891
|
-
const
|
|
3892
|
-
let
|
|
3893
|
-
return o.x !== void 0 && o.x !== 0 && (rt.current = null,
|
|
3994
|
+
const b = o.y !== void 0 && o.y !== 0 ? wr(o.y) : Re.current;
|
|
3995
|
+
let T = ve.current;
|
|
3996
|
+
return o.x !== void 0 && o.x !== 0 && (rt.current = null, T = It.current(ve.current + o.x)), { x: T, y: b };
|
|
3894
3997
|
},
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3998
|
+
/**
|
|
3999
|
+
* Reveals a cell: a scroll row through the embedded row list's `scrollToIndex` (translated by −R), a scroll column by
|
|
4000
|
+
* arming a column anchor and applying its position; a frozen or trailing band row or column leaves its axis as it is.
|
|
4001
|
+
* セルを見せる処理。スクロール行は −R へ訳して埋め込みの行の一覧の `scrollToIndex` で、スクロール列は列のアンカーを張ってその位置を
|
|
4002
|
+
* 当てる。先頭・末尾の帯の行や列を狙った軸はそのまま。
|
|
4003
|
+
*/
|
|
4004
|
+
scrollToCell: (o, b, T) => {
|
|
4005
|
+
const Q = ce.current;
|
|
4006
|
+
if (Q !== null && t > 0) {
|
|
4007
|
+
const he = re(Math.trunc(o), 0, t - 1);
|
|
4008
|
+
he >= z && he < t - Ae && Q.scrollToIndex(he - z, { align: T?.alignY ?? "top", offset: T?.offsetY });
|
|
3900
4009
|
}
|
|
3901
4010
|
if (e > 0) {
|
|
3902
|
-
const
|
|
3903
|
-
if (
|
|
3904
|
-
const nt = { col:
|
|
4011
|
+
const he = re(Math.trunc(b), 0, e - 1);
|
|
4012
|
+
if (he >= D && he < e - A) {
|
|
4013
|
+
const nt = { col: he, alignX: T?.alignX ?? "start", offsetX: T?.offsetX ?? 0 };
|
|
3905
4014
|
rt.current = nt, It.current(Jt(nt));
|
|
3906
4015
|
}
|
|
3907
4016
|
}
|
|
3908
4017
|
},
|
|
3909
|
-
|
|
4018
|
+
/**
|
|
4019
|
+
* Reads the position: `x` from the horizontal cell, `y` through `getVy` (the embedded handle, or the last position once the
|
|
4020
|
+
* grid has unmounted).
|
|
4021
|
+
* 位置を読む処理。`x` は横の位置のセルから、`y` は `getVy` (埋め込みのハンドル。グリッドのアンマウントの後は最後の位置) から。
|
|
4022
|
+
*/
|
|
4023
|
+
getScrollPosition: () => ({ x: ve.current, y: mr() }),
|
|
4024
|
+
/**
|
|
4025
|
+
* Captures the `{ row, col, offsetX, offsetY }` anchor of the first visible cell of the scroll band, on the same boundary
|
|
4026
|
+
* rule as the row side; null when either count is 0 or there is no scroll row.
|
|
4027
|
+
* スクロール帯の最初に見えるセルの `{ row, col, offsetX, offsetY }` のアンカーを、行の側と同じ境界の規則で捕える処理。どちらかの数が 0、
|
|
4028
|
+
* またはスクロール行が無ければ null。
|
|
4029
|
+
*/
|
|
3910
4030
|
getScrollAnchor: () => {
|
|
3911
4031
|
if (t === 0 || e === 0)
|
|
3912
4032
|
return null;
|
|
3913
4033
|
const o = ce.current?.getScrollAnchor() ?? null;
|
|
3914
4034
|
if (o === null)
|
|
3915
4035
|
return null;
|
|
3916
|
-
const
|
|
3917
|
-
if (
|
|
3918
|
-
return { row: o.index +
|
|
3919
|
-
if (
|
|
3920
|
-
return { row: o.index +
|
|
3921
|
-
const
|
|
3922
|
-
return { row: o.index +
|
|
4036
|
+
const b = ot.current + ve.current, T = Se.findIndexAtOrAfter(b, it);
|
|
4037
|
+
if (T.index === -1)
|
|
4038
|
+
return { row: o.index + z, col: e - 1, offsetX: 0, offsetY: o.offsetPx };
|
|
4039
|
+
if (T.cumulative === b)
|
|
4040
|
+
return { row: o.index + z, col: re(T.index + 1, 0, e - 1), offsetX: 0, offsetY: o.offsetPx };
|
|
4041
|
+
const Q = Se.prefixSum(T.index, it);
|
|
4042
|
+
return { row: o.index + z, col: T.index, offsetX: Math.max(0, b - (Q.cumulative - Q.currentValue)), offsetY: o.offsetPx };
|
|
3923
4043
|
},
|
|
3924
|
-
|
|
4044
|
+
/**
|
|
4045
|
+
* Reads the cell viewport (the measured or given box without the bars).
|
|
4046
|
+
* セルのビューポート (測ったか与えられた箱からバーを除いたもの) を読む処理。
|
|
4047
|
+
*/
|
|
4048
|
+
getViewportSize: () => ({ width: bt.current.width, height: bt.current.height }),
|
|
4049
|
+
/**
|
|
4050
|
+
* Reads the content size: the total column width, and the band heights plus the embedded row list's content size
|
|
4051
|
+
* (insets included; 0 once the grid has unmounted).
|
|
4052
|
+
* 中身の寸法を読む処理。列の総幅と、帯の高さに埋め込みの行の一覧の中身の高さ (インセット込み。グリッドのアンマウントの後は 0) を足したもの。
|
|
4053
|
+
*/
|
|
3925
4054
|
// 縦はインセット込みの行側 getContentSize を単一情報源にする (range.totalHeight は木総高のみ)。
|
|
3926
4055
|
// 3.5.0: height = H_F + 埋め込み + H_T
|
|
3927
|
-
getContentSize: () => ({ width:
|
|
3928
|
-
getRange:
|
|
3929
|
-
|
|
3930
|
-
|
|
4056
|
+
getContentSize: () => ({ width: P.current, height: ce.current === null ? 0 : pt.current + At.current + Math.max(0, ce.current.getContentSize()) }),
|
|
4057
|
+
getRange: Oe,
|
|
4058
|
+
/**
|
|
4059
|
+
* Takes a row's new height (validated first): a leading or trailing band row re-reads its accessor through its epoch, a
|
|
4060
|
+
* scroll row goes to the embedded row list's `updateItemSize` (translated by −R).
|
|
4061
|
+
* 行の新しい高さを受け取る処理 (先に検証)。先頭・末尾の帯の行は epoch でアクセサを読み直させ、スクロール行は −R へ訳して埋め込みの
|
|
4062
|
+
* 行の一覧の `updateItemSize` へ渡す。
|
|
4063
|
+
*/
|
|
4064
|
+
updateRowSize: (o, b) => {
|
|
4065
|
+
jr(b, "row", o), Math.trunc(o) < z ? Ht((T) => T + 1) : Ae > 0 && Math.trunc(o) >= t - Ae ? $t((T) => T + 1) : ce.current?.updateItemSize(Math.trunc(o) - z, b);
|
|
3931
4066
|
},
|
|
3932
|
-
|
|
3933
|
-
|
|
4067
|
+
/**
|
|
4068
|
+
* Takes a column's new width (validated first) into the width tree and mirrors the new total width at once.
|
|
4069
|
+
* 列の新しい幅を (先に検証して) 幅木へ入れ、新しい総幅をすぐに写す処理。
|
|
4070
|
+
*/
|
|
4071
|
+
updateColSize: (o, b) => {
|
|
4072
|
+
jr(b, "col", o), Ye($e(() => Se.update(re(Math.trunc(o), 0, Math.max(0, e - 1)), b)));
|
|
3934
4073
|
},
|
|
4074
|
+
/**
|
|
4075
|
+
* Reads the effective frozen bands of both axes and both ends (the visible trailing sizes through `trailingVisibleSize`).
|
|
4076
|
+
* 両軸・両端の実効の凍結帯を読む処理 (見えている末尾の寸法は `trailingVisibleSize` で求める)。
|
|
4077
|
+
*/
|
|
3935
4078
|
getFrozenSize: () => ({
|
|
3936
4079
|
cols: D,
|
|
3937
4080
|
width: ot.current,
|
|
3938
|
-
rows:
|
|
3939
|
-
height:
|
|
3940
|
-
trailingCols:
|
|
3941
|
-
trailingRows:
|
|
3942
|
-
trailingWidth:
|
|
4081
|
+
rows: z,
|
|
4082
|
+
height: pt.current,
|
|
4083
|
+
trailingCols: A,
|
|
4084
|
+
trailingRows: Ae,
|
|
4085
|
+
trailingWidth: ft.current,
|
|
3943
4086
|
trailingHeight: At.current,
|
|
3944
4087
|
// vis は単一 JS 源ヘルパーの呼び出しのみ (式の再導出禁止 — 3.5.0 プラン §2.1-4)
|
|
3945
|
-
trailingVisibleWidth: Kr(
|
|
3946
|
-
trailingVisibleHeight: Kr(At.current,
|
|
4088
|
+
trailingVisibleWidth: Kr(ft.current, ot.current, bt.current.width),
|
|
4089
|
+
trailingVisibleHeight: Kr(At.current, pt.current, bt.current.height)
|
|
3947
4090
|
}),
|
|
4091
|
+
/**
|
|
4092
|
+
* Applies one wheel event through the embedded row list (its horizontal part reaches the grid's own axis through the
|
|
4093
|
+
* row list's `onWheelHorizontal`); returns whether the event was consumed, false once the grid has unmounted.
|
|
4094
|
+
* ホイールのイベント 1 つを埋め込みの行の一覧で当てる処理 (横の成分は行の一覧の `onWheelHorizontal` を通ってグリッド自身の軸へ届く)。
|
|
4095
|
+
* 消費したかを返し、グリッドのアンマウントの後は false。
|
|
4096
|
+
*/
|
|
3948
4097
|
applyWheel: (o) => ce.current?.applyWheel(o) ?? !1,
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
4098
|
+
/**
|
|
4099
|
+
* Focuses a row: a leading or trailing band row through its band DOM, a scroll row through the embedded row list's
|
|
4100
|
+
* `focusItemAtIndex` (translated by −R).
|
|
4101
|
+
* 行へフォーカスする処理。先頭・末尾の帯の行は帯の DOM へ直接、スクロール行は −R へ訳して埋め込みの行の一覧の `focusItemAtIndex` で。
|
|
4102
|
+
*/
|
|
4103
|
+
focusRowAtIndex: (o, b) => {
|
|
4104
|
+
const T = Math.trunc(o);
|
|
4105
|
+
T < z ? Pe.current?.querySelector(`[data-aqvs-frozen-band-row="${T}"]`)?.focus() : Ae > 0 && T >= t - Ae ? Pe.current?.querySelector(`[data-aqvs-trailing-band-row="${T}"]`)?.focus() : ce.current?.focusItemAtIndex(T - z, b);
|
|
3952
4106
|
}
|
|
3953
4107
|
}),
|
|
3954
|
-
[t, e,
|
|
3955
|
-
), /* @__PURE__ */ Zt("div", { ref: Ft, className: Ot("aqvs-grid",
|
|
3956
|
-
|
|
4108
|
+
[t, e, Se, $e, Oe, Ye, Jt, mr, wr, D, z, A, Ae]
|
|
4109
|
+
), /* @__PURE__ */ Zt("div", { ref: Ft, className: Ot("aqvs-grid", z > 0 ? "aqvs-grid-has-frozen-rows" : "", Ae > 0 ? "aqvs-grid-has-trailing-rows" : "", K), "data-testid": ee, children: [
|
|
4110
|
+
z > 0 ? (
|
|
3957
4111
|
// 凍結行帯 (行凍結設計 §4-2): グリッド所有の帯外バンド — 行本体は renderRow を
|
|
3958
4112
|
// そのまま再利用する (F > 0 の凍結セル / クリップ / hx 残差 var は継承で無償追随
|
|
3959
4113
|
// = 4 象限コーナーの成立点)。top は木絶対プレフィックス、高さ 0 行は DOM 非生成
|
|
3960
|
-
/* @__PURE__ */
|
|
4114
|
+
/* @__PURE__ */ Z("div", { className: "aqvs-grid-frozen-rows", style: { height: Xe }, "data-testid": ee ? `${ee}-frozen-rows` : void 0, children: mt.map(({ row: o, top: b, height: T }) => (
|
|
3961
4115
|
// 行ラッパーの role は消費側の複合ウィジェット契約 (listbox / tree / grid — README
|
|
3962
4116
|
// 「Composite widget roles」) の所有物で、パッケージが既定 role を課すと衝突する。
|
|
3963
4117
|
// フォーカス結線は focusRowAtIndex ↔ onRowFocus 往復のバンド版そのもの。右インセット
|
|
3964
4118
|
// (right: scrollBarWidth + overflow クリップ) は縦バーコーナーの予約 — ペインの
|
|
3965
4119
|
// クリップ箱 (root − バー幅) と帯のクリップ箱を一致させる (R1 是正)。
|
|
3966
4120
|
// biome-ignore lint/a11y/noStaticElementInteractions: role は消費側の複合ウィジェット契約の所有物 (上記)
|
|
3967
|
-
/* @__PURE__ */
|
|
4121
|
+
/* @__PURE__ */ Z("div", { "data-aqvs-frozen-band-row": o, className: "aqvs-grid-frozen-band-row", style: { top: b, height: T, right: ye }, tabIndex: -1, onFocus: () => N?.(o), children: ct(o) }, o)
|
|
3968
4122
|
)) })
|
|
3969
4123
|
) : null,
|
|
3970
|
-
/* @__PURE__ */
|
|
4124
|
+
/* @__PURE__ */ Z("div", { className: "aqvs-grid-main", "data-testid": ee ? `${ee}-main` : void 0, children: /* @__PURE__ */ Z(
|
|
3971
4125
|
Ki,
|
|
3972
4126
|
{
|
|
3973
4127
|
ref: ce,
|
|
3974
|
-
itemCount: Qt ? 0 :
|
|
3975
|
-
getItem: (o) => o +
|
|
3976
|
-
getItemKey: (o) => o +
|
|
3977
|
-
getItemHeight:
|
|
3978
|
-
overscanCount:
|
|
4128
|
+
itemCount: Qt ? 0 : ht,
|
|
4129
|
+
getItem: (o) => o + z,
|
|
4130
|
+
getItemKey: (o) => o + z,
|
|
4131
|
+
getItemHeight: te,
|
|
4132
|
+
overscanCount: k,
|
|
3979
4133
|
viewportSize: me.height > 0 ? Math.max(0, me.height - Xe - Y) : void 0,
|
|
3980
|
-
callbackThrottleMs:
|
|
3981
|
-
behaviorOptions:
|
|
4134
|
+
callbackThrottleMs: X,
|
|
4135
|
+
behaviorOptions: pe,
|
|
3982
4136
|
scrollBarOptions: rr,
|
|
3983
|
-
contentProps:
|
|
3984
|
-
background:
|
|
3985
|
-
contentInsets:
|
|
3986
|
-
onItemFocus:
|
|
3987
|
-
horizontalKeyInputs:
|
|
3988
|
-
horizontalKeyStep:
|
|
4137
|
+
contentProps: g,
|
|
4138
|
+
background: x,
|
|
4139
|
+
contentInsets: S,
|
|
4140
|
+
onItemFocus: Ee,
|
|
4141
|
+
horizontalKeyInputs: ie,
|
|
4142
|
+
horizontalKeyStep: ze,
|
|
3989
4143
|
initialScrollAnchor: (
|
|
3990
4144
|
// トグル済みなら視点保存 (捕捉アンカー) のみ — 捕捉 null は undefined (先頭)
|
|
3991
4145
|
// へ落とし、消費済みマウント props の蘇りを断つ (R2 是正)。未トグルのみ
|
|
3992
4146
|
// マウント props の凍結行 no-op 付き −R 変換 (列の §8 no-op と同文)
|
|
3993
|
-
|
|
4147
|
+
gt.current ? U.current !== null && U.current.row >= z && ht > 0 ? { index: U.current.row - z, offsetPx: U.current.offsetPx } : void 0 : B !== void 0 && ht > 0 && Math.trunc(B.row) >= z && Math.trunc(B.row) < t - Ae ? { index: Math.trunc(B.row) - z, offsetPx: B.offsetY } : void 0
|
|
3994
4148
|
),
|
|
3995
4149
|
onScroll: c,
|
|
3996
4150
|
onRangeChange: Yr,
|
|
3997
4151
|
onWheelHorizontal: m,
|
|
3998
4152
|
onPanHorizontal: m,
|
|
3999
|
-
locale:
|
|
4153
|
+
locale: je,
|
|
4000
4154
|
labels: C,
|
|
4001
|
-
testId:
|
|
4002
|
-
children:
|
|
4155
|
+
testId: ee ? `${ee}-rows` : void 0,
|
|
4156
|
+
children: ct
|
|
4003
4157
|
},
|
|
4004
|
-
|
|
4158
|
+
z
|
|
4005
4159
|
) }),
|
|
4006
|
-
|
|
4160
|
+
Ae > 0 ? (
|
|
4007
4161
|
// 末尾行帯 (3.5.0 プラン §6.1-17): .aqvs-grid-main の**後**・hbar の**前**の兄弟
|
|
4008
4162
|
// (AT には「最終行が最後」の DOM 順正しさ。縦バーは帯の上で自然に終端)。帯クリップ高は
|
|
4009
4163
|
// インライン H_T_vis (単一 JS 源 — 帯寸の CSS 変数は幅 2 つのみで高さ変数は導入しない)、
|
|
4010
4164
|
// inner はインライン木高 H_T の bottom 定着 — 帯上端 = extent − H_T_vis が全構成で
|
|
4011
4165
|
// 成立し、重複縮退では帯の**末尾**行が可視に残る。行本体は renderRow 逐語再利用
|
|
4012
4166
|
// (先頭列 / 末尾列の帯構造を継承し 4 象限コーナー全種が無償で成立)
|
|
4013
|
-
/* @__PURE__ */
|
|
4167
|
+
/* @__PURE__ */ Z("div", { className: "aqvs-grid-trailing-rows", style: { height: Kr(Y, Xe, me.height) }, "data-testid": ee ? `${ee}-trailing-rows` : void 0, children: /* @__PURE__ */ Z("div", { className: "aqvs-grid-trailing-rows-inner", style: { height: Y }, children: v.map(({ row: o, top: b, height: T }) => (
|
|
4014
4168
|
// 帯行は帯ローカル top + right: scrollBarWidth (縦バーコーナーの予約 — 先頭帯行と
|
|
4015
4169
|
// 同文) + tabIndex −1 + onFocus フル行 index (focusRowAtIndex ↔ onRowFocus 往復)。
|
|
4016
4170
|
// biome-ignore lint/a11y/noStaticElementInteractions: role は消費側の複合ウィジェット契約の所有物 (先頭帯行と同文)
|
|
4017
|
-
/* @__PURE__ */
|
|
4171
|
+
/* @__PURE__ */ Z("div", { "data-aqvs-trailing-band-row": o, className: "aqvs-grid-trailing-band-row", style: { top: b, height: T, right: ye }, tabIndex: -1, onFocus: () => N?.(o), children: ct(o) }, o)
|
|
4018
4172
|
)) }) })
|
|
4019
4173
|
) : null,
|
|
4020
|
-
/* @__PURE__ */
|
|
4174
|
+
/* @__PURE__ */ Z("div", { className: "aqvs-grid-hbar-strip", style: { height: ye, paddingRight: A > 0 ? ye + Kr(ut, Nt, me.width) : ye }, "data-testid": ee ? `${ee}-hbar` : void 0, children: /* @__PURE__ */ Z(
|
|
4021
4175
|
Un,
|
|
4022
4176
|
{
|
|
4023
4177
|
horizontal: !0,
|
|
4024
|
-
contentSize: Math.max(0, Je - Nt -
|
|
4025
|
-
viewportSize: Math.max(0, me.width - Nt -
|
|
4178
|
+
contentSize: Math.max(0, Je - Nt - ut),
|
|
4179
|
+
viewportSize: Math.max(0, me.width - Nt - ut),
|
|
4026
4180
|
scrollPosition: or,
|
|
4027
|
-
itemCount: Math.max(0, e - D -
|
|
4181
|
+
itemCount: Math.max(0, e - D - A),
|
|
4028
4182
|
tapScrollCircleOptions: xe?.tapScrollCircleOptions,
|
|
4029
|
-
onScroll: (o,
|
|
4183
|
+
onScroll: (o, b) => (rt.current = null, It.current(typeof o == "function" ? o(b) : o)),
|
|
4030
4184
|
enableThumbDrag: xe?.enableThumbDrag,
|
|
4031
4185
|
enableTrackClick: xe?.enableTrackClick,
|
|
4032
4186
|
enableArrowButtons: xe?.enableArrowButtons,
|
|
4033
4187
|
enableArrowButtonTabStops: xe?.enableArrowButtonTabStops,
|
|
4034
|
-
scrollBarWidth:
|
|
4035
|
-
locale:
|
|
4188
|
+
scrollBarWidth: ye,
|
|
4189
|
+
locale: je,
|
|
4036
4190
|
labels: C
|
|
4037
4191
|
}
|
|
4038
4192
|
) }),
|
|
@@ -4042,39 +4196,39 @@ const Hi = 1e4, ds = () => {
|
|
|
4042
4196
|
// 帯幅非依存 (凍結トグル不変)。wrapper は純配置で transition を持たない
|
|
4043
4197
|
// (フェードはサークルルートのインライン opacity — §8.7)。hbar strip の後・
|
|
4044
4198
|
// live region の前 = 共有 z-50 層の DOM 後勝ちで最前
|
|
4045
|
-
/* @__PURE__ */
|
|
4199
|
+
/* @__PURE__ */ Z(
|
|
4046
4200
|
"div",
|
|
4047
4201
|
{
|
|
4048
4202
|
className: "aqvs-grid-tap-circle-wrapper",
|
|
4049
4203
|
"data-aqvs-grid-tap-circle": "",
|
|
4050
4204
|
style: {
|
|
4051
|
-
left: `min(calc(100% - ${
|
|
4052
|
-
top: `min(calc(100% - ${
|
|
4205
|
+
left: `min(calc(100% - ${ye + Ne.size}px), max(calc(100% - ${ye}px + ${Ne.offsetX}px), calc(75% - ${Ne.size / 2}px)))`,
|
|
4206
|
+
top: `min(calc(100% - ${ye + Ne.size}px), max(calc(100% - ${ye}px + ${Ne.offsetY}px), calc(75% - ${Ne.size / 2}px)))`
|
|
4053
4207
|
},
|
|
4054
|
-
children: /* @__PURE__ */
|
|
4208
|
+
children: /* @__PURE__ */ Z(
|
|
4055
4209
|
mn,
|
|
4056
4210
|
{
|
|
4057
4211
|
axis: "xy",
|
|
4058
4212
|
ref: gr,
|
|
4059
|
-
className: Ot("aqvs-grid-tap-circle",
|
|
4060
|
-
size:
|
|
4213
|
+
className: Ot("aqvs-grid-tap-circle", Ne.className),
|
|
4214
|
+
size: Ne.size,
|
|
4061
4215
|
maxVisualDistance: Er,
|
|
4062
4216
|
opacity: tn,
|
|
4063
|
-
renderVisual:
|
|
4217
|
+
renderVisual: Ne.renderVisual,
|
|
4064
4218
|
onDragChange: Sr
|
|
4065
4219
|
}
|
|
4066
4220
|
)
|
|
4067
4221
|
}
|
|
4068
4222
|
),
|
|
4069
|
-
|
|
4223
|
+
ke !== void 0 ? /* @__PURE__ */ Z("div", { className: "aqvs-grid-live-region", "aria-live": "polite", "data-testid": ee ? `${ee}-live` : void 0, children: Ie }) : null
|
|
4070
4224
|
] });
|
|
4071
4225
|
}, hs = Qr(ss);
|
|
4072
4226
|
export {
|
|
4073
4227
|
sr as FenwickMapTree,
|
|
4074
4228
|
Vn as MAX_FROZEN_LEADING_COLS,
|
|
4075
4229
|
An as MAX_FROZEN_LEADING_ROWS,
|
|
4076
|
-
|
|
4077
|
-
|
|
4230
|
+
Dn as MAX_FROZEN_TRAILING_COLS,
|
|
4231
|
+
zn as MAX_FROZEN_TRAILING_ROWS,
|
|
4078
4232
|
Zi as MAX_RENDERED_CELLS,
|
|
4079
4233
|
Lr as MAX_TRACK_SIZE,
|
|
4080
4234
|
Un as ScrollBar,
|
|
@@ -4089,7 +4243,7 @@ export {
|
|
|
4089
4243
|
fn as computeTapScrollSpeed,
|
|
4090
4244
|
Ni as computeTapScrollVelocity,
|
|
4091
4245
|
ls as createResidualQuantizer,
|
|
4092
|
-
|
|
4246
|
+
re as minmax,
|
|
4093
4247
|
$n as resolveVirtualScrollLabels,
|
|
4094
4248
|
Hn as resolveVirtualScrollLocale,
|
|
4095
4249
|
us as tapScrollCircleSampleVisual,
|