@viewkitjs/views 0.3.0 → 0.5.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.
Files changed (288) hide show
  1. package/CHANGELOG.md +641 -0
  2. package/README.md +3 -3
  3. package/dist/atoms/CommandMenu.d.ts +1 -1
  4. package/dist/atoms/CommandMenu.js +7 -3
  5. package/dist/atoms/DrillRows.d.ts +3 -0
  6. package/dist/atoms/DrillRows.js +25 -0
  7. package/dist/atoms/PanelRows.d.ts +5 -0
  8. package/dist/atoms/PanelRows.js +40 -0
  9. package/dist/atoms/PanelSearch.d.ts +2 -0
  10. package/dist/atoms/PanelSearch.js +21 -0
  11. package/dist/atoms/RelationRoles.d.ts +2 -0
  12. package/dist/atoms/RelationRoles.js +6 -0
  13. package/dist/atoms/Row.js +2 -1
  14. package/dist/atoms/RowMenu.js +2 -1
  15. package/dist/atoms/SelectionSheet.d.ts +3 -0
  16. package/dist/atoms/SelectionSheet.js +30 -0
  17. package/dist/atoms/StatusMarker.js +3 -1
  18. package/dist/atoms/Tag.js +2 -1
  19. package/dist/atoms/defaults.js +14 -0
  20. package/dist/atoms/types.d.ts +146 -8
  21. package/dist/cells/cell-values.js +4 -2
  22. package/dist/cells/relation-wrap.js +3 -1
  23. package/dist/contract.d.ts +212 -17
  24. package/dist/contract.js +208 -6
  25. package/dist/display/boolean.js +3 -1
  26. package/dist/display/date.d.ts +1 -1
  27. package/dist/display/date.js +4 -2
  28. package/dist/display/format.js +20 -4
  29. package/dist/display/link.js +4 -3
  30. package/dist/display/multi-value.js +2 -1
  31. package/dist/display/percent.js +2 -1
  32. package/dist/display/phone.js +2 -1
  33. package/dist/display/range.js +3 -13
  34. package/dist/display/relation.js +23 -8
  35. package/dist/display/rich-text.js +2 -1
  36. package/dist/editors/ChipsEditor.d.ts +5 -1
  37. package/dist/editors/ChipsEditor.js +15 -2
  38. package/dist/editors/DateEditor.d.ts +2 -0
  39. package/dist/editors/DateEditor.js +76 -10
  40. package/dist/editors/EditorPanel.d.ts +14 -4
  41. package/dist/editors/EditorPanel.js +21 -4
  42. package/dist/editors/LocationEditor.js +35 -3
  43. package/dist/editors/NumberEditor.js +3 -2
  44. package/dist/editors/RangeEditor.d.ts +8 -0
  45. package/dist/editors/RangeEditor.js +3 -2
  46. package/dist/editors/RelationEditor.d.ts +2 -0
  47. package/dist/editors/RelationEditor.js +16 -2
  48. package/dist/editors/RelationSetEditor.d.ts +4 -2
  49. package/dist/editors/RelationSetEditor.js +36 -2
  50. package/dist/editors/SelectEditor.d.ts +5 -2
  51. package/dist/editors/SelectEditor.js +31 -4
  52. package/dist/editors/TextEditor.js +3 -1
  53. package/dist/editors/ValueListEditor.d.ts +3 -0
  54. package/dist/editors/ValueListEditor.js +10 -4
  55. package/dist/editors/edit-session.d.ts +14 -2
  56. package/dist/editors/edit-session.js +13 -5
  57. package/dist/editors/escape-rule.d.ts +12 -0
  58. package/dist/editors/escape-rule.js +8 -0
  59. package/dist/editors/open-value.js +2 -1
  60. package/dist/editors/picker-slot.d.ts +25 -0
  61. package/dist/editors/picker-slot.js +37 -0
  62. package/dist/editors/relation-picker.d.ts +44 -0
  63. package/dist/editors/relation-picker.js +49 -0
  64. package/dist/editors/relation-source.d.ts +1 -0
  65. package/dist/editors/relation-source.js +7 -1
  66. package/dist/field-row/FieldNoteLine.js +2 -1
  67. package/dist/field-row/FieldRow.js +41 -6
  68. package/dist/field-row/FieldRowLane.js +3 -1
  69. package/dist/field-row/editors/RowChipsEditor.js +1 -1
  70. package/dist/field-row/editors/RowDateEditor.js +1 -1
  71. package/dist/field-row/editors/RowEditor.js +2 -1
  72. package/dist/field-row/editors/RowRangeEditor.js +2 -1
  73. package/dist/field-row/editors/RowRelationEditor.js +2 -2
  74. package/dist/field-row/editors/RowSelectEditor.d.ts +1 -1
  75. package/dist/field-row/editors/RowSelectEditor.js +2 -2
  76. package/dist/field-row/editors/RowValueListEditor.js +1 -1
  77. package/dist/field-row/editors/host.d.ts +3 -0
  78. package/dist/field-row/editors/row-session.js +4 -1
  79. package/dist/fields/menus.d.ts +2 -0
  80. package/dist/fields/range-unit.d.ts +7 -0
  81. package/dist/fields/range-unit.js +13 -0
  82. package/dist/figures.d.ts +5 -48
  83. package/dist/figures.js +1 -63
  84. package/dist/grid/chrome/GridAddColumn.d.ts +8 -0
  85. package/dist/grid/chrome/GridAddColumn.js +66 -9
  86. package/dist/grid/chrome/GridAggregateMenu.d.ts +5 -2
  87. package/dist/grid/chrome/GridAggregateMenu.js +33 -4
  88. package/dist/grid/chrome/GridCellEditors.d.ts +9 -2
  89. package/dist/grid/chrome/GridCellEditors.js +24 -5
  90. package/dist/grid/chrome/GridCellOutline.d.ts +3 -2
  91. package/dist/grid/chrome/GridCellOutline.js +11 -1
  92. package/dist/grid/chrome/GridChipsEditor.js +1 -1
  93. package/dist/grid/chrome/GridColumnColorSection.d.ts +2 -0
  94. package/dist/grid/chrome/GridColumnColorSection.js +2 -2
  95. package/dist/grid/chrome/GridColumnDateSection.d.ts +4 -0
  96. package/dist/grid/chrome/GridColumnDateSection.js +2 -2
  97. package/dist/grid/chrome/GridColumnDurationSection.d.ts +4 -0
  98. package/dist/grid/chrome/GridColumnDurationSection.js +2 -2
  99. package/dist/grid/chrome/GridColumnMenu.d.ts +10 -6
  100. package/dist/grid/chrome/GridColumnMenu.js +62 -24
  101. package/dist/grid/chrome/GridColumnNumberSection.d.ts +4 -0
  102. package/dist/grid/chrome/GridColumnNumberSection.js +2 -2
  103. package/dist/grid/chrome/GridColumnPercentSection.d.ts +1 -0
  104. package/dist/grid/chrome/GridColumnPercentSection.js +1 -1
  105. package/dist/grid/chrome/GridColumnSortSection.d.ts +3 -3
  106. package/dist/grid/chrome/GridDateEditor.js +1 -1
  107. package/dist/grid/chrome/GridFooter.js +7 -48
  108. package/dist/grid/chrome/GridGroupMenu.d.ts +11 -5
  109. package/dist/grid/chrome/GridGroupMenu.js +28 -13
  110. package/dist/grid/chrome/GridHeader.d.ts +3 -1
  111. package/dist/grid/chrome/GridHeader.js +8 -8
  112. package/dist/grid/chrome/GridNumberEditor.js +3 -24
  113. package/dist/grid/chrome/GridRangeEditor.js +3 -2
  114. package/dist/grid/chrome/GridRelationEditor.js +2 -2
  115. package/dist/grid/chrome/GridRow.d.ts +2 -1
  116. package/dist/grid/chrome/GridRow.js +13 -37
  117. package/dist/grid/chrome/GridRowActions.js +2 -1
  118. package/dist/grid/chrome/GridRowCells.js +9 -4
  119. package/dist/grid/chrome/GridSelectEditor.js +30 -20
  120. package/dist/grid/chrome/GridStructure.d.ts +11 -4
  121. package/dist/grid/chrome/GridStructure.js +19 -7
  122. package/dist/grid/chrome/GridTable.js +138 -16
  123. package/dist/grid/chrome/GridTableSurface.d.ts +25 -12
  124. package/dist/grid/chrome/GridTableSurface.js +13 -6
  125. package/dist/grid/chrome/GridTextEditor.js +3 -1
  126. package/dist/grid/chrome/GridValueListEditor.js +1 -1
  127. package/dist/grid/chrome/cell-clipboard.d.ts +1 -1
  128. package/dist/grid/chrome/cell-clipboard.js +1 -1
  129. package/dist/grid/chrome/checks.d.ts +10 -2
  130. package/dist/grid/chrome/checks.js +17 -11
  131. package/dist/grid/chrome/column-glyph.d.ts +2 -2
  132. package/dist/grid/chrome/column-glyph.js +4 -0
  133. package/dist/grid/chrome/grid-add-column-items.d.ts +13 -0
  134. package/dist/grid/chrome/grid-add-column-items.js +40 -0
  135. package/dist/grid/chrome/grid-cell-classes.d.ts +2 -0
  136. package/dist/grid/chrome/grid-cell-classes.js +10 -4
  137. package/dist/grid/chrome/grid-column-menu-items.d.ts +75 -0
  138. package/dist/grid/chrome/grid-column-menu-items.js +263 -0
  139. package/dist/grid/chrome/grid-edit-escape.d.ts +4 -0
  140. package/dist/grid/chrome/grid-edit-escape.js +12 -0
  141. package/dist/grid/chrome/grid-edit-session.d.ts +2 -1
  142. package/dist/grid/chrome/grid-edit-session.js +14 -1
  143. package/dist/grid/chrome/grid-figure-value.d.ts +25 -0
  144. package/dist/grid/chrome/grid-figure-value.js +40 -0
  145. package/dist/grid/chrome/grid-fitted-box.d.ts +15 -0
  146. package/dist/grid/chrome/grid-fitted-box.js +26 -0
  147. package/dist/grid/chrome/grid-group-menu-items.d.ts +31 -0
  148. package/dist/grid/chrome/grid-group-menu-items.js +75 -0
  149. package/dist/grid/chrome/grid-group-menu-parts.d.ts +27 -0
  150. package/dist/grid/chrome/grid-group-menu-parts.js +19 -0
  151. package/dist/grid/chrome/grid-hover.d.ts +1 -0
  152. package/dist/grid/chrome/grid-hover.js +13 -1
  153. package/dist/grid/chrome/grid-lab.d.ts +7 -0
  154. package/dist/grid/chrome/grid-lab.js +7 -0
  155. package/dist/grid/chrome/grid-menu-focus.d.ts +12 -0
  156. package/dist/grid/chrome/grid-menu-focus.js +13 -0
  157. package/dist/grid/chrome/{useGridRowContextMenu.d.ts → grid-row-menu-items.d.ts} +15 -4
  158. package/dist/grid/chrome/{useGridRowContextMenu.js → grid-row-menu-items.js} +15 -18
  159. package/dist/grid/chrome/grid-row-props.d.ts +3 -1
  160. package/dist/grid/chrome/grid-row-window.d.ts +15 -5
  161. package/dist/grid/chrome/grid-row-window.js +44 -10
  162. package/dist/grid/chrome/grid-rows-menu.d.ts +38 -0
  163. package/dist/grid/chrome/grid-rows-menu.js +83 -0
  164. package/dist/grid/chrome/grid-table-props.d.ts +53 -8
  165. package/dist/grid/chrome/useGridBandFigures.d.ts +26 -0
  166. package/dist/grid/chrome/useGridBandFigures.js +50 -0
  167. package/dist/grid/chrome/useGridBoxes.d.ts +22 -0
  168. package/dist/grid/chrome/useGridBoxes.js +22 -0
  169. package/dist/grid/chrome/useGridColumnLayout.js +29 -4
  170. package/dist/grid/chrome/useGridKeyboard.js +7 -2
  171. package/dist/grid/chrome/useGridPartColumns.d.ts +5 -0
  172. package/dist/grid/chrome/useGridPartColumns.js +9 -0
  173. package/dist/grid/chrome/useGridRangeGestures.js +2 -1
  174. package/dist/grid/chrome/useGridRecorder.d.ts +16 -0
  175. package/dist/grid/chrome/useGridRecorder.js +144 -0
  176. package/dist/grid/chrome/useGridRowOpener.d.ts +41 -0
  177. package/dist/grid/chrome/useGridRowOpener.js +83 -0
  178. package/dist/grid/chrome/useGridScrollArea.d.ts +38 -12
  179. package/dist/grid/chrome/useGridScrollArea.js +70 -17
  180. package/dist/grid/chrome/useGridTableInteractionModel.d.ts +1 -0
  181. package/dist/grid/chrome/useGridTableInteractionModel.js +67 -9
  182. package/dist/grid/core/clipboard-model.d.ts +11 -3
  183. package/dist/grid/core/clipboard-model.js +9 -4
  184. package/dist/grid/core/commit-model.d.ts +7 -0
  185. package/dist/grid/core/editing-controller.d.ts +31 -1
  186. package/dist/grid/core/editing-controller.js +65 -0
  187. package/dist/grid/core/grid-recorder.d.ts +111 -0
  188. package/dist/grid/core/grid-recorder.js +223 -0
  189. package/dist/grid/core/part-edits.d.ts +18 -0
  190. package/dist/grid/core/part-edits.js +48 -0
  191. package/dist/grid/core/pending-reconciliation.js +12 -3
  192. package/dist/grid/core/refusal-sentence.d.ts +3 -0
  193. package/dist/grid/core/refusal-sentence.js +15 -0
  194. package/dist/grid/core/row-opened-from.d.ts +21 -0
  195. package/dist/grid/core/row-opened-from.js +11 -0
  196. package/dist/grid/core/useGridEditing.d.ts +16 -2
  197. package/dist/grid/core/useGridEditing.js +10 -4
  198. package/dist/grid/core/value-equality.d.ts +19 -1
  199. package/dist/grid/core/value-equality.js +24 -0
  200. package/dist/grid/index.d.ts +4 -1
  201. package/dist/grid/index.js +1 -0
  202. package/dist/grid/useGridTablePrefs.d.ts +1 -1
  203. package/dist/grid-lab.d.ts +18 -0
  204. package/dist/grid-lab.js +16 -0
  205. package/dist/grouping/sort-groups.d.ts +6 -7
  206. package/dist/index.d.ts +1 -0
  207. package/dist/index.js +1 -0
  208. package/dist/internal/reset.d.ts +9 -0
  209. package/dist/internal/reset.js +1 -0
  210. package/dist/model/aggregates.d.ts +3 -3
  211. package/dist/model/aggregates.js +17 -71
  212. package/dist/model/column-capabilities.d.ts +29 -2
  213. package/dist/model/column-capabilities.js +27 -3
  214. package/dist/model/column-filters.js +24 -4
  215. package/dist/model/column-inspect.d.ts +2 -1
  216. package/dist/model/column-order.d.ts +2 -2
  217. package/dist/model/column-schema.d.ts +18 -7
  218. package/dist/model/column-state.d.ts +9 -20
  219. package/dist/model/column-state.js +1 -4
  220. package/dist/model/column-types.d.ts +1 -15
  221. package/dist/model/column-types.js +1 -1
  222. package/dist/model/part-columns.d.ts +17 -0
  223. package/dist/model/part-columns.js +67 -0
  224. package/dist/model/part-rows.d.ts +3 -10
  225. package/dist/model/part-rows.js +6 -11
  226. package/dist/model/part-write.d.ts +11 -0
  227. package/dist/model/part-write.js +52 -0
  228. package/dist/model/preferences.d.ts +3 -23
  229. package/dist/model/preferences.js +1 -17
  230. package/dist/model/prefs-buckets.d.ts +0 -27
  231. package/dist/model/prefs-buckets.js +1 -1
  232. package/dist/model/relation-filters.d.ts +0 -1
  233. package/dist/model/relation-filters.js +1 -1
  234. package/dist/model/row-icon.d.ts +5 -9
  235. package/dist/model/view-rules.d.ts +32 -6
  236. package/dist/model/view-rules.js +101 -21
  237. package/dist/provider/ViewsProvider.d.ts +22 -2
  238. package/dist/provider/ViewsProvider.js +21 -2
  239. package/dist/provider/components.d.ts +197 -9
  240. package/dist/provider/context.d.ts +12 -1
  241. package/dist/provider/desktop.d.ts +3 -0
  242. package/dist/provider/desktop.js +7 -4
  243. package/dist/provider/menu-groups.d.ts +3 -2
  244. package/dist/provider/menu-groups.js +13 -7
  245. package/dist/provider/missing-slot.d.ts +10 -0
  246. package/dist/provider/missing-slot.js +15 -0
  247. package/dist/provider/plain-input.d.ts +3 -2
  248. package/dist/provider/plain-input.js +3 -1
  249. package/dist/react.d.ts +3 -2
  250. package/dist/selection/SelectionBar.d.ts +18 -0
  251. package/dist/selection/SelectionBar.js +92 -0
  252. package/dist/selection/SelectionBarPhone.d.ts +3 -0
  253. package/dist/selection/SelectionBarPhone.js +14 -0
  254. package/dist/selection/bar-overflow.d.ts +12 -0
  255. package/dist/selection/bar-overflow.js +42 -0
  256. package/dist/selection/bar-parts.d.ts +15 -0
  257. package/dist/selection/bar-parts.js +17 -0
  258. package/dist/selection/index.d.ts +2 -0
  259. package/dist/selection/index.js +1 -0
  260. package/dist/selection/types.d.ts +3 -2
  261. package/dist/selection/verbs.d.ts +34 -0
  262. package/dist/selection/verbs.js +1 -0
  263. package/docs/contract.md +142 -39
  264. package/docs/getting-started.md +1 -1
  265. package/docs/guides/atoms.md +32 -4
  266. package/docs/guides/columns.md +1 -1
  267. package/docs/guides/display.md +1 -1
  268. package/docs/guides/editors.md +3 -3
  269. package/docs/guides/ports.md +1 -1
  270. package/docs/guides/selection.md +32 -20
  271. package/docs/guides/the-grid.md +43 -21
  272. package/docs/guides/the-provider.md +14 -4
  273. package/docs/index.md +2 -0
  274. package/docs/install.md +8 -1
  275. package/docs/reference/editors-date.md +2 -0
  276. package/docs/reference/editors-panel.md +4 -4
  277. package/docs/reference/editors-range.md +1 -1
  278. package/docs/reference/editors-relation.md +3 -3
  279. package/docs/reference/editors-select.md +1 -1
  280. package/docs/reference/editors-session.md +3 -2
  281. package/docs/reference/editors-value-list.md +1 -1
  282. package/docs/reference/field-row.md +2 -2
  283. package/docs/reference/grid.md +25 -6
  284. package/docs/reference/react.md +30 -8
  285. package/docs/reference/selection.md +10 -2
  286. package/docs/reference/views.md +42 -36
  287. package/package.json +22 -3
  288. package/skills/views/SKILL.md +3 -3
package/CHANGELOG.md CHANGED
@@ -4,6 +4,647 @@ All notable changes to `@viewkitjs/views`. `0.x`: the API may change between min
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.5.0] — 2026-11-14
8
+
9
+ The selection bar, one conversion between a filter panel and a view's filter tree, figures worked out by
10
+ `@viewkitjs/fields`, and the rows, icons and words the list's panels will draw with. It needs `@viewkitjs/fields`
11
+ 0.12. The panels' own door, `@viewkitjs/views/panels`, is still being built and is not in this version: a later
12
+ release publishes it, with the controls.
13
+
14
+ What an app changes when it takes this version:
15
+
16
+ - **Install `@viewkitjs/fields` 0.12** beside it: the peer is `^0.12.0` (Changed).
17
+ - **Your icons map draws two more glyphs**, `search` and `reset`: an icons map typed `ViewsIcons` doesn't compile
18
+ until it does (For an adapter).
19
+ - **Forty-six new message keys**, ten `views.selection.*` and thirty-six `views.panels.*`. A resolver that falls back
20
+ to `resolveViewsMessage` reads them in English; one that words every message with a `switch` and no default must
21
+ word them, and a test that holds your catalogue to `VIEWS_MESSAGE_KEYS` fails until it does (For an adapter).
22
+ - **Fourteen names are removed**, each with what replaces it (Removed). None of them is needed by a grid, an editor
23
+ or a display that an app draws.
24
+
25
+ ### Added
26
+
27
+ - **The selection bar.** `SelectionBar` on `@viewkitjs/views/selection` draws the bar a selection opens: the count
28
+ that clears it, your verbs as data (`SelectionVerb`: an action, a group, or an options verb picked as badges), the
29
+ trash for `onDelete` and More. An island on a desktop, a pill on a phone whose Actions open the new
30
+ `SelectionSheet` atom, which an app swaps for its own action sheet. Its words are the new `views.selection.*`
31
+ messages, its slots `vk-selection-bar`, `vk-selection-pill` and `vk-selection-chip`, and it reads the new optional
32
+ `--vk-float-shadow`. The provider's new `selectionBar` (`ViewsSelectionBarSettings`) places it.
33
+ - One conversion between a filter panel and a view's filter tree, both ways: `filterPanelFromTree(tree, columns, { parts })`
34
+ reads a tree into `{ op, rules, rest }`, a rule per column (and per part row), and `treeFromFilterPanel(panel, columns,
35
+ { parts })` writes it back. Whatever no row can draw (and/or groups, relation rules, a second rule on one column, an
36
+ operator its editor doesn't write) is kept whole in `rest`, so a round trip loses no rule, and reading the tree it
37
+ writes gives the same state.
38
+ - Quick values convert through the same rules: `quickValuesFromTree(tree, fields)` reads an offered field's picks,
39
+ `withQuickValues(tree, fields, values)` writes them as ordinary root rules. Types: `FilterPanelState`, `QuickValues`,
40
+ `QuickValueField`.
41
+ - Seven atoms for a list's panels' rows, each with a plain default: `ChoiceRow`, `CheckRow`, `RadioRow`,
42
+ `DirectionButton`, `MenuRow`, `ToggleRow` and `PanelSearch`, marked `data-slot="vk-choice-row"` and so on. Your own
43
+ panels may draw with them today.
44
+ - Two icon names: `search` (a panel's text box) and `reset` (a setting's way back to the reader's default).
45
+ - The `views.panels.*` message keys, for the panels' words.
46
+ - `@dnd-kit/core`, `@dnd-kit/sortable` and `@dnd-kit/utilities` as optional peer dependencies, for the panels' door a
47
+ later release publishes. This version reaches none of them: don't install them for it.
48
+
49
+ ### Changed
50
+
51
+ - **The peer is `@viewkitjs/fields` `^0.12.0`.** `ListColumnState`, `ListDensity`, `FigureKind`, `partKey`,
52
+ `parsePartKey` and a group header's figures (`ListGroupSummaryPart`, `ListGroupFigurePart`, `isGroupSummaryPart`,
53
+ `normalizeGroupSummary`, `groupFigurePart`) are now `@viewkitjs/fields/query`'s, re-exported unchanged, so this
54
+ version needs fields 0.12.0, which carries them.
55
+ - A grid's figures (sum, average, smallest, largest, count, filled, unique and ratio) are now worked out by
56
+ `@viewkitjs/fields`, whose query entry answers the same figures in memory and in the shape a database answers.
57
+ Nothing changes in what a footer or a group band shows. `EMPTY_FIGURE`, `combineFigure`, `figureFor`,
58
+ `figureOf`, `isGroupFigures`, `ratioFigure`, `ColumnFigure`, `FigureKind` and `GroupFigures` are still exported
59
+ from `@viewkitjs/views`, now as `@viewkitjs/fields/query`'s own: import them from either.
60
+ - `ListAggregateKind` is now `@viewkitjs/fields/query`'s `FigureKind` under the grid's name: the same picks, written
61
+ once.
62
+ - **`ListSelectionConfig.renderBar` is optional.** A selection with none ticks rows and draws no bar; an app that
63
+ handed `() => null` can drop it.
64
+ - The filter panel's rows leave a set-aside rule unseen and untouched: `rootRulesByColumn` and `rootRelationRules`
65
+ never read one into a row, and `withRootRule` and `withRootRelationRules` keep it as it is when a row is written or
66
+ cleared. Until a list shows set-aside rules, such a rule stays kept and filters nothing.
67
+
68
+ ### Removed
69
+
70
+ - `OrderMode` and `OrderDir`. They restated `@viewkitjs/fields/query`'s `BucketOrderMode` and `SortDirection`, which
71
+ `OrderChoice`, `defaultDirFor` and `sortDirFor` now name:
72
+
73
+ ```ts
74
+ // before
75
+ import type { OrderDir, OrderMode } from "@viewkitjs/views";
76
+ // after
77
+ import type { BucketOrderMode, SortDirection } from "@viewkitjs/fields/query";
78
+ ```
79
+
80
+ - `ListStatusSlot` and `ListRowIconTone`, two more names for `StatusSlot`:
81
+
82
+ ```ts
83
+ // before
84
+ import type { ListStatusSlot } from "@viewkitjs/views";
85
+ // after
86
+ import type { StatusSlot } from "@viewkitjs/fields/design/status-slots";
87
+ ```
88
+
89
+ - `withRootRuleState`. Write a panel's rules back with `treeFromFilterPanel`:
90
+
91
+ ```ts
92
+ // before
93
+ withRootRuleState(tree, columns, rules, { parts: true });
94
+ // after
95
+ treeFromFilterPanel({ ...filterPanelFromTree(tree, columns, { parts: true }), rules }, columns, { parts: true });
96
+ ```
97
+
98
+ - `LIST_AGGREGATE_LABELS`. Word a figure with `aggregateLabel(kind, messages?)`, which gives the same English without
99
+ `messages`:
100
+
101
+ ```ts
102
+ // before
103
+ LIST_AGGREGATE_LABELS.sum;
104
+ // after
105
+ aggregateLabel("sum");
106
+ ```
107
+
108
+ - `PART_KEY_SEPARATOR`: `partKey` joins a key and its part, and `parsePartKey` splits one:
109
+
110
+ ```ts
111
+ // before
112
+ `${columnId}${PART_KEY_SEPARATOR}${part}`;
113
+ // after
114
+ partKey(columnId, part);
115
+ ```
116
+
117
+ - `computeMinWidth`: sum the columns' widths and your gutter yourself.
118
+ - `ListFieldFormatPrefs`, which nothing read.
119
+ - `RELATED_RECORDS_SECTION`, `LIST_DEFAULT_MIN_WIDTH`, `LIST_LAYOUT_DEFAULTS`, `gridColumnIsNumericAgg` and
120
+ `resolveGridRelation`, which only served the function beside them: `buildColumnFilters` places the relation rows,
121
+ `clampColumnWidth` holds a column to 60 pixels when it states no `grid.minWidth`, `readViewLayout` fills in the shipped
122
+ layout, `aggregateOptions` says which figures a column offers, and `@viewkitjs/fields`'
123
+ `resolveRelationValue(raw, col.relation?.entity)` reads a relation value.
124
+
125
+ ### Fixed
126
+
127
+ - A number between, or a range's end between, with one end still empty converts to `null` at that end, both ways, and
128
+ filters nothing until both ends are in. It had been written as `0`, narrowing the list to values from 0.
129
+ - A panel rule on "is empty" or "is not empty" converts to a rule whose value is `null`, which `filterValueSchema`
130
+ accepts. A text row's had carried its box's `""`.
131
+ - `filterPanelFromTree` and `quickValuesFromTree` no longer read a set-aside rule into a row, so writing the panel back
132
+ with `treeFromFilterPanel` or `withQuickValues` keeps it set aside, where before it lost its mark and filtered again.
133
+ - A footer or a group band totalling a column no longer reads a list, a yes/no or blank text as a number: a cell
134
+ holding `[]`, `true` or `" "` is no value, as an empty cell is, so it no longer adds 0 or 1 to a sum or an average.
135
+
136
+ ### For an adapter
137
+
138
+ - **Your icons map draws `search` and `reset`.** `ICON_NAMES` gains both, and `ViewsIcons` requires them:
139
+
140
+ ```tsx
141
+ // before
142
+ const icons: ViewsIcons = { ...glyphs };
143
+ // after
144
+ const icons: ViewsIcons = { ...glyphs, search: SearchIcon, reset: ResetIcon };
145
+ ```
146
+
147
+ - **Forty-six new message keys**: ten `views.selection.*` (the selection bar's words) and thirty-six `views.panels.*`
148
+ (the panels' words). A resolver that words every message with a `switch` and no default must word them too; one
149
+ that falls back to `resolveViewsMessage` reads them in English. The [contract](docs/contract.md#message-keys) lists
150
+ every key with its English.
151
+ - `ATOM_NAMES` gains the seven panel rows and `SelectionSheet`. An adapter typed as the whole `ViewsAtoms` won't
152
+ compile until it maps them or leaves them to the defaults (`Omit<ViewsAtoms, …>`); the provider's `atoms` takes any
153
+ part of it, as before.
154
+
155
+ ## [0.4.0] — 2026-11-13
156
+
157
+ Three bodies of work in one release: the field editors' last fixes, a grid that keeps up better on a phone, and
158
+ what a second app's adapter found missing. Every grid menu, every pick list and the date editor can now draw through
159
+ your app's own `Menu`, `Picker` and `DateBody`; a grid column can show one part of a name, a place or a range; a
160
+ group band's figure can be declared and computed by the grid; Escape can keep what was typed, by field type; and a row
161
+ opened from the grid hands back the way to its cell. It needs `@viewkitjs/fields` 0.11.
162
+
163
+ What an app changes when it takes this version:
164
+
165
+ - **Install `@viewkitjs/fields` 0.11** beside it: the peer is `^0.11.0` (Changed). Its lists of sort orders and
166
+ filter parts now answer a range's `low` and `high` and a place's `postalCode`: code that accepts a `by` or a
167
+ `part` because those lists hold it must also sort or filter by it (fields 0.11.0, Changed).
168
+ - **A `RowMenu` atom of your own** is mounted once around a section's rows, not around each row, and is handed the
169
+ props of the row a press or a right-click came from. One that wraps `children` and opens on a right-click needs
170
+ nothing; one that reads its row from its `children`, or keeps state per row, reads it from the props when the menu
171
+ opens. A `Menu` drawn in the page flow, not in a portal, now draws after the section's rows: make it a popover
172
+ (For an adapter).
173
+ - **Your types, where they use these.** `ViewsMenuItem.label` is text, not a node (Changed). `GridGroupFigure` is a
174
+ union, so code that reads `render` off one checks its shape first (Changed). Atoms typed as the whole `ViewsAtoms`
175
+ add a `RelationRoles`, or spread `DEFAULT_VIEWS_ATOMS` under yours (For an adapter). `Command` and `Calendar` are
176
+ optional in `ViewsComponents` and gone from `COMPONENT_NAMES` and `ComponentName`: code that reads either back off a
177
+ map typed `ViewsComponents` handles `undefined`, and a check of your map reads `OPTIONAL_COMPONENT_NAMES` too (For
178
+ an adapter). `ATOM_NAMES` gains `RelationRoles`, so a check of your atoms against it fails the same way until you
179
+ add one. `GridTable`'s `onOpenRow` is typed `(row, from) => void`: a handler that takes only the row is
180
+ unchanged, but code of yours that calls an `onOpenRow` with the row alone no longer compiles, so give your own prop
181
+ the type `(row) => void` (Changed).
182
+ - **`renderAddColumn` answering `null`** draws no "+ Add column" and keeps no room for one, where `null` drew the
183
+ grid's own (Changed).
184
+ - **A `datetime` your save stores in another time zone** than the one it was typed in now warns that it changed
185
+ elsewhere when your rows come back, where the cell showed your stored value without a word (Fixed).
186
+ - **Your tests.** While a field row saves, its button is `aria-disabled`, no longer `disabled` (Fixed). A grid row
187
+ draws two elements fewer, and each group's rows box ends with one `aria-hidden` box more (Changed, For an adapter).
188
+
189
+ New, and optional, each off until you set it: the provider's `menus`, `sheetActions`, `escape` and `sayRefusals`; the
190
+ components map's `Picker` and `DateBody`; `GridTable`'s `parts`, `groupMenu` and `addColumnOnPhone`; a declared
191
+ figure in `groupFigures`; and `setGridLab`, a recorder for measuring a grid on a device. `onOpenRow` now always hands a
192
+ second argument, `from`, which a handler may read or ignore. Seven message keys are new:
193
+ `views.grid.commit-refused`, `views.grid.commit-refused-many`, `views.menus.row-menu`, `views.menus.commands`,
194
+ `views.menus.commands-unnamed`, `views.menus.column-menu` and `views.menus.figure-menu`. A resolver that answers every
195
+ key fails to compile until it answers them; one that calls `resolveViewsMessage` for the rest reads them in English.
196
+
197
+ Fixed here, as 0.3.0's "Known in 0.3.0" promised: a date typed into a grid date cell and left by Tab is drawn in the
198
+ cell at once, and in Safari a Tab out of a grid date cell's open editor selects the next cell, so → no longer lands
199
+ one cell short (Fixed). No 0.3.1 was published: this version carries both.
200
+
201
+ Nothing else an app calls changes its signature. What is new is optional, and Changed says what behaves differently.
202
+
203
+ ### For an adapter
204
+
205
+ - A sheet that draws a head of its own sets `sheetActions: "head"` on the provider and draws
206
+ `actions.close` and, when handed, `actions.done` there with its own glyphs. The types are
207
+ `ViewsSheetActions`, `ViewsSheetAction` and `ViewsSheetActionsPlace`.
208
+ - A field row's editor host receives `openedByKey` (`RowEditorProps`), true when the row's button was pressed by a
209
+ key rather than a pointer. A host of your own may read it; the select host uses it to focus its list.
210
+ - `RangeEditor` takes `refusal`, your reason for refusing the range. With bands listed it draws it between the
211
+ boxes and the bands, so a host of your own passes it there instead of drawing it, and gives its `EditorPanel`
212
+ `editorDrawsRefusal` so the panel draws none. Without bands nothing changes: you draw the reason as before.
213
+ - The grid writes a new paint flag on its root, `--vk-pin` (`relative` at rest, `sticky` once scrolled sideways). A
214
+ stylesheet that styles the grid's frozen cells need not set their `position`.
215
+ - **`RowMenu` wraps a section's rows, not one row.** The grid mounts your `RowMenu` atom once around each section's
216
+ rows' container, instead of once around every row, and aims it at the row a press or a right-click came from: its
217
+ props (`rowId`, `items`, `openHref`, `onDelete`, `deleteLabel`, `onToggleSelect`) are that row's, set in the same
218
+ event your menu opens on. Right-click, the row's ⋯ and the menu key each open on their own row, as before.
219
+
220
+ What your atom receives now:
221
+
222
+ | | Before | Now |
223
+ | --- | --- | --- |
224
+ | `children` | one row's element | the rows' container: a component that passes the props and `ref` your trigger hands it (a `Slot`, `asChild`) to its own element |
225
+ | `rowId`, `items`, `openHref`, `onDelete`, `deleteLabel` | that row's, fixed | the aimed row's; `rowId` is `""` and `items` empty before any row is aimed at |
226
+ | `onToggleSelect` | there when the row could be selected | there from the first render wherever rows can be selected; it flips the row last pressed, so a long-press is armed before any press |
227
+ | a right-click on no row | — | arrives with `defaultPrevented`, and opens nothing |
228
+
229
+ What to change: nothing, if your atom wraps `children` and opens on a right-click (the default does). An atom that
230
+ reads the row from its own `children`, or that keeps per-row state of its own, reads it from the props at the moment
231
+ the menu opens instead. An atom whose long-press selects calls `onToggleSelect` when the long-press fires, as before.
232
+
233
+ The default atom opens your components' `Menu` at the pointer. If your `Menu` is a popover (drawn in a portal, placed
234
+ at its anchor), it opens where it did. If it draws in the page flow instead, it now draws after the section's rows,
235
+ not after the row: make it a popover.
236
+ - Set your menu's `aria-label` from `label`, and show a disabled row's `disabledReason` (a tooltip, a second
237
+ line). Use the sheet's `label` where your sheet's title or accessible name takes only text.
238
+ - This version needs `@viewkitjs/fields` 0.11.0, and its peer range says so (`^0.11.0`).
239
+ - Atoms typed as the whole `ViewsAtoms` need a `RelationRoles`: add your own, or spread `DEFAULT_VIEWS_ATOMS` under
240
+ yours. Atoms passed as a `Partial<ViewsAtoms>`, or typed without `RelationRoles`, take the default.
241
+ - **`--vk-stick`** (0 or 1) joins the grid's tokens on its frame: 1 while `--vk-pin` is `sticky`, scaling the frozen
242
+ cells' and the rail's sticky offsets. The column names' and the footer's frozen cells, and a group's name, now take
243
+ `position: var(--vk-pin, sticky)` as a row's frozen cells do: plain boxes at rest, sticky once the table is
244
+ scrolled sideways, where they looked the same before.
245
+ - Each group's rows box (`[data-slot="vk-grid-rows"]`) is now `position: relative` and ends with one more element:
246
+ an `aria-hidden` box after its rows that draws that shadow. A row's own rail slot no longer draws it. The column
247
+ names' and the footer's slots still do.
248
+ - Draw `beside` as a submenu whose trigger is the group's own row, `keepOpen` by not closing on that row, and
249
+ `detail` at the row's end, as far as your menu can. An adapter that draws none of them keeps every group in place
250
+ and every row closing, as before, and loses nothing it needs. A ticked row's `onSelect` fires on every pick, also
251
+ when it is already ticked; ticked rows that close, inside a group, are one choice, and ticked rows with `keepOpen`
252
+ are separate ticks. The types are `ViewsMenuItem` and `ViewsMenuRoute`.
253
+ - On a phone (`form: "phone"`), draw no ✕, ✓ or Cancel of your own, and hand every change through
254
+ `onValueChange` as it is made: the editor's panel holds the draft.
255
+ - Draw the empty row from `empty`, never as an item. Typed text that names a known value in any case is taken
256
+ as that value, so `onCreate` may hand back a value that is already a row.
257
+ - Tab is taken before your body hears it.
258
+ - A check of your components map's keys against `COMPONENT_NAMES` now finds `Command` missing from that list.
259
+ Check against `COMPONENT_NAMES` and `OPTIONAL_COMPONENT_NAMES` together.
260
+ - `ViewsComponents["Command"]` is now optional, so code that reads `Command` back off a map typed
261
+ `ViewsComponents` sees it as possibly undefined. Type your map as `ViewsComponents & { Command:
262
+ ViewsCommandParts }` where you read it back, or read it through `useViews()`, which always fills it.
263
+ - Your body does its own search. A place's country list hands each country's name as its words and its code as
264
+ its value; the package's own list also found a country by its code, so match the value too if you want that.
265
+ - `badge` is the word for the row's end; `kind` is the record's kind as your app names it, for an avatar's shape
266
+ with `avatarUrl`. They are two different things.
267
+ - `glyph` arrives unsized: size it to your row.
268
+ - An action's `key` is its identity among the actions.
269
+ - Held records come first while nothing is typed, and by the same search as the rest once something is.
270
+ - On this route the keys inside the list are yours. The package's own list keeps Enter from taking out the first
271
+ linked record as it opens, and makes the highlighted linked record the lead on Space; if your body should do
272
+ either, it does it.
273
+ - Hand every change through `onValueChange` as it is made, on a computer too: a day pressed while a time may follow, a
274
+ time set, a typed day once it reads as one. The editor holds the draft, so Escape (where your app keeps it) and a
275
+ press outside save what was handed, and nothing else. A body that holds its own draft until a keep of its own loses
276
+ those changes.
277
+ - On a phone (`form: "phone"`), draw no ✕, ✓ or Cancel of your own: the editor's panel holds them.
278
+ - Call `onDone` only for a pick that finishes the edit (a day on a field with no time, the empty pick), never on
279
+ Escape or on leaving: the editor decides what those mean.
280
+ - Escape is taken before your body hears it, so a popover of your own inside the body loses its Escape. Tab walks
281
+ your body's controls and closes from either end: draw any popover of yours inside the body's element, since one in
282
+ a portal reads as a Tab out.
283
+ - On a date and time, a bare day moves the day and keeps the time in force; where the field's time is optional, a bare
284
+ day holds no time.
285
+ - `next-monday` is the Monday after today, a week on when today is a Monday.
286
+ - `ViewsComponents["Calendar"]` is now optional: type your map as `ViewsComponents & { Calendar:
287
+ ComponentType<ViewsCalendarProps> }` where you read it back, or read it through `useViews()`, which always fills it.
288
+
289
+ ### Added
290
+
291
+ - Your sheet can hold an editor's ✕ and ✓ in its own head. Set the provider's `sheetActions` to `head` and
292
+ your `Sheet` is handed `actions`: `close`, which throws the edit away as a swipe does, and `done`, which
293
+ closes it as done, each a `label` and an `onPress`. The editor panel then draws no bar of its own. A pick
294
+ of one (a select, a single relation), which saves on its pick, hands no `done`. `sheetActions` is `bar` by
295
+ default: the panel's own bar, as before.
296
+ - `EditorPanel` takes `savesOnPick`, for a body that saves on its pick: a sheet that draws the panel's
297
+ buttons in its head is handed no ✓. The panel's own bar keeps its ✓.
298
+ - `setGridLab` (on the root door) turns on, for one page, a recorder for measuring a grid on a device: it hands
299
+ each recording of the grid's scrolls, frames and touches, with a summary, to a function you give (`record`).
300
+ Off unless set; with it unset, nothing changes. The recording's shape is exported from `@viewkitjs/views/grid`
301
+ as `GridRecording`, with its caps as `GRID_RECORDER_CAPS`.
302
+ - `GridTable` takes `addColumnOnPhone`: "+ Add column" ends the header on a phone too, and its list opens in your
303
+ `Sheet` (titled "Add column", half height), so a person who hides a column on a phone can bring it back there.
304
+ Its search waits for a tap, as the grid's pickers do in a sheet. Off by default: a phone's header ends with
305
+ nothing, as before.
306
+ - `groupMenu` on `GridTable` names the parts a group band's ⋯ menu holds: `"sort"` (its sort choices),
307
+ `"figures"` (the count and each figure, turned on and off) and `"hide"`, as `GridGroupMenuPart`s. The ⋯
308
+ then holds exactly the parts you name and pass what they need (`sort` with `sortOptions`; `groupFigures`
309
+ with `onGroupSummaryChange`; `onHideGroup`), so the figure toggles or Hide come without sort, and sort
310
+ without them. With `groupMenu`, the sort list always searches through your `Command`, at any count, so
311
+ you know from your props alone whether the menu reaches it: leave `"sort"` out while your `Command` isn't
312
+ ready.
313
+
314
+ ```tsx
315
+ <GridTable groupMenu={["figures", "hide"]} groupFigures={figures} onGroupSummaryChange={setPart} onHideGroup={hide} … />
316
+ ```
317
+
318
+ Without `groupMenu` the ⋯ is as before: it opens for sort or Hide, carries the figure toggles with them,
319
+ and searches past eight sort choices.
320
+ - `ViewsProvider` takes `sayRefusals`, off by default. On, the grid says why your app refused an edit it sent (a cell,
321
+ a batch, an undo or a redo) through the toast port's `error`: the error's own words, or "Couldn't save Amount." when
322
+ it has none, and a batch once, with its count. Turn it on and stop toasting your own refusals, or each is said twice.
323
+ - The messages `views.grid.commit-refused` (`{ field }`) and `views.grid.commit-refused-many` (`{ count, reason? }`).
324
+ - A group band's figure can be declared instead of drawn: `{ part, column, kind }` in `groupFigures`, with an
325
+ optional `label` (the column's header by default). The grid adds it up and writes it exactly as that
326
+ column's footer does, in the column's format, decimals and currency, a paged group's figure read from the
327
+ group's `figures`, or your own footer cell where `renderAggregate` draws one. A band and the footer under it
328
+ then read the same:
329
+
330
+ ```ts
331
+ // before: summed and formatted by the app
332
+ { part: "total", label: "Value", render: (group) => euros.format(sumOf(group.items)) }
333
+ // after: the grid's own figure
334
+ { part: "total", column: "value", kind: "sum" }
335
+ ```
336
+
337
+ A declared figure the group has nothing for (a paged group whose source didn't count it) is left out of the
338
+ band. A figure with `render` draws as before. `GridGroupFigure` is now `GridDeclaredFigure | GridDrawnFigure`,
339
+ both exported from `@viewkitjs/views/grid`.
340
+ - `GridTable`'s `onOpenRow` receives, with the row, a `from` (`GridRowOpenedFrom`, exported from `/grid`): the way
341
+ back to the cell the row was opened from, for when what it opened closes. `from.focus()` puts the focus back on
342
+ that cell and returns true; `from.element` is that cell, for a dialog's final-focus option. The place is read again
343
+ when you call it: a record a refetch moved under another group is found by its id, at its first place, and drawn
344
+ if it moved out of the drawn rows; a record no longer shown sends the focus to the grid's frame (`focus()` returns
345
+ false, `element()` is the frame). On a desktop the cell is selected too, so the next arrow moves from it; below
346
+ your `desktopQuery` only the focus goes back, and no cell is selected. A dialog that asks for its final focus while
347
+ React is closing it is answered again once the close is done, unless the focus went outside the grid. An
348
+ `onOpenRow` that takes only the row is unchanged.
349
+
350
+ An app no longer finds the row again by searching the page for the grid's own row markup:
351
+
352
+ ```tsx
353
+ onOpenRow={(deal, from) => openDrawer(deal.id, { finalFocus: from.element })}
354
+ ```
355
+ - Every menu the package opens names itself: your `Menu` is handed `label`, its accessible name. The row's
356
+ menu is "Row actions" (`views.menus.row-menu`); a `command` field's verbs are "Actions for <field>"
357
+ (`views.menus.commands`), or "Actions" (`views.menus.commands-unnamed`) when the opener hands no field.
358
+ `CommandMenu` takes `label`, the field's name, which the cell and the field row hand it.
359
+ - A disabled menu row can say why: `disabledReason` on `ViewsMenuItem`, on a row menu's `ViewsRowMenuItem`
360
+ and on a verb's `FieldRowMenuItem`, handed through to your `Menu`. A row under a disabled group that gives
361
+ no reason carries the group's.
362
+ - Your `Sheet` is handed `label`, its title in words whenever the title is words.
363
+ - The `RelationRoles` atom, marked `data-slot="vk-relation-roles"`, with its props type `ViewsRelationRolesProps`: a
364
+ link's roles, drawn inside its chip after the record's name. It gets the `RelationValue` and its roles in order,
365
+ each its stored `value` and its `label` from the field's `links.roles` (a role the field no longer declares keeps
366
+ its value as its label), and draws only when the link holds one or more. The default draws the labels in the
367
+ subtle colour after a middle dot (`Bea · Champion, Decision maker`), cut before the name in a narrow cell, and its
368
+ hover names the record and every role. Swap it
369
+ through the provider's `atoms` to draw roles your way, a tag per role or a second line.
370
+ - **The lab can lock a flick to one direction on a touch screen.** `setGridLab({ boxes: 2 })` makes the grid scroll
371
+ its rows up and down in their own box (`[data-slot="vk-grid-scroll"]`), inside an outer box that scrolls the table
372
+ sideways (`[data-slot="vk-grid-pan"]`), on a device that doesn't hover with a fine pointer. iOS then keeps each
373
+ flick to the direction it starts in. Without it, and on a mouse or a trackpad, the grid scrolls one box both ways,
374
+ as before. While it is on, the up/down scroll bar sits at the table's right end, and a script that reads the
375
+ table's sideways place reads it from `vk-grid-pan`.
376
+ - **A recording says which mode ran:** `grid.boxes`, 1 or 2.
377
+ - `ViewsProvider` takes `escape`, what Escape does in an editor of each field type: `{ date: "keep", location: "keep" }`
378
+ keeps what was typed and closes the editor, as a press outside does; a value that would be refused stays open with
379
+ its reason, and a second Escape while that refusal stands throws the edit away. A type left out throws the edit away, as every editor does today, so nothing changes until you
380
+ name a type. It holds on a desktop; on a phone every way out of the sheet still throws the edit away. The grid's
381
+ cells, the field row and a host built on the session follow it, and the grid's own Escape does too.
382
+ - `useAnchoredEditSession` takes `escape: "cancel" | "keep"`, and its `EditSession` says `keeps`. `useEscapeRule(type)`
383
+ reads the provider's rule for a field type, for a host of your own to hand its session. The types `EditEscape` and
384
+ `ViewsEscapeRules` come from `@viewkitjs/views/react`.
385
+ - `ValueListEditor` takes `escapeKeeps`: where its host's session keeps, Escape checks the rows first, as Enter does.
386
+ - `GridTable` takes `parts`: a column per part of a name, a place or a range, beside the whole one. A place offers
387
+ its country, region, city and postal code; a name its given and family names; a range its low and high ends. Each
388
+ is hidden until a person picks it in "+ Add column", headed with the field and the part ("Address · Country").
389
+ It reads, sorts, copies, edits and pastes as its part. Off by default.
390
+ - A part column's id is `partKey(columnId, part)`, the key its Filter row already has with `parts: true` on the
391
+ panels, so the rule a person sets on that row filters what the column shows. Its sort value is
392
+ `partKey(fieldKey, part)`: `parsePartKey` turns it into a sort's `fieldKey` and `by`. Keep part columns out of
393
+ your panels: hand them your declared columns, as before.
394
+ - "+ Add column" drills into a field's parts: a field with parts is one row, with how many it offers and a ›, that
395
+ opens the field (if hidden) and its hidden parts, with a row back. A search lists every hidden column, parts by
396
+ their full label. A list with no parts reads as before.
397
+ - `ListColumn.partOf` (`ListColumnPartOf`) marks a part column the grid derived: the whole column's id, the part and
398
+ the whole's field. `ListColumnItem.partOf` carries the whole's id, the part and the part's word to your own
399
+ `renderAddColumn`, so it can drill as the grid's own does.
400
+ - The Filter panel's part rows (`parts: true`) gain a range's low and high ends, each a number row, and the Sort
401
+ options gain a place's postal code and a range's two ends.
402
+ - A part column of `GridTable`'s `parts` edits and pastes as its part, in a box of its own: text for a name's given
403
+ or family name and a place's region, city and postal code, a number for a range's low or high end, and the select
404
+ editor over every country by name (plain rows, searchable) for a place's country. A paste or a fill into a country
405
+ cell takes a country's name, in the app's locale or in English, or its code.
406
+ - A part's commit writes the whole value with that part replaced. `onCellCommit` and `onCellsCommit` receive the
407
+ whole column's id and the whole value, so a place keeps its other parts, a range its other end and a name its other
408
+ part. As with every composite value, the commit goes without a pending overlay, and the refetch repaints.
409
+ - A name's given or family name rebuilds the full name only when the full name was empty or exactly the two joined by
410
+ a space; a full name written another way ("Nagy Imre") is kept. A place's other country clears its region and its
411
+ code, and another region clears its code.
412
+ - A paste over two parts of one field in one row lands as one edit of the whole. A part edit made while the field's
413
+ earlier ones are still in flight builds on them.
414
+ - A part is locked, refused and read-only as its whole is: its lock, its reasons and its writability. A part may be
415
+ emptied unless its whole declares `clearable: false`; emptying the last part is judged by the field. A box refuses
416
+ a value the whole field would refuse, such as a range's low end above its high end, and stays open with the
417
+ field's reason.
418
+ - Escape in a part's box follows the box's own type, text or number, not the field's: `escape={{ name: "keep" }}` on
419
+ the provider does not reach a given name's box.
420
+ - `ListColumnPartOf` takes the row type (`ListColumnPartOf<Row>`) and gains `read(row)`, the whole value as stored on
421
+ a row: the whole column's `editAccessor`, else its `accessor`.
422
+ - `coerceWrite`, from `@viewkitjs/views`: a value coerced into a column's write shape by its type before any
423
+ field is asked (a boolean read from its spellings, an email or a link trimmed and checked, several values split
424
+ from text), answering `{ ok, value }` or `{ ok: false, reason }`.
425
+ - The grid can open its own menus through your `Menu`. Set the provider's `menus` to `menu` and the footer's figure
426
+ picker hands your `Menu` one row per figure, the current one `checked`, named "Calculate <column>". `popover`, the
427
+ default, keeps ViewKit's rows in your `Popover`, as before.
428
+ - A menu row may carry three hints: `beside`, on a group, to open its rows one level in rather than in place;
429
+ `keepOpen`, on a checkable row, to leave the menu open when picked; and `detail`, its current value in words, for
430
+ its end.
431
+ - With the provider's `menus` set to `menu`, a column's header menu goes through your `Menu`: sort and group as rows,
432
+ each format setting (decimals, currency, a date's or a duration's style, a percent's display) and each option's
433
+ colour a group that opens beside it with its current choice as `detail`, Show time a tick that keeps the menu open,
434
+ then move, your rows and Hide. It is named "Options for <column>".
435
+ - `columnMenuItems(fieldKey)` hands your rows for a column's field as data on the `menu` route, beside
436
+ `renderColumnMenuRows`, which still draws them on the `popover` route. Key them apart from the grid's own rows
437
+ (`sort-asc`, `hide-column` and the rest).
438
+ - On the `menu` route a pick of an option's colour closes the menu (one choice, its group ticking one colour:
439
+ Automatic while the option has none of its own); on the `popover` route it still closes only the colours beside it.
440
+ - With the provider's `menus` set to `menu`, a group's ⋯ goes through your `Menu`, named "Group options": its sort
441
+ choices a group beside it, the current one ticked and named as its `detail` (picking it again flips its direction),
442
+ with no search field; the Show figures as ticks that keep the menu open; Hide. `groupMenu` still chooses its parts.
443
+ On the `popover` route the sort list still searches through your `Command`.
444
+ - With the provider's `menus` set to `menu`, the grid's own "+ Add column" goes through your `Menu`, named "Add
445
+ column": each hidden column a row, a field with parts a group beside it (its count as `detail`, the field and its
446
+ hidden parts inside), no search field; on a phone your `Menu` too, in place of the `Sheet`. With nothing to add,
447
+ one disabled row says all columns are shown. On the `popover` route it is as before.
448
+ - `Picker`, an optional slot in the components map for a whole pick list your app draws: its search, its rows,
449
+ its empty row and its create row. It is handed the rows as data (`ViewsPickerItem`: a value, its words, a
450
+ status slot or a category colour, a glyph, a second line, a group), what is held (one value or `null`; several,
451
+ a list), the empty row's words, the search's words, `onCreate` (handed what was typed, it returns the value it
452
+ makes), what was typed on what opened it, `autoFocus` and `form`. It hands back `onValueChange` (the pick, or
453
+ the whole new list) and `onDone` (a pick of one is made). Handed one, a select, a several-values field and a
454
+ place's country and region lists open it; they keep their keys, their drafts and their saving, and on a phone
455
+ the panel's ✕ and ✓. Left out, they draw from `Command` as before.
456
+ - `ViewsPickerProps` and `ViewsPickerItem`, from `@viewkitjs/views/react`.
457
+ - The relation editors, of one record and of several, open your `Picker` when the provider has one. The editor
458
+ filters a static list by label or fetches a remote one a page at a time, as its own list does, and hands your
459
+ body the rows to draw.
460
+ - New optional `Picker` props for them: `onSearch` (hand it every typed query; draw `items` as handed, never
461
+ filtered again), `doing` (`searching` or `failed`), `onRetry`, `onMore` (call it as the list's end comes into
462
+ view), `actions` (`ViewsPickerAction`: rows that do something, such as create a record with what was typed;
463
+ picking one closes the editor, then runs it) and `lead` (in a set whose field leads: which value leads,
464
+ `onLead`, and the words for both).
465
+ - A row (`ViewsPickerItem`) may carry `badge` (a word telling kinds apart), `glyph` (the record's own glyph),
466
+ `avatarUrl` and `kind` (the record's kind).
467
+ - `label` on `RelationEditor` and `RelationSetEditor`: the field's name, for your `Picker`.
468
+ - `DateBody`, an optional slot in the components map for a whole date body your app draws: its typed line, its days,
469
+ its quick picks and its time. It is handed the value on the local calendar (a day, a day and a time, or `null`),
470
+ whether it holds a time, whether it may be emptied, the quick picks (`today`, `tomorrow`, `next-monday`, and `none`
471
+ where it may be emptied), today, what was typed on what opened it, `autoFocus` and `form`. It hands back
472
+ `onValueChange` and `onDone`. Handed one, the date editor opens it in the grid, a field row and a card, and keeps its
473
+ keys, its draft, Escape's rule by field type, the write check and the saving; on a phone, the panel's ✕ and ✓. Left
474
+ out, the date editor draws as before.
475
+ - `ViewsDateBodyProps` and `ViewsDatePick`, from `@viewkitjs/views/react`. `DateEditor` takes an optional `label`, the
476
+ field's name for your body.
477
+
478
+ ### Changed
479
+
480
+ - The peer `@viewkitjs/fields` is `^0.11.0` (was `^0.10.0`): install fields 0.11 beside views 0.4. Under `0.x` a
481
+ `^0.11.0` peer accepts no 0.12.
482
+ - A grid row costs less to draw, so a fast flick through a long list keeps up better on a phone. A row draws two
483
+ elements fewer (the checkbox column's backing and bottom line are now its own `::before` and `::after`). On a screen
484
+ no pointer can hover (a phone): a cell at rest is no longer a positioned box (it becomes one while it is focused,
485
+ edited or in a range, and a name or a pick-list cell stays one), rows no longer subscribe to the hover that draws the
486
+ name's actions and the ▾. Everywhere, a date mounts its long form's tooltip at the first mouse or pen over it,
487
+ not with the date. Nothing looks or behaves differently.
488
+ - `renderAddColumn` answering `null` now draws no "+ Add column", and the header keeps no room for one, so you can
489
+ turn on resizing, moving and hiding columns (`onColumnStateChange`) without it. Before, `null` drew the grid's
490
+ own. Nothing else changes: leaving the prop out, or answering `undefined`, `false` or `""`, still draws the
491
+ grid's own.
492
+
493
+ ```tsx
494
+ // Before: column state always brought "+ Add column".
495
+ <GridTable onColumnStateChange={save} />
496
+ // Now: column state without it.
497
+ <GridTable onColumnStateChange={save} renderAddColumn={() => null} />
498
+ ```
499
+
500
+ The table asks `renderAddColumn` whether to draw and the header asks it for the cell: keep its answer a plain
501
+ function of the columns it is handed.
502
+ - `GridGroupFigure` is a union, `GridDeclaredFigure | GridDrawnFigure`. Code that builds a list of figures
503
+ with `render` compiles as before; code that reads `render` off a `GridGroupFigure` checks its shape first,
504
+ or types its list as the drawn kind:
505
+
506
+ ```ts
507
+ // before
508
+ figures.map((figure) => figure.render(group))
509
+ // after, a list you draw yourself
510
+ const drawn: GridDrawnFigure<Deal>[] = figures;
511
+ // after, a mixed list
512
+ figures.map((figure) => ("render" in figure ? figure.render(group) : null))
513
+ ```
514
+ - `GridTable`'s `onOpenRow` is `(row: Row, from: GridRowOpenedFrom) => void` (was `(row: Row) => void`). A handler
515
+ that takes only the row is unchanged; code of yours that calls an `onOpenRow` with the row alone gives its own
516
+ prop the type `(row: Row) => void`.
517
+ - `ViewsMenuItem.label` is `string` (it was `ReactNode`). Every row the package builds was already words, so
518
+ a `Menu` that writes its rows' names takes the label as it is, with no cast. A `Menu` of yours reads it
519
+ unchanged; code that builds a `ViewsMenuItem` with an element as its label hands words instead:
520
+
521
+ ```ts
522
+ // before
523
+ { key: "pin", label: <b>Pin</b> }
524
+ // after
525
+ { key: "pin", label: "Pin" }
526
+ ```
527
+ - A relation chip on a `many` relation that declares `links` draws its link's roles, read with `relationRolesOf`,
528
+ and the hover of a cell of several names them (`Bea · Champion, Decision maker, Ana`). A user, a one relation and a many relation without
529
+ `links` draw none, whatever their values carry. A link with no role draws as before.
530
+ - The set editor commits each link with the `role` and `roles` it was stored with, as it already kept `role`; a new
531
+ link has neither. Nothing converts one into the other.
532
+ - A place field limited to some `parts` offers part columns only for those.
533
+ - `Command` is optional. An app that hands `Picker` and sets `menus: "menu"` needs none. A list that needs it, in an app that handed none, throws an error naming it. `COMPONENT_NAMES` no
534
+ longer lists `Command`; `OPTIONAL_COMPONENT_NAMES` lists `Input`, `Command` and `Picker`.
535
+ - With `Picker` handed and `menus: "menu"` set, nothing reaches `Command`: a relation goes through your
536
+ `Picker` too.
537
+ - `Calendar` is optional. Handed `DateBody`, it is never reached; the date editor drawn without one, in an app that
538
+ handed no `Calendar`, throws an error naming it. `COMPONENT_NAMES` no longer lists `Calendar`;
539
+ `OPTIONAL_COMPONENT_NAMES` lists `Input`, `Command`, `Picker`, `Calendar` and `DateBody`.
540
+
541
+ ### Fixed
542
+
543
+ - A second click, a double-click or Enter on a grid cell whose column your list's settings lock says why it can't
544
+ be edited ("locked by workspace settings"), as a column with no write does, and Enter keeps the focus on the
545
+ cell. It had started an edit that opened nothing and said nothing. A locked text its cell cuts off still opens
546
+ whole, read-only.
547
+ - In WebKit (Safari), Tab out of the date editor closes it, keeps what it shows and, in a grid, selects the next cell,
548
+ as in Chromium and Firefox. WebKit's Tab skips buttons, so from the calendar's day it passed the Clear row and left
549
+ the editor on its own: the grid kept the date cell selected, and → landed one cell short.
550
+ - A grid's one-line text editor (a link, an email, a phone, a domain, a plain text) grows past its cell when its
551
+ value is wider than the cell, up to 320px, as a money editor does, so the whole value shows while it is edited. A
552
+ link the cell shows without its `https://` had opened in a box the cell's width, cut at its end. A value that
553
+ fits opens as it always did.
554
+ - A day typed or picked into a grid's calendar-day (`date`) cell is drawn in the cell as soon as the editor closes,
555
+ and your next read of the rows confirms it. It had been drawn only when that read came back, so the cell sat
556
+ blank, or on its old day, for as long as your save and refetch took. A `datetime` cell still shows its new value
557
+ when your rows are read again.
558
+ - With no date stored, the date editor opens with an empty date box and the calendar on this month, in every host.
559
+ It had shown today's date, which a close without a pick or a typed day never kept.
560
+ - A field row's select or status of eight options or fewer, opened with Enter or Space on the row, puts the focus on
561
+ the value it holds: the arrow keys walk its options and Enter picks one, and an Enter at once changes nothing.
562
+ Nothing in the list had taken the focus, so the keys reached nothing. Opened with the pointer, or in the phone's
563
+ sheet, it behaves as before.
564
+ - Tab and Shift-Tab leave a select, from a long list's search or from a short list's focused option: the editor
565
+ closes with nothing changed, and the host moves on as it does after every other picker (a field row and a card give
566
+ the focus back to the field). A popover that keeps the focus inside it, as Radix's does, had looped Tab back to the
567
+ search, so only Escape or a pick could leave.
568
+ - A date and time set in a grid's `datetime` cell is drawn in the cell as soon as the editor closes, and your next
569
+ read of the rows confirms it. It had been drawn only when that read came back, so the cell kept its old value, or
570
+ sat blank, for as long as your save and refetch took. The minute the editor writes and the instant your rows
571
+ store count as one value however each is spelled (with seconds, an offset or in UTC), so a row that stores what
572
+ was written raises no "changed elsewhere" warning, and one that stores a different minute still does. Nothing
573
+ changes in what your save receives or answers. The editor writes the minute in the viewer's own time zone: if
574
+ your save stores it in another zone than the one it was typed in, the cell now warns that it changed elsewhere
575
+ when your rows come back, where it had shown your stored value without a word.
576
+ - On an iPhone, a fast flick through a long grid no longer leaves the whole screen empty under the column names, and
577
+ the scroll no longer sticks while it draws. A frozen column's cells sat at z-index 0 when the table wasn't scrolled
578
+ sideways, which made Safari draw every other cell as a layer of its own: each step of the scroll's drawing took
579
+ 120–160 ms on iOS. They now sit at 1 at rest (still under a neighbour's focus and range rings) and 7 while the
580
+ table is scrolled sideways, as before.
581
+ - An in-place grid editor grown past its cell (a money or number amount, or a line of text, wider than the cell)
582
+ draws over the frozen identity columns while it is open, with the edge of the frozen block under it, so the whole
583
+ value and the ≈ line under a converted amount read. With the table scrolled sideways it had been drawn under them.
584
+ - A click on a field row right after a pick in another row opens its editor and keeps it open. The row you picked in
585
+ waits for its save before taking the focus back; when the save landed after you had opened the next row, it took
586
+ the focus anyway and that row's editor closed. A press or a focus anywhere now lets that wait go.
587
+ - A start-aligned number editor (a record's field row) gives its amount's box way in a row narrower than the box
588
+ and its currency, so the whole currency code stays inside the row, as on a phone. It had kept a fixed 160px box
589
+ and pushed the code past the row's edge. A row wide enough looks as it did.
590
+ - A percent shown as a bar draws its bar and its figure together, both whole, in a record's field row, read-only
591
+ or not. There the figure had sat pushed right with a gap before it, and the bar had dropped onto a second line,
592
+ cut off. In a grid's column the bar narrows and widens as before.
593
+ - A refused range whose field names its bands shows its reason right under the two boxes, above the bands, in the
594
+ grid, a record's field row and a sheet on a phone. On the desktop the bands' menu had covered the reason, and in
595
+ a sheet the reason was drawn under every band, away from the boxes.
596
+ - On an iPhone, a fast flick through a long grid leaves fewer empty strips. A row's frozen cells and checkbox rail
597
+ are plain boxes while the table isn't scrolled sideways, and pin as soon as it is: a sticky element in every drawn
598
+ row was what Safari couldn't keep up with as rows came and went. At rest they draw exactly where they did; in the
599
+ first frame of a sideways swipe they move with the table before they pin.
600
+ - A date or number cell no longer builds a new `Intl` formatter each time it is drawn. They are built once per
601
+ locale, zone and options.
602
+ - A grid drawn while off screen and then moved into view without a scroll (a pager that moves its track, a transform,
603
+ a carousel) now draws its rows as it arrives. It used to show only empty row lines until something on the page
604
+ scrolled or the window was resized. The grid now also watches its scroll area cross the edge of the window, where
605
+ the browser has an `IntersectionObserver`.
606
+ - In an app without Tailwind's base reset (preflight), the grid's menus drew their rows as the browser's grey
607
+ bordered buttons, and a group's fold as a framed square. Every button, input, textarea and link the rendering
608
+ draws itself now resets itself, at zero specificity: it looks the same with or without a base reset, any class
609
+ on it still wins, and nothing of your app's is touched. The rendering needs no base reset of yours.
610
+ - A grouped grid's pinned group head no longer rises over your page's own sticky header or bars. The grid's
611
+ frame (`data-slot="vk-grid"`) is its own stacking context (`isolation: isolate`), so what the grid pins or
612
+ lifts inside it (a group's head, the column names, frozen cells) stays inside it, under anything of your page
613
+ with a positive z-index. It adds no z-index of its own. A wrapper of yours that set `isolation: isolate` around the
614
+ grid for this can drop it.
615
+ - A popover's Escape asks the edit session once, though the popover reports the close it causes after it.
616
+ - A day pasted into a grid's calendar-day (`date`) field cell, or filled down from one, and a date and time pasted
617
+ or filled into a `datetime` cell, are drawn in the cell as soon as they are written, as a value set through the
618
+ cell's editor is, and your next read of the rows confirms them with no "changed elsewhere" warning. They had been
619
+ drawn only when that read came back, so the cells kept their old values, or sat blank, for as long as your save and
620
+ refetch took. A `date` column with no field still shows a pasted or filled day when your rows are read again, as
621
+ its editor does. Nothing changes in what your save receives or answers.
622
+ - A grid cell of a calendar-day (`date`) field reads the day your row hands its editor as that day's local midnight
623
+ with no zone (`2026-11-15T00:00:00`, the spelling that keeps a bare day from opening a day early west of Greenwich)
624
+ as the same day the editor, a paste and a fill write (`2026-11-15`). So a day typed through the cell's editor, as
625
+ well as one pasted or filled, raises no "changed elsewhere" warning when your next read of the rows comes back. A day
626
+ filled down from such a cell now fills every cell it covers, and undoing a typed day puts back the day it replaced:
627
+ in 0.3.0 and before, the fill skipped those cells and the undo had no day to put back. A value with a zone (`Z`, an
628
+ offset) or a time of day is still not read as a day, so no day moves across a time zone. Nothing changes in what
629
+ your save receives.
630
+ - A field row keeps the keyboard's place while its save is on its way. After a pick or an Enter in a row's editor, the
631
+ focus waited on the page until the save landed, so a Tab pressed in that time started again from the top. The row
632
+ now takes the focus back as soon as its editor closes, and a Tab moves on from it at once. While it saves, the row's
633
+ button is marked `aria-disabled` (it was `disabled`), and a press on it opens nothing.
634
+ - A fast flick through the grid draws faster on a phone, most of all once the table has moved sideways. The frozen
635
+ columns' edge shadow is now drawn once for each group's rows rather than on every row. It looks the same.
636
+ - A range's low or high end column (`GridTable`'s `parts`) draws the range's period after its unit, as the whole
637
+ range's cell does: a yearly salary's "Salary · Low" reads "50,000 EUR /yr", where it read "50,000 EUR". The period
638
+ rides the column's `format.suffix` ("EUR /yr", or "/mo" with no unit), so a part column's suffix now carries it.
639
+ - The Filter panel's row for a range's low or high end (`parts: true`) shows and compares its figure as the end's
640
+ column draws it: with the range's unit (%, a fixed currency code, else its suffix) beside the box, and at its
641
+ decimals (the reader's setting for that column, else the range's, whole numbers for an integer range). An "equals
642
+ 10" now holds for 10.4 on a range shown with no decimals, where it compared at two.
643
+ - A dialog that hands its final focus only to a tabbable element (as Base UI's does), given `from.element` while the
644
+ row it was opened from isn't drawn, no longer lands the focus on the grid's first cell with that cell selected.
645
+ The focus goes to the row's cell once the row is drawn, selected on a desktop and with no cell selected below your
646
+ `desktopQuery`. For a record no longer shown, on any screen, it stays on the grid's frame with no cell selected.
647
+
7
648
  ## [0.3.0] — 2026-11-11
8
649
 
9
650
  Two projects in one release. The field editors: every editor closes through one edit session, and on a phone in