@aiquants/virtualscroll 3.4.0 → 3.6.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.
@@ -51,6 +51,34 @@ export declare const MAX_FROZEN_LEADING_COLS = 128;
51
51
  * この上限そのもの。違反は fail-fast の RangeError。
52
52
  */
53
53
  export declare const MAX_FROZEN_LEADING_ROWS = 128;
54
+ /**
55
+ * Hard cap for `frozenTrailingCols` (v3.5.0 trailing-freeze plan §3). The trailing band is NOT
56
+ * windowed — every trailing column materializes in every rendered row and is EXEMPT from the
57
+ * MAX_RENDERED_CELLS truncation (the scroll-band budget is reduced by the trailing count
58
+ * instead) — so the cap is what bounds the band: worst case 128 x MAX_RENDERED_ITEMS rows, and
59
+ * W_T <= 128 x MAX_TRACK_SIZE = 2^25 (the measured layout wall; practical W_T <= viewport <<
60
+ * 2^24). Violations fail fast with a RangeError.
61
+ *
62
+ * `frozenTrailingCols` の上限 (3.5.0 末尾凍結プラン §3)。末尾帯は窓化されず全描画行で具現化し、
63
+ * かつ MAX_RENDERED_CELLS の打切り対象外 (代わりにスクロール帯予算を末尾数ぶん控除) のため、
64
+ * 帯を有界にするのはこの上限そのもの: 最悪 128 × MAX_RENDERED_ITEMS 行、W_T ≤ 128 ×
65
+ * MAX_TRACK_SIZE = 2^25 (実測壁ちょうど — 実運用は W_T ≤ viewport ≪ 2^24)。違反は fail-fast の
66
+ * RangeError。
67
+ */
68
+ export declare const MAX_FROZEN_TRAILING_COLS = 128;
69
+ /**
70
+ * Hard cap for `frozenTrailingRows` (v3.5.0 trailing-freeze plan §3). The trailing-row band is
71
+ * grid-owned and OUT of the embedded VirtualScroll (the SECOND out-of-pane band, below the
72
+ * pane): every band row materializes every rendered column and is exempt from
73
+ * MAX_RENDERED_CELLS (the budget denominator counts band rows instead), so the cap bounds the
74
+ * band itself. Violations fail fast with a RangeError.
75
+ *
76
+ * `frozenTrailingRows` の上限 (3.5.0 末尾凍結プラン §3)。末尾行帯はグリッド所有で埋め込み
77
+ * VirtualScroll の外 (ペインの**下**の第 2 帯外バンド)。帯行は描画列を全て具現化し
78
+ * MAX_RENDERED_CELLS の打切り対象外 (予算分母に帯行数を算入) のため、帯を有界にするのは
79
+ * この上限そのもの。違反は fail-fast の RangeError。
80
+ */
81
+ export declare const MAX_FROZEN_TRAILING_ROWS = 128;
54
82
  /**
55
83
  * Resolves the per-row column cap from the cell budget and the effective rendered-row count.
56
84
  * Pure and exported as the mutation-gate surface for the production MAX_RENDERED_CELLS fallback
@@ -237,6 +265,40 @@ export type VirtualGridProps<T> = {
237
265
  * 通知しゼロ描画)。
238
266
  */
239
267
  frozenLeadingRows?: number;
268
+ /**
269
+ * Number of trailing columns frozen at the right edge (v3.5.0 trailing-freeze plan §3;
270
+ * default 0). Integer in [0, MAX_FROZEN_TRAILING_COLS] — RangeError otherwise (fail-fast).
271
+ * Dynamic clamp (documented contract): min(T, colCount − effectiveFrozenCols) — the LEADING
272
+ * band wins the count space. Trailing cells render in a right-anchored clip outside the
273
+ * anchor machinery (band-local lefts); `--aqvs-grid-trailing-width` is written iff T > 0.
274
+ * `scrollToCell` / `initialScrollAnchor` targeting a trailing column are horizontal no-ops
275
+ * (always visible). T = 0 is structurally identical to the pre-trailing DOM.
276
+ * 右端に凍結する末尾列数 (3.5.0 末尾凍結プラン §3。既定 0)。[0, MAX_FROZEN_TRAILING_COLS]
277
+ * の整数 — 違反は RangeError (fail-fast)。動的クランプ (文書化契約): min(T, colCount −
278
+ * effectiveFrozenCols) — カウント空間は**先頭が勝つ**。末尾セルはアンカー機構の外の
279
+ * 右アンカークリップに帯ローカル left で描画し、`--aqvs-grid-trailing-width` は T > 0 の
280
+ * ときのみ書かれる。`scrollToCell` / `initialScrollAnchor` の末尾列狙いは横 no-op
281
+ * (常時可視)。T = 0 は DOM 構造まで従来と恒等。
282
+ */
283
+ frozenTrailingCols?: number;
284
+ /**
285
+ * Number of trailing rows pinned at the bottom (v3.5.0 trailing-freeze plan §3; default 0).
286
+ * Integer in [0, MAX_FROZEN_TRAILING_ROWS] — RangeError otherwise (fail-fast). Dynamic
287
+ * clamp (documented contract): min(T, rowCount − effectiveFrozenRows) — leading wins. The
288
+ * band is grid-owned BELOW the pane; the embedded scroll rows shrink at the TAIL only
289
+ * (itemCount = rowCount − R − T, getItem = i + R unchanged), so a runtime T change does NOT
290
+ * remount the embedded VirtualScroll (ADR-23). `scrollToCell` / `initialScrollAnchor`
291
+ * targeting a trailing row are vertical no-ops (always visible). T = 0 is structurally
292
+ * identical to the pre-trailing DOM.
293
+ * 下端に凍結する末尾行数 (3.5.0 末尾凍結プラン §3。既定 0)。[0, MAX_FROZEN_TRAILING_ROWS]
294
+ * の整数 — 違反は RangeError (fail-fast)。動的クランプ (文書化契約): min(T, rowCount −
295
+ * effectiveFrozenRows) — 先頭が勝つ。帯はペインの**下**のグリッド所有バンドで、埋め込み
296
+ * スクロール行は**末尾**だけが伸縮する (itemCount = rowCount − R − T、getItem = i + R
297
+ * 不変) — T の実行時変更は埋め込み VirtualScroll を再マウントしない (ADR-23)。
298
+ * `scrollToCell` / `initialScrollAnchor` の末尾行狙いは縦 no-op (常時可視)。T = 0 は
299
+ * DOM 構造まで従来と恒等。
300
+ */
301
+ frozenTrailingRows?: number;
240
302
  /** Row-axis overscan (default 3 — a declared, intentional deviation from the bare VirtualScroll default 15; see the bounding contract). / 行軸 overscan (既定 3 — 素の既定 15 からの宣言済み意図的乖離)。 */
241
303
  overscanRows?: number;
242
304
  /** Column-axis overscan (default 3). / 列軸 overscan (既定 3)。 */
@@ -286,7 +348,24 @@ export type VirtualGridHandle = {
286
348
  x: number;
287
349
  y: number;
288
350
  };
289
- /** Cell-targeted jump. alignY uses the row vocabulary (top/bottom/center), alignX its horizontal twin (start/end/center). No "nearest". Targeting a FROZEN column is a horizontal no-op that leaves any previously armed column anchor in place (the visual status quo is preserved; manual horizontal input clears anchors as usual). / セル狙いジャンプ。"nearest" は無し。凍結列狙いの横成分は no-op で、既存の列アンカーはそのまま残る (視覚的現状維持 — 手動横入力が従来どおり解除する)。 */
351
+ /**
352
+ * Cell-targeted jump. alignY uses the row vocabulary (top/bottom/center), alignX its
353
+ * horizontal twin (start/end/center). No "nearest". Targeting a LEADING frozen or TRAILING
354
+ * frozen column is a horizontal no-op that leaves any previously armed column anchor in
355
+ * place (the visual status quo is preserved; manual horizontal input clears anchors as
356
+ * usual); targeting a leading/trailing frozen row is a vertical no-op. Band membership is
357
+ * judged at CALL time — a T change AFTER arming follows the ADR-23 clamp semantics: a
358
+ * pending row anchor whose target row lands inside the trailing band after a T increase
359
+ * clamps to the last scroll row. Overlap registration (ADR-19-1): when the leading +
360
+ * trailing band extents exceed the viewport, occluded trailing cells cannot be scrolled
361
+ * into view — the no-op is exact there too.
362
+ * セル狙いジャンプ。"nearest" は無し。先頭 / 末尾凍結列狙いの横成分は no-op で、既存の
363
+ * 列アンカーはそのまま残る (視覚的現状維持 — 手動横入力が従来どおり解除する)。先頭 /
364
+ * 末尾凍結行狙いの縦成分も no-op。帯所属の判定は**呼出し時** — 張った後の T 変更は
365
+ * ADR-23 のクランプ意味論 (T 増加で末尾帯入りする行を狙った保留行アンカーは最終
366
+ * スクロール行へクランプ) に従う。重複登記 (ADR-19-1): 先頭 + 末尾の帯寸がビューポートを
367
+ * 超えるとき、隠れた末尾セルはどのスクロール位置でも可視化できない — no-op はそこでも正確。
368
+ */
290
369
  scrollToCell(row: number, col: number, options?: {
291
370
  alignY?: "top" | "bottom" | "center";
292
371
  alignX?: "start" | "end" | "center";
@@ -314,7 +393,7 @@ export type VirtualGridHandle = {
314
393
  height: number;
315
394
  };
316
395
  getRange(): VirtualGridRange | null;
317
- /** Pair-call seam: getRowHeight stays the truth; delegates to the row updateItemSize. / 対呼び出しシーム (getRowHeight が正) — 行 updateItemSize へ委譲。 */
396
+ /** Pair-call seam: getRowHeight stays the truth. 3-way split — leading band rows bump the frozen-row epoch, trailing band rows bump the trailing-row epoch (accessor re-read; the bands hold no tree), scroll rows delegate to the row updateItemSize at −R. / 対呼び出しシーム (getRowHeight が正)。3 分岐 — 先頭帯行は凍結行 epoch、末尾帯行は末尾行 epoch の繰上げ (アクセサ再読 — 帯に木は無い)、スクロール行は −R で行 updateItemSize へ委譲。 */
318
397
  updateRowSize(row: number, px: number): void;
319
398
  /**
320
399
  * Column twin: validates (MAX_TRACK_SIZE fail-fast), updates the width tree, and bumps the
@@ -327,12 +406,35 @@ export type VirtualGridHandle = {
327
406
  * バッチングで 1 コミットに合流 (設計の rAF 合流意図のコミット粒度での実現)。
328
407
  */
329
408
  updateColSize(col: number, px: number): void;
330
- /** Effective frozen-band sizes: {cols, width, rows, height} in the CURRENT trees (cols/rows = dynamic clamps, width = W_F px, height = H_F px). Consumers use it for hit-test partitioning on both axes. / 実効凍結帯寸法 {cols, width, rows, height} (cols / rows は動的クランプ後、width = W_F、height = H_F)。消費側の両軸ヒットテスト分割用。 */
409
+ /**
410
+ * Effective frozen-band sizes on both axes and both ends (v3.5.0 — a non-breaking field
411
+ * extension of the {cols, width} → {cols, width, rows, height} precedent). cols/rows/
412
+ * trailingCols/trailingRows = dynamic post-clamp counts; width/height/trailingWidth/
413
+ * trailingHeight = TREE px (the trailing sizes are tree SUFFIX sums); trailingVisibleWidth/
414
+ * trailingVisibleHeight = viewport-clipped `min(tree, max(0, viewport − leading))` — THE
415
+ * single source for W_T_vis / H_T_vis that every consumer judgment/write path cites (never
416
+ * re-derive the formula). Pre-attach the grid viewport reads {0, 0}, so the vis fields are
417
+ * 0 (an initial measured state, not a sentinel) while the tree fields stay tree px.
418
+ * 実効凍結帯寸法 — 両軸・両端 (v3.5.0。{cols, width} → {cols, width, rows, height} の
419
+ * 前例に続く非破壊のフィールド追加)。cols / rows / trailingCols / trailingRows は動的
420
+ * クランプ後の実効カウント、width / height / trailingWidth / trailingHeight は**木** px
421
+ * (末尾寸は木の接尾辞和)、trailingVisibleWidth / trailingVisibleHeight はビューポート
422
+ * クリップ `min(木, max(0, viewport − 先頭))` — W_T_vis / H_T_vis の**単一情報源**で、
423
+ * 消費側の判定 / 書込み経路は全てこのフィールドを名指しで読む (式の再導出禁止)。
424
+ * プレアタッチはビューポート {0, 0} のため vis フィールドは 0 (番兵ではなく初期実測状態)、
425
+ * 木フィールドは常に木 px。
426
+ */
331
427
  getFrozenSize(): {
332
428
  cols: number;
333
429
  width: number;
334
430
  rows: number;
335
431
  height: number;
432
+ trailingCols: number;
433
+ trailingRows: number;
434
+ trailingWidth: number;
435
+ trailingHeight: number;
436
+ trailingVisibleWidth: number;
437
+ trailingVisibleHeight: number;
336
438
  };
337
439
  /** 2-axis wheel bridge entry: vertical → embedded VirtualScroll, horizontal → hx. Returns whether the event was consumed (WheelBridgeTarget contract). / 2 軸ホイールブリッジ口。消費有無を返す (ブリッジ契約)。 */
338
440
  applyWheel(event: WheelEvent): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualGrid.d.ts","sourceRoot":"","sources":["../src/VirtualGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAkC,KAAK,cAAc,EAAE,KAAK,SAAS,EAA2F,MAAM,OAAO,CAAA;AAIpL,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,OAAO,EAAqF,KAAK,4BAA4B,EAAqD,KAAK,6BAA6B,EAAyB,MAAM,qBAAqB,CAAA;AAExQ;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,SAAU,CAAA;AAarC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,QAAS,CAAA;AAExC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAA;AAE1C;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAA;AAwB1C;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,GAAI,kBAAkB,MAAM,GAAG,SA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oBAAoB,EAAE,MAAM,CAAC;QAAC,qBAAqB,EAAE,MAAM,CAAA;KAAE,CAAA;IACtO,2LAA2L;IAC3L,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAA;IACtC,wSAAwS;IACxS,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;CAC5E,CAAA;AAoBD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,GAC/B,IAAI,MAAM,EACV,eAAe,MAAM,EACrB,cAAc,MAAM,EACpB,UAAU,MAAM,EAChB,aAAa,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,EACpC,SAAS,UAAU,CAAC,OAAO,iBAAiB,CAAC,EAC7C,YAAY,MAAM,EAClB,YAAY,MAAM,KACnB;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAkBzH,CAAA;AAs5CD;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAmC,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAAE,KAAK,SAAS,CAAA"}
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Pure two-axis velocity decomposition for the unified grid tap circle (v3.6.0).
3
+ * 統合 2 軸タップサークル (v3.6.0) 用の純関数 2 軸速度分解モジュール。
4
+ */
5
+ /**
6
+ * Per-axis speed parameters for `computeTapScrollVelocity` — the exact tuple one bar resolves
7
+ * today. Deliberately an explicit structural type (NOT `Omit<TapScrollSpeedInput, …>`):
8
+ * api-extractor cannot roll up `Omit<>` on the public surface (house rule).
9
+ * `computeTapScrollVelocity` の軸別速度パラメータ — 今日 1 本のバーが解決する組そのもの。
10
+ * 意図的な明示構造型 (`Omit<>` 非使用 — api-extractor がロールアップできないための既定方針)。
11
+ */
12
+ export type TapScrollAxisSpeedParams = {
13
+ /** Viewport length on this axis (px). / この軸のビューポート長 (px)。 */
14
+ viewportSize: number;
15
+ /** Minimum speed multiplier (viewport-relative). / 最小速度倍率 (ビューポート比)。 */
16
+ minSpeedMultiplier: number;
17
+ /** Maximum speed multiplier (viewport-relative). / 最大速度倍率 (ビューポート比)。 */
18
+ maxSpeedMultiplier: number;
19
+ /** Whether `maxSpeedMultiplier` was explicitly supplied (controls the 1,200 px/s auto floor). / `maxSpeedMultiplier` が明示指定か (1,200 px/s 自動床の制御)。 */
20
+ hasCustomMaxSpeedMultiplier: boolean;
21
+ /** Optional speed-curve shape (same contract as `TapScrollSpeedInput.curve`). / 任意の速度曲線形状 (`TapScrollSpeedInput.curve` と同契約)。 */
22
+ curve?: {
23
+ exponentialSteepness: number;
24
+ exponentialScale?: number;
25
+ easedOffset?: number;
26
+ };
27
+ };
28
+ /**
29
+ * Input for `computeTapScrollVelocity`.
30
+ * `computeTapScrollVelocity` の入力。
31
+ */
32
+ export type TapScrollVelocityInput = {
33
+ /** Signed px from the circle center (state canonical field). / サークル中心からの符号付き px (state 正準フィールド)。 */
34
+ offsetX: number;
35
+ /** Signed px from the circle center (state canonical field). / サークル中心からの符号付き px (state 正準フィールド)。 */
36
+ offsetY: number;
37
+ /** Shared pull range (= `max(maxVisualDistance, 1)`). / 共有引き範囲 (= `max(maxVisualDistance, 1)`)。 */
38
+ maxDistance: number;
39
+ /** Horizontal-axis speed parameters. / 横軸の速度パラメータ。 */
40
+ x: TapScrollAxisSpeedParams;
41
+ /** Vertical-axis speed parameters. / 縦軸の速度パラメータ。 */
42
+ y: TapScrollAxisSpeedParams;
43
+ };
44
+ /**
45
+ * Decomposes a 2-D tap-circle pull into per-axis scroll velocities (px/s, signed):
46
+ *
47
+ * ```text
48
+ * r = 0 => v = (0, 0)
49
+ * r > 0 => v = ( s_x(r) * ox / r , s_y(r) * oy / r )
50
+ * ```
51
+ *
52
+ * where `r = ||(ox, oy)||_2` and `s_a` is the UNCHANGED `computeTapScrollSpeed` under axis `a`'s
53
+ * parameters (`distance: r`, shared `maxDistance`).
54
+ *
55
+ * Derivation summary (the axioms this law is the unique solution of):
56
+ *
57
+ * - D1 (legacy reproduction): pure-axis inputs reproduce each 1-D bar law to within 1 ulp
58
+ * under the pinned order — deviations hit a config-dependent ~9% of probed pure-axis points,
59
+ * so never assert bit-equality (`toBe` / `Object.is`) of a pure-axis component against
60
+ * `computeTapScrollSpeed` outside the committed exact fixtures. The rejected order
61
+ * `s * (o / r)` would be bit-exact on pure axes (`o / r = ±1` exactly); the pin below
62
+ * trades that for fixture-order independence (plan §4.2 T1 / §4.3).
63
+ * - D2 (radial law under isotropy): when `s_x = s_y = s`, `|v| = s(r)` at every angle.
64
+ * - D3 (separability): `v_a = s_a(r) * u_a(theta)` for a direction-only unit field `u`.
65
+ * - D4 (isotropic direction fidelity — a CHOSEN axiom, not derived): when `s_x = s_y`,
66
+ * `v` is parallel to the offset with a positive scalar (rotational equivariance).
67
+ *
68
+ * D1-D3 alone do NOT force this law: they admit the whole family
69
+ * `u = (cos phi(theta), sin phi(theta))` for any continuous strictly increasing angle remap
70
+ * `phi` fixing the four cardinal angles (e.g. `phi(theta) = theta - epsilon * sin(4 theta)`).
71
+ * D4 pins `phi = id`. That family is the registered invariant-preserving tuning point for
72
+ * near-axis leakage (plan §4.4); v3.6.0 ships `phi = id`.
73
+ *
74
+ * Evaluation-order pin: each component is computed literally as `s_a(r) * o_a / r`
75
+ * (left-to-right, i.e. `(s * o) / r`). The two orders differ by 1 ulp for SOME inputs —
76
+ * verified witness: `40 * (7 / 25) = 11.200000000000001` while `(40 * 7) / 25 = 11.2` exactly.
77
+ * The committed spec fixtures happen to agree under BOTH orders (`200 * (30 / 50) === 120`
78
+ * etc. — the products land inside half-ulp and round back); the pin exists so the fixtures'
79
+ * `toBe` exactness never depends on that luck of the operand set. Do NOT "test" the old,
80
+ * numerically false claim that `200 * (30 / 50)` misrounds — it does not; deleting this pin
81
+ * because that claim fails would discard a sound pin.
82
+ *
83
+ * Totality: non-finite `ox` / `oy` are sanitized to 0 and `r = 0` returns `(0, 0)` (the origin
84
+ * has no continuous extension — the limit depends on the approach angle). Components are always
85
+ * finite: `s_a` is the existing sole NaN barrier and `|o_a| / r <= 1`.
86
+ *
87
+ * External reproduction of what a bar/grid actually resolves (same pattern as the
88
+ * `computeTapScrollSpeed` docstring):
89
+ *
90
+ * ```ts
91
+ * const velocity = computeTapScrollVelocity({
92
+ * offsetX,
93
+ * offsetY,
94
+ * maxDistance: options.maxVisualDistance ?? TAP_SCROLL_SPEED_DEFAULTS.maxDistance,
95
+ * x: {
96
+ * viewportSize: bandWidth,
97
+ * minSpeedMultiplier: options.minSpeedMultiplier ?? TAP_SCROLL_SPEED_DEFAULTS.minSpeedMultiplier,
98
+ * maxSpeedMultiplier: options.maxSpeedMultiplier ?? computeAutoTapScrollMaxSpeedMultiplier(colCount),
99
+ * hasCustomMaxSpeedMultiplier: options.maxSpeedMultiplier !== undefined,
100
+ * curve: options.maxSpeedCurve,
101
+ * },
102
+ * y: { …same with the pane height and rowCount… },
103
+ * })
104
+ * ```
105
+ *
106
+ * 2 次元のタップサークル引きを軸別スクロール速度 (px/s、符号付き) へ分解する処理。方向余弦
107
+ * 分解 `v = (s_x(r)·ox/r, s_y(r)·oy/r)` — `s_a` は無改造の `computeTapScrollSpeed`。D4
108
+ * (等方時の方向忠実) は導出ではなく選択公理で、許容リマップ族 `u = (cos φ(θ), sin φ(θ))` を
109
+ * `φ = id` に固定する。評価順序は `s_a(r) * o_a / r` (左から右) にピン — 1 ulp 証人は
110
+ * `40*(7/25) ≠ (40*7)/25`。D1 の純軸再現はピン順序下で ≤ 1 ulp (構成依存の約 9% の点で乖離 —
111
+ * ビット恒等は棄却順序 `s·(o/r)` の側で、ピンはそれをフィクスチャ順序非依存と引き換えた)。
112
+ * 非有限オフセットは 0 へ消毒し、`r = 0` は `(0, 0)`。
113
+ *
114
+ * @param input Offsets, shared pull range, and per-axis speed parameters. / オフセット・共有引き範囲・軸別速度パラメータ。
115
+ * @returns Signed per-axis velocities in px/s (always finite). / 軸別の符号付き速度 (px/s、常に有限)。
116
+ */
117
+ export declare const computeTapScrollVelocity: ({ offsetX, offsetY, maxDistance, x, y }: TapScrollVelocityInput) => {
118
+ x: number;
119
+ y: number;
120
+ };
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Pure two-axis velocity decomposition for the unified grid tap circle (v3.6.0).
3
+ * 統合 2 軸タップサークル (v3.6.0) 用の純関数 2 軸速度分解モジュール。
4
+ */
5
+ /**
6
+ * Per-axis speed parameters for `computeTapScrollVelocity` — the exact tuple one bar resolves
7
+ * today. Deliberately an explicit structural type (NOT `Omit<TapScrollSpeedInput, …>`):
8
+ * api-extractor cannot roll up `Omit<>` on the public surface (house rule).
9
+ * `computeTapScrollVelocity` の軸別速度パラメータ — 今日 1 本のバーが解決する組そのもの。
10
+ * 意図的な明示構造型 (`Omit<>` 非使用 — api-extractor がロールアップできないための既定方針)。
11
+ */
12
+ export type TapScrollAxisSpeedParams = {
13
+ /** Viewport length on this axis (px). / この軸のビューポート長 (px)。 */
14
+ viewportSize: number;
15
+ /** Minimum speed multiplier (viewport-relative). / 最小速度倍率 (ビューポート比)。 */
16
+ minSpeedMultiplier: number;
17
+ /** Maximum speed multiplier (viewport-relative). / 最大速度倍率 (ビューポート比)。 */
18
+ maxSpeedMultiplier: number;
19
+ /** Whether `maxSpeedMultiplier` was explicitly supplied (controls the 1,200 px/s auto floor). / `maxSpeedMultiplier` が明示指定か (1,200 px/s 自動床の制御)。 */
20
+ hasCustomMaxSpeedMultiplier: boolean;
21
+ /** Optional speed-curve shape (same contract as `TapScrollSpeedInput.curve`). / 任意の速度曲線形状 (`TapScrollSpeedInput.curve` と同契約)。 */
22
+ curve?: {
23
+ exponentialSteepness: number;
24
+ exponentialScale?: number;
25
+ easedOffset?: number;
26
+ };
27
+ };
28
+ /**
29
+ * Input for `computeTapScrollVelocity`.
30
+ * `computeTapScrollVelocity` の入力。
31
+ */
32
+ export type TapScrollVelocityInput = {
33
+ /** Signed px from the circle center (state canonical field). / サークル中心からの符号付き px (state 正準フィールド)。 */
34
+ offsetX: number;
35
+ /** Signed px from the circle center (state canonical field). / サークル中心からの符号付き px (state 正準フィールド)。 */
36
+ offsetY: number;
37
+ /** Shared pull range (= `max(maxVisualDistance, 1)`). / 共有引き範囲 (= `max(maxVisualDistance, 1)`)。 */
38
+ maxDistance: number;
39
+ /** Horizontal-axis speed parameters. / 横軸の速度パラメータ。 */
40
+ x: TapScrollAxisSpeedParams;
41
+ /** Vertical-axis speed parameters. / 縦軸の速度パラメータ。 */
42
+ y: TapScrollAxisSpeedParams;
43
+ };
44
+ /**
45
+ * Decomposes a 2-D tap-circle pull into per-axis scroll velocities (px/s, signed):
46
+ *
47
+ * ```text
48
+ * r = 0 => v = (0, 0)
49
+ * r > 0 => v = ( s_x(r) * ox / r , s_y(r) * oy / r )
50
+ * ```
51
+ *
52
+ * where `r = ||(ox, oy)||_2` and `s_a` is the UNCHANGED `computeTapScrollSpeed` under axis `a`'s
53
+ * parameters (`distance: r`, shared `maxDistance`).
54
+ *
55
+ * Derivation summary (the axioms this law is the unique solution of):
56
+ *
57
+ * - D1 (legacy reproduction): pure-axis inputs reproduce each 1-D bar law to within 1 ulp
58
+ * under the pinned order — deviations hit a config-dependent ~9% of probed pure-axis points,
59
+ * so never assert bit-equality (`toBe` / `Object.is`) of a pure-axis component against
60
+ * `computeTapScrollSpeed` outside the committed exact fixtures. The rejected order
61
+ * `s * (o / r)` would be bit-exact on pure axes (`o / r = ±1` exactly); the pin below
62
+ * trades that for fixture-order independence (plan §4.2 T1 / §4.3).
63
+ * - D2 (radial law under isotropy): when `s_x = s_y = s`, `|v| = s(r)` at every angle.
64
+ * - D3 (separability): `v_a = s_a(r) * u_a(theta)` for a direction-only unit field `u`.
65
+ * - D4 (isotropic direction fidelity — a CHOSEN axiom, not derived): when `s_x = s_y`,
66
+ * `v` is parallel to the offset with a positive scalar (rotational equivariance).
67
+ *
68
+ * D1-D3 alone do NOT force this law: they admit the whole family
69
+ * `u = (cos phi(theta), sin phi(theta))` for any continuous strictly increasing angle remap
70
+ * `phi` fixing the four cardinal angles (e.g. `phi(theta) = theta - epsilon * sin(4 theta)`).
71
+ * D4 pins `phi = id`. That family is the registered invariant-preserving tuning point for
72
+ * near-axis leakage (plan §4.4); v3.6.0 ships `phi = id`.
73
+ *
74
+ * Evaluation-order pin: each component is computed literally as `s_a(r) * o_a / r`
75
+ * (left-to-right, i.e. `(s * o) / r`). The two orders differ by 1 ulp for SOME inputs —
76
+ * verified witness: `40 * (7 / 25) = 11.200000000000001` while `(40 * 7) / 25 = 11.2` exactly.
77
+ * The committed spec fixtures happen to agree under BOTH orders (`200 * (30 / 50) === 120`
78
+ * etc. — the products land inside half-ulp and round back); the pin exists so the fixtures'
79
+ * `toBe` exactness never depends on that luck of the operand set. Do NOT "test" the old,
80
+ * numerically false claim that `200 * (30 / 50)` misrounds — it does not; deleting this pin
81
+ * because that claim fails would discard a sound pin.
82
+ *
83
+ * Totality: non-finite `ox` / `oy` are sanitized to 0 and `r = 0` returns `(0, 0)` (the origin
84
+ * has no continuous extension — the limit depends on the approach angle). Components are always
85
+ * finite: `s_a` is the existing sole NaN barrier and `|o_a| / r <= 1`.
86
+ *
87
+ * External reproduction of what a bar/grid actually resolves (same pattern as the
88
+ * `computeTapScrollSpeed` docstring):
89
+ *
90
+ * ```ts
91
+ * const velocity = computeTapScrollVelocity({
92
+ * offsetX,
93
+ * offsetY,
94
+ * maxDistance: options.maxVisualDistance ?? TAP_SCROLL_SPEED_DEFAULTS.maxDistance,
95
+ * x: {
96
+ * viewportSize: bandWidth,
97
+ * minSpeedMultiplier: options.minSpeedMultiplier ?? TAP_SCROLL_SPEED_DEFAULTS.minSpeedMultiplier,
98
+ * maxSpeedMultiplier: options.maxSpeedMultiplier ?? computeAutoTapScrollMaxSpeedMultiplier(colCount),
99
+ * hasCustomMaxSpeedMultiplier: options.maxSpeedMultiplier !== undefined,
100
+ * curve: options.maxSpeedCurve,
101
+ * },
102
+ * y: { …same with the pane height and rowCount… },
103
+ * })
104
+ * ```
105
+ *
106
+ * 2 次元のタップサークル引きを軸別スクロール速度 (px/s、符号付き) へ分解する処理。方向余弦
107
+ * 分解 `v = (s_x(r)·ox/r, s_y(r)·oy/r)` — `s_a` は無改造の `computeTapScrollSpeed`。D4
108
+ * (等方時の方向忠実) は導出ではなく選択公理で、許容リマップ族 `u = (cos φ(θ), sin φ(θ))` を
109
+ * `φ = id` に固定する。評価順序は `s_a(r) * o_a / r` (左から右) にピン — 1 ulp 証人は
110
+ * `40*(7/25) ≠ (40*7)/25`。D1 の純軸再現はピン順序下で ≤ 1 ulp (構成依存の約 9% の点で乖離 —
111
+ * ビット恒等は棄却順序 `s·(o/r)` の側で、ピンはそれをフィクスチャ順序非依存と引き換えた)。
112
+ * 非有限オフセットは 0 へ消毒し、`r = 0` は `(0, 0)`。
113
+ *
114
+ * @param input Offsets, shared pull range, and per-axis speed parameters. / オフセット・共有引き範囲・軸別速度パラメータ。
115
+ * @returns Signed per-axis velocities in px/s (always finite). / 軸別の符号付き速度 (px/s、常に有限)。
116
+ */
117
+ export declare const computeTapScrollVelocity: ({ offsetX, offsetY, maxDistance, x, y }: TapScrollVelocityInput) => {
118
+ x: number;
119
+ y: number;
120
+ };
121
+ //# sourceMappingURL=computeTapScrollVelocity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeTapScrollVelocity.d.ts","sourceRoot":"","sources":["../src/computeTapScrollVelocity.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACnC,6DAA6D;IAC7D,YAAY,EAAE,MAAM,CAAA;IACpB,wEAAwE;IACxE,kBAAkB,EAAE,MAAM,CAAA;IAC1B,wEAAwE;IACxE,kBAAkB,EAAE,MAAM,CAAA;IAC1B,oJAAoJ;IACpJ,2BAA2B,EAAE,OAAO,CAAA;IACpC,iIAAiI;IACjI,KAAK,CAAC,EAAE;QAAE,oBAAoB,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAC5F,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACjC,oGAAoG;IACpG,OAAO,EAAE,MAAM,CAAA;IACf,oGAAoG;IACpG,OAAO,EAAE,MAAM,CAAA;IACf,mGAAmG;IACnG,WAAW,EAAE,MAAM,CAAA;IACnB,sDAAsD;IACtD,CAAC,EAAE,wBAAwB,CAAA;IAC3B,oDAAoD;IACpD,CAAC,EAAE,wBAAwB,CAAA;CAC9B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,eAAO,MAAM,wBAAwB,GAAI,yCAAyC,sBAAsB,KAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAgChI,CAAA"}