@aiquants/spreadsheet 0.21.0 → 0.21.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 CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  All notable changes to `@aiquants/spreadsheet` are documented here.
4
4
 
5
+ ## 0.21.2 (2026-11-20)
6
+
7
+ ### Fixed
8
+
9
+ - **The grid root shows a focus ring of its own (WCAG 2.4.7 / 2.4.13).** The root — where Escape hands the focus out of
10
+ the grid, and where Shift+Tab rests from an in-grid tab stop — had no focus style, so it showed the browser's ring
11
+ outside its box, which a host that fills a clipping box with the grid cuts away (0 pixels in such a host) and an
12
+ `outline` reset removes. While the root matches `:focus-visible`, the stylesheet now draws a two-colour ring just
13
+ inside its edge, on its last child (`::after`), over every part of the grid — the header bands, the scroll bars and
14
+ their thumbs, the range frame and the active cell's frame: 2 CSS px of `--aqsp-surface` against the edge and 3 CSS px
15
+ of `--aqsp-text` inside it, the same at every zoom. The two defaults are 14.68:1 apart, so one of the bands changes any
16
+ colour under the ring by at least 3.83:1 (WCAG technique C40), and each band alone has the area WCAG 2.4.13 asks (the
17
+ inner one from W + H ≥ 42 CSS px). The root's own outline is `none`; under forced colours the bands are `Canvas` and
18
+ `Highlight`.
19
+
20
+ ### Changed
21
+
22
+ - **The grid's parts stack inside the zoom wrapper.** `.aqsp-zoom` isolates its stacking context (`isolation: isolate`),
23
+ so the `z-index` of its parts — the scroll bars and the tap circle at 50, the edge pills at 10 — no longer takes part
24
+ in the host's stacking context, as it already did not at a zoom other than 100 % (the wrapper's transform). A host
25
+ element with a `z-index` under 50 that overlaps the grid now covers its scroll bars as well.
26
+ - **The `@aiquants/input-method` dependency is `^0.1.2`** (was `^0.1.0`), the release the package is built and tested
27
+ against, so a fresh install no longer picks 0.1.0, whose keydown rule threw on a plain `Event` sent as a keydown (fixed
28
+ in 0.1.1). The keydown guard's composition clause is unchanged.
29
+
30
+ ### Verification
31
+
32
+ - **公開面**: 変わらない (`index.ts` の値 44 + 型 112 = 156 export)。
33
+ - **DOM 属性**: 変わらない (輪は根の `::after` に描き、属性を足していない)。
34
+ - **検証 — 走行台帳 (census の錨は本未リリース節)**: 単体 / 統合 **108 ファイル 4,524 テスト** 全緑 — 0.21.0 出荷時の
35
+ 108 ファイル 4,517 に v0.21.2 進行分 +7 (`designTokens` +5 — 輪の帯の規則・面積の式から導く帯の太さ・地と字の 9:1 以上
36
+ (技法 C40)・輪の下に来うる色 (virtualscroll のバーとつまみを含む) の上の変化・強制配色の帯、0.21.0 節と 0.21.1 節の出荷時
37
+ 凍結ピンで `hxCensus` +2)。0.21.1 は試験を足していない。
38
+ - **検証 — E2E**: 新規 `root-focus-ring` 8 (デモ `/fit` と `/`)。セルを押して Escape で根へ焦点を移し、焦点の前後で
39
+ 3:1 以上変わる画素を virtualscroll の試験の入口 `@aiquants/virtualscroll/testing/playwright` で数える。根の全体で
40
+ 4w + 4h 以上、四辺のそれぞれで 2 px の周の分以上: 見出しの帯の上、外枠の線が縁に沿う形の倍率 0.5 / 1 / 1.5、
41
+ スクロールバーの上とつまみのホバー中、強制配色の下。焦点が受け口へ戻ると輪は消える。E2E の総数は 29 ファイル 321 テスト。
42
+ - **触れていないこと**: WebKit と Firefox の画素 (E2E は Chromium だけ)・装置の画素の比が 1 でない画面・Windows の
43
+ ハイコントラストの実機。
44
+
45
+ ## 0.21.1 (2026-11-19)
46
+
47
+ ### Changed
48
+
49
+ - **The keydown guard's composition clause is `@aiquants/input-method`'s `isInputMethodKey`** (a new dependency,
50
+ installed with the package): a keydown of a composition (`isComposing`, or keyCode 229) is still never a command, in
51
+ the grid's keymap and in every popover alike, now under the rule the workspace's packages share. The guard's other
52
+ clause — Enter / Escape within 50 ms after `compositionend` (Safari's order) — stays the package's own and is
53
+ unchanged.
54
+
5
55
  ## 0.21.0 (2026-11-19)
6
56
 
7
57
  ### Added
package/README.md CHANGED
@@ -60,6 +60,7 @@ pnpm add @aiquants/spreadsheet @aiquants/virtualscroll
60
60
  ```
61
61
 
62
62
  `react` / `react-dom` (`^19.2`) and `@aiquants/virtualscroll` are peer dependencies (the ranges are `peerDependencies` in the published `package.json`; the code itself needs virtualscroll 3.28.0 or later, which marks the press that stopped a fling — `didPressStopScrollMotion`, read by the `touchEditing` tap; 3.24.0 brought the bars that can leave their arrow buttons out for `scrollBarControls`).
63
+ `@aiquants/input-method` is a dependency, installed with the package: the keydown guard of the grid and its popovers takes from it whether a key belongs to an IME composition.
63
64
 
64
65
  > **Browser floor**: the built-in cell display formats (v0.7) require `Intl.NumberFormat` v3
65
66
  > (string mathematical-value input + `signDisplay: "negative"`) — **Chrome/Edge 106+, Firefox 116+,
@@ -647,6 +648,31 @@ at least 6 (W + H) − 36, is at least that of a 2 px perimeter around the cell,
647
648
  default 100 × 24 cell down to the 25 % zoom (25 × 6 px) — and the accent changes those pixels from the surface at
648
649
  5.17:1. A browser without CSS `round()` drops the width and draws the initial 3 px, which the zoom scales.
649
650
 
651
+ **The root's focus ring (WCAG 2.4.7 / 2.4.13).** The root (`role="group"`) holds the focus after the Escape hand-off and
652
+ when Shift+Tab comes back to it from an in-grid tab stop (a scroll-bar arrow button, a `renderCell` focusable). While it
653
+ matches `:focus-visible`, the stylesheet draws a two-colour ring on its last child (`::after`), just inside its edge and
654
+ over every part of the grid — the header bands, the scroll bars and their thumbs, the range frame, popovers and the active
655
+ cell's frame: an outer band of 2 CSS px in `--aqsp-surface` against the edge and an inner band of 3 CSS px in
656
+ `--aqsp-text` (WCAG technique C40). The root's own outline is `none`. The ring is drawn inside the box, so a host that
657
+ clips the grid (an `overflow` box the grid fills) or resets `outline` does not hide it, and it lies outside the zoom
658
+ wrapper, so its bands keep their width at every zoom.
659
+
660
+ - **Area.** Each band alone has the area WCAG 2.4.13 asks. The outer band is the 2 px band along the inner edge, the
661
+ smallest indicator that still counts as a perimeter. The inner band starts 2 px away from the edge, so it has to be
662
+ thicker: in a W × H root its 3 px have 6 (W + H) − 84, at least the 4 (W + H) of a 2 px perimeter whenever W + H ≥ 42
663
+ (a root that shows the headings is at least 64 + 24), while 2 px would have 4 (W + H) − 48 and never suffice.
664
+ - **Change of contrast.** If the two variables are R:1 apart, then over any colour one of the two bands changes it by at
665
+ least √R:1. The defaults are 14.68:1 apart, so over any colour one of the bands changes it by at least 3.83:1 — the
666
+ mid-grey scroll-bar thumb, the dark range frame and the accent active-cell frame included, over which a single 2 px ring
667
+ of the accent would change only 1.29:1, 2.84:1 and 1:1. The ring follows the two variables: a theme whose surface and text
668
+ are at least 9:1 apart keeps the 3:1 for every colour (√9 = 3). The 7:1 the text pairs must reach (below) is not
669
+ enough for that on its own — with 7:1 a colour whose luminance lies between the two can change by as little as
670
+ √7 ≈ 2.65:1 under either band — so a theme between 7:1 and 9:1 should check the colours its grid paints.
671
+ - **Stacking.** The grid's parts live in the zoom wrapper's stacking context (`isolation: isolate`), so the ring comes
672
+ over them in tree order without a `z-index`, and their own `z-index` values (the scroll bars' 50) do not reach the
673
+ host's stacking context.
674
+ - **Forced colours.** The outer band is `Canvas` and the inner band `Highlight`.
675
+
650
676
  **Contrast (WCAG 1.4.6, 7:1).** Every text / background pair of the light defaults is at least 7:1, measured with the WCAG 2
651
677
  formula; the three pairs below 7:1 before v0.16 were re-solved by changing lightness only (the hue stays):
652
678