@aiquants/virtualscroll 2.7.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/README.md +78 -10
- package/dist/VirtualScroll.d.cts +103 -9
- package/dist/VirtualScroll.d.ts +103 -9
- package/dist/VirtualScroll.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1571 -1512
- package/dist/residualQuantizer.d.cts +95 -0
- package/dist/residualQuantizer.d.ts +96 -0
- package/dist/residualQuantizer.d.ts.map +1 -0
- package/dist/styles/virtualscroll.css +1 -1
- package/dist/styles/virtualscroll.standalone.css +1 -1
- package/package.json +1 -1
- package/src/VirtualScroll.tsx +237 -44
- package/src/index.ts +3 -0
- package/src/residualQuantizer.ts +133 -0
- package/src/styles/virtualscroll.css +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@aiquants/virtualscroll` are documented here.
|
|
4
4
|
|
|
5
|
+
## 3.1.0 (2026-08-20)
|
|
6
|
+
|
|
7
|
+
**A-5 のアクセシビリティ / 入力ユーティリティ 3 点。すべて opt-in で、未使用時の挙動・DOM 形状は
|
|
8
|
+
一切変わりません。**
|
|
9
|
+
|
|
10
|
+
- **Escape 行復帰** (`behaviorOptions.enableEscapeRowReturn`、既定 `false`): 行内のリンクや
|
|
11
|
+
ウィジェットにフォーカスがある状態で `Escape` を押すと行ラッパーへフォーカスを戻します
|
|
12
|
+
(行はタブ順に入らないため、既定ではキーボードで行へ戻る手段が無かった)。`Escape` は最多重負荷の
|
|
13
|
+
キーのため、**bubble フェーズ**で聞き (行内ウィジェットの `stopPropagation` / `preventDefault` が
|
|
14
|
+
常に勝つ)、IME 合成中 (`isComposing`)・**編集可能なターゲット (input / textarea / select /
|
|
15
|
+
contentEditable — ネイティブの Escape 既定動作は `defaultPrevented` に現れず検査で守れない)**・
|
|
16
|
+
行自身フォーカス時は何もしません。作用時は `preventDefault()` のみで伝播は止めません
|
|
17
|
+
(矢印キーと同じ契約)。
|
|
18
|
+
- **ライブリージョン** (`liveRegion` prop): 可視範囲を支援技術へ読み上げる `role="status"`
|
|
19
|
+
(polite / atomic) の隠し要素をペインの兄弟として描画します。文言は消費側の `format` が組み立て
|
|
20
|
+
(パッケージは文字列を内蔵しない)、範囲静定後の trailing デバウンス (`debounceMs`、既定 400) で
|
|
21
|
+
1 回だけ更新します。不正な `debounceMs` は警告して無効化 (黙って既定へ読み替えない)。実行時に
|
|
22
|
+
prop を外すと残留文言もクリアします (再有効化時に古い範囲を読み上げさせない)。
|
|
23
|
+
- **`createResidualQuantizer`**: 位置を行/列単位へスナップする消費側向けの残差持ち越し型デルタ
|
|
24
|
+
量子化器。高解像度トラックパッドの量子未満デルタが都度 0 に丸められて「ゆっくり撫でると動かない」
|
|
25
|
+
問題を、残差蓄積 + 量子単位の放出で解消します。方向反転で残差を破棄 (既定、幽霊スクロール防止)、
|
|
26
|
+
非有限デルタと `Number.MAX_SAFE_INTEGER` 超のデルタは蓄積を汚さず 0 (2^53 超では放出が量子の
|
|
27
|
+
正確な倍数でなくなるため)、不正な量子は生成時に throw (Fail Fast)。時間起点の破棄は意図的に
|
|
28
|
+
内蔵せず、消費側の `reset()` に委ねます。
|
|
29
|
+
|
|
30
|
+
A-5 のうち**固定リピートタイマは実装を見送り**ました: 長押しの連続スクロール速度は OS のキー
|
|
31
|
+
リピート設定に委ねます (運動障害等でリピートを意図的に遅くした利用者の設定とパッケージ内タイマが
|
|
32
|
+
戦うため。需要が実証された場合に opt-in で再検討)。
|
|
33
|
+
|
|
34
|
+
## 3.0.0 (2026-08-20)
|
|
35
|
+
|
|
36
|
+
**💥 BREAKING: `horizontalKeyInputs` から `"shift-arrow"` を撤去。** `Shift + ←/→` による横キーボード
|
|
37
|
+
スクロールは実装取りやめとなり、Shift 併用の矢印キーは**無条件で**ブラウザへ返ります (選択範囲の伸縮)。
|
|
38
|
+
型は `readonly ("arrow" | "shift-arrow")[]` → `readonly "arrow"[]` に狭まります。
|
|
39
|
+
|
|
40
|
+
**撤去の理由** — 2.x の「行内に選択があるときだけ譲る」検出 (`getSelection()` + 交差判定) には実測で
|
|
41
|
+
確認された構造的欠陥が残り、どの改良案も別の正しいユーザー意図を誤判定するため、機能ごと撤去しました:
|
|
42
|
+
|
|
43
|
+
- **Shadow DOM 内の選択が検出できない**: Chrome は `document.getSelection()` を retarget するため
|
|
44
|
+
保護が無言にすり抜け、選択中でも `Shift + →` が横スクロールへ奪われる (実測・chromium 148)。
|
|
45
|
+
可搬な代替 API が存在しない (`ShadowRoot.getSelection()` は非標準、`getComposedRanges()` は対応限定)。
|
|
46
|
+
- **`Ctrl+A` で全面ロックアウト**: ページ全体の選択は全行と交差するため、選択を解くまで一覧全体で
|
|
47
|
+
`Shift + ←/→` が死ぬ (実測・chromium 148)。
|
|
48
|
+
- **選択を畳むキーボード手段が無い**: 非編集領域の選択を Chrome は矢印キーで畳まないため、
|
|
49
|
+
一度ドラッグ選択すると `Shift + ←/→` がクリックまで復帰しない。
|
|
50
|
+
|
|
51
|
+
**移行**: `["shift-arrow"]` / `["arrow", "shift-arrow"]` を渡していた場合は `["arrow"]` へ変更して
|
|
52
|
+
ください。型を迂回して実行時に旧語彙の配列を渡しても**不活性** (何も消費しない) であり、旧挙動への
|
|
53
|
+
フォールバックはありません。Shift 系の横入力が必要な場合は `shift + ホイール` が引き続き使えます
|
|
54
|
+
(選択と衝突しません)。なお撤去は横矢印のみで、縦の `Shift + ↑/↓` によるフォーカス走査は従来どおりです
|
|
55
|
+
(ファイラ型のレンジ選択が消費側で成立するための意図的な非対称)。
|
|
56
|
+
素の `←/→` の挙動・`horizontalKeyStep`・発火条件 (行フォーカス前提、`preventDefault` のみで伝播は
|
|
57
|
+
止めない、等) はすべて従来どおりです。あわせて内部の選択検出 (`hasTextSelectionWithin`) を削除しました。
|
|
58
|
+
|
|
5
59
|
## 2.7.0 (2026-08-20)
|
|
6
60
|
|
|
7
61
|
**端でホイールがページへ連鎖する。** ネイティブのスクロール領域と同じく、その向きへ**もう動けない**
|
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@ High-performance virtual scrolling component for React with variable item height
|
|
|
13
13
|
- ↔️ **Horizontal Delegation**: Opt-in `onWheelHorizontal` hands horizontal wheel / trackpad (and shift+wheel) gestures to the parent — build frozen-column data grids
|
|
14
14
|
- 🎨 **Customizable**: Flexible styling and theming options
|
|
15
15
|
- 🌀 **Ultrafast Tap Scroll**: Adaptive tap scroll circle that scales speed up to 120× for massive datasets
|
|
16
|
+
- ♿ **Accessibility opt-ins**: Escape row-return (`enableEscapeRowReturn`) and a screen-reader live region (`liveRegion`) announcing the visible range with your own wording
|
|
16
17
|
- 🔧 **TypeScript**: Full TypeScript support with comprehensive type definitions
|
|
17
18
|
|
|
18
19
|
## Installation
|
|
@@ -266,14 +267,15 @@ With `onWheelHorizontal` wired **and `behaviorOptions.enableKeyboardNavigation`
|
|
|
266
267
|
| Value | Keys | Use it when |
|
|
267
268
|
| --- | --- | --- |
|
|
268
269
|
| `[]` (default) | — | Never steal the row's own arrow handling |
|
|
269
|
-
| `["
|
|
270
|
-
| `["arrow"]` | `←/→` | Grids that bind `Shift + ←/→` to range selection |
|
|
271
|
-
| `["arrow", "shift-arrow"]` | both | Rows that use no arrow keys at all |
|
|
270
|
+
| `["arrow"]` | `←/→` | Lists that want keyboard access to the horizontal axis |
|
|
272
271
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
272
|
+
`Shift + ←/→` is **never** consumed (the `"shift-arrow"` input was removed in 3.0.0): in the browser it
|
|
273
|
+
extends the text selection, and the 2.x "yield only while a selection exists" detection had structural
|
|
274
|
+
defects — selections inside Shadow DOM are invisible to `document.getSelection()` (the guard silently
|
|
275
|
+
fails), and `Ctrl+A` makes every row intersect the selection, locking horizontal keys out until the
|
|
276
|
+
selection is cleared. Shift-flavored horizontal input remains available via `shift + wheel`, which does
|
|
277
|
+
not conflict with selection. The prop stays an array (one vocabulary entry today) to match
|
|
278
|
+
`behaviorOptions.pointerDragInputs` and to keep future additions non-breaking.
|
|
277
279
|
|
|
278
280
|
The default is empty on purpose: the package's row key handler runs in the **capture** phase, ahead of
|
|
279
281
|
your row's own handler. When it consumes a key it calls `preventDefault()` only and deliberately does
|
|
@@ -285,8 +287,7 @@ It also fires only when the row **itself** is the event target. Focus sitting on
|
|
|
285
287
|
row — a `role="slider"` cell, a link, a nested `overflow-x:auto` region — is never hijacked, so you do
|
|
286
288
|
not have to avoid `["arrow"]` just because your rows contain arrow-key widgets.
|
|
287
289
|
|
|
288
|
-
`
|
|
289
|
-
can still extend a selection. `horizontalKeyStep` (default 40) must be finite and positive; anything
|
|
290
|
+
`horizontalKeyStep` (default 40) must be finite and positive; anything
|
|
290
291
|
else logs a warning and leaves the key untouched rather than silently substituting the default.
|
|
291
292
|
|
|
292
293
|
⚠️ **This does nothing when `enableKeyboardNavigation` is `false`** — the row key handler is what reads
|
|
@@ -303,6 +304,71 @@ focus, so if you want keyboard-only users to reach it, give them an entry point
|
|
|
303
304
|
that same `Omit`. They sit at the top level, next to `onWheelHorizontal`, precisely so one `Omit` closes
|
|
304
305
|
the whole horizontal seam.
|
|
305
306
|
|
|
307
|
+
## Escape row-return
|
|
308
|
+
|
|
309
|
+
Rows are not in the tab order (`tabIndex={-1}`), so once focus enters a link or widget inside a
|
|
310
|
+
row there is by default no keyboard way back to the row — the anchor for arrow-key navigation.
|
|
311
|
+
`behaviorOptions.enableEscapeRowReturn` (default: `false`) makes `Escape` return focus to the row
|
|
312
|
+
wrapper (scrolling it into view if needed).
|
|
313
|
+
|
|
314
|
+
It is off by default because `Escape` is the most overloaded key on the page (closing modals and
|
|
315
|
+
dropdowns, cancelling IME composition, clearing selection). The feature therefore listens in the
|
|
316
|
+
**bubble** phase — a dropdown opened inside a cell handles its own `Escape` first and can keep it
|
|
317
|
+
with `stopPropagation()` or `preventDefault()` — skips IME composition (`isComposing`), leaves
|
|
318
|
+
**editable targets** (`input` / `textarea` / `select` / `contentEditable`) entirely alone (their
|
|
319
|
+
native `Escape` default actions, like Blink/WebKit clearing an `<input type="search">`, never show
|
|
320
|
+
up in `defaultPrevented` and would otherwise be silently suppressed), and never acts while the row
|
|
321
|
+
itself has focus (an `Escape` on the row means whatever *you* decide — e.g. deselect). When it
|
|
322
|
+
does act it calls `preventDefault()` only and does not stop propagation, the same contract as the
|
|
323
|
+
arrow keys.
|
|
324
|
+
|
|
325
|
+
## Screen-reader live region
|
|
326
|
+
|
|
327
|
+
Virtualization removes off-screen rows from the DOM, so a screen-reader user scrolling the list
|
|
328
|
+
gets no feedback about where they are. The opt-in `liveRegion` prop renders a visually hidden
|
|
329
|
+
`role="status"` element (polite, atomic) next to the pane and updates it after the visible range
|
|
330
|
+
settles:
|
|
331
|
+
|
|
332
|
+
```tsx
|
|
333
|
+
<VirtualScroll
|
|
334
|
+
liveRegion={{
|
|
335
|
+
format: ({ visibleStartIndex, visibleEndIndex, itemCount }) => `rows ${visibleStartIndex + 1}-${visibleEndIndex + 1} of ${itemCount}`,
|
|
336
|
+
debounceMs: 400, // default; trailing — announces once after the last range change
|
|
337
|
+
}}
|
|
338
|
+
...
|
|
339
|
+
/>
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
The package ships **no built-in strings** — wording and language are yours (`format` returning the
|
|
343
|
+
same string leaves the DOM untouched; `""` clears the region). An invalid `debounceMs` (negative /
|
|
344
|
+
non-finite) logs a warning and disables announcements instead of silently substituting the
|
|
345
|
+
default. ⚠️ If your app already maintains its own live region for the list, keep using
|
|
346
|
+
`onRangeChange` instead — two regions double-announce.
|
|
347
|
+
|
|
348
|
+
## Residual quantizer for snapping consumers
|
|
349
|
+
|
|
350
|
+
Consumers that snap positions to a fixed quantum (row height, column width) lose sub-quantum
|
|
351
|
+
deltas: a high-resolution trackpad emits many small deltas, each rounds to zero rows, and a slow
|
|
352
|
+
swipe never moves. `createResidualQuantizer` carries the remainder across events:
|
|
353
|
+
|
|
354
|
+
```tsx
|
|
355
|
+
import { createResidualQuantizer } from "@aiquants/virtualscroll"
|
|
356
|
+
|
|
357
|
+
const quantizer = createResidualQuantizer({ quantum: ROW_HEIGHT })
|
|
358
|
+
const onWheelVertical = (deltaY: number) => {
|
|
359
|
+
const emitted = quantizer.push(deltaY) // always a multiple of the quantum (possibly 0)
|
|
360
|
+
if (emitted !== 0) snapScrollBy(emitted)
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
By default the residue is dropped on direction reversal (so a stale forward remainder cannot delay
|
|
365
|
+
the first backward step); call `reset()` from your own idle timer or when the snapped layout
|
|
366
|
+
changes. `quantum` must be finite and positive (anything else throws — fail fast). Non-finite
|
|
367
|
+
deltas and deltas beyond `Number.MAX_SAFE_INTEGER` emit 0 without poisoning the accumulator —
|
|
368
|
+
past 2^53 the float product stops being an *exact* multiple of the quantum, the very property a
|
|
369
|
+
snapping consumer relies on. The quantizer is deliberately time-free: idle expiry policies differ
|
|
370
|
+
per UI, so they stay on your side of the seam.
|
|
371
|
+
|
|
306
372
|
## Suspended transitions (React 18/19 `startTransition` + `Suspense`)
|
|
307
373
|
|
|
308
374
|
Scroll state is judged against the **last committed** dimensions, never against a render that got
|
|
@@ -371,7 +437,7 @@ exists in the DOM.
|
|
|
371
437
|
| `onScroll` | `(position: number, totalHeight: number) => void` | ❌ | Scroll event handler |
|
|
372
438
|
| `onRangeChange` | `(range: VirtualScrollRange) => void` | ❌ | Range change handler |
|
|
373
439
|
| `onWheelHorizontal` | `(deltaX: number) => void` | ❌ | Opt-in horizontal delegation. Horizontal-dominant wheel / trackpad gestures (and shift+wheel) are delegated to this handler so the parent can implement horizontal scrolling. ⚠️ **Keyboard deltas arrive here too** when `horizontalKeyInputs` is set. When omitted, horizontal gestures bypass vertical scrolling so parent native scrolling works. See [Horizontal Scrolling](#horizontal-scrolling). |
|
|
374
|
-
| `horizontalKeyInputs` | `readonly
|
|
440
|
+
| `horizontalKeyInputs` | `readonly "arrow"[]` | ❌ | Keyboard gestures that emit a horizontal delta through `onWheelHorizontal` (default: `[]`, so row-level arrow handling is never stolen). `Shift + ←/→` is never consumed. Fires only when the row itself is the event target. ⚠️ Requires `behaviorOptions.enableKeyboardNavigation` (default `true`) — with it off the rows have no key handler at all and this prop does nothing (the package warns) |
|
|
375
441
|
| `horizontalKeyStep` | `number` | ❌ | Pixels per horizontal arrow press (default: 40). Must be finite and positive; anything else warns and leaves the key untouched |
|
|
376
442
|
| `background` | `ReactNode` | ❌ | Background element |
|
|
377
443
|
| `initialScrollIndex` | `number` | ❌ | Initial scroll index |
|
|
@@ -382,6 +448,7 @@ exists in the DOM.
|
|
|
382
448
|
| `onItemFocus` | `(index: number) => void` | ❌ | Callback when an item is focused |
|
|
383
449
|
| `scrollBarOptions` | `VirtualScrollScrollBarOptions` | ❌ | Options for the scrollbar |
|
|
384
450
|
| `behaviorOptions` | `VirtualScrollBehaviorOptions` | ❌ | Options for scrolling behavior |
|
|
451
|
+
| `liveRegion` | `VirtualScrollLiveRegionOptions` | ❌ | Opt-in screen-reader live region announcing the visible range (nothing rendered when omitted). See [Screen-reader live region](#screen-reader-live-region) |
|
|
385
452
|
| `contentProps` | `React.AriaAttributes & { id?: string; role?: React.AriaRole }` | ❌ | ARIA / identity attributes for the scrollable **content** element — the correct host for a composite widget role. See [Composite widget roles](#composite-widget-roles-listbox--tree--grid). |
|
|
386
453
|
|
|
387
454
|
### VirtualScrollScrollBarOptions
|
|
@@ -403,6 +470,7 @@ exists in the DOM.
|
|
|
403
470
|
| `enablePointerDrag` | `boolean` | Enable dragging the content area to scroll (default: true). ⚠️ Setting this to `false` removes the only way to scroll on touch devices — the pane is transform-based and has no native scroller. Use `pointerDragInputs` to exclude a single pointer type instead. |
|
|
404
471
|
| `pointerDragInputs` | `readonly ("mouse" \| "pen" \| "touch")[]` | Pointer types allowed to drag-scroll the content area (default: all three). `touch-action: none` is applied only when `"touch"` or `"pen"` is included. |
|
|
405
472
|
| `enableKeyboardNavigation` | `boolean` | Enable keyboard navigation (default: true). Arrow / Page keys move row focus. ⚠️ They fire **only when the row wrapper itself is the event target** — focus inside a row (a `role="slider"` cell, a link, a nested scroll region) keeps its own keys |
|
|
473
|
+
| `enableEscapeRowReturn` | `boolean` | Opt-in (default: false): pressing `Escape` while focus sits on an element **inside** a row returns focus to the row wrapper. Listens in the bubble phase and respects `preventDefault` / `stopPropagation` / IME composition, so widgets inside the row keep first claim on their own `Escape`. Requires `enableKeyboardNavigation` |
|
|
406
474
|
| `wheelSpeedMultiplier` | `number` | Multiplier for mouse wheel scrolling speed (default: 1) |
|
|
407
475
|
| `inertiaOptions` | `ScrollPaneInertiaOptions` | Physics tuning for drag inertia |
|
|
408
476
|
| `overscrollBehavior` | `"auto" \| "contain"` | Wheel behavior at the edges (default `"auto"` = chain to ancestors like a native scroller; `"contain"` = keep consuming, pre-2.7.0 trapping) |
|
package/dist/VirtualScroll.d.cts
CHANGED
|
@@ -150,6 +150,34 @@ export type VirtualScrollBehaviorOptions = {
|
|
|
150
150
|
*/
|
|
151
151
|
pointerDragInputs?: ScrollPaneProps["pointerDragInputs"];
|
|
152
152
|
enableKeyboardNavigation?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* When `true`, pressing `Escape` while focus sits on an element INSIDE a row returns focus to
|
|
155
|
+
* the row wrapper (default: `false`).
|
|
156
|
+
* `true` のとき、行の**中**の要素にフォーカスがある状態で `Escape` を押すと行ラッパーへ
|
|
157
|
+
* フォーカスを戻す (既定 `false`)。
|
|
158
|
+
*
|
|
159
|
+
* 行はタブ順に入らない (`tabIndex={-1}`) ため、行内のリンクやウィジェットへ入った後、
|
|
160
|
+
* キーボードだけで行 (縦横矢印ナビゲーションの起点) へ戻る手段が既定では存在しない。
|
|
161
|
+
* このオプションはその復帰口をパッケージ側で提供する。
|
|
162
|
+
*
|
|
163
|
+
* ❗ **既定 OFF なのは `Escape` が最も多重負荷のキーだからである** (モーダルやドロップダウンを
|
|
164
|
+
* 閉じる・IME 確定取消・選択解除)。次の防御で行内ウィジェットの `Escape` を奪わない:
|
|
165
|
+
*
|
|
166
|
+
* - **bubble フェーズで聞く** (矢印キーの capture とは逆)。行内で開いたドロップダウン等が
|
|
167
|
+
* 自分の `Escape` を先に処理でき、`stopPropagation()` すれば本機能には届かない。
|
|
168
|
+
* - `event.defaultPrevented` 済みなら何もしない (preventDefault だけの消費側も尊重)。
|
|
169
|
+
* - IME 合成中 (`isComposing`) は何もしない (確定取消を奪わない)。
|
|
170
|
+
* - **編集可能なターゲット (input / textarea / select / contentEditable) では何もしない。**
|
|
171
|
+
* ネイティブの既定動作 (Blink / WebKit の `<input type="search">` は Escape でクリアされる) は
|
|
172
|
+
* `defaultPrevented` に現れないため、スクリプト先約の検査では守れない。
|
|
173
|
+
* - 行そのものにフォーカスがあるときは何もしない (行上の `Escape` の意味 — 選択解除など — は
|
|
174
|
+
* 消費側の所有物)。
|
|
175
|
+
*
|
|
176
|
+
* 作用時は `preventDefault()` のみで伝播は止めない (矢印キーと同じ契約)。復帰は
|
|
177
|
+
* `focusItemAtIndex` 経由なので、行が画面外なら同時にスクロールで可視化される。
|
|
178
|
+
* `behaviorOptions.enableKeyboardNavigation` が前提 (行ハンドラ自体が付かないため)。
|
|
179
|
+
*/
|
|
180
|
+
enableEscapeRowReturn?: boolean;
|
|
153
181
|
wheelSpeedMultiplier?: number;
|
|
154
182
|
inertiaOptions?: ScrollPaneProps["inertiaOptions"];
|
|
155
183
|
/**
|
|
@@ -176,6 +204,48 @@ export type VirtualScrollBehaviorOptions = {
|
|
|
176
204
|
*/
|
|
177
205
|
resetOnGetItemHeightChange?: boolean;
|
|
178
206
|
};
|
|
207
|
+
/**
|
|
208
|
+
* Range info handed to {@link VirtualScrollLiveRegionOptions.format}.
|
|
209
|
+
* {@link VirtualScrollLiveRegionOptions.format} へ渡す範囲情報。
|
|
210
|
+
*/
|
|
211
|
+
export type VirtualScrollLiveRegionRange = {
|
|
212
|
+
/** Index of the first visible item / 可視先頭アイテムのインデックス */
|
|
213
|
+
visibleStartIndex: number;
|
|
214
|
+
/** Index of the last visible item / 可視末尾アイテムのインデックス */
|
|
215
|
+
visibleEndIndex: number;
|
|
216
|
+
/** Total item count / 総アイテム数 */
|
|
217
|
+
itemCount: number;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Opt-in screen-reader live region announcing the visible range (see the `liveRegion` prop).
|
|
221
|
+
* 可視範囲を読み上げる opt-in のスクリーンリーダー用ライブリージョン (`liveRegion` prop 参照)。
|
|
222
|
+
*/
|
|
223
|
+
export type VirtualScrollLiveRegionOptions = {
|
|
224
|
+
/**
|
|
225
|
+
* Formats the announcement text. Called after the visible range settles; returning the same
|
|
226
|
+
* string as last time leaves the DOM untouched (no re-announcement), returning `""` clears
|
|
227
|
+
* the region. The package ships NO built-in strings — wording and language are the
|
|
228
|
+
* consumer's (a generic package must not hardcode a locale).
|
|
229
|
+
* 読み上げ文言を組み立てる。可視範囲が静定した後に呼ばれ、前回と同じ文字列なら DOM を
|
|
230
|
+
* 触らない (再読み上げしない)。`""` を返すとリージョンを空にする。パッケージは文言を
|
|
231
|
+
* 一切内蔵しない — 言語と文面は消費側の所有物 (汎用パッケージはロケールをハードコード
|
|
232
|
+
* できない)。
|
|
233
|
+
*
|
|
234
|
+
* @param range - The settled visible range / 静定した可視範囲
|
|
235
|
+
* @returns Announcement text / 読み上げ文言
|
|
236
|
+
*/
|
|
237
|
+
format: (range: VirtualScrollLiveRegionRange) => string;
|
|
238
|
+
/**
|
|
239
|
+
* Debounce (ms) after the last range change before announcing (default: 400). Must be a
|
|
240
|
+
* finite number ≥ 0 — anything else logs a warning and disables announcements (no silent
|
|
241
|
+
* substitution). Announcing every wheel tick makes the reader chatter over the content;
|
|
242
|
+
* announcing too late reads a stale position. 0 announces on the next effect flush.
|
|
243
|
+
* 最後の範囲変化から読み上げまでのデバウンス (ms、既定 400)。有限かつ 0 以上であること —
|
|
244
|
+
* それ以外は警告して読み上げを無効化する (黙って既定へ読み替えない)。ホイール 1 ノッチ
|
|
245
|
+
* ごとに読むと内容の読み上げに被り、遅すぎると古い位置を読む。0 は次の effect で即時。
|
|
246
|
+
*/
|
|
247
|
+
debounceMs?: number;
|
|
248
|
+
};
|
|
179
249
|
/**
|
|
180
250
|
* Props for the VirtualScroll component.
|
|
181
251
|
*
|
|
@@ -221,6 +291,24 @@ export type VirtualScrollProps<T> = {
|
|
|
221
291
|
testId?: string;
|
|
222
292
|
onScroll?: (scrollPosition: number, totalHeight: number) => void;
|
|
223
293
|
onRangeChange?: (range: VirtualScrollRange) => void;
|
|
294
|
+
/**
|
|
295
|
+
* Opt-in `aria-live` region announcing the visible range to assistive technology (default:
|
|
296
|
+
* none rendered). Virtualization removes off-screen rows from the DOM, so a screen-reader
|
|
297
|
+
* user scrolling the list otherwise gets no feedback about where they are. Provide a
|
|
298
|
+
* {@link VirtualScrollLiveRegionOptions.format} to opt in; the region is a visually hidden
|
|
299
|
+
* `role="status"` element (polite, atomic) rendered as a sibling of the pane, updated after
|
|
300
|
+
* the range settles ({@link VirtualScrollLiveRegionOptions.debounceMs}).
|
|
301
|
+
*
|
|
302
|
+
* 可視範囲を支援技術へ読み上げる opt-in の `aria-live` リージョン (既定: 描画しない)。
|
|
303
|
+
* 仮想化は画面外の行を DOM から取り除くため、スクリーンリーダーの利用者はスクロールしても
|
|
304
|
+
* 現在位置の手掛かりを得られない。{@link VirtualScrollLiveRegionOptions.format} を渡すと、
|
|
305
|
+
* 視覚的に隠した `role="status"` 要素 (polite・atomic) をペインの兄弟として描画し、範囲が
|
|
306
|
+
* 静定した後に更新する。
|
|
307
|
+
*
|
|
308
|
+
* ❗ **ホスト側に既存のライブリージョンがある場合は併用しないこと** (二重読み上げになる)。
|
|
309
|
+
* その場合は `onRangeChange` から自前のリージョンを更新する従来手段を使う。
|
|
310
|
+
*/
|
|
311
|
+
liveRegion?: VirtualScrollLiveRegionOptions;
|
|
224
312
|
background?: ReactNode;
|
|
225
313
|
children: (item: T, index: number) => ReactNode;
|
|
226
314
|
initialScrollIndex?: number;
|
|
@@ -257,15 +345,21 @@ export type VirtualScrollProps<T> = {
|
|
|
257
345
|
* `onWheelHorizontal` へ横スクロール量を流すキーボード操作の種別 (既定: 無効)。
|
|
258
346
|
*
|
|
259
347
|
* - `[]` / 未指定 (既定): 横キーボードスクロールを行わない。
|
|
260
|
-
* - `["
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
348
|
+
* - `["arrow"]`: 素の `←/→` のみ。
|
|
349
|
+
*
|
|
350
|
+
* ❗ **`Shift + ←/→` は常に消費しない (3.0.0 で `"shift-arrow"` 入力を撤去)。** ブラウザ標準では
|
|
351
|
+
* Shift+矢印は選択範囲の伸縮であり、横取りすると行内テキストを選び直す手段がキーボードから消える。
|
|
352
|
+
* 2.x では「選択があるときだけ譲る」検出 (`getSelection` の交差判定) で共存させていたが、
|
|
353
|
+
* (a) Shadow DOM 内では選択が可搬に検出できない (Chromium の `window.getSelection()` は shadow root
|
|
354
|
+
* 内部を見せず、内部選択は非標準 API でしか取れない)、(b) `Ctrl+A` の全選択では全行が選択と交差して
|
|
355
|
+
* 横キーボードスクロールが選択解除まで全面ロックアウトする、という構造的欠陥が残った。検出の
|
|
356
|
+
* 精度を上げる案はどれも別の正しいユーザー意図を誤判定するため、機能ごと撤去して Shift 側を
|
|
357
|
+
* 無条件でブラウザへ返す。横スクロールの Shift 系入力が必要なら `shift+ホイール` が引き続き使える
|
|
358
|
+
* (`resolveWheelAxes` の軸規則。こちらは選択と衝突しない)。
|
|
264
359
|
*
|
|
265
|
-
* ❗
|
|
266
|
-
*
|
|
267
|
-
* `
|
|
268
|
-
* 同じ理由で種別配列を採るのが `pointerDragInputs` であり、本パッケージの既存の作法に揃えてある。
|
|
360
|
+
* ❗ **語彙が 1 つでも配列なのは意図的である。** 種別配列は `pointerDragInputs` と同じ本パッケージの
|
|
361
|
+
* 作法であり、将来の入力種別追加が型の破壊なしにできる。boolean へ畳むと prop 名が変わり、横軸を
|
|
362
|
+
* `Omit<>` で封じているラッパー (例: `@aiquants/directory-tree`) の封印リストまで連鎖破壊する。
|
|
269
363
|
*
|
|
270
364
|
* ❗ **既定が無効なのは、行ハンドラを奪わないためである。** 本パッケージの行キーハンドラは
|
|
271
365
|
* capture フェーズに付くため、消費側の行 (bubble) より先に走る。既定で `←/→` を消費すると
|
|
@@ -298,7 +392,7 @@ export type VirtualScrollProps<T> = {
|
|
|
298
392
|
* `Omit<VirtualScrollProps, "onWheelHorizontal">` で横軸を封じている) が `behaviorOptions` を
|
|
299
393
|
* そのまま素通しするため、封じたはずのシームへ横から到達できてしまう。
|
|
300
394
|
*/
|
|
301
|
-
horizontalKeyInputs?: readonly
|
|
395
|
+
horizontalKeyInputs?: readonly "arrow"[];
|
|
302
396
|
/**
|
|
303
397
|
* Pixels emitted per horizontal arrow key press (default: 40, matching browser arrow scrolling).
|
|
304
398
|
* 横矢印キー 1 回あたりの移動量 (px。既定 40 = ブラウザの矢印スクロール相当)。
|
package/dist/VirtualScroll.d.ts
CHANGED
|
@@ -150,6 +150,34 @@ export type VirtualScrollBehaviorOptions = {
|
|
|
150
150
|
*/
|
|
151
151
|
pointerDragInputs?: ScrollPaneProps["pointerDragInputs"];
|
|
152
152
|
enableKeyboardNavigation?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* When `true`, pressing `Escape` while focus sits on an element INSIDE a row returns focus to
|
|
155
|
+
* the row wrapper (default: `false`).
|
|
156
|
+
* `true` のとき、行の**中**の要素にフォーカスがある状態で `Escape` を押すと行ラッパーへ
|
|
157
|
+
* フォーカスを戻す (既定 `false`)。
|
|
158
|
+
*
|
|
159
|
+
* 行はタブ順に入らない (`tabIndex={-1}`) ため、行内のリンクやウィジェットへ入った後、
|
|
160
|
+
* キーボードだけで行 (縦横矢印ナビゲーションの起点) へ戻る手段が既定では存在しない。
|
|
161
|
+
* このオプションはその復帰口をパッケージ側で提供する。
|
|
162
|
+
*
|
|
163
|
+
* ❗ **既定 OFF なのは `Escape` が最も多重負荷のキーだからである** (モーダルやドロップダウンを
|
|
164
|
+
* 閉じる・IME 確定取消・選択解除)。次の防御で行内ウィジェットの `Escape` を奪わない:
|
|
165
|
+
*
|
|
166
|
+
* - **bubble フェーズで聞く** (矢印キーの capture とは逆)。行内で開いたドロップダウン等が
|
|
167
|
+
* 自分の `Escape` を先に処理でき、`stopPropagation()` すれば本機能には届かない。
|
|
168
|
+
* - `event.defaultPrevented` 済みなら何もしない (preventDefault だけの消費側も尊重)。
|
|
169
|
+
* - IME 合成中 (`isComposing`) は何もしない (確定取消を奪わない)。
|
|
170
|
+
* - **編集可能なターゲット (input / textarea / select / contentEditable) では何もしない。**
|
|
171
|
+
* ネイティブの既定動作 (Blink / WebKit の `<input type="search">` は Escape でクリアされる) は
|
|
172
|
+
* `defaultPrevented` に現れないため、スクリプト先約の検査では守れない。
|
|
173
|
+
* - 行そのものにフォーカスがあるときは何もしない (行上の `Escape` の意味 — 選択解除など — は
|
|
174
|
+
* 消費側の所有物)。
|
|
175
|
+
*
|
|
176
|
+
* 作用時は `preventDefault()` のみで伝播は止めない (矢印キーと同じ契約)。復帰は
|
|
177
|
+
* `focusItemAtIndex` 経由なので、行が画面外なら同時にスクロールで可視化される。
|
|
178
|
+
* `behaviorOptions.enableKeyboardNavigation` が前提 (行ハンドラ自体が付かないため)。
|
|
179
|
+
*/
|
|
180
|
+
enableEscapeRowReturn?: boolean;
|
|
153
181
|
wheelSpeedMultiplier?: number;
|
|
154
182
|
inertiaOptions?: ScrollPaneProps["inertiaOptions"];
|
|
155
183
|
/**
|
|
@@ -176,6 +204,48 @@ export type VirtualScrollBehaviorOptions = {
|
|
|
176
204
|
*/
|
|
177
205
|
resetOnGetItemHeightChange?: boolean;
|
|
178
206
|
};
|
|
207
|
+
/**
|
|
208
|
+
* Range info handed to {@link VirtualScrollLiveRegionOptions.format}.
|
|
209
|
+
* {@link VirtualScrollLiveRegionOptions.format} へ渡す範囲情報。
|
|
210
|
+
*/
|
|
211
|
+
export type VirtualScrollLiveRegionRange = {
|
|
212
|
+
/** Index of the first visible item / 可視先頭アイテムのインデックス */
|
|
213
|
+
visibleStartIndex: number;
|
|
214
|
+
/** Index of the last visible item / 可視末尾アイテムのインデックス */
|
|
215
|
+
visibleEndIndex: number;
|
|
216
|
+
/** Total item count / 総アイテム数 */
|
|
217
|
+
itemCount: number;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Opt-in screen-reader live region announcing the visible range (see the `liveRegion` prop).
|
|
221
|
+
* 可視範囲を読み上げる opt-in のスクリーンリーダー用ライブリージョン (`liveRegion` prop 参照)。
|
|
222
|
+
*/
|
|
223
|
+
export type VirtualScrollLiveRegionOptions = {
|
|
224
|
+
/**
|
|
225
|
+
* Formats the announcement text. Called after the visible range settles; returning the same
|
|
226
|
+
* string as last time leaves the DOM untouched (no re-announcement), returning `""` clears
|
|
227
|
+
* the region. The package ships NO built-in strings — wording and language are the
|
|
228
|
+
* consumer's (a generic package must not hardcode a locale).
|
|
229
|
+
* 読み上げ文言を組み立てる。可視範囲が静定した後に呼ばれ、前回と同じ文字列なら DOM を
|
|
230
|
+
* 触らない (再読み上げしない)。`""` を返すとリージョンを空にする。パッケージは文言を
|
|
231
|
+
* 一切内蔵しない — 言語と文面は消費側の所有物 (汎用パッケージはロケールをハードコード
|
|
232
|
+
* できない)。
|
|
233
|
+
*
|
|
234
|
+
* @param range - The settled visible range / 静定した可視範囲
|
|
235
|
+
* @returns Announcement text / 読み上げ文言
|
|
236
|
+
*/
|
|
237
|
+
format: (range: VirtualScrollLiveRegionRange) => string;
|
|
238
|
+
/**
|
|
239
|
+
* Debounce (ms) after the last range change before announcing (default: 400). Must be a
|
|
240
|
+
* finite number ≥ 0 — anything else logs a warning and disables announcements (no silent
|
|
241
|
+
* substitution). Announcing every wheel tick makes the reader chatter over the content;
|
|
242
|
+
* announcing too late reads a stale position. 0 announces on the next effect flush.
|
|
243
|
+
* 最後の範囲変化から読み上げまでのデバウンス (ms、既定 400)。有限かつ 0 以上であること —
|
|
244
|
+
* それ以外は警告して読み上げを無効化する (黙って既定へ読み替えない)。ホイール 1 ノッチ
|
|
245
|
+
* ごとに読むと内容の読み上げに被り、遅すぎると古い位置を読む。0 は次の effect で即時。
|
|
246
|
+
*/
|
|
247
|
+
debounceMs?: number;
|
|
248
|
+
};
|
|
179
249
|
/**
|
|
180
250
|
* Props for the VirtualScroll component.
|
|
181
251
|
*
|
|
@@ -221,6 +291,24 @@ export type VirtualScrollProps<T> = {
|
|
|
221
291
|
testId?: string;
|
|
222
292
|
onScroll?: (scrollPosition: number, totalHeight: number) => void;
|
|
223
293
|
onRangeChange?: (range: VirtualScrollRange) => void;
|
|
294
|
+
/**
|
|
295
|
+
* Opt-in `aria-live` region announcing the visible range to assistive technology (default:
|
|
296
|
+
* none rendered). Virtualization removes off-screen rows from the DOM, so a screen-reader
|
|
297
|
+
* user scrolling the list otherwise gets no feedback about where they are. Provide a
|
|
298
|
+
* {@link VirtualScrollLiveRegionOptions.format} to opt in; the region is a visually hidden
|
|
299
|
+
* `role="status"` element (polite, atomic) rendered as a sibling of the pane, updated after
|
|
300
|
+
* the range settles ({@link VirtualScrollLiveRegionOptions.debounceMs}).
|
|
301
|
+
*
|
|
302
|
+
* 可視範囲を支援技術へ読み上げる opt-in の `aria-live` リージョン (既定: 描画しない)。
|
|
303
|
+
* 仮想化は画面外の行を DOM から取り除くため、スクリーンリーダーの利用者はスクロールしても
|
|
304
|
+
* 現在位置の手掛かりを得られない。{@link VirtualScrollLiveRegionOptions.format} を渡すと、
|
|
305
|
+
* 視覚的に隠した `role="status"` 要素 (polite・atomic) をペインの兄弟として描画し、範囲が
|
|
306
|
+
* 静定した後に更新する。
|
|
307
|
+
*
|
|
308
|
+
* ❗ **ホスト側に既存のライブリージョンがある場合は併用しないこと** (二重読み上げになる)。
|
|
309
|
+
* その場合は `onRangeChange` から自前のリージョンを更新する従来手段を使う。
|
|
310
|
+
*/
|
|
311
|
+
liveRegion?: VirtualScrollLiveRegionOptions;
|
|
224
312
|
background?: ReactNode;
|
|
225
313
|
children: (item: T, index: number) => ReactNode;
|
|
226
314
|
initialScrollIndex?: number;
|
|
@@ -257,15 +345,21 @@ export type VirtualScrollProps<T> = {
|
|
|
257
345
|
* `onWheelHorizontal` へ横スクロール量を流すキーボード操作の種別 (既定: 無効)。
|
|
258
346
|
*
|
|
259
347
|
* - `[]` / 未指定 (既定): 横キーボードスクロールを行わない。
|
|
260
|
-
* - `["
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
348
|
+
* - `["arrow"]`: 素の `←/→` のみ。
|
|
349
|
+
*
|
|
350
|
+
* ❗ **`Shift + ←/→` は常に消費しない (3.0.0 で `"shift-arrow"` 入力を撤去)。** ブラウザ標準では
|
|
351
|
+
* Shift+矢印は選択範囲の伸縮であり、横取りすると行内テキストを選び直す手段がキーボードから消える。
|
|
352
|
+
* 2.x では「選択があるときだけ譲る」検出 (`getSelection` の交差判定) で共存させていたが、
|
|
353
|
+
* (a) Shadow DOM 内では選択が可搬に検出できない (Chromium の `window.getSelection()` は shadow root
|
|
354
|
+
* 内部を見せず、内部選択は非標準 API でしか取れない)、(b) `Ctrl+A` の全選択では全行が選択と交差して
|
|
355
|
+
* 横キーボードスクロールが選択解除まで全面ロックアウトする、という構造的欠陥が残った。検出の
|
|
356
|
+
* 精度を上げる案はどれも別の正しいユーザー意図を誤判定するため、機能ごと撤去して Shift 側を
|
|
357
|
+
* 無条件でブラウザへ返す。横スクロールの Shift 系入力が必要なら `shift+ホイール` が引き続き使える
|
|
358
|
+
* (`resolveWheelAxes` の軸規則。こちらは選択と衝突しない)。
|
|
264
359
|
*
|
|
265
|
-
* ❗
|
|
266
|
-
*
|
|
267
|
-
* `
|
|
268
|
-
* 同じ理由で種別配列を採るのが `pointerDragInputs` であり、本パッケージの既存の作法に揃えてある。
|
|
360
|
+
* ❗ **語彙が 1 つでも配列なのは意図的である。** 種別配列は `pointerDragInputs` と同じ本パッケージの
|
|
361
|
+
* 作法であり、将来の入力種別追加が型の破壊なしにできる。boolean へ畳むと prop 名が変わり、横軸を
|
|
362
|
+
* `Omit<>` で封じているラッパー (例: `@aiquants/directory-tree`) の封印リストまで連鎖破壊する。
|
|
269
363
|
*
|
|
270
364
|
* ❗ **既定が無効なのは、行ハンドラを奪わないためである。** 本パッケージの行キーハンドラは
|
|
271
365
|
* capture フェーズに付くため、消費側の行 (bubble) より先に走る。既定で `←/→` を消費すると
|
|
@@ -298,7 +392,7 @@ export type VirtualScrollProps<T> = {
|
|
|
298
392
|
* `Omit<VirtualScrollProps, "onWheelHorizontal">` で横軸を封じている) が `behaviorOptions` を
|
|
299
393
|
* そのまま素通しするため、封じたはずのシームへ横から到達できてしまう。
|
|
300
394
|
*/
|
|
301
|
-
horizontalKeyInputs?: readonly
|
|
395
|
+
horizontalKeyInputs?: readonly "arrow"[];
|
|
302
396
|
/**
|
|
303
397
|
* Pixels emitted per horizontal arrow key press (default: 40, matching browser arrow scrolling).
|
|
304
398
|
* 横矢印キー 1 回あたりの移動量 (px。既定 40 = ブラウザの矢印スクロール相当)。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualScroll.d.ts","sourceRoot":"","sources":["../src/VirtualScroll.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,KAAK,SAAS,EAA2F,MAAM,OAAO,CAAA;AAElJ,OAAO,EAAmE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACxH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG1D;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,6EAA6E;IAC7E,mBAAmB,EAAE,MAAM,CAAA;IAC3B,2EAA2E;IAC3E,iBAAiB,EAAE,MAAM,CAAA;IACzB,6FAA6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